| @@ -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()&¶ms.row.careOf!=null&¶ms.row.careOf!=""?<>{params.row.careOf}<br /></>:null} | {isORGLoggedIn()&¶ms.row.careOf!=null&¶ms.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> | |||||
| }, | }, | ||||
| }, | }, | ||||
| { | { | ||||
| @@ -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()&¶ms.row.careOf!=null&¶ms.row.careOf!=""?<>{params.row.careOf}<br /></>:null} | {isORGLoggedIn()&¶ms.row.careOf!=null&¶ms.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> | |||||
| }, | }, | ||||
| }, | }, | ||||
| { | { | ||||
| @@ -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> | ||||
| } | } | ||||
| @@ -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> | ||||
| @@ -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)", | ||||
| @@ -515,6 +515,7 @@ | |||||
| "paymentDeadline": "网上确定付印最后限期", | "paymentDeadline": "网上确定付印最后限期", | ||||
| "before": "前", | "before": "前", | ||||
| "page": "页", | "page": "页", | ||||
| "pages": "页", | |||||
| "proofReplyDate": "校对回复日期", | "proofReplyDate": "校对回复日期", | ||||
| "proofReply": "校对回复", | "proofReply": "校对回复", | ||||
| "proofErrorFree": "可以付印(稿件正确)", | "proofErrorFree": "可以付印(稿件正确)", | ||||
| @@ -516,6 +516,7 @@ | |||||
| "paymentDeadline": "網上確定付印最後限期", | "paymentDeadline": "網上確定付印最後限期", | ||||
| "before": "前", | "before": "前", | ||||
| "page": "頁", | "page": "頁", | ||||
| "pages": "頁", | |||||
| "proofReplyDate": "校對回覆日期", | "proofReplyDate": "校對回覆日期", | ||||
| "proofReply": "校對回覆", | "proofReply": "校對回覆", | ||||
| "proofErrorFree": "可以付印(稿件正確)", | "proofErrorFree": "可以付印(稿件正確)", | ||||
| @@ -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 | ||||