import {Component, output} from '@angular/core'; import {NzMessageService} from "ng-zorro-antd/message"; import {NzButtonModule} from "ng-zorro-antd/button"; import {NzModalModule} from "ng-zorro-antd/modal"; import {ProvidersAddForm} from "../../providers/providers-add-form/providers-add-form"; import {CustomersAddForm} from "../customers-add-form/customers-add-form"; @Component({ selector: 'app-create-customers-modal', imports: [NzButtonModule, NzModalModule, CustomersAddForm], template: ` Création de clients `, styleUrl: './customers-card-form.css', }) export class CustomersCardForm { constructor(private message: NzMessageService) {} isVisible = false; isConfirmLoading = false; showModal(): void { this.isVisible = true; } handleOk(): void { this.isConfirmLoading = true; this.message.success('Client créé !'); setTimeout(() => { this.isVisible = false; this.isConfirmLoading = false; }, 300); this.triggerCreated.emit(); } handleCancel(): void { this.isVisible = false; this.message.info('Création annulée'); } triggerCreated = output() }