@@ -32,7 +32,7 @@ const DnDetailCard = ({ data }) => { | |||||
fileId: dnData.fileId, | fileId: dnData.fileId, | ||||
skey: dnData.skey, | skey: dnData.skey, | ||||
filename: dnData.filename, | filename: dnData.filename, | ||||
onResponse: function(){ | |||||
onResponse: function () { | |||||
notifyDownloadSuccess(); | notifyDownloadSuccess(); | ||||
} | } | ||||
}); | }); | ||||
@@ -89,7 +89,7 @@ const DnDetailCard = ({ data }) => { | |||||
{getDisplayField("Issue Date", dnData.issueDate)} | {getDisplayField("Issue Date", dnData.issueDate)} | ||||
{getDisplayField("DN Sent", dnData?.sentDate ? dnData.sentDate + " - " + dnData.sentBy : "")} | |||||
{getDisplayField("DN Sent", dnData?.sentDate ? dnData.sentDate + " - " + dnData.sentBy : "--")} | |||||
</Grid> | </Grid> | ||||
<Grid container direction="row" justifyContent="space-between" alignItems="center"> | <Grid container direction="row" justifyContent="space-between" alignItems="center"> | ||||
@@ -103,16 +103,19 @@ const DnDetailCard = ({ data }) => { | |||||
<Typography variant="h5">{dnData.filename} </Typography> | <Typography variant="h5">{dnData.filename} </Typography> | ||||
</Grid> | </Grid> | ||||
<Grid item md={4} lg={4}> | <Grid item md={4} lg={4}> | ||||
<Button | |||||
size="small" | |||||
variant="contained" | |||||
onClick={onDownloadClick()} | |||||
sx={{ | |||||
textTransform: 'capitalize', | |||||
alignItems: 'end', | |||||
}}> | |||||
<DownloadIcon /> | |||||
</Button> | |||||
{dnData.filename ? | |||||
<Button | |||||
size="small" | |||||
variant="contained" | |||||
onClick={onDownloadClick()} | |||||
sx={{ | |||||
textTransform: 'capitalize', | |||||
alignItems: 'end', | |||||
}}> | |||||
<DownloadIcon /> | |||||
</Button> | |||||
: <></> | |||||
} | |||||
</Grid> | </Grid> | ||||
</Grid> | </Grid> | ||||
</Grid> | </Grid> | ||||
@@ -50,7 +50,7 @@ const DemandNote_index = () => { | |||||
onSuccess: (response) => { | onSuccess: (response) => { | ||||
response["issueDate"] = DateUtils.dateStr(response["issueDate"]); | response["issueDate"] = DateUtils.dateStr(response["issueDate"]); | ||||
response["sentDate"] = DateUtils.datetimeStr(response["sentDate"]); | |||||
response["sentDate"] = response["sentDate"]?DateUtils.datetimeStr(response["sentDate"]):""; | |||||
response["gazetteIssueDate"] = DateUtils.datetimeStr(response["gazetteIssueDate"]); | response["gazetteIssueDate"] = DateUtils.datetimeStr(response["gazetteIssueDate"]); | ||||
response["contactFaxNo"] =JSON.parse(response["contactFaxNo"]); | response["contactFaxNo"] =JSON.parse(response["contactFaxNo"]); | ||||
response["contactTelNo"] =JSON.parse(response["contactTelNo"]); | response["contactTelNo"] =JSON.parse(response["contactTelNo"]); | ||||
@@ -64,9 +64,20 @@ export default function SearchDemandNote({ recordList, reloadFun, exportXmlFun } | |||||
} | } | ||||
const doUploadFile = (event) => { | const doUploadFile = (event) => { | ||||
let dnMap = {}; | |||||
const datas = rows?.filter((row) => | |||||
selectedRowItems.includes(row.id) | |||||
); | |||||
for (var i = 0; i < datas?.length; i++) { | |||||
let dnNo = datas[i].dnNo.replaceAll("-",""); | |||||
dnMap[dnNo] = datas[i].id | |||||
} | |||||
let file = event.target.files[0]; | let file = event.target.files[0]; | ||||
HttpUtils.postWithFiles({ | HttpUtils.postWithFiles({ | ||||
url:UrlUtils.DEMAND_NOTE_ATTACH, | url:UrlUtils.DEMAND_NOTE_ATTACH, | ||||
params:{ | |||||
dnMap:dnMap | |||||
}, | |||||
files:[file], | files:[file], | ||||
onSuccess() { | onSuccess() { | ||||
if (reloadFun) reloadFun(); | if (reloadFun) reloadFun(); | ||||
@@ -180,7 +180,7 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData | |||||
<Autocomplete | <Autocomplete | ||||
{...register("status")} | {...register("status")} | ||||
id="status" | id="status" | ||||
options={ComboData.denmandNoteStatus} | |||||
options={ComboData.denmandNoteStatus_Public} | |||||
getOptionLabel={(option) => option.labelCht} | getOptionLabel={(option) => option.labelCht} | ||||
inputValue={selectedStatus?.labelCht ? selectedStatus?.labelCht : ""} | inputValue={selectedStatus?.labelCht ? selectedStatus?.labelCht : ""} | ||||
value={selectedStatus} | value={selectedStatus} | ||||
@@ -12,6 +12,7 @@ const RegisterForm = Loadable(lazy(() => import('pages/authentication/Register') | |||||
const BusRegisterForm = Loadable(lazy(() => import('pages/authentication/BusRegister'))); | const BusRegisterForm = Loadable(lazy(() => import('pages/authentication/BusRegister'))); | ||||
const IAmSmartRegister = Loadable(lazy(() => import('pages/authentication/IAmSmartRegister'))); | const IAmSmartRegister = Loadable(lazy(() => import('pages/authentication/IAmSmartRegister'))); | ||||
const ErrorPage = Loadable(lazy(() => import('pages/extra-pages/ErrorPage'))); | const ErrorPage = Loadable(lazy(() => import('pages/extra-pages/ErrorPage'))); | ||||
const IAmSmart_FallCallback = Loadable(lazy(() => import('pages/iAmSmart/FallCallback'))); | |||||
const IAmSmart_FailCallback = Loadable(lazy(() => import('pages/iAmSmart/FailCallback'))); | const IAmSmart_FailCallback = Loadable(lazy(() => import('pages/iAmSmart/FailCallback'))); | ||||
const IAmSmart_SuccessCallback = Loadable(lazy(() => import('pages/iAmSmart/SuccessCallback'))); | const IAmSmart_SuccessCallback = Loadable(lazy(() => import('pages/iAmSmart/SuccessCallback'))); | ||||
const IAmSmart_AuthCallback = Loadable(lazy(() => import('pages/iAmSmart/AuthCallback'))); | const IAmSmart_AuthCallback = Loadable(lazy(() => import('pages/iAmSmart/AuthCallback'))); | ||||
@@ -57,6 +58,10 @@ const LoginRoutes = { | |||||
path: 'error', | path: 'error', | ||||
element: <ErrorPage/> | element: <ErrorPage/> | ||||
}, | }, | ||||
{ | |||||
path: 'iamsmart/loginfallback', | |||||
element: <IAmSmart_FallCallback/> | |||||
}, | |||||
{ | { | ||||
path: 'iamsmart/authcallback', | path: 'iamsmart/authcallback', | ||||
element: <IAmSmart_AuthCallback/> | element: <IAmSmart_AuthCallback/> | ||||
@@ -89,6 +89,12 @@ export const denmandNoteStatus = [ | |||||
{ key: 1, labelCht: '待辦', label:'Pending', type: 'pending' }, | { key: 1, labelCht: '待辦', label:'Pending', type: 'pending' }, | ||||
{ key: 2, labelCht: '待支付', label:'To be Paid', type: 'to be paid' }, | { key: 2, labelCht: '待支付', label:'To be Paid', type: 'to be paid' }, | ||||
{ key: 3, labelCht: '已付費', label:'Paid', type: 'paid' }, | { key: 3, labelCht: '已付費', label:'Paid', type: 'paid' }, | ||||
]; | |||||
export const denmandNoteStatus_Public = [ | |||||
{ key: 0, labelCht: '全部', label: 'All', type: 'all' }, | |||||
{ key: 2, labelCht: '待支付', label:'To be Paid', type: 'to be paid' }, | |||||
{ key: 3, labelCht: '已付費', label:'Paid', type: 'paid' }, | |||||
]; | ]; | ||||