Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
MedAymane1 committed Feb 9, 2024
2 parents 87ffa7a + 1a8a190 commit 34a0a52
Show file tree
Hide file tree
Showing 11 changed files with 162 additions and 186 deletions.
Original file line number Diff line number Diff line change
@@ -1,56 +1,48 @@
<div class="container">
<div class="main-content">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header card-header-danger">
<h4 class="card-title">List Des Individus</h4>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table">
<thead class="text-primary text-center">
<th>Id</th>
<th>Nom</th>
<th>Prenom</th>
<th>E-mail</th>
<th>Telephone</th>
<th>Ville</th>
<th>Date De Naissance</th>
<th>Action</th>
</thead>
<tbody class="text-center">
<tr *ngFor="let individu of individus">
<td>{{ increment() }}</td>
<td>{{ individu.nom }}</td>
<td>{{ individu.prenom }}</td>
<td>{{ individu.email }}</td>
<td>{{ individu.tele }}</td>
<td>{{ individu.ville }}</td>
<td>{{ individu.dateNaissance }}</td>
<td class="text-center">
<a
[routerLink]="['/admin/individu', individu.id, 'update']"
class="btn btn-outline-success mx-1"
>Edit</a
>
<button
*ngIf="permission"
(click)="deleteIndividu(individu.id)"
class="btn btn-outline-danger mx-1"
>
Delete
</button>
</td>
</tr>
</tbody>
</table>
</div>
<div class="main-content">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="card" style="height: 460px;">
<div class="card-header card-header-danger sticky-top fixed">
<h4 class="card-title">List Des Individus</h4>
</div>
<div class="card-body">
<div class="table-responsive" style="max-height: 350px; overflow-y: auto;">
<table class="table">
<thead class="text-primary text-center fixed">
<th>ID</th>
<th>Nom</th>
<th>Prenom</th>
<th>E-mail</th>
<th>Telephone</th>
<th>Ville</th>
<th>Date De Naissance</th>
<th>Action</th>
</thead>
<tbody class="text-center">
<tr *ngFor="let individu of individus">
<td>{{ individu.id }}</td>
<td>{{ individu.nom }}</td>
<td>{{ individu.prenom }}</td>
<td>{{ individu.email }}</td>
<td>{{ individu.tele }}</td>
<td>{{ individu.ville }}</td>
<td>{{ individu.dateNaissance }}</td>
<td class="text-center">
<a [routerLink]="['/admin/individu', individu.id, 'update']"
class="btn btn-outline-success mx-1">Edit</a>
<button *ngIf="permission" (click)="deleteIndividu(individu.id)"
class="btn btn-outline-danger mx-1">
Delete
</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import Swal from 'sweetalert2';
export class AllIndividusComponent implements OnInit {
individus: Individu[] = [];
permission: boolean;
index: number = 0;

constructor(
private individuService: IndividuService,
Expand All @@ -25,9 +24,9 @@ export class AllIndividusComponent implements OnInit {
}

// This method is used to generate rows numbers in the individus list instead of displaying the id
increment(): number {
return this.index += 1;
}
// increment(): number {
// return this.index += 1;
// }

getAllIndividus() {
this.individuService.getAllIndividus().then((response) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header card-header-danger">
<div class="card-header card-header-danger sticky-top fixed">
<h4 class="card-title">Modifier un individu</h4>
<div class="card-header">
<div class="card-category">
<a
class="btn btn-outline-info float-right"
routerLink="/admin/individu/get"
>Toutes les Individu</a
>Toutes les Individus</a
>
</div>
</div>
Expand Down Expand Up @@ -76,15 +76,16 @@ <h4 class="card-title">Modifier un individu</h4>
name="dateNaissance"
id="dateNaissance"
/>

<div class="form-group text-center">
<button
[disabled]="isSubmited"
(click)="updateIndividu()"
type="button"
class="btn btn-outline-primary mt-3"
class=" btn btn-outline-info mt-3"
>
Modifier
</button>
</div>
</div>
</form>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,16 @@ <h4 class="card-title">Ajouter une entreprise</h4>
required
/>

<div class="form-group text-center">
<button
[disabled]="isSubmitting"
(click)="addEntreprise()"
type="button"
class="form-control btn btn-outline-info mt-3"
class=" btn btn-outline-info mt-3"
>
Ajouter
</button>
</div>
</div>
</form>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ <h4 class="card-title">Modifier une entreprise</h4>
id="email"
/>

<div class="form-group text-center">
<button
[disabled]="isSubmitting"
(click)="editentreprise()"
Expand All @@ -81,6 +82,7 @@ <h4 class="card-title">Modifier une entreprise</h4>
>
Modifier
</button>
</div>
</div>
</form>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,18 @@
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header card-header-danger">
<div class="card" style="height: 460px;">
<div class="card-header card-header-danger sticky-top fixed">
<h4 class="card-title">Liste des entreprises</h4>
<p class="card-category">
<a
routerLink="/admin/entreprise/create"
class="btn btn-outline-primary float-right"
>Ajouter Entreprise</a
>
<a routerLink="/admin/entreprise/create" class="btn btn-outline-primary float-right ">Ajouter
Entreprise</a>
</p>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table text-center">
<thead class="text-primary">
<div class="table-responsive" style="max-height: 350px; overflow-y: auto;">
<table class="table">
<thead class="text-primary text-center">
<th>ID</th>
<th>Nom</th>
<th>Addresse</th>
Expand All @@ -25,7 +22,7 @@ <h4 class="card-title">Liste des entreprises</h4>
<th>E-Mail</th>
<th class="text-center" style="text-align: center">Action</th>
</thead>
<tbody>
<tbody class="text-center">
<tr *ngFor="let entreprise of entreprises">
<td>{{ entreprise.id }}</td>
<td>{{ entreprise.nom }}</td>
Expand All @@ -34,29 +31,19 @@ <h4 class="card-title">Liste des entreprises</h4>
<td>{{ entreprise.url }}</td>
<td>{{ entreprise.email }}</td>
<td class="text-center">
<a
[routerLink]="[
<a [routerLink]="[
'/admin/entreprise',
entreprise.id,
'details'
]"
class="btn btn-outline-info mx-1"
>Details</a
>
<button
[routerLink]="[
]" class="btn btn-outline-info mx-1">Details</a>
<button [routerLink]="[
'/admin/entreprise',
entreprise.id,
'edit'
]"
class="btn btn-outline-warning mx-1"
>
]" class="btn btn-outline-warning mx-1">
Edit
</button>
<button
(click)="deleteEntreprise(entreprise.id)"
class="btn btn-outline-danger mx-1"
>
<button (click)="deleteEntreprise(entreprise.id)" class="btn btn-outline-danger mx-1">
Delete
</button>
</td>
Expand All @@ -69,4 +56,4 @@ <h4 class="card-title">Liste des entreprises</h4>
</div>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
<div class="col-md-12">
<div class="card">
<div class="card-header card-header-danger sticky-top fixed">
<h4 class="card-title d-inline-block">Ajouter Un Formateur</h4>
<button class="btn btn-success" routerLink="/admin/formateur/get" >
Liste Des Formateurs
</button>
<h4 class="card-title">Ajouter Un Formateur</h4>
<div class="card-category">
<a class="btn btn-outline-primary float-right" routerLink="/admin/formateur/get">
Liste Des Formateurs
</a>
</div>
</div>

