Skip to content

Commit

Permalink
fix(creazione-utente): fix form valido se user selezionato 20241121
Browse files Browse the repository at this point in the history
  • Loading branch information
federico-tocci-dxc authored and sgravinadxc committed Nov 28, 2024
1 parent 0681bcd commit acb0a9f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ const ManageFacilitator: React.FC<ManageFacilitatorI> = ({
dispatch(GetUserDetails(td.id as string, true));
dispatch(setUsersList(null));
setIsUserSelected(true);
setIsFormValid(true)
}
},
};
Expand All @@ -141,7 +142,7 @@ const ManageFacilitator: React.FC<ManageFacilitatorI> = ({
sendNewValues={(newData?: { [key: string]: formFieldI['value'] }) =>
setNewFormValues({ ...newData })
}
setIsFormValid={(value: boolean | undefined) => setIsFormValid(!!value)}
setIsFormValid={(value: boolean | undefined) => setIsFormValid(!!value || isUserSelected)}
creation={creation}
legend={legend}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ const ManageDelegate: React.FC<ManageDelegateI> = ({
}
setShowForm(true);
setIsUserSelected(true);
setIsFormValid(true);
},
};

Expand All @@ -170,7 +171,7 @@ const ManageDelegate: React.FC<ManageDelegateI> = ({
sendNewValues={(newData?: { [key: string]: formFieldI['value'] }) =>
setNewFormValues({ ...newData })
}
setIsFormValid={(value: boolean | undefined) => setIsFormValid(!!value)}
setIsFormValid={(value: boolean | undefined) => setIsFormValid(!!value || isUserSelected)}
fieldsToHide={['ruolo', 'tipoContratto']}
legend={legend}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ const ManageReferal: React.FC<ManageReferalI> = ({
}
setShowForm(true);
setIsUserSelected(true);
setIsFormValid(true);
},
};

Expand All @@ -192,7 +193,7 @@ const ManageReferal: React.FC<ManageReferalI> = ({
sendNewValues={(newData?: { [key: string]: formFieldI['value'] }) =>
setNewFormValues({ ...newData })
}
setIsFormValid={(value: boolean | undefined) => setIsFormValid(!!value)}
setIsFormValid={(value: boolean | undefined) => setIsFormValid(!!value || isUserSelected)}
fieldsToHide={['ruolo', 'tipoContratto']}
legend={legend}
/>
Expand Down

0 comments on commit acb0a9f

Please sign in to comment.