From 93513c4a3a2cebcd39855d457eaedc840fc4866d Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Wed, 21 Jan 2026 09:36:36 +0700 Subject: [PATCH 1/4] chore: add flock name in ClosingsTable --- src/components/pages/closing/ClosingsTable.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/pages/closing/ClosingsTable.tsx b/src/components/pages/closing/ClosingsTable.tsx index ec334104..dc9609ac 100644 --- a/src/components/pages/closing/ClosingsTable.tsx +++ b/src/components/pages/closing/ClosingsTable.tsx @@ -104,6 +104,10 @@ const ClosingsTable = () => { header: '#', cell: (props) => props.row.index + 1, }, + { + accessorKey: 'project_name', + header: 'Flock', + }, { accessorKey: 'location_name', header: 'Lokasi', From c4f8051fbadf28411553eef9b30d39ce9bad55b1 Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Wed, 21 Jan 2026 10:19:46 +0700 Subject: [PATCH 2/4] chore: set selected phase to null if category change --- .../master-data/activity/MasterAktivitasContent.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/figma-make/components/pages/master-data/activity/MasterAktivitasContent.tsx b/src/figma-make/components/pages/master-data/activity/MasterAktivitasContent.tsx index 36774ce2..b71edd47 100644 --- a/src/figma-make/components/pages/master-data/activity/MasterAktivitasContent.tsx +++ b/src/figma-make/components/pages/master-data/activity/MasterAktivitasContent.tsx @@ -147,10 +147,6 @@ export function MasterAktivitasContent() { time_type: 'umum', }); - useEffect(() => { - setInitialLoading(false); - }, []); - // Phase handlers const handleAddPhase = () => { if (!selectedCategory) { @@ -423,6 +419,14 @@ export function MasterAktivitasContent() { } }; + useEffect(() => { + setInitialLoading(false); + }, []); + + useEffect(() => { + setSelectedPhase(null); + }, [selectedCategory]); + if (initialLoading) { return (
From 7317eb7129216835339162681d21a48a633a2561 Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Wed, 21 Jan 2026 10:41:27 +0700 Subject: [PATCH 3/4] chore: remove time_type default value and check activity form time type validity --- .../activity/MasterAktivitasContent.tsx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/figma-make/components/pages/master-data/activity/MasterAktivitasContent.tsx b/src/figma-make/components/pages/master-data/activity/MasterAktivitasContent.tsx index b71edd47..94ca4659 100644 --- a/src/figma-make/components/pages/master-data/activity/MasterAktivitasContent.tsx +++ b/src/figma-make/components/pages/master-data/activity/MasterAktivitasContent.tsx @@ -144,7 +144,7 @@ export function MasterAktivitasContent() { id: '', name: '', description: '', - time_type: 'umum', + time_type: '', }); // Phase handlers @@ -273,7 +273,7 @@ export function MasterAktivitasContent() { return; } setActivityModalMode('create'); - setActivityForm({ id: '', name: '', description: '', time_type: 'umum' }); + setActivityForm({ id: '', name: '', description: '', time_type: '' }); setShowActivityModal(true); }; @@ -289,16 +289,25 @@ export function MasterAktivitasContent() { }; const handleSaveActivity = async () => { - if (!activityForm.name.trim()) { + const isTimeTypeValid = Boolean(activityForm.time_type); + const isNameValid = Boolean(activityForm.name.trim()); + const isNameLengthValid = activityForm.name.trim().length >= 3; + + if (!isNameValid) { toast.error('Nama aktivitas harus diisi'); return; } - if (activityForm.name.trim().length < 3) { + if (!isNameLengthValid) { toast.error('Nama aktivitas minimal 3 karakter!'); return; } + if (!isTimeTypeValid) { + toast.error('Tipe waktu harus diisi'); + return; + } + if (!selectedPhase) { toast.error('Pilih phase terlebih dahulu'); return; @@ -352,7 +361,7 @@ export function MasterAktivitasContent() { } setShowActivityModal(false); - setActivityForm({ id: '', name: '', description: '', time_type: 'umum' }); + setActivityForm({ id: '', name: '', description: '', time_type: '' }); } catch (error) { console.error('Error saving activity:', error); toast.error('Terjadi kesalahan saat menyimpan aktivitas'); From 98e1623c19390400b7ddd620dbf3235d3e5b4527 Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Wed, 21 Jan 2026 10:43:08 +0700 Subject: [PATCH 4/4] Merge branch 'development' into fix/daily-checklist