Pārlūkot izejas kodu

fix case 1-5

CR013B1
Alex Cheung pirms 3 dienas
vecāks
revīzija
d2eafa69b8
9 mainītis faili ar 128 papildinājumiem un 109 dzēšanām
  1. +21
    -6
      src/layout/MainLayout/Header/index.js
  2. +96
    -103
      src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js
  3. +1
    -0
      src/pages/User/SearchPage_Individual/UserSearchForm_Individual.js
  4. +1
    -0
      src/pages/User/SearchPage_Organization/UserSearchForm_Organization.js
  5. +1
    -0
      src/pages/authentication/auth-forms/AuthLogin.js
  6. +1
    -0
      src/pages/authentication/auth-forms/AuthLoginCustom.js
  7. +1
    -0
      src/pages/iAmSmart/AuthCallback/index.js
  8. +1
    -0
      src/pages/iAmSmart/DirectLoginCallback/index.js
  9. +5
    -0
      src/utils/Utils.js

+ 21
- 6
src/layout/MainLayout/Header/index.js Parādīt failu

@@ -50,6 +50,7 @@ import {
isINDLoggedIn,
isPasswordExpiry,
haveOrgPaymentRecord,
haveOrgDnRecord,
isORGLoggedIn,
checkSysEnv
// getUserId
@@ -401,17 +402,31 @@ function Header(props) {
:
isORGLoggedIn() ?
haveOrgPaymentRecord() ?
<Link className="manageOrgUser" to='/paymentPage/search'><Typography style={{ opacity: 0.9 }} variant={"pnspsHeaderTitle"} sx={{ ml: 1 }}>
<FormattedMessage id="onlinePaymentHistory" />
</Typography></Link>
<>
<Link className="manageOrgUser" to='/paymentPage/search'><Typography style={{ opacity: 0.9 }} variant={"pnspsHeaderTitle"} sx={{ ml: 1 }}>
<FormattedMessage id="onlinePaymentHistory" />
</Typography></Link>
{haveOrgDnRecord()?
<Link className="manageOrgUser" to='/paymentPage/demandNote'><Typography style={{ opacity: 0.9 }} variant={"pnspsHeaderTitle"} sx={{ ml: 1 }}>
<FormattedMessage id="paymentInfoRecord" />
</Typography></Link>:null
}
</>
:
<Link className="manageOrgUser" to='/paymentPage/demandNote'><Typography style={{ opacity: 0.9 }} variant={"pnspsHeaderTitle"} sx={{ ml: 1 }}>
<FormattedMessage id="paymentInfoRecord" />
</Typography></Link>
:
<Link className="manageOrgUser" to='/paymentPage/search'><Typography style={{ opacity: 0.9 }} variant={"pnspsHeaderTitle"} sx={{ ml: 1 }}>
<FormattedMessage id="onlinePaymentHistory" />
</Typography></Link>
<>
<Link className="manageOrgUser" to='/paymentPage/search'><Typography style={{ opacity: 0.9 }} variant={"pnspsHeaderTitle"} sx={{ ml: 1 }}>
<FormattedMessage id="onlinePaymentHistory" />
</Typography></Link>
{haveOrgDnRecord()?
<Link className="manageOrgUser" to='/paymentPage/demandNote'><Typography style={{ opacity: 0.9 }} variant={"pnspsHeaderTitle"} sx={{ ml: 1 }}>
<FormattedMessage id="paymentInfoRecord" />
</Typography></Link>:null
}
</>
}
</li>
<li>


+ 96
- 103
src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js Parādīt failu

@@ -19,7 +19,7 @@ import ForwardIcon from '@mui/icons-material/Forward';
import {
isORGLoggedIn,
isDummyLoggedIn,
isCreditorLoggedIn,
// isCreditorLoggedIn,
checkIsOnlyOnlinePaymentByIssueDate
} from "utils/Utils";

@@ -353,106 +353,101 @@ const PublicNoticeApplyForm = ({ loadedData, _selections, gazetteIssueList }) =>
</Grid>
</Grid>
</Grid>

{!isCreditorLoggedIn() ?
<Grid item xs={12} alignItems={"center"} sx={{ p: 2 }}>
<table style={tabelStyle}>
<tbody>
<tr style={tabelStyle}>
<th style={tabelStyle} width="400" align="left"><FormattedMessage id="paymentMeans" /></th>
<th style={tabelStyle} width="300" align="left"><FormattedMessage id="confirmingDealine" /></th>
<th style={tabelStyle} width="300" align="left"><FormattedMessage id="PaymentCoonpletDealine" /></th>
</tr>
<tr>
<td style={tabelStyle}>
<FormattedMessage id="payOnline" />
<br /><a href="#payOnlineDetails" color='#fff' onClick={() => {
setWarningTitle(intl.formatMessage({ id: "paymentMeans" }) + ": " + intl.formatMessage({ id: "payOnline" }))
setWarningText(
<><FormattedMessage id="paymentMethodMeans" />:
<ul>
<li><FormattedMessage id="fps" /></li>
<li><FormattedMessage id="card" /></li>
<li><FormattedMessage id="pps" /></li>
</ul>
</>
);
setIsWarningPopUp(true);
}}><u><FormattedMessage id="viewDetail" /></u></a>
</td>
<td style={tabelStyle}>{DateUtils.dateFormat(closeDate, dft)} {locale==='en'?"2:00 p.m.":"下午2時"}</td>
<td style={tabelStyle}>
<FormattedMessage id="payOnlineRemark" values={{
date: DateUtils.dateFormat(closeDate, dft)
}} />
</td>
</tr>
{!isOnlyOnlinePayment?
<>
<tr>
<td style={tabelStyle}><FormattedMessage id="payDn" />
<br /><a href="#payDnDetails" onClick={() => {
setWarningTitle(intl.formatMessage({ id: "paymentMeans" }) + ": " + intl.formatMessage({ id: "payDn" }))
setWarningText(
<><FormattedMessage id="paymentMethodMeans" />:
<ul>
<li><FormattedMessage id="atm" /></li>
<li><FormattedMessage id="pps" /></li>
<li><FormattedMessage id="eBank" /></li>
<li><FormattedMessage id="phoneBank" /></li>
<li><FormattedMessage id="eCheque" /></li>
<li><FormattedMessage id="fps" /></li>
<li><FormattedMessage id="hkpo" /></li>
<li><FormattedMessage id="store" /></li>
<li><FormattedMessage id="post" /></li>
</ul>
<Typography variant="h6">
<div style={{ padding: 12 }} dangerouslySetInnerHTML={{ __html: intl.formatMessage({ id: "proofNote" }) }} />
</Typography>
</>
);
setIsWarningPopUp(true);
}}><u><FormattedMessage id="viewDetail" /></u></a>
</td>
<td style={tabelStyle}>{DateUtils.dateFormat(closingDateOff, dft)} {locale==='en'?"5:00 p.m.":"下午5時"}</td>
<td style={tabelStyle}>
<FormattedMessage id="payDnRemark" values={{
date: DateUtils.dateFormat(closeDate, dft)
}} />
</td>
</tr>
<tr>
<td style={tabelStyle}><FormattedMessage id="payNPGO" />
<br /><a href="#payNPGODetails" onClick={() => {
setWarningTitle(intl.formatMessage({ id: "paymentMeans" }) + ": " + intl.formatMessage({ id: "payNPGOPopUpTitle" }))
setWarningText(
<><FormattedMessage id="paymentMethodMeans" />:
<ul>
<li><FormattedMessage id="cheque" /></li>
<li><FormattedMessage id="drafts" /></li>
<li><FormattedMessage id="cashierOrders" /></li>
<li><FormattedMessage id="cash" /></li>
</ul>
</>
);
setIsWarningPopUp(true);
}}><u><FormattedMessage id="viewDetail" /></u></a>
</td>
<td style={tabelStyle}>{DateUtils.dateFormat(closeDate, dft)} {locale==='en'?"12:00 p.m.":"下午12時"}</td>
<td style={tabelStyle}>
<FormattedMessage id="payNPGORemark" values={{
date: DateUtils.dateFormat(closeDate, dft)
}} />
</td>
</tr>
</>:null
}
</tbody>
</table>

</Grid> : null
}

<Grid item xs={12} alignItems={"center"} sx={{ p: 2 }}>
<table style={tabelStyle}>
<tbody>
<tr style={tabelStyle}>
<th style={tabelStyle} width="400" align="left"><FormattedMessage id="paymentMeans" /></th>
<th style={tabelStyle} width="300" align="left"><FormattedMessage id="confirmingDealine" /></th>
<th style={tabelStyle} width="300" align="left"><FormattedMessage id="PaymentCoonpletDealine" /></th>
</tr>
<tr>
<td style={tabelStyle}>
<FormattedMessage id="payOnline" />
<br /><a href="#payOnlineDetails" color='#fff' onClick={() => {
setWarningTitle(intl.formatMessage({ id: "paymentMeans" }) + ": " + intl.formatMessage({ id: "payOnline" }))
setWarningText(
<><FormattedMessage id="paymentMethodMeans" />:
<ul>
<li><FormattedMessage id="fps" /></li>
<li><FormattedMessage id="card" /></li>
<li><FormattedMessage id="pps" /></li>
</ul>
</>
);
setIsWarningPopUp(true);
}}><u><FormattedMessage id="viewDetail" /></u></a>
</td>
<td style={tabelStyle}>{DateUtils.dateFormat(closeDate, dft)} {locale==='en'?"2:00 p.m.":"下午2時"}</td>
<td style={tabelStyle}>
<FormattedMessage id="payOnlineRemark" values={{
date: DateUtils.dateFormat(closeDate, dft)
}} />
</td>
</tr>
{!isOnlyOnlinePayment?
<>
<tr>
<td style={tabelStyle}><FormattedMessage id="payDn" />
<br /><a href="#payDnDetails" onClick={() => {
setWarningTitle(intl.formatMessage({ id: "paymentMeans" }) + ": " + intl.formatMessage({ id: "payDn" }))
setWarningText(
<><FormattedMessage id="paymentMethodMeans" />:
<ul>
<li><FormattedMessage id="atm" /></li>
<li><FormattedMessage id="pps" /></li>
<li><FormattedMessage id="eBank" /></li>
<li><FormattedMessage id="phoneBank" /></li>
<li><FormattedMessage id="eCheque" /></li>
<li><FormattedMessage id="fps" /></li>
<li><FormattedMessage id="hkpo" /></li>
<li><FormattedMessage id="store" /></li>
<li><FormattedMessage id="post" /></li>
</ul>
<Typography variant="h6">
<div style={{ padding: 12 }} dangerouslySetInnerHTML={{ __html: intl.formatMessage({ id: "proofNote" }) }} />
</Typography>
</>
);
setIsWarningPopUp(true);
}}><u><FormattedMessage id="viewDetail" /></u></a>
</td>
<td style={tabelStyle}>{DateUtils.dateFormat(closingDateOff, dft)} {locale==='en'?"5:00 p.m.":"下午5時"}</td>
<td style={tabelStyle}>
<FormattedMessage id="payDnRemark" values={{
date: DateUtils.dateFormat(closeDate, dft)
}} />
</td>
</tr>
<tr>
<td style={tabelStyle}><FormattedMessage id="payNPGO" />
<br /><a href="#payNPGODetails" onClick={() => {
setWarningTitle(intl.formatMessage({ id: "paymentMeans" }) + ": " + intl.formatMessage({ id: "payNPGOPopUpTitle" }))
setWarningText(
<><FormattedMessage id="paymentMethodMeans" />:
<ul>
<li><FormattedMessage id="cheque" /></li>
<li><FormattedMessage id="drafts" /></li>
<li><FormattedMessage id="cashierOrders" /></li>
<li><FormattedMessage id="cash" /></li>
</ul>
</>
);
setIsWarningPopUp(true);
}}><u><FormattedMessage id="viewDetail" /></u></a>
</td>
<td style={tabelStyle}>{DateUtils.dateFormat(closeDate, dft)} {locale==='en'?"12:00 p.m.":"下午12時"}</td>
<td style={tabelStyle}>
<FormattedMessage id="payNPGORemark" values={{
date: DateUtils.dateFormat(closeDate, dft)
}} />
</td>
</tr>
</>:null
}
</tbody>
</table>
</Grid>
<Grid item xs={12} md={12} lg={12}>
<Grid container direction="row" justifyContent="flex-start" alignItems="center">
<Grid item xs={12} md={3} lg={3}
@@ -528,9 +523,7 @@ const PublicNoticeApplyForm = ({ loadedData, _selections, gazetteIssueList }) =>
</>
:
null

}

