- temp fix: form field items from JS config;

- fixed displaying times for call;
- fixed reading saved flow;
This commit is contained in:
Vitalii Kiiko
2024-10-01 16:28:46 +02:00
parent fefba1acaf
commit b755c6e383
10 changed files with 62 additions and 13 deletions

View File

@@ -252,6 +252,13 @@ const BandoFlowEdit = () => {
}
}, [forms]);
useEffect(() => {
const chosenFieldItem = head(flowData.filter(o => !isEmpty(o.chosenField)));
if (chosenFieldItem) {
setMainField(chosenFieldItem.chosenField);
}
}, [flowData])
useEffect(() => {
return () => {
storeSet.main.flowForms([]);
@@ -302,7 +309,7 @@ const BandoFlowEdit = () => {
placeholder={__('Scegli il campo', 'gepafin')}/>
</div> : null}
{forms.length > 2 && mainField && isFlowAllowed || forms.length === 2 && isFlowAllowed
{(forms.length > 2 && mainField && isFlowAllowed) || (forms.length === 2 && isFlowAllowed)
? <div className="appForm__field">
<label htmlFor="finalForm">{__('Scegli form finale', 'gepafin')}</label>
<Dropdown