Select current day on angeltype/room shifts list
This commit is contained in:
parent
ea0a4777d8
commit
f6c86285d9
|
@ -253,7 +253,7 @@ function angeltype_controller_shiftsFilter($angeltype, $days)
|
||||||
[$angeltype['id']]
|
[$angeltype['id']]
|
||||||
);
|
);
|
||||||
$selected_day = date('Y-m-d');
|
$selected_day = date('Y-m-d');
|
||||||
if (!empty($days)) {
|
if (!empty($days) && !in_array($selected_day, $days)) {
|
||||||
$selected_day = $days[0];
|
$selected_day = $days[0];
|
||||||
}
|
}
|
||||||
if ($request->has('shifts_filter_day')) {
|
if ($request->has('shifts_filter_day')) {
|
||||||
|
|
|
@ -37,7 +37,7 @@ function room_controller(): array
|
||||||
AngelType_ids()
|
AngelType_ids()
|
||||||
);
|
);
|
||||||
$selected_day = date('Y-m-d');
|
$selected_day = date('Y-m-d');
|
||||||
if (!empty($days)) {
|
if (!empty($days) && !in_array($selected_day, $days)) {
|
||||||
$selected_day = $days[0];
|
$selected_day = $days[0];
|
||||||
}
|
}
|
||||||
if ($request->has('shifts_filter_day')) {
|
if ($request->has('shifts_filter_day')) {
|
||||||
|
|
Loading…
Reference in New Issue