diff --git a/src/components/pages/production/recording/RecordingTable.tsx b/src/components/pages/production/recording/RecordingTable.tsx
index 7808c5bf..8d8caad1 100644
--- a/src/components/pages/production/recording/RecordingTable.tsx
+++ b/src/components/pages/production/recording/RecordingTable.tsx
@@ -1013,21 +1013,6 @@ const RecordingTable = () => {
approvalHistoryModal.openModal();
};
- const getStatusText = (action: string) => {
- switch (action) {
- case 'APPROVED':
- return 'Disetujui';
- case 'REJECTED':
- return 'Ditolak';
- case 'CREATED':
- return 'Dibuat';
- case 'UPDATED':
- return 'Diperbarui';
- default:
- return action;
- }
- };
-
return (
{
}}
onClick={openApprovalHistory}
>
- {getStatusText(approval.action)}
+ {approval.step_name || approval.action}
);
},
diff --git a/src/components/pages/purchase/order/PurchaseOrderDetail.tsx b/src/components/pages/purchase/order/PurchaseOrderDetail.tsx
index 72f9c474..47dbc8f0 100644
--- a/src/components/pages/purchase/order/PurchaseOrderDetail.tsx
+++ b/src/components/pages/purchase/order/PurchaseOrderDetail.tsx
@@ -540,31 +540,6 @@ const PurchaseOrderDetail = ({
accessorKey: 'travel_number',
cell: (props) => props.row.original.travel_number || '-',
},
- {
- header: 'Dokumen Surat Jalan',
- accessorKey: 'travel_document_path',
- cell: (props) => {
- const documentPath = props.row.original.travel_document_path;
- return documentPath ? (
-
- ) : (
- '-'
- );
- },
- },
{
header: 'No. Armada Pengangkut',
accessorKey: 'vehicle_number',
@@ -588,7 +563,10 @@ const PurchaseOrderDetail = ({
{
header: 'Transport /Item',
accessorKey: 'transport_per_item',
- cell: (props) => formatCurrency(props.getValue() as number),
+ cell: (props) => {
+ const value = props.row.original.transport_per_item;
+ return value ? formatCurrency(value) : formatCurrency(0);
+ },
},
];
@@ -723,8 +701,8 @@ const PurchaseOrderDetail = ({
:{' '}
- {purchaseData.items?.[0]?.warehouse?.type === 'LOKASI' &&
- purchaseData.items?.[0]?.warehouse?.location?.name
+ {purchaseData.items?.[0]?.warehouse &&
+ 'location' in purchaseData.items[0].warehouse
? purchaseData.items[0].warehouse.location.name
: '-'}
@@ -905,11 +883,29 @@ const PurchaseOrderDetail = ({
Informasi Penerimaan Barang
{canShowPenerimaanBarang && (
-
-
-
+
+ {goodsReceiptItems[0]?.travel_document_path && (
+
+ )}
+
+
+
+
)}
diff --git a/src/components/pages/purchase/order/PurchaseOrderInvoice.tsx b/src/components/pages/purchase/order/PurchaseOrderInvoice.tsx
index 36aea9c7..aed154d0 100644
--- a/src/components/pages/purchase/order/PurchaseOrderInvoice.tsx
+++ b/src/components/pages/purchase/order/PurchaseOrderInvoice.tsx
@@ -324,12 +324,14 @@ const PurchaseOrderInvoice = ({ data }: PurchaseOrderInvoiceProps) => {
PT LUMBUNG TELUR INDONESIA
- {purchaseData?.items?.[0]?.warehouse.type === 'LOKASI'
+ {purchaseData?.items?.[0]?.warehouse &&
+ 'location' in purchaseData.items[0].warehouse
? purchaseData.items[0].warehouse.location.name
: '-'}
- {purchaseData?.items?.[0]?.warehouse.type === 'LOKASI'
+ {purchaseData?.items?.[0]?.warehouse &&
+ 'location' in purchaseData.items[0].warehouse
? purchaseData.items[0].warehouse.location.address
: '-'}
@@ -434,7 +436,7 @@ const PurchaseOrderInvoice = ({ data }: PurchaseOrderInvoiceProps) => {
- {item.warehouse?.type === 'LOKASI'
+ {item.warehouse && 'location' in item.warehouse
? item.warehouse.location.address
: '-'}