diff --git a/src/pages/master/device/component/DetailDevice.jsx b/src/pages/master/device/component/DetailDevice.jsx
index 815fe5e..5550d4b 100644
--- a/src/pages/master/device/component/DetailDevice.jsx
+++ b/src/pages/master/device/component/DetailDevice.jsx
@@ -172,6 +172,19 @@ const DetailDevice = (props) => {
}
};
+ const [period, setPeriod] = useState({
+ period: undefined,
+ start_date: null,
+ end_date: null,
+ });
+
+ const handleMonthly = (field, value) => {
+ setPeriod((prev) => ({
+ ...prev,
+ [field]: value,
+ }));
+ };
+
useEffect(() => {
if (props.showModal && (props.actionMode === 'add' || props.actionMode === 'edit')) {
fetchBrands();
@@ -381,7 +394,7 @@ const DetailDevice = (props) => {
-
Reminder At
+
Reminder At(Yearly)
{
+
+ Period
+ *
+
+
+
+ {period.period === 'custom' && (
+
+
+ setPeriod((prev) => ({
+ ...prev,
+ start_date: date ? date.toISOString() : null,
+ }))
+ }
+ style={{ flex: 1 }}
+ />
+
+
+ setPeriod((prev) => ({
+ ...prev,
+ end_date: date ? date.toISOString() : null,
+ }))
+ }
+ style={{ flex: 1 }}
+ />
+
+ )}
+
+
Reminder At(Monthly)
+
+
+ handleDateChange(
+ 'reminder_at',
+ date ? date.toISOString() : null
+ )
+ }
+ format="DD-MM-YYYY HH:mm"
+ showTime={{ format: 'HH:mm' }}
+ style={{ flex: 1 }}
+ />
+
+
+
+
Device Description