- updated delega form logic;
This commit is contained in:
@@ -31,7 +31,7 @@ const ProfileCompany = () => {
|
||||
const infoMsgs = useRef(null);
|
||||
const [formInitialData, setFormInitialData] = useState({});
|
||||
const [delegaData, setDelegaData] = useState({});
|
||||
const [delega, setDelega] = useState({});
|
||||
const [delega, setDelega] = useState([]);
|
||||
const { delegaFirstName = '', delegaLastName = '', delegaCodiceFiscale = '' } = delegaData;
|
||||
const toast = useRef(null);
|
||||
|
||||
@@ -158,13 +158,13 @@ const ProfileCompany = () => {
|
||||
|
||||
const getDellegaCallback = (data) => {
|
||||
if (data.data) {
|
||||
setDelega(data.data);
|
||||
setDelega([data.data]);
|
||||
}
|
||||
storeSet.main.unsetAsyncRequest();
|
||||
}
|
||||
|
||||
const errDellegaCallback = () => {
|
||||
setDelega({});
|
||||
setDelega([]);
|
||||
storeSet.main.unsetAsyncRequest();
|
||||
}
|
||||
|
||||
@@ -473,7 +473,7 @@ const ProfileCompany = () => {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="appForm__delegaFormActions">
|
||||
{/*<div className="appForm__delegaFormActions">
|
||||
<Button
|
||||
type="button"
|
||||
disabled={true}
|
||||
@@ -488,7 +488,8 @@ const ProfileCompany = () => {
|
||||
onClick={() => {
|
||||
}}
|
||||
label={__('Sostituisci delega', 'gepafin')} icon="pi pi-sync" iconPos="right"/>
|
||||
</div>
|
||||
</div>*/}
|
||||
|
||||
</div> : <div className="appPage__spacer"></div>}
|
||||
|
||||
<div className="appPageSection__hr">
|
||||
|
||||
Reference in New Issue
Block a user