From 60f3a874bd150e0c65ee9a9d09d1650ef6fcac11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Aragunde=20P=C3=A9rez?= Date: Wed, 21 Dec 2022 11:24:41 +0100 Subject: [PATCH] Docs: document long leaves UI. --- docs/user/index.rst | 1 + docs/user/users-management.rst | 36 +++++++++++++++++++++------------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/docs/user/index.rst b/docs/user/index.rst index 719641204..3aa45732f 100644 --- a/docs/user/index.rst +++ b/docs/user/index.rst @@ -40,6 +40,7 @@ concepts to use PhpReport both for worker and manager profiles. * `Setting the area for a user `__ * `Setting the city for a user `__ * `Setting user custom goals `__ + * `Filling long leave periods for absent users `__ #. `Clients management `__ diff --git a/docs/user/users-management.rst b/docs/user/users-management.rst index 0f3dd39f1..48701ba9e 100644 --- a/docs/user/users-management.rst +++ b/docs/user/users-management.rst @@ -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 `__ 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.