| @@ -212,6 +212,14 @@ function Header(props) { | |||||
| </Typography> | </Typography> | ||||
| </Link> | </Link> | ||||
| </li> | </li> | ||||
| <li> | |||||
| <Link className="manageUser" to={'/org'}> | |||||
| <Typography style={{ opacity: 0.9 }} variant={"pnspsHeaderTitle"} sx={{ ml: 2 }}> | |||||
| {/* <FormattedMessage id="companyOrUserRecord" /> */} | |||||
| Organisation Profile | |||||
| </Typography> | |||||
| </Link> | |||||
| </li> | |||||
| </ul> | </ul> | ||||
| </> | </> | ||||
| : | : | ||||
| @@ -0,0 +1,117 @@ | |||||
| // material-ui | |||||
| import { | |||||
| Grid, | |||||
| Typography, | |||||
| Stack, | |||||
| Button, | |||||
| } from '@mui/material'; | |||||
| import * as React from "react"; | |||||
| import * as HttpUtils from "utils/HttpUtils"; | |||||
| import * as UrlUtils from "utils/ApiPathConst"; | |||||
| import * as DateUtils from "utils/DateUtils"; | |||||
| import { useParams, useNavigate } from "react-router-dom"; | |||||
| import Loadable from 'components/Loadable'; | |||||
| const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); | |||||
| import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | |||||
| import { FormattedMessage } from "react-intl"; | |||||
| const BackgroundHead = { | |||||
| backgroundImage: `url(${titleBackgroundImg})`, | |||||
| width: '100%', | |||||
| height: '100%', | |||||
| backgroundSize: 'contain', | |||||
| backgroundRepeat: 'no-repeat', | |||||
| backgroundColor: '#0C489E', | |||||
| backgroundPosition: 'right' | |||||
| } | |||||
| // ==============================|| DASHBOARD - DEFAULT ||============================== // | |||||
| const Index = () => { | |||||
| const params = useParams(); | |||||
| const navigate = useNavigate() | |||||
| const [record, setRecord] = React.useState(); | |||||
| const [onReady, setOnReady] = React.useState(false); | |||||
| React.useEffect(() => { | |||||
| loadForm(); | |||||
| }, []); | |||||
| React.useEffect(() => { | |||||
| setOnReady(true); | |||||
| }, [record]); | |||||
| const loadForm = () => { | |||||
| if (params.id > 0) { | |||||
| HttpUtils.get({ | |||||
| url: UrlUtils.GET_MSG_DETAILS + "/" + params.id, | |||||
| onSuccess: (responseData) => { | |||||
| if (!responseData?.sentDate) { | |||||
| navigate("/"); | |||||
| } | |||||
| setRecord(responseData); | |||||
| } | |||||
| }); | |||||
| } | |||||
| } | |||||
| return ( | |||||
| !onReady ? | |||||
| <LoadingComponent /> | |||||
| : | |||||
| ( | |||||
| <Grid container sx={{ minHeight: '110vh', backgroundColor: '#fff' }} direction="column" justifyContent="flex-start" alignItems="center" > | |||||
| <Grid item xs={12} width="100%"> | |||||
| <div style={BackgroundHead} width="100%"> | |||||
| <Stack direction="row" height='70px'> | |||||
| <Typography ml={15} color='#FFF' variant="h4" sx={{ pt: 2 }}> | |||||
| <FormattedMessage id="msgDetails" /> | |||||
| </Typography> | |||||
| </Stack> | |||||
| </div> | |||||
| </Grid> | |||||
| {/*row 1*/} | |||||
| <Grid item xs={12} md={12} > | |||||
| <Grid container justifyContent="flex-start" alignItems="center" > | |||||
| <center> | |||||
| <Grid item xs={12} md={12} sx={{p:2}} > | |||||
| <Typography variant="h2" sx={{ textAlign: "left", borderBottom: "1px solid black" }}> | |||||
| {record?.subject} | |||||
| </Typography> | |||||
| <Typography sx={{p:1}} align="justify">{DateUtils.datetimeStr(record?.sentDate)}</Typography> | |||||
| <Typography variant="body1" sx={{ p:4, textAlign: "left" }} align="justify" backgroundColor="#f8f8f8"> | |||||
| <div dangerouslySetInnerHTML={{__html: record?.content}}></div> | |||||
| </Typography> | |||||
| <Typography variant="h3" sx={{ ml: 8, mt: 4, mr: 8, textAlign: "center" }}> | |||||
| <Button | |||||
| component="span" | |||||
| variant="contained" | |||||
| size="large" | |||||
| sx={{ m: 4 }} | |||||
| onClick={() => { | |||||
| navigate(-1); | |||||
| }} | |||||
| > | |||||
| <FormattedMessage id="back" /> | |||||
| </Button> | |||||
| </Typography> | |||||
| </Grid> | |||||
| </center> | |||||
| </Grid> | |||||
| </Grid> | |||||
| {/*row 2*/} | |||||
| </Grid > | |||||
| ) | |||||
| ); | |||||
| }; | |||||
| export default Index; | |||||
| @@ -0,0 +1,425 @@ | |||||
| // material-ui | |||||
| import { | |||||
| Grid, Button, Checkbox, FormControlLabel, Typography, | |||||
| Dialog, DialogTitle, DialogContent, DialogActions, | |||||
| } from '@mui/material'; | |||||
| // import { FormControlLabel } from '@material-ui/core'; | |||||
| import MainCard from "../../../components/MainCard"; | |||||
| import * as React from "react"; | |||||
| import { useFormik } from 'formik'; | |||||
| import * as yup from 'yup'; | |||||
| import { useEffect, useState } from "react"; | |||||
| import * as HttpUtils from '../../../utils/HttpUtils'; | |||||
| import * as UrlUtils from "../../../utils/ApiPathConst"; | |||||
| import * as FieldUtils from "../../../utils/FieldUtils"; | |||||
| import * as ComboData from "../../../utils/ComboData"; | |||||
| const LoadingComponent = Loadable(lazy(() => import('../../extra-pages/LoadingComponent'))); | |||||
| import Loadable from 'components/Loadable'; | |||||
| import { lazy } from 'react'; | |||||
| import { notifySaveSuccess } from 'utils/CommonFunction'; | |||||
| import {useIntl} from "react-intl"; | |||||
| // ==============================|| DASHBOARD - DEFAULT ||============================== // | |||||
| const OrganizationPubCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||||
| const intl = useIntl(); | |||||
| const [creditorConfirmPopUp, setCreditorConfirmPopUp] = React.useState(false); | |||||
| const [nonCreditorConfirmPopUp, setNonCreditorConfirmPopUp] = React.useState(false); | |||||
| const [currentUserData, setCurrentUserData] = useState({}); | |||||
| const [editMode, setEditMode] = useState(false); | |||||
| const [createMode, setCreateMode] = useState(false); | |||||
| const [onReady, setOnReady] = useState(false); | |||||
| useEffect(() => { | |||||
| //if state data are ready and assign to different field | |||||
| // console.log(currentApplicationDetailData) | |||||
| if (Object.keys(currentUserData).length > 0) { | |||||
| setOnReady(true); | |||||
| } | |||||
| }, [currentUserData]); | |||||
| function displayErrorMsg(errorMsg) { | |||||
| return <Typography variant="errorMessage1">{errorMsg}</Typography> | |||||
| } | |||||
| const formik = useFormik({ | |||||
| enableReinitialize: true, | |||||
| initialValues: currentUserData, | |||||
| validationSchema: yup.object().shape({ | |||||
| enCompanyName: yup.string().max(255).required(displayErrorMsg(intl.formatMessage({id: 'userRequireEnglishName'}))), | |||||
| chCompanyName: yup.string().max(255, displayErrorMsg(intl.formatMessage({id: 'userRequireChineseName'}))).nullable(), | |||||
| addressLine1: yup.string().max(255).required(displayErrorMsg(intl.formatMessage({id: 'validateAddressLine1'}))), | |||||
| addressLine2: yup.string().max(255, displayErrorMsg(intl.formatMessage({id: 'noMoreThen255Words'}))), | |||||
| addressLine3: yup.string().max(255, displayErrorMsg(intl.formatMessage({id: 'noMoreThen255Words'}))), | |||||
| fax_countryCode: yup.string().min(3, displayErrorMsg(intl.formatMessage({id: 'requireDialingCode'}))).nullable(), | |||||
| tel_countryCode: yup.string().min(3, displayErrorMsg(intl.formatMessage({id: 'requireDialingCode'}))), | |||||
| phoneNumber: yup.string().min(8, displayErrorMsg(intl.formatMessage({id: 'requiredValidNumber'}))).required(displayErrorMsg(intl.formatMessage({id: 'requireContactNumber'}))), | |||||
| faxNumber: yup.string().min(8, displayErrorMsg(intl.formatMessage({id: 'require8Number'}))).nullable(), | |||||
| brExpiryDate: yup.string().min(8).required(displayErrorMsg(intl.formatMessage({id: 'pleaseFillInBusinessRegCertValidityDate'}))), | |||||
| brNo: yup.string().required(displayErrorMsg(intl.formatMessage({id: 'pleaseFillInBusinessRegCertNumber'}))).test('checkBrNoFormat', displayErrorMsg(displayErrorMsg(intl.formatMessage({id: 'pleaseFillInValidBusinessRegCertNumber'}))), function (value) { | |||||
| var brNo_pattern = /[0-9]{8}/ | |||||
| if (value !== undefined) { | |||||
| if (value.match(brNo_pattern)) { | |||||
| return true | |||||
| } else { | |||||
| return false | |||||
| } | |||||
| } | |||||
| }), | |||||
| }), | |||||
| onSubmit: vaule => { | |||||
| console.log(vaule) | |||||
| HttpUtils.post({ | |||||
| url: UrlUtils.POST_ORG_SAVE_PATH, | |||||
| params: { | |||||
| id: id > 0 ? id : null, | |||||
| enCompanyName: vaule.enCompanyName, | |||||
| chCompanyName: vaule.chCompanyName, | |||||
| brNo: vaule.brNo, | |||||
| brExpiryDate: vaule.brExpiryDate, | |||||
| enCompanyNameTemp: vaule.enCompanyNameTemp, | |||||
| chCompanyNameTemp: vaule.chCompanyNameTemp, | |||||
| brExpiryDateTemp: vaule.brExpiryDateTemp, | |||||
| contactPerson: vaule.contactPerson, | |||||
| contactTel: { | |||||
| countryCode: vaule.tel_countryCode, | |||||
| phoneNumber: vaule.phoneNumber | |||||
| }, | |||||
| faxNo: { | |||||
| countryCode: vaule.fax_countryCode, | |||||
| faxNumber: vaule.faxNumber | |||||
| }, | |||||
| addressTemp: { | |||||
| country: vaule.country, | |||||
| district: vaule.district, | |||||
| addressLine1: vaule.addressLine1, | |||||
| addressLine2: vaule.addressLine2, | |||||
| addressLine3: vaule.addressLine3, | |||||
| }, | |||||
| //creditor: vaule.creditor, | |||||
| }, | |||||
| onSuccess: function () { | |||||
| notifySaveSuccess() | |||||
| loadDataFun(); | |||||
| setEditMode(false); | |||||
| } | |||||
| }); | |||||
| } | |||||
| }); | |||||
| useEffect(()=>{ | |||||
| setEditModeFun(editMode); | |||||
| },[editMode]); | |||||
| useEffect(() => { | |||||
| if (Object.keys(userData).length > 0) { | |||||
| setCreateMode(id <= 0); | |||||
| setEditMode(id <= 0); | |||||
| setCurrentUserData(userData); | |||||
| } | |||||
| }, [userData]); | |||||
| // useEffect(() => { | |||||
| // if (Object.keys(userData).length > 0) { | |||||
| // if(userData.creditor === undefined||userData.creditor === null){ | |||||
| // userData.creditor = false | |||||
| // } | |||||
| // setCurrentUserData(userData); | |||||
| // } | |||||
| // }, []); | |||||
| const onEditClick = () => { | |||||
| setEditMode(true); | |||||
| }; | |||||
| const markAsCreditor = () => { | |||||
| setCreditorConfirmPopUp(false); | |||||
| HttpUtils.get({ | |||||
| url: UrlUtils.GET_ORG_MARK_AS_CREDITOR + "/" + id, | |||||
| onSuccess: () => { | |||||
| loadDataFun(); | |||||
| } | |||||
| }); | |||||
| } | |||||
| const markAsNonCreditor = () => { | |||||
| setNonCreditorConfirmPopUp(false); | |||||
| HttpUtils.get({ | |||||
| url: UrlUtils.GET_ORG_MARK_AS_NON_CREDITOR + "/" + id, | |||||
| onSuccess: () => { | |||||
| loadDataFun(); | |||||
| } | |||||
| }); | |||||
| } | |||||
| return ( | |||||
| <MainCard elevation={0} | |||||
| border={false} | |||||
| content={false} | |||||
| > | |||||
| <form onSubmit={formik.handleSubmit} style={{ padding: 24 }}> | |||||
| {/*top*/} | |||||
| <Grid item s={12} md={12} lg={12} sx={{ mb: 3 }} alignItems={"start"} justifyContent="center"> | |||||
| <Grid container maxWidth justifyContent="flex-start"> | |||||
| {editMode ? | |||||
| <> | |||||
| {createMode ? | |||||
| <> | |||||
| <Grid item sx={{ ml: 0, mr: 3 }}> | |||||
| <Button | |||||
| size="large" | |||||
| variant="contained" | |||||
| type="submit" | |||||
| sx={{ | |||||
| textTransform: 'capitalize', | |||||
| alignItems: 'end' | |||||
| }} | |||||
| > | |||||
| <Typography variant="h5">Create</Typography> | |||||
| </Button> | |||||
| </Grid> | |||||
| </> : | |||||
| <> | |||||
| <Grid item sx={{ ml: 0, mr: 3 }}> | |||||
| <Button | |||||
| size="large" | |||||
| variant="contained" | |||||
| onClick={loadDataFun} | |||||
| sx={{ | |||||
| textTransform: 'capitalize', | |||||
| alignItems: 'end' | |||||
| }} | |||||
| > | |||||
| <Typography variant="h5">Reset & Back</Typography> | |||||
| </Button> | |||||
| </Grid> | |||||
| <Grid item sx={{ ml: 3, mr: 3 }}> | |||||
| <Button | |||||
| size="large" | |||||
| variant="contained" | |||||
| type="submit" | |||||
| color="success" | |||||
| sx={{ | |||||
| textTransform: 'capitalize', | |||||
| alignItems: 'end' | |||||
| }} | |||||
| > | |||||
| <Typography variant="h5">Save</Typography> | |||||
| </Button> | |||||
| </Grid> | |||||
| </> | |||||
| } | |||||
| </> | |||||
| : | |||||
| <> | |||||
| <Grid item sx={{ ml: 0, mr: 3 }}> | |||||
| <Button | |||||
| size="large" | |||||
| variant="contained" | |||||
| sx={{ | |||||
| textTransform: 'capitalize', | |||||
| alignItems: 'end' | |||||
| }} | |||||
| onClick={onEditClick} | |||||
| > | |||||
| <Typography variant="h5">Edit</Typography> | |||||
| </Button> | |||||
| </Grid> | |||||
| <Grid item sx={{ ml: 3, mr: 3 }}> | |||||
| <Button | |||||
| size="large" | |||||
| variant="contained" | |||||
| color="orange" | |||||
| onClick={()=>setCreditorConfirmPopUp(true)} | |||||
| sx={{ | |||||
| textTransform: 'capitalize', | |||||
| alignItems: 'end' | |||||
| }} | |||||
| > | |||||
| <Typography variant="h5">Mark as Creditor</Typography> | |||||
| </Button> | |||||
| </Grid> | |||||
| <Grid item sx={{ ml: 3, mr: 3 }}> | |||||
| <Button | |||||
| size="large" | |||||
| variant="contained" | |||||
| color="error" | |||||
| onClick={()=>setNonCreditorConfirmPopUp(true)} | |||||
| sx={{ | |||||
| textTransform: 'capitalize', | |||||
| alignItems: 'end' | |||||
| }} | |||||
| > | |||||
| <Typography variant="h5">Mark as Non-Creditor</Typography> | |||||
| </Button> | |||||
| </Grid> | |||||
| </> | |||||
| } | |||||
| </Grid> | |||||
| </Grid> | |||||
| {/*top*/} | |||||
| {!onReady ? | |||||
| <LoadingComponent /> | |||||
| : | |||||
| <Grid container spacing={1}> | |||||
| <Grid item xs={12}> | |||||
| <Typography variant="h4" sx={{ mb: 2, mr: 3, borderBottom: "1px solid black" }}> | |||||
| Organisation Details | |||||
| </Typography> | |||||
| </Grid> | |||||
| <Grid item lg={4} > | |||||
| {FieldUtils.getTextField({ | |||||
| label: FieldUtils.notNullFieldLabel("BR No.:"), | |||||
| valueName: "brNo", | |||||
| disabled: (!editMode && !createMode), | |||||
| form: formik | |||||
| })} | |||||
| </Grid> | |||||
| <Grid item lg={4} > | |||||
| <FormControlLabel | |||||
| control={<Checkbox checked={formik.values.creditor} />} | |||||
| label="is Creditor" | |||||
| name="creditor" | |||||
| onChange={() => { | |||||
| formik.setFieldValue("creditor", !formik.values.creditor); | |||||
| }} | |||||
| disabled={true} | |||||
| //disabled={!editMode && !createMode} | |||||
| /> | |||||
| </Grid> | |||||
| <Grid item lg={4} ></Grid> | |||||
| <Grid item lg={4} > | |||||
| {FieldUtils.getTextField({ | |||||
| label: FieldUtils.notNullFieldLabel("Name (Eng):"), | |||||
| valueName: "enCompanyName", | |||||
| disabled: (!editMode && !createMode), | |||||
| form: formik | |||||
| })} | |||||
| </Grid> | |||||
| <Grid item lg={4} > | |||||
| {FieldUtils.getTextField({ | |||||
| label: "Name (Ch):", | |||||
| valueName: "chCompanyName", | |||||
| disabled: (!editMode && !createMode), | |||||
| form: formik | |||||
| })} | |||||
| </Grid> | |||||
| <Grid item lg={4} > | |||||
| {FieldUtils.getDateField({ | |||||
| label: FieldUtils.notNullFieldLabel("Expiry Date:"), | |||||
| valueName: "brExpiryDate", | |||||
| disabled: (!editMode && !createMode), | |||||
| form: formik | |||||
| })} | |||||
| </Grid> | |||||
| <Grid item lg={4} > | |||||
| {FieldUtils.getTextField({ | |||||
| label: FieldUtils.notNullFieldLabel("Contact Person:"), | |||||
| valueName: "contactPerson", | |||||
| disabled: (!editMode && !createMode), | |||||
| form: formik | |||||
| })} | |||||
| </Grid> | |||||
| <Grid item lg={4} > | |||||
| {FieldUtils.getPhoneField({ | |||||
| label: FieldUtils.notNullFieldLabel("Contact Tel:"), | |||||
| valueName: { | |||||
| code: "tel_countryCode", | |||||
| num: "phoneNumber" | |||||
| }, | |||||
| disabled: (!editMode && !createMode), | |||||
| form: formik | |||||
| })} | |||||
| </Grid> | |||||
| <Grid item lg={4} > | |||||
| {FieldUtils.getPhoneField({ | |||||
| label: "Fax No:", | |||||
| valueName: { | |||||
| code: "fax_countryCode", | |||||
| num: "faxNumber" | |||||
| }, | |||||
| disabled: (!editMode && !createMode), | |||||
| form: formik | |||||
| })} | |||||
| </Grid> | |||||
| <Grid item lg={4} > | |||||
| {FieldUtils.getComboField({ | |||||
| label: FieldUtils.notNullFieldLabel("Country:"), | |||||
| valueName: "country", | |||||
| disabled: (!editMode && !createMode), | |||||
| dataList: ComboData.country, | |||||
| getOptionLabel: (option) => option.type? intl.formatMessage({ id: option.type }) : "", | |||||
| form: formik | |||||
| })} | |||||
| </Grid> | |||||
| <Grid item lg={4} > | |||||
| {FieldUtils.getComboField({ | |||||
| label: FieldUtils.notNullFieldLabel("District:"), | |||||
| valueName: "district", | |||||
| disabled: (!editMode && !createMode), | |||||
| dataList: ComboData.district, | |||||
| getOptionLabel: (option) => option.type? intl.formatMessage({ id: option.type }) : "", | |||||
| form: formik | |||||
| })} | |||||
| </Grid> | |||||
| <Grid item lg={4} > | |||||
| {FieldUtils.getAddressField({ | |||||
| label: FieldUtils.notNullFieldLabel("Address:"), | |||||
| valueName: ["addressLine1", "addressLine2", "addressLine3"], | |||||
| disabled: (!editMode && !createMode), | |||||
| form: formik | |||||
| })} | |||||
| </Grid> | |||||
| <Grid item lg={12} ></Grid> | |||||
| </Grid> | |||||
| } | |||||
| </form> | |||||
| <div> | |||||
| <Dialog open={creditorConfirmPopUp} onClose={() => setCreditorConfirmPopUp(false)} > | |||||
| <DialogTitle><Typography variant="h3">Confirm</Typography></DialogTitle> | |||||
| <DialogContent style={{ display: 'flex', }}> | |||||
| <Typography variant="h4" style={{ padding: '16px' }}>Are you sure mark as Creditor?</Typography> | |||||
| </DialogContent> | |||||
| <DialogActions> | |||||
| <Button onClick={() => setCreditorConfirmPopUp(false)}><Typography variant="h5">Cancel</Typography></Button> | |||||
| <Button onClick={() => markAsCreditor()}><Typography variant="h5">Confirm</Typography></Button> | |||||
| </DialogActions> | |||||
| </Dialog> | |||||
| </div> | |||||
| <div> | |||||
| <Dialog open={nonCreditorConfirmPopUp} onClose={() => setNonCreditorConfirmPopUp(false)} > | |||||
| <DialogTitle><Typography variant="h3">Confirm</Typography></DialogTitle> | |||||
| <DialogContent style={{ display: 'flex', }}> | |||||
| <Typography variant="h4" style={{ padding: '16px' }}>Are you sure mark as Non-Creditor?</Typography> | |||||
| </DialogContent> | |||||
| <DialogActions> | |||||
| <Button onClick={() => setNonCreditorConfirmPopUp(false)}><Typography variant="h5">Cancel</Typography></Button> | |||||
| <Button onClick={() => markAsNonCreditor()}><Typography variant="h5">Confirm</Typography></Button> | |||||
| </DialogActions> | |||||
| </Dialog> | |||||
| </div> | |||||
| </MainCard> | |||||
| ); | |||||
| }; | |||||
| export default OrganizationPubCard; | |||||
| @@ -7,14 +7,21 @@ import * as DateUtils from "utils/DateUtils"; | |||||
| import Loadable from 'components/Loadable'; | import Loadable from 'components/Loadable'; | ||||
| const InfoCard = Loadable(React.lazy(() => import('./OrganizationCard'))); | const InfoCard = Loadable(React.lazy(() => import('./OrganizationCard'))); | ||||
| const InfoPubCard = Loadable(React.lazy(() => import('./OrganizationPubCard'))); | |||||
| const Table = Loadable(React.lazy(() => import('./CreditorHistoryTable'))); | const Table = Loadable(React.lazy(() => import('./CreditorHistoryTable'))); | ||||
| const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); | const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); | ||||
| import ForwardIcon from '@mui/icons-material/Forward'; | import ForwardIcon from '@mui/icons-material/Forward'; | ||||
| import { useNavigate, useParams } from 'react-router-dom'; | import { useNavigate, useParams } from 'react-router-dom'; | ||||
| import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | ||||
| import {getObjectByValue} from "../../../utils/CommonFunction"; | |||||
| import * as ComboData from "../../../utils/ComboData"; | |||||
| import {getObjectByValue} from "utils/CommonFunction"; | |||||
| import * as ComboData from "utils/ComboData"; | |||||
| import { | |||||
| isGLDLoggedIn, | |||||
| isINDLoggedIn, | |||||
| isORGLoggedIn, | |||||
| isPrimaryLoggedIn | |||||
| } from "utils/Utils"; | |||||
| const BackgroundHead = { | const BackgroundHead = { | ||||
| backgroundImage: `url(${titleBackgroundImg})`, | backgroundImage: `url(${titleBackgroundImg})`, | ||||
| @@ -39,32 +46,63 @@ const OrganizationDetailPage = () => { | |||||
| React.useEffect(() => { | React.useEffect(() => { | ||||
| console.log(formData); | console.log(formData); | ||||
| if (isINDLoggedIn()||isORGLoggedIn()&&!isPrimaryLoggedIn()){ | |||||
| navigate('/dashboard'); | |||||
| }else{ | |||||
| loadData(); | |||||
| } | |||||
| loadData(); | loadData(); | ||||
| }, []); | }, []); | ||||
| const loadData = () => { | const loadData = () => { | ||||
| setLoding(true); | setLoding(true); | ||||
| if (params.id > 0) { | |||||
| HttpUtils.get({ | |||||
| url: UrlUtils.GET_ORG_PATH + "/" + params.id, | |||||
| onSuccess: function (response) { | |||||
| response.data["country"] = getObjectByValue(ComboData.country, "key", response.data.address?.country); | |||||
| response.data["district"] = getObjectByValue(ComboData.district, "key", response.data.address?.district); | |||||
| response.data["addressLine1"] = response.data.addressTemp?.addressLine1; | |||||
| response.data["addressLine2"] = response.data.addressTemp?.addressLine2; | |||||
| response.data["addressLine3"] = response.data.addressTemp?.addressLine3; | |||||
| response.data["phoneNumber"] = response.data.contactTel?.phoneNumber; | |||||
| response.data["tel_countryCode"] = response.data.contactTel?.countryCode; | |||||
| 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) : ""; | |||||
| setFormData(response.data) | |||||
| setList(response.historyList) | |||||
| } | |||||
| }); | |||||
| if(isGLDLoggedIn()){ | |||||
| if (params.id > 0) { | |||||
| HttpUtils.get({ | |||||
| url: UrlUtils.GET_ORG_PATH + "/" + params.id, | |||||
| onSuccess: function (response) { | |||||
| response.data["country"] = getObjectByValue(ComboData.country, "key", response.data.address?.country); | |||||
| response.data["district"] = getObjectByValue(ComboData.district, "key", response.data.address?.district); | |||||
| response.data["addressLine1"] = response.data.addressTemp?.addressLine1; | |||||
| response.data["addressLine2"] = response.data.addressTemp?.addressLine2; | |||||
| response.data["addressLine3"] = response.data.addressTemp?.addressLine3; | |||||
| response.data["phoneNumber"] = response.data.contactTel?.phoneNumber; | |||||
| response.data["tel_countryCode"] = response.data.contactTel?.countryCode; | |||||
| 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) : ""; | |||||
| setFormData(response.data) | |||||
| setList(response.historyList) | |||||
| } | |||||
| }); | |||||
| } | |||||
| } | |||||
| if(isPrimaryLoggedIn()){ | |||||
| if (params.id > 0) { | |||||
| HttpUtils.get({ | |||||
| url: UrlUtils.GET_PUB_ORG_PATH, | |||||
| onSuccess: function (response) { | |||||
| response.data["country"] = getObjectByValue(ComboData.country, "key", response.data.address?.country); | |||||
| response.data["district"] = getObjectByValue(ComboData.district, "key", response.data.address?.district); | |||||
| response.data["addressLine1"] = response.data.addressTemp?.addressLine1; | |||||
| response.data["addressLine2"] = response.data.addressTemp?.addressLine2; | |||||
| response.data["addressLine3"] = response.data.addressTemp?.addressLine3; | |||||
| response.data["phoneNumber"] = response.data.contactTel?.phoneNumber; | |||||
| response.data["tel_countryCode"] = response.data.contactTel?.countryCode; | |||||
| 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) : ""; | |||||
| setFormData(response.data) | |||||
| setList(response.historyList) | |||||
| } | |||||
| }); | |||||
| } | |||||
| } | } | ||||
| }; | }; | ||||
| @@ -95,28 +133,40 @@ const OrganizationDetailPage = () => { | |||||
| <Grid container> | <Grid container> | ||||
| <Grid item xs={12} md={12} lg={12}> | <Grid item xs={12} md={12} lg={12}> | ||||
| <Box xs={12} ml={0} mt={-1} mr={0} sx={{ p: 1, borderRadius: '10px' }}> | <Box xs={12} ml={0} mt={-1} mr={0} sx={{ p: 1, borderRadius: '10px' }}> | ||||
| <InfoCard | |||||
| userData={formData} | |||||
| loadDataFun={loadData} | |||||
| id={params.id} | |||||
| setEditModeFun={setEditMode} | |||||
| /> | |||||
| {isGLDLoggedIn? | |||||
| <InfoCard | |||||
| userData={formData} | |||||
| loadDataFun={loadData} | |||||
| id={params.id} | |||||
| setEditModeFun={setEditMode} | |||||
| /> | |||||
| : | |||||
| <InfoPubCard | |||||
| userData={formData} | |||||
| loadDataFun={loadData} | |||||
| id={params.id} | |||||
| setEditModeFun={setEditMode} | |||||
| /> | |||||
| } | |||||
| </Box> | </Box> | ||||
| <br /> | <br /> | ||||
| </Grid> | </Grid> | ||||
| <Grid item xs={12} md={12} lg={12} display={isEditMode?"none":""}> | |||||
| <Box xs={12} ml={0} mt={-1} mr={0} sx={{ pl:4, pr:4, pb:2 }}> | |||||
| <Grid container sx={{ p: 3, backgroundColor: "#FFF", borderRadius: '10px' }}> | |||||
| <Grid item xs={12} sx={{ p:1 }}> | |||||
| <Table | |||||
| sx={{ p: 1 }} | |||||
| recordList={list} | |||||
| > | |||||
| </Table> | |||||
| {isGLDLoggedIn()? | |||||
| <Grid item xs={12} md={12} lg={12} display={isEditMode?"none":""}> | |||||
| <Box xs={12} ml={0} mt={-1} mr={0} sx={{ pl:4, pr:4, pb:2 }}> | |||||
| <Grid container sx={{ p: 3, backgroundColor: "#FFF", borderRadius: '10px' }}> | |||||
| <Grid item xs={12} sx={{ p:1 }}> | |||||
| <Table | |||||
| sx={{ p: 1 }} | |||||
| recordList={list} | |||||
| > | |||||
| </Table> | |||||
| </Grid> | |||||
| </Grid> | </Grid> | ||||
| </Grid> | |||||
| </Box> | |||||
| </Grid> | |||||
| </Box> | |||||
| </Grid> | |||||
| : null | |||||
| } | |||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| {/*col 2*/} | {/*col 2*/} | ||||
| @@ -139,7 +139,7 @@ const PublicNoticeApplyForm = ({ loadedData, selections }) => { | |||||
| </div> | </div> | ||||
| </Grid> | </Grid> | ||||
| <Grid item xs={12} width={{xs:"90%", sm:"90%", md:"60%", lg:"60%"}}> | <Grid item xs={12} width={{xs:"90%", sm:"90%", md:"60%", lg:"60%"}}> | ||||
| <Button title={intl.formatMessage({id: 'back'})} sx={{ ml: 0, mt: 2.5 }} style={{ border: '2px solid' }} variant="outlined" onClick={() => { navigate("/publicNotice") }}> | |||||
| <Button title={intl.formatMessage({id: 'back'})} sx={{ ml: 0, mt: 2.5 }} style={{ border: '2px solid' }} variant="outlined" onClick={() => { navigate(-1) }}> | |||||
| <ForwardIcon style={{ height: 30, width: 50, transform: "rotate(180deg)" }} /> | <ForwardIcon style={{ height: 30, width: 50, transform: "rotate(180deg)" }} /> | ||||
| </Button> | </Button> | ||||
| </Grid> | </Grid> | ||||
| @@ -161,7 +161,7 @@ const UserInformationCard_Individual_Pub = ({ formData, loadDataFun }) => { | |||||
| </Grid> | </Grid> | ||||
| {/*end top button*/} | {/*end top button*/} | ||||
| <Typography variant="h4" sx={{ mt: 3, mb: 2, borderBottom: "1px solid black" }}> | <Typography variant="h4" sx={{ mt: 3, mb: 2, borderBottom: "1px solid black" }}> | ||||
| Individual User Details | |||||
| User Details | |||||
| </Typography> | </Typography> | ||||
| <Grid item xs={12} sm={12} md={12} lg={12}> | <Grid item xs={12} sm={12} md={12} lg={12}> | ||||
| <Grid container> | <Grid container> | ||||
| @@ -123,7 +123,11 @@ const UserMaintainPage_Individual = () => { | |||||
| <Grid item xs={12}> | <Grid item xs={12}> | ||||
| <div style={BackgroundHead}> | <div style={BackgroundHead}> | ||||
| <Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> | <Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> | ||||
| {isGLDLoggedIn()? | |||||
| <Typography ml={15} color='#FFF' variant="h4">Maintain Individual User</Typography> | <Typography ml={15} color='#FFF' variant="h4">Maintain Individual User</Typography> | ||||
| : | |||||
| <Typography ml={15} color='#FFF' variant="h4">User Profile</Typography> | |||||
| } | |||||
| </Stack> | </Stack> | ||||
| </div> | </div> | ||||
| </Grid> | </Grid> | ||||
| @@ -524,8 +524,8 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => | |||||
| {FieldUtils.getComboField({ | {FieldUtils.getComboField({ | ||||
| label: "Country:", | label: "Country:", | ||||
| valueName: "country", | valueName: "country", | ||||
| dataList: ComboData.country, | |||||
| getOptionLabel: (option) => option.type? intl.formatMessage({ id: option.type }) : "", | getOptionLabel: (option) => option.type? intl.formatMessage({ id: option.type }) : "", | ||||
| dataList: ComboData.country, | |||||
| disabled: true, | disabled: true, | ||||
| form: formik | form: formik | ||||
| })} | })} | ||||
| @@ -161,7 +161,7 @@ const UserInformationCard_Organization_Pub = ({ userData, loadDataFun,}) => { | |||||
| {/*end top button*/} | {/*end top button*/} | ||||
| <div style={{ paddingLeft: 24, paddingRight: 24 }}> | <div style={{ paddingLeft: 24, paddingRight: 24 }}> | ||||
| <Typography variant="h4" sx={{ mt: 3, mb: 2, mr: 3, borderBottom: "1px solid black" }}> | <Typography variant="h4" sx={{ mt: 3, mb: 2, mr: 3, borderBottom: "1px solid black" }}> | ||||
| Organisation User Details | |||||
| User Details | |||||
| </Typography> | </Typography> | ||||
| <Grid container spacing={1}> | <Grid container spacing={1}> | ||||
| <Grid item lg={12}> | <Grid item lg={12}> | ||||
| @@ -18,6 +18,8 @@ const UserInformationPubCard = Loadable(lazy(() => import('./UserInformationCard | |||||
| import ForwardIcon from '@mui/icons-material/Forward'; | import ForwardIcon from '@mui/icons-material/Forward'; | ||||
| import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | ||||
| import { useNavigate } from 'react-router-dom'; | import { useNavigate } from 'react-router-dom'; | ||||
| import * as ComboData from "utils/ComboData"; | |||||
| import {getObjectByValue} from "utils/CommonFunction"; | |||||
| const BackgroundHead = { | const BackgroundHead = { | ||||
| backgroundImage: `url(${titleBackgroundImg})`, | backgroundImage: `url(${titleBackgroundImg})`, | ||||
| @@ -97,7 +99,7 @@ const UserMaintainPage_Organization = () => { | |||||
| onSuccess: function (response) { | onSuccess: function (response) { | ||||
| // console.log(response) | // console.log(response) | ||||
| if (response.data.orgId != null) { | if (response.data.orgId != null) { | ||||
| console.log("1a") | |||||
| // console.log("1a") | |||||
| response.data["addressBus"] = response.orgDetail.data["addressTemp"]; | response.data["addressBus"] = response.orgDetail.data["addressTemp"]; | ||||
| 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"]; | ||||
| @@ -108,14 +110,14 @@ const UserMaintainPage_Organization = () => { | |||||
| response.data["chCompanyName"] = response.orgDetail.data.chCompanyName; | response.data["chCompanyName"] = response.orgDetail.data.chCompanyName; | ||||
| response.data["chCompanyName"] = response.orgDetail.data.chCompanyName; | response.data["chCompanyName"] = response.orgDetail.data.chCompanyName; | ||||
| } else { | } else { | ||||
| console.log("1b") | |||||
| // console.log("1b") | |||||
| 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.dateStr(response.data.brExpiryDate) : ""; | ||||
| } | } | ||||
| console.log("2") | |||||
| console.log(response.data) | |||||
| // console.log("2") | |||||
| // console.log(response.data) | |||||
| let createDate = DateUtils.datetimeStr(response.data.created); | let createDate = DateUtils.datetimeStr(response.data.created); | ||||
| let modifiedBy = DateUtils.datetimeStr(response.data.modified) + ", " + response.data.modifiedBy; | let modifiedBy = DateUtils.datetimeStr(response.data.modified) + ", " + response.data.modifiedBy; | ||||
| @@ -124,9 +126,10 @@ const UserMaintainPage_Organization = () => { | |||||
| response.data["verifiedStatus"] = response.data.verifiedBy ? DateUtils.datetimeStr(response.data.verifiedDate) + ", " + response.data.verifiedByName : "Not verified"; | response.data["verifiedStatus"] = response.data.verifiedBy ? DateUtils.datetimeStr(response.data.verifiedDate) + ", " + response.data.verifiedByName : "Not verified"; | ||||
| response.data["lastLoginDate"] = response.data.lastLogin ? DateUtils.datetimeStr(response.data.lastLoginDate) : ""; | response.data["lastLoginDate"] = response.data.lastLogin ? DateUtils.datetimeStr(response.data.lastLoginDate) : ""; | ||||
| response.data["country"] = response.data.addressBus?.country; | |||||
| response.data["district"] = response.data.addressBus?.district; | |||||
| // console.log(getObjectByValue(ComboData.country, "key", response.data.addressBus?.country)) | |||||
| // console.log(getObjectByValue(ComboData.country, "key", response.data.addressBus?.district)) | |||||
| response.data["country"] = getObjectByValue(ComboData.country, "key", response.data.addressBus?.country); | |||||
| response.data["district"] = getObjectByValue(ComboData.district, "key", response.data.addressBus?.district); | |||||
| response.data["addressLine1"] = response.data.addressBus?.addressLine1; | response.data["addressLine1"] = response.data.addressBus?.addressLine1; | ||||
| response.data["addressLine2"] = response.data.addressBus?.addressLine2; | response.data["addressLine2"] = response.data.addressBus?.addressLine2; | ||||
| response.data["addressLine3"] = response.data.addressBus?.addressLine3; | response.data["addressLine3"] = response.data.addressBus?.addressLine3; | ||||
| @@ -139,8 +142,8 @@ const UserMaintainPage_Organization = () => { | |||||
| //response.data["orgId"] = response.data.brExpiryDate?DateUtils.dateStr(response.data.brExpiryDate):""; | //response.data["orgId"] = response.data.brExpiryDate?DateUtils.dateStr(response.data.brExpiryDate):""; | ||||
| console.log("3") | |||||
| console.log(response.data) | |||||
| // console.log("3") | |||||
| // console.log(response.data) | |||||
| setUserData(response.data); | setUserData(response.data); | ||||
| setOrgData(response.orgList); | setOrgData(response.orgList); | ||||
| } | } | ||||
| @@ -150,7 +153,7 @@ const UserMaintainPage_Organization = () => { | |||||
| HttpUtils.get({ | HttpUtils.get({ | ||||
| url: `${UrlUtils.GET_PUB_ORG_USER_PATH}`, | url: `${UrlUtils.GET_PUB_ORG_USER_PATH}`, | ||||
| onSuccess: function (response) { | onSuccess: function (response) { | ||||
| console.log(response) | |||||
| // console.log(response) | |||||
| response.data["contactTel"] = JSON.parse(response.data["contactTel"]); | response.data["contactTel"] = JSON.parse(response.data["contactTel"]); | ||||
| response.data["primaryUser"] = response.data.primaryUser?isPrimaryLocale:notPrimaryLocale; | response.data["primaryUser"] = response.data.primaryUser?isPrimaryLocale:notPrimaryLocale; | ||||
| @@ -182,7 +185,11 @@ const UserMaintainPage_Organization = () => { | |||||
| <Grid item xs={12}> | <Grid item xs={12}> | ||||
| <div style={BackgroundHead}> | <div style={BackgroundHead}> | ||||
| <Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> | <Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> | ||||
| <Typography ml={15} color='#FFF' variant="h4">Maintain Organisation User</Typography> | |||||
| {isGLDLoggedIn()? | |||||
| <Typography ml={15} color='#FFF' variant="h4">Maintain Organisation User</Typography> | |||||
| : | |||||
| <Typography ml={15} color='#FFF' variant="h4">User Profile</Typography> | |||||
| } | |||||
| </Stack> | </Stack> | ||||
| </div> | </div> | ||||
| </Grid> | </Grid> | ||||
| @@ -1,15 +1,51 @@ | |||||
| // material-ui | // material-ui | ||||
| import { | import { | ||||
| Stack, | Stack, | ||||
| Typography | |||||
| Typography, | |||||
| Button | |||||
| } from '@mui/material'; | } from '@mui/material'; | ||||
| import MainCard from "components/MainCard"; | import MainCard from "components/MainCard"; | ||||
| import * as React from "react"; | import * as React from "react"; | ||||
| import * as HttpUtils from "utils/HttpUtils"; | |||||
| import * as UrlUtils from "utils/ApiPathConst"; | |||||
| import * as DateUtils from "utils/DateUtils"; | |||||
| import { useNavigate } from "react-router-dom"; | |||||
| // ==============================|| DASHBOARD - DEFAULT ||============================== // | // ==============================|| DASHBOARD - DEFAULT ||============================== // | ||||
| const SearchDemandNoteForm = () => { | const SearchDemandNoteForm = () => { | ||||
| const navigate = useNavigate() | |||||
| const [itemList, setItemList] = React.useState([]); | |||||
| React.useEffect(() => { | |||||
| loadData(); | |||||
| }, []); | |||||
| const loadData = () => { | |||||
| HttpUtils.get({ | |||||
| url: UrlUtils.GET_MSG_DESHBOARD, | |||||
| onSuccess: function (response) { | |||||
| let list = [] | |||||
| response.map((item) => { | |||||
| list.push( | |||||
| <Button onClick={()=>{navigate("/msg/details/"+item.id);}} color={item.readTime?"gray":"black"} style={{justifyContent: "flex-start"}} sx={{p:2}}> | |||||
| <Stack direction="column" > | |||||
| <Typography variant='h4' align="justify"><b>{item.subject}</b></Typography> | |||||
| <Typography align="justify">{DateUtils.datetimeStr(item.sentDate)}</Typography> | |||||
| </Stack> | |||||
| </Button> | |||||
| ) | |||||
| }); | |||||
| setItemList(list); | |||||
| } | |||||
| }); | |||||
| }; | |||||
| return ( | return ( | ||||
| <MainCard xs={12} md={12} lg={12} | <MainCard xs={12} md={12} lg={12} | ||||
| @@ -17,14 +53,12 @@ const SearchDemandNoteForm = () => { | |||||
| content={false} | content={false} | ||||
| sx={{ backgroundColor: '#fff' }} | sx={{ backgroundColor: '#fff' }} | ||||
| > | > | ||||
| <Stack direction="column" spacing={3}> | |||||
| <Stack direction="row" spacing={3}> | |||||
| <Typography></Typography> | |||||
| <Typography align="justify"></Typography> | |||||
| </Stack> | |||||
| <Stack direction="column" spacing={1}> | |||||
| {itemList} | |||||
| </Stack> | </Stack> | ||||
| </MainCard> | </MainCard> | ||||
| ); | ); | ||||
| }; | }; | ||||
| export default SearchDemandNoteForm; | export default SearchDemandNoteForm; | ||||
| @@ -10,16 +10,19 @@ import { | |||||
| } from '@mui/material'; | } from '@mui/material'; | ||||
| import { isORGLoggedIn, } from "utils/Utils"; | import { isORGLoggedIn, } from "utils/Utils"; | ||||
| import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | ||||
| import {FormattedMessage} from "react-intl"; | |||||
| import { FormattedMessage } from "react-intl"; | |||||
| import AdsClickRoundedIcon from '@mui/icons-material/AdsClickRounded'; | import AdsClickRoundedIcon from '@mui/icons-material/AdsClickRounded'; | ||||
| import * as React from "react"; | import * as React from "react"; | ||||
| import Loadable from 'components/Loadable'; | import Loadable from 'components/Loadable'; | ||||
| const Message = Loadable(React.lazy(() => import('./Message'))); | const Message = Loadable(React.lazy(() => import('./Message'))); | ||||
| const Notice = Loadable(React.lazy(() => import('./Notice'))); | const Notice = Loadable(React.lazy(() => import('./Notice'))); | ||||
| import { useNavigate } from "react-router-dom"; | |||||
| // ==============================|| DASHBOARD - DEFAULT ||============================== // | // ==============================|| DASHBOARD - DEFAULT ||============================== // | ||||
| const DashboardDefault = () => { | const DashboardDefault = () => { | ||||
| const navigate = useNavigate() | |||||
| const userData = JSON.parse(localStorage.getItem("userData")); | const userData = JSON.parse(localStorage.getItem("userData")); | ||||
| const BackgroundHead = { | const BackgroundHead = { | ||||
| // backgroundColor: '#0d47a1', | // backgroundColor: '#0d47a1', | ||||
| @@ -37,8 +40,8 @@ const DashboardDefault = () => { | |||||
| <div style={BackgroundHead}> | <div style={BackgroundHead}> | ||||
| <Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> | <Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> | ||||
| {/* <Typography variant="h5">我的公共啟事</Typography> */} | {/* <Typography variant="h5">我的公共啟事</Typography> */} | ||||
| <Typography color='#FFF' variant="h5" sx={{ ml:10, display:{ xs: 'none', sm:'none', md:'block'}}}> | |||||
| {isORGLoggedIn() ?userData.fullenName:userData.fullchName}, <FormattedMessage id="welcomeMsg"/> | |||||
| <Typography color='#FFF' variant="h5" sx={{ ml: 10, display: { xs: 'none', sm: 'none', md: 'block' } }}> | |||||
| {isORGLoggedIn() ? userData.fullenName : userData.fullchName}, <FormattedMessage id="welcomeMsg" /> | |||||
| </Typography> | </Typography> | ||||
| </Stack> | </Stack> | ||||
| </div> | </div> | ||||
| @@ -46,7 +49,7 @@ const DashboardDefault = () => { | |||||
| <Grid item xs={12} md={12} sx={{ textAlign: "center" }}> | <Grid item xs={12} md={12} sx={{ textAlign: "center" }}> | ||||
| <Grid container justifyContent="center" spacing={2} sx={{ pt: 2 }} alignitems="stretch" > | <Grid container justifyContent="center" spacing={2} sx={{ pt: 2 }} alignitems="stretch" > | ||||
| <Grid item xs={12} lg={5} sx={{ pt: 2 }} style={{ height: '100%' }}> | <Grid item xs={12} lg={5} sx={{ pt: 2 }} style={{ height: '100%' }}> | ||||
| <Box xs={12} md={12} sx={{ p: 4, border: '3px solid #e1edfc', borderRadius: '10px', backgroundColor: "#e1edfc" }} > | |||||
| <Button xs={12} onClick={()=>{ navigate("/publicNotice/apply");}} style={{ justifyContent: "flex-start" }} sx={{ width: "100%", p: 4, border: '3px solid #e1edfc', borderRadius: '10px', backgroundColor: "#e1edfc" }} > | |||||
| <Stack direction="row" spacing={2}> | <Stack direction="row" spacing={2}> | ||||
| <AdsClickRoundedIcon /> | <AdsClickRoundedIcon /> | ||||
| <Stack direction="column" alignItems="start"> | <Stack direction="column" alignItems="start"> | ||||
| @@ -58,7 +61,7 @@ const DashboardDefault = () => { | |||||
| </Typography> | </Typography> | ||||
| </Stack> | </Stack> | ||||
| </Stack> | </Stack> | ||||
| </Box> | |||||
| </Button> | |||||
| <Stack direction="row" justifyContent="space-between" sx={{ pl: 2, pr: 2, pt: 2 }} > | <Stack direction="row" justifyContent="space-between" sx={{ pl: 2, pr: 2, pt: 2 }} > | ||||
| <Typography variant="h4"> | <Typography variant="h4"> | ||||
| <FormattedMessage id="announcement" /> | <FormattedMessage id="announcement" /> | ||||
| @@ -58,6 +58,8 @@ const Index = () => { | |||||
| console.log(error); | console.log(error); | ||||
| } | } | ||||
| }); | }); | ||||
| }else{ | |||||
| window.location.assign("/iamsmart/loginFail"); | |||||
| } | } | ||||
| } | } | ||||
| @@ -25,6 +25,8 @@ const PaymentDetails_Public = Loadable(lazy(() => import('pages/Payment/Details_ | |||||
| const DemandNote_Public = Loadable(lazy(() => import('pages/DemandNote/Search_Public'))); | const DemandNote_Public = Loadable(lazy(() => import('pages/DemandNote/Search_Public'))); | ||||
| const UserMaintainPage_Individual = Loadable(lazy(() => import('pages/User/DetailsPage_Individual'))); | const UserMaintainPage_Individual = Loadable(lazy(() => import('pages/User/DetailsPage_Individual'))); | ||||
| const UserMaintainPage_Organization = Loadable(lazy(() => import('pages/User/DetailsPage_Organization'))); | const UserMaintainPage_Organization = Loadable(lazy(() => import('pages/User/DetailsPage_Organization'))); | ||||
| const OrganizationDetailPage = Loadable(lazy(() => import('pages/Organization/DetailPage'))); | |||||
| const Msg_Details = Loadable(lazy(() => import('pages/Message/Details'))); | |||||
| // ==============================|| MAIN ROUTING ||============================== // | // ==============================|| MAIN ROUTING ||============================== // | ||||
| @@ -45,75 +47,83 @@ const PublicDashboard = { | |||||
| }, | }, | ||||
| { | { | ||||
| path: 'setting/manageUser', | path: 'setting/manageUser', | ||||
| element: <ManageOrgUser/> | |||||
| element: <ManageOrgUser /> | |||||
| }, | }, | ||||
| { | { | ||||
| path: 'publicNotice', | path: 'publicNotice', | ||||
| element: <PublicNotice/> | |||||
| element: <PublicNotice /> | |||||
| }, | }, | ||||
| { | { | ||||
| path: 'publicNotice/apply', | path: 'publicNotice/apply', | ||||
| element: <PublicNoticeApplyForm/> | |||||
| element: <PublicNoticeApplyForm /> | |||||
| }, | }, | ||||
| { | { | ||||
| path: 'publicNotice/:id', | path: 'publicNotice/:id', | ||||
| element: <PublicNoticeDetail/> | |||||
| element: <PublicNoticeDetail /> | |||||
| }, | }, | ||||
| { | { | ||||
| path: 'proof/reply/:id', | path: 'proof/reply/:id', | ||||
| element: <ProofReply/> | |||||
| element: <ProofReply /> | |||||
| }, | }, | ||||
| { | { | ||||
| path: 'proof/search', | path: 'proof/search', | ||||
| element: <ProofSearch/> | |||||
| element: <ProofSearch /> | |||||
| }, | }, | ||||
| { | { | ||||
| path: 'proof/pay/:id', | path: 'proof/pay/:id', | ||||
| element: <ProofPayment/> | |||||
| element: <ProofPayment /> | |||||
| }, | }, | ||||
| { | { | ||||
| path: 'paymentPage', | path: 'paymentPage', | ||||
| element: <Payment_Multi/> | |||||
| element: <Payment_Multi /> | |||||
| }, | }, | ||||
| { | { | ||||
| path: 'paymentPage/fps', | path: 'paymentPage/fps', | ||||
| element: <Payment_FPS/> | |||||
| element: <Payment_FPS /> | |||||
| }, | }, | ||||
| { | { | ||||
| path: 'paymentPage/card', | path: 'paymentPage/card', | ||||
| element: <Payment_Card/> | |||||
| element: <Payment_Card /> | |||||
| }, | }, | ||||
| { | { | ||||
| path: 'paymentPage/callback', | path: 'paymentPage/callback', | ||||
| element: <Payment_Callback/> | |||||
| element: <Payment_Callback /> | |||||
| }, | }, | ||||
| { | { | ||||
| path: 'paymentPage/fps/fpscallback', | path: 'paymentPage/fps/fpscallback', | ||||
| element: <Payment_FPS_CallBack/> | |||||
| element: <Payment_FPS_CallBack /> | |||||
| }, | }, | ||||
| { | { | ||||
| path: 'paymentPage/fps/ackpage', | path: 'paymentPage/fps/ackpage', | ||||
| element: <Payment_FPS_Ackpage/> | |||||
| element: <Payment_FPS_Ackpage /> | |||||
| }, | }, | ||||
| { | { | ||||
| path: 'paymentPage/search', | path: 'paymentPage/search', | ||||
| element: <PaymentSearch_Public/> | |||||
| element: <PaymentSearch_Public /> | |||||
| }, | }, | ||||
| { | { | ||||
| path: 'paymentPage/details/:id', | path: 'paymentPage/details/:id', | ||||
| element: <PaymentDetails_Public/> | |||||
| element: <PaymentDetails_Public /> | |||||
| }, | }, | ||||
| { | { | ||||
| path: 'paymentPage/demandNote', | path: 'paymentPage/demandNote', | ||||
| element: <DemandNote_Public/> | |||||
| element: <DemandNote_Public /> | |||||
| }, | }, | ||||
| { | { | ||||
| path: '/indUser', | path: '/indUser', | ||||
| element: <UserMaintainPage_Individual /> | element: <UserMaintainPage_Individual /> | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/orgUser', | |||||
| element: <UserMaintainPage_Organization /> | |||||
| path: '/orgUser', | |||||
| element: <UserMaintainPage_Organization /> | |||||
| }, | |||||
| { | |||||
| path: '/org', | |||||
| element: <OrganizationDetailPage /> | |||||
| }, | |||||
| { | |||||
| path: '/msg/details/:id', | |||||
| element: <Msg_Details /> | |||||
| }, | }, | ||||
| ] | ] | ||||
| }, | }, | ||||
| @@ -53,6 +53,12 @@ const Palette = (mode) => { | |||||
| paper: paletteColor.grey[0], | paper: paletteColor.grey[0], | ||||
| default: paletteColor.grey.A50 | default: paletteColor.grey.A50 | ||||
| }, | }, | ||||
| black: { | |||||
| main: '#000', | |||||
| light: '#000', | |||||
| dark: '#000', | |||||
| contrastText: '#FFF', | |||||
| }, | |||||
| gray: { | gray: { | ||||
| main: '#777', | main: '#777', | ||||
| light: '#777', | light: '#777', | ||||
| @@ -341,6 +341,7 @@ | |||||
| "viewAllAnnouncement": "Show all announcements", | "viewAllAnnouncement": "Show all announcements", | ||||
| "systemMessage": "System message", | "systemMessage": "System message", | ||||
| "viewAllSystemMessage": "Show all messages", | "viewAllSystemMessage": "Show all messages", | ||||
| "msgDetails": "Message Details", | |||||
| "Dashboard": "Dashboard", | "Dashboard": "Dashboard", | ||||
| "event": "Event" | "event": "Event" | ||||
| @@ -340,6 +340,7 @@ | |||||
| "viewAllAnnouncement": "显示所有公告", | "viewAllAnnouncement": "显示所有公告", | ||||
| "systemMessage": "系统消息", | "systemMessage": "系统消息", | ||||
| "viewAllSystemMessage": "显示所有消息", | "viewAllSystemMessage": "显示所有消息", | ||||
| "msgDetails": "消息详情", | |||||
| "Dashboard": "仪表板", | "Dashboard": "仪表板", | ||||
| "event": "活动" | "event": "活动" | ||||
| @@ -340,6 +340,7 @@ | |||||
| "viewAllAnnouncement": "顯示所有公告", | "viewAllAnnouncement": "顯示所有公告", | ||||
| "systemMessage": "系統消息", | "systemMessage": "系統消息", | ||||
| "viewAllSystemMessage": "顯示所有消息", | "viewAllSystemMessage": "顯示所有消息", | ||||
| "msgDetails": "消息詳情", | |||||
| "Dashboard": "儀表板", | "Dashboard": "儀表板", | ||||
| "event": "活動" | "event": "活動" | ||||
| @@ -29,6 +29,7 @@ export const GET_PUB_ORG_USER_PATH = apiPath+'/user/pubOrg'; | |||||
| export const POST_PUB_ORG_USER = apiPath+'/user/pubOrg'; | export const POST_PUB_ORG_USER = apiPath+'/user/pubOrg'; | ||||
| export const GET_ORG_PATH = apiPath+'/org'; | export const GET_ORG_PATH = apiPath+'/org'; | ||||
| export const GET_PUB_ORG_PATH = apiPath+'/org/pub'; | |||||
| export const GET_ORG_FROM_USER_PATH = apiPath+'/org/from-user'; | export const GET_ORG_FROM_USER_PATH = apiPath+'/org/from-user'; | ||||
| export const POST_ORG_SAVE_PATH = apiPath+'/org/save'; | export const POST_ORG_SAVE_PATH = apiPath+'/org/save'; | ||||
| export const GET_ORG_COMBO = apiPath+'/org/combo'; | export const GET_ORG_COMBO = apiPath+'/org/combo'; | ||||
| @@ -37,6 +38,10 @@ export const GET_ORG_MARK_AS_CREDITOR = apiPath+'/org/mark-as-creditor'; | |||||
| export const GET_ORG_MARK_AS_NON_CREDITOR = apiPath+'/org/mark-as-non-creditor'; | export const GET_ORG_MARK_AS_NON_CREDITOR = apiPath+'/org/mark-as-non-creditor'; | ||||
| export const GET_ORG_EXPORT = apiPath+'/org/export'; | export const GET_ORG_EXPORT = apiPath+'/org/export'; | ||||
| export const GET_MSG_DETAILS = apiPath+'/msg/details'; | |||||
| export const GET_MSG_LIST = apiPath+'/msg/list'; | |||||
| export const GET_MSG_DESHBOARD = apiPath+'/msg/list/deshboard'; | |||||
| //File Up/Download | //File Up/Download | ||||