Merged in feature/IO-3499-React-19 (pull request #2838)

Feature/IO-3499 React 19
This commit is contained in:
Dave Richer
2026-01-16 19:28:36 +00:00

View File

@@ -21,15 +21,21 @@ export default function ShopEmployeeAddVacation({ employee }) {
logImEXEvent("employee_add_vacation");
setLoading(true);
let result;
if (!employee?.id) {
notification.error({
title: t("employees.errors.adding", { message: "Employee not loaded yet." })
});
return;
}
result = await insertVacation({
setLoading(true);
const result = await insertVacation({
variables: { vacation: { ...values, employeeid: employee.id } },
update(cache, { data }) {
cache.modify({
id: cache.identify({ id: employee.id, __typename: "employees" }),
fields: {
employee_vacations(ex) {
employee_vacations(ex = []) {
return [data.insert_employee_vacation_one, ...ex];
}
}