@@ -10,7 +10,7 @@ import * as DateUtils from "../utils/DateUtils" | |||||
import { FiDataGrid } from './FiDataGrid'; | import { FiDataGrid } from './FiDataGrid'; | ||||
// ==============================|| EVENT TABLE ||============================== // | // ==============================|| EVENT TABLE ||============================== // | ||||
export default function FileList({ refType, refId, allowDelete, sx, dateHideable, ...props }) { | |||||
export default function FileList({ refType, refId, allowDelete, sx, dateHideable,lang, ...props }) { | |||||
const [rows, setRows] = React.useState([]); | const [rows, setRows] = React.useState([]); | ||||
const [rowModesModel] = React.useState({}); | const [rowModesModel] = React.useState({}); | ||||
@@ -91,13 +91,13 @@ export default function FileList({ refType, refId, allowDelete, sx, dateHideable | |||||
{ | { | ||||
id: 'filename', | id: 'filename', | ||||
field: 'filename', | field: 'filename', | ||||
headerName: 'filename', | |||||
headerName: lang=="ch"?"檔案名稱":'File Name', | |||||
flex: 3, | flex: 3, | ||||
}, | }, | ||||
{ | { | ||||
id: 'filesize', | id: 'filesize', | ||||
field: 'filesize', | field: 'filesize', | ||||
headerName: 'filesize', | |||||
headerName: lang=="ch"?"檔案大小":'File Size', | |||||
flex: 1, | flex: 1, | ||||
valueGetter: (params) => { | valueGetter: (params) => { | ||||
return convertToStr(params.value); | return convertToStr(params.value); | ||||
@@ -109,7 +109,7 @@ export default function FileList({ refType, refId, allowDelete, sx, dateHideable | |||||
{ | { | ||||
id: 'created', | id: 'created', | ||||
field: 'created', | field: 'created', | ||||
headerName: 'created', | |||||
headerName: lang=="ch"?"日期":'Created', | |||||
flex: 1, | flex: 1, | ||||
valueGetter: (params) => { | valueGetter: (params) => { | ||||
return DateUtils.datetimeStr(params.value); | return DateUtils.datetimeStr(params.value); | ||||
@@ -136,13 +136,13 @@ export default function FileList({ refType, refId, allowDelete, sx, dateHideable | |||||
{ | { | ||||
id: 'filename', | id: 'filename', | ||||
field: 'filename', | field: 'filename', | ||||
headerName: 'filename', | |||||
headerName: lang=="ch"?"檔案名稱":'File Name', | |||||
flex: 3, | flex: 3, | ||||
}, | }, | ||||
{ | { | ||||
id: 'filesize', | id: 'filesize', | ||||
field: 'filesize', | field: 'filesize', | ||||
headerName: 'filesize', | |||||
headerName: lang=="ch"?"檔案大小":'File Size', | |||||
flex: 1, | flex: 1, | ||||
valueGetter: (params) => { | valueGetter: (params) => { | ||||
return convertToStr(params.value); | return convertToStr(params.value); | ||||
@@ -17,7 +17,7 @@ const MainCard = Loadable(React.lazy(() => import('components/MainCard'))); | |||||
import * as StatusUtils from "../PublicNotice/ListPanel/PublicNoteStatusUtils"; | import * as StatusUtils from "../PublicNotice/ListPanel/PublicNoteStatusUtils"; | ||||
import FileList from "components/FileList" | import FileList from "components/FileList" | ||||
// ==============================|| DASHBOARD - DEFAULT ||============================== // | // ==============================|| DASHBOARD - DEFAULT ||============================== // | ||||
const ApplicationDetailCard = ({ formData,}) => { | |||||
const ApplicationDetailCard = ({ formData, }) => { | |||||
const params = useParams(); | const params = useParams(); | ||||
@@ -25,7 +25,7 @@ const ApplicationDetailCard = ({ formData,}) => { | |||||
//const [proofId, setProofId] = React.useState(); | //const [proofId, setProofId] = React.useState(); | ||||
React.useEffect(() => { | React.useEffect(() => { | ||||
if (formData){ | |||||
if (formData) { | |||||
setData(formData); | setData(formData); | ||||
//setProofId(formData.id); | //setProofId(formData.id); | ||||
} | } | ||||
@@ -59,10 +59,10 @@ const ApplicationDetailCard = ({ formData,}) => { | |||||
} | } | ||||
function currencyFormat(num) { | function currencyFormat(num) { | ||||
let val = num?num:0; | |||||
let val = num ? num : 0; | |||||
return val.toLocaleString('en-US', { | return val.toLocaleString('en-US', { | ||||
minimumFractionDigits: 2 | |||||
}); | |||||
minimumFractionDigits: 2 | |||||
}); | |||||
} | } | ||||
@@ -71,7 +71,7 @@ const ApplicationDetailCard = ({ formData,}) => { | |||||
border={false} | border={false} | ||||
content={false} | content={false} | ||||
> | > | ||||
<Typography variant="h5" sx={{ textAlign:"left", mb: 2, borderBottom: "1px solid black" }}> | |||||
<Typography variant="h5" sx={{ textAlign: "left", mb: 2, borderBottom: "1px solid black" }}> | |||||
公共啟事:校對資料 | 公共啟事:校對資料 | ||||
</Typography> | </Typography> | ||||
<form> | <form> | ||||
@@ -162,7 +162,7 @@ const ApplicationDetailCard = ({ formData,}) => { | |||||
</Grid> | </Grid> | ||||
<Grid item xs={12} md={9} lg={9}> | <Grid item xs={12} md={9} lg={9}> | ||||
<DisplayField name="issueDate" /> | |||||
<DisplayField name="issueDateStr" /> | |||||
</Grid> | </Grid> | ||||
</Grid> | </Grid> | ||||
</Grid> | </Grid> | ||||
@@ -195,6 +195,7 @@ const ApplicationDetailCard = ({ formData,}) => { | |||||
</Grid> | </Grid> | ||||
</Grid> | </Grid> | ||||
<FileList | <FileList | ||||
lang="ch" | |||||
refId={params.id} | refId={params.id} | ||||
refType={"proof"} | refType={"proof"} | ||||
dateHideable={true} | dateHideable={true} | ||||
@@ -212,7 +213,7 @@ const ApplicationDetailCard = ({ formData,}) => { | |||||
sx={{ display: 'flex', alignItems: 'center' }}> | sx={{ display: 'flex', alignItems: 'center' }}> | ||||
<FormLabel>繳費及返稿最後限期:</FormLabel> | <FormLabel>繳費及返稿最後限期:</FormLabel> | ||||
</Grid> | </Grid> | ||||
<Grid item xs={12} md={12} lg={12} sx={{mb: 4, display: 'flex', alignItems: 'center' }}> | |||||
<Grid item xs={12} md={12} lg={12} sx={{ mb: 4, display: 'flex', alignItems: 'center' }}> | |||||
<FormLabel>{DateUtils.dateStr_Cht(data.returnBeforeDate)} 下午 2:00前</FormLabel> | <FormLabel>{DateUtils.dateStr_Cht(data.returnBeforeDate)} 下午 2:00前</FormLabel> | ||||
</Grid> | </Grid> | ||||
<Grid item xs={12} md={3} lg={3} | <Grid item xs={12} md={3} lg={3} | ||||
@@ -220,15 +221,15 @@ const ApplicationDetailCard = ({ formData,}) => { | |||||
<FormLabel>應繳費用:</FormLabel> | <FormLabel>應繳費用:</FormLabel> | ||||
</Grid> | </Grid> | ||||
<Grid item xs={12} md={9} lg={9} sx={{ mb: 1, display: 'flex', alignItems: 'center' }}> | <Grid item xs={12} md={9} lg={9} sx={{ mb: 1, display: 'flex', alignItems: 'center' }}> | ||||
<FormLabel style={{color: "blue", fontWeight: "bold",}}>{currencyFormat(data.fee)}</FormLabel> | |||||
<FormLabel style={{ color: "blue", fontWeight: "bold", }}>{currencyFormat(data.fee)}</FormLabel> | |||||
</Grid> | </Grid> | ||||
<Grid item xs={12} md={12} lg={12} sx={{mb: 4, display: 'flex', alignItems: 'center' }}> | |||||
<Grid item xs={12} md={12} lg={12} sx={{ mb: 4, display: 'flex', alignItems: 'center' }}> | |||||
{ | { | ||||
formik.values.groupType == "A" | formik.values.groupType == "A" | ||||
? | |||||
<FormLabel>( {data.length} 頁 x $6,552 )</FormLabel> | |||||
: | |||||
<FormLabel>( {data.length} cm x {data.colCount==2?"$364 二格位":"$182 一格位"} )</FormLabel> | |||||
? | |||||
<FormLabel>( {data.length} 頁 x $6,552 )</FormLabel> | |||||
: | |||||
<FormLabel>( {data.length} cm x {data.colCount == 2 ? "$364 二格位" : "$182 一格位"} )</FormLabel> | |||||
} | } | ||||
</Grid> | </Grid> | ||||
</Grid> | </Grid> | ||||
@@ -107,6 +107,15 @@ const FormPanel = ({ formData }) => { | |||||
} | } | ||||
} | } | ||||
const isOverTime = () => { | |||||
let returnBeforeDate = DateUtils.convertToDate(formik.values?.returnBeforeDate); | |||||
if (!returnBeforeDate) return true; | |||||
returnBeforeDate = returnBeforeDate.setHours(14, 0, 0, 0); | |||||
let current = new Date(); | |||||
return current.getTime() > returnBeforeDate; | |||||
} | |||||
return ( | return ( | ||||
@@ -127,10 +136,11 @@ const FormPanel = ({ formData }) => { | |||||
校對回覆日期: {DateUtils.datetimeStr_Cht(formik.values.replyDate)} | 校對回覆日期: {DateUtils.datetimeStr_Cht(formik.values.replyDate)} | ||||
</Grid> | </Grid> | ||||
<Grid item xs={12} md={12} textAlign="left"> | <Grid item xs={12} md={12} textAlign="left"> | ||||
校對回覆: {formik.values.action? "可以付印(稿件正確)":"未能付印(需要修改)"} | |||||
校對回覆: {formik.values.action ? "可以付印(稿件正確)" : "未能付印(需要修改)"} | |||||
</Grid> | </Grid> | ||||
<Grid item xs={12} md={12} textAlign="left"> | <Grid item xs={12} md={12} textAlign="left"> | ||||
<FileList | |||||
<FileList | |||||
lang="ch" | |||||
refId={params.id} | refId={params.id} | ||||
refType={"proofReply"} | refType={"proofReply"} | ||||
dateHideable={true} | dateHideable={true} | ||||
@@ -140,99 +150,111 @@ const FormPanel = ({ formData }) => { | |||||
disableColumnSelector | disableColumnSelector | ||||
hideFooter | hideFooter | ||||
/> | /> | ||||
</Grid> | |||||
</Grid> | |||||
</Grid> | </Grid> | ||||
: | : | ||||
<Grid container direction="column" sx={{ paddingLeft: 4, paddingRight: 4 }} spacing={1}> | |||||
( | |||||
isOverTime() ? | |||||
<Grid container direction="column" sx={{ paddingLeft: 4, paddingRight: 4 }} spacing={1}> | |||||
<Grid item xs={12} md={12} textAlign="left"> | |||||
回覆逾時,請重新申請。 | |||||
</Grid> | |||||
</Grid> | |||||
: | |||||
<Grid container direction="column" sx={{ paddingLeft: 4, paddingRight: 4 }} spacing={1}> | |||||
<Grid item xs={12} md={12}> | |||||
<RadioGroup | |||||
aria-labelledby="demo-radio-buttons-group-label" | |||||
id="action" | |||||
name="action" | |||||
defaultValue={true} | |||||
> | |||||
<FormControlLabel value={true} control={<Radio />} label="可以付印(稿件正確)" /> | |||||
<FormControlLabel value={false} control={<Radio />} label="未能付印(需要修改)" /> | |||||
</RadioGroup> | |||||
</Grid> | |||||
<Grid item xs={12} md={12}> | |||||
<RadioGroup | |||||
aria-labelledby="demo-radio-buttons-group-label" | |||||
id="action" | |||||
name="action" | |||||
defaultValue={true} | |||||
> | |||||
<FormControlLabel value={true} control={<Radio />} label="可以付印(稿件正確)" /> | |||||
<FormControlLabel value={false} control={<Radio />} label="未能付印(需要修改)" /> | |||||
</RadioGroup> | |||||
</Grid> | |||||
<Grid item xs={12} md={12} textAlign="left"> | |||||
請上載稿件修改的檔案: | |||||
</Grid> | |||||
<Grid item xs={12} md={12} textAlign="left"> | |||||
請上載稿件修改的檔案: | |||||
</Grid> | |||||
<Grid item xs={12} md={12} textAlign="left"> | |||||
<input | |||||
id="uploadFileBtn" | |||||
name="file" | |||||
type="file" | |||||
accept=".pdf" | |||||
style={{ display: 'none' }} | |||||
disabled={attachments.length >= (formik.values.groupType == "A" ? 2 : 1)} | |||||
onChange={(event) => { | |||||
readFile(event) | |||||
}} | |||||
/> | |||||
<label htmlFor="uploadFileBtn"> | |||||
<Button | |||||
component="span" | |||||
variant="contained" | |||||
size="large" | |||||
disabled={attachments.length >= (formik.values.groupType == "A" ? 2 : 1)} | |||||
>上載</Button> | |||||
</label> | |||||
</Grid> | |||||
<Grid item xs={12} md={12} textAlign="left"> | |||||
<input | |||||
id="uploadFileBtn" | |||||
name="file" | |||||
type="file" | |||||
accept=".pdf" | |||||
style={{ display: 'none' }} | |||||
disabled={attachments.length >= (formik.values.groupType == "A" ? 2 : 1)} | |||||
onChange={(event) => { | |||||
readFile(event) | |||||
}} | |||||
/> | |||||
<label htmlFor="uploadFileBtn"> | |||||
<Button | |||||
component="span" | |||||
variant="contained" | |||||
size="large" | |||||
disabled={attachments.length >= (formik.values.groupType == "A" ? 2 : 1)} | |||||
>上載</Button> | |||||
</label> | |||||
</Grid> | |||||
<Grid item xs={12} md={12} textAlign="left"> | |||||
<UploadFileTable key="uploadTable" recordList={attachments} setRecordList={setAttachments} /> | |||||
</Grid> | |||||
<Grid item xs={12} md={12} textAlign="left"> | |||||
<UploadFileTable key="uploadTable" recordList={attachments} setRecordList={setAttachments} /> | |||||
</Grid> | |||||
<Grid item xs={12} md={12} lg={12}> | |||||
<Stack direction="row" alignItems="center"> | |||||
<FormLabel sx={{ paddingRight: 2, textAlign: "center" }}> | |||||
簽署: | |||||
</FormLabel> | |||||
<TextField | |||||
fullWidth | |||||
type="text" | |||||
onChange={formik.handleChange} | |||||
name="vaild" | |||||
variant="outlined" | |||||
error={Boolean(formik.errors["vaild"])} | |||||
helperText={formik.errors["vaild"] ? formik.errors["vaild"] : ''} | |||||
placeholder="請輸入你的登入密碼" | |||||
sx={ | |||||
{ | |||||
"& .MuiInputBase-input.Mui-disabled": { | |||||
WebkitTextFillColor: "#000000", | |||||
background: "#f8f8f8", | |||||
}, | |||||
width: '50%' | |||||
} | |||||
} | |||||
/> | |||||
</Stack> | |||||
</Grid> | |||||
<Grid item xs={12} md={12} lg={12}> | |||||
<Stack direction="row" alignItems="center"> | |||||
<FormLabel sx={{ paddingRight: 2, textAlign: "center" }}> | |||||
簽署: | |||||
</FormLabel> | |||||
<TextField | |||||
fullWidth | |||||
type="text" | |||||
onChange={formik.handleChange} | |||||
name="vaild" | |||||
variant="outlined" | |||||
error={Boolean(formik.errors["vaild"])} | |||||
helperText={formik.errors["vaild"] ? formik.errors["vaild"] : ''} | |||||
placeholder="請輸入你的登入密碼" | |||||
sx={ | |||||
{ | |||||
"& .MuiInputBase-input.Mui-disabled": { | |||||
WebkitTextFillColor: "#000000", | |||||
background: "#f8f8f8", | |||||
}, | |||||
width: '50%' | |||||
} | |||||
} | |||||
/> | |||||
</Stack> | |||||
</Grid> | |||||
<Grid item xs={12} md={12} textAlign="left"> | |||||
<Button | |||||
size="large" | |||||
variant="contained" | |||||
color="success" | |||||
type="submit" | |||||
sx={{ | |||||
textTransform: 'capitalize', | |||||
alignItems: 'end' | |||||
}}> | |||||
提交回覆 | |||||
</Button> | |||||
</Grid> | |||||
</Grid> | |||||
) | |||||
<Grid item xs={12} md={12} textAlign="left"> | |||||
<Button | |||||
size="large" | |||||
variant="contained" | |||||
color="success" | |||||
type="submit" | |||||
sx={{ | |||||
textTransform: 'capitalize', | |||||
alignItems: 'end' | |||||
}}> | |||||
提交回覆 | |||||
</Button> | |||||
</Grid> | |||||
</Grid> | |||||
} | } | ||||
@@ -10,6 +10,7 @@ import * as React from "react"; | |||||
import * as HttpUtils from "utils/HttpUtils"; | import * as HttpUtils from "utils/HttpUtils"; | ||||
import * as DateUtils from "utils/DateUtils"; | import * as DateUtils from "utils/DateUtils"; | ||||
import { useParams } from "react-router-dom"; | import { useParams } from "react-router-dom"; | ||||
import { useNavigate } from "react-router-dom"; | |||||
import Loadable from 'components/Loadable'; | import Loadable from 'components/Loadable'; | ||||
const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); | const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); | ||||
@@ -30,6 +31,7 @@ const BackgroundHead = { | |||||
const Index = () => { | const Index = () => { | ||||
const params = useParams(); | const params = useParams(); | ||||
const navigate = useNavigate() | |||||
const [record, setRecord] = React.useState(); | const [record, setRecord] = React.useState(); | ||||
const [onReady, setOnReady] = React.useState(false); | const [onReady, setOnReady] = React.useState(false); | ||||
@@ -49,6 +51,9 @@ const Index = () => { | |||||
HttpUtils.get({ | HttpUtils.get({ | ||||
url: UrlUtils.GET_PROOF + "/" + params.id, | url: UrlUtils.GET_PROOF + "/" + params.id, | ||||
onSuccess: (responseData) => { | onSuccess: (responseData) => { | ||||
if(!responseData.data?.id){ | |||||
navigate("/proof/search"); | |||||
} | |||||
responseData.data["phoneNumber"] = JSON.parse(responseData.data.contactTelNo).phoneNumber; | responseData.data["phoneNumber"] = JSON.parse(responseData.data.contactTelNo).phoneNumber; | ||||
responseData.data["tel_countryCode"] = JSON.parse(responseData.data.contactTelNo).countryCode; | responseData.data["tel_countryCode"] = JSON.parse(responseData.data.contactTelNo).countryCode; | ||||
@@ -56,13 +61,13 @@ const Index = () => { | |||||
responseData.data["fax_countryCode"] = JSON.parse(responseData.data.contactFaxNo).countryCode; | responseData.data["fax_countryCode"] = JSON.parse(responseData.data.contactFaxNo).countryCode; | ||||
responseData.data["issueNoStr"] = responseData.data.issueYear | responseData.data["issueNoStr"] = responseData.data.issueYear | ||||
+" Vol. "+zeroPad(responseData.data.issueVolume,3) | |||||
+", No. "+zeroPad(responseData.data.issueNo,2); | |||||
responseData.data["issueDate"] = DateUtils.dateFormat(responseData.data.issueDate, "D MMM YYYY (ddd)"); | |||||
+ " Vol. " + zeroPad(responseData.data.issueVolume, 3) | |||||
+ ", No. " + zeroPad(responseData.data.issueNo, 2); | |||||
responseData.data["issueDateStr"] = DateUtils.dateFormat(responseData.data.issueDate, "D MMM YYYY (ddd)"); | |||||
responseData.data["groupType"] = responseData.data.groupNo.charAt(0); | responseData.data["groupType"] = responseData.data.groupNo.charAt(0); | ||||
responseData.data["action"] = responseData.data.replyDate?responseData.data.action:true; | |||||
responseData.data["action"] = responseData.data.replyDate ? responseData.data.action : true; | |||||
setRecord(responseData.data); | setRecord(responseData.data); | ||||
} | } | ||||
}); | }); | ||||
@@ -70,7 +75,7 @@ const Index = () => { | |||||
} | } | ||||
function zeroPad(num, places) { | function zeroPad(num, places) { | ||||
num=num?num:0; | |||||
num = num ? num : 0; | |||||
var zero = places - num.toString().length + 1; | var zero = places - num.toString().length + 1; | ||||
return Array(+(zero > 0 && zero)).join("0") + num; | return Array(+(zero > 0 && zero)).join("0") + num; | ||||
} | } | ||||
@@ -80,42 +85,48 @@ const Index = () => { | |||||
!onReady ? | !onReady ? | ||||
<LoadingComponent /> | <LoadingComponent /> | ||||
: | : | ||||
<Grid container sx={{ minHeight: '110vh', backgroundColor: '#fff' }} direction="column" justifyContent="flex-start" alignItems="center" > | |||||
<Grid item xs={12} width="100%"> | |||||
<div style={BackgroundHead} width="100%"> | |||||
<Stack direction="row" height='70px'> | |||||
<Typography ml={15} color='#FFF' variant="h4" sx={{ pt: 2 }}>校對記錄</Typography> | |||||
</Stack> | |||||
</div> | |||||
</Grid> | |||||
{/*row 1*/} | |||||
<Grid item xs={12} md={12} > | |||||
<Grid container justifyContent="flex-start" alignItems="center" > | |||||
<center> | |||||
<Grid item xs={12} md={12} sx={{ pt: 2 }}> | |||||
<Box xs={12} md={12} sx={{ p: 4, border: '3px groove grey', borderRadius: '10px' }}> | |||||
<ApplicationDetails | |||||
formData={record} | |||||
style={{ | |||||
display: "flex", | |||||
height: "100%", | |||||
flex: 1 | |||||
}} | |||||
/> | |||||
</Box> | |||||
</Grid> | |||||
<Grid item xs={12} md={12} sx={{ pt: 1, pb:2 }}> | |||||
<Box xs={12} md={12} sx={{ p: 4, border: '3px groove grey', borderRadius: '10px' }}> | |||||
<ProofForm | |||||
formData={record} | |||||
/> | |||||
</Box> | |||||
( | |||||
<Grid container sx={{ minHeight: '110vh', backgroundColor: '#fff' }} direction="column" justifyContent="flex-start" alignItems="center" > | |||||
<Grid item xs={12} width="100%"> | |||||
<div style={BackgroundHead} width="100%"> | |||||
<Stack direction="row" height='70px'> | |||||
<Typography ml={15} color='#FFF' variant="h4" sx={{ pt: 2 }}>校對記錄</Typography> | |||||
</Stack> | |||||
</div> | |||||
</Grid> | |||||
{/*row 1*/} | |||||
<Grid item xs={12} md={12} > | |||||
<Grid container justifyContent="flex-start" alignItems="center" > | |||||
<center> | |||||
<Grid item xs={12} md={12} sx={{ pt: 2 }}> | |||||
<Box xs={12} md={12} sx={{ p: 4, border: '3px groove grey', borderRadius: '10px' }}> | |||||
<ApplicationDetails | |||||
formData={record} | |||||
style={{ | |||||
display: "flex", | |||||
height: "100%", | |||||
flex: 1 | |||||
}} | |||||
/> | |||||
</Box> | |||||
</Grid> | |||||
<Grid item xs={12} md={12} sx={{ pt: 1, pb: 2 }}> | |||||
<Box xs={12} md={12} sx={{ p: 4, border: '3px groove grey', borderRadius: '10px' }}> | |||||
<ProofForm | |||||
formData={record} | |||||
/> | |||||
</Box> | |||||
</Grid> | |||||
</center> | |||||
</Grid> | </Grid> | ||||
</center> | |||||
</Grid> | |||||
</Grid> | |||||
{/*row 2*/} | |||||
</Grid > | |||||
</Grid> | |||||
{/*row 2*/} | |||||
</Grid > | |||||
) | |||||
); | ); | ||||
}; | }; | ||||
@@ -4,8 +4,8 @@ import { | |||||
Button | Button | ||||
} from '@mui/material'; | } from '@mui/material'; | ||||
import * as DateUtils from "utils/DateUtils"; | import * as DateUtils from "utils/DateUtils"; | ||||
import {useNavigate} from "react-router-dom"; | |||||
import {FiDataGrid} from "components/FiDataGrid"; | |||||
import { useNavigate } from "react-router-dom"; | |||||
import { FiDataGrid } from "components/FiDataGrid"; | |||||
// ==============================|| EVENT TABLE ||============================== // | // ==============================|| EVENT TABLE ||============================== // | ||||
export default function SearchPublicNoticeTable({ recordList }) { | export default function SearchPublicNoticeTable({ recordList }) { | ||||
@@ -17,14 +17,14 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||||
}, [recordList]); | }, [recordList]); | ||||
const handleEditClick = (params) => () => { | const handleEditClick = (params) => () => { | ||||
navigate('/proof/reply/'+ params.row.appId); | |||||
navigate('/proof/reply/' + params.row.appId); | |||||
}; | }; | ||||
const columns = [ | const columns = [ | ||||
{ | { | ||||
field: 'actions', | field: 'actions', | ||||
headerName: 'Proof No.', | |||||
headerName: '校對編號', | |||||
width: 150, | width: 150, | ||||
cellClassName: 'actions', | cellClassName: 'actions', | ||||
renderCell: (params) => { | renderCell: (params) => { | ||||
@@ -34,23 +34,34 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||||
{ | { | ||||
id: 'appId', | id: 'appId', | ||||
field: 'appId', | field: 'appId', | ||||
headerName: 'Application No./ Gazette Code/ Gazette Issue', | |||||
headerName: '申請編號/憲報編號/憲報期數', | |||||
flex: 1, | flex: 1, | ||||
renderCell: (params) => { | renderCell: (params) => { | ||||
let appNo = params.row.appNo; | let appNo = params.row.appNo; | ||||
let code = params.row.groupNo; | let code = params.row.groupNo; | ||||
let isssue = params.row.issueYear | let isssue = params.row.issueYear | ||||
+" Vol. "+zeroPad(params.row.issueVolume,3) | |||||
+", No. "+zeroPad(params.row.issueNo,2) | |||||
+", "+DateUtils.dateFormat(params.row.issueDate, "D MMM YYYY (ddd)"); | |||||
+ " Vol. " + zeroPad(params.row.issueVolume, 3) | |||||
+ ", No. " + zeroPad(params.row.issueNo, 2) | |||||
+ ", " + DateUtils.dateFormat(params.row.issueDate, "D MMM YYYY (ddd)"); | |||||
return <div style={{margin: 4}}>App No: {appNo}<br/>Gazette Code: {code}<br/>Issue: {isssue}</div> | |||||
return <div style={{ margin: 4 }}>申請編號: {appNo}<br />憲報編號: {code}<br />憲報期數: {isssue}</div> | |||||
}, | }, | ||||
}, | }, | ||||
{ | |||||
id: 'returnBeforeDate', | |||||
field: 'returnBeforeDate', | |||||
headerName: '此日期前回覆', | |||||
flex: 1, | |||||
valueGetter: (params) => { | |||||
let returnBeforeDate = DateUtils.convertToDate(params?.value); | |||||
returnBeforeDate = returnBeforeDate.setHours(14, 0, 0, 0); | |||||
return DateUtils.datetimeStr_Cht(returnBeforeDate); | |||||
} | |||||
}, | |||||
{ | { | ||||
id: 'created', | id: 'created', | ||||
field: 'created', | field: 'created', | ||||
headerName: 'Proof Date', | |||||
headerName: '校對日期', | |||||
flex: 1, | flex: 1, | ||||
valueGetter: (params) => { | valueGetter: (params) => { | ||||
return DateUtils.datetimeStr(params?.value); | return DateUtils.datetimeStr(params?.value); | ||||
@@ -59,69 +70,41 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||||
{ | { | ||||
id: 'replyDate', | id: 'replyDate', | ||||
field: 'replyDate', | field: 'replyDate', | ||||
headerName: 'Confirmed/Return Date', | |||||
headerName: '回覆日期', | |||||
flex: 1, | flex: 1, | ||||
valueGetter: (params) => { | valueGetter: (params) => { | ||||
return params?.value?DateUtils.datetimeStr(params?.value):""; | |||||
} | |||||
}, | |||||
{ | |||||
id: 'contactPerson', | |||||
field: 'contactPerson', | |||||
headerName: 'Contact Person', | |||||
flex: 1, | |||||
renderCell: (params) => { | |||||
let company = params.row.enCompanyName!= null ?" ("+(params.row.enCompanyName)+")":""; | |||||
let phone = JSON.parse(params.row.contactTelNo); | |||||
let faxNo = JSON.parse(params.row.contactFaxNo); | |||||
let contact = ""; | |||||
if (phone) { | |||||
contact = "Phone No.: " + phone?.countryCode + " " + phone?.phoneNumber | |||||
} | |||||
if (faxNo && faxNo?.faxNumber) { | |||||
if (contact != "") | |||||
contact = contact + ", " | |||||
contact = contact + "Fax No.:" + faxNo?.countryCode + " " + faxNo?.faxNumber | |||||
} | |||||
return (<> | |||||
{params?.value + company}<br /> | |||||
{contact} | |||||
</>); | |||||
return params?.value ? DateUtils.datetimeStr(params?.value) : ""; | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
id: 'groupTitle', | id: 'groupTitle', | ||||
field: 'groupTitle', | field: 'groupTitle', | ||||
headerName: 'Gazette Group', | |||||
headerName: '憲報類型', | |||||
flex: 1, | flex: 1, | ||||
valueGetter: (params) => { | valueGetter: (params) => { | ||||
return (params?.value)?(params?.value):""; | |||||
return (params?.value) ? (params?.value) : ""; | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
id: 'fee', | id: 'fee', | ||||
field: 'fee', | field: 'fee', | ||||
headerName: 'Fee', | |||||
headerName: '費用', | |||||
flex: 1, | flex: 1, | ||||
valueGetter: (params) => { | valueGetter: (params) => { | ||||
return (params?.value)?"$ "+currencyFormat(params?.value):""; | |||||
return (params?.value) ? "$ " + currencyFormat(params?.value) : ""; | |||||
} | } | ||||
}, | }, | ||||
]; | ]; | ||||
function currencyFormat(num) { | function currencyFormat(num) { | ||||
return num.toLocaleString('en-US', { | return num.toLocaleString('en-US', { | ||||
minimumFractionDigits: 2 | |||||
}); | |||||
minimumFractionDigits: 2 | |||||
}); | |||||
} | } | ||||
function zeroPad(num, places) { | function zeroPad(num, places) { | ||||
num=num?num:0; | |||||
num = num ? num : 0; | |||||
var zero = places - num.toString().length + 1; | var zero = places - num.toString().length + 1; | ||||
return Array(+(zero > 0 && zero)).join("0") + num; | return Array(+(zero > 0 && zero)).join("0") + num; | ||||
} | } | ||||
@@ -13,13 +13,11 @@ import * as DateUtils from "utils/DateUtils"; | |||||
// ==============================|| DASHBOARD - DEFAULT ||============================== // | // ==============================|| DASHBOARD - DEFAULT ||============================== // | ||||
const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria,issueComboData | |||||
const SearchPublicNoticeForm = ({ applySearch, searchCriteria,issueComboData | |||||
}) => { | }) => { | ||||
const [type, setType] = React.useState([]); | const [type, setType] = React.useState([]); | ||||
const [status, setStatus] = React.useState({ key: 0, label: 'All', type: 'all' }); | const [status, setStatus] = React.useState({ key: 0, label: 'All', type: 'all' }); | ||||
const [orgSelected, setOrgSelected] = React.useState({}); | |||||
const [orgCombo, setOrgCombo] = React.useState(); | |||||
const [issueSelected, setIssueSelected] = React.useState({}); | const [issueSelected, setIssueSelected] = React.useState({}); | ||||
const [issueCombo, setIssueCombo] = React.useState([]); | const [issueCombo, setIssueCombo] = React.useState([]); | ||||
const [groupSelected, setGroupSelected] = React.useState({}); | const [groupSelected, setGroupSelected] = React.useState({}); | ||||
@@ -46,17 +44,10 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria,issu | |||||
dateTo: data.dateTo, | dateTo: data.dateTo, | ||||
contact: data.contact, | contact: data.contact, | ||||
replyed: (status?.type && status?.type != 'all') ? status?.type : "", | replyed: (status?.type && status?.type != 'all') ? status?.type : "", | ||||
orgId: (orgSelected?.key && orgSelected?.key > 0) ? orgSelected?.key : "", | |||||
}; | }; | ||||
applySearch(temp); | applySearch(temp); | ||||
}; | }; | ||||
React.useEffect(() => { | |||||
if (orgComboData && orgComboData.length > 0) { | |||||
setOrgCombo(orgComboData); | |||||
} | |||||
}, [orgComboData]); | |||||
React.useEffect(() => { | React.useEffect(() => { | ||||
if (issueComboData && issueComboData.length > 0) { | if (issueComboData && issueComboData.length > 0) { | ||||
@@ -144,7 +135,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria,issu | |||||
}} | }} | ||||
renderInput={(params) => ( | renderInput={(params) => ( | ||||
<TextField {...params} | <TextField {...params} | ||||
label="Gazette Issue" | |||||
label="憲報期數" | |||||
InputLabelProps={{ | InputLabelProps={{ | ||||
shrink: true | shrink: true | ||||
}} | }} | ||||
@@ -160,8 +151,8 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria,issu | |||||
id="gazettGroup" | id="gazettGroup" | ||||
options={ComboData.groupTitle} | options={ComboData.groupTitle} | ||||
value={groupSelected} | value={groupSelected} | ||||
inputValue={(groupSelected?.label)?groupSelected?.label:""} | |||||
getOptionLabel={(option)=>option.label} | |||||
inputValue={(groupSelected?.labelCht)?groupSelected?.labelCht:""} | |||||
getOptionLabel={(option)=>option.labelCht} | |||||
onChange={(event, newValue) => { | onChange={(event, newValue) => { | ||||
if (newValue !== null) { | if (newValue !== null) { | ||||
setGroupSelected(newValue); | setGroupSelected(newValue); | ||||
@@ -169,7 +160,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria,issu | |||||
}} | }} | ||||
renderInput={(params) => ( | renderInput={(params) => ( | ||||
<TextField {...params} | <TextField {...params} | ||||
label="Gazette Group" | |||||
label="憲報類型" | |||||
InputLabelProps={{ | InputLabelProps={{ | ||||
shrink: true | shrink: true | ||||
}} | }} | ||||
@@ -184,7 +175,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria,issu | |||||
{...register("dateFrom")} | {...register("dateFrom")} | ||||
id="dateFrom" | id="dateFrom" | ||||
type="date" | type="date" | ||||
label="校對日期(From)" | |||||
label="校對日期(從)" | |||||
defaultValue={searchCriteria.dateFrom} | defaultValue={searchCriteria.dateFrom} | ||||
InputProps={{ inputProps: { max: maxDate } }} | InputProps={{ inputProps: { max: maxDate } }} | ||||
onChange={(newValue) => { | onChange={(newValue) => { | ||||
@@ -209,7 +200,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria,issu | |||||
}} | }} | ||||
id="dateTo" | id="dateTo" | ||||
type="date" | type="date" | ||||
label="校對日期(To)" | |||||
label="校對日期(到)" | |||||
defaultValue={searchCriteria.dateTo} | defaultValue={searchCriteria.dateTo} | ||||
/> | /> | ||||
</Grid> | </Grid> | ||||
@@ -236,7 +227,8 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria,issu | |||||
filterOptions={(options) => options} | filterOptions={(options) => options} | ||||
options={ComboData.proofStatus} | options={ComboData.proofStatus} | ||||
value={status} | value={status} | ||||
inputValue={status?.label?status?.label:""} | |||||
getOptionLabel={(option)=>option.labelCht} | |||||
inputValue={status?.labelCht?status?.labelCht:""} | |||||
onChange={(event, newValue) => { | onChange={(event, newValue) => { | ||||
if (newValue !== null) { | if (newValue !== null) { | ||||
setStatus(newValue); | setStatus(newValue); | ||||
@@ -253,35 +245,6 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria,issu | |||||
/> | /> | ||||
</Grid> | </Grid> | ||||
{ | |||||
orgCombo ? | |||||
<Grid item xs={9} s={6} md={5} lg={3} sx={{ ml: 3, mr: 3, mb: 3 }}> | |||||
<Autocomplete | |||||
{...register("orgId")} | |||||
disablePortal | |||||
id="orgId" | |||||
options={orgCombo} | |||||
value={orgSelected} | |||||
inputValue={(orgSelected?.label) ? orgSelected?.label : ""} | |||||
onChange={(event, newValue) => { | |||||
if (newValue !== null) { | |||||
setOrgSelected(newValue); | |||||
} | |||||
}} | |||||
renderInput={(params) => ( | |||||
<TextField {...params} | |||||
label="Organization" | |||||
InputLabelProps={{ | |||||
shrink: true | |||||
}} | |||||
/> | |||||
)} | |||||
/> | |||||
</Grid> | |||||
: <></> | |||||
} | |||||
</Grid> | </Grid> | ||||
@@ -297,7 +260,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria,issu | |||||
textTransform: 'capitalize', | textTransform: 'capitalize', | ||||
alignItems: 'end' | alignItems: 'end' | ||||
}}> | }}> | ||||
Clear | |||||
重置 | |||||
</Button> | </Button> | ||||
</Grid> | </Grid> | ||||
@@ -310,7 +273,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria,issu | |||||
textTransform: 'capitalize', | textTransform: 'capitalize', | ||||
alignItems: 'end' | alignItems: 'end' | ||||
}}> | }}> | ||||
Submit | |||||
提交 | |||||
</Button> | </Button> | ||||
</Grid> | </Grid> | ||||
</Grid> | </Grid> | ||||
@@ -31,7 +31,6 @@ const BackgroundHead = { | |||||
const UserSearchPage_Individual = () => { | const UserSearchPage_Individual = () => { | ||||
const [record,setRecord] = React.useState([]); | const [record,setRecord] = React.useState([]); | ||||
const [orgCombo,setOrgCombo] = React.useState([]); | |||||
const [issueCombo,setIssueCombo] = React.useState([]); | const [issueCombo,setIssueCombo] = React.useState([]); | ||||
const [searchCriteria, setSearchCriteria] = React.useState({ | const [searchCriteria, setSearchCriteria] = React.useState({ | ||||
dateTo: DateUtils.dateStr(new Date()), | dateTo: DateUtils.dateStr(new Date()), | ||||
@@ -40,8 +39,6 @@ const UserSearchPage_Individual = () => { | |||||
const [onReady, setOnReady] = React.useState(false); | const [onReady, setOnReady] = React.useState(false); | ||||
React.useEffect(() => { | React.useEffect(() => { | ||||
getUserList(); | |||||
getOrgCombo(); | |||||
getIssueCombo(); | getIssueCombo(); | ||||
}, []); | }, []); | ||||
@@ -50,10 +47,10 @@ const UserSearchPage_Individual = () => { | |||||
}, [record]); | }, [record]); | ||||
React.useEffect(() => { | React.useEffect(() => { | ||||
getUserList(); | |||||
loadGrid(); | |||||
}, [searchCriteria]); | }, [searchCriteria]); | ||||
function getUserList(){ | |||||
function loadGrid(){ | |||||
HttpUtils.get({ | HttpUtils.get({ | ||||
url: UrlUtils.LIST_PROOF, | url: UrlUtils.LIST_PROOF, | ||||
params: searchCriteria, | params: searchCriteria, | ||||
@@ -63,16 +60,6 @@ const UserSearchPage_Individual = () => { | |||||
}); | }); | ||||
} | } | ||||
function getOrgCombo(){ | |||||
HttpUtils.get({ | |||||
url: UrlUtils.GET_ORG_COMBO, | |||||
onSuccess: function(responseData){ | |||||
let combo = responseData; | |||||
setOrgCombo(combo); | |||||
} | |||||
}); | |||||
} | |||||
function getIssueCombo(){ | function getIssueCombo(){ | ||||
HttpUtils.get({ | HttpUtils.get({ | ||||
url: UrlUtils.GET_ISSUE_COMBO, | url: UrlUtils.GET_ISSUE_COMBO, | ||||
@@ -104,7 +91,6 @@ const UserSearchPage_Individual = () => { | |||||
<Grid item xs={12} md={12} lg={12}> | <Grid item xs={12} md={12} lg={12}> | ||||
<SearchForm | <SearchForm | ||||
applySearch={applySearch} | applySearch={applySearch} | ||||
orgComboData={orgCombo} | |||||
issueComboData={issueCombo} | issueComboData={issueCombo} | ||||
searchCriteria={searchCriteria} | searchCriteria={searchCriteria} | ||||
/> | /> | ||||
@@ -135,7 +135,8 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||||
ComboData.publicNoticeStatic | ComboData.publicNoticeStatic | ||||
} | } | ||||
values={status} | values={status} | ||||
inputValue={status?.label} | |||||
inputValue={status?.labelCht} | |||||
getOptionLabel={(option)=>option.labelCht} | |||||
onChange={(event, newValue) => { | onChange={(event, newValue) => { | ||||
if (newValue !== null) { | if (newValue !== null) { | ||||
setStatus(newValue); | setStatus(newValue); | ||||
@@ -12,52 +12,29 @@ export const country = ["香港","內地","澳門"]; | |||||
export const accountFilter = [{ id: 1, key: 1, label: 'Active', type: 'active' }, { id: 2, key: 2, label: 'Locked', type: 'locked' }, { id: 3, key: 3, label: 'Not verified', type: 'notVerified' }]; | export const accountFilter = [{ id: 1, key: 1, label: 'Active', type: 'active' }, { id: 2, key: 2, label: 'Locked', type: 'locked' }, { id: 3, key: 3, label: 'Not verified', type: 'notVerified' }]; | ||||
export const publicNoticeStatic = [ | export const publicNoticeStatic = [ | ||||
{ key: 0, label: '全部', type: 'all' }, | |||||
{ key: 1, label: '處理中', type: 'processing' }, // submitted and reviewed | |||||
{ key: 2, label: '待付款', type: 'confirmed' }, | |||||
{ key: 3, label: '待發布', type: 'paid' }, | |||||
{ key: 4, label: '已完成', type: 'completed' }, | |||||
{ key: 5, label: '不接受', type: 'notAccepted' }, | |||||
{ key: 6, label: '需重新提交', type: 'resubmit' }, | |||||
{ key: 7, label: '已取消', type: 'cancelled' }, | |||||
{ key: 8, label: '已撤銷', type: 'withdrawn' }, | |||||
{ key: 0, labelCht: '全部', label: 'All', type: 'all' }, | |||||
{ key: 1, labelCht: '處理中', label: 'Processing', type: 'processing' }, // submitted and reviewed | |||||
{ key: 2, labelCht: '待付款', label: 'Pending Payment', type: 'confirmed' }, | |||||
{ key: 3, labelCht: '待發布', label: 'To be published', type: 'paid' }, | |||||
{ key: 4, labelCht: '已完成', label: 'Completed', type: 'completed' }, | |||||
{ key: 5, labelCht: '不接受', label: 'Not accepted', type: 'notAccepted' }, | |||||
{ key: 6, labelCht: '需重新提交', label: 'Re-submit Required', type: 'resubmit' }, | |||||
{ key: 7, labelCht: '已取消', label: 'Cancelled', type: 'cancelled' }, | |||||
{ key: 8, labelCht: '已撤銷', label: 'Withdrawn', type: 'withdrawn' }, | |||||
]; | ]; | ||||
export const publicNoticeStatic_Creditor = [ | export const publicNoticeStatic_Creditor = [ | ||||
{ key: 0, label: '全部', type: 'all' }, | |||||
{ key: 1, label: '處理中', type: 'processing' }, // submitted and reviewed | |||||
{ key: 2, label: '待發布', type: 'confirmed' }, | |||||
{ key: 3, label: '待付款', type: 'published' }, | |||||
{ key: 4, label: '已完成', type: 'completed' }, | |||||
{ key: 5, label: '不接受', type: 'notAccepted' }, | |||||
{ key: 6, label: '需重新提交', type: 'resubmit' }, | |||||
{ key: 7, label: '已取消', type: 'cancelled' }, | |||||
{ key: 8, label: '已撤銷', type: 'withdrawn' }, | |||||
{ key: 0, labelCht: '全部', label: 'All', type: 'all' }, | |||||
{ key: 1, labelCht: '處理中', label: 'Processing', type: 'processing' }, // submitted and reviewed | |||||
{ key: 2, labelCht: '待發布', label: 'To be published', type: 'confirmed' }, | |||||
{ key: 3, labelCht: '待付款', label: 'Pending Payment', type: 'published' }, | |||||
{ key: 4, labelCht: '已完成', label: 'Completed', type: 'completed' }, | |||||
{ key: 5, labelCht: '不接受', label: 'Not accepted', type: 'notAccepted' }, | |||||
{ key: 6, labelCht: '需重新提交', label: 'Re-submit Required', type: 'resubmit' }, | |||||
{ key: 7, labelCht: '已取消', label: 'Cancelled', type: 'cancelled' }, | |||||
{ key: 8, labelCht: '已撤銷', label: 'Withdrawn', type: 'withdrawn' }, | |||||
]; | ]; | ||||
export const publicNoticeStaticEng = [ | |||||
{ key: 0, label: 'All', type: 'all' }, | |||||
{ key: 1, label: 'Processing', type: 'processing' }, // submitted and reviewed | |||||
{ key: 2, label: 'Pending Payment', type: 'confirmed' }, | |||||
{ key: 3, label: 'To be published', type: 'paid' }, | |||||
{ key: 4, label: 'Completed', type: 'completed' }, | |||||
{ key: 5, label: 'Not accepted', type: 'notAccepted' }, | |||||
{ key: 6, label: 'Re-submit Required', type: 'resubmit' }, | |||||
{ key: 7, label: 'Cancelled', type: 'cancelled' }, | |||||
{ key: 8, label: 'Withdrawn', type: 'withdrawn' }, | |||||
]; | |||||
export const publicNoticeStaticEng_Creditor = [ | |||||
{ key: 0, label: 'All', type: 'all' }, | |||||
{ key: 1, label: 'Processing', type: 'processing' }, // submitted and reviewed | |||||
{ key: 2, label: 'To be published', type: 'confirmed' }, | |||||
{ key: 3, label: 'Pending Payment', type: 'published' }, | |||||
{ key: 4, label: 'Completed', type: 'completed' }, | |||||
{ key: 5, label: 'Not accepted', type: 'notAccepted' }, | |||||
{ key: 6, label: 'Re-submit Required', type: 'resubmit' }, | |||||
{ key: 7, label: 'Cancelled', type: 'cancelled' }, | |||||
{ key: 8, label: 'Withdrawn', type: 'withdrawn' }, | |||||
]; | |||||
export const publicNoticeStatic_GLD = [ | export const publicNoticeStatic_GLD = [ | ||||
{ key: 0, label: 'All', type: 'all' }, | { key: 0, label: 'All', type: 'all' }, | ||||
@@ -75,11 +52,11 @@ export const publicNoticeStatic_GLD = [ | |||||
export const groupTitle = [ | export const groupTitle = [ | ||||
{ key: 1, label: 'A - Private Bill', title: 'Private Bill', type: 'A'}, | |||||
{ key: 2, label: 'B - Companies Ordinance', title: 'Companies Ordinance', type: 'B' }, | |||||
{ key: 3, label: 'C - High Court', title: 'High Court', type: 'C' }, | |||||
{ key: 4, label: 'D - Notices', title: 'Notices', type: 'D' }, | |||||
{ key: 5, label: 'E - Miscellaneous (Companies)', title: 'Miscellaneous (Companies)', type: 'E' }, | |||||
{ key: 1, labelCht: 'A - 私人帳單', label: 'A - Private Bill', title: 'Private Bill', type: 'A'}, | |||||
{ key: 2, labelCht: 'B - 公司條例', label: 'B - Companies Ordinance', title: 'Companies Ordinance', type: 'B' }, | |||||
{ key: 3, labelCht: 'C - 高等法院', label: 'C - High Court', title: 'High Court', type: 'C' }, | |||||
{ key: 4, labelCht: 'D - 通知', label: 'D - Notices', title: 'Notices', type: 'D' }, | |||||
{ key: 5, labelCht: 'E - 其他', label: 'E - Miscellaneous (Companies)', title: 'Miscellaneous (Companies)', type: 'E' }, | |||||
]; | ]; | ||||
export const proofPrice = [ | export const proofPrice = [ | ||||
@@ -88,7 +65,7 @@ export const proofPrice = [ | |||||
]; | ]; | ||||
export const proofStatus = [ | export const proofStatus = [ | ||||
{ key: 0, label: 'All', type: 'all' }, | |||||
{ key: 1, label: 'Replyed', type: 'T' }, // submitted and reviewed | |||||
{ key: 2, label: 'Not reply yet', type: 'F' }, | |||||
{ key: 0, labelCht: '全部', label: 'All', type: 'all' }, | |||||
{ key: 1, labelCht: '已回覆', label:'Replyed', type: 'T' }, // submitted and reviewed | |||||
{ key: 2, labelCht: '未回覆', label:'Not reply yet', type: 'F' }, | |||||
]; | ]; |
@@ -19,7 +19,7 @@ export const dateStr_Cht = (date) =>{ | |||||
export const convertToDate = (date)=>{ | export const convertToDate = (date)=>{ | ||||
if(typeof date == 'number'){ | if(typeof date == 'number'){ | ||||
return dayjs(date); | |||||
return dayjs(date).toDate(); | |||||
}else if(Array.isArray(date)){ | }else if(Array.isArray(date)){ | ||||
if(date.length==3){ | if(date.length==3){ | ||||
return new Date(date[0],date[1]-1,date[2],0,0,0); | return new Date(date[0],date[1]-1,date[2],0,0,0); | ||||