| @@ -79,7 +79,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria}) => { | |||||
| defaultValue={searchCriteria.dateFrom} | defaultValue={searchCriteria.dateFrom} | ||||
| InputProps={{ inputProps: { max: maxDate } }} | InputProps={{ inputProps: { max: maxDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMinDate(DateUtils.dateStr(newValue)); | |||||
| setMinDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| @@ -96,7 +96,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria}) => { | |||||
| {...register("dateTo")} | {...register("dateTo")} | ||||
| InputProps={{ inputProps: { min: minDate } }} | InputProps={{ inputProps: { min: minDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMaxDate(DateUtils.dateStr(newValue)); | |||||
| setMaxDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| id="dateTo" | id="dateTo" | ||||
| type="date" | type="date" | ||||
| @@ -32,8 +32,8 @@ const UserSearchPage_Individual = () => { | |||||
| const [record, setRecord] = React.useState([]); | const [record, setRecord] = React.useState([]); | ||||
| const [searchCriteria, setSearchCriteria] = React.useState({ | const [searchCriteria, setSearchCriteria] = React.useState({ | ||||
| dateTo: DateUtils.dateStr(new Date()), | |||||
| dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate() - 90)), | |||||
| dateTo: DateUtils.dateValue(new Date()), | |||||
| dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate() - 90)), | |||||
| }); | }); | ||||
| const [onReady, setOnReady] = React.useState(false); | const [onReady, setOnReady] = React.useState(false); | ||||
| @@ -21,7 +21,7 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||||
| width: 250, | width: 250, | ||||
| cellClassName: 'announceDate', | cellClassName: 'announceDate', | ||||
| renderCell: (params) => { | renderCell: (params) => { | ||||
| return DateUtils.dateStr(params?.value); | |||||
| return DateUtils.dateValue(params?.value); | |||||
| }, | }, | ||||
| }, | }, | ||||
| { | { | ||||
| @@ -82,7 +82,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||||
| defaultValue={searchCriteria.dateFrom} | defaultValue={searchCriteria.dateFrom} | ||||
| InputProps={{ inputProps: { max: maxDate } }} | InputProps={{ inputProps: { max: maxDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMinDate(DateUtils.dateStr(newValue)); | |||||
| setMinDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| @@ -103,7 +103,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||||
| {...register("dateTo")} | {...register("dateTo")} | ||||
| InputProps={{ inputProps: { min: minDate } }} | InputProps={{ inputProps: { min: minDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMaxDate(DateUtils.dateStr(newValue)); | |||||
| setMaxDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| id="dateTo" | id="dateTo" | ||||
| type="date" | type="date" | ||||
| @@ -32,8 +32,8 @@ const BackgroundHead = { | |||||
| const UserSearchPage_Individual = () => { | const UserSearchPage_Individual = () => { | ||||
| const [record, setRecord] = React.useState([]); | const [record, setRecord] = React.useState([]); | ||||
| const [searchCriteria, setSearchCriteria] = React.useState({ | const [searchCriteria, setSearchCriteria] = React.useState({ | ||||
| dateTo: DateUtils.dateStr(new Date()), | |||||
| dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate() - 90)), | |||||
| dateTo: DateUtils.dateValue(new Date()), | |||||
| dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate() - 90)), | |||||
| }); | }); | ||||
| const [onReady, setOnReady] = React.useState(false); | const [onReady, setOnReady] = React.useState(false); | ||||
| @@ -107,7 +107,7 @@ const AuditLogSearchForm = ({ applySearch, searchCriteria}) => { | |||||
| defaultValue={searchCriteria.modifiedFrom} | defaultValue={searchCriteria.modifiedFrom} | ||||
| InputProps={{ inputProps: { max: maxDate } }} | InputProps={{ inputProps: { max: maxDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMinDate(DateUtils.dateStr(newValue)); | |||||
| setMinDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| @@ -129,7 +129,7 @@ const AuditLogSearchForm = ({ applySearch, searchCriteria}) => { | |||||
| InputProps={{ inputProps: { min: minDate } }} | InputProps={{ inputProps: { min: minDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| console.log(newValue) | console.log(newValue) | ||||
| setMaxDate(DateUtils.dateStr(newValue)); | |||||
| setMaxDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| id="modifiedTo" | id="modifiedTo" | ||||
| type="date" | type="date" | ||||
| @@ -33,8 +33,8 @@ const BackgroundHead = { | |||||
| const AuditLogPage = () => { | const AuditLogPage = () => { | ||||
| const [record, setRecord] = useState([]); | const [record, setRecord] = useState([]); | ||||
| const [searchCriteria, setSearchCriteria] = React.useState({ | const [searchCriteria, setSearchCriteria] = React.useState({ | ||||
| modifiedTo: DateUtils.dateStr(new Date()), | |||||
| modifiedFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate()-14)), | |||||
| modifiedTo: DateUtils.dateValue(new Date()), | |||||
| modifiedFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), | |||||
| }); | }); | ||||
| const [onReady, setOnReady] = useState(false); | const [onReady, setOnReady] = useState(false); | ||||
| const [changelocked, setChangeLocked] = React.useState(false); | const [changelocked, setChangeLocked] = React.useState(false); | ||||
| @@ -28,7 +28,7 @@ const SearchPublicNoticeForm = ({ applySearch, issueComboData, _paymentCount, _p | |||||
| const [failText, setFailText] = React.useState(""); | const [failText, setFailText] = React.useState(""); | ||||
| const [confirmPopUp, setConfirmPopUp] = React.useState(false); | const [confirmPopUp, setConfirmPopUp] = React.useState(false); | ||||
| const [dueDate, setDueDate] = React.useState(DateUtils.dateStr(DateUtils.dateStr((new Date().setDate(new Date().getDate() +1))))); | |||||
| const [dueDate, setDueDate] = React.useState(DateUtils.dateValue(DateUtils.dateValue((new Date().setDate(new Date().getDate() +1))))); | |||||
| const [isSuccessPopUp, setIsSuccessPopUp] = React.useState(false); | const [isSuccessPopUp, setIsSuccessPopUp] = React.useState(false); | ||||
| const [resultCount, setResultCount] = React.useState(0); | const [resultCount, setResultCount] = React.useState(0); | ||||
| @@ -91,7 +91,7 @@ const SearchPublicNoticeForm = ({ applySearch, issueComboData, _paymentCount, _p | |||||
| setIsFailPopUp(true); | setIsFailPopUp(true); | ||||
| return; | return; | ||||
| } else { | } else { | ||||
| setDueDate(DateUtils.dateStr((new Date().setDate(new Date().getDate() +1)))); | |||||
| setDueDate(DateUtils.dateValue((new Date().setDate(new Date().getDate() +1)))); | |||||
| setConfirmPopUp(true); | setConfirmPopUp(true); | ||||
| } | } | ||||
| }; | }; | ||||
| @@ -261,7 +261,7 @@ const SearchPublicNoticeForm = ({ applySearch, issueComboData, _paymentCount, _p | |||||
| fullWidth | fullWidth | ||||
| type="date" | type="date" | ||||
| defaultValue={dueDate} | defaultValue={dueDate} | ||||
| InputProps={{ inputProps: { min: DateUtils.dateStr(new Date()) } }} | |||||
| InputProps={{ inputProps: { min: DateUtils.dateValue(new Date()) } }} | |||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setDueDate(newValue.currentTarget.value) | setDueDate(newValue.currentTarget.value) | ||||
| }} | }} | ||||
| @@ -127,24 +127,24 @@ const DnDetailCard = ({ data }) => { | |||||
| {getDisplayField("Sent on", "")} | {getDisplayField("Sent on", "")} | ||||
| </Grid> | </Grid> | ||||
| <Grid container direction="row" justifyContent="space-between" alignItems="center"> | <Grid container direction="row" justifyContent="space-between" alignItems="center"> | ||||
| {getDisplayField("Reminder 1", dnData?.expectReminder1 ? DateUtils.dateStr(dnData.expectReminder1):"--")} | |||||
| {getDisplayField("Reminder 1", dnData?.expectReminder1 ? DateUtils.dateValue(dnData.expectReminder1):"--")} | |||||
| {getDisplayField("Reminder 1", dnData?.reminder1 ? DateUtils.datetimeStr(dnData.reminder1) : "--")} | {getDisplayField("Reminder 1", dnData?.reminder1 ? DateUtils.datetimeStr(dnData.reminder1) : "--")} | ||||
| </Grid> | </Grid> | ||||
| <Grid container direction="row" justifyContent="space-between" alignItems="center"> | <Grid container direction="row" justifyContent="space-between" alignItems="center"> | ||||
| {getDisplayField("Reminder 2", dnData?.expectReminder2 ? DateUtils.dateStr(dnData.expectReminder2):"--")} | |||||
| {getDisplayField("Reminder 2", dnData?.expectReminder2 ? DateUtils.dateValue(dnData.expectReminder2):"--")} | |||||
| {getDisplayField("Reminder 2", dnData?.reminder2 ? DateUtils.datetimeStr(dnData.reminder2) : "--")} | {getDisplayField("Reminder 2", dnData?.reminder2 ? DateUtils.datetimeStr(dnData.reminder2) : "--")} | ||||
| </Grid> | </Grid> | ||||
| <Grid container direction="row" justifyContent="space-between" alignItems="center"> | <Grid container direction="row" justifyContent="space-between" alignItems="center"> | ||||
| {getDisplayField("Reminder 3", dnData?.expectReminder3 ? DateUtils.dateStr(dnData.expectReminder3):"--")} | |||||
| {getDisplayField("Reminder 3", dnData?.expectReminder3 ? DateUtils.dateValue(dnData.expectReminder3):"--")} | |||||
| {getDisplayField("Reminder 3", dnData?.reminder3 ? DateUtils.datetimeStr(dnData.reminder3) : "--")} | {getDisplayField("Reminder 3", dnData?.reminder3 ? DateUtils.datetimeStr(dnData.reminder3) : "--")} | ||||
| </Grid> | </Grid> | ||||
| <Grid container direction="row" justifyContent="space-between" alignItems="center"> | <Grid container direction="row" justifyContent="space-between" alignItems="center"> | ||||
| {getDisplayField("Reminder 4", dnData?.expectReminder4 ? DateUtils.dateStr(dnData.expectReminder4):"--")} | |||||
| {getDisplayField("Reminder 4", dnData?.expectReminder4 ? DateUtils.dateValue(dnData.expectReminder4):"--")} | |||||
| {getDisplayField("Reminder 4", dnData?.reminder4 ? DateUtils.datetimeStr(dnData.reminder4) : "--")} | {getDisplayField("Reminder 4", dnData?.reminder4 ? DateUtils.datetimeStr(dnData.reminder4) : "--")} | ||||
| </Grid> | </Grid> | ||||
| <Grid container direction="row" justifyContent="space-between" alignItems="center"> | <Grid container direction="row" justifyContent="space-between" alignItems="center"> | ||||
| {getDisplayField("Reminder Final", dnData?.expectReminderFinal ? DateUtils.dateStr(dnData.expectReminderFinal):"--")} | |||||
| {getDisplayField("Reminder Final", dnData?.expectReminderFinal ? DateUtils.dateValue(dnData.expectReminderFinal):"--")} | |||||
| {getDisplayField("Reminder Final", dnData?.reminderFinal ? DateUtils.datetimeStr(dnData.reminderFinal) : "--")} | {getDisplayField("Reminder Final", dnData?.reminderFinal ? DateUtils.datetimeStr(dnData.reminderFinal) : "--")} | ||||
| </Grid> | </Grid> | ||||
| @@ -49,7 +49,7 @@ const DemandNote_index = () => { | |||||
| url: `${DEMAND_NOTE_LOAD}/${params.id}`, | url: `${DEMAND_NOTE_LOAD}/${params.id}`, | ||||
| onSuccess: (response) => { | onSuccess: (response) => { | ||||
| response["issueDate"] = DateUtils.dateStr(response["issueDate"]); | |||||
| response["issueDate"] = DateUtils.dateValue(response["issueDate"]); | |||||
| response["sentDate"] = 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"]); | ||||
| @@ -233,8 +233,8 @@ export default function SearchDemandNote({ recordList, reloadFun, applySearch }) | |||||
| width: 300, | width: 300, | ||||
| renderCell: (params) => { | renderCell: (params) => { | ||||
| return (<table> | return (<table> | ||||
| <tr><td>Issue:</td><td>{DateUtils.dateStr(params?.row.issueDate)}</td></tr> | |||||
| <tr><td>Due:</td><td>{params?.value? DateUtils.dateStr(params?.value):"--"}</td></tr> | |||||
| <tr><td>Issue:</td><td>{DateUtils.dateValue(params?.row.issueDate)}</td></tr> | |||||
| <tr><td>Due:</td><td>{params?.value? DateUtils.dateValue(params?.value):"--"}</td></tr> | |||||
| <tr><td>Sent:</td><td>{params.row.sentDate ? <> {DateUtils.datetimeStr(params.row.sentDate)} - {params.row.sentBy} </>: <> To be sent</>}</td></tr> | <tr><td>Sent:</td><td>{params.row.sentDate ? <> {DateUtils.datetimeStr(params.row.sentDate)} - {params.row.sentBy} </>: <> To be sent</>}</td></tr> | ||||
| </table>); | </table>); | ||||
| } | } | ||||
| @@ -213,7 +213,7 @@ const SearchDemandNoteForm = ({ applySearch, orgComboData, searchCriteria, issue | |||||
| defaultValue={searchCriteria.dateFrom} | defaultValue={searchCriteria.dateFrom} | ||||
| InputProps={{ inputProps: { max: maxDate } }} | InputProps={{ inputProps: { max: maxDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMinDate(DateUtils.dateStr(newValue)); | |||||
| setMinDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| @@ -230,7 +230,7 @@ const SearchDemandNoteForm = ({ applySearch, orgComboData, searchCriteria, issue | |||||
| {...register("dateTo")} | {...register("dateTo")} | ||||
| InputProps={{ inputProps: { min: minDate } }} | InputProps={{ inputProps: { min: minDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMaxDate(DateUtils.dateStr(newValue)); | |||||
| setMaxDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| id="dateTo" | id="dateTo" | ||||
| type="date" | type="date" | ||||
| @@ -253,7 +253,7 @@ const SearchDemandNoteForm = ({ applySearch, orgComboData, searchCriteria, issue | |||||
| defaultValue={searchCriteria.dueDateFrom} | defaultValue={searchCriteria.dueDateFrom} | ||||
| InputProps={{ inputProps: { max: maxDueDate } }} | InputProps={{ inputProps: { max: maxDueDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMinDueDate(DateUtils.dateStr(newValue)); | |||||
| setMinDueDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| @@ -271,7 +271,7 @@ const SearchDemandNoteForm = ({ applySearch, orgComboData, searchCriteria, issue | |||||
| {...register("dueDateTo")} | {...register("dueDateTo")} | ||||
| InputProps={{ inputProps: { min: minDueDate } }} | InputProps={{ inputProps: { min: minDueDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMaxDueDate(DateUtils.dateStr(newValue)); | |||||
| setMaxDueDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| id="dueDateTo" | id="dueDateTo" | ||||
| type="date" | type="date" | ||||
| @@ -36,10 +36,10 @@ const UserSearchPage_Individual = () => { | |||||
| const [orgCombo, setOrgCombo] = 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()), | |||||
| dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate() - 14)), | |||||
| dueDateTo: DateUtils.dateStr(new Date()), | |||||
| dueDateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate() - 14)), | |||||
| dateTo: DateUtils.dateValue(new Date()), | |||||
| dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate() - 14)), | |||||
| dueDateTo: DateUtils.dateValue(new Date()), | |||||
| dueDateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate() - 14)), | |||||
| }); | }); | ||||
| const [onReady, setOnReady] = React.useState(false); | const [onReady, setOnReady] = React.useState(false); | ||||
| @@ -52,7 +52,7 @@ export default function SearchDemandNote({ recordList }) { | |||||
| width: isMdOrLg ? 'auto' : 175, | width: isMdOrLg ? 'auto' : 175, | ||||
| flex: isMdOrLg ? 1 : undefined, | flex: isMdOrLg ? 1 : undefined, | ||||
| valueGetter: (params) => { | valueGetter: (params) => { | ||||
| return DateUtils.dateStr(params?.value); | |||||
| return DateUtils.dateValue(params?.value); | |||||
| } | } | ||||
| }, | }, | ||||
| { | { | ||||
| @@ -36,8 +36,8 @@ const UserSearchPage_Individual = () => { | |||||
| const [orgCombo, setOrgCombo] = 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()), | |||||
| dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate() - 14)), | |||||
| dateTo: DateUtils.dateValue(new Date()), | |||||
| dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate() - 14)), | |||||
| }); | }); | ||||
| const [onReady, setOnReady] = React.useState(false); | const [onReady, setOnReady] = React.useState(false); | ||||
| @@ -78,7 +78,7 @@ const SearchPublicNoticeForm = ({ applySearch, generateXML, searchCriteria }) => | |||||
| max: maxDate, | max: maxDate, | ||||
| } }} | } }} | ||||
| // onChange={(newValue) => { | // onChange={(newValue) => { | ||||
| // setMinDate(DateUtils.dateStr(newValue)); | |||||
| // setMinDate(DateUtils.dateValue(newValue)); | |||||
| // }} | // }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| @@ -95,7 +95,7 @@ const SearchPublicNoticeForm = ({ applySearch, generateXML, searchCriteria }) => | |||||
| {...register("dateTo")} | {...register("dateTo")} | ||||
| InputProps={{ inputProps: { min: minDate } }} | InputProps={{ inputProps: { min: minDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMaxDate(DateUtils.dateStr(newValue)); | |||||
| setMaxDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| id="dateTo" | id="dateTo" | ||||
| type="date" | type="date" | ||||
| @@ -32,8 +32,8 @@ const Index = () => { | |||||
| const [record,setRecord] = React.useState([]); | const [record,setRecord] = React.useState([]); | ||||
| const [searchCriteria, setSearchCriteria] = React.useState({ | const [searchCriteria, setSearchCriteria] = React.useState({ | ||||
| dateFrom: DateUtils.dateStr(new Date()), | |||||
| // dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate()-14)), | |||||
| dateFrom: DateUtils.dateValue(new Date()), | |||||
| // dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), | |||||
| }); | }); | ||||
| const [onReady, setOnReady] = React.useState(false); | const [onReady, setOnReady] = React.useState(false); | ||||
| @@ -98,7 +98,7 @@ const SearchGazetteIssueForm = ({ applyExport, comboData, waitDownload}) => { | |||||
| {...register("dateTo")} | {...register("dateTo")} | ||||
| InputProps={{ inputProps: { min: minDate } }} | InputProps={{ inputProps: { min: minDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMaxDate(DateUtils.dateStr(newValue)); | |||||
| setMaxDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| id="dateTo" | id="dateTo" | ||||
| type="date" | type="date" | ||||
| @@ -96,7 +96,7 @@ const SearchGazetteIssueForm = ({ applySearch, comboData}) => { | |||||
| {...register("dateTo")} | {...register("dateTo")} | ||||
| InputProps={{ inputProps: { min: minDate } }} | InputProps={{ inputProps: { min: minDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMaxDate(DateUtils.dateStr(newValue)); | |||||
| setMaxDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| id="dateTo" | id="dateTo" | ||||
| type="date" | type="date" | ||||
| @@ -44,12 +44,12 @@ const Index = () => { | |||||
| // const navigate = useNavigate() | // const navigate = useNavigate() | ||||
| const [searchCriteria, setSearchCriteria] = React.useState({ | const [searchCriteria, setSearchCriteria] = React.useState({ | ||||
| year: dateStr_Year(new Date()), | year: dateStr_Year(new Date()), | ||||
| // dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate()-14)), | |||||
| // dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), | |||||
| }); | }); | ||||
| const [exportCriteria, setExportCriteria] = React.useState({ | const [exportCriteria, setExportCriteria] = React.useState({ | ||||
| // year: dateStr_Year(new Date()), | // year: dateStr_Year(new Date()), | ||||
| // dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate()-14)), | |||||
| // dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), | |||||
| }); | }); | ||||
| const [attachments, setAttachments] = React.useState([]); | const [attachments, setAttachments] = React.useState([]); | ||||
| @@ -96,7 +96,7 @@ const SearchHolidayForm = ({ applySearch, comboData}) => { | |||||
| {...register("dateTo")} | {...register("dateTo")} | ||||
| InputProps={{ inputProps: { min: minDate } }} | InputProps={{ inputProps: { min: minDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMaxDate(DateUtils.dateStr(newValue)); | |||||
| setMaxDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| id="dateTo" | id="dateTo" | ||||
| type="date" | type="date" | ||||
| @@ -44,7 +44,7 @@ const Index = () => { | |||||
| // const navigate = useNavigate() | // const navigate = useNavigate() | ||||
| const [searchCriteria, setSearchCriteria] = React.useState({ | const [searchCriteria, setSearchCriteria] = React.useState({ | ||||
| year: dateStr_Year(new Date()), | year: dateStr_Year(new Date()), | ||||
| // dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate()-14)), | |||||
| // dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), | |||||
| }); | }); | ||||
| const [attachments, setAttachments] = React.useState([]); | const [attachments, setAttachments] = React.useState([]); | ||||
| const [waitImport, setWaitImport] = React.useState(false); | const [waitImport, setWaitImport] = React.useState(false); | ||||
| @@ -99,7 +99,7 @@ const SearchForm = ({ applySearch, searchCriteria }) => { | |||||
| defaultValue={searchCriteria.dateFrom} | defaultValue={searchCriteria.dateFrom} | ||||
| InputProps={{ inputProps: { max: maxDate } }} | InputProps={{ inputProps: { max: maxDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMinDate(DateUtils.dateStr(newValue)); | |||||
| setMinDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| @@ -120,7 +120,7 @@ const SearchForm = ({ applySearch, searchCriteria }) => { | |||||
| {...register("dateTo")} | {...register("dateTo")} | ||||
| InputProps={{ inputProps: { min: minDate } }} | InputProps={{ inputProps: { min: minDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMaxDate(DateUtils.dateStr(newValue)); | |||||
| setMaxDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| aria-label={intl.formatMessage({id: 'dateTo'})} | aria-label={intl.formatMessage({id: 'dateTo'})} | ||||
| id="dateTo" | id="dateTo" | ||||
| @@ -33,8 +33,8 @@ const Index = () => { | |||||
| const [record,setRecord] = React.useState([]); | const [record,setRecord] = React.useState([]); | ||||
| const [searchCriteria, setSearchCriteria] = React.useState({ | const [searchCriteria, setSearchCriteria] = React.useState({ | ||||
| dateTo: DateUtils.dateStr(new Date()), | |||||
| dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate()-14)), | |||||
| dateTo: DateUtils.dateValue(new Date()), | |||||
| dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), | |||||
| }); | }); | ||||
| const [onReady, setOnReady] = React.useState(false); | const [onReady, setOnReady] = React.useState(false); | ||||
| @@ -342,7 +342,7 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||||
| id="brExpiryDate" | id="brExpiryDate" | ||||
| name="brExpiryDate" | name="brExpiryDate" | ||||
| type="date" | type="date" | ||||
| inputProps={{ min: DateUtils.dateStr(new Date()) }} | |||||
| inputProps={{ min: DateUtils.dateValue(new Date()) }} | |||||
| error={Boolean(formik.errors["brExpiryDate"])} | error={Boolean(formik.errors["brExpiryDate"])} | ||||
| helperText={formik.errors["brExpiryDate"] ? formik.errors["brExpiryDate"] : ''} | helperText={formik.errors["brExpiryDate"] ? formik.errors["brExpiryDate"] : ''} | ||||
| onChange={formik.handleChange} | onChange={formik.handleChange} | ||||
| @@ -84,7 +84,7 @@ const OrganizationDetailPage = () => { | |||||
| response.data["faxNumber"] = response.data.faxNo?.faxNumber; | response.data["faxNumber"] = response.data.faxNo?.faxNumber; | ||||
| response.data["fax_countryCode"] = response.data.faxNo?.countryCode; | response.data["fax_countryCode"] = response.data.faxNo?.countryCode; | ||||
| response.data["brExpiryDate"] = response.data.brExpiryDate ? DateUtils.dateStr(response.data.brExpiryDate) : ""; | |||||
| response.data["brExpiryDate"] = response.data.brExpiryDate ? DateUtils.dateValue(response.data.brExpiryDate) : ""; | |||||
| setFormData(response.data) | setFormData(response.data) | ||||
| setList(response.historyList) | setList(response.historyList) | ||||
| } | } | ||||
| @@ -109,7 +109,7 @@ const OrganizationDetailPage = () => { | |||||
| response.data["faxNumber"] = response.data.faxNo?.faxNumber; | response.data["faxNumber"] = response.data.faxNo?.faxNumber; | ||||
| response.data["fax_countryCode"] = response.data.faxNo?.countryCode; | response.data["fax_countryCode"] = response.data.faxNo?.countryCode; | ||||
| response.data["brExpiryDate"] = response.data.brExpiryDate ? DateUtils.dateStr(response.data.brExpiryDate) : ""; | |||||
| response.data["brExpiryDate"] = response.data.brExpiryDate ? DateUtils.dateValue(response.data.brExpiryDate) : ""; | |||||
| setFormData(response.data) | setFormData(response.data) | ||||
| setList(response.historyList) | setList(response.historyList) | ||||
| } | } | ||||
| @@ -212,7 +212,7 @@ const OrganizationCard_loadFromUser = ({ userData, userId }) => { | |||||
| id="brExpiryDate" | id="brExpiryDate" | ||||
| name="brExpiryDate" | name="brExpiryDate" | ||||
| type="date" | type="date" | ||||
| inputProps={{ min: DateUtils.dateStr(new Date()) }} | |||||
| inputProps={{ min: DateUtils.dateValue(new Date()) }} | |||||
| error={Boolean(formik.errors["brExpiryDate"])} | error={Boolean(formik.errors["brExpiryDate"])} | ||||
| helperText={formik.errors["brExpiryDate"] ? formik.errors["brExpiryDate"] : ''} | helperText={formik.errors["brExpiryDate"] ? formik.errors["brExpiryDate"] : ''} | ||||
| onChange={formik.handleChange} | onChange={formik.handleChange} | ||||
| @@ -58,7 +58,7 @@ const OrganizationDetailPage_FromUser = () => { | |||||
| response.data["faxNumber"] = response.data.faxNo?.faxNumber; | response.data["faxNumber"] = response.data.faxNo?.faxNumber; | ||||
| response.data["fax_countryCode"] = response.data.faxNo?.countryCode; | response.data["fax_countryCode"] = response.data.faxNo?.countryCode; | ||||
| response.data["brExpiryDate"] = response.data.brExpiryDate?DateUtils.dateStr(response.data.brExpiryDate): ""; | |||||
| response.data["brExpiryDate"] = response.data.brExpiryDate?DateUtils.dateValue(response.data.brExpiryDate): ""; | |||||
| setFormData(response.data) | setFormData(response.data) | ||||
| } | } | ||||
| }); | }); | ||||
| @@ -79,7 +79,7 @@ export default function OrganizationTable({ recordList }) { | |||||
| headerName: 'BR Expiry Date', | headerName: 'BR Expiry Date', | ||||
| flex: 1, | flex: 1, | ||||
| valueGetter: (params) => { | valueGetter: (params) => { | ||||
| return DateUtils.dateStr(params?.value); | |||||
| return DateUtils.dateValue(params?.value); | |||||
| } | } | ||||
| }, | }, | ||||
| { | { | ||||
| @@ -43,11 +43,11 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||||
| flex: 1, | flex: 1, | ||||
| renderCell: (params) => { | renderCell: (params) => { | ||||
| let appNo = params.row.appNo; | let appNo = params.row.appNo; | ||||
| // console.log(params) | |||||
| console.log(params.row) | |||||
| return <div style={{ margin: 4, textAlign:"left"}}>Gazette Supplement No. 6 <br/> | return <div style={{ margin: 4, textAlign:"left"}}>Gazette Supplement No. 6 <br/> | ||||
| {isORGLoggedIn()?<>Care Of: {params.row.careOf}<br /></>:null} | {isORGLoggedIn()?<>Care Of: {params.row.careOf}<br /></>:null} | ||||
| App No: {appNo}<br/> | App No: {appNo}<br/> | ||||
| Issue Date: {DateUtils.dateStr(params.row.issueDate)}<br/> | |||||
| Issue Date: {DateUtils.dateValue(params.row.issueDate)}<br/> | |||||
| Length: {params.row.length+ " cm"}</div> | Length: {params.row.length+ " cm"}</div> | ||||
| }, | }, | ||||
| }, | }, | ||||
| @@ -74,7 +74,7 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||||
| <FormattedMessage id="gazetteSampleName"/><br/> | <FormattedMessage id="gazetteSampleName"/><br/> | ||||
| {isORGLoggedIn()?<><FormattedMessage id="careOf"/>: {params.row.careOf}<br /></>:null} | {isORGLoggedIn()?<><FormattedMessage id="careOf"/>: {params.row.careOf}<br /></>:null} | ||||
| <FormattedMessage id="applicationId"/>: {appNo}<br/> | <FormattedMessage id="applicationId"/>: {appNo}<br/> | ||||
| <FormattedMessage id="gazetteDate"/>: {locale === 'en' ? DateUtils.dateStr(params.row.issueDate) : DateUtils.dateStr_Cht(params.row.issueDate)}<br/> | |||||
| <FormattedMessage id="gazetteDate"/>: {locale === 'en' ? DateUtils.dateValue(params.row.issueDate) : DateUtils.dateStr_Cht(params.row.issueDate)}<br/> | |||||
| <FormattedMessage id="gazetteLength"/>: {params.row.length+ " cm"}</div> | <FormattedMessage id="gazetteLength"/>: {params.row.length+ " cm"}</div> | ||||
| }, | }, | ||||
| }, | }, | ||||
| @@ -62,7 +62,7 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||||
| headerName: 'Transaction Date', | headerName: 'Transaction Date', | ||||
| flex: 1, | flex: 1, | ||||
| valueGetter: (params) => { | valueGetter: (params) => { | ||||
| return DateUtils.dateStr(params?.value); | |||||
| return DateUtils.dateValue(params?.value); | |||||
| } | } | ||||
| }, | }, | ||||
| { | { | ||||
| @@ -83,7 +83,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||||
| defaultValue={searchCriteria.dateFrom} | defaultValue={searchCriteria.dateFrom} | ||||
| InputProps={{ inputProps: { max: maxDate } }} | InputProps={{ inputProps: { max: maxDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMinDate(DateUtils.dateStr(newValue)); | |||||
| setMinDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| @@ -99,7 +99,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||||
| {...register("dateTo")} | {...register("dateTo")} | ||||
| InputProps={{ inputProps: { min: minDate } }} | InputProps={{ inputProps: { min: minDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMaxDate(DateUtils.dateStr(newValue)); | |||||
| setMaxDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| id="dateTo" | id="dateTo" | ||||
| type="date" | type="date" | ||||
| @@ -32,8 +32,8 @@ const Index = () => { | |||||
| const [record,setRecord] = React.useState([]); | const [record,setRecord] = React.useState([]); | ||||
| const [searchCriteria, setSearchCriteria] = React.useState({ | const [searchCriteria, setSearchCriteria] = React.useState({ | ||||
| dateTo: DateUtils.dateStr(new Date()), | |||||
| dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate()-14)), | |||||
| dateTo: DateUtils.dateValue(new Date()), | |||||
| dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), | |||||
| }); | }); | ||||
| const [onReady, setOnReady] = React.useState(false); | const [onReady, setOnReady] = React.useState(false); | ||||
| @@ -74,7 +74,7 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||||
| width: isMdOrLg ? 'auto' : 160, | width: isMdOrLg ? 'auto' : 160, | ||||
| flex: isMdOrLg ? 1 : undefined, | flex: isMdOrLg ? 1 : undefined, | ||||
| valueGetter: (params) => { | valueGetter: (params) => { | ||||
| return DateUtils.dateStr(params?.value); | |||||
| return DateUtils.dateValue(params?.value); | |||||
| } | } | ||||
| }, | }, | ||||
| { | { | ||||
| @@ -102,7 +102,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||||
| defaultValue={searchCriteria.dateFrom} | defaultValue={searchCriteria.dateFrom} | ||||
| InputProps={{ inputProps: { max: maxDate } }} | InputProps={{ inputProps: { max: maxDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMinDate(DateUtils.dateStr(newValue)); | |||||
| setMinDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| @@ -119,7 +119,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||||
| {...register("dateTo")} | {...register("dateTo")} | ||||
| InputProps={{ inputProps: { min: minDate } }} | InputProps={{ inputProps: { min: minDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMaxDate(DateUtils.dateStr(newValue)); | |||||
| setMaxDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| id="dateTo" | id="dateTo" | ||||
| type="date" | type="date" | ||||
| @@ -33,8 +33,8 @@ const Index = () => { | |||||
| const [record,setRecord] = React.useState([]); | const [record,setRecord] = React.useState([]); | ||||
| const [searchCriteria, setSearchCriteria] = React.useState({ | const [searchCriteria, setSearchCriteria] = React.useState({ | ||||
| dateTo: DateUtils.dateStr(new Date()), | |||||
| dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate()-14)), | |||||
| dateTo: DateUtils.dateValue(new Date()), | |||||
| dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), | |||||
| }); | }); | ||||
| const [onReady, setOnReady] = React.useState(false); | const [onReady, setOnReady] = React.useState(false); | ||||
| @@ -55,7 +55,7 @@ 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.issueVolume + "/" + responseData.data.issueYear + " No. " + responseData.data.issueNo | responseData.data["issueNoStr"] = responseData.data.issueVolume + "/" + responseData.data.issueYear + " No. " + responseData.data.issueNo | ||||
| responseData.data["issueDate"] = DateUtils.dateStr(responseData.data.issueDate); | |||||
| responseData.data["issueDate"] = DateUtils.dateValue(responseData.data.issueDate); | |||||
| responseData.data["groupType"] = responseData.data.groupTitle; | responseData.data["groupType"] = responseData.data.groupTitle; | ||||
| @@ -154,7 +154,7 @@ const FormPanel = ({ formData }) => { | |||||
| <FormattedMessage id="proofReplyDate" /> : | <FormattedMessage id="proofReplyDate" /> : | ||||
| { | { | ||||
| locale === 'en' ? | locale === 'en' ? | ||||
| DateUtils.dateStr(formik.values.replyDate) | |||||
| DateUtils.dateValue(formik.values.replyDate) | |||||
| : | : | ||||
| DateUtils.datetimeStr_Cht(formik.values.replyDate) | DateUtils.datetimeStr_Cht(formik.values.replyDate) | ||||
| } | } | ||||
| @@ -210,7 +210,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
| defaultValue={searchCriteria.dateFrom} | defaultValue={searchCriteria.dateFrom} | ||||
| InputProps={{ inputProps: { max: maxDate } }} | InputProps={{ inputProps: { max: maxDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMinDate(DateUtils.dateStr(newValue)); | |||||
| setMinDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| @@ -227,7 +227,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
| {...register("dateTo")} | {...register("dateTo")} | ||||
| InputProps={{ inputProps: { min: minDate } }} | InputProps={{ inputProps: { min: minDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMaxDate(DateUtils.dateStr(newValue)); | |||||
| setMaxDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| id="dateTo" | id="dateTo" | ||||
| type="date" | type="date" | ||||
| @@ -34,8 +34,8 @@ const UserSearchPage_Individual = () => { | |||||
| const [orgCombo, setOrgCombo] = 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()), | |||||
| dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate() - 14)), | |||||
| dateTo: DateUtils.dateValue(new Date()), | |||||
| dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate() - 14)), | |||||
| }); | }); | ||||
| const [onReady, setOnReady] = React.useState(false); | const [onReady, setOnReady] = React.useState(false); | ||||
| @@ -212,7 +212,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, issueComboData | |||||
| defaultValue={searchCriteria.dateFrom} | defaultValue={searchCriteria.dateFrom} | ||||
| InputProps={{ inputProps: { max: maxDate } }} | InputProps={{ inputProps: { max: maxDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMinDate(DateUtils.dateStr(newValue)); | |||||
| setMinDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| @@ -229,7 +229,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, issueComboData | |||||
| {...register("dateTo")} | {...register("dateTo")} | ||||
| InputProps={{ inputProps: { min: minDate } }} | InputProps={{ inputProps: { min: minDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMaxDate(DateUtils.dateStr(newValue)); | |||||
| setMaxDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| id="dateTo" | id="dateTo" | ||||
| type="date" | type="date" | ||||
| @@ -34,8 +34,8 @@ const UserSearchPage_Individual = () => { | |||||
| const [record,setRecord] = React.useState([]); | const [record,setRecord] = 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()), | |||||
| dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate()-14)), | |||||
| dateTo: DateUtils.dateValue(new Date()), | |||||
| dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), | |||||
| }); | }); | ||||
| const [onReady, setOnReady] = React.useState(false); | const [onReady, setOnReady] = React.useState(false); | ||||
| @@ -50,7 +50,9 @@ const ClientDetailCard = ( | |||||
| //if user data from parent are not null | //if user data from parent are not null | ||||
| if (Object.keys(applicationDetailData).length > 0 && applicationDetailData !== undefined) { | if (Object.keys(applicationDetailData).length > 0 && applicationDetailData !== undefined) { | ||||
| setCurrentApplicationDetailData(applicationDetailData.userData); | setCurrentApplicationDetailData(applicationDetailData.userData); | ||||
| setOrgDetailData(applicationDetailData.orgDetail.data); | |||||
| if (!applicationDetailData.orgDetail == null){ | |||||
| setOrgDetailData(applicationDetailData.orgDetail.data); | |||||
| } | |||||
| if (!applicationDetailData.companyName1 == null) { | if (!applicationDetailData.companyName1 == null) { | ||||
| setCompanyName(applicationDetailData.companyName); | setCompanyName(applicationDetailData.companyName); | ||||
| } else { | } else { | ||||
| @@ -67,15 +69,17 @@ const ClientDetailCard = ( | |||||
| //if state data are ready and assign to different field | //if state data are ready and assign to different field | ||||
| // console.log(currentApplicationDetailData) | // console.log(currentApplicationDetailData) | ||||
| if (Object.keys(currentApplicationDetailData).length > 0) { | if (Object.keys(currentApplicationDetailData).length > 0) { | ||||
| if(currentApplicationDetailData.orgId>0 && currentApplicationDetailData.orgId !=undefined && currentApplicationDetailData.orgId!=null){ | |||||
| if( currentApplicationDetailData.orgId!=null){ | |||||
| if (Object.keys(orgDetailData).length > 0) { | if (Object.keys(orgDetailData).length > 0) { | ||||
| setBrExpiryDate(DateUtils.dateStr(orgDetailData.brExpiryDate)); | |||||
| setBrExpiryDate(DateUtils.dateValue(orgDetailData.brExpiryDate)); | |||||
| setBrNo(orgDetailData.brNo); | setBrNo(orgDetailData.brNo); | ||||
| setOnReady(true); | setOnReady(true); | ||||
| }else{ | |||||
| setBrExpiryDate(DateUtils.dateValue(currentApplicationDetailData.brExpiryDate)); | |||||
| setBrNo(currentApplicationDetailData.brNo); | |||||
| setOnReady(true); | |||||
| } | } | ||||
| }else{ | }else{ | ||||
| setBrExpiryDate(DateUtils.dateStr(currentApplicationDetailData.brExpiryDate)); | |||||
| setBrNo(currentApplicationDetailData.brNo); | |||||
| setOnReady(true); | setOnReady(true); | ||||
| } | } | ||||
| } | } | ||||
| @@ -91,6 +95,7 @@ const ClientDetailCard = ( | |||||
| alert("The BR is expired.") | alert("The BR is expired.") | ||||
| } else { | } else { | ||||
| var timeDiff = Math.abs(currentDate.getTime()-targetDate.getTime()); | var timeDiff = Math.abs(currentDate.getTime()-targetDate.getTime()); | ||||
| console.log(timeDiff) | |||||
| var diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24)); | var diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24)); | ||||
| console.log(diffDays) | console.log(diffDays) | ||||
| if (diffDays <= 7&&diffDays > 0){ | if (diffDays <= 7&&diffDays > 0){ | ||||
| @@ -96,7 +96,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||||
| defaultValue={searchCriteria.dateFrom} | defaultValue={searchCriteria.dateFrom} | ||||
| InputProps={{ inputProps: { max: maxDate } }} | InputProps={{ inputProps: { max: maxDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMinDate(DateUtils.dateStr(newValue)); | |||||
| setMinDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| @@ -119,7 +119,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||||
| defaultValue={searchCriteria.dateTo} | defaultValue={searchCriteria.dateTo} | ||||
| InputProps={{ inputProps: { min: minDate } }} | InputProps={{ inputProps: { min: minDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMaxDate(DateUtils.dateStr(newValue)); | |||||
| setMaxDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| @@ -18,8 +18,8 @@ const UserSearchPage_Individual = () => { | |||||
| const [record,setRecord] = React.useState([]); | const [record,setRecord] = React.useState([]); | ||||
| const [searchCriteria, setSearchCriteria] = React.useState({ | const [searchCriteria, setSearchCriteria] = React.useState({ | ||||
| dateTo: DateUtils.dateStr(new Date()), | |||||
| dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate()-14)), | |||||
| dateTo: DateUtils.dateValue(new Date()), | |||||
| dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), | |||||
| }); | }); | ||||
| React.useEffect(() => { | React.useEffect(() => { | ||||
| @@ -144,7 +144,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
| defaultValue={searchCriteria.dateFrom} | defaultValue={searchCriteria.dateFrom} | ||||
| InputProps={{ inputProps: { max: maxDate } }} | InputProps={{ inputProps: { max: maxDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMinDate(DateUtils.dateStr(newValue)); | |||||
| setMinDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| @@ -161,7 +161,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
| {...register("dateTo")} | {...register("dateTo")} | ||||
| InputProps={{ inputProps: { min: minDate } }} | InputProps={{ inputProps: { min: minDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMaxDate(DateUtils.dateStr(newValue)); | |||||
| setMaxDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| id="dateTo" | id="dateTo" | ||||
| type="date" | type="date" | ||||
| @@ -34,8 +34,8 @@ const UserSearchPage_Individual = () => { | |||||
| const [orgCombo, setOrgCombo] = 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()), | |||||
| dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate() - 14)), | |||||
| dateTo: DateUtils.dateValue(new Date()), | |||||
| dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate() - 14)), | |||||
| }); | }); | ||||
| const [onReady, setOnReady] = React.useState(false); | const [onReady, setOnReady] = React.useState(false); | ||||
| @@ -188,7 +188,7 @@ const SearchPublicNoticeForm = ({ applySearch, generateReport, searchCriteria, o | |||||
| ////defaultValue={searchCriteria.dateFrom} | ////defaultValue={searchCriteria.dateFrom} | ||||
| InputProps={{ inputProps: { max: sysTxnMaxDate } }} | InputProps={{ inputProps: { max: sysTxnMaxDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setSysTxnMinDate(DateUtils.dateStr(newValue)); | |||||
| setSysTxnMinDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| @@ -204,7 +204,7 @@ const SearchPublicNoticeForm = ({ applySearch, generateReport, searchCriteria, o | |||||
| {...register("sysTxnDateTo")} | {...register("sysTxnDateTo")} | ||||
| InputProps={{ inputProps: { min: sysTxnMinDate } }} | InputProps={{ inputProps: { min: sysTxnMinDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setsysTxnMaxDate(DateUtils.dateStr(newValue)); | |||||
| setsysTxnMaxDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| id="sysTxnDateTo" | id="sysTxnDateTo" | ||||
| type="date" | type="date" | ||||
| @@ -230,7 +230,7 @@ const SearchPublicNoticeForm = ({ applySearch, generateReport, searchCriteria, o | |||||
| //defaultValue={searchCriteria.dateFrom} | //defaultValue={searchCriteria.dateFrom} | ||||
| InputProps={{ inputProps: { max: txnMaxDate } }} | InputProps={{ inputProps: { max: txnMaxDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setTxnMaxDate(DateUtils.dateStr(newValue)); | |||||
| setTxnMaxDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| @@ -246,7 +246,7 @@ const SearchPublicNoticeForm = ({ applySearch, generateReport, searchCriteria, o | |||||
| {...register("txnDateTo")} | {...register("txnDateTo")} | ||||
| InputProps={{ inputProps: { min: txnMinDate } }} | InputProps={{ inputProps: { min: txnMinDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setTxnMinDate(DateUtils.dateStr(newValue)); | |||||
| setTxnMinDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| id="txnDateTo" | id="txnDateTo" | ||||
| type="date" | type="date" | ||||
| @@ -272,7 +272,7 @@ const SearchPublicNoticeForm = ({ applySearch, generateReport, searchCriteria, o | |||||
| //defaultValue={searchCriteria.dateFrom} | //defaultValue={searchCriteria.dateFrom} | ||||
| InputProps={{ inputProps: { max: collMaxDate } }} | InputProps={{ inputProps: { max: collMaxDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setCollMinDate(DateUtils.dateStr(newValue)); | |||||
| setCollMinDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| @@ -288,7 +288,7 @@ const SearchPublicNoticeForm = ({ applySearch, generateReport, searchCriteria, o | |||||
| {...register("collDateTo")} | {...register("collDateTo")} | ||||
| InputProps={{ inputProps: { min: collMinDate } }} | InputProps={{ inputProps: { min: collMinDate } }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setCollMaxDate(DateUtils.dateStr(newValue)); | |||||
| setCollMaxDate(DateUtils.dateValue(newValue)); | |||||
| }} | }} | ||||
| id="collDateTo" | id="collDateTo" | ||||
| type="date" | type="date" | ||||
| @@ -33,8 +33,8 @@ const Index = () => { | |||||
| // const [record,setRecord] = React.useState([]); | // const [record,setRecord] = React.useState([]); | ||||
| const [searchCriteria, setSearchCriteria] = React.useState({ | const [searchCriteria, setSearchCriteria] = React.useState({ | ||||
| // dateTo: DateUtils.dateStr(new Date()), | |||||
| // dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate()-14)), | |||||
| // dateTo: DateUtils.dateValue(new Date()), | |||||
| // dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), | |||||
| }); | }); | ||||
| const [onReady] = React.useState(true); | const [onReady] = React.useState(true); | ||||
| const [onDownload, setOnDownload] = React.useState(false); | const [onDownload, setOnDownload] = React.useState(false); | ||||
| @@ -113,7 +113,7 @@ const UserMaintainPage_Organization = () => { | |||||
| response.data["contactTel"] = response.orgDetail.data["contactTel"]; | response.data["contactTel"] = response.orgDetail.data["contactTel"]; | ||||
| response.data["faxNo"] = response.orgDetail.data["faxNo"]; | response.data["faxNo"] = response.orgDetail.data["faxNo"]; | ||||
| response.data["brExpiryDate"] = response.orgDetail.data.brExpiryDate ? DateUtils.dateStr(response.orgDetail.data.brExpiryDate) : ""; | |||||
| response.data["brExpiryDate"] = response.orgDetail.data.brExpiryDate ? DateUtils.dateValue(response.orgDetail.data.brExpiryDate) : ""; | |||||
| response.data["brNo"] = response.orgDetail.data.brNo; | response.data["brNo"] = response.orgDetail.data.brNo; | ||||
| response.data["enCompanyName"] = response.orgDetail.data.enCompanyName; | response.data["enCompanyName"] = response.orgDetail.data.enCompanyName; | ||||
| response.data["chCompanyName"] = response.orgDetail.data.chCompanyName; | response.data["chCompanyName"] = response.orgDetail.data.chCompanyName; | ||||
| @@ -123,7 +123,7 @@ const UserMaintainPage_Organization = () => { | |||||
| response.data["addressBus"] = JSON.parse(response.data["addressBus"]); | response.data["addressBus"] = JSON.parse(response.data["addressBus"]); | ||||
| response.data["contactTel"] = JSON.parse(response.data["contactTel"]); | response.data["contactTel"] = JSON.parse(response.data["contactTel"]); | ||||
| response.data["faxNo"] = JSON.parse(response.data["faxNo"]); | response.data["faxNo"] = JSON.parse(response.data["faxNo"]); | ||||
| response.data["brExpiryDate"] = response.data.brExpiryDate ? DateUtils.dateStr(response.data.brExpiryDate) : ""; | |||||
| response.data["brExpiryDate"] = response.data.brExpiryDate ? DateUtils.dateValue(response.data.brExpiryDate) : ""; | |||||
| } | } | ||||
| // console.log("2") | // console.log("2") | ||||
| // console.log(response.data) | // console.log(response.data) | ||||
| @@ -149,7 +149,7 @@ const UserMaintainPage_Organization = () => { | |||||
| // response.data["status"] = response.data?.locked?"locked":response.data?.status; | // response.data["status"] = response.data?.locked?"locked":response.data?.status; | ||||
| response.data["preferLocale"] = getObjectByType(ComboData.Locale, "type", response.data?.preferLocale); | response.data["preferLocale"] = getObjectByType(ComboData.Locale, "type", response.data?.preferLocale); | ||||
| //response.data["orgId"] = response.data.brExpiryDate?DateUtils.dateStr(response.data.brExpiryDate):""; | |||||
| //response.data["orgId"] = response.data.brExpiryDate?DateUtils.dateValue(response.data.brExpiryDate):""; | |||||
| // console.log("3") | // console.log("3") | ||||
| // console.log(response.data) | // console.log(response.data) | ||||
| @@ -174,7 +174,7 @@ const UserMaintainPage_Organization = () => { | |||||
| response.data["fax_countryCode"] = response.data.faxNo?.countryCode; | response.data["fax_countryCode"] = response.data.faxNo?.countryCode; | ||||
| response.data["preferLocale"] = getObjectByType(ComboData.Locale, "type", response.data?.preferLocale); | response.data["preferLocale"] = getObjectByType(ComboData.Locale, "type", response.data?.preferLocale); | ||||
| //response.data["orgId"] = response.data.brExpiryDate?DateUtils.dateStr(response.data.brExpiryDate):""; | |||||
| //response.data["orgId"] = response.data.brExpiryDate?DateUtils.dateValue(response.data.brExpiryDate):""; | |||||
| setUserData(response.data); | setUserData(response.data); | ||||
| setOrgData(response.orgList); | setOrgData(response.orgList); | ||||
| // console.log(response.data) | // console.log(response.data) | ||||
| @@ -33,7 +33,7 @@ const SearchDemandNoteForm = () => { | |||||
| list.push( | list.push( | ||||
| <Stack direction="column" > | <Stack direction="column" > | ||||
| <Typography variant='h4' align="justify"><b>{locale === 'en' ?item.subjectEng:locale === 'zh-HK' ?item.subjectCht:item.subjectChs}</b></Typography> | <Typography variant='h4' align="justify"><b>{locale === 'en' ?item.subjectEng:locale === 'zh-HK' ?item.subjectCht:item.subjectChs}</b></Typography> | ||||
| <Typography align="justify">{DateUtils.dateStr(item.announceDate)}</Typography> | |||||
| <Typography align="justify">{DateUtils.dateValue(item.announceDate)}</Typography> | |||||
| <Typography align="justify"sx={{ pt: 1 }}>{locale === 'en' ?item.contentEng:locale === 'zh-HK' ?item.contentCht:item.contentChs}</Typography> | <Typography align="justify"sx={{ pt: 1 }}>{locale === 'en' ?item.contentEng:locale === 'zh-HK' ?item.contentCht:item.contentChs}</Typography> | ||||
| <Divider fullWidth sx={{ pt: 1 }}></Divider> | <Divider fullWidth sx={{ pt: 1 }}></Divider> | ||||
| </Stack> | </Stack> | ||||