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: base Roster Management (backport #1760) #2136

Merged
merged 136 commits into from
Aug 30, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Aug 29, 2024

Roster Management

Extension of the current shift management feature to a full-fledged roster management system.

Features

Calendar View

Details

Visualization of Employee - Shift, Leave, and Holiday mapping in an Employee vs Day of the Month representation.

image

Search and Filtering

Details
  • Employee Multi Search
  • Filtering Based on Company, Department, Branch, Designation, and Shift Type

image

Shift Creation

Details

The roster allows for two types of shifts to be created.

Regular Shifts

Creating a regular shift results in the creation of a single Shift Assignment. Shifts spanning a week or less are automatically created as regular. For shifts spanning over a week, the user will have to select all days from the Repeat On Days field, under Schedule Settings, to ensure that a regular shift is created.

image

Repeating/Scheduled Shifts

The user has the option to turn shifts spanning over a week into repeating shifts. This can be done by selecting specific days from the Repeat On Days field and setting the Frequency field—which represents the frequency of repetition. Doing so will create a Shift Assignment Schedule with the selected details.

image

Shift Assignment Schedule is a new DocType that can be used for creating repeating shifts automatically. Apart from Shift Details, Repeat On Days, and Frequency, this DocType also has an Enabled field, which needs to be selected to continue creating shifts automatically, and a Create Shifts After field, which is the date after which shifts will be created. When enabled, shifts will be automatically created via a background job for 90 days following the Create Shifts After date, if that date lies before or on the day of the job running.

image

While creating repeating shifts using the roster, there can be three scenarios:-

  • Shift spanning below 90 days: Shift Assignments are created immediately, and the Shift Assignment Schedule is not enabled.
  • Shift with End Date, spanning over 90 days: Creation of Shift Assignments is enqueued, and the Shift Assignment Schedule is not enabled.
  • Shift without End Date: Shift Assignments for 90 days are created immediately, and the Shift Assignment Schedule is enabled.

If Allow Multiple Shift Assignments for Same Date under HR Settings is enabled, multiple shifts can be created on a single day, provided that their timings do not overlap.

Shift Update

Details

End Date and Status fields of submitted Shift Assignments can be updated using the roster.

image

Shift Deletion

Details

Clicking on the Delete button presents the user with three options:-

  • Shift for [Date]: Deletes the shift only on that date. This is done by updating the Shift Assignment and creating another one if needed.
  • All Consecutive Shifts: Deletes the Shift Assignment altogether.
  • Shift Assignment Schedule: Deletes the Shift Assignment Schedule and all the Shift Assignments associated with it.

image

None of these actions can be performed if there are Employee Checkin or Attendance records linked with the Shift Assignment at hand.

Shift Moving

Details

Shifts can be dragged and dropped to move them. Dropping a shift on another one will swap it with that.

Shift.Moving.mov

This is an automatic backport of pull request #1760 done by [Mergify](https://mergify.com).

(cherry picked from commit e34afb6)
(cherry picked from commit e71ee98)
(cherry picked from commit 66e16a3)
(cherry picked from commit 25992b3)
(cherry picked from commit 70ad9a8)
(cherry picked from commit fce5b42)
(cherry picked from commit c27c354)
(cherry picked from commit d22ab27)
(cherry picked from commit a4a42eb)
(cherry picked from commit 2045d9a)
(cherry picked from commit 7b24c4d)
(cherry picked from commit a8e1c84)
(cherry picked from commit 533837c)
(cherry picked from commit f5a855d)
(cherry picked from commit 0a974a4)
(cherry picked from commit c2df51c)
(cherry picked from commit b12dc2f)
(cherry picked from commit ba9bace)
(cherry picked from commit f1b71a9)
(cherry picked from commit 76d12a5)
krantheman and others added 19 commits August 29, 2024 13:16
(cherry picked from commit 8d19962)
…checkins and attendance before cancelling

(cherry picked from commit b7013b0)
(cherry picked from commit 4f203a9)
(cherry picked from commit fc5b7d2)
(cherry picked from commit d7a3c51)
(cherry picked from commit f236641)
(cherry picked from commit 218b93a)
Copy link
Contributor Author

mergify bot commented Aug 29, 2024

Cherry-pick of cf3b371 has failed:

On branch mergify/bp/version-15-hotfix/pr-1760
Your branch is ahead of 'origin/version-15-hotfix' by 42 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit cf3b37100.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   hrms/api/roster.py
	modified:   roster/src/components/MonthViewTable.vue
	modified:   roster/src/components/ShiftAssignmentDialog.vue

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   hrms/hr/doctype/shift_type/shift_type.json

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@ruchamahabal ruchamahabal merged commit c7ab7a8 into version-15-hotfix Aug 30, 2024
7 checks passed
@mergify mergify bot deleted the mergify/bp/version-15-hotfix/pr-1760 branch August 30, 2024 17:37
@frappe-pr-bot
Copy link
Collaborator

🎉 This issue has been resolved in version 15.28.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants