Compare commits
3 Commits
e1d85fc49e
...
6235df5482
| Author | SHA1 | Date | |
|---|---|---|---|
| 6235df5482 | |||
| cbf01acb99 | |||
| 043899db3f |
@@ -1 +1 @@
|
||||
<p>customers works!</p>
|
||||
<app-customers-card-form/>
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import { Component } from '@angular/core';
|
||||
import {CustomersCardForm} from "./customers-card-form/customers-card-form";
|
||||
|
||||
@Component({
|
||||
selector: 'app-customers',
|
||||
imports: [],
|
||||
imports: [
|
||||
CustomersCardForm
|
||||
],
|
||||
templateUrl: './customers.html',
|
||||
styleUrl: './customers.css',
|
||||
})
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
.ant-modal-content {
|
||||
background: #272727;
|
||||
}
|
||||
@@ -1,11 +1,56 @@
|
||||
import { Component } from '@angular/core';
|
||||
import {NzModalComponent, NzModalModule} from "ng-zorro-antd/modal";
|
||||
import {NzButtonComponent, NzButtonModule} from "ng-zorro-antd/button";
|
||||
import {NzMessageService} from "ng-zorro-antd/message";
|
||||
import {ProvidersAddForm} from "../providers-add-form/providers-add-form";
|
||||
|
||||
@Component({
|
||||
selector: 'app-providers-card-form',
|
||||
imports: [],
|
||||
templateUrl: './providers-card-form.html',
|
||||
imports: [NzButtonModule, NzModalModule, ProvidersAddForm],
|
||||
template: `
|
||||
<button nz-button nzType="primary" (click)="showModal()">
|
||||
<span style="font-weight: bold">+</span>
|
||||
</button>
|
||||
<nz-modal
|
||||
[(nzVisible)]="isVisible"
|
||||
[nzTitle]="modalTitle"
|
||||
[nzContent]="modalContent"
|
||||
[nzFooter]="modalFooter"
|
||||
(nzOnCancel)="handleCancel()"
|
||||
>
|
||||
<ng-template #modalTitle>Création de prestataires</ng-template>
|
||||
|
||||
<ng-template #modalContent>
|
||||
<app-providers-add-form/>
|
||||
</ng-template>
|
||||
|
||||
<ng-template #modalFooter>
|
||||
<button nz-button nzType="default" (click)="handleCancel()">Annuler</button>
|
||||
<button nz-button nzType="primary" (click)="handleOk()" [nzLoading]="isConfirmLoading">Confirmer</button>
|
||||
</ng-template>
|
||||
</nz-modal>
|
||||
`,
|
||||
styleUrl: './providers-card-form.css',
|
||||
})
|
||||
export class ProvidersCardForm {
|
||||
constructor(private message: NzMessageService) {}
|
||||
isVisible = false;
|
||||
isConfirmLoading = false;
|
||||
|
||||
showModal(): void {
|
||||
this.isVisible = true;
|
||||
}
|
||||
|
||||
handleOk(): void {
|
||||
this.isConfirmLoading = true;
|
||||
this.message.success('Prestataire créé !');
|
||||
setTimeout(() => {
|
||||
this.isVisible = false;
|
||||
this.isConfirmLoading = false;
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
handleCancel(): void {
|
||||
this.isVisible = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
<p>providers-card works!</p>
|
||||
<app-providers-card-form/>
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { Component } from '@angular/core';
|
||||
import {ProvidersCardForm} from "../providers-card-form/providers-card-form";
|
||||
|
||||
@Component({
|
||||
selector: 'app-providers-card',
|
||||
imports: [],
|
||||
imports: [ProvidersCardForm],
|
||||
templateUrl: './providers-card.html',
|
||||
styleUrl: './providers-card.css',
|
||||
})
|
||||
|
||||
@@ -1 +1 @@
|
||||
<app-providers-card-form></app-providers-card-form>
|
||||
<app-providers-card-form/>
|
||||
@@ -1 +1 @@
|
||||
<p>staff works!</p>
|
||||
<app-staff-card-form/>
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import { Component } from '@angular/core';
|
||||
import {StaffCardForm} from "./staff-card-form/staff-card-form";
|
||||
|
||||
@Component({
|
||||
selector: 'app-staff',
|
||||
imports: [],
|
||||
imports: [
|
||||
StaffCardForm
|
||||
],
|
||||
templateUrl: './staff.html',
|
||||
styleUrl: './staff.css',
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user