Browse Source

fix bug

master
Anna Ho 1 year ago
parent
commit
6e7f38527b
9 changed files with 30 additions and 17 deletions
  1. +2
    -0
      src/auth/utils.js
  2. +1
    -1
      src/pages/DemandNote/Create/SearchForm.js
  3. +8
    -1
      src/pages/PublicNotice/Details_GLD/ApplicationDetailCard.js
  4. +2
    -2
      src/pages/authentication/IAmSmartRegister.js
  5. +1
    -1
      src/pages/authentication/auth-forms/IAmSmartFormWizard.js
  6. +1
    -0
      src/pages/iAmSmart/DirectLoginCallback/index.js
  7. +1
    -0
      src/translations/en.json
  8. +13
    -12
      src/translations/zh-CN.json
  9. +1
    -0
      src/translations/zh-HK.json

+ 2
- 0
src/auth/utils.js View File

@@ -12,6 +12,8 @@ export const hostPath = `http://${hostname}:${hostPort}`;
export const apiPath = window.location.href.match("localhost:3000")?`${hostPath}/api`:(window.location.href.match(":3000")? "http://"+window.location.hostname+":8090/api":`/api`); export const apiPath = window.location.href.match("localhost:3000")?`${hostPath}/api`:(window.location.href.match(":3000")? "http://"+window.location.hostname+":8090/api":`/api`);
export const paymentPath = window.location.href.match("localhost:3000")?`${hostPath}/payment`:`/payment`; export const paymentPath = window.location.href.match("localhost:3000")?`${hostPath}/payment`:`/payment`;


export const delBugMode = true;

