Retrait de l'ancienne case « formation déjà prévue dans la répartition annuelle »
La fiche agent portait deux cases à cocher pour la formation depuis l'ajout du droit à l'enveloppe : celle-ci faisait doublon et disparaît, avec sa colonne `agent.formation_repartition_annuelle` et tout ce qui la lisait — projection SQL, création et modification d'agent, formulaires d'administration, JS, et liste des colonnes obligatoires de SchemaModel. L'enveloppe de formation ne dépend donc plus que du droit : AgentModel::trainingEnvelopeMinutes() rend 14 h ou 0. La colonne est retirée du socle (le CREATE TABLE ne la crée plus sur une base neuve) et par migration_v7_9c sur les bases existantes. migration_v7_9b perd sa clause AFTER, qui pointait sur la colonne supprimée et aurait fait échouer l'installation d'une base neuve ; sa réécriture est sans risque, le script de migration rejoue un fichier modifié et l'ALTER reste idempotent. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -361,7 +361,6 @@ final class AgentController
|
||||
$contractEndDate = $contractEnd !== '' ? DateTimeImmutable::createFromFormat('!Y-m-d', $contractEnd) : null;
|
||||
$postId = filter_var($payload['id_poste'] ?? null, FILTER_VALIDATE_INT);
|
||||
$contractType = strtoupper(trim((string) ($payload['type_contrat'] ?? 'PERMANENT')));
|
||||
$trainingPlanned = filter_var($payload['formation_repartition_annuelle'] ?? false, FILTER_VALIDATE_BOOLEAN);
|
||||
// Le droit à l'enveloppe de formation est acquis par défaut : un
|
||||
// formulaire ancien ou une intégration tierce ne doit pas le retirer.
|
||||
$trainingRight = filter_var($payload['droit_enveloppe_formation'] ?? true, FILTER_VALIDATE_BOOLEAN);
|
||||
@@ -408,7 +407,6 @@ final class AgentController
|
||||
'date_fin_contrat' => $contractEnd !== '' ? $contractEnd : null,
|
||||
'id_poste' => (int) $postId,
|
||||
'type_contrat' => $contractType,
|
||||
'formation_repartition_annuelle' => $trainingPlanned,
|
||||
'droit_enveloppe_formation' => $trainingRight,
|
||||
'commentaire_pta' => $ptaComment !== '' ? $ptaComment : null,
|
||||
]);
|
||||
@@ -440,7 +438,6 @@ final class AgentController
|
||||
'id_poste' => (int) $postId,
|
||||
'poste_libelle' => (string) (array_values(array_filter($this->agentModel->allPosts(), static fn(array $post): bool => (int) $post['id_poste'] === (int) $postId))[0]['libelle'] ?? ''),
|
||||
'type_contrat' => $contractType,
|
||||
'formation_repartition_annuelle' => $trainingPlanned ? 1 : 0,
|
||||
'droit_enveloppe_formation' => $trainingRight ? 1 : 0,
|
||||
'commentaire_pta' => $ptaComment !== '' ? $ptaComment : null,
|
||||
]),
|
||||
@@ -466,7 +463,6 @@ final class AgentController
|
||||
$contractEndDate = $contractEnd !== '' ? DateTimeImmutable::createFromFormat('!Y-m-d', $contractEnd) : null;
|
||||
$postId = filter_var($payload['id_poste'] ?? null, FILTER_VALIDATE_INT);
|
||||
$contractType = strtoupper(trim((string) ($payload['type_contrat'] ?? 'PERMANENT')));
|
||||
$trainingPlanned = filter_var($payload['formation_repartition_annuelle'] ?? false, FILTER_VALIDATE_BOOLEAN);
|
||||
// Le droit à l'enveloppe de formation est acquis par défaut : un
|
||||
// formulaire ancien ou une intégration tierce ne doit pas le retirer.
|
||||
$trainingRight = filter_var($payload['droit_enveloppe_formation'] ?? true, FILTER_VALIDATE_BOOLEAN);
|
||||
@@ -510,7 +506,6 @@ final class AgentController
|
||||
'date_fin_contrat' => $contractEnd !== '' ? $contractEnd : null,
|
||||
'id_poste' => (int) $postId,
|
||||
'type_contrat' => $contractType,
|
||||
'formation_repartition_annuelle' => $trainingPlanned,
|
||||
'droit_enveloppe_formation' => $trainingRight,
|
||||
'commentaire_pta' => $ptaComment !== '' ? $ptaComment : null,
|
||||
'structure_id' => $structureId !== null ? (int) $structureId : null,
|
||||
|
||||
Reference in New Issue
Block a user