Skip to content

Commit

Permalink
Docs: document long leaves UI.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaragunde committed Dec 22, 2022
1 parent aec6430 commit 60f3a87
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 14 deletions.
1 change: 1 addition & 0 deletions docs/user/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ concepts to use PhpReport both for worker and manager profiles.
* `Setting the area for a user <users-management.rst#setting-the-area-for-a-user>`__
* `Setting the city for a user <users-management.rst#setting-the-city-for-a-user>`__
* `Setting user custom goals <users-management.rst#setting-user-custom-goals>`__
* `Filling long leave periods for absent users <users-management.rst#filling-long-leave-periods-for-absent-users>`__

#. `Clients management <clients-management.rst>`__

Expand Down
36 changes: 22 additions & 14 deletions docs/user/users-management.rst
Original file line number Diff line number Diff line change
Expand Up @@ -187,21 +187,29 @@ whatever is closer in time. The extra hours value of the default goal is 0.
For the most common cases, a default goals is equivalent to setting 1st Jan as
init date, 31st Dec as end date and 0 as extra hours.

Filling long periods of Sick Leaves
===================================
Filling long leave periods for absent users
===========================================

Sometimes, an admin needs to fill long periods of sick leave or other kinds of
leaves for an absent user. There is an interface to accomplish this, it can be
accessed from the *Data management* menu, section *Long leaves*.

You need to fill in the following data:

Type of leave:
The project the leave will be assigned to. To have projects listed here, they
need to have been saved with the project type "leave" in the
`Projects management <projects-management.rst>`__ area.

Sometimes a user needs to fill long periods of Sick Leave and from the Vacations
Management interface this is not possible yet. The easiest way to accomplish this,
is by using the `web/services/updateLongLeaves.php` endpoint, in which an admin
user can pass the period, the user and for which project this should be filled.
User:
User the leave will be assigned to.

Expected query parameters:
Start and end dates:
When the leave will start and end. One task will be created for every day
between those dates, excluding weekends.

- `init`: date in the format `YYYY-MM-DD` for the day the period starts.
- `end`: date in the format `YYYY-MM-DD` for the day the period ends.
- `projectId`: the projectId for the Long leave.
- `user`: the username for the user that will have the leaves filled.
- `sid`: the session id of the admin that is making the request. This id can be
retrieved by doing a GET request to `/phpreport/web/services/loginService.php`.
Description:
Optional text to be added in the task description.

Note that dates that fall on weekends won't be created.
.. WARNING:: Make sure the details are correctly filled as there is no interface
to remove multiple leaves at once.

0 comments on commit 60f3a87

Please sign in to comment.