{
isDummyLoggedIn() ?
<Grid item xs={12} md={12} lg={12}>


+ 1
- 0
src/pages/User/SearchPage_Individual/UserSearchForm_Individual.js Parādīt failu

@@ -61,6 +61,7 @@ const UserSearchForm_Individual = ({ applySearch, onGridReady, searchCriteria })
email:"",
phone:"",
});
localStorage.setItem('searchCriteria',"")
}

return (


+ 1
- 0
src/pages/User/SearchPage_Organization/UserSearchForm_Organization.js Parādīt failu

@@ -77,6 +77,7 @@ const UserSearchForm_Organization = ({applySearch, orgComboData, onGridReady, se
contactPerson:"",
brNoStr:"",
});
localStorage.setItem('searchCriteria',"")
}

return (


+ 1
- 0
src/pages/authentication/auth-forms/AuthLogin.js Parādīt failu

@@ -76,6 +76,7 @@ const AuthLogin = () => {
abilities: response.data.abilities,
passwordExpiryDate: response.data.passwordExpiryDate,
orgPaymentRecord: response.data.orgPaymentRecord,
orgDnRecord: response.data.orgDnRecord,
//avatar: require('src/assets/images/users/avatar-3.png').default,
}
// const abilities = response.data.abilities


+ 1
- 0
src/pages/authentication/auth-forms/AuthLoginCustom.js Parādīt failu

@@ -92,6 +92,7 @@ const AuthLoginCustom = () => {
locale: response.data.preferLocale,
passwordExpiryDate: response.data.passwordExpiryDate,
orgPaymentRecord: response.data.orgPaymentRecord,
orgDnRecord: response.data.orgDnRecord,
//avatar: require('src/assets/images/users/avatar-3.png').default,
}
const data = { ...userData, accessToken: response.data.accessToken, refreshToken: response.data.refreshToken }


+ 1
- 0
src/pages/iAmSmart/AuthCallback/index.js Parādīt failu

@@ -47,6 +47,7 @@ const Index = () => {
creditor: responseData.creditor,
passwordExpiryDate: responseData.passwordExpiryDate,
orgPaymentRecord: responseData.orgPaymentRecord,
orgDnRecord: responseData.orgDnRecord,
//locale: responseData.preferLocale,
//avatar: require('src/assets/images/users/avatar-3.png').default,
}


+ 1
- 0
src/pages/iAmSmart/DirectLoginCallback/index.js Parādīt failu

@@ -47,6 +47,7 @@ const Index = () => {
creditor: responseData.creditor,
passwordExpiryDate: responseData.passwordExpiryDate,
orgPaymentRecord: responseData.orgPaymentRecord,
orgDnRecord: responseData.orgDnRecord,
//avatar: require('src/assets/images/users/avatar-3.png').default,
}
const data = { ...userData, accessToken: responseData.accessToken, refreshToken: responseData.refreshToken }


+ 5
- 0
src/utils/Utils.js Parādīt failu

@@ -100,6 +100,11 @@ export const haveOrgPaymentRecord = () =>{
return JSON.parse(localStorage.getItem('userData')).orgPaymentRecord
}
}
export const haveOrgDnRecord = () =>{
if (localStorage.getItem('userData') != null){
return JSON.parse(localStorage.getItem('userData')).orgDnRecord
}
}
export const checkSysEnv = () =>{
if (localStorage.getItem('sysEnv') != null){
// console.log(localStorage.getItem('sysEnv'))


Notiek ielāde…
Atcelt
Saglabāt