employer uid added to request payload #34

Merged
ameye merged 1 commits from create-signatory-update into master 2024-06-16 03:30:49 +00:00
3 changed files with 5 additions and 5 deletions
@@ -38,7 +38,7 @@ const editUserSchema = Yup.object().shape({
const ModalForm: FC<Props> = ({ user, isUserLoading }) => {
const {closeCustomModal} = useCustomModal()
const {closeCustomModal, showCustomModal} = useCustomModal()
const { setItemIdForUpdate } = useListView();
const { refetch, isLoading } = useQueryResponse();
@@ -72,7 +72,7 @@ const ModalForm: FC<Props> = ({ user, isUserLoading }) => {
if (isNotEmpty(values.id)) {
await updateUser(values);
} else {
await createSignatory(values);
await createSignatory({employer_uid:showCustomModal?.data?.id, ...values});
}
} catch (ex) {
console.error(ex);
@@ -61,7 +61,7 @@ const UserActionsCell: FC<Props> = ({id}) => {
{/* begin::Menu item */}
<div className='menu-item px-3'>
<a className='menu-link px-3' onClick={()=>{openCustomModal(MODALNAMES.addSignatory, {})}}>
<a className='menu-link px-3' onClick={()=>{openCustomModal(MODALNAMES.addSignatory, {id})}}>
Add Signatory
</a>
</div>
+2 -2
View File
@@ -11,12 +11,12 @@ type ContextProps = {
type ShowModalProps = {
name?: string
data?: {
[index: string]: string | number | undefined;
[index: string]: undefined | null | number | string;
}
}
type DataProps = {
[index: string]: string | number | undefined;
[index: string]: undefined | null | number | string;
}
type ModalNames = {