Select current day on angeltype/room shifts list

This commit is contained in:
Igor Scheller 2021-12-28 23:39:26 +01:00 committed by msquare
parent ea0a4777d8
commit f6c86285d9
2 changed files with 2 additions and 2 deletions

View File

@ -253,7 +253,7 @@ function angeltype_controller_shiftsFilter($angeltype, $days)
[$angeltype['id']]
);
$selected_day = date('Y-m-d');
if (!empty($days)) {
if (!empty($days) && !in_array($selected_day, $days)) {
$selected_day = $days[0];
}
if ($request->has('shifts_filter_day')) {

View File

@ -37,7 +37,7 @@ function room_controller(): array
AngelType_ids()
);
$selected_day = date('Y-m-d');
if (!empty($days)) {
if (!empty($days) && !in_array($selected_day, $days)) {
$selected_day = $days[0];
}
if ($request->has('shifts_filter_day')) {