From 7a668c0cf91702f9ca8208b4ad38a3a88a36afb2 Mon Sep 17 00:00:00 2001
From: ValdiANS
Date: Mon, 18 May 2026 10:20:52 +0700
Subject: [PATCH 1/3] fix: adjust empty kandang condition check
---
.../pages/daily-checklist/DailyChecklistContent.tsx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/figma-make/components/pages/daily-checklist/DailyChecklistContent.tsx b/src/figma-make/components/pages/daily-checklist/DailyChecklistContent.tsx
index 2fbb79be..ee0b781f 100644
--- a/src/figma-make/components/pages/daily-checklist/DailyChecklistContent.tsx
+++ b/src/figma-make/components/pages/daily-checklist/DailyChecklistContent.tsx
@@ -233,8 +233,12 @@ export function DailyChecklistContent() {
setEmptyKandang(isEmptyKandang);
setSelectedCategory(isEmptyKandang ? 'empty_kandang' : data.category);
- if (isEmptyKandang && data.empty_kandang_end_date) {
- const rawEnd = data.empty_kandang_end_date;
+ if (
+ isEmptyKandang &&
+ data.empty_kandang &&
+ data.empty_kandang.end_date
+ ) {
+ const rawEnd = data.empty_kandang.end_date;
setEmptyKandangEndDate(
rawEnd.length > 10 ? rawEnd.slice(0, 10) : rawEnd
);
From 3374ab47793f78b8dae17d0eafb5cec33f7f98f4 Mon Sep 17 00:00:00 2001
From: ValdiANS
Date: Mon, 18 May 2026 10:25:10 +0700
Subject: [PATCH 2/3] fix: show Tanggal Selesai Kandang Kosong if category is
empty kandang
---
.../detail/DetailDailyChecklistContent.tsx | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/src/figma-make/components/pages/list-daily-checklist/detail/DetailDailyChecklistContent.tsx b/src/figma-make/components/pages/list-daily-checklist/detail/DetailDailyChecklistContent.tsx
index 63d89661..1558d4de 100644
--- a/src/figma-make/components/pages/list-daily-checklist/detail/DetailDailyChecklistContent.tsx
+++ b/src/figma-make/components/pages/list-daily-checklist/detail/DetailDailyChecklistContent.tsx
@@ -60,6 +60,7 @@ interface ChecklistHeader {
progress_percent: number;
total_phases: number;
total_activities: number;
+ empty_kandang_end_date?: string | null;
}
interface PhaseGroup {
@@ -179,6 +180,9 @@ export function DetailDailyChecklistContent() {
setDocuments(rawDetailChecklist?.document_urls || []);
+ const emptyKandangEndDate =
+ rawDetailChecklist?.empty_kandang?.end_date ?? null;
+
const checklistData = {
id: rawDetailChecklist?.id,
date: rawDetailChecklist?.date,
@@ -205,6 +209,7 @@ export function DetailDailyChecklistContent() {
progress_percent: 0,
total_phases: 0,
total_activities: 0,
+ empty_kandang_end_date: emptyKandangEndDate,
});
setLoading(false);
return;
@@ -272,6 +277,7 @@ export function DetailDailyChecklistContent() {
progress_percent: 0,
total_phases: new Set(tasks.map((t) => t.phase_id)).size,
total_activities: tasks.length,
+ empty_kandang_end_date: emptyKandangEndDate,
});
setLoading(false);
return;
@@ -322,6 +328,7 @@ export function DetailDailyChecklistContent() {
progress_percent: progressPercent,
total_phases: uniquePhases.size,
total_activities: uniqueActivities.size,
+ empty_kandang_end_date: emptyKandangEndDate,
});
} catch (error) {
console.error('Error fetching checklist detail:', error);
@@ -777,6 +784,18 @@ export function DetailDailyChecklistContent() {
{CATEGORY_LABELS[header.category] || header.category}
+ {header.category === 'empty_kandang' && (
+
+
+
+ {header.empty_kandang_end_date
+ ? formatDate(header.empty_kandang_end_date)
+ : '-'}
+
+
+ )}
{getStatusBadge(header.status)}
From 770c29325765e98977c6a93d445819ffb171de14 Mon Sep 17 00:00:00 2001
From: ValdiANS
Date: Mon, 18 May 2026 10:25:27 +0700
Subject: [PATCH 3/3] fix: adjust empty_kandang type in BaseDailyChecklist
---
src/types/api/daily-checklist/daily-checklist.d.ts | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/types/api/daily-checklist/daily-checklist.d.ts b/src/types/api/daily-checklist/daily-checklist.d.ts
index 139ff894..4099c52d 100644
--- a/src/types/api/daily-checklist/daily-checklist.d.ts
+++ b/src/types/api/daily-checklist/daily-checklist.d.ts
@@ -12,8 +12,11 @@ export type BaseDailyChecklist = {
status: string;
category: string;
date: string;
- empty_kandang?: boolean;
- empty_kandang_end_date?: string | null;
+ empty_kandang?: {
+ id: boolean;
+ start_date: string;
+ end_date: string;
+ };
kandang?: Pick;
total_phase: number;
total_activity: number;