diff --git a/src/app/closing/detail/page.tsx b/src/app/closing/detail/page.tsx index 487533be..4848e92a 100644 --- a/src/app/closing/detail/page.tsx +++ b/src/app/closing/detail/page.tsx @@ -49,9 +49,6 @@ const ClosingDetailPage = () => { {!isLoadingClosing && isResponseSuccess(closing) && ( )} - {!isLoadingSalesReport && isResponseSuccess(salesReport) && ( - - )} ); }; diff --git a/src/components/pages/closing/ClosingOverheadTable.tsx b/src/components/pages/closing/ClosingOverheadTable.tsx index ca5c2671..3df0844d 100644 --- a/src/components/pages/closing/ClosingOverheadTable.tsx +++ b/src/components/pages/closing/ClosingOverheadTable.tsx @@ -19,7 +19,10 @@ const ClosingOverheadTable = ({ }: ClosingOverheadTableProps) => { const { data: overhead, isLoading: isLoadingOverhead } = useSWR( `${ClosingApi.basePath}/${projectFlockId}/overhead`, - () => ClosingApi.getOverhead(projectFlockId) + () => ClosingApi.getOverhead(projectFlockId), + { + keepPreviousData: true, + } ); // Helper function to create columns with footer support @@ -66,7 +69,7 @@ const ClosingOverheadTable = ({ ], }, { - header: 'Realisai', + header: 'Realisasi', footer: '', columns: [ { diff --git a/src/components/pages/closing/ClosingSapronakCalculationTable.tsx b/src/components/pages/closing/ClosingSapronakCalculationTable.tsx index 73c10331..445b7d8c 100644 --- a/src/components/pages/closing/ClosingSapronakCalculationTable.tsx +++ b/src/components/pages/closing/ClosingSapronakCalculationTable.tsx @@ -25,7 +25,10 @@ const ClosingSapronakCalculationTable = ({ }: ClosingSapronakCalculationTableProps) => { const { data: sapronakCalculation, isLoading } = useSWR( `/closing/sapronak-calculation/${projectFlockId}`, - () => ClosingApi.getPerhitunganSapronak(projectFlockId) + () => ClosingApi.getPerhitunganSapronak(projectFlockId), + { + keepPreviousData: true, + } ); // Helper function to create columns with footer support diff --git a/src/components/pages/production/project-flock/closing/ProjectFlockClosingForm.tsx b/src/components/pages/production/project-flock/closing/ProjectFlockClosingForm.tsx index 0f3cba90..f0b2b4b7 100644 --- a/src/components/pages/production/project-flock/closing/ProjectFlockClosingForm.tsx +++ b/src/components/pages/production/project-flock/closing/ProjectFlockClosingForm.tsx @@ -62,13 +62,13 @@ const ProjectFlockClosingForm = ({ const errorStock = useMemo(() => { return isResponseSuccess(closingData) ? closingData?.data?.stock_remaining.every((stock) => stock.quantity > 0) - : false; + : true; }, [closingData]); const errorExpense = useMemo(() => { return isResponseSuccess(closingData) ? closingData?.data?.expenses.every((expense) => expense.step < 5) - : false; + : true; }, [closingData]); const isCanCloseValid = !errorStock && !errorExpense; diff --git a/src/components/pages/production/project-flock/detail/ProjectFlockDetail.tsx b/src/components/pages/production/project-flock/detail/ProjectFlockDetail.tsx index ea3e64a8..39272216 100644 --- a/src/components/pages/production/project-flock/detail/ProjectFlockDetail.tsx +++ b/src/components/pages/production/project-flock/detail/ProjectFlockDetail.tsx @@ -428,7 +428,7 @@ const ProjectFlockDetail = ({