|
@@ -26,7 +26,7 @@ import { notifyActionSuccess } from 'utils/CommonFunction'; |
|
|
import { PNSPS_BUTTON_THEME } from "themes/buttonConst"; |
|
|
import { PNSPS_BUTTON_THEME } from "themes/buttonConst"; |
|
|
import { ThemeProvider } from "@emotion/react"; |
|
|
import { ThemeProvider } from "@emotion/react"; |
|
|
import { FormattedMessage, useIntl } from "react-intl"; |
|
|
import { FormattedMessage, useIntl } from "react-intl"; |
|
|
import {isDummyLoggedIn} from "utils/Utils" |
|
|
|
|
|
|
|
|
import { isDummyLoggedIn } from "utils/Utils" |
|
|
|
|
|
|
|
|
const UploadFileTable = Loadable(React.lazy(() => import('./UploadFileTable'))); |
|
|
const UploadFileTable = Loadable(React.lazy(() => import('./UploadFileTable'))); |
|
|
//import * as ProofStatus from "utils/statusUtils/ProofStatus"; |
|
|
//import * as ProofStatus from "utils/statusUtils/ProofStatus"; |
|
@@ -59,7 +59,7 @@ const FormPanel = ({ formData }) => { |
|
|
React.useEffect(() => { |
|
|
React.useEffect(() => { |
|
|
if (formData) { |
|
|
if (formData) { |
|
|
setData(formData); |
|
|
setData(formData); |
|
|
if (isDummyLoggedIn()){ |
|
|
|
|
|
|
|
|
if (isDummyLoggedIn()) { |
|
|
set_paymentMethod("demandNote") |
|
|
set_paymentMethod("demandNote") |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@@ -83,7 +83,7 @@ const FormPanel = ({ formData }) => { |
|
|
setIsWarningPopUp(true); |
|
|
setIsWarningPopUp(true); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
else if ( formData.creditor==false && paymentMethod=="") { |
|
|
|
|
|
|
|
|
else if (formData.creditor == false && paymentMethod == "") { |
|
|
setWarningText(intl.formatMessage({ id: 'MSG.plzSelectPaymentMethod' })); |
|
|
setWarningText(intl.formatMessage({ id: 'MSG.plzSelectPaymentMethod' })); |
|
|
setIsWarningPopUp(true); |
|
|
setIsWarningPopUp(true); |
|
|
return; |
|
|
return; |
|
@@ -108,12 +108,12 @@ const FormPanel = ({ formData }) => { |
|
|
files: attachments ? attachments : [], |
|
|
files: attachments ? attachments : [], |
|
|
onSuccess: function (responseData) { |
|
|
onSuccess: function (responseData) { |
|
|
if (responseData.msg) { |
|
|
if (responseData.msg) { |
|
|
setWarningText(intl.formatMessage({ id: responseData.msg})); |
|
|
|
|
|
|
|
|
setWarningText(intl.formatMessage({ id: responseData.msg })); |
|
|
setIsWarningPopUp(true); |
|
|
setIsWarningPopUp(true); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
if (responseData.id == params.id) { |
|
|
if (responseData.id == params.id) { |
|
|
notifyActionSuccess(intl.formatMessage({id: "submitted"})) |
|
|
|
|
|
|
|
|
notifyActionSuccess(intl.formatMessage({ id: "submitted" })) |
|
|
navigate("/proof/pay/" + params.id); |
|
|
navigate("/proof/pay/" + params.id); |
|
|
} else { |
|
|
} else { |
|
|
navigate("/proof/search"); |
|
|
navigate("/proof/search"); |
|
@@ -292,8 +292,8 @@ const FormPanel = ({ formData }) => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
actionValue && formData.creditor==false ? |
|
|
|
|
|
isDummyLoggedIn()? |
|
|
|
|
|
|
|
|
actionValue && formData.creditor == false ? |
|
|
|
|
|
isDummyLoggedIn() ? |
|
|
<Grid item xs={12} sx={{ mb: 1, }}> |
|
|
<Grid item xs={12} sx={{ mb: 1, }}> |
|
|
<table style={tabelStyle}> |
|
|
<table style={tabelStyle}> |
|
|
<tr style={tabelStyle}> |
|
|
<tr style={tabelStyle}> |
|
@@ -357,7 +357,7 @@ const FormPanel = ({ formData }) => { |
|
|
</td> |
|
|
</td> |
|
|
</tr> |
|
|
</tr> |
|
|
</table> |
|
|
</table> |
|
|
</Grid>: |
|
|
|
|
|
|
|
|
</Grid> : |
|
|
<Grid item xs={12} sx={{ mb: 1, }}> |
|
|
<Grid item xs={12} sx={{ mb: 1, }}> |
|
|
<table style={tabelStyle}> |
|
|
<table style={tabelStyle}> |
|
|
<tr style={tabelStyle}> |
|
|
<tr style={tabelStyle}> |
|
@@ -453,52 +453,59 @@ const FormPanel = ({ formData }) => { |
|
|
</Grid> |
|
|
</Grid> |
|
|
|
|
|
|
|
|
: |
|
|
: |
|
|
isOverReviseDeadline() ? |
|
|
|
|
|
<Grid item xs={12} md={12} textAlign="left"> |
|
|
|
|
|
<Typography variant="h5" style={{ color: "red" }}> |
|
|
|
|
|
<FormattedMessage id="MSG.overReviseDeadline" /> |
|
|
|
|
|
</Typography> |
|
|
|
|
|
</Grid> |
|
|
|
|
|
: |
|
|
|
|
|
<> |
|
|
|
|
|
<Grid item xs={12} md={12} textAlign="left"> |
|
|
|
|
|
<Typography variant="h5"> |
|
|
|
|
|
<FormattedMessage id="requiredUploadFix" />: |
|
|
|
|
|
</Typography> |
|
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
|
|
|
|
<Grid item xs={12} md={12} textAlign="left"> |
|
|
|
|
|
<input |
|
|
|
|
|
id="uploadFileBtn" |
|
|
|
|
|
name="file" |
|
|
|
|
|
type="file" |
|
|
|
|
|
accept=".pdf" |
|
|
|
|
|
style={{ display: 'none' }} |
|
|
|
|
|
disabled={attachments.length >= (formik.values.groupType === "Private Bill" ? 2 : 1)} |
|
|
|
|
|
onChange={(event) => { |
|
|
|
|
|
readFile(event) |
|
|
|
|
|
}} |
|
|
|
|
|
/> |
|
|
|
|
|
<label htmlFor="uploadFileBtn"> |
|
|
|
|
|
<ThemeProvider theme={PNSPS_BUTTON_THEME}> |
|
|
|
|
|
<Button |
|
|
|
|
|
color="save" |
|
|
|
|
|
component="span" |
|
|
|
|
|
variant="contained" |
|
|
|
|
|
aria-label={intl.formatMessage({ id: 'upload' })} |
|
|
|
|
|
|
|
|
actionValue? |
|
|
|
|
|
<></> |
|
|
|
|
|
: |
|
|
|
|
|
<> |
|
|
|
|
|
{ |
|
|
|
|
|
isOverReviseDeadline() ? |
|
|
|
|
|
<Grid item xs={12} md={12} textAlign="left"> |
|
|
|
|
|
<Typography variant="h5" style={{ color: "red" }}> |
|
|
|
|
|
<FormattedMessage id="MSG.overReviseDeadline" /> |
|
|
|
|
|
</Typography> |
|
|
|
|
|
</Grid> |
|
|
|
|
|
: |
|
|
|
|
|
<> |
|
|
|
|
|
<Grid item xs={12} md={12} textAlign="left"> |
|
|
|
|
|
<Typography variant="h5"> |
|
|
|
|
|
<FormattedMessage id="requiredUploadFix" />: |
|
|
|
|
|
</Typography> |
|
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
|
|
|
|
<Grid item xs={12} md={12} textAlign="left"> |
|
|
|
|
|
<input |
|
|
|
|
|
id="uploadFileBtn" |
|
|
|
|
|
name="file" |
|
|
|
|
|
type="file" |
|
|
|
|
|
accept=".pdf" |
|
|
|
|
|
style={{ display: 'none' }} |
|
|
disabled={attachments.length >= (formik.values.groupType === "Private Bill" ? 2 : 1)} |
|
|
disabled={attachments.length >= (formik.values.groupType === "Private Bill" ? 2 : 1)} |
|
|
> |
|
|
|
|
|
<FormattedMessage id="upload" /> |
|
|
|
|
|
</Button> |
|
|
|
|
|
</ThemeProvider> |
|
|
|
|
|
</label> |
|
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Grid item xs={12} sm={12} md={12} lg={12} textAlign="left" sx={{ width: '95%', maxWidth: { xs: '70vw', sm: '72vw', md: '75vw', lg: '80vw' } }} > |
|
|
|
|
|
<UploadFileTable key="uploadTable" recordList={attachments} setRecordList={setAttachments} /> |
|
|
|
|
|
</Grid> |
|
|
|
|
|
</> |
|
|
|
|
|
|
|
|
onChange={(event) => { |
|
|
|
|
|
readFile(event) |
|
|
|
|
|
}} |
|
|
|
|
|
/> |
|
|
|
|
|
<label htmlFor="uploadFileBtn"> |
|
|
|
|
|
<ThemeProvider theme={PNSPS_BUTTON_THEME}> |
|
|
|
|
|
<Button |
|
|
|
|
|
color="save" |
|
|
|
|
|
component="span" |
|
|
|
|
|
variant="contained" |
|
|
|
|
|
aria-label={intl.formatMessage({ id: 'upload' })} |
|
|
|
|
|
disabled={attachments.length >= (formik.values.groupType === "Private Bill" ? 2 : 1)} |
|
|
|
|
|
> |
|
|
|
|
|
<FormattedMessage id="upload" /> |
|
|
|
|
|
</Button> |
|
|
|
|
|
</ThemeProvider> |
|
|
|
|
|
</label> |
|
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Grid item xs={12} sm={12} md={12} lg={12} textAlign="left" sx={{ width: '95%', maxWidth: { xs: '70vw', sm: '72vw', md: '75vw', lg: '80vw' } }} > |
|
|
|
|
|
<UploadFileTable key="uploadTable" recordList={attachments} setRecordList={setAttachments} /> |
|
|
|
|
|
</Grid> |
|
|
|
|
|
</> |
|
|
|
|
|
} |
|
|
|
|
|
</> |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
<Grid item xs={12} sm={12} md={12} lg={12}> |
|
|
<Grid item xs={12} sm={12} md={12} lg={12}> |
|
|