diff --git a/src/app/production/transfer-to-laying/detail/page.tsx b/src/app/production/transfer-to-laying/detail/page.tsx index 4d603098..de5426c8 100644 --- a/src/app/production/transfer-to-laying/detail/page.tsx +++ b/src/app/production/transfer-to-laying/detail/page.tsx @@ -13,7 +13,7 @@ import { TransferToLaying } from '@/types/api/production/transfer-to-laying'; // TODO: delete dummy data const DUMMY_TRANSFER_TO_LAYING_DETAIL: TransferToLaying = { id: 1, - transfer_date: '14-10-2025', + transfer_date: '2025-10-14', flock_source: { id: 1, name: 'Flock asal test', @@ -114,9 +114,11 @@ const TransferToLayingDetail = () => { ); } + // TODO: remove dummy data and integrate with real API if ( !isLoadingTransferToLaying && - (!transferToLaying || isResponseError(transferToLaying)) + (!transferToLaying || + (isResponseError(transferToLaying) && !DUMMY_TRANSFER_TO_LAYING_DETAIL)) ) { router.replace('/404'); return; @@ -127,12 +129,18 @@ const TransferToLayingDetail = () => { {isLoadingTransferToLaying && ( )} - {!isLoadingTransferToLaying && isResponseSuccess(transferToLaying) && ( + {/* {!isLoadingTransferToLaying && isResponseSuccess(transferToLaying) && ( - )} + )} */} + + {/* TODO: remove this dummy data and integrate to real API */} + ); };