hrms icon indicating copy to clipboard operation
hrms copied to clipboard

[Enhancement] Earned Leave UX

Open ruchamahabal opened this issue 1 year ago • 1 comments

Problem

Earned leaves are auto-allocated via the scheduler based on the annual allocation set in the Leave Policy. https://frappehr.com/docs/v14/en/leave-type#2-2-earned-leave

When users create a leave allocation based on earned leave via policy assignment, they have to do the mental math on how many leaves will be allocated per month. Since this happens via bg job, the user doesn't come to know if any auto allocation failed. And there is no way for the user to allocate earned leaves manually if allocation fails.

Solutions

  • [x] For monthly frequency only: Show the schedule of how many leaves would be allocated each month in a tabular format in leave allocation form dashboard. Check auto repeat schedule in the framework for reference
  • [x] In the background job, maintain a list of failed auto-allocations and notify users with the HR manager role about the failure via email. Check sendmail_to_system_managers for reference
  • [x] Add a button in the earned leave document on top to “Allocate Leaves Manually". Show a dialog and default it to the monthly number of leaves for annual allocation with a button: “Allocate”. Create leave ledger entries on “Allocate”. Leave a trace in the document timeline saying "x number of leaves were manually allocated by {user} on {date}". Check earned leave bg job for reference - it also leaves a trace in the timeline when leaves are auto-allocated

Additional Related Chores

Update these pages. They have outdated steps

  • [x] https://frappehr.com/docs/v14/en/leave-period#3-granting-leave-using-leave-period this was removed long back and replaced with Leave Policy Assignment. Remove this section and add link to Leave Policy Assignment

  • [x] https://frappehr.com/docs/v14/en/leave-policy-assignment#3-1-bulk-leave-policy-assignment - replace this with a link to Leave Control Panel since bulk leave policy assignment now takes you there

  • [x] Update this article - https://frappehr.com/docs/v14/en/configuring-earned-leave. It should have the flow: leave period > leave policy > leave policy assignment > leave allocation

    • [x] screenshot of schedule
    • [x] info about how the auto allocation will happen
    • [x] what happens in case of failure - an email will be sent to HR managers
    • [x] how to allocate leaves manually in such case
  • [x] Add a section on Leave Policy Assignment -> How to allocate earned leaves? - link this to the page above

ruchamahabal avatar Nov 27 '23 05:11 ruchamahabal

Any update on this?

JitendraSAW avatar Dec 19 '23 11:12 JitendraSAW