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

Merge branch '802-bug_logbook_not_found' into 'main'

Resolve "Experiment logbook not found"

Closes #802

See merge request !697
parents b57e8188 4d51612d
No related branches found
Tags 1.34.0
1 merge request!697Resolve "Experiment logbook not found"
Pipeline #222172 waiting for manual action
......@@ -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