Commit Graph

12 Commits

Author SHA1 Message Date
Rucha Mahabal
c5850e3923
Revert "feat: Scheduling Multiple shifts and Auto Attendance" (#30587) 2022-04-06 11:18:47 +05:30
Rucha Mahabal
f208903250
feat: Scheduling Multiple shifts and Auto Attendance (#29955)
* refactor: overlapping shifts validation

- convert raw query to frappe.qb

- check for overlapping timings if dates overlap

- translation friendly error messages with link to overlapping doc

* refactor: consider timeslots in `get_employee_shift`

* fix: handle shift grace overlap while finding current shift

* refactor: handle shifts spanning over 2 different days

* fix: fetching shift on timing boundaries

* refactor: rewrite docstrings and add type hints for functions

* refactor: Allow multiple attendance records creation for different shifts

* feat: auto attendance marking for multiple shifts on the same day

* refactor: mark absent for employees with no attendance

- break down into smaller functions

- make it work with multiple shifts

- this will mark employee as absent per shift, meaning employee can be present for one shift and absent for another on the same day

* chore: sort imports, remove unused imports

* refactor: Monthly Attendance Sheet

- split into smaller functions

- add type hints

- get rid of unnecessary db calls and loops

- add docstrings for functions

* feat: add colors for attendance status to lessen the cognitive load

- legend with colors and full form for status abbreviations

* feat: show shift-wise attendance in monthly attendance sheet

* test: monthly attendance sheet

* style: format code with black

* chore: ignore formatting changes in blame

* test: fetching shifts in Employee Checkins

* fix(test): make holiday list for shift and checkin tests

* fix: tests

* test: shift assignment creation

* fix: attendance fixes

- check half day attendance threshold before absent threshold to avoid half day getting marked as absent

- round working hours to 2 digits for better accuracy

- start and end dates for absent attendance marking

* test: Shift Type with Auto Attendance setup and working

fix test setups

* refactor: Overlapping validation for Shift Request

- commonify time overlap function between request and assignment

- add tests for shift request overlap

* chore: remove unused import

* fix: add validation for overlapping shift attendance

- skip auto attendance in case of overlapping shift attendance record

- this case won't occur in case of shift assignment, since it will not allow overlapping shifts to be assigned

- can happen if manual attendance records are created

* test: validations for duplicate and overlapping shift attendance records

* test: skip auto attendance

* fix: skip validation for overlapping shift attendance if no shift is linked

* test: add holiday related shift and attendance tests

* test: add attendance sheet tests for employee filter, half days

* fix: sider
2022-04-06 10:56:47 +05:30
Ankush Menat
b0f7931b2b chore: ignore black formatting changes in blame 2022-03-28 18:54:12 +05:30
Ankush Menat
37e6e1f330 chore: ignore six removal commit in blame 2021-11-05 11:28:31 +05:30
Ankush Menat
8b1a61be29
chore: ignore import cleanup commit in blame 2021-09-02 16:46:25 +05:30
Ankush Menat
a641b326c5
chore: ignore whitespace changes in blame 2021-09-01 18:43:38 +05:30
Ankush Menat
5b54d0436b
chore: revert "chore: ignore whitespace fixes from git blame"
This reverts commit 2c40b7c206.
2021-08-19 14:18:39 +05:30
Ankush Menat
2c40b7c206
chore: ignore whitespace fixes from git blame 2021-08-19 14:12:09 +05:30
Ankush Menat
49db369d21
chore: update git-blame-ignore-revs 2021-08-19 13:44:11 +05:30
Nabin Hait
0950481253 fix: merge conflict 2021-06-15 20:18:06 +05:30
Ankush Menat
a11a8e8ab2
chore: add blame ignore file 2021-05-24 17:55:38 +05:30
Faris Ansari
a0ac5e3b13 chore: Add git blame ignore revs file
Ignore the commit which replaces use of Class.extend with native class in git blames
2021-05-07 14:57:32 +05:30