From 2cb4ae0492d92c38029788258b31477f1c95a498 Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 11 Feb 2024 14:33:12 +0100 Subject: [PATCH] bug fix --- src/Components/MyFormInputs/index.js | 8 ++++++-- src/Pages/Store/Employees/index.js | 12 +++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/Components/MyFormInputs/index.js b/src/Components/MyFormInputs/index.js index 2a30da9..d804892 100644 --- a/src/Components/MyFormInputs/index.js +++ b/src/Components/MyFormInputs/index.js @@ -137,7 +137,9 @@ export function MyEmailFormInput() { ); } */ -export function MyCalendarMaxFutureBookingDaysFormInput({ formItemName }) { +export function MyCalendarMaxFutureBookingDaysFormInput({ + formItemName = "calendarMaxFutureBookingDays", +}) { const { t } = useTranslation(); const appContext = useAppContext(); @@ -162,7 +164,9 @@ export function MyCalendarMaxFutureBookingDaysFormInput({ formItemName }) { ); } -export function MyCalendarMinEarliestBookingTimeFormInput({ formItem }) { +export function MyCalendarMinEarliestBookingTimeFormInput({ + formItem = "calendarMinEarliestBookingTime", +}) { const { t } = useTranslation(); return ( diff --git a/src/Pages/Store/Employees/index.js b/src/Pages/Store/Employees/index.js index 9e9c402..ef84f91 100644 --- a/src/Pages/Store/Employees/index.js +++ b/src/Pages/Store/Employees/index.js @@ -387,6 +387,12 @@ function ModalAddEditEmployee({ body.email = formEmail; } + console.log( + "max", + formCalendarMaxFutureBookingDays, + modalOptions.selectedEmployee.maxFutureBookingDays + ); + if ( formCalendarMaxFutureBookingDays !== modalOptions.selectedEmployee.maxFutureBookingDays @@ -423,11 +429,7 @@ function ModalAddEditEmployee({ fetchEmployees(); }) - .catch((errStatus) => { - console.log(errStatus); - - setIsRequesting(false); - }); + .catch(() => setIsRequesting(false)); }) .catch(() => showInputsInvalidNotification(notificationApi, t)