From d679b5b54e760a5327835d76c34c5a1fd3f78a26 Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Wed, 21 Jan 2026 11:15:57 +0700 Subject: [PATCH] fix: show 'Umum' activity and fix select all phase bug --- .../pages/daily-checklist/DailyChecklistContent.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/figma-make/components/pages/daily-checklist/DailyChecklistContent.tsx b/src/figma-make/components/pages/daily-checklist/DailyChecklistContent.tsx index 314381fd..5ed0dd0c 100644 --- a/src/figma-make/components/pages/daily-checklist/DailyChecklistContent.tsx +++ b/src/figma-make/components/pages/daily-checklist/DailyChecklistContent.tsx @@ -51,7 +51,7 @@ const CATEGORIES = [ { value: 'produksi_close', label: 'Produksi Close' }, ]; -const TIME_TYPE_ORDER = ['umum', 'pagi', 'siang', 'sore', 'malam']; +const TIME_TYPE_ORDER = ['Umum', 'Pagi', 'Siang', 'Sore', 'Malam']; const TIME_TYPE_LABELS: { [key: string]: string } = { Umum: 'Umum', Pagi: 'Pagi', @@ -777,7 +777,7 @@ export function DailyChecklistContent() { return; } - toast.success('Draft tersimpan otomatis'); + toast.success('Draft tersimpan!'); }; // Filter functions @@ -825,7 +825,7 @@ export function DailyChecklistContent() { // Group activities by time_type within this phase phaseActivities.forEach((activity) => { - const timeType = activity.time_type || 'umum'; + const timeType = activity.time_type || 'Umum'; if (!grouped[phase.id].timeGroups[timeType]) { grouped[phase.id].timeGroups[timeType] = []; @@ -1084,6 +1084,7 @@ export function DailyChecklistContent() { (phaseId) => { const phaseData = groupActivitiesByPhase()[phaseId]; const { phase, timeGroups } = phaseData; + const timeTypes = Object.keys(timeGroups).sort( (a, b) => TIME_TYPE_ORDER.indexOf(a) - @@ -1440,7 +1441,9 @@ export function DailyChecklistContent() { if (isAllPhasesSelected) { setTempSelectedPhaseIds([]); } else { - setTempSelectedPhaseIds(availablePhases.map((p) => p.id)); + setTempSelectedPhaseIds( + availablePhases.map((p) => String(p.id)) + ); } }} className='checkbox-clean'