<div class="card-body ">
Expand All @@ -16,7 +18,8 @@ <h4 class="card-title d-inline-block">Ajouter Un Formateur</h4>
<!-- NOM -->
<label for="name">Nom</label>
<!-- ngModel same name in ts -->
<input [(ngModel)]="name" class="form-control" type="text" name="name" id="name" required>
<input [(ngModel)]="name" class="form-control" type="text" name="name" id="name"
required>
</div>
<div class="form-group">
<!-- email -->
Expand All @@ -27,24 +30,26 @@ <h4 class="card-title d-inline-block">Ajouter Un Formateur</h4>
<div class="form-group">
<!-- password -->
<label for="password">Password</label>
<input [(ngModel)]="password" class="form-control" type="password" name="password" id="password"
required>
<input [(ngModel)]="password" class="form-control" type="password" name="password"
id="password" required>
</div>
<div class="form-group">
<!-- competences -->
<label for="competences">Competences</label>
<input [(ngModel)]="competences" class="form-control" type="text" name="competences" id="competences">
</div>
<input [(ngModel)]="competences" class="form-control" type="text" name="competences"
id="competences">
</div>
<div class="form-group">
<!-- remarques -->
<label for="remarques">Remarques</label>
<input [(ngModel)]="remarques" class="form-control" type="text" name="remarques" id="remarques">
</div>
<input [(ngModel)]="remarques" class="form-control" type="text" name="remarques"
id="remarques">
</div>
<div class="form-group text-center">
<button [disabled]="isSubmitting" (click)="addFormator()" type="button"
class="btn button-add mt-3">
class=" btn btn-outline-info mt-3">
Ajouter </button>
</div>
</div>
</form>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,38 @@
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="card" style="height: 430px;">
<div class="card" style="height: 460px;">
<div class="card-header card-header-danger sticky-top fixed">
<h4 class="card-title d-inline-block">Formator List</h4>
<button *ngIf="permission" class="btn btn-success" routerLink="/admin/formateur/add">
Ajouter Formateur
</button>
<h4 class="card-title">Formator List</h4>
<p class="card-category">
<a *ngIf="permission" class="btn btn-outline-primary float-right" routerLink="/admin/formateur/add">
Ajouter Formateur
</a>
</p>
</div>
<div class="card-body">
<div class="table-responsive" style="max-height: 350px; overflow-y: auto;">
<table class="table" style="height: 400px;">
<thead class="text-primary fixed">
<table class="table">
<thead class="text-primary text-center fixed">
<th>ID</th>
<th>Name</th>
<th>Email</th>
<th>Competances</th>
<th>Remarques</th>
<th class="text-right" style="padding-right: 70px;">Actions</th>
<th>Actions</th>
</thead>
<tbody>
<tbody class="text-center">
<tr *ngFor="let formator of formators">
<td>{{formator.id}}</td>
<td>{{formator.name}}</td>
<td>{{formator.email}}</td>
<td>{{formator.competences}}</td>
<td>{{formator.remarques}}</td>
<td class="text-right">
<button [routerLink]="['/admin/formateur',formator.id,'update']"
class="btn btn-warning btn-sm mr-2">Edit</button>
<button
class="btn btn-danger btn-sm"
(click)="deleteFormator(formator.id)"
*ngIf="permission">
<i class="fas fa-trash-alt"></i> Delete
<td class="text-center">
<a [routerLink]="['/admin/formateur',formator.id,'update']"
class="btn btn-outline-success mx-1">Edit</a>
<button class="btn btn-outline-danger mx-1" (click)="deleteFormator(formator.id)"
*ngIf="permission">Delete
</button>
</td>
</tr>
Expand Down
Loading

0 comments on commit 34a0a52

Please sign in to comment.