feat(absences) : avancement module absences + suppression du portail client
Deux lots regroupés sur la branche feat/absence-management. Suppression complète du portail client : - retire ROLE_CLIENT (security.yaml) ; User::getRoles() ajoute toujours ROLE_USER - supprime l'entité ClientTicket (+ repo, states, relations), User.client et User.allowedProjects, NotificationService, ProjectAllowedExtension, le bloc ROLE_CLIENT de MailAccessChecker - front : pages /portal, layout portal, composants client-ticket/, AdminClientTicketTab, services/dto/i18n/docs associés - fixtures : retire les users client-liot / client-acme - migration Version20260522110000 (drop client_ticket, user_allowed_projects, colonnes liées ; task_document.task_id -> NOT NULL) - tests : retire les cas obsolètes testant le blocage des clients sur le mail Module gestion des absences (WIP) : - entités / migrations (Version20260521160000, Version20260522090000) - pages absences.vue / team-absences.vue, composants frontend/components/absence/ - services front, AccrueLeaveCommand, PublicHolidayController Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
39
migrations/Version20260522090000.php
Normal file
39
migrations/Version20260522090000.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Absence management: split the paid-leave balance into "acquired" (Congés N-1,
|
||||
* finalized and available) and "acquiring" (Congés N, "en cours d'acquisition"),
|
||||
* mirroring the two columns on a French payslip.
|
||||
*
|
||||
* Existing paid-leave balances were filled solely by the monthly accrual, which
|
||||
* credited `acquired`; those days actually belong to the current period's
|
||||
* "en cours d'acquisition", so they are moved to `acquiring` on the way up.
|
||||
*/
|
||||
final class Version20260522090000 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Add acquiring (en cours d\'acquisition) to absence_balance and reclassify existing paid-leave days';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE absence_balance ADD acquiring DOUBLE PRECISION DEFAULT 0 NOT NULL');
|
||||
$this->addSql("UPDATE absence_balance SET acquiring = acquired, acquired = 0 WHERE type = 'cp'");
|
||||
$this->addSql('ALTER TABLE absence_balance ALTER acquiring DROP DEFAULT');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// Fold the in-progress days back into acquired before dropping the column.
|
||||
$this->addSql("UPDATE absence_balance SET acquired = acquired + acquiring WHERE type = 'cp'");
|
||||
$this->addSql('ALTER TABLE absence_balance DROP acquiring');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user