amelioration du style globale

This commit is contained in:
MiharyR 2021-11-26 17:05:12 +01:00
parent cd1f323686
commit d1ac1b77f0
36 changed files with 191 additions and 112 deletions

View file

@ -32,6 +32,7 @@ export class PageRegisterComponent
dateOfBirth: null,
gender: "man",
interests: [],
company: "",
isActive: false,
isAccepted: false,
createdAt: new Date(),
@ -94,7 +95,11 @@ export class PageRegisterComponent
// Check les champs saisies par l'utilisateur
checkField(): void
{
if(this.user.login.length === 0) {
if((this.user.role.name === 'advertiser') && (this.user.company.length === 0)) {
this.errorMessage = "Veuillez remplir le champ 'entreprise'.";
this.hasError = true;
}
else if(this.user.login.length === 0) {
this.errorMessage = "Veuillez remplir le champ 'login'.";
this.hasError = true;
}