added type of employees, for calling api
This commit is contained in:
parent
3802be1673
commit
7afea8e52a
@ -20,7 +20,7 @@ import {useMutation} from "@tanstack/react-query";
|
|||||||
|
|
||||||
const mobileNumberRegex = /^[0-9]\d{9}$/;
|
const mobileNumberRegex = /^[0-9]\d{9}$/;
|
||||||
|
|
||||||
const ManageEmployee = ({ employeeId, onClosed }) => {
|
const ManageEmployee = ({ employeeId, onClosed,IsAllEmployee }) => {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const { mutate: updateEmployee, isLoading } = useUpdateEmployee();
|
const { mutate: updateEmployee, isLoading } = useUpdateEmployee();
|
||||||
|
|
||||||
@ -203,7 +203,7 @@ const { mutate: updateEmployee, isLoading } = useUpdateEmployee();
|
|||||||
data.email = null;
|
data.email = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateEmployee(data, {
|
updateEmployee({...data,IsAllEmployee},{
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
reset();
|
reset();
|
||||||
onClosed();
|
onClosed();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user