From 763044fd7bca372d96cecb786c6a63c590abe6ca Mon Sep 17 00:00:00 2001 From: Emmanuelle Bonnemay Date: Thu, 5 Dec 2024 17:37:07 +0100 Subject: [PATCH 1/5] feat(admin) : add new translation keys --- admin/translations/en.json | 19 ++++++++++++++++++- admin/translations/fr.json | 19 ++++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/admin/translations/en.json b/admin/translations/en.json index 25326f60ccc..4b06830b69d 100644 --- a/admin/translations/en.json +++ b/admin/translations/en.json @@ -379,6 +379,21 @@ "authentication-method": { "should-change-password-status": "Temporary password :" }, + "cgu": { + "title": "CGU", + "validation": { + "domain": { + "pix-app": "Pix App Terms of Service validated:", + "pix-certif": "Pix Certif Terms of Service validated:", + "pix-orga": "Pix Orga Terms of Service validated:" + }, + "status": { + "non-validated": "NO", + "validated": "YES", + "validated-with-date": "YES, on {formattedDate}" + } + } + }, "copied": "Copied!" } } @@ -722,6 +737,8 @@ "navbar": { "authentication-methods": "Méthodes de connexion", "certification-centers-list": "Pix Certif", + "cgu": "Terms of service", + "cgu-aria-label" : "Terms of service", "details": "Informations prescrit", "organizations-list": "Pix Orga", "participations-list": "Participations", @@ -739,7 +756,7 @@ } }, "users-list": { - "query": { + "query": { "contains": "Contient", "exact": "Exacte" } diff --git a/admin/translations/fr.json b/admin/translations/fr.json index 11ee667d15b..4d88de3f23d 100644 --- a/admin/translations/fr.json +++ b/admin/translations/fr.json @@ -389,6 +389,21 @@ "authentication-method": { "should-change-password-status": "Mot de passe temporaire :" }, + "cgu": { + "title": "CGU", + "validation": { + "domain": { + "pix-app": "CGU Pix App validé :", + "pix-certif": "CGU Pix Certif validé :", + "pix-orga": "CGU Pix Orga validé :" + }, + "status": { + "non-validated": "NON", + "validated": "OUI", + "validated-with-date": "OUI, le {formattedDate}" + } + } + }, "copied": "Copié !" } } @@ -746,6 +761,8 @@ "navbar": { "authentication-methods": "Méthodes de connexion", "certification-centers-list": "Pix Certif", + "cgu": "CGU", + "cgu-aria-label" : "Conditions générales d'utilisation", "details": "Informations prescrit", "organizations-list": "Pix Orga", "participations-list": "Participations", @@ -763,7 +780,7 @@ } }, "users-list": { - "query": { + "query": { "contains": "Contient", "exact": "Exacte" } From f27b341e01202789c2f0d253bc03ce72b39947f1 Mon Sep 17 00:00:00 2001 From: Emmanuelle Bonnemay Date: Thu, 5 Dec 2024 17:37:56 +0100 Subject: [PATCH 2/5] feat(admin): remove CGU information from overview component --- admin/app/components/users/user-overview.gjs | 32 +------- .../components/users/user-overview-test.gjs | 78 ------------------- 2 files changed, 1 insertion(+), 109 deletions(-) diff --git a/admin/app/components/users/user-overview.gjs b/admin/app/components/users/user-overview.gjs index 6ee9a39d59e..186cf38f015 100644 --- a/admin/app/components/users/user-overview.gjs +++ b/admin/app/components/users/user-overview.gjs @@ -64,24 +64,6 @@ export default class UserOverview extends Component { return false; } - get userHasValidatePixAppTermsOfService() { - return this._formatValidatedTermsOfServiceText(this.args.user.lastTermsOfServiceValidatedAt, this.args.user.cgu); - } - - get userHasValidatePixOrgaTermsOfService() { - return this._formatValidatedTermsOfServiceText( - this.args.user.lastPixOrgaTermsOfServiceValidatedAt, - this.args.user.pixOrgaTermsOfServiceAccepted, - ); - } - - get userHasValidatePixCertifTermsOfService() { - return this._formatValidatedTermsOfServiceText( - this.args.user.lastPixCertifTermsOfServiceValidatedAt, - this.args.user.pixCertifTermsOfServiceAccepted, - ); - } - get languageOptions() { return this.languages; } @@ -95,11 +77,6 @@ export default class UserOverview extends Component { return hasBeenAnonymised || isPixAgent; } - _formatValidatedTermsOfServiceText(date, hasValidatedTermsOfService) { - const formattedDateText = date ? `, le ${dayjs(date).format('DD/MM/YYYY')}` : ''; - return hasValidatedTermsOfService ? `OUI${formattedDateText}` : 'NON'; - } - _initForm() { this.form.firstName = this.args.user.firstName; this.form.lastName = this.args.user.lastName; @@ -346,14 +323,7 @@ export default class UserOverview extends Component { - +