Shifts view: Highlight current time

This commit is contained in:
Igor Scheller 2024-02-21 17:36:23 +01:00 committed by xuwhite
parent 8dda9a0dc3
commit 460b416ff1
2 changed files with 10 additions and 0 deletions

View File

@ -215,6 +215,12 @@ class ShiftCalendarRenderer
{
$time = Carbon::createFromTimestamp($time);
$class = $label ? 'tick bg-' . theme_type() : 'tick ';
$diffNow = $time->diffInMinutes(null, false) * 60;
if ($diffNow >= 0 && $diffNow < self::SECONDS_PER_ROW) {
$class .= ' now';
}
if ($time->isStartOfDay()) {
if (!$label) {
return div($class . ' day');

View File

@ -251,6 +251,10 @@ table .border-bottom {
font-size: 0.9em;
padding-left: 5px;
}
.tick.now {
border-top: 2px solid $info;
}
}
.lane.time {