Browse Source

update invoice table sizing

tags/Baseline_180220205_Frontend
MSI\2Fi 8 months ago
parent
commit
3e7893d54f
1 changed files with 8 additions and 8 deletions
  1. +8
    -8
      src/components/InvoiceSearch/InvoiceTable.tsx

+ 8
- 8
src/components/InvoiceSearch/InvoiceTable.tsx View File

@@ -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'
}, },
{ {


Loading…
Cancel
Save