- fixed login with spid fe issue;
- improved 'add user' form; - added new field 'paragraph';
This commit is contained in:
@@ -11,6 +11,7 @@ import BandoService from '../../service/bando-service';
|
||||
|
||||
// tools
|
||||
import getBandoLabel from '../../helpers/getBandoLabel';
|
||||
import set404FromErrorResponse from '../../helpers/set404FromErrorResponse';
|
||||
|
||||
// components
|
||||
import { Button } from 'primereact/button';
|
||||
@@ -20,7 +21,6 @@ import BandoEditFormStep1 from './components/BandoEditFormStep1';
|
||||
import BandoEditFormStep2 from './components/BandoEditFormStep2';
|
||||
import { Messages } from 'primereact/messages';
|
||||
import FormsService from '../../service/forms-service';
|
||||
import set404FromErrorResponse from '../../helpers/set404FromErrorResponse';
|
||||
import BlockingOverlay from '../../components/BlockingOverlay';
|
||||
|
||||
const BandoEdit = () => {
|
||||
@@ -30,8 +30,6 @@ const BandoEdit = () => {
|
||||
const [activeStep, setActiveStep] = useState(null)
|
||||
const [data, setData] = useState({});
|
||||
const [forms, setForms] = useState([]);
|
||||
//const [selectedTemplate, setSelectedTemplate] = useState(null);
|
||||
//const [templates, setTemplate] = useState(null);
|
||||
const formRef = useRef(null);
|
||||
const bandoMsgs = useRef(null);
|
||||
|
||||
@@ -43,23 +41,7 @@ const BandoEdit = () => {
|
||||
return false
|
||||
}
|
||||
bandoMsgs.current.clear();
|
||||
const isFormValid = formRef.current.isFormValid();
|
||||
//const values = formRef.current.getValues();
|
||||
//const diffData = equal(values, data);
|
||||
// TODO warn about unsaved data
|
||||
goToStep(0);
|
||||
/*if (isFormValid) {
|
||||
goToStep(0)
|
||||
} else {
|
||||
bandoMsgs.current.show([
|
||||
{
|
||||
id: '98',
|
||||
sticky: true, severity: 'error', summary: '',
|
||||
detail: __('Potrai andare su altro step dopo risolvere errori della forma', 'gepafin'),
|
||||
closable: true
|
||||
}
|
||||
]);
|
||||
}*/
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -68,25 +50,8 @@ const BandoEdit = () => {
|
||||
if (activeStep === 1) {
|
||||
return false
|
||||
}
|
||||
console.log('11');
|
||||
bandoMsgs.current.clear();
|
||||
const isFormValid = formRef.current.isFormValid();
|
||||
//const values = formRef.current.getValues();
|
||||
//const diffData = equal(values, data);
|
||||
// TODO warn about unsaved data
|
||||
goToStep(1);
|
||||
/*if (isFormValid) {
|
||||
goToStep(1);
|
||||
} else {
|
||||
bandoMsgs.current.show([
|
||||
{
|
||||
id: '98',
|
||||
sticky: true, severity: 'error', summary: '',
|
||||
detail: __('Potrai andare su altro step dopo risolvere errori della forma', 'gepafin'),
|
||||
closable: true
|
||||
}
|
||||
]);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
];
|
||||
@@ -271,26 +236,6 @@ const BandoEdit = () => {
|
||||
|
||||
<div className="appPage__spacer"></div>
|
||||
|
||||
{/*!isLoading
|
||||
? <div className="pageBando__templateSelection">
|
||||
<div className="appForm__field">
|
||||
<label htmlFor="template">
|
||||
{__('Usa Template Salvato', 'gepafin')}
|
||||
</label>
|
||||
<Dropdown
|
||||
id="template"
|
||||
value={selectedTemplate}
|
||||
onChange={(e) => setSelectedTemplate(e.value)}
|
||||
options={templates}
|
||||
optionLabel="name"
|
||||
placeholder={__('Seleziona template', 'gepafin')}/>
|
||||
</div>
|
||||
<Button
|
||||
onClick={() => console.log('use template')}
|
||||
label={__('Applica', 'gepafin')}
|
||||
icon="pi pi-check"
|
||||
iconPos="right"/>
|
||||
</div> : null*/}
|
||||
{!isEmpty(data)
|
||||
? <Steps
|
||||
model={stepItems}
|
||||
|
||||
Reference in New Issue
Block a user