diff --git a/src/pages/Proof/Search_Public/DataGrid.js b/src/pages/Proof/Search_Public/DataGrid.js
index 7d8e7d5..c15f6a0 100644
--- a/src/pages/Proof/Search_Public/DataGrid.js
+++ b/src/pages/Proof/Search_Public/DataGrid.js
@@ -105,15 +105,15 @@ export default function SearchPublicNoticeTable({ recordList }) {
}
},
{
- id: 'returnBeforeDate',
- field: 'returnBeforeDate',
+ id: 'proofPaymentDeadline',
+ field: 'proofPaymentDeadline',
headerName: intl.formatMessage({id: 'replyBefore'}),
width: isMdOrLg ? 'auto' : 250,
flex: isMdOrLg ? 1.5 : undefined,
valueGetter: (params) => {
- let returnBeforeDate = DateUtils.convertToDate(params?.value);
- returnBeforeDate = returnBeforeDate.setHours(14, 0, 0, 0);
- return locale === 'en' ? DateUtils.datetimeStr(returnBeforeDate) : DateUtils.datetimeStr_Cht(returnBeforeDate);
+ let proofPaymentDeadline = DateUtils.convertToDate(params?.value);
+ proofPaymentDeadline = proofPaymentDeadline.setHours(14, 0, 0, 0);
+ return locale === 'en' ? DateUtils.datetimeStr(proofPaymentDeadline) : DateUtils.datetimeStr_Cht(proofPaymentDeadline);
}
},
{
diff --git a/src/pages/Proof/Search_Public/SearchForm.js b/src/pages/Proof/Search_Public/SearchForm.js
index 17bb7a7..15b9819 100644
--- a/src/pages/Proof/Search_Public/SearchForm.js
+++ b/src/pages/Proof/Search_Public/SearchForm.js
@@ -85,7 +85,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, issueComboData
function getIssueLabel(data) {
if (data == {}) return "";
- return data.year
+ return data.issueYear
+ " Vol. " + FormatUtils.zeroPad(data.volume, 3)
+ ", No. " + FormatUtils.zeroPad(data.issueNo, 2)
+ ", " + DateUtils.dateFormat(data.issueDate, "D MMM YYYY (ddd)");
diff --git a/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js b/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js
index 31a9b83..3e9d8c5 100644
--- a/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js
+++ b/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js
@@ -34,6 +34,7 @@ const PublicNoticeApplyForm = ({ loadedData, selections }) => {
const intl = useIntl();
const [val, setVal] = React.useState({});
+ const [reloadPage, setReloadPage] = React.useState(false);
const [issueId, setIssueId] = React.useState(loadedData.issueId);
const navigate = useNavigate();
@@ -126,7 +127,14 @@ const PublicNoticeApplyForm = ({ loadedData, selections }) => {
remarks: values.remarks ? values.remarks : "",
},
files: [attachment],
- onSuccess: function () {
+ onSuccess: function (responData) {
+ if(responData.msg){
+ setVal({});
+ setReloadPage(true);
+ setWarningText(intl.formatMessage({id: responData.msg}));
+ setIsWarningPopUp(true);
+ return;
+ }
notifyActionSuccess(intl.formatMessage({id: 'submissionSuccess'}) + '!')
navigate("/publicNotice");
// location.reload();
@@ -155,7 +163,7 @@ const PublicNoticeApplyForm = ({ loadedData, selections }) => {
return (
-
+
@@ -350,6 +358,9 @@ const PublicNoticeApplyForm = ({ loadedData, selections }) => {
setIsWarningPopUp(false);
}else{
setIsWarningPopUp(false);
+ if(reloadPage){
+ location.reload();
+ }
}
}}
>
diff --git a/src/pages/PublicNotice/ApplyForm/index.js b/src/pages/PublicNotice/ApplyForm/index.js
index a2195ce..405df4f 100644
--- a/src/pages/PublicNotice/ApplyForm/index.js
+++ b/src/pages/PublicNotice/ApplyForm/index.js
@@ -53,7 +53,7 @@ const ApplyForm = () => {
};
function getIssueLabel(data) {
- return data.year
+ return data.issueYear
+ " Vol. " + FormatUtils.zeroPad(data.volume, 3)
+ ", No. " + FormatUtils.zeroPad(data.issueNo, 2)
+ ", " + DateUtils.dateFormat(data.issueDate, "D MMM YYYY (ddd)");
@@ -65,7 +65,7 @@ const ApplyForm = () => {
return (
isLoading ?
-
+
diff --git a/src/pages/PublicNotice/Details_GLD/ApplicationDetailCard.js b/src/pages/PublicNotice/Details_GLD/ApplicationDetailCard.js
index 9b14856..0b8d7b6 100644
--- a/src/pages/PublicNotice/Details_GLD/ApplicationDetailCard.js
+++ b/src/pages/PublicNotice/Details_GLD/ApplicationDetailCard.js
@@ -75,9 +75,9 @@ const ApplicationDetailCard = (
const onDownloadClick = () => () => {
HttpUtils.fileDownload({
- fileId: fileDetail.id,
- skey: fileDetail.skey,
- filename: fileDetail.filename,
+ fileId: fileDetail?.id,
+ skey: fileDetail?.skey,
+ filename: fileDetail?.filename,
});
notifyDownloadSuccess()
setUploadStatus(true)
@@ -510,7 +510,7 @@ const ApplicationDetailCard = (
variant="h5"
sx={{ wordBreak: 'break-word' }}
>
- {fileDetail.filename}
+ {fileDetail?.filename}
@@ -519,6 +519,7 @@ const ApplicationDetailCard = (
size="small"
variant="contained"
onClick={onDownloadClick()}
+ disabled={!fileDetail?.filename}
sx={{
textTransform: 'capitalize',
alignItems: 'end',
diff --git a/src/pages/PublicNotice/Details_Public/ApplicationDetailCard.js b/src/pages/PublicNotice/Details_Public/ApplicationDetailCard.js
index 71a8ec2..69ccdc6 100644
--- a/src/pages/PublicNotice/Details_Public/ApplicationDetailCard.js
+++ b/src/pages/PublicNotice/Details_Public/ApplicationDetailCard.js
@@ -95,9 +95,9 @@ const ApplicationDetailCard = (
const onDownloadClick = () => () => {
HttpUtils.fileDownload({
- fileId: fileDetail.id,
- skey: fileDetail.skey,
- filename: fileDetail.filename,
+ fileId: fileDetail?.id,
+ skey: fileDetail?.skey,
+ filename: fileDetail?.filename,
});
};
@@ -537,7 +537,7 @@ const ApplicationDetailCard = (
id='fileName'
variant="pnspsFormParagraph"
>
- {fileDetail.filename}
+ {fileDetail?.filename}
}
>
diff --git a/src/pages/PublicNotice/ListPanel/index.js b/src/pages/PublicNotice/ListPanel/index.js
index d0092c5..7976dd5 100644
--- a/src/pages/PublicNotice/ListPanel/index.js
+++ b/src/pages/PublicNotice/ListPanel/index.js
@@ -102,13 +102,13 @@ const PublicNotice = () => {
return (
isLoading ?
-
+
:
-
+
diff --git a/src/pages/PublicNotice/Search_GLD/SearchForm.js b/src/pages/PublicNotice/Search_GLD/SearchForm.js
index 42579fd..a55750d 100644
--- a/src/pages/PublicNotice/Search_GLD/SearchForm.js
+++ b/src/pages/PublicNotice/Search_GLD/SearchForm.js
@@ -77,7 +77,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss
function getIssueLabel(data) {
if (data == {}) return "";
- return data.year
+ return data.issueYear
+ " Vol. " + FormatUtils.zeroPad(data.volume, 3)
+ ", No. " + FormatUtils.zeroPad(data.issueNo, 2)
+ ", " + DateUtils.dateFormat(data.issueDate, "D MMM YYYY (ddd)");
diff --git a/src/pages/PublicNotice/Search_GLD/index.js b/src/pages/PublicNotice/Search_GLD/index.js
index 0913814..0dc3730 100644
--- a/src/pages/PublicNotice/Search_GLD/index.js
+++ b/src/pages/PublicNotice/Search_GLD/index.js
@@ -90,13 +90,13 @@ const UserSearchPage_Individual = () => {
return (
!onReady ?
-
+
:
-
+
diff --git a/src/pages/Setting/DrImport/index.js b/src/pages/Setting/DrImport/index.js
new file mode 100644
index 0000000..cbbc3bf
--- /dev/null
+++ b/src/pages/Setting/DrImport/index.js
@@ -0,0 +1,204 @@
+
+import * as React from "react";
+import * as HttpUtils from "utils/HttpUtils";
+import * as DateUtils from "utils/DateUtils";
+import * as UrlUtils from "utils/ApiPathConst";
+
+import {
+ Grid, Typography, Button,
+ Stack, Box,
+ Dialog, DialogTitle, DialogContent, DialogActions,
+} from '@mui/material';
+import { notifyDownloadSuccess } from 'utils/CommonFunction';
+
+import { FormattedMessage, useIntl } from "react-intl";
+
+import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png'
+
+// ==============================|| DASHBOARD - DEFAULT ||============================== //
+
+const Index = () => {
+ const [isWarningPopUp, setIsWarningPopUp] = React.useState(false);
+ const [warningText, setWarningText] = React.useState("");
+ const [resultStr, setResultStr] = React.useState("");
+ const [wait, setWait] = React.useState(false);
+
+ const intl = useIntl();
+
+
+ const BackgroundHead = {
+ backgroundImage: `url(${titleBackgroundImg})`,
+ width: 'auto',
+ height: 'auto',
+ backgroundSize: 'contain',
+ backgroundRepeat: 'no-repeat',
+ backgroundColor: '#0C489E',
+ backgroundPosition: 'right'
+ }
+
+
+ const readFile = (event) => {
+ let file = event.target.files[0];
+ setWait(true);
+ if (file) {
+
+ if (file.name.toLowerCase().substr(file.name.length - 5).includes(".xlsx")
+ ) {
+ HttpUtils.postWithFiles({
+ url: UrlUtils.DR_IMPORT,
+ params:null,
+ files: [event.target.files[0]],
+ onSuccess: function (responData) {
+ setWait(false);
+ if(responData?.msg){
+ setResultStr(<>{DateUtils.datetimeStr(new Date())}
Error
{responData?.msg}>)
+ }else if(responData?.success){
+ setResultStr(<>{DateUtils.datetimeStr(new Date())}
Success
Record Count: {responData.recordCount}>)
+ }
+ },
+ onError: function(){
+ setWait(false);
+ setResultStr(<>{DateUtils.datetimeStr(new Date())}
Error
Action Fail: Please import valid file.>)
+ }
+ });
+ } else {
+ setWait(false);
+ setWarningText("Please upload a valid file (file format: .xlsx)");
+ setIsWarningPopUp(true);
+ document.getElementById("uploadFileBtn").value = "";
+ return;
+ }
+ }else{
+ setWait(false);
+ }
+ document.getElementById("uploadFileBtn").value = "";
+ }
+
+ return (
+
+
+
+
+
+ DR Import
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {
+ readFile(event)
+ }}
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Result:
+
+ {resultStr}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
+export default Index;
\ No newline at end of file
diff --git a/src/pages/Setting/SystemSetting/index.js b/src/pages/Setting/SystemSetting/index.js
index 016e401..3ba0987 100644
--- a/src/pages/Setting/SystemSetting/index.js
+++ b/src/pages/Setting/SystemSetting/index.js
@@ -69,7 +69,7 @@ const SystemSetting = () => {
return (
-
<>
diff --git a/src/pages/User/DetailPage/index.js b/src/pages/User/DetailPage/index.js
index 567f74a..e3b7bd9 100644
--- a/src/pages/User/DetailPage/index.js
+++ b/src/pages/User/DetailPage/index.js
@@ -202,13 +202,13 @@ const UserMaintainPage = () => {
return (
!onReady ?
-
+
:
-
+
diff --git a/src/pages/User/DetailsPage_Individual/index.js b/src/pages/User/DetailsPage_Individual/index.js
index 3467e48..fd8ec54 100644
--- a/src/pages/User/DetailsPage_Individual/index.js
+++ b/src/pages/User/DetailsPage_Individual/index.js
@@ -118,13 +118,13 @@ const UserMaintainPage_Individual = () => {
return (
isLoading ?
-
+
:
-
+
diff --git a/src/pages/User/DetailsPage_Organization/UserInformationCard_Organization_Pub.js b/src/pages/User/DetailsPage_Organization/UserInformationCard_Organization_Pub.js
index ed94098..7b8b7a4 100644
--- a/src/pages/User/DetailsPage_Organization/UserInformationCard_Organization_Pub.js
+++ b/src/pages/User/DetailsPage_Organization/UserInformationCard_Organization_Pub.js
@@ -43,7 +43,7 @@ const UserInformationCard_Organization_Pub = ({ userData, loadDataFun,}) => {
// console.log(currentApplicationDetailData)
if (Object.keys(currentUserData).length > 0) {
setOnReady(true);
- console.log(currentUserData)
+ // console.log(currentUserData)
}
}, [currentUserData]);
@@ -59,7 +59,7 @@ const UserInformationCard_Organization_Pub = ({ userData, loadDataFun,}) => {
phoneNumber: yup.string().min(8, displayErrorMsg(intl.formatMessage({id: 'require8Number'}))).required(displayErrorMsg(intl.formatMessage({id: 'requireContactNumber'}))),
}),
onSubmit: (values) => {
- console.log(values);
+ // console.log(values);
HttpUtils.post({
url: UrlUtils.POST_PUB_ORG_USER,
params: {
@@ -105,50 +105,48 @@ const UserInformationCard_Organization_Pub = ({ userData, loadDataFun,}) => {