From 1ab60859723bcb6be4b48c703c3a19ee3152558e Mon Sep 17 00:00:00 2001 From: "jason.lam" Date: Thu, 18 Jan 2024 15:54:17 +0800 Subject: [PATCH 1/9] update payment notice record i18n --- src/assets/style/navbarStyles.css | 2 +- src/layout/MainLayout/Header/index.js | 10 ++++++---- src/pages/DemandNote/Search_Public/DataGrid.js | 8 ++++---- src/pages/DemandNote/Search_Public/SearchForm.js | 11 +++++++---- src/pages/DemandNote/Search_Public/index.js | 5 ++++- src/pages/dashboard/Public/index.js | 2 +- src/translations/en.json | 10 +++++++++- src/translations/zh-CN.json | 8 ++++++++ src/translations/zh-HK.json | 8 ++++++++ 9 files changed, 48 insertions(+), 16 deletions(-) diff --git a/src/assets/style/navbarStyles.css b/src/assets/style/navbarStyles.css index d71cd84..3555ab0 100644 --- a/src/assets/style/navbarStyles.css +++ b/src/assets/style/navbarStyles.css @@ -127,7 +127,7 @@ visibility: hidden; opacity: 0; min-width: 16rem; - position: absolute; + position: relative; /* transition: all 0.5s ease; */ left: 0; display: none; diff --git a/src/layout/MainLayout/Header/index.js b/src/layout/MainLayout/Header/index.js index aaa1872..3442f09 100644 --- a/src/layout/MainLayout/Header/index.js +++ b/src/layout/MainLayout/Header/index.js @@ -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,7 +135,7 @@ function Header(props) {
  • - Email Template + Email Template
  • {/*
  • Logout @@ -174,7 +174,9 @@ function Header(props) {
  • - 繳款通知記錄 + + +
  • @@ -268,7 +270,7 @@ function Header(props) { const drawer = ( isUserLoggedIn() ? - + PNSPS diff --git a/src/pages/DemandNote/Search_Public/DataGrid.js b/src/pages/DemandNote/Search_Public/DataGrid.js index 3b4d47a..2028d5d 100644 --- a/src/pages/DemandNote/Search_Public/DataGrid.js +++ b/src/pages/DemandNote/Search_Public/DataGrid.js @@ -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 ; diff --git a/src/pages/DemandNote/Search_Public/SearchForm.js b/src/pages/DemandNote/Search_Public/SearchForm.js index d9e87cb..cd5f59b 100644 --- a/src/pages/DemandNote/Search_Public/SearchForm.js +++ b/src/pages/DemandNote/Search_Public/SearchForm.js @@ -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} /> @@ -182,6 +182,7 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData option.labelCht} inputValue={selectedStatus?.labelCht ? selectedStatus?.labelCht : ""} @@ -233,7 +234,9 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData textTransform: 'capitalize', alignItems: 'end' }}> - 提交 + + + diff --git a/src/pages/DemandNote/Search_Public/index.js b/src/pages/DemandNote/Search_Public/index.js index 35d06c7..8c246f3 100644 --- a/src/pages/DemandNote/Search_Public/index.js +++ b/src/pages/DemandNote/Search_Public/index.js @@ -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 = () => {
    - 繳款通知記錄 + + +
    diff --git a/src/pages/dashboard/Public/index.js b/src/pages/dashboard/Public/index.js index 1eaa554..c2db5de 100644 --- a/src/pages/dashboard/Public/index.js +++ b/src/pages/dashboard/Public/index.js @@ -31,7 +31,7 @@ const DashboardDefault = () => {
    {/* 我的公共啟事 */} - + {isORGLoggedIn() ?userData.fullenName:userData.fullchName}, diff --git a/src/translations/en.json b/src/translations/en.json index 764e308..e5ce08f 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -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)", @@ -318,6 +318,14 @@ "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)", + "Dashboard": "Dashboard", "event": "Event" } \ No newline at end of file diff --git a/src/translations/zh-CN.json b/src/translations/zh-CN.json index c7ff027..2dfdec0 100644 --- a/src/translations/zh-CN.json +++ b/src/translations/zh-CN.json @@ -317,6 +317,14 @@ "transactionTime": "交易时间", "paymentRefCode": "付款参考号码", + "paymentInfoRecord": "缴款通知记录", + "paymentRecordId": "缴款单号", + "receiptDate": "签发日期", + "sendDate": "发送日期", + "sendDateFrom": "发送日期(从)", + "sendDateTo": "发送日期(到)", + "files": "档案", + "Dashboard": "仪表板", "event": "活动" } \ No newline at end of file diff --git a/src/translations/zh-HK.json b/src/translations/zh-HK.json index ec87245..42bb7d4 100644 --- a/src/translations/zh-HK.json +++ b/src/translations/zh-HK.json @@ -317,6 +317,14 @@ "transactionTime": "交易時間", "paymentRefCode": "付款參考號碼", + "paymentInfoRecord": "繳款通知記錄", + "paymentRecordId": "繳款單號", + "receiptDate": "簽發日期", + "sendDate": "發送日期", + "sendDateFrom": "發送日期(從)", + "sendDateTo": "發送日期(到)", + "files": "檔案", + "Dashboard": "儀表板", "event": "活動" } \ No newline at end of file From d594acf422b0723ed9abdf9b169504609acd1dc9 Mon Sep 17 00:00:00 2001 From: anna Date: Tue, 16 Jan 2024 10:55:53 +0800 Subject: [PATCH 2/9] iAmSmart fix and dashboard --- .../Payment/Details_Public/PaymentDetails.js | 2 +- src/pages/Payment/FPS/AckPage.js | 3 +- src/pages/Payment/PaymentCallback.js | 2 +- .../auth-forms/AuthLoginCustom.js | 6 +- src/pages/dashboard/Public/Message.js | 30 ++++++++ src/pages/dashboard/Public/Notice.js | 31 +++++++++ src/pages/dashboard/Public/index.js | 51 ++++++++++++-- src/pages/iAmSmart/AuthCallback/index.js | 1 - .../iAmSmart/DirectLoginCallback/index.js | 69 +++++++++++++++++++ src/routes/LoginRoutes.js | 7 +- src/themes/palette.js | 6 ++ 11 files changed, 192 insertions(+), 16 deletions(-) create mode 100644 src/pages/dashboard/Public/Message.js create mode 100644 src/pages/dashboard/Public/Notice.js create mode 100644 src/pages/iAmSmart/DirectLoginCallback/index.js diff --git a/src/pages/Payment/Details_Public/PaymentDetails.js b/src/pages/Payment/Details_Public/PaymentDetails.js index e12965d..b7e6037 100644 --- a/src/pages/Payment/Details_Public/PaymentDetails.js +++ b/src/pages/Payment/Details_Public/PaymentDetails.js @@ -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"; diff --git a/src/pages/Payment/FPS/AckPage.js b/src/pages/Payment/FPS/AckPage.js index ba0b67c..86eed41 100644 --- a/src/pages/Payment/FPS/AckPage.js +++ b/src/pages/Payment/FPS/AckPage.js @@ -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) } }); } diff --git a/src/pages/Payment/PaymentCallback.js b/src/pages/Payment/PaymentCallback.js index 987f2cb..1bcdb4d 100644 --- a/src/pages/Payment/PaymentCallback.js +++ b/src/pages/Payment/PaymentCallback.js @@ -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) } }); } diff --git a/src/pages/authentication/auth-forms/AuthLoginCustom.js b/src/pages/authentication/auth-forms/AuthLoginCustom.js index fe4a2af..d331698 100644 --- a/src/pages/authentication/auth-forms/AuthLoginCustom.js +++ b/src/pages/authentication/auth-forms/AuthLoginCustom.js @@ -193,9 +193,9 @@ const AuthLoginCustom = () => { } const openApp = () => { - setTimeout(function () { - openQR(); - }, 1000); + // setTimeout(function () { + // openQR(); + // }, 1000); let callbackUrl = "https://" + iAmSmartCallbackPath() + "/iamsmart/authcallback"; let url = iAmSmartAppPath + "auth" + "?clientID=" + clientId diff --git a/src/pages/dashboard/Public/Message.js b/src/pages/dashboard/Public/Message.js new file mode 100644 index 0000000..39f5168 --- /dev/null +++ b/src/pages/dashboard/Public/Message.js @@ -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 ( + + + + + + + + + ); +}; + +export default SearchDemandNoteForm; diff --git a/src/pages/dashboard/Public/Notice.js b/src/pages/dashboard/Public/Notice.js new file mode 100644 index 0000000..b7a1029 --- /dev/null +++ b/src/pages/dashboard/Public/Notice.js @@ -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 ( + + + + + + + + + + ); +}; + +export default SearchDemandNoteForm; diff --git a/src/pages/dashboard/Public/index.js b/src/pages/dashboard/Public/index.js index c2db5de..4b49340 100644 --- a/src/pages/dashboard/Public/index.js +++ b/src/pages/dashboard/Public/index.js @@ -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,13 +26,13 @@ const DashboardDefault = () => { backgroundImage: `url(${titleBackgroundImg})`, width: '100%', height: '100%', - backgroundSize:'contain', + backgroundSize: 'contain', backgroundRepeat: 'no-repeat', backgroundColor: '#0C489E', backgroundPosition: 'right' } return ( - +
    @@ -37,6 +43,39 @@ const DashboardDefault = () => {
    + + + + + + + + 提交公共啟事申請 + 提供你的啟事內容作排版,校對及計價。 + + + + + 公告 + + + + + + + + + 系統消息 + + + + + + + +
    ); }; diff --git a/src/pages/iAmSmart/AuthCallback/index.js b/src/pages/iAmSmart/AuthCallback/index.js index 5f30bb6..a87236a 100644 --- a/src/pages/iAmSmart/AuthCallback/index.js +++ b/src/pages/iAmSmart/AuthCallback/index.js @@ -56,7 +56,6 @@ const Index = () => { }, onError:(error)=>{ console.log(error); - //window.location.assign("/iamsmart/loginFail"); } }); } diff --git a/src/pages/iAmSmart/DirectLoginCallback/index.js b/src/pages/iAmSmart/DirectLoginCallback/index.js new file mode 100644 index 0000000..a87236a --- /dev/null +++ b/src/pages/iAmSmart/DirectLoginCallback/index.js @@ -0,0 +1,69 @@ + +import * as React from "react"; +import * as HttpUtils from "utils/HttpUtils"; +import * as UrlUtils from "utils/ApiPathConst"; +import { useNavigate } from "react-router-dom"; +import { useDispatch } from "react-redux"; +import { handleLogoutFunction, handleLogin } from 'auth/index'; + +import Loadable from 'components/Loadable'; +const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); + + +// ==============================|| DASHBOARD - DEFAULT ||============================== // + +const Index = () => { + + const dispatch = useDispatch() + const navigate = useNavigate() + + React.useEffect(() => { + goLogin(); + }, []); + + function goLogin(){ + dispatch(handleLogoutFunction()); + + let params = new URLSearchParams(window.location.search) + if(params.get("code")){ + HttpUtils.post({ + url: UrlUtils.GET_SMART_LOGIN, + params:{ + code: params.get("code") + }, + onSuccess: (responseData) => { + console.log("responseData"); + console.log(responseData); + const userData = { + id: responseData.id, + fullenName: responseData.name, + fullchName: responseData.chName, + email: responseData.email, + type: responseData.type, + role: responseData.role, + abilities: responseData.abilities, + creditor: responseData.creditor, + //avatar: require('src/assets/images/users/avatar-3.png').default, + } + const data = { ...userData, accessToken: responseData.accessToken, refreshToken: responseData.refreshToken } + dispatch(handleLogin(data)) + navigate('/dashboard'); + }, + onFail: (response)=>{ + console.log("Fail"); + console.log(response); + window.location.assign("/iamsmart/loginFail"); + }, + onError:(error)=>{ + console.log(error); + } + }); + } + } + + return ( + + ); +}; + +export default Index; \ No newline at end of file diff --git a/src/routes/LoginRoutes.js b/src/routes/LoginRoutes.js index 0a745f0..04f4dc6 100644 --- a/src/routes/LoginRoutes.js +++ b/src/routes/LoginRoutes.js @@ -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: + element: }, { path: 'iamsmart/loginfallback', - element: + element: }, { path: 'iamsmart/authcallback', diff --git a/src/themes/palette.js b/src/themes/palette.js index 80eda43..ea3f267 100644 --- a/src/themes/palette.js +++ b/src/themes/palette.js @@ -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', From 1dc1465fe586fbe33dbbaa0159ee4d22416421c0 Mon Sep 17 00:00:00 2001 From: anna Date: Tue, 16 Jan 2024 17:48:07 +0800 Subject: [PATCH 3/9] iAmSmart fix bug --- src/pages/authentication/RegisterCustom.js | 21 +++--- .../auth-forms/AuthLoginCustom.js | 25 +++++-- .../iAmSmart/DirectLoginCallback/index.js | 2 +- src/pages/iAmSmart/FallCallback/index.js | 72 ------------------- src/routes/LoginRoutes.js | 4 +- src/utils/ApiPathConst.js | 1 + 6 files changed, 34 insertions(+), 91 deletions(-) delete mode 100644 src/pages/iAmSmart/FallCallback/index.js diff --git a/src/pages/authentication/RegisterCustom.js b/src/pages/authentication/RegisterCustom.js index b64074e..33d236f 100644 --- a/src/pages/authentication/RegisterCustom.js +++ b/src/pages/authentication/RegisterCustom.js @@ -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 ( diff --git a/src/pages/authentication/auth-forms/AuthLoginCustom.js b/src/pages/authentication/auth-forms/AuthLoginCustom.js index d331698..0784c6a 100644 --- a/src/pages/authentication/auth-forms/AuthLoginCustom.js +++ b/src/pages/authentication/auth-forms/AuthLoginCustom.js @@ -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 { @@ -196,8 +197,23 @@ const AuthLoginCustom = () => { // 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; + } diff --git a/src/pages/iAmSmart/DirectLoginCallback/index.js b/src/pages/iAmSmart/DirectLoginCallback/index.js index a87236a..89208b8 100644 --- a/src/pages/iAmSmart/DirectLoginCallback/index.js +++ b/src/pages/iAmSmart/DirectLoginCallback/index.js @@ -27,7 +27,7 @@ const Index = () => { 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") }, diff --git a/src/pages/iAmSmart/FallCallback/index.js b/src/pages/iAmSmart/FallCallback/index.js deleted file mode 100644 index 7716ad5..0000000 --- a/src/pages/iAmSmart/FallCallback/index.js +++ /dev/null @@ -1,72 +0,0 @@ - -import * as React from "react"; -import * as HttpUtils from "utils/HttpUtils"; -import * as UrlUtils from "utils/ApiPathConst"; -import { useNavigate } from "react-router-dom"; -import { useDispatch } from "react-redux"; -import { handleLogoutFunction, handleLogin } from 'auth/index'; - -import Loadable from 'components/Loadable'; -const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); - - -// ==============================|| DASHBOARD - DEFAULT ||============================== // - -const Index = () => { - - const dispatch = useDispatch() - const navigate = useNavigate() - - React.useEffect(() => { - getPrfile(); - }, []); - - function getPrfile(){ - dispatch(handleLogoutFunction()); - - let params = new URLSearchParams(window.location.search) - if(params.get("code")){ - HttpUtils.post({ - url: UrlUtils.GET_SMART_LOGIN, - params:{ - code: params.get("code") - }, - onSuccess: (responseData) => { - - //navigate('/iAmSmartRegisterFrom', { state: { responseData: responseData } }); - - console.log(response) - const userData = { - id: responseData.id, - fullenName: responseData.name, - fullchName: responseData.chName, - email: responseData.email, - type: responseData.type, - role: responseData.role, - abilities: responseData.abilities, - creditor: responseData.creditor, - //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"); - }, - onError:()=>{ - window.location.assign("/login"); - } - }); - } - } - - return ( - - ); -}; - -export default Index; \ No newline at end of file diff --git a/src/routes/LoginRoutes.js b/src/routes/LoginRoutes.js index 04f4dc6..b3c7533 100644 --- a/src/routes/LoginRoutes.js +++ b/src/routes/LoginRoutes.js @@ -12,7 +12,7 @@ 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_DirectLoginCallback = Loadable(lazy(() => import('pages/iAmSmart/DirectLoginCallback'))); +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'))); @@ -61,7 +61,7 @@ const LoginRoutes = { }, { path: 'iamsmart/logincallback', - element: + element: }, { path: 'iamsmart/loginfallback', diff --git a/src/utils/ApiPathConst.js b/src/utils/ApiPathConst.js index 316270e..77fd0e6 100644 --- a/src/utils/ApiPathConst.js +++ b/src/utils/ApiPathConst.js @@ -124,6 +124,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 From fd871f97afa780c5e5fef0acb703abb5e13177c0 Mon Sep 17 00:00:00 2001 From: anna Date: Wed, 17 Jan 2024 12:54:47 +0800 Subject: [PATCH 4/9] fix bug --- src/pages/iAmSmart/AuthCallback/index.js | 3 +++ src/pages/iAmSmart/RegistryCallback/index.js | 14 +++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/pages/iAmSmart/AuthCallback/index.js b/src/pages/iAmSmart/AuthCallback/index.js index a87236a..b83ba04 100644 --- a/src/pages/iAmSmart/AuthCallback/index.js +++ b/src/pages/iAmSmart/AuthCallback/index.js @@ -56,8 +56,11 @@ const Index = () => { }, onError:(error)=>{ console.log(error); + window.location.assign("/iamsmart/loginFail"); } }); + }else{ + window.location.assign("/iamsmart/loginFail"); } } diff --git a/src/pages/iAmSmart/RegistryCallback/index.js b/src/pages/iAmSmart/RegistryCallback/index.js index 0c03fbe..ab69b32 100644 --- a/src/pages/iAmSmart/RegistryCallback/index.js +++ b/src/pages/iAmSmart/RegistryCallback/index.js @@ -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 ( ); From 78e2a66898f6b454fe5a2ed1f7c0f295a731247b Mon Sep 17 00:00:00 2001 From: Alex Cheung Date: Wed, 17 Jan 2024 17:48:28 +0800 Subject: [PATCH 5/9] update for web to app payload --- src/pages/Payment/FPS/FPS.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/Payment/FPS/FPS.js b/src/pages/Payment/FPS/FPS.js index 1c4c0e2..7250439 100644 --- a/src/pages/Payment/FPS/FPS.js +++ b/src/pages/Payment/FPS/FPS.js @@ -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) + } }); From 2e1baa9a20b55d8daec86af694c54825242ac0f9 Mon Sep 17 00:00:00 2001 From: "jason.lam" Date: Thu, 18 Jan 2024 16:11:24 +0800 Subject: [PATCH 6/9] update setting i18n --- src/pages/User/ManagePage_OrgPublic/index.js | 26 +++++++++++--------- src/translations/en.json | 8 ++++++ src/translations/zh-CN.json | 8 ++++++ src/translations/zh-HK.json | 8 ++++++ 4 files changed, 38 insertions(+), 12 deletions(-) diff --git a/src/pages/User/ManagePage_OrgPublic/index.js b/src/pages/User/ManagePage_OrgPublic/index.js index 5e505af..91c647e 100644 --- a/src/pages/User/ManagePage_OrgPublic/index.js +++ b/src/pages/User/ManagePage_OrgPublic/index.js @@ -81,14 +81,16 @@ const ManageOrgUserPage = () => { if (params.row.locked) { return ( <> - {getStatusTag({ color: "#525150", text: "鎖定" })} - + {getStatusTag({ color: "#525150", text: intl.formatMessage({id: 'locked'}) })} + ) } 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,21 +119,21 @@ const ManageOrgUserPage = () => { { id: 'username', field: 'username', - headerName: getHeader('登錄名稱'), + headerName: getHeader(intl.formatMessage({id: 'loginName'})), flex: 1, }, { id: 'contactPerson', field: 'contactPerson', - headerName: getHeader('用戶名稱'), + headerName: getHeader(intl.formatMessage({id: 'userName'})), flex: 1, }, { id: 'contactTel', field: 'contactTel', - headerName: getHeader('聯絡電話'), + headerName: getHeader(intl.formatMessage({id: 'userContactNumber'})), flex: 1, valueGetter: (params) => { let contactTel = JSON.parse(params.value) @@ -141,13 +143,13 @@ const ManageOrgUserPage = () => { { id: 'emailBus', field: 'emailBus', - headerName: getHeader('電郵'), + headerName: getHeader(intl.formatMessage({id: 'userContactEmail'})), flex: 1, }, { id: 'lastLogin', field: 'lastLogin', - headerName: getHeader('最後登入日期'), + headerName: getHeader(intl.formatMessage({id: 'lastLoginDate'})), flex: 1, valueGetter: (params) => { return DateUtils.datetimeStr(params.value); @@ -156,7 +158,7 @@ const ManageOrgUserPage = () => { { id: 'lastApply', field: 'lastApply', - headerName: getHeader('最後提交申請日期'), + headerName: getHeader(intl.formatMessage({id: 'lastSubmissionDate'})), flex: 1, valueGetter: () => { return "--"; @@ -176,7 +178,7 @@ const ManageOrgUserPage = () => { id: 'primaryUser', field: 'primaryUser', type: 'bool', - headerName: getHeader('Primary'), + headerName: getHeader(intl.formatMessage({id: 'primary'})), flex: 1, renderCell: (params) => { console.log(params); diff --git a/src/translations/en.json b/src/translations/en.json index e5ce08f..fad2705 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -325,6 +325,14 @@ "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", "Dashboard": "Dashboard", "event": "Event" diff --git a/src/translations/zh-CN.json b/src/translations/zh-CN.json index 2dfdec0..4c9baaf 100644 --- a/src/translations/zh-CN.json +++ b/src/translations/zh-CN.json @@ -324,6 +324,14 @@ "sendDateFrom": "发送日期(从)", "sendDateTo": "发送日期(到)", "files": "档案", + "loginName": "登录名称", + "lastLoginDate": "最后登入日期", + "lastSubmissionDate": "最后提交申请日期", + "locked": "锁定", + "unlock": "解锁", + "pendingFor": "待批核", + "active": "生效中", + "primary": "源自", "Dashboard": "仪表板", "event": "活动" diff --git a/src/translations/zh-HK.json b/src/translations/zh-HK.json index 42bb7d4..345bf59 100644 --- a/src/translations/zh-HK.json +++ b/src/translations/zh-HK.json @@ -324,6 +324,14 @@ "sendDateFrom": "發送日期(從)", "sendDateTo": "發送日期(到)", "files": "檔案", + "loginName": "登錄名稱", + "lastLoginDate": "最後登入日期", + "lastSubmissionDate": "最後提交申請日期", + "locked": "鎖定", + "unlock": "解鎖", + "pendingFor": "待批核", + "active": "生效中", + "primary": "源自", "Dashboard": "儀表板", "event": "活動" From 9fc77ab3343f4b24528a8d6e7cc2a7ffc312c7cd Mon Sep 17 00:00:00 2001 From: "jason.lam" Date: Thu, 18 Jan 2024 16:16:44 +0800 Subject: [PATCH 7/9] update care of --- src/pages/PublicNotice/ListPanel/BaseGrid.js | 2 +- src/pages/PublicNotice/ListPanel/PendingPaymentTab.js | 2 +- src/pages/PublicNotice/ListPanel/SearchPublicNoticeTable.js | 2 +- src/translations/en.json | 1 + src/translations/zh-CN.json | 1 + src/translations/zh-HK.json | 1 + 6 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/pages/PublicNotice/ListPanel/BaseGrid.js b/src/pages/PublicNotice/ListPanel/BaseGrid.js index c5cde6a..7727eee 100644 --- a/src/pages/PublicNotice/ListPanel/BaseGrid.js +++ b/src/pages/PublicNotice/ListPanel/BaseGrid.js @@ -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) => ( diff --git a/src/pages/PublicNotice/ListPanel/PendingPaymentTab.js b/src/pages/PublicNotice/ListPanel/PendingPaymentTab.js index ebdc1d8..e1f2df8 100644 --- a/src/pages/PublicNotice/ListPanel/PendingPaymentTab.js +++ b/src/pages/PublicNotice/ListPanel/PendingPaymentTab.js @@ -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) => ( diff --git a/src/pages/PublicNotice/ListPanel/SearchPublicNoticeTable.js b/src/pages/PublicNotice/ListPanel/SearchPublicNoticeTable.js index 2872274..ce1c222 100644 --- a/src/pages/PublicNotice/ListPanel/SearchPublicNoticeTable.js +++ b/src/pages/PublicNotice/ListPanel/SearchPublicNoticeTable.js @@ -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) => ( diff --git a/src/translations/en.json b/src/translations/en.json index fad2705..76ff44f 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -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", diff --git a/src/translations/zh-CN.json b/src/translations/zh-CN.json index 4c9baaf..f802ca4 100644 --- a/src/translations/zh-CN.json +++ b/src/translations/zh-CN.json @@ -280,6 +280,7 @@ "applyStatus": "申请状态", "gazetteCount": "宪报期数", "gazetteCount2" :"宪报期数 / 我的备注", + "gazetteCount2_1" :"Care Of / 我的备注", "gazetteCount3" :"宪报期数 / Care Of/ 我的备注", "publishDate": "发布日期", "draftFile": "稿件档案", diff --git a/src/translations/zh-HK.json b/src/translations/zh-HK.json index 345bf59..d377377 100644 --- a/src/translations/zh-HK.json +++ b/src/translations/zh-HK.json @@ -280,6 +280,7 @@ "applyStatus": "申請狀態", "gazetteCount": "憲報期數", "gazetteCount2" :"憲報期數 / 我的備註", + "gazetteCount2_1" :"Care Of / 我的備註", "gazetteCount3" :"憲報期數 / Care Of/ 我的備註", "publishDate": "發佈日期", "draftFile": "稿件檔案", From 16ae558db43d13fb48c6010d86555d63957aed12 Mon Sep 17 00:00:00 2001 From: "jason.lam" Date: Thu, 18 Jan 2024 16:24:40 +0800 Subject: [PATCH 8/9] update org dashboard i18n --- src/pages/dashboard/Public/index.js | 24 ++++++++++++++++++------ src/translations/en.json | 7 +++++++ src/translations/zh-CN.json | 7 +++++++ src/translations/zh-HK.json | 7 +++++++ 4 files changed, 39 insertions(+), 6 deletions(-) diff --git a/src/pages/dashboard/Public/index.js b/src/pages/dashboard/Public/index.js index 4b49340..1dcc53d 100644 --- a/src/pages/dashboard/Public/index.js +++ b/src/pages/dashboard/Public/index.js @@ -50,14 +50,22 @@ const DashboardDefault = () => { - 提交公共啟事申請 - 提供你的啟事內容作排版,校對及計價。 + + + + + + - 公告 - + + + + {
    - 系統消息 - + + + + Date: Thu, 18 Jan 2024 17:01:17 +0800 Subject: [PATCH 9/9] update logout button --- src/layout/MainLayout/Header/index.js | 18 ++++++------ src/pages/User/ManagePage_OrgPublic/index.js | 29 ++++++++++++++------ 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/src/layout/MainLayout/Header/index.js b/src/layout/MainLayout/Header/index.js index 3442f09..8338ca8 100644 --- a/src/layout/MainLayout/Header/index.js +++ b/src/layout/MainLayout/Header/index.js @@ -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, @@ -137,9 +137,9 @@ function Header(props) {
  • Email Template
  • - {/*
  • +
  • Logout -
  • */} +
    :
    @@ -243,9 +243,11 @@ function Header(props) { } - {/*
  • - 登出 -
  • */} +
  • + + + +
  • ); @@ -388,7 +390,7 @@ function Header(props) { : } - + {/**/}
    @@ -469,7 +471,7 @@ function Header(props) { - {/* */} + {/**/}
    diff --git a/src/pages/User/ManagePage_OrgPublic/index.js b/src/pages/User/ManagePage_OrgPublic/index.js index 91c647e..b14ec04 100644 --- a/src/pages/User/ManagePage_OrgPublic/index.js +++ b/src/pages/User/ManagePage_OrgPublic/index.js @@ -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", @@ -120,21 +123,24 @@ const ManageOrgUserPage = () => { id: 'username', field: 'username', headerName: getHeader(intl.formatMessage({id: 'loginName'})), - flex: 1, + width: isMdOrLg ? 'auto' : 160, + flex: isMdOrLg ? 1 : undefined, }, { id: 'contactPerson', field: 'contactPerson', headerName: getHeader(intl.formatMessage({id: 'userName'})), - flex: 1, + width: isMdOrLg ? 'auto' : 160, + flex: isMdOrLg ? 1 : undefined, }, { id: 'contactTel', field: 'contactTel', headerName: getHeader(intl.formatMessage({id: 'userContactNumber'})), - flex: 1, + width: isMdOrLg ? 'auto' : 160, + flex: isMdOrLg ? 1 : undefined, valueGetter: (params) => { let contactTel = JSON.parse(params.value) return contactTel?.countryCode + " " + contactTel?.phoneNumber; @@ -144,13 +150,15 @@ const ManageOrgUserPage = () => { id: 'emailBus', field: 'emailBus', headerName: getHeader(intl.formatMessage({id: 'userContactEmail'})), - flex: 1, + width: isMdOrLg ? 'auto' : 160, + flex: isMdOrLg ? 1 : undefined, }, { id: 'lastLogin', field: 'lastLogin', headerName: getHeader(intl.formatMessage({id: 'lastLoginDate'})), - flex: 1, + width: isMdOrLg ? 'auto' : 160, + flex: isMdOrLg ? 1 : undefined, valueGetter: (params) => { return DateUtils.datetimeStr(params.value); } @@ -159,7 +167,8 @@ const ManageOrgUserPage = () => { id: 'lastApply', field: 'lastApply', headerName: getHeader(intl.formatMessage({id: 'lastSubmissionDate'})), - flex: 1, + width: isMdOrLg ? 'auto' : 160, + flex: isMdOrLg ? 1 : undefined, valueGetter: () => { return "--"; } @@ -168,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)] @@ -179,7 +189,8 @@ const ManageOrgUserPage = () => { field: 'primaryUser', type: 'bool', headerName: getHeader(intl.formatMessage({id: 'primary'})), - flex: 1, + width: isMdOrLg ? 'auto' : 160, + flex: isMdOrLg ? 1 : undefined, renderCell: (params) => { console.log(params); return (