updated supplier page
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {Component, inject, signal, viewChild} from '@angular/core';
|
||||
import {Component, inject, OnInit, signal, viewChild} from '@angular/core';
|
||||
import {ModalNav} from "../modal-nav/modal-nav";
|
||||
import {NzDividerComponent} from "ng-zorro-antd/divider";
|
||||
import {NzIconDirective} from "ng-zorro-antd/icon";
|
||||
@@ -8,7 +8,6 @@ import {SupplierForm} from "../supplier-form/supplier-form";
|
||||
import {GetSupplierDto, SuppliersService} from "../../services/api";
|
||||
import {NzNotificationService} from "ng-zorro-antd/notification";
|
||||
import {firstValueFrom} from "rxjs";
|
||||
import {format} from "date-fns";
|
||||
|
||||
@Component({
|
||||
selector: 'app-supplier-table',
|
||||
@@ -24,7 +23,7 @@ import {format} from "date-fns";
|
||||
styleUrl: './supplier-table.css',
|
||||
})
|
||||
|
||||
export class SupplierTable {
|
||||
export class SupplierTable implements OnInit {
|
||||
private suppliersService = inject(SuppliersService);
|
||||
private notificationService = inject(NzNotificationService)
|
||||
suppliers = signal<GetSupplierDto[]>([]);
|
||||
@@ -87,6 +86,7 @@ export class SupplierTable {
|
||||
'Fournisseur modifié'
|
||||
)
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
this.notificationService.error(
|
||||
'Erreur',
|
||||
'Erreur lors de la modification'
|
||||
|
||||
Reference in New Issue
Block a user