Skip to content
Snippets Groups Projects
Commit 4d51612d authored by Marjolaine Bodin's avatar Marjolaine Bodin
Browse files

Resolve "Experiment logbook not found"

parent b57e8188
No related branches found
No related tags found
1 merge request!697Resolve "Experiment logbook not found"
......@@ -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">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment