diff --git a/src/figma-make/components/pages/daily-checklist/DailyChecklistContent.tsx b/src/figma-make/components/pages/daily-checklist/DailyChecklistContent.tsx index 50119101..40a2c130 100644 --- a/src/figma-make/components/pages/daily-checklist/DailyChecklistContent.tsx +++ b/src/figma-make/components/pages/daily-checklist/DailyChecklistContent.tsx @@ -103,7 +103,6 @@ export function DailyChecklistContent() { searchParams.get('category') || '' ); const [emptyKandang, setEmptyKandang] = useState(false); - const [emptyKandangEndDate, setEmptyKandangEndDate] = useState(''); const isKandangEmpty = selectedCategory === 'empty_kandang'; @@ -239,7 +238,6 @@ export function DailyChecklistContent() { useEffect(() => { if (!emptyKandang) { - setEmptyKandangEndDate(''); setSelectedCategory(''); return; } @@ -314,16 +312,6 @@ export function DailyChecklistContent() { return; } - if (emptyKandang && !emptyKandangEndDate) { - setDailyChecklistId(null); - setChecklistStatus('DRAFT'); - setSelectedPhaseIds([]); - setActivitiesByPhase({}); - setTaskIdsByPhaseActivityId({}); - setAssignments({}); - return; - } - try { const checklist = await DailyChecklistApi.create({ date, @@ -331,7 +319,6 @@ export function DailyChecklistContent() { category: emptyKandang ? 'empty_kandang' : selectedCategory, status: 'DRAFT', empty_kandang: emptyKandang, - empty_kandang_end_date: emptyKandang ? emptyKandangEndDate : '', }); if (isResponseError(checklist)) { @@ -388,7 +375,7 @@ export function DailyChecklistContent() { }; checkAndLoadChecklist(); - }, [date, kandangId, selectedCategory, emptyKandang, emptyKandangEndDate]); + }, [date, kandangId, selectedCategory, emptyKandang]); // Load activities and tasks when phases change useEffect(() => { @@ -1176,24 +1163,6 @@ export function DailyChecklistContent() { /> Kandang Kosong - - {emptyKandang && ( -