From 0abe8703cb060d533fb4c864aba7a2a814016037 Mon Sep 17 00:00:00 2001 From: Alex Cheung Date: Fri, 16 Feb 2024 17:52:34 +0800 Subject: [PATCH] add holiday setting and layout --- src/layout/MainLayout/Header/index.js | 3 + src/pages/DemandNote/Create/index.js | 2 +- src/pages/DemandNote/Search/index.js | 4 +- src/pages/DemandNote/Search_Public/index.js | 2 +- src/pages/EmailTemplate/Detail_GLD/index.js | 2 +- src/pages/EmailTemplate/Search_GLD/index.js | 2 +- src/pages/GFMIS/index.js | 2 +- src/pages/Holiday/Search_GLD/DataGrid.js | 59 +++++ src/pages/Holiday/Search_GLD/SearchForm.js | 113 ++++++++++ src/pages/Holiday/Search_GLD/index.js | 208 ++++++++++++++++++ src/pages/Message/Details/index.js | 2 +- src/pages/Organization/DetailPage/index.js | 4 +- src/pages/Organization/SearchPage/index.js | 4 +- src/pages/Payment/Card/index.js | 2 +- src/pages/Payment/Details_GLD/index.js | 2 +- src/pages/Payment/Details_Public/index.js | 2 +- src/pages/Payment/FPS/AckPage.js | 2 +- src/pages/Payment/FPS/FPS.js | 2 +- src/pages/Payment/FPS/fpscallback.js | 2 +- src/pages/Payment/PaymentCallback.js | 2 +- src/pages/Payment/Search_GLD/index.js | 2 +- src/pages/Proof/Create_FromApp/index.js | 2 +- src/pages/Proof/Payment/Pay.js | 2 +- src/pages/Proof/Payment/Pay_Creditor.js | 2 +- src/pages/Proof/Reply_GLD/index.js | 2 +- src/pages/Proof/Reply_Public/index.js | 2 +- src/pages/Proof/Search_GLD/index.js | 4 +- .../ApplyForm/PublicNoticeApplyForm.js | 2 +- src/pages/PublicNotice/ApplyForm/index.js | 2 +- src/pages/PublicNotice/ListPanel/index.js | 4 +- src/pages/PublicNotice/Search_GLD/index.js | 4 +- src/pages/Setting/SystemSetting/index.js | 2 +- src/pages/User/DetailPage/index.js | 4 +- .../User/DetailsPage_Individual/index.js | 4 +- .../User/DetailsPage_Organization/index.js | 4 +- src/pages/User/GLDUserProfile/index.js | 4 +- src/pages/User/SearchPage/index.js | 4 +- src/pages/User/SearchPage_Individual/index.js | 4 +- .../User/SearchPage_Organization/index.js | 4 +- src/pages/authentication/AuthWrapper.js | 4 +- src/pages/authentication/AuthWrapperCustom.js | 2 +- .../ForgotPassword/AfterForgotPasswordPage.js | 2 +- .../AuthCallback/ResetPasswordSuccess.js | 4 +- .../ForgotPassword/AuthCallback/index.js | 4 +- .../ForgotPassword/ForgotPasswordApplyForm.js | 2 +- .../authentication/ForgotPassword/index.js | 2 +- .../ForgotUsername/AfterForgotPasswordPage.js | 2 +- .../AuthCallback/ResetPasswordSuccess.js | 4 +- .../ForgotUsername/AuthCallback/index.js | 4 +- .../ForgotUsername/ForgotUsernameApplyForm.js | 2 +- .../authentication/ForgotUsername/index.js | 2 +- src/pages/authentication/Verify.js | 2 +- src/pages/dashboard/GLD/index.js | 2 +- src/pages/dashboard/Public/index.js | 2 +- src/pages/iAmSmart/AuthCallback/index.js | 2 +- .../iAmSmart/DirectLoginCallback/index.js | 2 +- src/pages/iAmSmart/FailCallback/index.js | 2 +- src/pages/iAmSmart/RegistryCallback/index.js | 2 +- src/pages/iAmSmart/SuccessCallback/index.js | 2 +- src/pages/pnspsUserGroupDetailPage/index.js | 2 +- src/pages/pnspsUserGroupSearchPage/index.js | 4 +- src/routes/SettingRoutes.js | 5 + src/utils/ApiPathConst.js | 6 +- src/utils/DateUtils.js | 4 + 64 files changed, 473 insertions(+), 77 deletions(-) create mode 100644 src/pages/Holiday/Search_GLD/DataGrid.js create mode 100644 src/pages/Holiday/Search_GLD/SearchForm.js create mode 100644 src/pages/Holiday/Search_GLD/index.js diff --git a/src/layout/MainLayout/Header/index.js b/src/layout/MainLayout/Header/index.js index 7a33057..910da40 100644 --- a/src/layout/MainLayout/Header/index.js +++ b/src/layout/MainLayout/Header/index.js @@ -146,6 +146,9 @@ function Header(props) {
  • System Setting
  • +
  • + Holiday Setting +
  • diff --git a/src/pages/DemandNote/Create/index.js b/src/pages/DemandNote/Create/index.js index e35b484..d22572c 100644 --- a/src/pages/DemandNote/Create/index.js +++ b/src/pages/DemandNote/Create/index.js @@ -80,7 +80,7 @@ const Index = () => { !onReady ? : - +
    diff --git a/src/pages/DemandNote/Search/index.js b/src/pages/DemandNote/Search/index.js index abd80f0..a0355bd 100644 --- a/src/pages/DemandNote/Search/index.js +++ b/src/pages/DemandNote/Search/index.js @@ -92,13 +92,13 @@ const UserSearchPage_Individual = () => { return ( !onReady ? - + : - +
    diff --git a/src/pages/DemandNote/Search_Public/index.js b/src/pages/DemandNote/Search_Public/index.js index 18c185c..d89b1ea 100644 --- a/src/pages/DemandNote/Search_Public/index.js +++ b/src/pages/DemandNote/Search_Public/index.js @@ -92,7 +92,7 @@ const UserSearchPage_Individual = () => { return ( !onReady ? - + diff --git a/src/pages/EmailTemplate/Detail_GLD/index.js b/src/pages/EmailTemplate/Detail_GLD/index.js index 8e03f5b..3117350 100644 --- a/src/pages/EmailTemplate/Detail_GLD/index.js +++ b/src/pages/EmailTemplate/Detail_GLD/index.js @@ -117,7 +117,7 @@ const Index = () => { return ( !onReady ? - + diff --git a/src/pages/EmailTemplate/Search_GLD/index.js b/src/pages/EmailTemplate/Search_GLD/index.js index 4358b7b..0b41928 100644 --- a/src/pages/EmailTemplate/Search_GLD/index.js +++ b/src/pages/EmailTemplate/Search_GLD/index.js @@ -55,7 +55,7 @@ const Index = () => { return ( !onReady ? - + diff --git a/src/pages/GFMIS/index.js b/src/pages/GFMIS/index.js index 8a59eea..4a96416 100644 --- a/src/pages/GFMIS/index.js +++ b/src/pages/GFMIS/index.js @@ -123,7 +123,7 @@ const Index = () => { !onReady ? : - +
    diff --git a/src/pages/Holiday/Search_GLD/DataGrid.js b/src/pages/Holiday/Search_GLD/DataGrid.js new file mode 100644 index 0000000..79873f0 --- /dev/null +++ b/src/pages/Holiday/Search_GLD/DataGrid.js @@ -0,0 +1,59 @@ +// material-ui +import * as React from 'react'; +// import { GridActionsCellItem, } from "@mui/x-data-grid"; +import { FiDataGrid } from "components/FiDataGrid"; +// import EditIcon from '@mui/icons-material/Edit'; +import { useEffect } from "react"; +import { dateStr } from "utils/DateUtils"; +// import { useNavigate } from "react-router-dom"; + +// ==============================|| EVENT TABLE ||============================== // + +export default function EmailTemplateTable({ recordList }) { + const [rows, setRows] = React.useState(recordList); + + // const navigate = useNavigate() + + useEffect(() => { + setRows(recordList); + }, [recordList]); + + // const handleEditClick = (id) => () => { + // navigate('/emailTemplate/' + id); + // }; + + const columns = [ + { + id: 'holiday_DAY', + field: 'holiday_DAY', + headerName: 'Date', + flex: 4, + renderCell: (params) => { + let holiday_DAY = params.row.holiday_DAY; + return
    {dateStr(holiday_DAY)}
    + }, + }, + { + id: 'description', + field: 'description', + headerName: 'Description', + flex: 5, + }, + ]; + + // function handleRowDoubleClick(params) { + // navigate('/emailTemplate/' + params.id); + // } + + return ( +
    + 'auto'} + /> +
    + ); +} \ No newline at end of file diff --git a/src/pages/Holiday/Search_GLD/SearchForm.js b/src/pages/Holiday/Search_GLD/SearchForm.js new file mode 100644 index 0000000..693dafd --- /dev/null +++ b/src/pages/Holiday/Search_GLD/SearchForm.js @@ -0,0 +1,113 @@ +// material-ui +import { + Button, + Grid, + TextField, + // Autocomplete, + Typography +} from '@mui/material'; +import MainCard from "components/MainCard"; +import { useForm } from "react-hook-form"; +import * as React from "react"; +// import * as DateUtils from "utils/DateUtils"; +import {PNSPS_BUTTON_THEME} from "themes/buttonConst"; +import {ThemeProvider} from "@emotion/react"; +// import * as ComboData from "utils/ComboData"; +// ==============================|| DASHBOARD - DEFAULT ||============================== // + + +const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { + + // const [minDate, setMinDate] = React.useState(searchCriteria.dateFrom); + const [maxDate] = React.useState(searchCriteria.dateFrom); + // const [status, setStatus] = React.useState(ComboData.paymentStatus[0]); + + const { register, handleSubmit } = useForm() + + const onSubmit = (data) => { + const temp = { + // code: data.code, + // transNo: data.transNo, + dateFrom: data.dateFrom, + dateTo: data.dateTo, + // status : (status?.type && status?.type != 'all') ? status?.type : "", + }; + applySearch(temp); + }; + + + return ( + + +
    + + {/*row 1*/} + + + Date + + + {/*row 2*/} + + + + { + // setMinDate(DateUtils.dateStr(newValue)); + // }} + InputLabelProps={{ + shrink: true + }} + /> + + + + {/* { + setMaxDate(DateUtils.dateStr(newValue)); + }} + id="dateTo" + type="date" + label="To" + defaultValue={searchCriteria.dateTo} + /> */} + + + {/* + */} + + + + + + + + + +
    +
    + ); +}; + +export default SearchPublicNoticeForm; diff --git a/src/pages/Holiday/Search_GLD/index.js b/src/pages/Holiday/Search_GLD/index.js new file mode 100644 index 0000000..37173c5 --- /dev/null +++ b/src/pages/Holiday/Search_GLD/index.js @@ -0,0 +1,208 @@ +// material-ui +import { + Grid, + Typography, + Stack, + Button, + Dialog, DialogTitle, DialogContent, DialogActions, +} from '@mui/material'; +import * as UrlUtils from "utils/ApiPathConst"; +import * as React from "react"; +import * as HttpUtils from "utils/HttpUtils"; + +import Loadable from 'components/Loadable'; +const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); +const HolidayTable = Loadable(React.lazy(() => import('pages/Holiday/Search_GLD/DataGrid'))) +import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' +// import AddCircleOutlineIcon from '@mui/icons-material/AddCircleOutline'; +import MainCard from 'components/MainCard'; +const SearchForm = Loadable(React.lazy(() => import('./SearchForm'))); + +const BackgroundHead = { + backgroundImage: `url(${titleBackgroundImg})`, + width: '100%', + height: '100%', + backgroundSize: 'contain', + backgroundRepeat: 'no-repeat', + backgroundColor: '#0C489E', + backgroundPosition: 'right' +} +// import { useNavigate } from "react-router"; +import {PNSPS_LONG_BUTTON_THEME} from "themes/buttonConst"; +import {ThemeProvider} from "@emotion/react"; +import { dateStr_Year } from "utils/DateUtils"; +import { notifySaveSuccess } from 'utils/CommonFunction'; + +// ==============================|| DASHBOARD - DEFAULT ||============================== // + +const Index = () => { + + const [record, setRecord] = React.useState([]); + const [onReady, setOnReady] = React.useState(false); + // const navigate = useNavigate() + const [searchCriteria, setSearchCriteria] = React.useState({ + dateFrom: dateStr_Year(new Date()), + // dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate()-14)), + }); + const [attachments, setAttachments] = React.useState([]); + const [wait, setWait] = React.useState(false); + const [isWarningPopUp, setIsWarningPopUp] = React.useState(false); + const [warningText, setWarningText] = React.useState(""); + + React.useLayoutEffect(() => { + loadForm(); + }, []); + + React.useLayoutEffect(() => { + setOnReady(true); + }, [record]); + + const loadForm = () => { + HttpUtils.get({ + url: UrlUtils.GET_HOLIDAY, + onSuccess: (responseData) => { + console.log(dateStr_Year(new Date())) + setRecord(responseData); + } + }); + } + + function applySearch(input) { + setSearchCriteria(input); + } + + React.useEffect(() => { + if (!attachments || attachments.length <= 0) { + setAttachments([]); + return; + } + importHoliday(); + }, [attachments]); + + const readFile = (event) => { + let file = event.target.files[0]; + if (file) { + if (!file.name.toLowerCase().substr(file.name.length - 5).includes(".xlsx")) { + setWarningText("Please upload a valid file (File format: .xlsx)."); + setIsWarningPopUp(true); + document.getElementById("uploadFileBtn").value = ""; + return; + } + file['id'] = attachments.length; + setAttachments([ + ...attachments, + file + ]); + document.getElementById("uploadFileBtn").value = ""; + } + } + + const importHoliday = () => { + setWait(true); + if (!attachments || attachments.length <= 0) { + setWarningText("Please upload file."); + setSaving(false); + return; + } + HttpUtils.postWithFiles({ + url: UrlUtils.POST_HOLIDAY, + files: attachments, + onSuccess: () => { + notifySaveSuccess() + setWait(false); + setAttachments([]); + loadForm(); + } + }); + } + + return ( + !onReady ? + + + + + + : + ( + + +
    + + Holiday Setting + +
    +
    + + + + { + readFile(event) + }} + /> + + + + + {/*row 1*/} + + + + {/*row 2*/} + + + + + +
    + setIsWarningPopUp(false)} + PaperProps={{ + sx: { + minWidth: '40vw', + maxWidth: { xs: '90vw', s: '90vw', m: '70vw', lg: '70vw' }, + maxHeight: { xs: '90vh', s: '70vh', m: '70vh', lg: '60vh' } + } + }} + > + Warning + + {warningText} + + + + + +
    +
    + ) + ); +}; + +export default Index; \ No newline at end of file diff --git a/src/pages/Message/Details/index.js b/src/pages/Message/Details/index.js index 29a65a2..e7eadeb 100644 --- a/src/pages/Message/Details/index.js +++ b/src/pages/Message/Details/index.js @@ -61,7 +61,7 @@ const Index = () => { return ( !onReady ? - + diff --git a/src/pages/Organization/DetailPage/index.js b/src/pages/Organization/DetailPage/index.js index 5d7ee4f..efed39c 100644 --- a/src/pages/Organization/DetailPage/index.js +++ b/src/pages/Organization/DetailPage/index.js @@ -124,13 +124,13 @@ const OrganizationDetailPage = () => { return ( isLoading ? - + : - +
    diff --git a/src/pages/Organization/SearchPage/index.js b/src/pages/Organization/SearchPage/index.js index 9969b27..5ec67e8 100644 --- a/src/pages/Organization/SearchPage/index.js +++ b/src/pages/Organization/SearchPage/index.js @@ -65,13 +65,13 @@ const OrganizationSearchPage = () => { return ( !onReady ? - + : - +
    diff --git a/src/pages/Payment/Card/index.js b/src/pages/Payment/Card/index.js index be8249d..9900418 100644 --- a/src/pages/Payment/Card/index.js +++ b/src/pages/Payment/Card/index.js @@ -125,7 +125,7 @@ const Index = () => { return ( !onReady ? - + diff --git a/src/pages/Payment/Details_GLD/index.js b/src/pages/Payment/Details_GLD/index.js index f4f36c3..302b87c 100644 --- a/src/pages/Payment/Details_GLD/index.js +++ b/src/pages/Payment/Details_GLD/index.js @@ -79,7 +79,7 @@ const Index = () => { return ( !onReady ? - + diff --git a/src/pages/Payment/Details_Public/index.js b/src/pages/Payment/Details_Public/index.js index ca4d4b6..96ee14d 100644 --- a/src/pages/Payment/Details_Public/index.js +++ b/src/pages/Payment/Details_Public/index.js @@ -92,7 +92,7 @@ const Index = () => { return ( !onReady ? - + diff --git a/src/pages/Payment/FPS/AckPage.js b/src/pages/Payment/FPS/AckPage.js index 6281fb8..17cefe5 100644 --- a/src/pages/Payment/FPS/AckPage.js +++ b/src/pages/Payment/FPS/AckPage.js @@ -149,7 +149,7 @@ const AckPage = () => { return ( !onReady ? - + diff --git a/src/pages/Payment/FPS/FPS.js b/src/pages/Payment/FPS/FPS.js index a2d3bce..692ee73 100644 --- a/src/pages/Payment/FPS/FPS.js +++ b/src/pages/Payment/FPS/FPS.js @@ -273,7 +273,7 @@ const Index = () => { return ( !onReady ? - + diff --git a/src/pages/Payment/FPS/fpscallback.js b/src/pages/Payment/FPS/fpscallback.js index 61bce13..d721243 100644 --- a/src/pages/Payment/FPS/fpscallback.js +++ b/src/pages/Payment/FPS/fpscallback.js @@ -139,7 +139,7 @@ const Fpscallback = () => { } return ( !onReady ? - + diff --git a/src/pages/Payment/PaymentCallback.js b/src/pages/Payment/PaymentCallback.js index 283297a..f3b2c74 100644 --- a/src/pages/Payment/PaymentCallback.js +++ b/src/pages/Payment/PaymentCallback.js @@ -151,7 +151,7 @@ const Index = () => { return ( !onReady ? - + diff --git a/src/pages/Payment/Search_GLD/index.js b/src/pages/Payment/Search_GLD/index.js index a63903d..64860d0 100644 --- a/src/pages/Payment/Search_GLD/index.js +++ b/src/pages/Payment/Search_GLD/index.js @@ -64,7 +64,7 @@ const Index = () => { !onReady ? : - +
    diff --git a/src/pages/Proof/Create_FromApp/index.js b/src/pages/Proof/Create_FromApp/index.js index 02be45a..ab5910b 100644 --- a/src/pages/Proof/Create_FromApp/index.js +++ b/src/pages/Proof/Create_FromApp/index.js @@ -69,7 +69,7 @@ const Index = () => { return ( !onReady ? - + diff --git a/src/pages/Proof/Payment/Pay.js b/src/pages/Proof/Payment/Pay.js index 9d19ec2..9d483d1 100644 --- a/src/pages/Proof/Payment/Pay.js +++ b/src/pages/Proof/Payment/Pay.js @@ -80,7 +80,7 @@ const Index = () => { return ( !onReady ? - + diff --git a/src/pages/Proof/Payment/Pay_Creditor.js b/src/pages/Proof/Payment/Pay_Creditor.js index 94998cf..8b7cef0 100644 --- a/src/pages/Proof/Payment/Pay_Creditor.js +++ b/src/pages/Proof/Payment/Pay_Creditor.js @@ -60,7 +60,7 @@ const Index = () => { return ( !onReady ? - + diff --git a/src/pages/Proof/Reply_GLD/index.js b/src/pages/Proof/Reply_GLD/index.js index 6a2d44b..160954e 100644 --- a/src/pages/Proof/Reply_GLD/index.js +++ b/src/pages/Proof/Reply_GLD/index.js @@ -112,7 +112,7 @@ const Index = () => { return ( !onReady ? - + diff --git a/src/pages/Proof/Reply_Public/index.js b/src/pages/Proof/Reply_Public/index.js index 0e9c584..ee00046 100644 --- a/src/pages/Proof/Reply_Public/index.js +++ b/src/pages/Proof/Reply_Public/index.js @@ -81,7 +81,7 @@ const Index = () => { return ( !onReady ? - + diff --git a/src/pages/Proof/Search_GLD/index.js b/src/pages/Proof/Search_GLD/index.js index 6de5186..2e7a327 100644 --- a/src/pages/Proof/Search_GLD/index.js +++ b/src/pages/Proof/Search_GLD/index.js @@ -90,13 +90,13 @@ const UserSearchPage_Individual = () => { return ( !onReady ? - + : -
    diff --git a/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js b/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js index b35d0c2..65ee239 100644 --- a/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js +++ b/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js @@ -158,7 +158,7 @@ const PublicNoticeApplyForm = ({ loadedData, selections }) => { return ( - +
    diff --git a/src/pages/PublicNotice/ApplyForm/index.js b/src/pages/PublicNotice/ApplyForm/index.js index a2195ce..b27d688 100644 --- a/src/pages/PublicNotice/ApplyForm/index.js +++ b/src/pages/PublicNotice/ApplyForm/index.js @@ -65,7 +65,7 @@ const ApplyForm = () => { return ( isLoading ? - + 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/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/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/index.js b/src/pages/User/DetailsPage_Organization/index.js index f226ca7..a405f9f 100644 --- a/src/pages/User/DetailsPage_Organization/index.js +++ b/src/pages/User/DetailsPage_Organization/index.js @@ -179,13 +179,13 @@ const UserMaintainPage_Organization = () => { return ( isLoading ? - + : - +
    diff --git a/src/pages/User/GLDUserProfile/index.js b/src/pages/User/GLDUserProfile/index.js index 75353ef..68893af 100644 --- a/src/pages/User/GLDUserProfile/index.js +++ b/src/pages/User/GLDUserProfile/index.js @@ -75,13 +75,13 @@ const UserMaintainPage = () => { return ( !onReady ? - + : -
    diff --git a/src/pages/User/SearchPage/index.js b/src/pages/User/SearchPage/index.js index 6d3fb7b..cda72c3 100644 --- a/src/pages/User/SearchPage/index.js +++ b/src/pages/User/SearchPage/index.js @@ -70,13 +70,13 @@ const UserSettingPage = () => { return ( !onReady ? - + : - +
    diff --git a/src/pages/User/SearchPage_Individual/index.js b/src/pages/User/SearchPage_Individual/index.js index ed9687a..44d0b30 100644 --- a/src/pages/User/SearchPage_Individual/index.js +++ b/src/pages/User/SearchPage_Individual/index.js @@ -65,13 +65,13 @@ const UserSearchPage_Individual = () => { return ( !onReady ? - + : - +
    diff --git a/src/pages/User/SearchPage_Organization/index.js b/src/pages/User/SearchPage_Organization/index.js index 7dd73ae..1730740 100644 --- a/src/pages/User/SearchPage_Organization/index.js +++ b/src/pages/User/SearchPage_Organization/index.js @@ -66,13 +66,13 @@ const UserSearchPage_Organization = () => { return ( !onReady ? - + : - +
    diff --git a/src/pages/authentication/AuthWrapper.js b/src/pages/authentication/AuthWrapper.js index ec04cfa..483b2ca 100644 --- a/src/pages/authentication/AuthWrapper.js +++ b/src/pages/authentication/AuthWrapper.js @@ -26,7 +26,7 @@ const BackgroundHead = { // ==============================|| AUTHENTICATION - WRAPPER ||============================== // const AuthWrapper = ({ children }) => ( - + {/* */} {/* banner */}
    @@ -36,7 +36,7 @@ const AuthWrapper = ({ children }) => ( justifyContent="space-between" alignItems="center" sx={{ - minHeight: '90vh' + minHeight: '87vh' }} > diff --git a/src/pages/authentication/AuthWrapperCustom.js b/src/pages/authentication/AuthWrapperCustom.js index 6070812..4783b4c 100644 --- a/src/pages/authentication/AuthWrapperCustom.js +++ b/src/pages/authentication/AuthWrapperCustom.js @@ -24,7 +24,7 @@ const AuthWrapperCustom = ({ children }) => ( justifyContent="center" alignItems="flex-start" sx={{ - minHeight: '90vh', + minHeight: '87vh', }} > {/* diff --git a/src/pages/authentication/ForgotPassword/AfterForgotPasswordPage.js b/src/pages/authentication/ForgotPassword/AfterForgotPasswordPage.js index dce2bd9..fbbe889 100644 --- a/src/pages/authentication/ForgotPassword/AfterForgotPasswordPage.js +++ b/src/pages/authentication/ForgotPassword/AfterForgotPasswordPage.js @@ -41,7 +41,7 @@ const AfterForgotPasswordPage = () => { }; return ( - +
    diff --git a/src/pages/authentication/ForgotPassword/AuthCallback/ResetPasswordSuccess.js b/src/pages/authentication/ForgotPassword/AuthCallback/ResetPasswordSuccess.js index 03bf7ea..2b81f48 100644 --- a/src/pages/authentication/ForgotPassword/AuthCallback/ResetPasswordSuccess.js +++ b/src/pages/authentication/ForgotPassword/AuthCallback/ResetPasswordSuccess.js @@ -65,13 +65,13 @@ const ResetPasswordSuccess = () => { return ( isLoading ? - + : - +
    diff --git a/src/pages/authentication/ForgotPassword/AuthCallback/index.js b/src/pages/authentication/ForgotPassword/AuthCallback/index.js index bc42a00..018ab46 100644 --- a/src/pages/authentication/ForgotPassword/AuthCallback/index.js +++ b/src/pages/authentication/ForgotPassword/AuthCallback/index.js @@ -188,13 +188,13 @@ const Index = () => { return ( isLoading || verifyState == null ? - + : - +
    diff --git a/src/pages/authentication/ForgotPassword/ForgotPasswordApplyForm.js b/src/pages/authentication/ForgotPassword/ForgotPasswordApplyForm.js index 4372701..fced818 100644 --- a/src/pages/authentication/ForgotPassword/ForgotPasswordApplyForm.js +++ b/src/pages/authentication/ForgotPassword/ForgotPasswordApplyForm.js @@ -79,7 +79,7 @@ const ForgotPasswordApplyForm = () => { }); return ( - +
    diff --git a/src/pages/authentication/ForgotPassword/index.js b/src/pages/authentication/ForgotPassword/index.js index 01aa418..5e65f0e 100644 --- a/src/pages/authentication/ForgotPassword/index.js +++ b/src/pages/authentication/ForgotPassword/index.js @@ -32,7 +32,7 @@ const ApplyForm = () => { return ( isLoading ? - + diff --git a/src/pages/authentication/ForgotUsername/AfterForgotPasswordPage.js b/src/pages/authentication/ForgotUsername/AfterForgotPasswordPage.js index dce2bd9..fbbe889 100644 --- a/src/pages/authentication/ForgotUsername/AfterForgotPasswordPage.js +++ b/src/pages/authentication/ForgotUsername/AfterForgotPasswordPage.js @@ -41,7 +41,7 @@ const AfterForgotPasswordPage = () => { }; return ( - +
    diff --git a/src/pages/authentication/ForgotUsername/AuthCallback/ResetPasswordSuccess.js b/src/pages/authentication/ForgotUsername/AuthCallback/ResetPasswordSuccess.js index 05ba6b1..148d3bd 100644 --- a/src/pages/authentication/ForgotUsername/AuthCallback/ResetPasswordSuccess.js +++ b/src/pages/authentication/ForgotUsername/AuthCallback/ResetPasswordSuccess.js @@ -77,13 +77,13 @@ const ResetPasswordSuccess = () => { return ( isLoading ? - + : - +
    diff --git a/src/pages/authentication/ForgotUsername/AuthCallback/index.js b/src/pages/authentication/ForgotUsername/AuthCallback/index.js index ea9a78c..e005113 100644 --- a/src/pages/authentication/ForgotUsername/AuthCallback/index.js +++ b/src/pages/authentication/ForgotUsername/AuthCallback/index.js @@ -188,13 +188,13 @@ const Index = () => { return ( isLoading || verifyState == null ? - + : - +
    diff --git a/src/pages/authentication/ForgotUsername/ForgotUsernameApplyForm.js b/src/pages/authentication/ForgotUsername/ForgotUsernameApplyForm.js index e768894..30d3f2d 100644 --- a/src/pages/authentication/ForgotUsername/ForgotUsernameApplyForm.js +++ b/src/pages/authentication/ForgotUsername/ForgotUsernameApplyForm.js @@ -81,7 +81,7 @@ const ForgotUsernameApplyForm = () => { }); return ( - +
    diff --git a/src/pages/authentication/ForgotUsername/index.js b/src/pages/authentication/ForgotUsername/index.js index 5467959..f123c8f 100644 --- a/src/pages/authentication/ForgotUsername/index.js +++ b/src/pages/authentication/ForgotUsername/index.js @@ -32,7 +32,7 @@ const ApplyForm = () => { return ( isLoading ? - + diff --git a/src/pages/authentication/Verify.js b/src/pages/authentication/Verify.js index f141630..c332dd9 100644 --- a/src/pages/authentication/Verify.js +++ b/src/pages/authentication/Verify.js @@ -56,7 +56,7 @@ export default function Verify() { {isLoading || verifyState == null ? - + diff --git a/src/pages/dashboard/GLD/index.js b/src/pages/dashboard/GLD/index.js index 4d6443f..9d60aac 100644 --- a/src/pages/dashboard/GLD/index.js +++ b/src/pages/dashboard/GLD/index.js @@ -21,7 +21,7 @@ const DashboardDefault = () => { backgroundPosition: 'right' } return ( - +
    diff --git a/src/pages/dashboard/Public/index.js b/src/pages/dashboard/Public/index.js index aaa3d18..d6b2a5b 100644 --- a/src/pages/dashboard/Public/index.js +++ b/src/pages/dashboard/Public/index.js @@ -36,7 +36,7 @@ const DashboardDefault = () => { backgroundPosition: 'right' } return ( - +
    diff --git a/src/pages/iAmSmart/AuthCallback/index.js b/src/pages/iAmSmart/AuthCallback/index.js index bffcef8..91c1f9f 100644 --- a/src/pages/iAmSmart/AuthCallback/index.js +++ b/src/pages/iAmSmart/AuthCallback/index.js @@ -81,7 +81,7 @@ const Index = () => { } return ( - + diff --git a/src/pages/iAmSmart/DirectLoginCallback/index.js b/src/pages/iAmSmart/DirectLoginCallback/index.js index e7e3227..1223c82 100644 --- a/src/pages/iAmSmart/DirectLoginCallback/index.js +++ b/src/pages/iAmSmart/DirectLoginCallback/index.js @@ -66,7 +66,7 @@ const Index = () => { } return ( - + diff --git a/src/pages/iAmSmart/FailCallback/index.js b/src/pages/iAmSmart/FailCallback/index.js index aec67f7..0fe09dc 100644 --- a/src/pages/iAmSmart/FailCallback/index.js +++ b/src/pages/iAmSmart/FailCallback/index.js @@ -24,7 +24,7 @@ const Index = () => { return ( !onReady ? - + diff --git a/src/pages/iAmSmart/RegistryCallback/index.js b/src/pages/iAmSmart/RegistryCallback/index.js index a489d7b..362ef9b 100644 --- a/src/pages/iAmSmart/RegistryCallback/index.js +++ b/src/pages/iAmSmart/RegistryCallback/index.js @@ -46,7 +46,7 @@ const Index = () => { } return ( - + diff --git a/src/pages/iAmSmart/SuccessCallback/index.js b/src/pages/iAmSmart/SuccessCallback/index.js index 1273659..07bbb7c 100644 --- a/src/pages/iAmSmart/SuccessCallback/index.js +++ b/src/pages/iAmSmart/SuccessCallback/index.js @@ -32,7 +32,7 @@ const Index = () => { return ( !onReady ? - + diff --git a/src/pages/pnspsUserGroupDetailPage/index.js b/src/pages/pnspsUserGroupDetailPage/index.js index cfb6bb3..cc625d1 100644 --- a/src/pages/pnspsUserGroupDetailPage/index.js +++ b/src/pages/pnspsUserGroupDetailPage/index.js @@ -167,7 +167,7 @@ const UserMaintainPage = () => { return ( !onReady ? - + diff --git a/src/pages/pnspsUserGroupSearchPage/index.js b/src/pages/pnspsUserGroupSearchPage/index.js index b045aca..0d3a700 100644 --- a/src/pages/pnspsUserGroupSearchPage/index.js +++ b/src/pages/pnspsUserGroupSearchPage/index.js @@ -73,13 +73,13 @@ const UserGroupSearchPanel = () => { return ( !onReady ? - + : - +
    diff --git a/src/routes/SettingRoutes.js b/src/routes/SettingRoutes.js index 6cf81c8..fd3afe3 100644 --- a/src/routes/SettingRoutes.js +++ b/src/routes/SettingRoutes.js @@ -22,6 +22,7 @@ const OrganizationDetailPage = Loadable(lazy(() => import('pages/Organization/De const OrganizationDetailPage_fromUser = Loadable(lazy(() => import('pages/Organization/DetailPage_FromUser'))); const EmailTemplatePage = Loadable(lazy(() => import('pages/EmailTemplate/Search_GLD'))); const EmailTemplateDetailPage = Loadable(lazy(() => import('pages/EmailTemplate/Detail_GLD'))); +const HolidayPage = Loadable(lazy(() => import('pages/Holiday/Search_GLD'))); // ==============================|| AUTH ROUTING ||============================== // @@ -90,6 +91,10 @@ const SettingRoutes = { path: '/emailTemplate/:id', element: }, + { + path: 'holiday', + element: + }, ] }; diff --git a/src/utils/ApiPathConst.js b/src/utils/ApiPathConst.js index 17e98f6..644f16d 100644 --- a/src/utils/ApiPathConst.js +++ b/src/utils/ApiPathConst.js @@ -162,4 +162,8 @@ export const GEN_GAZETTE_PROOF = apiPath+'/proof/gazetteProof'; //POST export const GEN_PAYMENT_RECEIPT = apiPath+'/payment/receipt'; //POST //gen report -export const GEN_GFMIS_XML = apiPath+'/gfmis'; //GET \ No newline at end of file +export const GEN_GFMIS_XML = apiPath+'/gfmis'; //GET + +//Holiday +export const GET_HOLIDAY = apiPath+'/holiday/list'; //GET +export const POST_HOLIDAY = apiPath+'/holiday/import'; //POST \ No newline at end of file diff --git a/src/utils/DateUtils.js b/src/utils/DateUtils.js index 03ca962..43771f0 100644 --- a/src/utils/DateUtils.js +++ b/src/utils/DateUtils.js @@ -9,6 +9,10 @@ export const dateStr = (date) =>{ return dateFormat(date,"YYYY-MM-DD") }; +export const dateStr_Year = (date) =>{ + return dateFormat(date,'YYYY') +}; + export const datetimeStr_Cht = (date) =>{ return dateFormat(date,"YYYY年MM月DD日 HH:mm:ss") };