| @@ -205,8 +205,8 @@ const InvoiceTable: React.FC<Props> = ({ projects, invoices }) => { | |||||
| newRow: GridRowModel<invoiceListRow>, | newRow: GridRowModel<invoiceListRow>, | ||||
| originalRow: GridRowModel<invoiceListRow>, | originalRow: GridRowModel<invoiceListRow>, | ||||
| ) => { | ) => { | ||||
| console.log(newRow) | |||||
| console.log(originalRow) | |||||
| // console.log(newRow) | |||||
| // console.log(originalRow) | |||||
| const errors = validateRow(newRow.id!!); | const errors = validateRow(newRow.id!!); | ||||
| if (errors) { | if (errors) { | ||||
| // console.log(errors) | // console.log(errors) | ||||
| @@ -297,18 +297,18 @@ const InvoiceTable: React.FC<Props> = ({ projects, invoices }) => { | |||||
| const editCombinedColumns = useMemo<GridColDef[]>( | const editCombinedColumns = useMemo<GridColDef[]>( | ||||
| () => [ | () => [ | ||||
| { field: "invoiceNo", headerName: t("Invoice No"), editable: true, flex: 0.7 }, | |||||
| { field: "invoiceNo", headerName: t("Invoice No"), editable: true, flex: 1 }, | |||||
| { field: "projectCode", | { field: "projectCode", | ||||
| headerName: t("Project Code"), | headerName: t("Project Code"), | ||||
| editable: true, | editable: true, | ||||
| flex: 1.5, | |||||
| flex: 1, | |||||
| renderCell: renderAutocomplete, | renderCell: renderAutocomplete, | ||||
| renderEditCell: renderAutocompleteInput | renderEditCell: renderAutocompleteInput | ||||
| }, | }, | ||||
| { field: "issuedDate", | { field: "issuedDate", | ||||
| headerName: t("Issue Date"), | headerName: t("Issue Date"), | ||||
| editable: true, | editable: true, | ||||
| flex: 1, | |||||
| flex: 0.5, | |||||
| type: 'date', | type: 'date', | ||||
| // valueGetter: (params) => { | // valueGetter: (params) => { | ||||
| // // console.log(params.row.issuedDate) | // // console.log(params.row.issuedDate) | ||||
| @@ -318,21 +318,21 @@ const editCombinedColumns = useMemo<GridColDef[]>( | |||||
| { field: "issuedAmount", | { field: "issuedAmount", | ||||
| headerName: t("Amount (HKD)"), | headerName: t("Amount (HKD)"), | ||||
| editable: true, | editable: true, | ||||
| flex: 1, | |||||
| flex: 0.7, | |||||
| type: 'number' | type: 'number' | ||||
| }, | }, | ||||
| { | { | ||||
| field: "receiptDate", | field: "receiptDate", | ||||
| headerName: t("Settle Date"), | headerName: t("Settle Date"), | ||||
| editable: true, | editable: true, | ||||
| flex: 1, | |||||
| flex: 0.5, | |||||
| type: 'date', | type: 'date', | ||||
| }, | }, | ||||
| { | { | ||||
| field: "receivedAmount", | field: "receivedAmount", | ||||
| headerName: t("Actual Received Amount (HKD)"), | headerName: t("Actual Received Amount (HKD)"), | ||||
| editable: true, | editable: true, | ||||
| flex: 1, | |||||
| flex: 0.7, | |||||
| type: 'number' | type: 'number' | ||||
| }, | }, | ||||
| { | { | ||||