From 77966b767d932fdb9eaddce25b3e40c396fa30d1 Mon Sep 17 00:00:00 2001 From: "Yassine R." Date: Thu, 7 Nov 2024 14:51:20 +0100 Subject: [PATCH] fix(frontend): filter docs for 'radie' --- .../profil-structure-docs.component.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/frontend/src/app/modules/usager-profil/components/_documents/profil-structure-documents/profil-structure-docs.component.ts b/packages/frontend/src/app/modules/usager-profil/components/_documents/profil-structure-documents/profil-structure-docs.component.ts index 8512f98d67..fd72c98d93 100644 --- a/packages/frontend/src/app/modules/usager-profil/components/_documents/profil-structure-documents/profil-structure-docs.component.ts +++ b/packages/frontend/src/app/modules/usager-profil/components/_documents/profil-structure-documents/profil-structure-docs.component.ts @@ -113,6 +113,18 @@ export class ProfilStructureDocsComponent implements OnInit, OnDestroy { ) { this.docs.push(this.getDefaultCustomDoc("courrier_radiation")); } + + if (this.usager.decision.statut !== "RADIE") { + this.docs.filter( + (doc) => doc.customDocType === "courrier_radiation" + ); + } + + if (!this.usager.echeanceInfos.isActif) { + this.docs.filter( + (doc) => doc.customDocType === "attestation_postale" + ); + } }, }) );