cf2e12c8ba
Auto Tag Develop / tag (push) Successful in 9s
| Numéro du ticket | Titre du ticket | |------------------|-----------------| | | | ## Description de la PR ## Modification du .env ## Check list - [x] Pas de régression - [x] TU/TI/TF rédigée - [x] TU/TI/TF OK - [ ] CHANGELOG modifié Reviewed-on: #20 Co-authored-by: tristan <tristan@yuno.malio.fr> Co-committed-by: tristan <tristan@yuno.malio.fr>
59 lines
2.2 KiB
PHP
59 lines
2.2 KiB
PHP
<?php
|
||
|
||
declare(strict_types=1);
|
||
|
||
namespace App\ApiResource;
|
||
|
||
use ApiPlatform\Metadata\ApiResource;
|
||
use ApiPlatform\Metadata\Get;
|
||
use App\State\EmployeeLeaveSummaryProvider;
|
||
|
||
#[ApiResource(
|
||
operations: [
|
||
new Get(
|
||
uriTemplate: '/employees/{id}/leave-summary',
|
||
security: "is_granted('ROLE_ADMIN')",
|
||
provider: EmployeeLeaveSummaryProvider::class
|
||
),
|
||
],
|
||
paginationEnabled: false
|
||
)]
|
||
final class EmployeeLeaveSummary
|
||
{
|
||
public int $year = 0;
|
||
public bool $isSupported = false;
|
||
public string $ruleCode = '';
|
||
public float $acquiredDays = 0.0;
|
||
public float $remainingDays = 0.0;
|
||
public float $takenDays = 0.0;
|
||
public float $acquiredSaturdays = 0.0;
|
||
public float $remainingSaturdays = 0.0;
|
||
public float $takenSaturdays = 0.0;
|
||
public float $fractionedDays = 0.0;
|
||
public float $accruingDays = 0.0;
|
||
|
||
/** Brut généré sur l'exercice à ce jour (= accruingDays + congés pris en anticipé). Dénominateur de l'affichage « net / brut ». */
|
||
public float $accruingDaysTotal = 0.0;
|
||
public float $previousYearAcquiredDays = 0.0;
|
||
public float $previousYearTakenDays = 0.0;
|
||
public float $previousYearRemainingDays = 0.0;
|
||
public float $previousYearPaidDays = 0.0;
|
||
|
||
/** @var array<string, float> YYYY-MM => count (0.5 for half-days) */
|
||
public array $presenceDaysByMonth = [];
|
||
|
||
/** Cumul des jours de présence depuis le début de l'année de congé jusqu'à aujourd'hui (forfait). */
|
||
public float $presenceDaysToToday = 0.0;
|
||
|
||
/**
|
||
* FORFAIT uniquement : jours à travailler sur l'exercice = jours ouvrés de la période − congés acquis.
|
||
* Vaut 218 sur une année pleine (252 − 34) et le prorata sur une entrée en cours d'année
|
||
* (ex. Grégory : 168 − 13 ≈ 155). Null pour les non-forfait. Le « restant à travailler »
|
||
* affiché = forfaitWorkTargetDays − presenceDaysToToday.
|
||
*/
|
||
public ?float $forfaitWorkTargetDays = null;
|
||
|
||
/** Date de mise en service du logiciel (env RTT_START_DATE) — borne minimale pour les sélecteurs d'historique. */
|
||
public ?string $dataStartDate = null;
|
||
}
|