.. include:: /Includes.rst.txt .. _feature-1791018927: =================================================== Feature: Cancel leave, attach files and see clashes =================================================== Description =========== Employees cancel approved leave from tomorrow on, and HR also days already taken; the cancellation is decided by the approval rules for ``leaveCancellation`` and gives back exactly the days it cancels. A pending cancellation can be withdrawn. Requests take attachments (PDF, JPEG, PNG up to 10 MB) that the requester, the manager, the approvers and HR can open. Approvers see who else of the department is away and where the minimum staffing would not be reached; the preview gives employees the counts. When holidays or the working time change, approved and pending requests are charged anew for the days still ahead; what counts less is given back, what counts more is charged even below zero, and the employee and the manager are told. When an employee leaves, pending requests are withdrawn and approved days after the exit given back. Requests approved in a previous system are taken over by the import without an approval chain. The API offers ``cancelLeaveRequest``, ``withdrawLeaveCancellation``, ``listLeaveRequestClashes``, ``createLeaveAttachment``, ``getLeaveAttachment`` and ``deleteLeaveAttachment``; ``getLeaveAttachment`` serves the file with its own content type. ``leave.recalculated`` is a new notification. A balance below zero is now noticed when the charge lies ahead. Impact ====== The leave attachment table gets a purpose. Attachments are kept below ``var/storage/leave-attachments``. .. index:: API, Database, Frontend, package:adsum-leave