Skip to content
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

fix/charter-page-inscription : #1139 - Déplace la page d'inscription #1516

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Zarlokh
Copy link

@Zarlokh Zarlokh commented Jul 10, 2024

#1139 - Déplace la page d'inscription dans la charte graphique du site non admin :

  • Déplace le code dans le SF
  • Fusionne les form_theme et l'applique sur le site SF
  • Supprime l'ancien code d'inscription
  • Fix les tests
  • Ajout des "*" sur les labels des champs obligatoire (SF le fait dans des versions supérieurs donc c'est fait à la main le temps de)

image
image

Exemple d'erreur de validation sur le User (donc pas sur le formulaire, d'où le fait qu'il se trouve au dessus du form et je ne voulais pas déplacer ça dans le formulaire ne sachant pas où est-ce qu'il peut être utilisé sur le site.)
image

Cas d'un champs erroné
image
Il manque selon moi du design (champs en rouge / label en rouge / etc...) mais ce sera à faire à part ou via la monté de version (vu que SF le gère en version supérieur)

@@ -10,6 +10,12 @@ company_membership:
options:
sitemap: true

member_membership:
path: /adherer/member
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C'est du joli Franglais. Il faut choisir et ce n'est pas facile ;-)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J'ai suivi le mouvement :p

Je vois de tout dans le code du coups je me demande, actuellement, on vise plus le full anglais ou le full français en terme de :

  • URL
  • Code

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dans #1139 il y avait la proposition d'utiliser /adherer/particulier : #1139 (comment)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oups ! Pardon c'était passé à la trappe ! Donc url en fr, c'est noté ! Je fais le changement dans la journée :)

Copy link
Contributor

@Mopolo Mopolo Jul 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pas de soucis ça sert à ça la review 😃

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

La journée a été longue mais c'est fait :')

Raphael added 2 commits July 19, 2024 07:38
dans la charte graphique du site non admin :
	* Déplace le code dans le SF
	* Fusionne les form_theme et l'applique sur le site SF
	* Supprime l'ancien code d'inscription
	* Fix les tests
@Zarlokh Zarlokh force-pushed the fix/charter-page-inscription branch from c5264e5 to 728e863 Compare July 19, 2024 05:38
->setCivility(User::CIVILITE_M)
->setCountry('FR')
->setLevel(Droits::AFUP_DROITS_NIVEAU_MEMBRE)
->setStatus(Droits::AFUP_DROITS_ETAT_ACTIF)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pour le status cette constante pourrrait être utilisée :

const STATUS_ACTIVE = 1;

$user
->setCivility(User::CIVILITE_M)
->setCountry('FR')
->setLevel(Droits::AFUP_DROITS_NIVEAU_MEMBRE)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pour le level cette constante pourrait être utilisée :

const LEVEL_MEMBER = 0;

@Zarlokh Zarlokh force-pushed the fix/charter-page-inscription branch from 8261485 to 0a18ea2 Compare July 19, 2024 07:19
$user->setPlainPassword($user->getPassword());
$this->get(UserRepository::class)->save($user);

global $droits;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C'est utile ça vu que la variable est écrasée juste après ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ouai non t'as raison, j'ai copié collé comme un caca cette partie là et j'ai pas fait attention !
Bien vu !

Copy link
Author

@Zarlokh Zarlokh Jul 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En fait, je viens de voir que ça ne fonctionne pas le log et d'ailleurs, pas sûr que ça marchait déjà avant.

La personne n'est pas connecté et le $droits->obtenirIdentifiant() va chercher le $user->getId() du token d'authentification.
Cet id est ensuite utilisé dans la fonction "log" en utilisant l'id de l'utilisateur connecté sauf que vu qu'il n'y a pas de user de co à ce moment là, il génère une requête SQL erronée donc rien est log INSERT INTO afup_logs (id, date, id_personne_physique, texte) VALUES ( NULL, 1721395272, , 'Ajout de la personne physique jndskjqndkjqnkd dnsjqdjqdnk')
J'ai donc changé en n'utilisant pas le $droit et en mettant directement l'id de l'utilisateur qui vient d'être créé

Copy link
Contributor

@stakovicz stakovicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J'ai testé en local et ça marche nickel. Bravo, beau boulot !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants