Kaynağa Gözat

update proof record

master
jason.lam 1 yıl önce
ebeveyn
işleme
a43dd1c3bb
11 değiştirilmiş dosya ile 142 ekleme ve 34 silme
  1. +1
    -1
      src/components/FileList.js
  2. +1
    -1
      src/pages/Payment/Search_Public/SearchForm.js
  3. +23
    -7
      src/pages/Proof/Reply_Public/ApplicationDetails.js
  4. +35
    -13
      src/pages/Proof/Reply_Public/ProofForm.js
  5. +1
    -1
      src/pages/Proof/Reply_Public/UploadFileTable.js
  6. +5
    -4
      src/pages/Proof/Search_Public/DataGrid.js
  7. +3
    -3
      src/pages/Proof/Search_Public/SearchForm.js
  8. +24
    -1
      src/translations/en.json
  9. +23
    -0
      src/translations/zh-CN.json
  10. +23
    -0
      src/translations/zh-HK.json
  11. +3
    -3
      src/utils/ComboData.js

+ 1
- 1
src/components/FileList.js Dosyayı Görüntüle

@@ -104,7 +104,7 @@ export default function FileList({ refType, refId, allowDelete, sx, dateHideable
{
id: 'filesize',
field: 'filesize',
headerName: intl.formatMessage({id: 'fileName'}),
headerName: intl.formatMessage({id: 'fileSize'}),
width: isMdOrLg ? 'auto' : 160,
flex: isMdOrLg ? 1 : undefined,
valueGetter: (params) => {


+ 1
- 1
src/pages/Payment/Search_Public/SearchForm.js Dosyayı Görüntüle

@@ -111,7 +111,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => {
</Grid>

<Grid item xs={1.5} s={1.5} md={1.5} lg={1} sx={{mt:1.3, display: 'flex', justifyContent:"center", alignItems: 'flex-start'}}>
<FormattedMessage id="to" />
</Grid>

<Grid item xs={5.25} s={5.25} md={5.25} lg={5.5}>


+ 23
- 7
src/pages/Proof/Reply_Public/ApplicationDetails.js Dosyayı Görüntüle

@@ -23,6 +23,7 @@ const ApplicationDetailCard = ({ formData, }) => {

const params = useParams();
const intl = useIntl();
const { locale } = intl;

const [data, setData] = React.useState({});
//const [proofId, setProofId] = React.useState();
@@ -132,7 +133,7 @@ const ApplicationDetailCard = ({ formData, }) => {
<Grid item xs={12} md={3} lg={3}
sx={{ display: 'flex', alignItems: 'center' }}>
<FormLabel><Typography variant="h5">
<FormattedMessage id="FgazetteCount"/>:
<FormattedMessage id="gazetteCount"/>:
</Typography></FormLabel>
</Grid>

@@ -163,7 +164,9 @@ const ApplicationDetailCard = ({ formData, }) => {
<Grid container alignItems={"center"}>
<Grid item xs={12} md={3} lg={3}
sx={{ display: 'flex', alignItems: 'center' }}>
<FormLabel><Typography variant="h5">刊出日期:</Typography></FormLabel>
<FormLabel><Typography variant="h5">
<FormattedMessage id="applicationPublishDate" />:
</Typography></FormLabel>
</Grid>

<Grid item xs={12} md={9} lg={9}>
@@ -202,7 +205,9 @@ const ApplicationDetailCard = ({ formData, }) => {
<Grid item xs={12} sm={12} md={6} lg={6} sx={{mb: 1}}>
<Grid container alignItems={"center"}>
<Grid item xs={12} sm={12} md={12} lg={12} sx={{ alignItems: 'center',wordBreak: 'break-word' }}>
<Typography><Typography variant="h5">請下載下列印刷稿檔案,並仔細校對:</Typography></Typography>
<Typography><Typography variant="h5">
<FormattedMessage id="pleaseCheckReminder" />:
</Typography></Typography>
</Grid>
<Grid item xs={12} sm={12} md={12} lg={12} sx={{ width:'95%', maxWidth: {xs:'70vw', sm:'72vw', md:'75vw',lg:'80vw'}}}>
<FileList
@@ -225,10 +230,21 @@ const ApplicationDetailCard = ({ formData, }) => {
<Grid container alignItems={"center"}>
<Grid item xs={12} md={12} lg={12}
sx={{ display: 'flex', alignItems: 'center' }}>
<Typography variant="h5" display="inline"><Typography variant="h5" style={{color:'red'}} display="inline">繳費及</Typography>返稿最後限期:</Typography>
<Typography variant="h5" display="inline">
<Typography variant="h5" style={{color:'red'}} display="inline">
<FormattedMessage id="payAnd" />
</Typography>
<FormattedMessage id="commentDeadline" />:
</Typography>
</Grid>
<Grid item xs={12} md={12} lg={12} sx={{ mb: 4, display: 'flex', alignItems: 'center' }}>
<Typography variant="h5">&emsp;{DateUtils.datetimeStr_Cht(data.returnBeforeDate)} 前</Typography>
<Typography variant="h5">&emsp;
{locale === 'en' ?
`${intl.formatMessage({id: 'before'})} ${DateUtils.datetimeStr(data.returnBeforeDate)} `
:
`${DateUtils.datetimeStr_Cht(data.returnBeforeDate)} ${intl.formatMessage({id: 'before'})}`
}
</Typography>
</Grid>
<Grid item xs={12} sm={3} md={3} lg={3}
sx={{ mb: 1, display: 'flex', alignItems: 'center' }}>
@@ -243,9 +259,9 @@ const ApplicationDetailCard = ({ formData, }) => {
{
formik.values.groupType === "Private Bill"
?
<Typography variant="h5">( {data.noOfPages} x $6,552 )</Typography>
<Typography variant="h5">( {data.noOfPages} {intl.formatMessage({id: 'page'})} x $6,552 )</Typography>
:
<Typography variant="h5">( {data.length} cm x {data.colCount == 2 ? "$364 二格位" : "$182 一格位"} )</Typography>
<Typography variant="h5">( {data.length} cm x {data.colCount === 2 ? "$364 二格位" : "$182 一格位"} )</Typography>
}
</Grid>
</Grid>


+ 35
- 13
src/pages/Proof/Reply_Public/ProofForm.js Dosyayı Görüntüle

@@ -32,6 +32,7 @@ const UploadFileTable = Loadable(React.lazy(() => import('./UploadFileTable')));

const FormPanel = ({ formData }) => {
const intl = useIntl();
const { locale } = intl;
const [data, setData] = React.useState({});
const [attachments, setAttachments] = React.useState([]);

@@ -53,7 +54,7 @@ const FormPanel = ({ formData }) => {
enableReinitialize: true,
initialValues: data,
validationSchema: yup.object().shape({
vaild: yup.string().max(255, "請輸入你的登入密碼").required('請輸入你的登入密碼'),
vaild: yup.string().max(255, intl.formatMessage({id: 'requireLoginPassword'})).required(intl.formatMessage({id: 'requireLoginPassword'})),
}),
onSubmit: values => {
if (!actionValue) {
@@ -91,12 +92,12 @@ const FormPanel = ({ formData }) => {
}
},
onFail: function (response) {
setWarningText("行動失敗: 請檢查內容並再次提交回覆");
setWarningText(intl.formatMessage({id: 'actionFail'}));
setIsWarningPopUp(true);
console.log(response);
},
onError: function (error) {
setWarningText("行動失敗: 請檢查內容並再次提交回覆");
setWarningText(intl.formatMessage({id: 'actionFail'}));
setIsWarningPopUp(true);
console.log(error);
}
@@ -152,10 +153,27 @@ const FormPanel = ({ formData }) => {
formik.values.replyDate ?
<Grid container direction="column" sx={{ paddingLeft: 0, paddingRight: 0 }}>
<Grid item xs={12} sm={12} md={12} lg={8} textAlign="left">
<Typography variant="h5">校對回覆日期: {DateUtils.datetimeStr_Cht(formik.values.replyDate)}</Typography>
<Typography variant="h5">
<FormattedMessage id="proofReplyDate" />:
{
locale === 'en' ?
DateUtils.dateStr(formik.values.replyDate)
:
DateUtils.datetimeStr_Cht(formik.values.replyDate)
}
</Typography>
</Grid>
<Grid item xs={12} md={12} textAlign="left">
<Typography variant="h5">校對回覆: {formik.values.action ? (<span style={{ color: 'green' }}>可以付印(稿件正確)</span>) : (<span style={{ color: 'red' }}>未能付印(需要修改)</span>)}</Typography>
<Typography variant="h5">
<FormattedMessage id="proofReply" />: {formik.values.action ?
(<span style={{ color: 'green' }}>
<FormattedMessage id="proofErrorFree" />
</span>)
:
(<span style={{ color: 'red' }}>
<FormattedMessage id="proofWithError" />
</span>)}
</Typography>
</Grid>
{
formik.values.action ?
@@ -195,11 +213,11 @@ const FormPanel = ({ formData }) => {
name="action"
defaultValue={true}
onChange={(event) => {
setActionValue(event.target.value == "true" ? true : false);
setActionValue(event.target.value === "true" ? true : false);
}}
>
<FormControlLabel value={true} control={<Radio />} label="可以付印(稿件正確)" />
<FormControlLabel value={false} control={<Radio />} label="未能付印(需要修改)" />
<FormControlLabel value={true} control={<Radio />} label={intl.formatMessage({id: 'proofErrorFree'})} />
<FormControlLabel value={false} control={<Radio />} label={intl.formatMessage({id: 'proofWithError'})} />
</RadioGroup>
</Grid>

@@ -210,7 +228,9 @@ const FormPanel = ({ formData }) => {
:
<>
<Grid item xs={12} md={12} textAlign="left">
<Typography variant="h5">請上載稿件修改的檔案:</Typography>
<Typography variant="h5">
<FormattedMessage id="requiredUploadFix" />:
</Typography>
</Grid>

<Grid item xs={12} md={12} textAlign="left">
@@ -233,7 +253,7 @@ const FormPanel = ({ formData }) => {
variant="contained"
disabled={attachments.length >= (formik.values.groupType === "Private Bill" ? 2 : 1)}
>
上載
<FormattedMessage id="upload" />
</Button>
</ThemeProvider>
</label>
@@ -249,7 +269,9 @@ const FormPanel = ({ formData }) => {
<Grid item xs={12} sm={12} md={12} lg={12}>
<Stack direction="row" alignItems="center">
<FormLabel sx={{ paddingRight: 2, paddingBottom: 3, textAlign: "center" }}>
<Typography variant="h5">簽署:</Typography>
<Typography variant="h5">
<FormattedMessage id="sign" />:
</Typography>
</FormLabel>
<TextField
fullWidth
@@ -259,7 +281,7 @@ const FormPanel = ({ formData }) => {
variant="outlined"
error={Boolean(formik.errors["vaild"])}
helperText={formik.errors["vaild"] ? formik.errors["vaild"] : ' '}
placeholder="請輸入你的登入密碼"
placeholder={intl.formatMessage({id: 'requireLoginPassword'})}
sx={
{
"& .MuiInputBase-input.Mui-disabled": {
@@ -282,7 +304,7 @@ const FormPanel = ({ formData }) => {
color="success"
type="submit"
>
提交回覆
<FormattedMessage id="submitReply" />
</Button>
</ThemeProvider>
</Grid>


+ 1
- 1
src/pages/Proof/Reply_Public/UploadFileTable.js Dosyayı Görüntüle

@@ -77,7 +77,7 @@ export default function UploadFileTable({recordList, setRecordList,}) {
{
id: 'name',
field: 'name',
headerName: '檔案名稱',
headerName: intl.formatMessage({id: 'fileName'}),
width: isMdOrLg ? 'auto' : 160,
flex: isMdOrLg ? 1 : undefined,
},


+ 5
- 4
src/pages/Proof/Search_Public/DataGrid.js Dosyayı Görüntüle

@@ -21,6 +21,7 @@ export default function SearchPublicNoticeTable({ recordList }) {
const theme = useTheme();
const isMdOrLg = useMediaQuery(theme.breakpoints.up('md'));
const intl = useIntl();
const { locale } = intl;

const _sx = {
padding: "4 2 4 2",
@@ -78,7 +79,7 @@ export default function SearchPublicNoticeTable({ recordList }) {
{
id: 'appId',
field: 'appId',
headerName: isORGLoggedIn()?"憲報期數 / Care Of/ 我的備註":"憲報期數 / 我的備註",
headerName: isORGLoggedIn()?intl.formatMessage({id: 'gazetteCount3'}):intl.formatMessage({id: 'gazetteCount2'}),
width: isMdOrLg ? 'auto' : 160,
flex: isMdOrLg ? 1 : undefined,
renderCell: (params) => {
@@ -106,13 +107,13 @@ export default function SearchPublicNoticeTable({ recordList }) {
{
id: 'returnBeforeDate',
field: 'returnBeforeDate',
headerName: '此日期前回覆',
headerName: intl.formatMessage({id: 'replyBefore'}),
width: isMdOrLg ? 'auto' : 250,
flex: isMdOrLg ? 1.5 : undefined,
valueGetter: (params) => {
let returnBeforeDate = DateUtils.convertToDate(params?.value);
returnBeforeDate = returnBeforeDate.setHours(14, 0, 0, 0);
return DateUtils.datetimeStr_Cht(returnBeforeDate);
return locale === 'en' ? DateUtils.datetimeStr(returnBeforeDate) : DateUtils.datetimeStr_Cht(returnBeforeDate);
}
},
{
@@ -131,7 +132,7 @@ export default function SearchPublicNoticeTable({ recordList }) {
width: isMdOrLg ? 'auto' : 160,
flex: isMdOrLg ? 1 : undefined,
renderCell: (params) => {
return ProofStatus.getStatus_Cht(params);
return locale === 'en' ? ProofStatus.getStatus_Eng(params) : ProofStatus.getStatus_Cht(params);
},
},
{


+ 3
- 3
src/pages/Proof/Search_Public/SearchForm.js Dosyayı Görüntüle

@@ -203,7 +203,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, issueComboData
</Grid>

<Grid item xs={1.5} s={1.5} md={1.5} lg={1} sx={{mt:1.3, display: 'flex', justifyContent:"center", alignItems: 'flex-start'}}>
<FormattedMessage id="to" />
</Grid>

<Grid item xs={5.25} s={5.25} md={5.25} lg={5.5}>
@@ -249,8 +249,8 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, issueComboData
filterOptions={(options) => options}
options={ComboData.proofStatus}
value={status}
getOptionLabel={(option) => option.labelCht}
inputValue={status?.labelCht ? status?.labelCht : ""}
getOptionLabel={(option) => option.type? intl.formatMessage({ id: option.i18nLabel }) : ""}
inputValue={status? intl.formatMessage({ id: status.i18nLabel }) : ""}
onChange={(event, newValue) => {
if (newValue !== null) {
setStatus(newValue);


+ 24
- 1
src/translations/en.json Dosyayı Görüntüle

@@ -197,7 +197,10 @@

"applyPublicNotice": "Apply for public notice",
"attention": "attention",
"to": "To",
"all": "All",
"replied": "Replied",
"pendingReply": "PendingReply",
"processing": "Processing",
"pendingPayment": "Pending payment",
"pendingPublish": "To be Published",
@@ -244,7 +247,9 @@
"publicNoticeDetailTitle": "Public Notice Application Information",
"applyPerson": "Applicant",
"applyStatus": "Application Status",
"gazetteCount": "Gazette issues date",
"gazetteCount": "Gazette issues number",
"gazetteCount2" :"Gazette issues number / Remarks",
"gazetteCount3" :"Gazette issues number / Care Of/ Remarks",
"publishDate": "Publish date",
"draftFile": "Manuscript file",
"download": "Download",
@@ -257,6 +262,24 @@
"payFeeFor": "Pay for",
"payFor": "Pay",
"payFee": "Payment Amount",
"replyBefore": "Reply before",
"applicationPublishDate": "Publish date",
"pleaseCheckReminder": "Please download the following printed manuscript file and proofread it carefully",
"payAnd": "Pay and ",
"commentDeadline": "Deadline for submission of manuscripts",
"before": "Before",
"page": "Page",
"proofReplyDate": "Proof Reply Date",
"proofReply": "Proof Reply",
"proofErrorFree": "Can be printed (the manuscript is correct)",
"proofWithError": "Failed to print (requires modification)",
"proofExpired": "Response timed out, please apply again.",
"sign": "Sign",
"requireLoginPassword": "Please enter your login password",
"submitReply": "Submit",
"requiredUploadFix": "Please upload the modified file of the manuscript",
"upload": "Upload",
"actionFail": "Action failed: Please check the content and submit the reply again",

"Dashboard": "Dashboard",
"event": "Event"

+ 23
- 0
src/translations/zh-CN.json Dosyayı Görüntüle

@@ -197,7 +197,10 @@

"applyPublicNotice": "申请公共启事",
"attention": "注意",
"to": "到",
"all": "全部",
"replied": "已回覆",
"pendingReply": "未回覆",
"processing": "处理中",
"pendingPayment": "待付款",
"pendingPublish": "待发布",
@@ -245,6 +248,8 @@
"applyPerson": "申请人",
"applyStatus": "申请状态",
"gazetteCount": "宪报期数",
"gazetteCount2" :"宪报期数 / 我的备注",
"gazetteCount3" :"宪报期数 / Care Of/ 我的备注",
"publishDate": "发布日期",
"draftFile": "稿件档案",
"download": "下载",
@@ -257,6 +262,24 @@
"payFeeFor": "应缴费用",
"payFor": "支付",
"payFee": "支付金額",
"replyBefore": "此日期前回覆",
"applicationPublishDate": "刊出日期",
"pleaseCheckReminder": "请下载下列印刷稿档案,并仔细校对",
"payAnd": "缴费及",
"commentDeadline": "返稿最后限期",
"before": "前",
"page": "页",
"proofReplyDate": "校对回覆日期",
"proofReply": "校对回覆",
"proofErrorFree": "可以付印(稿件正确)",
"proofWithError": "未能付印(需要修改)",
"proofExpired": "回覆逾时,请重新申请。",
"sign": "签署",
"requireLoginPassword": "请输入你的登入密码",
"submitReply": "提交回覆",
"requiredUploadFix": "请上载稿件修改的档案",
"upload": "上载",
"actionFail": "行动失败: 请检查内容并再次提交回覆",

"Dashboard": "仪表板",
"event": "活动"

+ 23
- 0
src/translations/zh-HK.json Dosyayı Görüntüle

@@ -197,7 +197,10 @@

"applyPublicNotice": "申請公共啟事",
"attention": "注意",
"to": "到",
"all": "全部",
"replied": "已回覆",
"pendingReply": "未回覆",
"processing": "處理中",
"pendingPayment": "待付款",
"pendingPublish": "待發佈",
@@ -245,6 +248,8 @@
"applyPerson": "申請人",
"applyStatus": "申請狀態",
"gazetteCount": "憲報期數",
"gazetteCount2" :"憲報期數 / 我的備註",
"gazetteCount3" :"憲報期數 / Care Of/ 我的備註",
"publishDate": "發佈日期",
"draftFile": "稿件檔案",
"download": "下載",
@@ -257,6 +262,24 @@
"payFeeFor": "應繳費用",
"payFor": "支付",
"payFee": "支付金額",
"replyBefore": "此日期前回覆",
"applicationPublishDate": "刊出日期",
"pleaseCheckReminder": "請下載下列印刷稿檔案,並仔細校對",
"payAnd": "繳費及",
"commentDeadline": "返稿最後限期",
"before": "前",
"page": "頁",
"proofReplyDate": "校對回覆日期",
"proofReply": "校對回覆",
"proofErrorFree": "可以付印(稿件正確)",
"proofWithError": "未能付印(需要修改)",
"proofExpired": "回覆逾時,請重新申請。",
"sign": "簽署",
"requireLoginPassword": "請輸入你的登入密碼",
"submitReply": "提交回覆",
"requiredUploadFix": "請上載稿件修改的檔案",
"upload": "上載",
"actionFail": "行動失敗: 請檢查內容並再次提交回覆",

"Dashboard": "儀表板",
"event": "活動"

+ 3
- 3
src/utils/ComboData.js Dosyayı Görüntüle

@@ -92,9 +92,9 @@ export const proofPrice = [
];

export const proofStatus = [
{ key: 0, labelCht: '全部', label: 'All', type: 'all' },
{ key: 1, labelCht: '已回覆', label:'Replied', type: 'T' }, // submitted and reviewed
{ key: 2, labelCht: '未回覆', label:'Pending Reply', type: 'F' },
{ key: 0, i18nLabel: 'all', labelCht: '全部', label: 'All', type: 'all' },
{ key: 1, i18nLabel: 'replied', labelCht: '已回覆', label:'Replied', type: 'T' }, // submitted and reviewed
{ key: 2, i18nLabel: 'pendingReply', labelCht: '未回覆', label:'Pending Reply', type: 'F' },
];

export const paymentStatus = [


Yükleniyor…
İptal
Kaydet