refactor(FE): Add initial balance row and normalize empty values

This commit is contained in:
rstubryan
2026-01-23 10:34:53 +07:00
parent c012f39a38
commit a82860cb68
3 changed files with 216 additions and 78 deletions
@@ -364,7 +364,11 @@ const CustomerPaymentTab = () => {
enableSorting: false,
cell: (props) => {
const value = props.row.original.vehicle_numbers;
return Array.isArray(value) ? value.join(', ') : value || '-';
return Array.isArray(value)
? value.length > 0
? value.join(', ')
: '-'
: '-';
},
},
{
@@ -528,7 +532,11 @@ const CustomerPaymentTab = () => {
enableSorting: false,
cell: (props) => {
const value = props.row.original.pickup_info;
return Array.isArray(value) ? value.join(', ') : value || '-';
return Array.isArray(value)
? value.length > 0
? value.join(', ')
: '-'
: '-';
},
},
{