- saving progress;
This commit is contained in:
@@ -4,7 +4,7 @@ import { useParams } from 'react-router-dom';
|
||||
import { head, is, pluck, isEmpty, pathOr } from 'ramda';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { TZDate } from '@date-fns/tz';
|
||||
import "quill/dist/quill.core.css";
|
||||
import 'quill/dist/quill.core.css';
|
||||
|
||||
// store
|
||||
import { storeSet, storeGet, useStore } from '../../store';
|
||||
@@ -447,11 +447,10 @@ const BandoApplication = () => {
|
||||
|
||||
const handleSetSignedDocumentFromFileupload = (fieldName, stateFieldData) => {
|
||||
setSignedPdfFile(stateFieldData);
|
||||
setApplicationStatus('READY');
|
||||
|
||||
/*if (!isEmpty(stateFieldData)) {
|
||||
setVisibleConfirmation(true);
|
||||
}*/
|
||||
if (!isEmpty(stateFieldData)) {
|
||||
setApplicationStatus('READY');
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
@@ -459,7 +458,7 @@ const BandoApplication = () => {
|
||||
setVisibleConfirmation(true);
|
||||
}
|
||||
|
||||
if (['AWAIT', 'READY', 'SUBMIT'].includes(applicationStatus)) {
|
||||
if (['AWAITING', 'READY', 'SUBMIT'].includes(applicationStatus)) {
|
||||
const applId = getApplicationId();
|
||||
|
||||
if (applId) {
|
||||
@@ -528,7 +527,7 @@ const BandoApplication = () => {
|
||||
</div> : null}
|
||||
|
||||
{'DRAFT' === applicationStatus
|
||||
/*|| 'AWAIT' === applicationStatus*/
|
||||
/*|| 'AWAITING' === applicationStatus*/
|
||||
? formData.map(o => {
|
||||
const label = head(o.settings.filter(o => o.name === 'label'));
|
||||
const text = head(o.settings.filter(o => o.name === 'text'));
|
||||
@@ -565,9 +564,11 @@ const BandoApplication = () => {
|
||||
//console.log('validations', validations, o.name)
|
||||
|
||||
return ['paragraph'].includes(o.name) && text
|
||||
? <div className="appForm__content ql-editor" key={o.id}>
|
||||
{renderHtmlContent(text.value)}
|
||||
</div>
|
||||
? <div>
|
||||
<div className="ql-editor" key={o.id}>
|
||||
{renderHtmlContent(text.value)}
|
||||
</div>
|
||||
</div>
|
||||
: <FormField
|
||||
key={o.id}
|
||||
type={o.name}
|
||||
@@ -591,7 +592,7 @@ const BandoApplication = () => {
|
||||
})
|
||||
: null}
|
||||
|
||||
{['AWAIT', 'READY', 'SUBMIT', 'EVALUATION'].includes(applicationStatus)
|
||||
{['AWAITING', 'READY', 'SUBMIT', 'EVALUATION'].includes(applicationStatus)
|
||||
? <div className="appPageSection">
|
||||
<div className="appForm__field">
|
||||
<label>
|
||||
@@ -618,9 +619,9 @@ const BandoApplication = () => {
|
||||
<FileuploadApplicationSignedPdf
|
||||
setDataFn={handleSetSignedDocumentFromFileupload}
|
||||
fieldName="signedPdfFile"
|
||||
disabled={'AWAIT' !== applicationStatus}
|
||||
disabled={!isEmpty(signedPdfFile) || 'AWAITING' !== applicationStatus}
|
||||
defaultValue={is(Array, signedPdfFile) ? signedPdfFile : []}
|
||||
accept={['.p7m,application/pkcs7-mime,application/x-pkcs7-mime,.zip']}
|
||||
accept={['.p7m,application/pkcs7-mime,application/x-pkcs7-mime']}
|
||||
chooseLabel={__('Aggiungi documento', 'gepafin')}
|
||||
multiple={false}
|
||||
doctype="document"
|
||||
|
||||
Reference in New Issue
Block a user