diff --git a/src/auth/utils.js b/src/auth/utils.js index 25c5dd7..80d5aef 100644 --- a/src/auth/utils.js +++ b/src/auth/utils.js @@ -141,5 +141,5 @@ export const getPaymentMethod = (paymentMethod) => { if(paymentMethod == "online") return 'payOnlineMethod'; if(paymentMethod == "demandNote") return 'payDnMethod'; if(paymentMethod == "office") return 'payNPGOMethod'; - // return null; + return "other"; } \ No newline at end of file diff --git a/src/components/iAmSmartButton.js b/src/components/iAmSmartButton.js new file mode 100644 index 0000000..ab5a01e --- /dev/null +++ b/src/components/iAmSmartButton.js @@ -0,0 +1,32 @@ +// material-ui +import {useState, useEffect} from 'react'; +import iAmSmartICon from 'assets/images/icons/icon_iAmSmart.png'; +import { + Button, + Typography +}from '@mui/material'; + +// ==============================|| EVENT TABLE ||============================== // + +export function IAmSmartButton({ label, onClickFun, fullWidth }) { + + const [_label, set_label] = useState(""); + + useEffect(()=>{ + set_label(label); + } + ,[label]); + + + const doOnClick=()=>{ + onClickFun(); + } + + return ( + + ); +} diff --git a/src/pages/Proof/Payment/Pay_DN.js b/src/pages/Proof/Payment/Pay_DN.js index f69f621..96bce0a 100644 --- a/src/pages/Proof/Payment/Pay_DN.js +++ b/src/pages/Proof/Payment/Pay_DN.js @@ -67,7 +67,7 @@ const Index = ({ record }) => { id: 'proofPaymentBody_demandNote2' }, { - beforeClosingDate: "{beforeClosingDate}", + closingDateOff: "{closingDateOff}", email: record?.mail, } ) diff --git a/src/pages/Proof/Reply_Public/ProofForm.js b/src/pages/Proof/Reply_Public/ProofForm.js index 0134033..4cb9e47 100644 --- a/src/pages/Proof/Reply_Public/ProofForm.js +++ b/src/pages/Proof/Reply_Public/ProofForm.js @@ -82,6 +82,10 @@ const FormPanel = ({ formData }) => { setWarningText(intl.formatMessage({ id: 'MSG.overReviseDeadline' })); setIsWarningPopUp(true); return; + }else if ( formData.creditor==false && paymentMethod=="") { + setWarningText(intl.formatMessage({ id: 'MSG.plzSelectPaymentMethod' })); + setIsWarningPopUp(true); + return; } if (!actionValue) { @@ -103,7 +107,7 @@ const FormPanel = ({ formData }) => { files: attachments ? attachments : [], onSuccess: function (responseData) { if (responseData.msg) { - setWarningText(intl.formatMessage({ id: 'MSG.proofOutOfTime' })); + setWarningText(intl.formatMessage({ id: responseData.msg})); setIsWarningPopUp(true); return; } @@ -171,7 +175,7 @@ const FormPanel = ({ formData }) => { } const isOverDnReviseDeadline = () => { - let reviseDeadline = DateUtils.convertToDate(formData.beforeClosingDate); + let reviseDeadline = DateUtils.convertToDate(formData.closingDateOff); reviseDeadline?.setTime(reviseDeadline?.getTime() + (17 * 60 * 60 * 1000));// 17:00 if (!reviseDeadline) return true; let current = new Date(); @@ -321,7 +325,7 @@ const FormPanel = ({ formData }) => {