/** /**
* Testing: * Testing:
* Domain: apigw-isit.staging-eid.gov.hk * Domain: apigw-isit.staging-eid.gov.hk


+ 1
- 1
src/pages/DemandNote/Create/SearchForm.js View File

@@ -243,7 +243,7 @@ const SearchPublicNoticeForm = ({ applySearch, issueComboData, _paymentCount, _p
defaultValue={dueDate} defaultValue={dueDate}
InputProps={{ inputProps: { min: DateUtils.dateStr(new Date()) } }} InputProps={{ inputProps: { min: DateUtils.dateStr(new Date()) } }}
onChange={(newValue) => { onChange={(newValue) => {
setDueDate(DateUtils.dateStr(newValue))
setDueDate(newValue.currentTarget.value)
}} }}
InputLabelProps={{ InputLabelProps={{
shrink: true shrink: true


+ 8
- 1
src/pages/PublicNotice/Details_GLD/ApplicationDetailCard.js View File

@@ -8,6 +8,7 @@ import {
Stack, Stack,
Dialog, DialogTitle, DialogContent, DialogActions, InputAdornment, Dialog, DialogTitle, DialogContent, DialogActions, InputAdornment,
} from '@mui/material'; } from '@mui/material';
import {delBugMode} from "auth/utils";
const MainCard = Loadable(lazy(() => import('components/MainCard'))); const MainCard = Loadable(lazy(() => import('components/MainCard')));
import { useForm } from "react-hook-form"; import { useForm } from "react-hook-form";
import { import {
@@ -93,6 +94,11 @@ const ApplicationDetailCard = (
setStatus("notAccepted") setStatus("notAccepted")
}; };


const setCompleteDisable=()=>{
if(delBugMode) return false;
return (new Date()).getTime() < DateUtils.convertToDate(applicationDetailData.gazetteIssueDetail.issueDate).getTime();
}

const complatedClick = () => () => { const complatedClick = () => () => {
let issueDate = DateUtils.convertToDate(applicationDetailData.gazetteIssueDetail.issueDate); let issueDate = DateUtils.convertToDate(applicationDetailData.gazetteIssueDetail.issueDate);
let current = new Date(); let current = new Date();
@@ -214,6 +220,7 @@ const ApplicationDetailCard = (
// size="large" // size="large"
variant="contained" variant="contained"
onClick={doPublish()} onClick={doPublish()}
disabled={setCompleteDisable()}
sx={{ sx={{
textTransform: 'capitalize', textTransform: 'capitalize',
alignItems: 'end', alignItems: 'end',
@@ -230,7 +237,7 @@ const ApplicationDetailCard = (
// size="large" // size="large"
variant="contained" variant="contained"
onClick={complatedClick()} onClick={complatedClick()}
disabled={(new Date()).getTime() < DateUtils.convertToDate(applicationDetailData.gazetteIssueDetail.issueDate).getTime()}
disabled={setCompleteDisable()}
sx={{ sx={{
textTransform: 'capitalize', textTransform: 'capitalize',
alignItems: 'end', alignItems: 'end',


+ 2
- 2
src/pages/authentication/IAmSmartRegister.js View File

@@ -100,7 +100,7 @@ const Register = () => {


const handleNext = async () => { const handleNext = async () => {
if (!idNo) { if (!idNo) {
notifyActionError("資料,請返回注冊頁面。")
notifyActionError(intl.formatMessage({id: 'iAmSmartNoIdNoMsg'}))
return; return;
} }
const captchaTest = await handleCaptcha(); const captchaTest = await handleCaptcha();
@@ -169,7 +169,7 @@ const Register = () => {
</Typography> </Typography>
<Stack direction="row" sx={{ pt: 2 }}> <Stack direction="row" sx={{ pt: 2 }}>
<Stack sx={{ flex: '1 1 auto' }} /> <Stack sx={{ flex: '1 1 auto' }} />
<Button onClick={handleReset}><Typography variant="h5">Reset</Typography></Button>
<Button onClick={handleReset}><Typography variant="h5"> <FormattedMessage id="reset"/></Typography></Button>
</Stack> </Stack>
</React.Fragment> </React.Fragment>
) : ( ) : (


+ 1
- 1
src/pages/authentication/auth-forms/IAmSmartFormWizard.js View File

@@ -436,7 +436,7 @@ const CustomFormWizard = (props) => {
<Stack spacing={1}> <Stack spacing={1}>
<InputLabel htmlFor="idDocType-signup"> <InputLabel htmlFor="idDocType-signup">
<Typography variant="h5"> <Typography variant="h5">
香港身份證: {iAmSmartData.idNo + "(" + iAmSmartData.checkDigit + ")"}
<FormattedMessage id="HKIDcard" />: {iAmSmartData.idNo + "(" + iAmSmartData.checkDigit + ")"}
</Typography> </Typography>
</InputLabel> </InputLabel>
</Stack> </Stack>


+ 1
- 0
src/pages/iAmSmart/DirectLoginCallback/index.js View File

@@ -58,6 +58,7 @@ const Index = () => {
}, },
onError:(error)=>{ onError:(error)=>{
console.log(error); console.log(error);
window.location.assign("/iamsmart/loginFail");
} }
}); });
}else{ }else{


+ 1
- 0
src/translations/en.json View File

@@ -80,6 +80,7 @@
"backToLogin": "Return to login page", "backToLogin": "Return to login page",
"registerSubmitted": "Account application submitted successfully.", "registerSubmitted": "Account application submitted successfully.",
"registerFail": "Application failed, please try again later", "registerFail": "Application failed, please try again later",
"iAmSmartNoIdNoMsg": "Invalid information, please return to the registration page.",


"mainPage": "Main Page", "mainPage": "Main Page",
"myPublicNotice": "My Public Notices", "myPublicNotice": "My Public Notices",


+ 13
- 12
src/translations/zh-CN.json View File

@@ -63,7 +63,7 @@
"MSG.payMsg2_2": " 前 完成缴费,我们将于收到缴费确认后处理刊出事宜。" , "MSG.payMsg2_2": " 前 完成缴费,我们将于收到缴费确认后处理刊出事宜。" ,
"MSG.payMsg3": "如你在宪报期数{issueYear} 年{issueVolume} 卷, 第{issueNo} 期内有多于一个公共启事的申请,你可选择完成所有此期所有稿件校对确定后,于缴费期限前在「我的公共启事」内合并付款。 ", "MSG.payMsg3": "如你在宪报期数{issueYear} 年{issueVolume} 卷, 第{issueNo} 期内有多于一个公共启事的申请,你可选择完成所有此期所有稿件校对确定后,于缴费期限前在「我的公共启事」内合并付款。 ",


"MSG.proofOutOfTime": "回逾时,请重新申请。",
"MSG.proofOutOfTime": "回逾时,请重新申请。",
"MSG.plzSelectApp": "请选择公共启事。", "MSG.plzSelectApp": "请选择公共启事。",
"MSG.actionFail": "行动失败", "MSG.actionFail": "行动失败",
"MSG.paymentHolded": "申请编号 {appNo} 已正在付款的流程中,如相关付款没有成功,请于20分钟后再尝试付款,不便之处,请见谅!", "MSG.paymentHolded": "申请编号 {appNo} 已正在付款的流程中,如相关付款没有成功,请于20分钟后再尝试付款,不便之处,请见谅!",
@@ -79,6 +79,7 @@
"backToLogin": "返回登入页面", "backToLogin": "返回登入页面",
"registerSubmitted": "帐户申请已成功提交。", "registerSubmitted": "帐户申请已成功提交。",
"registerFail": "申请失败,请稍后尝试", "registerFail": "申请失败,请稍后尝试",
"iAmSmartNoIdNoMsg": "无效资料,请返回注册页面。",


"mainPage": "主页", "mainPage": "主页",
"publicNotice": "公共启事", "publicNotice": "公共启事",
@@ -90,7 +91,7 @@
"publicNoticePaymentFPSPay": "公共启事:FPS付款", "publicNoticePaymentFPSPay": "公共启事:FPS付款",
"publicNoticePaymentProofDone": "公共启事:校对完成", "publicNoticePaymentProofDone": "公共启事:校对完成",
"publicNoticePaymentProofDoneAndPaid": "公共启事:校对完成及付款", "publicNoticePaymentProofDoneAndPaid": "公共启事:校对完成及付款",
"publicNoticePaymentProofComment": "公共启事:校对回",
"publicNoticePaymentProofComment": "公共启事:校对回",
"publicNoticePaymentProofInfo": "公共启事:校对资料", "publicNoticePaymentProofInfo": "公共启事:校对资料",
"proofRecord": "校对记录", "proofRecord": "校对记录",
"onlinePaymentHistory": "网上付款记录", "onlinePaymentHistory": "网上付款记录",
@@ -300,8 +301,8 @@
"reject": "拒绝", "reject": "拒绝",
"cancelledStatus": "取消", "cancelledStatus": "取消",
"inProgress": "进行中", "inProgress": "进行中",
"replied": "已回",
"pendingReply": "未回",
"replied": "已回",
"pendingReply": "未回",
"processing": "处理中", "processing": "处理中",
"pendingPayment": "待付款", "pendingPayment": "待付款",
"pendingPublish": "待发布", "pendingPublish": "待发布",
@@ -365,12 +366,12 @@
"proofId": "校对编号", "proofId": "校对编号",
"proofDate": "校对日期", "proofDate": "校对日期",
"proofDateFrom": "校对日期(从)", "proofDateFrom": "校对日期(从)",
"replyDate": "回日期",
"replyDate": "回日期",
"fee": "费用", "fee": "费用",
"payFeeFor": "应缴费用", "payFeeFor": "应缴费用",
"payFor": "支付", "payFor": "支付",
"payFee": "支付金額", "payFee": "支付金額",
"replyBefore": "此日期前回",
"replyBefore": "此日期前回",
"applicationPublishDate": "刊出日期", "applicationPublishDate": "刊出日期",
"pleaseCheckReminder": "请下载下列印刷稿档案,并仔细校对", "pleaseCheckReminder": "请下载下列印刷稿档案,并仔细校对",
"payAnd": "缴费及", "payAnd": "缴费及",
@@ -378,17 +379,17 @@
"paymentDeadline": "确定付印及缴费最后限期", "paymentDeadline": "确定付印及缴费最后限期",
"before": "前", "before": "前",
"page": "页", "page": "页",
"proofReplyDate": "校对回日期",
"proofReply": "校对回",
"proofReplyDate": "校对回日期",
"proofReply": "校对回",
"proofErrorFree": "可以付印(稿件正确)", "proofErrorFree": "可以付印(稿件正确)",
"proofWithError": "未能付印(需要修改)", "proofWithError": "未能付印(需要修改)",
"proofExpired": "回逾时,请重新申请。",
"proofExpired": "回逾时,请重新申请。",
"sign": "签署", "sign": "签署",
"requireLoginPassword": "请输入你的登入密码", "requireLoginPassword": "请输入你的登入密码",
"submitReply": "提交回",
"submitReply": "提交回",
"requiredUploadFix": "请上载稿件修改的档案", "requiredUploadFix": "请上载稿件修改的档案",
"upload": "上载", "upload": "上载",
"actionFail": "行动失败: 请检查内容并再次提交回",
"actionFail": "行动失败: 请检查内容并再次提交回",
"issueInvalidMsg": "行动失败: 无效宪报期数,请重新申请", "issueInvalidMsg": "行动失败: 无效宪报期数,请重新申请",
"singleCol":"一格位", "singleCol":"一格位",
"doubleCol":"二格位", "doubleCol":"二格位",
@@ -434,7 +435,7 @@
"idNo": "身份证号码", "idNo": "身份证号码",
"country": "国家", "country": "国家",
"district": "区", "district": "区",
"noRecordFound": "找不到記錄",
"noRecordFound": "找不到记录",
"rowsPerPage": "每页项数", "rowsPerPage": "每页项数",
"date" : "日期", "date" : "日期",
"keyword": "关键字", "keyword": "关键字",


+ 1
- 0
src/translations/zh-HK.json View File

@@ -79,6 +79,7 @@
"backToLogin": "返回登入頁面", "backToLogin": "返回登入頁面",
"registerSubmitted": "帳戶申請已成功提交。", "registerSubmitted": "帳戶申請已成功提交。",
"registerFail": "申請失敗,請稍後嘗試", "registerFail": "申請失敗,請稍後嘗試",
"iAmSmartNoIdNoMsg": "無效資料,請返回注冊頁面。",


"mainPage": "主頁", "mainPage": "主頁",
"publicNotice": "公共啟事", "publicNotice": "公共啟事",


Loading…
Cancel
Save