> For the complete documentation index, see [llms.txt](https://afi-labs.gitbook.io/rb-scheduling-app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://afi-labs.gitbook.io/rb-scheduling-app/leave-application.md).

# Leave Application

From time to time, sales reps will need to take time off work. This is easily handled by the leave application module (<http://52.237.241.57/>[leaves](http://23.96.58.180/leaves)). Sales Managers and Admins can create a new leave application by clicking the "add new leave" button and select the time period and sales rep on vacation.

![](/files/-Ly3I_8rmj_ToBoSrAtn)

When a sales rep applies for leave, the store visits on that day are pushed to another day based on the following business logic:

1. The number of visits in a day does not exceed the `maxStopsPerDay` parameter (by default, this is set to 15).
2. The day selected is not a public holiday or a leave day.
3. The visit is within the defined distanceRadius of another store.
4. A store will not been visited within the same week.&#x20;
