|
|
@@ -8,7 +8,9 @@ import { |
|
|
|
Dialog, DialogTitle, DialogContent, DialogActions, |
|
|
|
} from '@mui/material'; |
|
|
|
import * as DateUtils from "utils/DateUtils"; |
|
|
|
import * as FormatUtils from "utils/FormatUtils"; |
|
|
|
import * as StatusUtils from "utils/statusUtils/DnStatus"; |
|
|
|
import * as PublicNoteStatusUtils from "utils/statusUtils/PublicNoteStatusUtils"; |
|
|
|
import { useNavigate } from "react-router-dom"; |
|
|
|
import { FiDataGrid } from "components/FiDataGrid"; |
|
|
|
import { notifyDownloadSuccess } from 'utils/CommonFunction'; |
|
|
@@ -151,18 +153,10 @@ export default function SearchDemandNote({ recordList, reloadFun }) { |
|
|
|
} |
|
|
|
|
|
|
|
const columns = [ |
|
|
|
{ |
|
|
|
field: 'dnNo', |
|
|
|
headerName: 'DN No.', |
|
|
|
width: 200, |
|
|
|
renderCell: (params) => { |
|
|
|
return <Button onClick={handleDnClick(params)}><u>{params.row.dnNo}</u></Button>; |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'appNo', |
|
|
|
headerName: 'App No.', |
|
|
|
width: 150, |
|
|
|
width: 120, |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: 'contactPerson', |
|
|
@@ -170,7 +164,8 @@ export default function SearchDemandNote({ recordList, reloadFun }) { |
|
|
|
headerName: 'Client', |
|
|
|
width: 300, |
|
|
|
renderCell: (params) => { |
|
|
|
let company = params.row.enCompanyName != null ? " (" + (params.row.enCompanyName) + ")" : ""; |
|
|
|
let company = params.row.enCompanyName != null?params.row.enCompanyName: params.row.chCompanyName; |
|
|
|
company = company != null ? " (" + (company) + ")" : ""; |
|
|
|
|
|
|
|
let phone = JSON.parse(params.row.contactTelNo); |
|
|
|
let faxNo = JSON.parse(params.row.contactFaxNo); |
|
|
@@ -193,26 +188,45 @@ export default function SearchDemandNote({ recordList, reloadFun }) { |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: 'issueDate', |
|
|
|
field: 'issueDate', |
|
|
|
headerName: 'Submit Date', |
|
|
|
width: 175, |
|
|
|
field: 'cm', |
|
|
|
headerName: 'Length(cm)', |
|
|
|
width: 100, |
|
|
|
renderCell: (params) => { |
|
|
|
return (<> |
|
|
|
{params?.value+"cm"}<br /> |
|
|
|
{params.row.column} |
|
|
|
</>); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'amount', |
|
|
|
headerName: 'Amount($)', |
|
|
|
width: 100, |
|
|
|
valueGetter: (params) => { |
|
|
|
return DateUtils.dateStr(params?.value); |
|
|
|
return FormatUtils.currencyFormat(params?.value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'status', |
|
|
|
headerName: 'Status', |
|
|
|
width: 175, |
|
|
|
field: 'dnNo', |
|
|
|
headerName: 'DN No.', |
|
|
|
width: 200, |
|
|
|
renderCell: (params) => { |
|
|
|
return [StatusUtils.getStatus_Eng(params)] |
|
|
|
return <Button onClick={handleDnClick(params)}><u>{params.row.dnNo}</u></Button>; |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: 'issueDate', |
|
|
|
field: 'issueDate', |
|
|
|
headerName: 'DN Issue/Due Date', |
|
|
|
width: 175, |
|
|
|
valueGetter: (params) => { |
|
|
|
return DateUtils.dateStr(params?.value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'sentDate', |
|
|
|
headerName: 'DN Sent Date', |
|
|
|
flex: 1, |
|
|
|
width: 175, |
|
|
|
valueGetter: (params) => { |
|
|
|
return params?.value ? DateUtils.datetimeStr(params?.value) + " - " + params.row.sentBy : ""; |
|
|
|
} |
|
|
@@ -220,11 +234,27 @@ export default function SearchDemandNote({ recordList, reloadFun }) { |
|
|
|
{ |
|
|
|
field: 'filename', |
|
|
|
headerName: 'DN File', |
|
|
|
flex: 1, |
|
|
|
width: 220, |
|
|
|
renderCell: (params) => { |
|
|
|
return <Button onClick={onDownloadClick(params)}><u>{params.row.filename}</u></Button>; |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'appStatus', |
|
|
|
headerName: 'App Status', |
|
|
|
width: 175, |
|
|
|
renderCell: (params) => { |
|
|
|
return [PublicNoteStatusUtils.getStatusByTextEng(params?.value,true)] |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'status', |
|
|
|
headerName: 'Status', |
|
|
|
width: 175, |
|
|
|
renderCell: (params) => { |
|
|
|
return [StatusUtils.getStatus_Eng(params)] |
|
|
|
}, |
|
|
|
}, |
|
|
|
]; |
|
|
|
|
|
|
|
return ( |
|
|
@@ -281,7 +311,7 @@ export default function SearchDemandNote({ recordList, reloadFun }) { |
|
|
|
textTransform: 'capitalize', |
|
|
|
alignItems: 'end' |
|
|
|
}}> |
|
|
|
<Typography variant="h5">Export</Typography> |
|
|
|
<Typography variant="h5">Export XML</Typography> |
|
|
|
</Button> |
|
|
|
</Grid> |
|
|
|
|
|
|
|