|
|
|
@ -9,37 +9,37 @@ |
|
|
|
|
|
|
|
|
|
<div class="form-group col-12 col-sm-6 col-md-4 col-lg-3"> |
|
|
|
|
<label class="form-label">Nom</label> |
|
|
|
|
<input [ngClass]="{ 'is-invalid': submitted && f.name.errors }" [value]="collaborateur.name" |
|
|
|
|
<input [ngClass]="{ 'is-invalid': submitted && form.name.errors }" [value]="collaborateur.name" |
|
|
|
|
class="form-control" |
|
|
|
|
formControlName="name"> |
|
|
|
|
<div *ngIf="submitted && f.name.errors" class="invalid-feedback"> |
|
|
|
|
<div *ngIf="f.name.errors.required">Le nom d'un collaborateur est obligatoire</div> |
|
|
|
|
<div *ngIf="submitted && form.name.errors" class="invalid-feedback"> |
|
|
|
|
<div *ngIf="form.name.errors.required">Le nom d'un collaborateur est obligatoire</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="form-group col-12 col-sm-6 col-md-4 col-lg-3"> |
|
|
|
|
<label class="form-label">Prénom</label> |
|
|
|
|
<input [ngClass]="{ 'is-invalid': submitted && f.firstName.errors }" [value]="collaborateur.firstName" |
|
|
|
|
<input [ngClass]="{ 'is-invalid': submitted && form.firstName.errors }" [value]="collaborateur.firstName" |
|
|
|
|
class="form-control" formControlName="firstName"> |
|
|
|
|
<div *ngIf="submitted && f.firstName.errors" class="invalid-feedback"> |
|
|
|
|
<div *ngIf="f.firstName.errors.required">Le prénom d'un collaborateur est obligatoire</div> |
|
|
|
|
<div *ngIf="submitted && form.firstName.errors" class="invalid-feedback"> |
|
|
|
|
<div *ngIf="form.firstName.errors.required">Le prénom d'un collaborateur est obligatoire</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="form-group col-12 col-sm-6 col-md-4 col-lg-3"> |
|
|
|
|
<label class="form-label">Date de naissance</label> |
|
|
|
|
<input (change)="onBirthDateChange($event)" [ngClass]="{ 'is-invalid': submitted && f.birthDate.errors }" |
|
|
|
|
<input (change)="onBirthDateChange($event)" [ngClass]="{ 'is-invalid': submitted && form.birthDate.errors }" |
|
|
|
|
[value]="collaborateur.birthDate | date:'yyyy-MM-dd'" |
|
|
|
|
class="form-control" formControlName="birthDate" |
|
|
|
|
type="date"> |
|
|
|
|
<div *ngIf="submitted && f.birthDate.errors" class="invalid-feedback"> |
|
|
|
|
<div *ngIf="f.birthDate.errors.required">La date de naissance d'un collaborateur est obligatoire</div> |
|
|
|
|
<div *ngIf="submitted && form.birthDate.errors" class="invalid-feedback"> |
|
|
|
|
<div *ngIf="form.birthDate.errors.required">La date de naissance d'un collaborateur est obligatoire</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="form-group col-12 col-sm-6 col-md-4 col-lg-3"> |
|
|
|
|
<label class="form-label">Genre</label> |
|
|
|
|
<select [ngClass]="{ 'is-invalid': submitted && f.gender.errors }" [value]="collaborateur.gender" |
|
|
|
|
<select [ngClass]="{ 'is-invalid': submitted && form.gender.errors }" [value]="collaborateur.gender" |
|
|
|
|
class="form-select" |
|
|
|
|
formControlName="gender"> |
|
|
|
|
<option disabled selected value="">Genre</option> |
|
|
|
@ -47,8 +47,8 @@ |
|
|
|
|
<option value="FEMININ">Féminin</option> |
|
|
|
|
<option value="AUTRE">Autre</option> |
|
|
|
|
</select> |
|
|
|
|
<div *ngIf="submitted && f.gender.errors" class="invalid-feedback"> |
|
|
|
|
<div *ngIf="f.gender.errors.required">Vous devez préciser le genre du collaborateur</div> |
|
|
|
|
<div *ngIf="submitted && form.gender.errors" class="invalid-feedback"> |
|
|
|
|
<div *ngIf="form.gender.errors.required">Vous devez préciser le genre du collaborateur</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
@ -58,7 +58,7 @@ |
|
|
|
|
|
|
|
|
|
<div class="form-group col-12 col-sm-6 col-md-4 col-lg-3"> |
|
|
|
|
<label class="form-label">Statut</label> |
|
|
|
|
<select [ngClass]="{ 'is-invalid': submitted && f.status.errors }" [value]="collaborateur.status" |
|
|
|
|
<select [ngClass]="{ 'is-invalid': submitted && form.status.errors }" [value]="collaborateur.status" |
|
|
|
|
class="form-select" |
|
|
|
|
formControlName="status"> |
|
|
|
|
<option disabled selected value="">Statut</option> |
|
|
|
@ -67,36 +67,36 @@ |
|
|
|
|
<option value="ALTERNANT">Alternant</option> |
|
|
|
|
<option value="STAGIAIRE">Stagiaire</option> |
|
|
|
|
</select> |
|
|
|
|
<div *ngIf="submitted && f.status.errors" class="invalid-feedback"> |
|
|
|
|
<div *ngIf="f.status.errors.required">Vous devez préciser le statut du collaborateur</div> |
|
|
|
|
<div *ngIf="submitted && form.status.errors" class="invalid-feedback"> |
|
|
|
|
<div *ngIf="form.status.errors.required">Vous devez préciser le statut du collaborateur</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="form-group col-12 col-sm-6 col-md-4 col-lg-3"> |
|
|
|
|
<label class="form-label">Nombre d'enfants</label> |
|
|
|
|
<input [ngClass]="{ 'is-invalid': submitted && f.childrenNumber.errors }" [value]="collaborateur.childrenNumber" |
|
|
|
|
<input [ngClass]="{ 'is-invalid': submitted && form.childrenNumber.errors }" [value]="collaborateur.childrenNumber" |
|
|
|
|
class="form-control" formControlName="childrenNumber" min="0" |
|
|
|
|
onkeyup="if(this.value<0){this.value= this.value * -1}" type="number"> |
|
|
|
|
<div *ngIf="submitted && f.childrenNumber.errors" class="invalid-feedback"> |
|
|
|
|
<div *ngIf="f.childrenNumber.errors.required">Le nombre d'enfant d'un collaborateur est obligatoire</div> |
|
|
|
|
<div *ngIf="submitted && form.childrenNumber.errors" class="invalid-feedback"> |
|
|
|
|
<div *ngIf="form.childrenNumber.errors.required">Le nombre d'enfant d'un collaborateur est obligatoire</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="form-group col-12 col-sm-6 col-md-4 col-lg-3"> |
|
|
|
|
<label class="form-label">Adresse</label> |
|
|
|
|
<input [ngClass]="{ 'is-invalid': submitted && f.address.errors }" [value]="collaborateur.address" |
|
|
|
|
<input [ngClass]="{ 'is-invalid': submitted && form.address.errors }" [value]="collaborateur.address" |
|
|
|
|
class="form-control" formControlName="address"> |
|
|
|
|
<div *ngIf="submitted && f.address.errors" class="invalid-feedback"> |
|
|
|
|
<div *ngIf="f.address.errors.required">L'adresse d'un collaborateur est obligatoire</div> |
|
|
|
|
<div *ngIf="submitted && form.address.errors" class="invalid-feedback"> |
|
|
|
|
<div *ngIf="form.address.errors.required">L'adresse d'un collaborateur est obligatoire</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="form-group col-12 col-sm-6 col-md-4 col-lg-3"> |
|
|
|
|
<label class="form-label">Téléphone</label> |
|
|
|
|
<input [ngClass]="{ 'is-invalid': submitted && f.telephone.errors }" [value]="collaborateur.telephone" |
|
|
|
|
<input [ngClass]="{ 'is-invalid': submitted && form.telephone.errors }" [value]="collaborateur.telephone" |
|
|
|
|
class="form-control" formControlName="telephone"> |
|
|
|
|
<div *ngIf="submitted && f.telephone.errors" class="invalid-feedback"> |
|
|
|
|
<div *ngIf="f.telephone.errors.required">Le numéro de téléphone d'un collaborateur est obligatoire</div> |
|
|
|
|
<div *ngIf="submitted && form.telephone.errors" class="invalid-feedback"> |
|
|
|
|
<div *ngIf="form.telephone.errors.required">Le numéro de téléphone d'un collaborateur est obligatoire</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
@ -108,13 +108,13 @@ |
|
|
|
|
<label class="form-label" style="padding-right: 5px">Mail personnel</label> |
|
|
|
|
<small>(pas Apside)</small> |
|
|
|
|
</div> |
|
|
|
|
<input [ngClass]="{ 'is-invalid': submitted && f.personalMail.errors }" [value]="collaborateur.personalMail" |
|
|
|
|
<input [ngClass]="{ 'is-invalid': submitted && form.personalMail.errors }" [value]="collaborateur.personalMail" |
|
|
|
|
class="form-control" |
|
|
|
|
formControlName="personalMail" placeholder="prenom.nom@example.com" |
|
|
|
|
type="email"> |
|
|
|
|
<div *ngIf="submitted && f.personalMail.errors" class="invalid-feedback"> |
|
|
|
|
<div *ngIf="f.personalMail.errors.required">Le mail personnel d'un collaborateur est obligatoire</div> |
|
|
|
|
<div *ngIf="f.personalMail.errors.pattern">Le mail personnel d'un collaborateur doit être au format |
|
|
|
|
<div *ngIf="submitted && form.personalMail.errors" class="invalid-feedback"> |
|
|
|
|
<div *ngIf="form.personalMail.errors.required">Le mail personnel d'un collaborateur est obligatoire</div> |
|
|
|
|
<div *ngIf="form.personalMail.errors.pattern">Le mail personnel d'un collaborateur doit être au format |
|
|
|
|
"exemple@nom.de.domaine" |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
@ -122,13 +122,13 @@ |
|
|
|
|
|
|
|
|
|
<div class="form-group col-12 col-sm-6 col-md-4 col-lg-3"> |
|
|
|
|
<label class="form-label">Mail Apside</label> |
|
|
|
|
<input [ngClass]="{ 'is-invalid': (submitted && f.apsideMail.errors) || errorValue==1 }" |
|
|
|
|
<input [ngClass]="{ 'is-invalid': (submitted && form.apsideMail.errors) || errorValue==1 }" |
|
|
|
|
[value]="collaborateur.apsideMail" class="form-control" |
|
|
|
|
formControlName="apsideMail" |
|
|
|
|
placeholder="prenom.nom@apside-groupe.com" type="email"> |
|
|
|
|
<div *ngIf="submitted && f.apsideMail.errors" class="invalid-feedback"> |
|
|
|
|
<div *ngIf="f.apsideMail.errors.required">Le mail Apside d'un collaborateur est obligatoire</div> |
|
|
|
|
<div *ngIf="f.apsideMail.errors.pattern">Le mail Apside d'un collaborateur doit être au format |
|
|
|
|
<div *ngIf="submitted && form.apsideMail.errors" class="invalid-feedback"> |
|
|
|
|
<div *ngIf="form.apsideMail.errors.required">Le mail Apside d'un collaborateur est obligatoire</div> |
|
|
|
|
<div *ngIf="form.apsideMail.errors.pattern">Le mail Apside d'un collaborateur doit être au format |
|
|
|
|
"exemple@apside-groupe.com" ou "exemple@apside.fr" |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
@ -141,7 +141,7 @@ |
|
|
|
|
<div class="form-group col-12 col-sm-6 col-md-4 col-lg-3"> |
|
|
|
|
<label class="form-label">Date de départ</label> |
|
|
|
|
<input (change)="onResignationDateChange($event)" |
|
|
|
|
[ngClass]="{ 'is-invalid': submitted && f.resignationDate.errors }" |
|
|
|
|
[ngClass]="{ 'is-invalid': submitted && form.resignationDate.errors }" |
|
|
|
|
[value]="collaborateur.resignationDate | date:'yyyy-MM-dd'" |
|
|
|
|
class="form-control" formControlName="resignationDate" |
|
|
|
|
type="date"> |
|
|
|
@ -153,13 +153,13 @@ |
|
|
|
|
|
|
|
|
|
<div class="form-group col-12 col-md-6"> |
|
|
|
|
<label class="form-label">Business Unit</label> |
|
|
|
|
<select [ngClass]="{ 'is-invalid': submitted && f.businessUnitId.errors }" class="form-select" |
|
|
|
|
<select [ngClass]="{ 'is-invalid': submitted && form.businessUnitId.errors }" class="form-select" |
|
|
|
|
formControlName="businessUnitId"> |
|
|
|
|
<option disabled selected value="">Choisissez une Business Unit pour le collaborateur</option> |
|
|
|
|
<option *ngFor="let businessUnit of businessUnits" [ngValue]="businessUnit.id">{{businessUnit.name}} </option> |
|
|
|
|
</select> |
|
|
|
|
<div *ngIf="submitted && f.businessUnitId.errors" class="invalid-feedback"> |
|
|
|
|
<div *ngIf="f.businessUnitId.errors.required">Vous devez préciser la Business Unit du collaborateur</div> |
|
|
|
|
<div *ngIf="submitted && form.businessUnitId.errors" class="invalid-feedback"> |
|
|
|
|
<div *ngIf="form.businessUnitId.errors.required">Vous devez préciser la Business Unit du collaborateur</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|