- updates in labels and some refactoring;
This commit is contained in:
@@ -14,3 +14,32 @@ export const mimeTypes = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
export const defaultMaxFileSize = 314572800; // 314572800 = 300 Mb
|
export const defaultMaxFileSize = 314572800; // 314572800 = 300 Mb
|
||||||
|
|
||||||
|
const dynamicDataForTextinput = [
|
||||||
|
{ label: 'company name', value: 'company.companyName' },
|
||||||
|
{ label: 'company piva', value: 'company.vatNumber' },
|
||||||
|
{ label: 'company codiceFiscale', value: 'company.codiceFiscale' },
|
||||||
|
{ label: 'company address', value: 'company.address' },
|
||||||
|
{ label: 'company phoneNumber', value: 'company.phoneNumber' },
|
||||||
|
{ label: 'company city', value: 'company.city' },
|
||||||
|
{ label: 'company province', value: 'company.province' },
|
||||||
|
{ label: 'company cap', value: 'company.cap' },
|
||||||
|
{ label: 'company country', value: 'company.country' },
|
||||||
|
{ label: 'company pec', value: 'company.pec' },
|
||||||
|
{ label: 'company email', value: 'company.email' },
|
||||||
|
{ label: 'company contactName', value: 'company.contactName' },
|
||||||
|
{ label: 'company contactEmail', value: 'company.contactEmail' },
|
||||||
|
{ label: 'user email', value: 'user.email' },
|
||||||
|
{ label: 'user firstName', value: 'user.firstName' },
|
||||||
|
{ label: 'user lastName', value: 'user.lastName' },
|
||||||
|
{ label: 'user phoneNumber', value: 'user.phoneNumber' },
|
||||||
|
{ label: 'user codiceFiscale', value: 'user.codiceFiscale' }
|
||||||
|
]
|
||||||
|
|
||||||
|
export const dynamicDataOptions = {
|
||||||
|
datepicker: [
|
||||||
|
{ label: 'user dateOfBirth', value: 'user.dateOfBirth' }
|
||||||
|
],
|
||||||
|
textinput: dynamicDataForTextinput,
|
||||||
|
textarea: dynamicDataForTextinput
|
||||||
|
}
|
||||||
@@ -5,7 +5,7 @@ import { isNil } from 'ramda';
|
|||||||
// components
|
// components
|
||||||
import { Button } from 'primereact/button';
|
import { Button } from 'primereact/button';
|
||||||
|
|
||||||
const BandoEditFormActions = ({ id, openPreview, openPreviewEvaluation, submitFn, status }) => {
|
const BandoEditFormActions = ({ id, openPreview, submitFn, status }) => {
|
||||||
return (
|
return (
|
||||||
<div className="appPageSection">
|
<div className="appPageSection">
|
||||||
<div className="appPageSection__actions">
|
<div className="appPageSection__actions">
|
||||||
@@ -21,13 +21,13 @@ const BandoEditFormActions = ({ id, openPreview, openPreviewEvaluation, submitFn
|
|||||||
outlined
|
outlined
|
||||||
onClick={openPreview}
|
onClick={openPreview}
|
||||||
label={__('Anteprima beneficiario', 'gepafin')} icon="pi pi-eye" iconPos="right"/>
|
label={__('Anteprima beneficiario', 'gepafin')} icon="pi pi-eye" iconPos="right"/>
|
||||||
<Button
|
{/*<Button
|
||||||
type="button"
|
type="button"
|
||||||
disabled={true}
|
disabled={true}
|
||||||
outlined
|
outlined
|
||||||
onClick={openPreviewEvaluation}
|
onClick={openPreviewEvaluation}
|
||||||
label={__('Anteprima pre-istruttoria', 'gepafin')} icon="pi pi-eye"
|
label={__('Anteprima pre-istruttoria', 'gepafin')} icon="pi pi-eye"
|
||||||
iconPos="right"/>
|
iconPos="right"/>*/}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ const BandoEditFormStep1 = forwardRef(function ({ initialData, getFormErrors, st
|
|||||||
toast.current.show({
|
toast.current.show({
|
||||||
severity: 'success',
|
severity: 'success',
|
||||||
summary: '',
|
summary: '',
|
||||||
detail: __('Il bando è stato aggiornato corretamente!', 'gepafin')
|
detail: __('Il bando è stato aggiornato correttamente!', 'gepafin')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const values = getValues();
|
const values = getValues();
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ const BandoEditFormStep2 = forwardRef(function ({ initialData, getFormErrors, st
|
|||||||
toast.current.show({
|
toast.current.show({
|
||||||
severity: 'success',
|
severity: 'success',
|
||||||
summary: '',
|
summary: '',
|
||||||
detail: __('Il bando è stato aggiornato corretamente!', 'gepafin')
|
detail: __('Il bando è stato aggiornato correttamente!', 'gepafin')
|
||||||
});
|
});
|
||||||
const newFormData = {...formInitialData, ...data.data};
|
const newFormData = {...formInitialData, ...data.data};
|
||||||
setFormInitialData(newFormData);
|
setFormInitialData(newFormData);
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ const BandoFlowEdit = () => {
|
|||||||
toast.current.show({
|
toast.current.show({
|
||||||
severity: 'success',
|
severity: 'success',
|
||||||
summary: '',
|
summary: '',
|
||||||
detail: __('Il flusso è stato aggiornato corretamente!', 'gepafin')
|
detail: __('Il flusso è stato aggiornato correttamente!', 'gepafin')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ const BandoForms = () => {
|
|||||||
toast.current.show({
|
toast.current.show({
|
||||||
severity: 'success',
|
severity: 'success',
|
||||||
summary: '',
|
summary: '',
|
||||||
detail: __('Il form è stato aggiornato corretamente!', 'gepafin')
|
detail: __('Il form è stato aggiornato correttamente!', 'gepafin')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -235,7 +235,7 @@ const BandoForms = () => {
|
|||||||
outlined
|
outlined
|
||||||
disabled={!selectedForm}
|
disabled={!selectedForm}
|
||||||
onClick={goToEditForm}
|
onClick={goToEditForm}
|
||||||
label={'PUBLISH' === bandoStatus ? __('Mostra', 'gepafin') : __('Modifica', 'gepafin')}
|
label={__('Modifica', 'gepafin')}
|
||||||
icon="pi pi-cog" iconPos="right"/>
|
icon="pi pi-cog" iconPos="right"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -137,7 +137,9 @@ const ElementSettingTableColumns = ({
|
|||||||
return <div key={k} className="formElementSettings__repeaterItem">
|
return <div key={k} className="formElementSettings__repeaterItem">
|
||||||
<div className="p-inputgroup flex-1">
|
<div className="p-inputgroup flex-1">
|
||||||
{properSubField(c, k, o.name)}
|
{properSubField(c, k, o.name)}
|
||||||
<Button icon="pi pi-times" className="p-button-danger"
|
<Button icon="pi pi-times"
|
||||||
|
disabled={bandoStatus === 'PUBLISH'}
|
||||||
|
className="p-button-danger"
|
||||||
onClick={() => removeRow(k)}/>
|
onClick={() => removeRow(k)}/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import { InputSwitch } from 'primereact/inputswitch';
|
|||||||
import ElementSetting from './components/ElementSetting';
|
import ElementSetting from './components/ElementSetting';
|
||||||
import { Dropdown } from 'primereact/dropdown';
|
import { Dropdown } from 'primereact/dropdown';
|
||||||
import { MultiSelect } from 'primereact/multiselect';
|
import { MultiSelect } from 'primereact/multiselect';
|
||||||
|
import { dynamicDataOptions } from '../../../../configData';
|
||||||
|
|
||||||
const BuilderElementSettings = ({ closeSettingsFn, bandoStatus }) => {
|
const BuilderElementSettings = ({ closeSettingsFn, bandoStatus }) => {
|
||||||
const elements = useStore().main.formElements();
|
const elements = useStore().main.formElements();
|
||||||
@@ -166,7 +167,7 @@ const BuilderElementSettings = ({ closeSettingsFn, bandoStatus }) => {
|
|||||||
changeFn={onChange}
|
changeFn={onChange}
|
||||||
updateDataFn={onUpdateOptions}/>)
|
updateDataFn={onUpdateOptions}/>)
|
||||||
: null}
|
: null}
|
||||||
{['textinput', 'datepicker'].includes(activeElementData.name)
|
{!isNil(dynamicDataOptions[activeElementData.name])
|
||||||
? <div className="formElementSettings__field">
|
? <div className="formElementSettings__field">
|
||||||
<label htmlFor="dynamicData">{__('Dati dinamici', 'gepafin')}</label>
|
<label htmlFor="dynamicData">{__('Dati dinamici', 'gepafin')}</label>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ const BandoFormsEdit = () => {
|
|||||||
toast.current.show({
|
toast.current.show({
|
||||||
severity: 'success',
|
severity: 'success',
|
||||||
summary: '',
|
summary: '',
|
||||||
detail: __('Il form è stato aggiornato corretamente!', 'gepafin')
|
detail: __('Il form è stato aggiornato correttamente!', 'gepafin')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -329,6 +329,10 @@ const DomandaEditPreInstructor = () => {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="appPageSection">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="appPageSection">
|
<div className="appPageSection">
|
||||||
<h2>{__('Punteggi di valutazione', 'gepafin')}</h2>
|
<h2>{__('Punteggi di valutazione', 'gepafin')}</h2>
|
||||||
{data.criteria
|
{data.criteria
|
||||||
|
|||||||
Reference in New Issue
Block a user