-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TECH] Uniformise le code des fonctionnalités d'organisation sur PixAdmin (PIX-16319). #11272
[TECH] Uniformise le code des fonctionnalités d'organisation sur PixAdmin (PIX-16319). #11272
Conversation
Une fois les applications déployées, elles seront accessibles via les liens suivants :
Les variables d'environnement seront accessibles via les liens suivants : |
7d9f149
to
5d06af8
Compare
5d06af8
to
434bb1b
Compare
7e43d56
to
6cb9817
Compare
9326e38
to
d6c5cb9
Compare
a36930a
to
1e4a5d5
Compare
Prescription: Func OK 🦦 |
api/src/organizational-entities/domain/models/OrganizationForAdmin.js
Outdated
Show resolved
Hide resolved
...src/organizational-entities/infrastructure/repositories/organization-for-admin.repository.js
Show resolved
Hide resolved
1e4a5d5
to
bb66a2e
Compare
this.form.identityProviderForCampaigns = | ||
this.args.organization.identityProviderForCampaigns ?? this.noIdentityProviderOption.value; | ||
|
||
this.form.features = JSON.parse(JSON.stringify(this.args.organization.features)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est étrange comme façon de faire, pourquoi doit-on faire ça ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On doit faire ça parce que sinon on travaille sur la même référence et on veut pouvoir annuler les changements dans le formulaire donc il faut faire une copie 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
En fouillant un peu, je viens de voir qu'il existait en natif depuis window la méthode structuredClone()
Je vais essayer de voir si je peux pas plutôt utiliser ça a la place du .parse/.stringify
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
La méthode structuredClone()
marche très bien pour notre cas, je change par ça. Ça rends + explicite à mon avis
admin/app/components/organizations/information-section-edit.gjs
Outdated
Show resolved
Hide resolved
bb66a2e
to
a156aa4
Compare
Une fois les applications déployées, elles seront accessibles via les liens suivants :
Les variables d'environnement seront accessibles via les liens suivants : |
…ures in OrganizationForAdmin model
a156aa4
to
ab38dc1
Compare
🥞 Problème
Il existe dans la base de code plusieurs manière d'activer des fonctionnalités sur une organisation.
🥓 Proposition
Dans cette PR, on uniformise la manière d'afficher et mettre à jour les fonctionnalités d'une organisation sur PixAdmin via le model OrganizationForAdmin.
🧃 Remarques
La valeur pour la feature attestation est en dur. Il faudra faire évoluer à l'ajout de l'attestation parentalité.
😋 Pour tester
Aller sur PixAdmin
Aller sur la page d'une organisation
Vérifier le bon affichage des features dans l'encart "fonctionnalités"
Vérifier le bon fonctionnement lors de l'édition et l'ajout/retrait des features
(note : il est normal que certaines fonctionnalités se soient pas éditable)