diff --git a/apps/logbook/src/components/configure/LogbookConfiguration.tsx b/apps/logbook/src/components/configure/LogbookConfiguration.tsx index 18d49d097c31bd2bff3435a1d7c2cb85abde6f13..15ad6c3e38cde0085e2eaa942ec96e5ecc9ccf47 100644 --- a/apps/logbook/src/components/configure/LogbookConfiguration.tsx +++ b/apps/logbook/src/components/configure/LogbookConfiguration.tsx @@ -50,7 +50,7 @@ export function LogbookConfiguration({ [filters, onUpdate], ); useEffect(() => { - if (!filters.startTime) { + if (showStaffSection && !filters.startTime) { const now = new Date(); const monthsBefore = new Date(now); monthsBefore.setMonth( @@ -60,7 +60,12 @@ export function LogbookConfiguration({ const formattedDate = formatDateTimeToIcatDate(monthsBefore); setStartTime(formattedDate); } - }, [setStartTime, filters, config.ui.logbook.defaultMonthPeriodForStaff]); + }, [ + setStartTime, + filters, + config.ui.logbook.defaultMonthPeriodForStaff, + showStaffSection, + ]); return ( <Col> <SideNavFilter label="Search">