optimisation business units

pull/20/head
Clement FERRERE 2 years ago
parent ddf97d9cd0
commit 0f01fc486b
  1. 4
      src/app/components/businessunit/businessunit-edit/businessunit-edit.component.html
  2. 1
      src/app/components/businessunit/businessunit-edit/businessunit-edit.component.ts
  3. 4
      src/app/components/businessunit/businessunit.component.html

@ -1,11 +1,9 @@
<div *ngIf="businessunit"> <div *ngIf="businessunit">
<h2>{{bu.name | uppercase}} </h2> <h2>{{bu.name | uppercase}} </h2>
<div><span>id : </span>{{bu.id}}</div>
<form <form
(ngSubmit)="onSubmit()" (ngSubmit)="onSubmit()"
*ngIf="businessunit | async;"
[formGroup]="registerForm"> [formGroup]="registerForm">
<div class="form-group col-12 col-sm-6 col-md-4 col-lg-3 mb-2"> <div class="form-group col-12 col-sm-6 col-md-4 col-lg-3 mb-2">
@ -18,7 +16,7 @@
<div> <div>
<button type="submit">Sauvegarder les changements</button> <button type="submit">Sauvegarder les changements</button>
<button (click)="onReset()" type="reset">Effacer</button> <button type="reset">Effacer</button>
<button (click)="goBack()">Retour</button> <button (click)="goBack()">Retour</button>
</div> </div>
</form> </form>

@ -55,7 +55,6 @@ export class BusinessunitEditComponent implements OnInit {
this.businessunitService.updateBusinessunit(this.bu, this.id) this.businessunitService.updateBusinessunit(this.bu, this.id)
.subscribe(() => { .subscribe(() => {
this.showSuccess(); this.showSuccess();
this.goBack();
}, },
() => { () => {
this.showError() this.showError()

@ -24,14 +24,12 @@
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
<th scope="col">ID</th>
<th scope="col">Nom</th> <th scope="col">Nom</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let businessunit of businessunits"> <tr *ngFor="let businessunit of businessunits">
<th scope="row">{{businessunit.id}}</th> <th scope="row">{{businessunit.name}}</th>
<td> {{businessunit.name}} </td>
<td><a routerLink="{{businessunit.id}}"> Modifier </a></td> <td><a routerLink="{{businessunit.id}}"> Modifier </a></td>
</tr> </tr>
</tbody> </tbody>

Loading…
Cancel
Save