Procházet zdrojové kódy

fix to payment desc for private bill

web-access-fix-2
Jason Chuang před 1 dnem
rodič
revize
c118bfbde9
8 změnil soubory, kde provedl 24 přidání a 4 odebrání
  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 Zobrazit soubor

@@ -4,6 +4,7 @@ import {
} from '@mui/material';
import {
isORGLoggedIn,
formatPaymentParticularsLength,
} from "utils/Utils";
import * as React from 'react';
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}
App No: {appNo}<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 Zobrazit soubor

@@ -4,6 +4,7 @@ import {
} from '@mui/material';
import {
isORGLoggedIn,
formatPaymentParticularsLength,
} from "utils/Utils";
import * as React from 'react';
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}
<FormattedMessage id="applicationId"/>: {appNo}<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 Zobrazit soubor

@@ -350,7 +350,7 @@ const ApplicationDetailCard = ({
{
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>
}


+ 1
- 1
src/pages/Proof/Reply_Public/ApplicationDetails.js Zobrazit soubor

@@ -311,7 +311,7 @@ const ApplicationDetailCard = ({ formData, }) => {
formik.values.groupType === "Private Bill"
?
<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>


+ 1
- 0
src/translations/en.json Zobrazit soubor

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

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


+ 1
- 0
src/translations/zh-CN.json Zobrazit soubor

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


+ 1
- 0
src/translations/zh-HK.json Zobrazit soubor

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


+ 15
- 0
src/utils/Utils.js Zobrazit soubor

@@ -165,6 +165,21 @@ export const gazetteLength = (length,noOfPages) => {
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 = () =>{
if (localStorage.getItem('userData') != null){
return JSON.parse(localStorage.getItem('userData')).id


Načítá se…
Zrušit
Uložit