- added new settings for call;
- added duplciate form field functionality to form builder; - added improvements to form builder; - fixed issue with saving data in evaluation;
This commit is contained in:
@@ -29,6 +29,8 @@ import getTimeParsedFromString from '../../../../helpers/getTimeParsedFromString
|
||||
import formatDateString from '../../../../helpers/formatDateString';
|
||||
import EvaluationFormsService from '../../../../service/evaluation-forms-service';
|
||||
|
||||
const APP_HUB_ID = process.env.REACT_APP_HUB_ID;
|
||||
|
||||
const BandoEditFormStep1 = forwardRef(function ({ initialData, setInitialData, getFormErrors, status }, ref) {
|
||||
const navigate = useNavigate();
|
||||
const [aimedToOptions, setAimedToOptions] = useState([]);
|
||||
@@ -51,7 +53,8 @@ const BandoEditFormStep1 = forwardRef(function ({ initialData, setInitialData, g
|
||||
const values = getValues();
|
||||
const toast = useRef(null);
|
||||
|
||||
const onSubmit = () => {};
|
||||
const onSubmit = () => {
|
||||
};
|
||||
|
||||
const onSaveDraft = () => {
|
||||
trigger();
|
||||
@@ -198,7 +201,7 @@ const BandoEditFormStep1 = forwardRef(function ({ initialData, setInitialData, g
|
||||
![
|
||||
'descriptionShort', 'descriptionLong', 'documentationRequested', 'threshold',
|
||||
'aimedTo', 'criteria', 'docs', 'checklist', 'faq', 'amount', 'amountMin', 'amountMax',
|
||||
'email', 'phoneNumber', 'checkList', 'images'
|
||||
'email', 'phoneNumber', 'checkList', 'images', 'numberOfCheck', 'productId'
|
||||
].includes(fieldName)
|
||||
}
|
||||
|
||||
@@ -477,6 +480,35 @@ const BandoEditFormStep1 = forwardRef(function ({ initialData, setInitialData, g
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="appForm__cols">
|
||||
<FormField
|
||||
type="numberinput"
|
||||
disabled={shouldDisableField('numberOfCheck')}
|
||||
fieldName="numberOfCheck"
|
||||
label={__('Quantità dei checklist per creare un soccorso', 'gepafin')}
|
||||
control={control}
|
||||
errors={errors}
|
||||
defaultValue={values['numberOfCheck']}
|
||||
config={{
|
||||
required: __('È obbligatorio', 'gepafin'),
|
||||
}}
|
||||
/>
|
||||
|
||||
{APP_HUB_ID !== 't7jh5wfg9QXylNaTZkPoE'
|
||||
? <FormField
|
||||
type="numberinput"
|
||||
disabled={shouldDisableField('productId')}
|
||||
fieldName="productId"
|
||||
label={__('Prodotto ID dentro Odessa', 'gepafin')}
|
||||
control={control}
|
||||
errors={errors}
|
||||
defaultValue={values['productId']}
|
||||
config={{
|
||||
required: __('È obbligatorio', 'gepafin'),
|
||||
}}
|
||||
/> : null}
|
||||
</div>
|
||||
|
||||
<FormFieldRepeaterFaq
|
||||
data={values['faq']}
|
||||
disabled={shouldDisableField('faq')}
|
||||
|
||||
Reference in New Issue
Block a user