* 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
* fix(HR): Leave application company field made Readonly
* fix: in monthly report attandance employee filter based on company
* fix: minor typo
* fix: Fetch company from employee
* Update monthly_attendance_sheet.py
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
* QueryReport
- Only print visible columns in report
- Use get_columns_for_print method instead of directly
accessing report.columns
* Query Report
- Replace frappe.query_report_filters_by_name with new API
* Update Attendance on Approval of Leave
* Separate out leaves on the basis of its type
* Remove commented code
* Make attendance records if not found
* Fix Codacy
* Replace bad code in attendance.py