brotherton-erpnext/erpnext
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
..
accounts Merge pull request #30573 from frappe/mergify/bp/develop/pr-30382 2022-04-05 15:52:28 +05:30
assets fix: bulk fix (~330) missing translations 2022-04-04 13:59:51 +05:30
bulk_transaction style: format code with black 2022-03-28 18:52:46 +05:30
buying Merge pull request #30528 from s-aga-r/is-subcontracted-fieldtype 2022-04-04 14:01:20 +05:30
change_log chore: Release Notes v13.9.0 2021-08-16 20:38:38 +05:30
commands style: format code with black 2022-03-28 18:52:46 +05:30
communication chore: remove utf-8 compat code 2021-11-05 11:16:29 +05:30
config style: format code with black 2022-03-28 18:52:46 +05:30
controllers test: test case to validate rejected qty without accepted warehouse 2022-04-04 17:57:57 +05:30
crm fix: bulk fix (~330) missing translations 2022-04-04 13:59:51 +05:30
domains style: format code with black 2022-03-28 18:52:46 +05:30
e_commerce Merge pull request #30578 from marination/e-com-acessibility 2022-04-05 18:11:59 +05:30
education fix: bulk fix (~330) missing translations 2022-04-04 13:59:51 +05:30
erpnext_integrations style: format code with black 2022-03-28 18:52:46 +05:30
hr feat: Scheduling Multiple shifts and Auto Attendance (#29955) 2022-04-06 10:56:47 +05:30
loan_management fix: bulk fix (~330) missing translations 2022-04-04 13:59:51 +05:30
maintenance fix: bulk fix (~330) missing translations 2022-04-04 13:59:51 +05:30
manufacturing Merge pull request #30528 from s-aga-r/is-subcontracted-fieldtype 2022-04-04 14:01:20 +05:30
patches refactor!: change "is_subcontracted" field type from "Select" to "Check" 2022-04-01 13:22:44 +05:30
payroll fix: bulk fix (~330) missing translations 2022-04-04 13:59:51 +05:30
portal style: format code with black 2022-03-28 18:52:46 +05:30
projects fix: bulk fix (~330) missing translations 2022-04-04 13:59:51 +05:30
public Merge branch 'develop' into is-subcontracted-fieldtype 2022-04-04 13:31:46 +05:30
quality_management style: format code with black 2022-03-28 18:52:46 +05:30
regional Merge pull request #30579 from nextchamp-saqib/eway-bill-dialog-fix 2022-04-05 15:51:38 +05:30
selling fix(pos): do not reset search input on item selection (#30537) 2022-04-04 15:59:16 +05:30
setup fix: Handle changes in frappe's get_monthly_goal_graph_data API 2022-04-01 17:18:47 +05:30
shopping_cart fix: specify fields to be set in Lead (#28288) 2021-11-09 15:49:32 +05:30
startup style: format code with black 2022-03-28 18:52:46 +05:30
stock Merge pull request #30578 from marination/e-com-acessibility 2022-04-05 18:11:59 +05:30
support fix: bulk fix (~330) missing translations 2022-04-04 13:59:51 +05:30
telephony style: format code with black 2022-03-28 18:52:46 +05:30
templates Merge branch 'develop' into redisearch-app-install 2022-04-04 13:27:50 +05:30
tests refactor!: change "is_subcontracted" field type from "Select" to "Check" 2022-04-01 13:22:44 +05:30
translations fix: translations (#30387) 2022-03-25 16:22:23 +05:30
utilities fix: bulk fix (~330) missing translations 2022-04-04 13:59:51 +05:30
www style: format code with black 2022-03-28 18:52:46 +05:30
__init__.py style: format code with black 2022-03-28 18:52:46 +05:30
.stylelintrc chore: mass trailing whitespace and EOF fixes 2021-08-19 13:43:28 +05:30
exceptions.py style: format code with black 2022-03-28 18:52:46 +05:30
hooks.py Merge branch 'develop' into bom-update-tool 2022-03-28 20:28:21 +05:30
modules.txt Merge branch 'develop' into remove-nonprofit 2022-02-17 13:00:58 +05:30
patches.txt refactor: move schema change patch higher up 2022-04-04 12:15:26 +05:30