From 7f0f5c2aa3363393679a7b02dcd4c67755550114 Mon Sep 17 00:00:00 2001 From: Dave Date: Fri, 16 Jan 2026 14:23:04 -0500 Subject: [PATCH 1/2] feature/IO-3499-React-19: Fix issue skylar found --- .../shop-employees/shop-employees-add-vacation.component.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/shop-employees/shop-employees-add-vacation.component.jsx b/client/src/components/shop-employees/shop-employees-add-vacation.component.jsx index e0664d874..29b7ad09f 100644 --- a/client/src/components/shop-employees/shop-employees-add-vacation.component.jsx +++ b/client/src/components/shop-employees/shop-employees-add-vacation.component.jsx @@ -24,7 +24,7 @@ export default function ShopEmployeeAddVacation({ employee }) { let result; result = await insertVacation({ - variables: { vacation: { ...values, employeeid: employee.id } }, + variables: { vacation: { ...values, employeeid: employee?.id } }, update(cache, { data }) { cache.modify({ id: cache.identify({ id: employee.id, __typename: "employees" }), From a2230be5fe492e61346c9def9cfd836a736dd17d Mon Sep 17 00:00:00 2001 From: Dave Date: Fri, 16 Jan 2026 14:26:50 -0500 Subject: [PATCH 2/2] feature/IO-3499-React-19: Fix issue skylar found --- .../shop-employees-add-vacation.component.jsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/client/src/components/shop-employees/shop-employees-add-vacation.component.jsx b/client/src/components/shop-employees/shop-employees-add-vacation.component.jsx index 29b7ad09f..e00e83c14 100644 --- a/client/src/components/shop-employees/shop-employees-add-vacation.component.jsx +++ b/client/src/components/shop-employees/shop-employees-add-vacation.component.jsx @@ -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({ - variables: { vacation: { ...values, employeeid: employee?.id } }, + 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]; } }