Skip to content

Commit

Permalink
store changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MedAymane1 committed Feb 9, 2024
1 parent 34a0a52 commit 8ca9dff
Show file tree
Hide file tree
Showing 11 changed files with 186 additions and 162 deletions.
Original file line number Diff line number Diff line change
@@ -1,48 +1,56 @@
<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 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>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import Swal from 'sweetalert2';
export class AllIndividusComponent implements OnInit {
individus: Individu[] = [];
permission: boolean;
index: number = 0;

constructor(
private individuService: IndividuService,
Expand All @@ -24,9 +25,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 sticky-top fixed">
<div class="card-header card-header-danger">
<h4 class="card-title">Modifier un individu</h4>
<div class="card-category">
<div class="card-header">
<a
class="btn btn-outline-info float-right"
routerLink="/admin/individu/get"
>Toutes les Individus</a
>Toutes les Individu</a
>
</div>
</div>
Expand Down Expand Up @@ -76,16 +76,15 @@ <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-info mt-3"
class="btn btn-outline-primary mt-3"
>
Modifier
</button>
</div>
</div>
</form>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,14 @@ <h4 class="card-title">Ajouter une entreprise</h4>
required
/>

<div class="form-group text-center">
<button
[disabled]="isSubmitting"
(click)="addEntreprise()"
type="button"
class=" btn btn-outline-info mt-3"
class="form-control 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,7 +73,6 @@ <h4 class="card-title">Modifier une entreprise</h4>
id="email"
/>

<div class="form-group text-center">
<button
[disabled]="isSubmitting"
(click)="editentreprise()"
Expand All @@ -82,7 +81,6 @@ <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,18 +2,21 @@
<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">
<div class="card">
<div class="card-header card-header-danger">
<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" style="max-height: 350px; overflow-y: auto;">
<table class="table">
<thead class="text-primary text-center">
<div class="table-responsive">
<table class="table text-center">
<thead class="text-primary">
<th>ID</th>
<th>Nom</th>
<th>Addresse</th>
Expand All @@ -22,7 +25,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 class="text-center">
<tbody>
<tr *ngFor="let entreprise of entreprises">
<td>{{ entreprise.id }}</td>
<td>{{ entreprise.nom }}</td>
Expand All @@ -31,19 +34,29 @@ <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 @@ -56,4 +69,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,12 +4,10 @@
<div class="col-md-12">
<div class="card">
<div class="card-header card-header-danger sticky-top fixed">
<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>
<h4 class="card-title d-inline-block">Ajouter Un Formateur</h4>
<button class="btn btn-success" routerLink="/admin/formateur/get" >
Liste Des Formateurs
</button>
</div>

<div class="card-body ">
Expand All @@ -18,8 +16,7 @@ <h4 class="card-title">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 @@ -30,26 +27,24 @@ <h4 class="card-title">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 btn-outline-info mt-3">
class="btn button-add mt-3">
Ajouter </button>
</div>
</div>
</form>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,39 @@
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="card" style="height: 460px;">
<div class="card" style="height: 430px;">
<div class="card-header card-header-danger sticky-top fixed">
<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>
<h4 class="card-title d-inline-block">Formator List</h4>
<button *ngIf="permission" class="btn btn-success" routerLink="/admin/formateur/add">
Ajouter Formateur
</button>
</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">
<table class="table" style="height: 400px;">
<thead class="text-primary fixed">
<th>ID</th>
<th>Name</th>
<th>Email</th>
<th>Competances</th>
<th>Remarques</th>
<th>Actions</th>
<th class="text-right" style="padding-right: 70px;">Actions</th>
</thead>
<tbody class="text-center">
<tbody>
<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-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
<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
</button>
</td>
</tr>
Expand Down
Loading

0 comments on commit 8ca9dff

Please sign in to comment.