diff --git a/src/pages/Proof/Search_GLD/SearchForm.js b/src/pages/Proof/Search_GLD/SearchForm.js index 9d203ba..2869ba2 100644 --- a/src/pages/Proof/Search_GLD/SearchForm.js +++ b/src/pages/Proof/Search_GLD/SearchForm.js @@ -72,10 +72,33 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss dateFrom: sentDateFrom, dateTo: sentDateTo, contact: data.contact, - replyed: (status?.type && status?.type != 'all') ? status?.type : "", orgId: (orgSelected?.key && orgSelected?.key > 0) ? orgSelected?.key : "", }; + + + if(status?.type && status?.type != 'all'){ + if (status?.type == "Confirmed"){ + temp["replyed"] = "T"; + temp["action"] = true; + temp["cancelled"] = false; + }else if(status?.type == "Re-proofing"){ + temp["replyed"] = "T"; + temp["action"] = false; + temp["cancelled"] = false; + }else if(status?.type == "No Reply"){ + temp["replyed"] = "F"; + temp["timeOut"] = "T"; + temp["cancelled"] = false; + }else if(status?.type == "Cancelled"){ + temp["cancelled"] = true; + } else{ + temp["replyed"] = "F"; + temp["timeOut"] = "F"; + temp["cancelled"] = false; + } + } + applySearch(temp); }; @@ -299,7 +322,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss id="status" size="small" filterOptions={(options) => options} - options={ComboData.proofStatus} + options={ComboData.proofStatus_GLD} value={status} inputValue={status?.label ? status?.label : ""} onChange={(event, newValue) => { diff --git a/src/utils/ComboData.js b/src/utils/ComboData.js index fab2c1e..d18f34b 100644 --- a/src/utils/ComboData.js +++ b/src/utils/ComboData.js @@ -119,6 +119,15 @@ export const proofStatusFull = [ //{ key: 5, i18nLabel: 'Cancelled', labelCht: '已取消', label:'Cancelled', type: 'Cancelled' }, ]; +export const proofStatus_GLD= [ + { key: 0, i18nLabel: 'all', labelCht: '全部', label: 'All', type: 'all' }, + { key: 1, i18nLabel: 'proofConfirmed', labelCht: '可以付印', label:'Confirmed', type: 'Confirmed' }, + { key: 2, i18nLabel: 'proofReProofing', labelCht: '未能付印', label:'Re-proofing', type: 'Re-proofing' }, // submitted and reviewed + { key: 3, i18nLabel: 'proofNoReply', labelCht: '回覆逾時', label:'No Reply', type: 'No Reply' }, + { key: 4, i18nLabel: 'proofPendingReply', labelCht: '未回覆', label:'Pending Reply', type: 'Pending Reply' }, + { key: 5, i18nLabel: 'cancelled', labelCht: '已取消', label:'Cancelled', type: 'Cancelled' }, +]; + export const paymentStatus = [ { key: 0, i18nLabel: 'all', labelCht: '全部', label: 'All', type: 'all' }, { key: 1, i18nLabel: 'success', labelCht: '成功', label:'Success', type: 'APPR' },