feat: enhance timesheet summary with today highlighting and improved CSS styles
All checks were successful
Publish Container / publish (push) Successful in 5m43s
All checks were successful
Publish Container / publish (push) Successful in 5m43s
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
parent
c0180aab13
commit
0d5b48b891
3 changed files with 36 additions and 3 deletions
|
|
@ -294,12 +294,24 @@ else if (viewMode == SummaryViewMode.Timesheet && timesheet is not null)
|
|||
|
||||
private static string GetDayColumnClass(global::WorkTracker.Domain.MonthlyTimesheetDayModel day)
|
||||
{
|
||||
if (day.IsWeekend || day.IsHoliday)
|
||||
var classes = new List<string>();
|
||||
|
||||
if (day.Date == DateOnly.FromDateTime(DateTime.Today))
|
||||
{
|
||||
return "timesheet-summary-day-danger";
|
||||
classes.Add("timesheet-summary-day-today");
|
||||
}
|
||||
|
||||
return day.IsClosure ? "timesheet-summary-day-closure" : string.Empty;
|
||||
if (day.IsWeekend || day.IsHoliday)
|
||||
{
|
||||
classes.Add("timesheet-summary-day-danger");
|
||||
}
|
||||
|
||||
if (day.IsClosure)
|
||||
{
|
||||
classes.Add("timesheet-summary-day-closure");
|
||||
}
|
||||
|
||||
return string.Join(" ", classes);
|
||||
}
|
||||
|
||||
private static string GetDayPopupClass(int index, int totalDays)
|
||||
|
|
|
|||
|
|
@ -601,7 +601,8 @@ public sealed class CouchbaseLiteWorkDayService : IWorkDayService
|
|||
var weekdayDaytimeHours = isWeekend ? 0m : Math.Max(0m, totalHours - nightHours);
|
||||
var suppressVacation = isWeekend || explicitHoliday || isAutomaticHoliday || illness;
|
||||
var hasNonWorkingEvent = explicitHoliday || illness || dayOff || closure;
|
||||
var permitHours = !isWeekend && !isAutomaticHoliday && !hasNonWorkingEvent && totalHours < standardHours
|
||||
var isFutureEmptyDay = date > DateOnly.FromDateTime(DateTime.Today) && includedUnits.Count == 0;
|
||||
var permitHours = !isWeekend && !isAutomaticHoliday && !hasNonWorkingEvent && !isFutureEmptyDay && totalHours < standardHours
|
||||
? standardHours - totalHours
|
||||
: 0m;
|
||||
|
||||
|
|
|
|||
|
|
@ -958,6 +958,26 @@ h1:focus {
|
|||
background-color: #e2e3e5 !important;
|
||||
}
|
||||
|
||||
.timesheet-summary-table .timesheet-summary-day-today {
|
||||
box-shadow:
|
||||
inset 0.15rem 0 0 var(--wt-calendar-today-ring),
|
||||
inset -0.15rem 0 0 var(--wt-calendar-today-ring);
|
||||
}
|
||||
|
||||
.timesheet-summary-table thead .timesheet-summary-day-today {
|
||||
box-shadow:
|
||||
inset 0.15rem 0 0 var(--wt-calendar-today-ring),
|
||||
inset -0.15rem 0 0 var(--wt-calendar-today-ring),
|
||||
inset 0 0.15rem 0 var(--wt-calendar-today-ring);
|
||||
}
|
||||
|
||||
.timesheet-summary-table tbody tr:last-child .timesheet-summary-day-today {
|
||||
box-shadow:
|
||||
inset 0.15rem 0 0 var(--wt-calendar-today-ring),
|
||||
inset -0.15rem 0 0 var(--wt-calendar-today-ring),
|
||||
inset 0 -0.15rem 0 var(--wt-calendar-today-ring);
|
||||
}
|
||||
|
||||
[data-bs-theme=dark] .timesheet-summary-table .timesheet-summary-day-danger {
|
||||
background-color: #5b2833 !important;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue