From 9a3617edf1a22987d772f0a0b259150ba921608d Mon Sep 17 00:00:00 2001 From: randy-ar Date: Fri, 16 Jan 2026 21:04:23 +0700 Subject: [PATCH 1/3] fix(FE): hot fix closing finance per kandang --- src/components/pages/closing/ClosingFinanceTable.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/pages/closing/ClosingFinanceTable.tsx b/src/components/pages/closing/ClosingFinanceTable.tsx index 0f574c75..0d4aea5f 100644 --- a/src/components/pages/closing/ClosingFinanceTable.tsx +++ b/src/components/pages/closing/ClosingFinanceTable.tsx @@ -112,7 +112,6 @@ const ClosingFinanceTable = ({ - {JSON.stringify(finance)} Date: Fri, 16 Jan 2026 21:11:46 +0700 Subject: [PATCH 2/3] fix(FE): delete console log debug --- src/app/finance/detail/page.tsx | 2 -- .../pages/dashboard/DashboardProduction.tsx | 5 ---- .../project-flock/form/ProjectFlockForm.tsx | 3 -- .../pages/report/DailyMarketingsTable.tsx | 2 +- .../daily-checklist/DailyChecklistContent.tsx | 30 +++++++++---------- 5 files changed, 16 insertions(+), 26 deletions(-) diff --git a/src/app/finance/detail/page.tsx b/src/app/finance/detail/page.tsx index 1d20e9f5..b80e8acb 100644 --- a/src/app/finance/detail/page.tsx +++ b/src/app/finance/detail/page.tsx @@ -24,8 +24,6 @@ const FinanceDetailPage = () => { ); } - console.log(finance); - // if (!finance || isResponseError(finance)) { // router.replace('/404'); // return; diff --git a/src/components/pages/dashboard/DashboardProduction.tsx b/src/components/pages/dashboard/DashboardProduction.tsx index cf5eeaa2..0175a8be 100644 --- a/src/components/pages/dashboard/DashboardProduction.tsx +++ b/src/components/pages/dashboard/DashboardProduction.tsx @@ -118,8 +118,6 @@ const DashboardProduction = () => { } as DashboardFilterType, validationSchema: getDashboardFilterSchema(analysisMode), onSubmit: (values) => { - console.log(values); - handleApplyFilter({ start_date: values.startDate || '', end_date: values.endDate || '', @@ -139,8 +137,6 @@ const DashboardProduction = () => { }; const handleApplyFilter = (values: DashboardFilter) => { - console.log(values); - // Build query params object, only include non-empty values const params: Record = {}; @@ -156,7 +152,6 @@ const DashboardProduction = () => { if (values.comparison_type) params.comparison_type = values.comparison_type; setEndpointUrl(`/dashboards?${new URLSearchParams(params).toString()}`); - console.log(endpointUrl); filterModal.closeModal(); refreshDashboardProductionData(); }; diff --git a/src/components/pages/production/project-flock/form/ProjectFlockForm.tsx b/src/components/pages/production/project-flock/form/ProjectFlockForm.tsx index 0c252cb6..d032b67c 100644 --- a/src/components/pages/production/project-flock/form/ProjectFlockForm.tsx +++ b/src/components/pages/production/project-flock/form/ProjectFlockForm.tsx @@ -557,15 +557,12 @@ const ProjectFlockForm = ({ }; const onDeleteBudgetRowHandler = (nonstock_id: number, index?: number) => { - console.log(`nonstock_id: ${nonstock_id}, index: ${index}`); if (!nonstock_id) { const updatedBudgets = formik.values.project_budgets .map((budget, i) => { if (i == index) { - console.log(`buget: ${null}, index: ${index}, i: ${i}`); return null; } else { - console.log(`buget: ${budget}, index: ${index}, i: ${i}`); return budget; } }) diff --git a/src/components/pages/report/DailyMarketingsTable.tsx b/src/components/pages/report/DailyMarketingsTable.tsx index 2dba0309..d270d6d7 100644 --- a/src/components/pages/report/DailyMarketingsTable.tsx +++ b/src/components/pages/report/DailyMarketingsTable.tsx @@ -168,7 +168,7 @@ const DailyMarketingsTable = ({ ]; useEffect(() => { - console.log({ sorting }); + // console.log({ sorting }); if (sorting.length === 1) { onFilterByChange(sorting[0].id); diff --git a/src/figma-make/components/pages/daily-checklist/DailyChecklistContent.tsx b/src/figma-make/components/pages/daily-checklist/DailyChecklistContent.tsx index 7bd0be83..314381fd 100644 --- a/src/figma-make/components/pages/daily-checklist/DailyChecklistContent.tsx +++ b/src/figma-make/components/pages/daily-checklist/DailyChecklistContent.tsx @@ -601,15 +601,15 @@ export function DailyChecklistContent() { ) => { const taskId = taskIdsByPhaseActivityId[activityId]; - console.log('[CHECKBOX] Click detected:', { - activityId, - employeeId, - checked, - taskId, - hasTaskId: !!taskId, - checklistStatus, - isEditable, - }); + // console.log('[CHECKBOX] Click detected:', { + // activityId, + // employeeId, + // checked, + // taskId, + // hasTaskId: !!taskId, + // checklistStatus, + // isEditable, + // }); if (!taskId) { console.error('[CHECKBOX] No taskId found for activityId:', activityId); @@ -638,10 +638,10 @@ export function DailyChecklistContent() { }, }, }; - console.log( - '[CHECKBOX] State updated optimistically:', - updated[taskId]?.[employeeId] - ); + // console.log( + // '[CHECKBOX] State updated optimistically:', + // updated[taskId]?.[employeeId] + // ); return updated; }); @@ -653,7 +653,7 @@ export function DailyChecklistContent() { note: assignments[taskId]?.[employeeId]?.note || null, }; - console.log('[CHECKBOX] Saving to database:', payload); + // console.log('[CHECKBOX] Saving to database:', payload); const checkOrUncheckAssignmentRes = await DailyChecklistApi.checkOrUncheckAssignment(payload); @@ -679,7 +679,7 @@ export function DailyChecklistContent() { return; } - console.log('[CHECKBOX] Saved successfully'); + // console.log('[CHECKBOX] Saved successfully'); }; const handleNoteChange = async ( From f371d063863336753817b3463bae9a536c5971a5 Mon Sep 17 00:00:00 2001 From: randy-ar Date: Fri, 16 Jan 2026 21:55:39 +0700 Subject: [PATCH 3/3] fix(FE): add depedency to useMemo rows data --- src/components/pages/closing/ClosingFinanceTable.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/pages/closing/ClosingFinanceTable.tsx b/src/components/pages/closing/ClosingFinanceTable.tsx index 0d4aea5f..6225f5e7 100644 --- a/src/components/pages/closing/ClosingFinanceTable.tsx +++ b/src/components/pages/closing/ClosingFinanceTable.tsx @@ -44,7 +44,7 @@ const ClosingFinanceTable = ({ return [customItems, ...purchases, totalBudgeting, ...overheads]; } return []; - }, []); + }, [finance]); const profitLossTableData: ProfitLossItem[] = useMemo(() => { if (isResponseSuccess(finance)) { @@ -78,7 +78,7 @@ const ClosingFinanceTable = ({ return [...incomes, ...purchases, grossProfit, ...overheads, subtotal]; } return []; - }, []); + }, [finance]); return (