Просмотр исходного кода

fix to payment desc for private bill

web-access-fix-2
Jason Chuang 1 день назад
Родитель
Сommit
c118bfbde9
8 измененных файлов: 24 добавлений и 4 удалений
  1. +2
    -1
      src/pages/Payment/Details_GLD/DataGrid.js
  2. +2
    -1
      src/pages/Payment/Details_Public/DataGrid.js
  3. +1
    -1
      src/pages/Proof/Reply_GLD/ApplicationDetails.js
  4. +1
    -1
      src/pages/Proof/Reply_Public/ApplicationDetails.js
  5. +1
    -0
      src/translations/en.json
  6. +1
    -0
      src/translations/zh-CN.json
  7. +1
    -0
      src/translations/zh-HK.json
  8. +15
    -0
      src/utils/Utils.js

+ 2
- 1
src/pages/Payment/Details_GLD/DataGrid.js Просмотреть файл

@@ -4,6 +4,7 @@ import {
} from '@mui/material'; } from '@mui/material';
import { import {
isORGLoggedIn, isORGLoggedIn,
formatPaymentParticularsLength,
} from "utils/Utils"; } from "utils/Utils";
import * as React from 'react'; import * as React from 'react';
import * as FormatUtils from "utils/FormatUtils" import * as FormatUtils from "utils/FormatUtils"
@@ -48,7 +49,7 @@ export default function SearchPublicNoticeTable({ recordList }) {
{isORGLoggedIn()&&params.row.careOf!=null&&params.row.careOf!=""?<>{params.row.careOf}<br /></>:null} {isORGLoggedIn()&&params.row.careOf!=null&&params.row.careOf!=""?<>{params.row.careOf}<br /></>:null}
App No: {appNo}<br/> App No: {appNo}<br/>
Issue Date: {DateUtils.dateValue(params.row.issueDate)}<br/> Issue Date: {DateUtils.dateValue(params.row.issueDate)}<br/>
Length: {params.row.length+ " cm"}</div>
Length: {formatPaymentParticularsLength(params.row)}</div>
}, },
}, },
{ {


+ 2
- 1
src/pages/Payment/Details_Public/DataGrid.js Просмотреть файл

@@ -4,6 +4,7 @@ import {
} from '@mui/material'; } from '@mui/material';
import { import {
isORGLoggedIn, isORGLoggedIn,
formatPaymentParticularsLength,
} from "utils/Utils"; } from "utils/Utils";
import * as React from 'react'; import * as React from 'react';
import * as FormatUtils from "utils/FormatUtils" import * as FormatUtils from "utils/FormatUtils"
@@ -75,7 +76,7 @@ export default function SearchPublicNoticeTable({ recordList }) {
{isORGLoggedIn()&&params.row.careOf!=null&&params.row.careOf!=""?<>{params.row.careOf}<br /></>:null} {isORGLoggedIn()&&params.row.careOf!=null&&params.row.careOf!=""?<>{params.row.careOf}<br /></>:null}
<FormattedMessage id="applicationId"/>: {appNo}<br/> <FormattedMessage id="applicationId"/>: {appNo}<br/>
<FormattedMessage id="gazetteDate"/>: {locale === 'en' ? DateUtils.dateValue(params.row.issueDate) : DateUtils.dateStr_Cht(params.row.issueDate)}<br/> <FormattedMessage id="gazetteDate"/>: {locale === 'en' ? DateUtils.dateValue(params.row.issueDate) : DateUtils.dateStr_Cht(params.row.issueDate)}<br/>
<FormattedMessage id="gazetteLength"/>: {params.row.length+ " cm"}</div>
<FormattedMessage id="gazetteLength"/>: {formatPaymentParticularsLength(params.row, intl)}</div>
}, },
}, },
{ {


+ 1
- 1
src/pages/Proof/Reply_GLD/ApplicationDetails.js Просмотреть файл

@@ -350,7 +350,7 @@ const ApplicationDetailCard = ({
{ {
formik.values.groupType == "Private Bill" formik.values.groupType == "Private Bill"
? ?
<Typography variant="h5">( {data.noOfPages} page x $6,552 )</Typography>
<Typography variant="h5">( {data.noOfPages} {data.noOfPages === 1 ? 'page' : 'pages'} x $6,552 )</Typography>
: :
<Typography variant="h5">( {data.length} cm x {data.colCount == 2 ? "$364 Double Column" : "$182 Single Column"} )</Typography> <Typography variant="h5">( {data.length} cm x {data.colCount == 2 ? "$364 Double Column" : "$182 Single Column"} )</Typography>
} }


+ 1
- 1
src/pages/Proof/Reply_Public/ApplicationDetails.js Просмотреть файл

@@ -311,7 +311,7 @@ const ApplicationDetailCard = ({ formData, }) => {
formik.values.groupType === "Private Bill" formik.values.groupType === "Private Bill"
? ?
<Typography> <Typography>
<Typography variant="pnspsFormParagraph">( {data.noOfPages} {intl.formatMessage({ id: 'page' })} x $6,552 )</Typography>
<Typography variant="pnspsFormParagraph">( {data.noOfPages} {intl.formatMessage({ id: data.noOfPages === 1 ? 'page' : 'pages' })} x $6,552 )</Typography>
</Typography> </Typography>
: :
<Typography> <Typography>


+ 1
- 0
src/translations/en.json Просмотреть файл

@@ -519,6 +519,7 @@


"before": "Before", "before": "Before",
"page": "Page", "page": "Page",
"pages": "pages",
"proofReplyDate": "Proof Reply Date", "proofReplyDate": "Proof Reply Date",
"proofReply": "Proof Reply", "proofReply": "Proof Reply",
"proofErrorFree": "Pass for printing (without correction)", "proofErrorFree": "Pass for printing (without correction)",


+ 1
- 0
src/translations/zh-CN.json Просмотреть файл

@@ -515,6 +515,7 @@
"paymentDeadline": "网上确定付印最后限期", "paymentDeadline": "网上确定付印最后限期",
"before": "前", "before": "前",
"page": "页", "page": "页",
"pages": "页",
"proofReplyDate": "校对回复日期", "proofReplyDate": "校对回复日期",
"proofReply": "校对回复", "proofReply": "校对回复",
"proofErrorFree": "可以付印(稿件正确)", "proofErrorFree": "可以付印(稿件正确)",


+ 1
- 0
src/translations/zh-HK.json Просмотреть файл

@@ -516,6 +516,7 @@
"paymentDeadline": "網上確定付印最後限期", "paymentDeadline": "網上確定付印最後限期",
"before": "前", "before": "前",
"page": "頁", "page": "頁",
"pages": "頁",
"proofReplyDate": "校對回覆日期", "proofReplyDate": "校對回覆日期",
"proofReply": "校對回覆", "proofReply": "校對回覆",
"proofErrorFree": "可以付印(稿件正確)", "proofErrorFree": "可以付印(稿件正確)",


+ 15
- 0
src/utils/Utils.js Просмотреть файл

@@ -165,6 +165,21 @@ export const gazetteLength = (length,noOfPages) => {
return countLength+" cm" return countLength+" cm"
} }


export const formatPaymentParticularsLength = (row, intl) => {
if (row.groupTitle === 'Private Bill') {
const pages = row.noOfPages ?? 1;
if (intl) {
if (intl.locale === 'en') {
return pages === 1 ? '1 page' : `${pages} pages`;
}
const pageLabel = intl.formatMessage({ id: 'pages' });
return `${pages} ${pageLabel}`;
}
return pages === 1 ? '1 page' : `${pages} pages`;
}
return `${row.length ?? 0} cm`;
}

export const getUserId = () =>{ export const getUserId = () =>{
if (localStorage.getItem('userData') != null){ if (localStorage.getItem('userData') != null){
return JSON.parse(localStorage.getItem('userData')).id return JSON.parse(localStorage.getItem('userData')).id


Загрузка…
Отмена
Сохранить