- fixed min/max decimals setting;
This commit is contained in:
@@ -18,6 +18,7 @@ import { Dropdown } from 'primereact/dropdown';
|
||||
import { MultiSelect } from 'primereact/multiselect';
|
||||
|
||||
import { dynamicDataOptions } from '../../../../configData';
|
||||
import { InputNumber } from 'primereact/inputnumber';
|
||||
|
||||
const BuilderElementSettings = ({ closeSettingsFn, callStatus, context }) => {
|
||||
const elements = useStoreValue('formElements');
|
||||
@@ -228,12 +229,13 @@ const BuilderElementSettings = ({ closeSettingsFn, callStatus, context }) => {
|
||||
{['min', 'max'].includes(k) && !isNil(validators[k])
|
||||
? <div className="formElementSettings__field">
|
||||
<label htmlFor={k}>{k}</label>
|
||||
<InputText id={k}
|
||||
aria-describedby={`${k}-help`}
|
||||
value={validators[k]}
|
||||
keyfilter="num"
|
||||
placeholder="0"
|
||||
onChange={(e) => onChangeValidator(e.target.value, k)}/>
|
||||
<InputNumber id={k}
|
||||
aria-describedby={`${k}-help`}
|
||||
value={validators[k]}
|
||||
locale="it-IT"
|
||||
minFractionDigits={2}
|
||||
placeholder="0"
|
||||
onChange={(e) => onChangeValidator(e.value, k)}/>
|
||||
</div> : null}
|
||||
{['minLength', 'maxLength'].includes(k) && !isNil(validators[k])
|
||||
? <div className="formElementSettings__field">
|
||||
@@ -249,19 +251,19 @@ const BuilderElementSettings = ({ closeSettingsFn, callStatus, context }) => {
|
||||
</TabPanel> : null}
|
||||
{context === 'application'
|
||||
? <TabPanel header={__('Criteri', 'gepafin')}>
|
||||
<div className="formElementSettings__field">
|
||||
<label htmlFor="criteria">{__('Criteri di valutazione', 'gepafin')}</label>
|
||||
<MultiSelect
|
||||
id="criteria"
|
||||
value={criteria}
|
||||
onChange={(e) => onChangeCriteriaData(e.value)}
|
||||
options={criteriaOptions}
|
||||
optionLabel="label"
|
||||
optionValue="value"
|
||||
display="chip"
|
||||
placeholder={__('Scegli', 'gepafin')}/>
|
||||
</div>
|
||||
</TabPanel> : null}
|
||||
<div className="formElementSettings__field">
|
||||
<label htmlFor="criteria">{__('Criteri di valutazione', 'gepafin')}</label>
|
||||
<MultiSelect
|
||||
id="criteria"
|
||||
value={criteria}
|
||||
onChange={(e) => onChangeCriteriaData(e.value)}
|
||||
options={criteriaOptions}
|
||||
optionLabel="label"
|
||||
optionValue="value"
|
||||
display="chip"
|
||||
placeholder={__('Scegli', 'gepafin')}/>
|
||||
</div>
|
||||
</TabPanel> : null}
|
||||
{settings && settings
|
||||
.filter(o => ['variable', 'formula'].includes(o.name)).length > 0
|
||||
? <TabPanel header={__('Calcolo', 'gepafin')}>
|
||||
|
||||
Reference in New Issue
Block a user