// material-ui import * as React from 'react'; import {FiDataGrid} from "components/FiDataGrid"; import { Button } from '@mui/material'; import * as DateUtils from "utils/DateUtils" // ==============================|| EVENT TABLE ||============================== // export default function BaseGrid({rows}) { const columns = [ { id: 'appNo', field: 'appNo', headerName: 'Application No.', flex: 1, }, { id: 'created', field: 'created', headerName: 'Created', flex: 1, valueGetter:(params)=>{ return DateUtils.datetimeStr(params?.value); } }, { id: 'contactPerson', field: 'contactPerson', headerName: 'Contact Person', flex: 2, renderCell: (params) => { let phone = JSON.parse(params.row.contactTelNo); let faxNo = JSON.parse(params.row.contactFaxNo); let contact = ""; if (phone) { contact = "電話: " + phone?.countryCode + " " + phone?.phoneNumber } if (faxNo) { if (contact != "") contact = contact + ", " contact = contact + "傳真:" + faxNo?.countryCode + " " + faxNo?.faxNumber } return (<> {params?.value}
{contact} ); } }, { id: 'remarks', field: 'remarks', headerName: 'remarks', flex: 3, }, { field: 'actions', type: 'actions', headerName: '', width: 50, cellClassName: 'actions', renderCell: () => { return ; }, } ]; return (
); }