| @@ -28,9 +28,9 @@ const UploadFileTable = Loadable(React.lazy(() => import('./UploadFileTable'))); | |||||
| const proofFormInitialValues = { | const proofFormInitialValues = { | ||||
| reviseDeadline: '', | reviseDeadline: '', | ||||
| proofPaymentDeadline: '', | proofPaymentDeadline: '', | ||||
| length: 0, | |||||
| noOfPages: 0, | |||||
| fee: 0, | |||||
| length: '', | |||||
| noOfPages: '', | |||||
| fee: '', | |||||
| groupType: '' | groupType: '' | ||||
| }; | }; | ||||
| @@ -58,18 +58,11 @@ const FormPanel = ({ formData }) => { | |||||
| React.useEffect(() => { | React.useEffect(() => { | ||||
| if (formData) { | if (formData) { | ||||
| const normalizedFormData = { | |||||
| ...formData, | |||||
| length: formData.length ?? 0, | |||||
| noOfPages: formData.noOfPages ?? 0, | |||||
| fee: formData.fee ?? 0 | |||||
| }; | |||||
| setData(formData); | |||||
| if (formData.groupType == "Private Bill") { | if (formData.groupType == "Private Bill") { | ||||
| setColumnPrice(ComboData.proofPrice[1]) | setColumnPrice(ComboData.proofPrice[1]) | ||||
| normalizedFormData['length'] = 18; | |||||
| formData['length'] = 18; | |||||
| } | } | ||||
| setData(normalizedFormData); | |||||
| setProofPaymentDeadlineMin(formData.proofPaymentDeadline); | setProofPaymentDeadlineMin(formData.proofPaymentDeadline); | ||||
| setReviseDeadlineMin(formData.reviseDeadline); | setReviseDeadlineMin(formData.reviseDeadline); | ||||
| setExpectedCode(formData.groupNo.substr(1,formData.groupNo.length)+"-"+formData.issueNo+"-"+formData.issueYear.toString().substr(2, formData.issueYear.toString().length)); | setExpectedCode(formData.groupNo.substr(1,formData.groupNo.length)+"-"+formData.issueNo+"-"+formData.issueYear.toString().substr(2, formData.issueYear.toString().length)); | ||||
| @@ -531,7 +524,7 @@ const FormPanel = ({ formData }) => { | |||||
| } | } | ||||
| }} | }} | ||||
| > | > | ||||
| <DialogTitle><Typography component="span" variant="h3">Warning</Typography></DialogTitle> | |||||
| <DialogTitle><Typography variant="h3">Warning</Typography></DialogTitle> | |||||
| <DialogContent style={{ display: 'flex', }}> | <DialogContent style={{ display: 'flex', }}> | ||||
| <Typography variant="h4" style={{ padding: '16px' }}>{warningText}</Typography> | <Typography variant="h4" style={{ padding: '16px' }}>{warningText}</Typography> | ||||
| </DialogContent> | </DialogContent> | ||||