From 2d42bba28aaf3f80696dddce38eef8d773ea7554 Mon Sep 17 00:00:00 2001 From: Alexandre Garbe Date: Fri, 4 Oct 2024 16:10:02 +0200 Subject: [PATCH] fix(admin): do not show AAPNotVisibleInSearchResultNotice alert if use is a maisonMere manager. --- .../reva-admin-react/cypress/e2e/notice/top-notice.cy.ts | 4 ++-- .../src/components/layout-notice/LayoutNotice.tsx | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/reva-admin-react/cypress/e2e/notice/top-notice.cy.ts b/packages/reva-admin-react/cypress/e2e/notice/top-notice.cy.ts index fd6e0a5f7..28fcfcb04 100644 --- a/packages/reva-admin-react/cypress/e2e/notice/top-notice.cy.ts +++ b/packages/reva-admin-react/cypress/e2e/notice/top-notice.cy.ts @@ -70,7 +70,7 @@ context("When the funding alert feature is activated", () => { cy.get('[data-test="new-cgu-notice"]').should("not.exist"); }); - it("display a not-visible notice when head agency is closed", function () { + it("should not display a not-visible notice when head agency is closed", function () { interceptCandidacies({ fermePourAbsenceOuConges: true, isCguAccepted: true, @@ -81,7 +81,7 @@ context("When the funding alert feature is activated", () => { cy.wait("@getOrganismForAAPVisibilityCheck"); cy.get('[data-test="funding-alert-notice"]').should("not.exist"); - cy.get('[data-test="not-visible-alert-notice"]').should("exist"); + cy.get('[data-test="not-visible-alert-notice"]').should("not.exist"); cy.get('[data-test="new-cgu-notice"]').should("not.exist"); }); }); diff --git a/packages/reva-admin-react/src/components/layout-notice/LayoutNotice.tsx b/packages/reva-admin-react/src/components/layout-notice/LayoutNotice.tsx index 43fda503f..01882f171 100644 --- a/packages/reva-admin-react/src/components/layout-notice/LayoutNotice.tsx +++ b/packages/reva-admin-react/src/components/layout-notice/LayoutNotice.tsx @@ -37,7 +37,10 @@ export const LayoutNotice = () => { !maisonMereCgu?.isLatestVersion; const canSeeAAPNotVisibleInSearchResultNotice = - authenticated && isOrganism && !isVisibleInSearchResults; + authenticated && + !isGestionnaireMaisonMereAAP && + isOrganism && + !isVisibleInSearchResults; const canSeeNoticeAlertFundingLimit = isFeaturNoticeAlertFundingLimitActive && isOrganism;