diff --git a/src/components/pages/finance/FinanceDetail.tsx b/src/components/pages/finance/FinanceDetail.tsx
index 7f24178f..03291420 100644
--- a/src/components/pages/finance/FinanceDetail.tsx
+++ b/src/components/pages/finance/FinanceDetail.tsx
@@ -9,6 +9,7 @@ import Table from '@/components/Table';
import {
FINANCE_INITIAL_BALANCE_STATUS,
FINANCE_TRANSACTION_STATUS,
+ FINANCE_INJECTION_STATUS,
} from '@/config/constant';
import { formatCurrency, formatDate, formatTitleCase } from '@/lib/helper';
import { FinanceApi } from '@/services/api/finance';
@@ -33,7 +34,7 @@ const FinanceDetail = ({ finance }: { finance: Finance }) => {
},
{
label: 'Pihak',
- value: finance.party.name,
+ value: finance.party.id ? finance.party.name : '-',
},
{
label: 'Tanggal',
@@ -51,7 +52,7 @@ const FinanceDetail = ({ finance }: { finance: Finance }) => {
const informasiTransfer = [
{
label: 'No. Referensi',
- value: finance.reference_number,
+ value: finance.reference_number ?? '-',
},
{
label: 'Nomor Rekening',
@@ -69,7 +70,16 @@ const FinanceDetail = ({ finance }: { finance: Finance }) => {
label: 'Sisa',
value: formatCurrency(finance.income_amount),
},
- ];
+ ].filter((item) => {
+ // Hide party account number row if transaction type is INJECTION
+ if (
+ FINANCE_INJECTION_STATUS.includes(finance.transaction_type) &&
+ item.label === `Rekening ${formatTitleCase(finance.party.type)}`
+ ) {
+ return false;
+ }
+ return true;
+ });
const confirmationModalDeleteClickHandler = async () => {
setIsDeleteLoading(true);
@@ -162,6 +172,18 @@ const FinanceDetail = ({ finance }: { finance: Finance }) => {
)}
+ {FINANCE_INJECTION_STATUS.includes(finance.transaction_type) && (
+
+
+
+ )}