- 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
|
||||
|
||||
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
|
||||
import { Button } from 'primereact/button';
|
||||
|
||||
const BandoEditFormActions = ({ id, openPreview, openPreviewEvaluation, submitFn, status }) => {
|
||||
const BandoEditFormActions = ({ id, openPreview, submitFn, status }) => {
|
||||
return (
|
||||
<div className="appPageSection">
|
||||
<div className="appPageSection__actions">
|
||||
@@ -21,13 +21,13 @@ const BandoEditFormActions = ({ id, openPreview, openPreviewEvaluation, submitFn
|
||||
outlined
|
||||
onClick={openPreview}
|
||||
label={__('Anteprima beneficiario', 'gepafin')} icon="pi pi-eye" iconPos="right"/>
|
||||
<Button
|
||||
{/*<Button
|
||||
type="button"
|
||||
disabled={true}
|
||||
outlined
|
||||
onClick={openPreviewEvaluation}
|
||||
label={__('Anteprima pre-istruttoria', 'gepafin')} icon="pi pi-eye"
|
||||
iconPos="right"/>
|
||||
iconPos="right"/>*/}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -112,7 +112,7 @@ const BandoEditFormStep1 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
toast.current.show({
|
||||
severity: 'success',
|
||||
summary: '',
|
||||
detail: __('Il bando è stato aggiornato corretamente!', 'gepafin')
|
||||
detail: __('Il bando è stato aggiornato correttamente!', 'gepafin')
|
||||
});
|
||||
}
|
||||
const values = getValues();
|
||||
|
||||
@@ -104,7 +104,7 @@ const BandoEditFormStep2 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
toast.current.show({
|
||||
severity: 'success',
|
||||
summary: '',
|
||||
detail: __('Il bando è stato aggiornato corretamente!', 'gepafin')
|
||||
detail: __('Il bando è stato aggiornato correttamente!', 'gepafin')
|
||||
});
|
||||
const newFormData = {...formInitialData, ...data.data};
|
||||
setFormInitialData(newFormData);
|
||||
|
||||
@@ -112,7 +112,7 @@ const BandoFlowEdit = () => {
|
||||
toast.current.show({
|
||||
severity: 'success',
|
||||
summary: '',
|
||||
detail: __('Il flusso è stato aggiornato corretamente!', 'gepafin')
|
||||
detail: __('Il flusso è stato aggiornato correttamente!', 'gepafin')
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ const BandoForms = () => {
|
||||
toast.current.show({
|
||||
severity: 'success',
|
||||
summary: '',
|
||||
detail: __('Il form è stato aggiornato corretamente!', 'gepafin')
|
||||
detail: __('Il form è stato aggiornato correttamente!', 'gepafin')
|
||||
});
|
||||
}
|
||||
|
||||
@@ -235,7 +235,7 @@ const BandoForms = () => {
|
||||
outlined
|
||||
disabled={!selectedForm}
|
||||
onClick={goToEditForm}
|
||||
label={'PUBLISH' === bandoStatus ? __('Mostra', 'gepafin') : __('Modifica', 'gepafin')}
|
||||
label={__('Modifica', 'gepafin')}
|
||||
icon="pi pi-cog" iconPos="right"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -137,7 +137,9 @@ const ElementSettingTableColumns = ({
|
||||
return <div key={k} className="formElementSettings__repeaterItem">
|
||||
<div className="p-inputgroup flex-1">
|
||||
{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)}/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -16,6 +16,7 @@ import { InputSwitch } from 'primereact/inputswitch';
|
||||
import ElementSetting from './components/ElementSetting';
|
||||
import { Dropdown } from 'primereact/dropdown';
|
||||
import { MultiSelect } from 'primereact/multiselect';
|
||||
import { dynamicDataOptions } from '../../../../configData';
|
||||
|
||||
const BuilderElementSettings = ({ closeSettingsFn, bandoStatus }) => {
|
||||
const elements = useStore().main.formElements();
|
||||
@@ -166,7 +167,7 @@ const BuilderElementSettings = ({ closeSettingsFn, bandoStatus }) => {
|
||||
changeFn={onChange}
|
||||
updateDataFn={onUpdateOptions}/>)
|
||||
: null}
|
||||
{['textinput', 'datepicker'].includes(activeElementData.name)
|
||||
{!isNil(dynamicDataOptions[activeElementData.name])
|
||||
? <div className="formElementSettings__field">
|
||||
<label htmlFor="dynamicData">{__('Dati dinamici', 'gepafin')}</label>
|
||||
<Dropdown
|
||||
|
||||
@@ -123,7 +123,7 @@ const BandoFormsEdit = () => {
|
||||
toast.current.show({
|
||||
severity: 'success',
|
||||
summary: '',
|
||||
detail: __('Il form è stato aggiornato corretamente!', 'gepafin')
|
||||
detail: __('Il form è stato aggiornato correttamente!', 'gepafin')
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -329,6 +329,10 @@ const DomandaEditPreInstructor = () => {
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="appPageSection">
|
||||
|
||||
</div>
|
||||
|
||||
<div className="appPageSection">
|
||||
<h2>{__('Punteggi di valutazione', 'gepafin')}</h2>
|
||||
{data.criteria
|
||||
|
||||
Reference in New Issue
Block a user