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