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

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

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

Loading…
Cancel
Save