Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: option to enable/disable multiple Shift Assignments for same dates #1100

Merged

Conversation

krantheman
Copy link
Member

@krantheman krantheman commented Nov 23, 2023

Currently, Shift Assignment allows for multiple Shifts to be assigned to an employee on the same date, provided that the timings don't clash.

This PR introduces an additional Allow Multiple Shift Assignments for Same Date field under HR Settings. As the name suggests, disabling this forbids the user from creating Shift Assignments for an employee with preexisting Assignments on any of the dates within the selected range, and vice versa.

  • If Allow Multiple Shift Assignments for Same Date is disabled
image
  • If Allow Multiple Shift Assignments for Same Date is enabled
image

See: #1086

Docs: https://frappehr.com/docs/v14/en/hr-settings#3-shift-settings

@codecov-commenter
Copy link

codecov-commenter commented Nov 23, 2023

Codecov Report

Merging #1100 (84a9eab) into develop (79d5504) will increase coverage by 0.02%.
Report is 11 commits behind head on develop.
The diff coverage is 100.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1100      +/-   ##
===========================================
+ Coverage    73.06%   73.08%   +0.02%     
===========================================
  Files          199      199              
  Lines        10714    10722       +8     
===========================================
+ Hits          7828     7836       +8     
  Misses        2886     2886              
Files Coverage Δ
...ms/hr/doctype/shift_assignment/shift_assignment.py 94.19% <100.00%> (+0.19%) ⬆️

hrms/hr/doctype/hr_settings/hr_settings.json Outdated Show resolved Hide resolved
hrms/hr/doctype/shift_assignment/shift_assignment.py Outdated Show resolved Hide resolved
hrms/hr/doctype/shift_assignment/shift_assignment.py Outdated Show resolved Hide resolved
hrms/hr/doctype/shift_assignment/shift_assignment.py Outdated Show resolved Hide resolved
hrms/hr/doctype/shift_assignment/shift_assignment.py Outdated Show resolved Hide resolved
@ruchamahabal
Copy link
Member

Also add docs for this under HR settings + shift assignment

@ruchamahabal ruchamahabal merged commit 0eab149 into frappe:develop Dec 7, 2023
8 checks passed
@krantheman krantheman deleted the feat-toggle-multiple-shift-assignments branch December 7, 2023 09:56
ruchamahabal added a commit that referenced this pull request Dec 7, 2023
…1100

feat: option to enable/disable multiple Shift Assignments for same dates (backport #1100)
ruchamahabal added a commit that referenced this pull request Dec 7, 2023
…1100

feat: option to enable/disable multiple Shift Assignments for same dates (backport #1100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants