mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
feat(FE): Join array fields into comma-separated strings
This commit is contained in:
@@ -362,7 +362,11 @@ const createPDFDocument = (params: CustomerPaymentExportPDFParams) => {
|
||||
<Text>{item.reference || '-'}</Text>
|
||||
</View>
|
||||
<View style={[pdfStyles.tableCell, { flex: 1.2 }]}>
|
||||
<Text>{item.vehicle_numbers || '-'}</Text>
|
||||
<Text>
|
||||
{Array.isArray(item.vehicle_numbers)
|
||||
? item.vehicle_numbers.join(', ')
|
||||
: item.vehicle_numbers || '-'}
|
||||
</Text>
|
||||
</View>
|
||||
<View style={[pdfStyles.tableCellRight, { flex: 0.8 }]}>
|
||||
<Text>{formatNumber(item.qty)}</Text>
|
||||
@@ -409,7 +413,11 @@ const createPDFDocument = (params: CustomerPaymentExportPDFParams) => {
|
||||
)}
|
||||
</View>
|
||||
<View style={[pdfStyles.tableCell, { flex: 1 }]}>
|
||||
<Text>{item.pickup_info || '-'}</Text>
|
||||
<Text>
|
||||
{Array.isArray(item.pickup_info)
|
||||
? item.pickup_info.join(', ')
|
||||
: item.pickup_info || '-'}
|
||||
</Text>
|
||||
</View>
|
||||
<View style={[pdfStyles.tableCell, { flex: 1.5 }]}>
|
||||
<Text>{item.sales_person || '-'}</Text>
|
||||
|
||||
@@ -356,7 +356,7 @@ const CustomerPaymentTab = () => {
|
||||
enableSorting: false,
|
||||
cell: (props) => {
|
||||
const value = props.row.original.vehicle_numbers;
|
||||
return value || '-';
|
||||
return Array.isArray(value) ? value.join(', ') : value || '-';
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -520,7 +520,7 @@ const CustomerPaymentTab = () => {
|
||||
enableSorting: false,
|
||||
cell: (props) => {
|
||||
const value = props.row.original.pickup_info;
|
||||
return value || '-';
|
||||
return Array.isArray(value) ? value.join(', ') : value || '-';
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user