Skip to content

[FIX] ATTENDANCE: Day-wise view shows a worked week off or holiday as OT - #1433

Open
adamsthws wants to merge 1 commit into
horilla:dev/v2.0from
LBS-Sheet-Metal:fix/daywise-worked-day-off
Open

adamsthws wants to merge 1 commit into
horilla:dev/v2.0from
LBS-Sheet-Metal:fix/daywise-worked-day-off

Conversation

@adamsthws

Copy link
Copy Markdown
Contributor

Problem

In the Monthly Attendance Summary's day-wise view, a week off or holiday someone worked on looks exactly like one nobody worked on (a purple "WO" or teal "H" chip). The calendar shows such a day's overtime badge, but the grid drops it, so you can't see from the grid who came in on a Saturday or a bank holiday.

Fix

  • A week off or holiday with attendance is an "OT" chip in the Present colour, so the day reads as worked.
  • Its tooltip says Week Off Overtime or Holiday Overtime, with ", Pending Approval" while the overtime isn't approved yet, plus the clock times.
  • The legend gains a "Worked On A Week Off Or Holiday (OT)" entry.
  • The code is translatable (pgettext("summary code", "OT")).
  • Counts are unchanged: the day still counts as week off / holiday, its hours as overtime.

Tests

attendance/tests/test_daily_worked_day_off.py (4 tests): an unworked week off isn't marked; a worked week off shows OT with its tooltip and class; a holiday keeps "H" until someone works on it; pending approval is named.

Checklist

  • This PR targets dev/v2.0, not 2.0.
  • I've followed the coding conventions in CONTRIBUTING.md (Black + isort via the repo's pre-commit)
  • CI (Docker CI + Quality) passes
  • I've linked any related issues

Related issues

None.

A week off or holiday someone worked on looked exactly like one nobody worked
on in the day-wise grid (WO or H): the calendar shows the day's overtime
badge, but the grid lost it. Such a day is now an "OT" chip in the Present
colour, its tooltip saying Week Off Overtime or Holiday Overtime (and Pending
Approval while it is), with a legend entry. The code is translatable (context
"summary code"). Counts are unchanged; with tests.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant