From 3e7893d54f7602acb1c36112092509fb3e184ad1 Mon Sep 17 00:00:00 2001 From: "MSI\\2Fi" Date: Thu, 12 Dec 2024 13:59:46 +0800 Subject: [PATCH] update invoice table sizing --- src/components/InvoiceSearch/InvoiceTable.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/InvoiceSearch/InvoiceTable.tsx b/src/components/InvoiceSearch/InvoiceTable.tsx index ab02a07..1fbf9c7 100644 --- a/src/components/InvoiceSearch/InvoiceTable.tsx +++ b/src/components/InvoiceSearch/InvoiceTable.tsx @@ -205,8 +205,8 @@ const InvoiceTable: React.FC = ({ projects, invoices }) => { newRow: GridRowModel, originalRow: GridRowModel, ) => { - console.log(newRow) - console.log(originalRow) + // console.log(newRow) + // console.log(originalRow) const errors = validateRow(newRow.id!!); if (errors) { // console.log(errors) @@ -297,18 +297,18 @@ const InvoiceTable: React.FC = ({ projects, invoices }) => { const editCombinedColumns = useMemo( () => [ - { field: "invoiceNo", headerName: t("Invoice No"), editable: true, flex: 0.7 }, + { field: "invoiceNo", headerName: t("Invoice No"), editable: true, flex: 1 }, { field: "projectCode", headerName: t("Project Code"), editable: true, - flex: 1.5, + flex: 1, renderCell: renderAutocomplete, renderEditCell: renderAutocompleteInput }, { field: "issuedDate", headerName: t("Issue Date"), editable: true, - flex: 1, + flex: 0.5, type: 'date', // valueGetter: (params) => { // // console.log(params.row.issuedDate) @@ -318,21 +318,21 @@ const editCombinedColumns = useMemo( { field: "issuedAmount", headerName: t("Amount (HKD)"), editable: true, - flex: 1, + flex: 0.7, type: 'number' }, { field: "receiptDate", headerName: t("Settle Date"), editable: true, - flex: 1, + flex: 0.5, type: 'date', }, { field: "receivedAmount", headerName: t("Actual Received Amount (HKD)"), editable: true, - flex: 1, + flex: 0.7, type: 'number' }, {