@@ -127,7 +127,7 @@ | |||
visibility: hidden; | |||
opacity: 0; | |||
min-width: 16rem; | |||
position: absolute; | |||
position: relative; | |||
/* transition: all 0.5s ease; */ | |||
left: 0; | |||
display: none; | |||
@@ -39,7 +39,7 @@ import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown'; | |||
import Logo from 'components/Logo'; | |||
import AdminLogo from 'components/AdminLogo'; | |||
import MobileLogo from 'components/MobileLogo'; | |||
import Profile from './HeaderContent/Profile'; | |||
//import Profile from './HeaderContent/Profile'; | |||
import "assets/style/navbarStyles.css"; | |||
import { | |||
isUserLoggedIn, | |||
@@ -59,7 +59,7 @@ import { Link } from "react-router-dom"; | |||
import LocaleSelector from "./HeaderContent/LocaleSelector"; | |||
import { FormattedMessage } from "react-intl"; | |||
const drawerWidth = 240; | |||
const drawerWidth = 300; | |||
// const navItems = ['Home', 'About', 'Contact']; | |||
// ==============================|| MAIN LAYOUT - HEADER ||============================== // | |||
@@ -135,11 +135,11 @@ function Header(props) { | |||
</ul> | |||
</li> | |||
<li> | |||
<Link className="emailTemplate" to='/emailTemplate'><Typography style={{ opacity: 0.9 }} variant={"pnspsHeaderTitle"} sx={{ ml: 0 }}>Email Template</Typography></Link> | |||
<Link className="emailTemplate" to='/emailTemplate'><Typography style={{ opacity: 0.9 }} variant={"pnspsHeaderTitle"} sx={{ ml: 1 }}>Email Template</Typography></Link> | |||
</li> | |||
{/* <li> | |||
<li> | |||
<Link className="logout" onClick={handleLogout}><Typography variant={"pnspsHeaderTitle"} sx={{ ml: 2 }}>Logout</Typography></Link> | |||
</li> */} | |||
</li> | |||
</div> | |||
: | |||
<div id="individualUserContent"> | |||
@@ -174,7 +174,9 @@ function Header(props) { | |||
</Typography></Link> | |||
</li> | |||
<li> | |||
<Link className="manageOrgUser" to='/paymentPage/demandNote'><Typography style={{ opacity: 0.9 }} variant={"pnspsHeaderTitle"} sx={{ ml: 1 }}>繳款通知記錄</Typography></Link> | |||
<Link className="manageOrgUser" to='/paymentPage/demandNote'><Typography style={{ opacity: 0.9 }} variant={"pnspsHeaderTitle"} sx={{ ml: 1 }}> | |||
<FormattedMessage id="paymentInfoRecord" /> | |||
</Typography></Link> | |||
</li> | |||
</ul> | |||
</> | |||
@@ -241,9 +243,11 @@ function Header(props) { | |||
</> | |||
} | |||
</li> | |||
{/* <li> | |||
<Link className="logout" onClick={handleLogout}><Typography variant={"pnspsHeaderTitle"} sx={{ ml: 2 }}>登出</Typography></Link> | |||
</li> */} | |||
<li> | |||
<Link className="logout" onClick={handleLogout}><Typography variant={"pnspsHeaderTitle"} sx={{ ml: 2 }}> | |||
<FormattedMessage id="logout" /> | |||
</Typography></Link> | |||
</li> | |||
</div> | |||
); | |||
@@ -268,7 +272,7 @@ function Header(props) { | |||
const drawer = ( | |||
isUserLoggedIn() ? | |||
<Stack id="sidebar" direction="column" justifyContent="center" alignItems="center" /*onClick={handleDrawerToggle}*/ sx={{ textAlign: 'center' }}> | |||
<Stack id="sidebar" direction="column" justifyContent="center" alignItems="center" /*onClick={handleDrawerToggle}*/ sx={{ textAlign: 'center', width: '300px' }}> | |||
<Typography variant="h6" sx={{ my: 2 }}> | |||
PNSPS | |||
</Typography> | |||
@@ -386,7 +390,7 @@ function Header(props) { | |||
: | |||
<LocaleSelector /> | |||
} | |||
<Profile /> | |||
{/*<Profile />*/} | |||
</Grid> | |||
</Grid> | |||
</Stack> | |||
@@ -467,7 +471,7 @@ function Header(props) { | |||
</ul> | |||
<LocaleSelector /> | |||
{/* <Profile /> */} | |||
{/*<Profile />*/} | |||
</Stack> | |||
</Box> | |||
</Toolbar> | |||
@@ -31,7 +31,7 @@ export default function SearchDemandNote({ recordList }) { | |||
const columns = [ | |||
{ | |||
field: 'dnNo', | |||
headerName: '繳款單號', | |||
headerName: intl.formatMessage({id: 'paymentRecordId'}), | |||
width: 200, | |||
}, | |||
{ | |||
@@ -42,7 +42,7 @@ export default function SearchDemandNote({ recordList }) { | |||
{ | |||
id: 'issueDate', | |||
field: 'issueDate', | |||
headerName: '簽發日期', | |||
headerName: intl.formatMessage({id: 'receiptDate'}), | |||
width: 175, | |||
valueGetter: (params) => { | |||
return DateUtils.dateStr(params?.value); | |||
@@ -58,7 +58,7 @@ export default function SearchDemandNote({ recordList }) { | |||
}, | |||
{ | |||
field: 'sentDate', | |||
headerName: '發送日期', | |||
headerName: intl.formatMessage({id: 'sendDate'}), | |||
flex: 1, | |||
valueGetter: (params) => { | |||
return params?.value ? DateUtils.datetimeStr(params?.value) + " - " + params.row.sentBy : ""; | |||
@@ -66,7 +66,7 @@ export default function SearchDemandNote({ recordList }) { | |||
}, | |||
{ | |||
field: 'filename', | |||
headerName: '檔案', | |||
headerName: intl.formatMessage({id: 'files'}), | |||
flex: 1, | |||
renderCell: (params) => { | |||
return <Button onClick={onDownloadClick(params)}><u>{params.row.filename}</u></Button>; | |||
@@ -133,7 +133,7 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData | |||
fullWidth | |||
{...register("dnNo")} | |||
id='dnNo' | |||
label="繳款單號" | |||
label={intl.formatMessage({id: 'paymentRecordId'})} | |||
defaultValue={searchCriteria.dnNo} | |||
InputLabelProps={{ | |||
shrink: true | |||
@@ -147,7 +147,7 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData | |||
{...register("dateFrom")} | |||
id="dateFrom" | |||
type="date" | |||
label={"發送日期(從)"} | |||
label={intl.formatMessage({id: 'sendDateFrom'})} | |||
defaultValue={searchCriteria.dateFrom} | |||
InputProps={{ inputProps: { max: maxDate } }} | |||
onChange={(newValue) => { | |||
@@ -172,7 +172,7 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData | |||
}} | |||
id="dateTo" | |||
type="date" | |||
label={"發送日期(到)"} | |||
label={intl.formatMessage({id: 'sendDateTo'})} | |||
defaultValue={searchCriteria.dateTo} | |||
/> | |||
</Grid> | |||
@@ -182,6 +182,7 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData | |||
<Autocomplete | |||
{...register("status")} | |||
id="status" | |||
size="small" | |||
options={ComboData.denmandNoteStatus_Public} | |||
getOptionLabel={(option) => option.labelCht} | |||
inputValue={selectedStatus?.labelCht ? selectedStatus?.labelCht : ""} | |||
@@ -233,7 +234,9 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData | |||
textTransform: 'capitalize', | |||
alignItems: 'end' | |||
}}> | |||
<Typography variant="h5">提交</Typography> | |||
<Typography variant="h5"> | |||
<FormattedMessage id="submit" /> | |||
</Typography> | |||
</Button> | |||
</Grid> | |||
</Grid> | |||
@@ -16,6 +16,7 @@ const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/Loa | |||
const SearchForm = Loadable(React.lazy(() => import('./SearchForm'))); | |||
const EventTable = Loadable(React.lazy(() => import('./DataGrid'))); | |||
import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | |||
import {FormattedMessage} from "react-intl"; | |||
const BackgroundHead = { | |||
backgroundImage: `url(${titleBackgroundImg})`, | |||
@@ -97,7 +98,9 @@ const UserSearchPage_Individual = () => { | |||
<Grid item xs={12}> | |||
<div style={BackgroundHead}> | |||
<Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> | |||
<Typography ml={15} color='#FFF' variant="h4">繳款通知記錄</Typography> | |||
<Typography ml={15} color='#FFF' variant="h4"> | |||
<FormattedMessage id="paymentInfoRecord" /> | |||
</Typography> | |||
</Stack> | |||
</div> | |||
</Grid> | |||
@@ -35,7 +35,7 @@ const PaymentDetails = ({ formData,doPrint }) => { | |||
}, [data]); | |||
const getPaymentMethod=()=>{ | |||
let paymentmethod = data.payload.paymentdetail.paymentmethod; | |||
let paymentmethod = data?.payload?.paymentdetail?.paymentmethod; | |||
if("01" == paymentmethod) return "PPS"; | |||
if("02" == paymentmethod || "03" == paymentmethod) return "Credit Card"; | |||
if("04" == paymentmethod) return "FPS"; | |||
@@ -90,7 +90,7 @@ const AckPage = () => { | |||
}, | |||
onSuccess: function(responseData){ | |||
setResponeDataData(responseData) | |||
setPaymentId(responseData.paymentdetail.paymentid) | |||
if (responseData.paymentdetail?.result?.paymentstatuscode === "APPR") { | |||
localStorage.removeItem("webtoken"); | |||
localStorage.removeItem("transactionid"); | |||
@@ -111,6 +111,7 @@ const AckPage = () => { | |||
setItemList(responseData2.paymentItemList) | |||
setPaymentData(responseData2.data); | |||
localStorage.removeItem("paymentId"); | |||
setPaymentId(responseData2.id) | |||
} | |||
}); | |||
} | |||
@@ -176,6 +176,7 @@ const Index = () => { | |||
+ encodeURIComponent("https://"+window.location.hostname+ '/paymentPage/fps/fpscallback?TRANSACTION_ID='+paymentData.transactionid+"&WEB_TOKEN="+paymentData.webtoken+"&PAYMENT_ID="+localStorage.getItem("paymentId")); | |||
setFpsqrcodeurl(openPASGUrl) | |||
setFpsqrcodeurlPrd(openPASGUrlPrd) | |||
} | |||
}); | |||
@@ -113,7 +113,6 @@ const Index = () => { | |||
}, | |||
onSuccess: function (responseData) { | |||
setResponeDataData(responseData) | |||
setPaymentId(responseData.paymentdetail.paymentid) | |||
if (responseData.paymentdetail?.result?.paymentstatuscode === "APPR") { | |||
localStorage.removeItem("webtoken"); | |||
localStorage.removeItem("transactionid"); | |||
@@ -134,6 +133,7 @@ const Index = () => { | |||
setItemList(responseData2.paymentItemList) | |||
setPaymentData(responseData2.data); | |||
localStorage.removeItem("paymentId"); | |||
setPaymentId(responseData2.id) | |||
} | |||
}); | |||
} | |||
@@ -74,7 +74,7 @@ export default function BaseGrid({rows}) { | |||
{ | |||
id: 'remarks', | |||
field: 'remarks', | |||
headerName: isORGLoggedIn()?"Care Of / 我的備註": intl.formatMessage({id: 'myRemarks'}), | |||
headerName: isORGLoggedIn()? intl.formatMessage({id: 'gazetteCount2_1'}) : intl.formatMessage({id: 'myRemarks'}), | |||
width: isMdOrLg ? 'auto' : 400, | |||
flex: isMdOrLg ? 3 : undefined, | |||
renderCell: (params) => ( | |||
@@ -160,7 +160,7 @@ export default function SubmittedTab({ rows }) { | |||
{ | |||
id: 'remarks', | |||
field: 'remarks', | |||
headerName: isORGLoggedIn() ? "Care Of / 我的備註" : intl.formatMessage({id: 'myRemarks'}), | |||
headerName: isORGLoggedIn() ? intl.formatMessage({id: 'gazetteCount2_1'}) : intl.formatMessage({id: 'myRemarks'}), | |||
width: isMdOrLg ? 'auto' : 400, | |||
flex: isMdOrLg ? 3 : undefined, | |||
renderCell: (params) => ( | |||
@@ -77,7 +77,7 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||
{ | |||
id: 'remarks', | |||
field: 'remarks', | |||
headerName: isORGLoggedIn()?"Care Of / 我的備註": intl.formatMessage({id: 'myRemarks'}), | |||
headerName: isORGLoggedIn()? intl.formatMessage({id: 'gazetteCount2_1'}) : intl.formatMessage({id: 'myRemarks'}), | |||
width: isMdOrLg ? 'auto' : 400, | |||
flex: isMdOrLg ? 3 : undefined, | |||
renderCell: (params) => ( | |||
@@ -2,7 +2,7 @@ | |||
import { FiDataGrid } from "components/FiDataGrid"; | |||
import { | |||
Typography, Button, Grid, Stack | |||
Typography, Button, Grid, Stack, useMediaQuery | |||
} from '@mui/material'; | |||
import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | |||
@@ -13,6 +13,7 @@ import * as HttpUtils from "utils/HttpUtils"; | |||
import * as UrlUtils from "utils/ApiPathConst"; | |||
import * as DateUtils from "utils/DateUtils"; | |||
import {FormattedMessage, useIntl} from "react-intl"; | |||
import {useTheme} from "@emotion/react"; | |||
const BackgroundHead = { | |||
backgroundImage: `url(${titleBackgroundImg})`, | |||
@@ -31,6 +32,8 @@ const BackgroundHead = { | |||
const ManageOrgUserPage = () => { | |||
const [rows, setRows] = React.useState([]); | |||
const intl = useIntl(); | |||
const theme = useTheme(); | |||
const isMdOrLg = useMediaQuery(theme.breakpoints.up('md')); | |||
const _sx = { | |||
padding: "4 2 4 2", | |||
@@ -81,14 +84,16 @@ const ManageOrgUserPage = () => { | |||
if (params.row.locked) { | |||
return ( | |||
<> | |||
{getStatusTag({ color: "#525150", text: "鎖定" })} | |||
<Button variant="outlined" onClick={() => onActiveClick(params)}>解鎖</Button> | |||
{getStatusTag({ color: "#525150", text: intl.formatMessage({id: 'locked'}) })} | |||
<Button variant="outlined" onClick={() => onActiveClick(params)}> | |||
<FormattedMessage id="unlock" /> | |||
</Button> | |||
</> | |||
) | |||
} else if (!params.row.verifiedBy) { | |||
return getStatusTag({ color: "#fca503", text: "待批核" }) | |||
} else if (params.row.status == "active") { | |||
return getStatusTag({ color: "#73AD21", text: "生效中" }) | |||
return getStatusTag({ color: "#fca503", text: intl.formatMessage({id: 'pendingFor'}) }) | |||
} else if (params.row.status === "active") { | |||
return getStatusTag({ color: "#73AD21", text: intl.formatMessage({id: 'active'}) }) | |||
} | |||
return getStatusTag({ text: params.row.status }) | |||
} | |||
@@ -117,22 +122,25 @@ const ManageOrgUserPage = () => { | |||
{ | |||
id: 'username', | |||
field: 'username', | |||
headerName: getHeader('登錄名稱'), | |||
flex: 1, | |||
headerName: getHeader(intl.formatMessage({id: 'loginName'})), | |||
width: isMdOrLg ? 'auto' : 160, | |||
flex: isMdOrLg ? 1 : undefined, | |||
}, | |||
{ | |||
id: 'contactPerson', | |||
field: 'contactPerson', | |||
headerName: getHeader('用戶名稱'), | |||
flex: 1, | |||
headerName: getHeader(intl.formatMessage({id: 'userName'})), | |||
width: isMdOrLg ? 'auto' : 160, | |||
flex: isMdOrLg ? 1 : undefined, | |||
}, | |||
{ | |||
id: 'contactTel', | |||
field: 'contactTel', | |||
headerName: getHeader('聯絡電話'), | |||
flex: 1, | |||
headerName: getHeader(intl.formatMessage({id: 'userContactNumber'})), | |||
width: isMdOrLg ? 'auto' : 160, | |||
flex: isMdOrLg ? 1 : undefined, | |||
valueGetter: (params) => { | |||
let contactTel = JSON.parse(params.value) | |||
return contactTel?.countryCode + " " + contactTel?.phoneNumber; | |||
@@ -141,14 +149,16 @@ const ManageOrgUserPage = () => { | |||
{ | |||
id: 'emailBus', | |||
field: 'emailBus', | |||
headerName: getHeader('電郵'), | |||
flex: 1, | |||
headerName: getHeader(intl.formatMessage({id: 'userContactEmail'})), | |||
width: isMdOrLg ? 'auto' : 160, | |||
flex: isMdOrLg ? 1 : undefined, | |||
}, | |||
{ | |||
id: 'lastLogin', | |||
field: 'lastLogin', | |||
headerName: getHeader('最後登入日期'), | |||
flex: 1, | |||
headerName: getHeader(intl.formatMessage({id: 'lastLoginDate'})), | |||
width: isMdOrLg ? 'auto' : 160, | |||
flex: isMdOrLg ? 1 : undefined, | |||
valueGetter: (params) => { | |||
return DateUtils.datetimeStr(params.value); | |||
} | |||
@@ -156,8 +166,9 @@ const ManageOrgUserPage = () => { | |||
{ | |||
id: 'lastApply', | |||
field: 'lastApply', | |||
headerName: getHeader('最後提交申請日期'), | |||
flex: 1, | |||
headerName: getHeader(intl.formatMessage({id: 'lastSubmissionDate'})), | |||
width: isMdOrLg ? 'auto' : 160, | |||
flex: isMdOrLg ? 1 : undefined, | |||
valueGetter: () => { | |||
return "--"; | |||
} | |||
@@ -166,7 +177,8 @@ const ManageOrgUserPage = () => { | |||
field: 'actions', | |||
type: 'actions', | |||
headerName: getHeader(intl.formatMessage({id: 'status'})), | |||
flex: 1, | |||
width: isMdOrLg ? 'auto' : 160, | |||
flex: isMdOrLg ? 1 : undefined, | |||
cellClassName: 'actions', | |||
getActions: (params) => { | |||
return [getStatus(params)] | |||
@@ -176,8 +188,9 @@ const ManageOrgUserPage = () => { | |||
id: 'primaryUser', | |||
field: 'primaryUser', | |||
type: 'bool', | |||
headerName: getHeader('Primary'), | |||
flex: 1, | |||
headerName: getHeader(intl.formatMessage({id: 'primary'})), | |||
width: isMdOrLg ? 'auto' : 160, | |||
flex: isMdOrLg ? 1 : undefined, | |||
renderCell: (params) => { | |||
console.log(params); | |||
return ( | |||
@@ -9,7 +9,7 @@ import Typography from '@mui/material/Typography'; | |||
import iAmSmartICon from 'assets/images/icons/icon_iAmSmart.png'; | |||
import banner from 'assets/images/bg_ml.jpg'; | |||
import { Stack } from '../../../node_modules/@mui/material/index'; | |||
import { iAmSmartPath, iAmSmartAppPath, clientId, getBowserType, isAppBowser, iAmSmartCallbackPath} from 'auth/utils' | |||
import { iAmSmartPath, clientId, getBowserType, isAppBowser, iAmSmartCallbackPath} from 'auth/utils' | |||
import * as React from 'react'; | |||
import {FormattedMessage, useIntl} from "react-intl"; | |||
@@ -48,20 +48,17 @@ const RegisterCustom = () => { | |||
} | |||
const openApp = () => { | |||
setTimeout(function () { | |||
openQR(); | |||
}, 1000); | |||
let callbackUrl = "https://" + iAmSmartCallbackPath() + "/iamsmart/registrycallback"; | |||
let url = iAmSmartAppPath + "auth" | |||
let callbackUrl = "https://"+iAmSmartCallbackPath()+"/iamsmart/registrycallback"; | |||
let url = iAmSmartPath + "/api/v1/auth/getQR" | |||
+ "?clientID=" + clientId | |||
+ "&responseType=code" | |||
+ "&source=" + getBowserType() | |||
+ "&redirectURI=" + encodeURIComponent(callbackUrl) | |||
+ "&scope=" + encodeURIComponent("eidapi_auth eidapi_profiles") | |||
+ "&lang=zh-HK"//en-US, zh-HK, or zh-CN | |||
+"&source=" + getBowserType() | |||
+"&redirectURI="+encodeURIComponent(callbackUrl) | |||
+"&scope="+encodeURIComponent("eidapi_auth eidapi_profiles") | |||
+"&lang=zh-HK"//en-US, zh-HK, or zh-CN | |||
//+"&state=" | |||
+ "&brokerPage=false" | |||
window.location=url; | |||
+"&brokerPage=true" | |||
window.location.assign(url); | |||
} | |||
return ( | |||
@@ -6,7 +6,8 @@ import React, { | |||
import { Link as RouterLink } from 'react-router-dom'; | |||
import { useNavigate } from 'react-router-dom'; | |||
import { useForm, } from 'react-hook-form' | |||
import { iAmSmartPath, iAmSmartAppPath, clientId, getBowserType, isAppBowser, iAmSmartCallbackPath } from 'auth/utils' | |||
import { iAmSmartPath, clientId, getBowserType, isAppBowser, iAmSmartCallbackPath } from 'auth/utils' | |||
//iAmSmartAppPath | |||
// material-ui | |||
import { | |||
@@ -193,11 +194,26 @@ const AuthLoginCustom = () => { | |||
} | |||
const openApp = () => { | |||
setTimeout(function () { | |||
openQR(); | |||
}, 1000); | |||
// setTimeout(function () { | |||
// openQR(); | |||
// }, 1000); | |||
// let callbackUrl = "https://" + iAmSmartCallbackPath() + "/iamsmart/authcallback"; | |||
// let source = getBowserType() | |||
// console.log(source) | |||
// let url = iAmSmartAppPath + "auth" | |||
// + "?clientID=" + clientId | |||
// + "&responseType=code" | |||
// + "&source=" + getBowserType() | |||
// + "&redirectURI=" + encodeURIComponent(callbackUrl) | |||
// + "&scope=" + encodeURIComponent("eidapi_auth eidapi_profiles") | |||
// + "&lang=zh-HK"//en-US, zh-HK, or zh-CN | |||
// //+"&state=" | |||
// + "&brokerPage=true" | |||
// window.location=url; | |||
let callbackUrl = "https://" + iAmSmartCallbackPath() + "/iamsmart/authcallback"; | |||
let url = iAmSmartAppPath + "auth" | |||
let url = iAmSmartPath + "/api/v1/auth/getQR" | |||
+ "?clientID=" + clientId | |||
+ "&responseType=code" | |||
+ "&source=" + getBowserType() | |||
@@ -205,8 +221,9 @@ const AuthLoginCustom = () => { | |||
+ "&scope=" + encodeURIComponent("eidapi_auth eidapi_profiles") | |||
+ "&lang=zh-HK"//en-US, zh-HK, or zh-CN | |||
//+"&state=" | |||
+ "&brokerPage=false" | |||
window.location=url; | |||
+ "&brokerPage=true" | |||
window.location=url; | |||
} | |||
@@ -0,0 +1,30 @@ | |||
// material-ui | |||
import { | |||
Stack, | |||
Typography | |||
} from '@mui/material'; | |||
import MainCard from "components/MainCard"; | |||
import * as React from "react"; | |||
// ==============================|| DASHBOARD - DEFAULT ||============================== // | |||
const SearchDemandNoteForm = () => { | |||
return ( | |||
<MainCard xs={12} md={12} lg={12} | |||
border={false} | |||
content={false} | |||
sx={{ backgroundColor: '#fff' }} | |||
> | |||
<Stack direction="column" spacing={3}> | |||
<Stack direction="row" spacing={3}> | |||
<Typography></Typography> | |||
<Typography align="justify"></Typography> | |||
</Stack> | |||
</Stack> | |||
</MainCard> | |||
); | |||
}; | |||
export default SearchDemandNoteForm; |
@@ -0,0 +1,31 @@ | |||
// material-ui | |||
import { | |||
Typography, | |||
Stack | |||
} from '@mui/material'; | |||
import MainCard from "components/MainCard"; | |||
import * as React from "react"; | |||
// ==============================|| DASHBOARD - DEFAULT ||============================== // | |||
const SearchDemandNoteForm = () => { | |||
return ( | |||
<MainCard xs={12} md={12} lg={12} | |||
border={false} | |||
content={false} | |||
spacing={2} | |||
> | |||
<Stack direction="column" spacing={3}> | |||
<Stack direction="row" spacing={3}> | |||
<Typography></Typography> | |||
<Typography align="justify"></Typography> | |||
</Stack> | |||
</Stack> | |||
</MainCard> | |||
); | |||
}; | |||
export default SearchDemandNoteForm; |
@@ -4,13 +4,19 @@ | |||
import { | |||
Grid, | |||
Typography, | |||
Stack | |||
Stack, | |||
Button, | |||
Box | |||
} from '@mui/material'; | |||
import { | |||
isORGLoggedIn, | |||
} from "utils/Utils"; | |||
import { isORGLoggedIn, } from "utils/Utils"; | |||
import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | |||
import {FormattedMessage} from "react-intl"; | |||
import AdsClickRoundedIcon from '@mui/icons-material/AdsClickRounded'; | |||
import * as React from "react"; | |||
import Loadable from 'components/Loadable'; | |||
const Message = Loadable(React.lazy(() => import('./Message'))); | |||
const Notice = Loadable(React.lazy(() => import('./Notice'))); | |||
// ==============================|| DASHBOARD - DEFAULT ||============================== // | |||
const DashboardDefault = () => { | |||
@@ -20,23 +26,68 @@ const DashboardDefault = () => { | |||
backgroundImage: `url(${titleBackgroundImg})`, | |||
width: '100%', | |||
height: '100%', | |||
backgroundSize:'contain', | |||
backgroundSize: 'contain', | |||
backgroundRepeat: 'no-repeat', | |||
backgroundColor: '#0C489E', | |||
backgroundPosition: 'right' | |||
} | |||
return ( | |||
<Grid container sx={{minHeight: '90vh'}} direction="column"> | |||
<Grid container sx={{ minHeight: '90vh' }} direction="column"> | |||
<Grid item xs={12} > | |||
<div style={BackgroundHead}> | |||
<Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> | |||
{/* <Typography variant="h5">我的公共啟事</Typography> */} | |||
<Typography ml={10} color='#FFF' variant="h5"> | |||
<Typography color='#FFF' variant="h5" sx={{ ml:10, display:{ xs: 'none', sm:'none', md:'block'}}}> | |||
{isORGLoggedIn() ?userData.fullenName:userData.fullchName}, <FormattedMessage id="welcomeMsg"/> | |||
</Typography> | |||
</Stack> | |||
</div> | |||
</Grid> | |||
<Grid item xs={12} md={12} sx={{ textAlign: "center" }}> | |||
<Grid container justifyContent="center" spacing={2} sx={{ pt: 2 }} alignitems="stretch" > | |||
<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" }} > | |||
<Stack direction="row" spacing={2}> | |||
<AdsClickRoundedIcon /> | |||
<Stack direction="column" alignItems="start"> | |||
<Typography variant="h4" > | |||
<FormattedMessage id="submitApplication" /> | |||
</Typography> | |||
<Typography > | |||
<FormattedMessage id="applicationSubheading" /> | |||
</Typography> | |||
</Stack> | |||
</Stack> | |||
</Box> | |||
<Stack direction="row" justifyContent="space-between" sx={{ pl: 2, pr: 2, pt: 2 }} > | |||
<Typography variant="h4"> | |||
<FormattedMessage id="announcement" /> | |||
</Typography> | |||
<Button color="gray"><u> | |||
<FormattedMessage id="viewAllAnnouncement" /> | |||
</u></Button> | |||
</Stack> | |||
<Box xs={12} md={12} sx={{ p: 1, border: '3px solid #eee', borderRadius: '10px' }} > | |||
<Notice | |||
/> | |||
</Box> | |||
</Grid> | |||
<Grid item xs={12} lg={5} sx={{ pt: 2 }} style={{ height: '100%' }}> | |||
<Stack direction="row" justifyContent="space-between" sx={{ pl: 2, pr: 2, pt: 2 }} > | |||
<Typography variant="h4"> | |||
<FormattedMessage id="systemMessage" /> | |||
</Typography> | |||
<Button color="gray"><u> | |||
<FormattedMessage id="viewAllSystemMessage" /> | |||
</u></Button> | |||
</Stack> | |||
<Box xs={12} md={12} sx={{ p: 1, border: '3px solid #eee', borderRadius: '10px' }} > | |||
<Message | |||
/> | |||
</Box> | |||
</Grid> | |||
</Grid> | |||
</Grid> | |||
</Grid> | |||
); | |||
}; | |||
@@ -56,9 +56,11 @@ const Index = () => { | |||
}, | |||
onError:(error)=>{ | |||
console.log(error); | |||
//window.location.assign("/iamsmart/loginFail"); | |||
window.location.assign("/iamsmart/loginFail"); | |||
} | |||
}); | |||
}else{ | |||
window.location.assign("/iamsmart/loginFail"); | |||
} | |||
} | |||
@@ -18,24 +18,22 @@ const Index = () => { | |||
const navigate = useNavigate() | |||
React.useEffect(() => { | |||
getPrfile(); | |||
goLogin(); | |||
}, []); | |||
function getPrfile(){ | |||
function goLogin(){ | |||
dispatch(handleLogoutFunction()); | |||
let params = new URLSearchParams(window.location.search) | |||
if(params.get("code")){ | |||
HttpUtils.post({ | |||
url: UrlUtils.GET_SMART_LOGIN, | |||
url: UrlUtils.GET_SMART_DIRECT_LOGIN, | |||
params:{ | |||
code: params.get("code") | |||
}, | |||
onSuccess: (responseData) => { | |||
//navigate('/iAmSmartRegisterFrom', { state: { responseData: responseData } }); | |||
console.log(response) | |||
console.log("responseData"); | |||
console.log(responseData); | |||
const userData = { | |||
id: responseData.id, | |||
fullenName: responseData.name, | |||
@@ -48,17 +46,16 @@ const Index = () => { | |||
//avatar: require('src/assets/images/users/avatar-3.png').default, | |||
} | |||
const data = { ...userData, accessToken: responseData.accessToken, refreshToken: responseData.refreshToken } | |||
// setSuccess(true) | |||
dispatch(handleLogin(data)) | |||
navigate('/dashboard'); | |||
location.reload() | |||
}, | |||
onFail: ()=>{ | |||
window.location.assign("/login"); | |||
onFail: (response)=>{ | |||
console.log("Fail"); | |||
console.log(response); | |||
window.location.assign("/iamsmart/loginFail"); | |||
}, | |||
onError:()=>{ | |||
window.location.assign("/login"); | |||
onError:(error)=>{ | |||
console.log(error); | |||
} | |||
}); | |||
} |
@@ -27,14 +27,22 @@ const Index = () => { | |||
}, | |||
onSuccess: (responseData) => { | |||
navigate('/iAmSmartRegisterFrom', { state: { responseData: responseData } }); | |||
}, | |||
onFail: (response)=>{ | |||
console.log("Fail"); | |||
console.log(response); | |||
window.location.assign("/register"); | |||
}, | |||
onError:(error)=>{ | |||
console.log(error); | |||
window.location.assign("/register"); | |||
} | |||
}); | |||
}else{ | |||
window.location.assign("/register"); | |||
} | |||
} | |||
return ( | |||
<LoadingComponent /> | |||
); | |||
@@ -12,7 +12,8 @@ const RegisterForm = Loadable(lazy(() => import('pages/authentication/Register') | |||
const BusRegisterForm = Loadable(lazy(() => import('pages/authentication/BusRegister'))); | |||
const IAmSmartRegister = Loadable(lazy(() => import('pages/authentication/IAmSmartRegister'))); | |||
const ErrorPage = Loadable(lazy(() => import('pages/extra-pages/ErrorPage'))); | |||
const IAmSmart_FallCallback = Loadable(lazy(() => import('pages/iAmSmart/FallCallback'))); | |||
const IAmSmart_DirectLoginCallback = Loadable(lazy(() => import('pages/iAmSmart/DirectLoginCallback'))); | |||
//const IAmSmart_FallCallback = Loadable(lazy(() => import('pages/iAmSmart/FallCallback'))); | |||
const IAmSmart_FailCallback = Loadable(lazy(() => import('pages/iAmSmart/FailCallback'))); | |||
const IAmSmart_SuccessCallback = Loadable(lazy(() => import('pages/iAmSmart/SuccessCallback'))); | |||
const IAmSmart_AuthCallback = Loadable(lazy(() => import('pages/iAmSmart/AuthCallback'))); | |||
@@ -60,11 +61,11 @@ const LoginRoutes = { | |||
}, | |||
{ | |||
path: 'iamsmart/logincallback', | |||
element: <IAmSmart_FallCallback/> | |||
element: <IAmSmart_DirectLoginCallback/> | |||
}, | |||
{ | |||
path: 'iamsmart/loginfallback', | |||
element: <IAmSmart_FallCallback/> | |||
element: <IAmSmart_FailCallback/> | |||
}, | |||
{ | |||
path: 'iamsmart/authcallback', | |||
@@ -53,6 +53,12 @@ const Palette = (mode) => { | |||
paper: paletteColor.grey[0], | |||
default: paletteColor.grey.A50 | |||
}, | |||
gray: { | |||
main: '#777', | |||
light: '#777', | |||
dark: '#777', | |||
contrastText: '#FFF', | |||
}, | |||
white: { | |||
main: '#fff', | |||
light: '#fff', | |||
@@ -242,7 +242,7 @@ | |||
"cancelled": "Cancelled", | |||
"withdrawn": "Withdrawn", | |||
"searchApplyRecord": "Search application record", | |||
"applicationId": "Application number", | |||
"applicationId": "Application ID", | |||
"submitDate": "Submit date", | |||
"submitDateFrom": "Submit date (from)", | |||
"submitDateTo": "Submit date (to)", | |||
@@ -281,6 +281,7 @@ | |||
"applyStatus": "Application Status", | |||
"gazetteCount": "Gazette issues number", | |||
"gazetteCount2" :"Gazette issues number / Remarks", | |||
"gazetteCount2_1" :"Care Of / Remarks", | |||
"gazetteCount3" :"Gazette issues number / Care Of/ Remarks", | |||
"publishDate": "Publish date", | |||
"draftFile": "Manuscript file", | |||
@@ -318,6 +319,29 @@ | |||
"transactionTime": "Transaction time", | |||
"paymentRefCode": "Payment Reference Number", | |||
"paymentInfoRecord": "Payment Notice Record", | |||
"paymentRecordId": "Payment record number", | |||
"receiptDate": "Issuance date", | |||
"sendDate": "Send date", | |||
"sendDateFrom": "Send date (from)", | |||
"sendDateTo": "Send date (to)", | |||
"files": "File(s)", | |||
"loginName": "Login Name", | |||
"lastLoginDate": "Last login date", | |||
"lastSubmissionDate": "Last submission date", | |||
"locked": "Locked", | |||
"unlock": "Unlock", | |||
"pendingFor": "Pending approval", | |||
"active": "Active", | |||
"primary": "Primary", | |||
"submitApplication": "Submit public notice application", | |||
"applicationSubheading": "Provide your advertisement content with formatting, proofreading and pricing.", | |||
"announcement": "Announcement", | |||
"viewAllAnnouncement": "Show all announcements", | |||
"systemMessage": "System message", | |||
"viewAllSystemMessage": "Show all messages", | |||
"Dashboard": "Dashboard", | |||
"event": "Event" | |||
} |
@@ -280,6 +280,7 @@ | |||
"applyStatus": "申请状态", | |||
"gazetteCount": "宪报期数", | |||
"gazetteCount2" :"宪报期数 / 我的备注", | |||
"gazetteCount2_1" :"Care Of / 我的备注", | |||
"gazetteCount3" :"宪报期数 / Care Of/ 我的备注", | |||
"publishDate": "发布日期", | |||
"draftFile": "稿件档案", | |||
@@ -317,6 +318,29 @@ | |||
"transactionTime": "交易时间", | |||
"paymentRefCode": "付款参考号码", | |||
"paymentInfoRecord": "缴款通知记录", | |||
"paymentRecordId": "缴款单号", | |||
"receiptDate": "签发日期", | |||
"sendDate": "发送日期", | |||
"sendDateFrom": "发送日期(从)", | |||
"sendDateTo": "发送日期(到)", | |||
"files": "档案", | |||
"loginName": "登录名称", | |||
"lastLoginDate": "最后登入日期", | |||
"lastSubmissionDate": "最后提交申请日期", | |||
"locked": "锁定", | |||
"unlock": "解锁", | |||
"pendingFor": "待批核", | |||
"active": "生效中", | |||
"primary": "源自", | |||
"submitApplication": "提交公共启事申请", | |||
"applicationSubheading": "提供你的启事内容作排版,校对及计价。", | |||
"announcement": "公告", | |||
"viewAllAnnouncement": "显示所有公告", | |||
"systemMessage": "系统消息", | |||
"viewAllSystemMessage": "显示所有消息", | |||
"Dashboard": "仪表板", | |||
"event": "活动" | |||
} |
@@ -280,6 +280,7 @@ | |||
"applyStatus": "申請狀態", | |||
"gazetteCount": "憲報期數", | |||
"gazetteCount2" :"憲報期數 / 我的備註", | |||
"gazetteCount2_1" :"Care Of / 我的備註", | |||
"gazetteCount3" :"憲報期數 / Care Of/ 我的備註", | |||
"publishDate": "發佈日期", | |||
"draftFile": "稿件檔案", | |||
@@ -317,6 +318,29 @@ | |||
"transactionTime": "交易時間", | |||
"paymentRefCode": "付款參考號碼", | |||
"paymentInfoRecord": "繳款通知記錄", | |||
"paymentRecordId": "繳款單號", | |||
"receiptDate": "簽發日期", | |||
"sendDate": "發送日期", | |||
"sendDateFrom": "發送日期(從)", | |||
"sendDateTo": "發送日期(到)", | |||
"files": "檔案", | |||
"loginName": "登錄名稱", | |||
"lastLoginDate": "最後登入日期", | |||
"lastSubmissionDate": "最後提交申請日期", | |||
"locked": "鎖定", | |||
"unlock": "解鎖", | |||
"pendingFor": "待批核", | |||
"active": "生效中", | |||
"primary": "源自", | |||
"submitApplication": "提交公共啟事申請", | |||
"applicationSubheading": "提供你的啟事內容作排版,校對及計價。", | |||
"announcement": "公告", | |||
"viewAllAnnouncement": "顯示所有公告", | |||
"systemMessage": "系統消息", | |||
"viewAllSystemMessage": "顯示所有消息", | |||
"Dashboard": "儀表板", | |||
"event": "活動" | |||
} |
@@ -130,6 +130,7 @@ export const DELETE_EMAIL = apiPath+'/email/delete'; | |||
//iAmSmart | |||
export const GET_SMART_PROFILE = apiPath+'/smart/getProfile'; //POST | |||
export const GET_SMART_LOGIN = apiPath+'/smart/login'; //POST | |||
export const GET_SMART_DIRECT_LOGIN = apiPath+'/smart/directLogin'; //POST | |||
//gen report | |||