updated modal-button for choice between all types of button at the initialization of the modal

This commit is contained in:
2025-11-15 19:15:16 +01:00
parent 8866c84618
commit c42b8d82e4
7 changed files with 7 additions and 7 deletions

View File

@@ -11,7 +11,7 @@
<tr> <tr>
<td>{{data.transporter}}</td> <td>{{data.transporter}}</td>
<td> <td>
<app-modal-button name="Voir tout les bons de livraison"> <app-modal-button type="link" name="Voir tout les bons de livraison">
<div style="max-height: 400px; overflow-y: auto;"> <div style="max-height: 400px; overflow-y: auto;">
<nz-table [nzData]="data.deliveryNote"> <nz-table [nzData]="data.deliveryNote">
<thead> <thead>

View File

@@ -19,7 +19,7 @@
<td>{{data.estimateDeliveryDate | date: 'dd/MM/yyyy'}}</td> <td>{{data.estimateDeliveryDate | date: 'dd/MM/yyyy'}}</td>
<td>{{data.realDeliveryDate | date: 'dd/MM/yyyy'}}</td> <td>{{data.realDeliveryDate | date: 'dd/MM/yyyy'}}</td>
<td> <td>
<app-modal-button name="Voir les produits"> <app-modal-button type="link" name="Voir les produits">
<div style="max-height: 400px; overflow-y: auto;"> <div style="max-height: 400px; overflow-y: auto;">
<nz-table [nzData]="data.productDelivery"> <nz-table [nzData]="data.productDelivery">
<thead> <thead>

View File

@@ -1,4 +1,4 @@
<button nz-button nzType="primary" (click)="showModal()">{{name()}}</button> <button nz-button [nzType]="type()" (click)="showModal()">{{name()}}</button>
<ng-template #modalContent> <ng-template #modalContent>
<ng-content></ng-content> <ng-content></ng-content>

View File

@@ -1,5 +1,4 @@
import {Component, input, Input} from '@angular/core'; import {Component, input, Input} from '@angular/core';
import {NzIconDirective} from "ng-zorro-antd/icon";
import {NzModalComponent} from "ng-zorro-antd/modal"; import {NzModalComponent} from "ng-zorro-antd/modal";
import {NzButtonComponent} from "ng-zorro-antd/button"; import {NzButtonComponent} from "ng-zorro-antd/button";
@@ -15,6 +14,7 @@ import {NzButtonComponent} from "ng-zorro-antd/button";
export class ModalButton { export class ModalButton {
name = input.required<string>() name = input.required<string>()
type = input<"primary" | "default" | "dashed" | "link" | "text">()
isVisible = false; isVisible = false;
isOkLoading = false; isOkLoading = false;

View File

@@ -1,4 +1,4 @@
<app-modal-button name="Ajouter un transporteur"> <app-modal-button type="primary" name="Ajouter un transporteur">
<app-deliverer-form></app-deliverer-form> <app-deliverer-form></app-deliverer-form>
</app-modal-button> </app-modal-button>

View File

@@ -1,4 +1,4 @@
<app-modal-button name="Créer un devis"> <app-modal-button type="primary" name="Créer un devis">
<app-deliverery-note-form></app-deliverery-note-form> <app-deliverery-note-form></app-deliverery-note-form>
</app-modal-button> </app-modal-button>
<div class="mt-4"> <div class="mt-4">

View File

@@ -1,4 +1,4 @@
<app-modal-button name="Ajouter un utilisateur"> <app-modal-button type="primary" name="Ajouter un utilisateur">
<app-profil-form></app-profil-form> <app-profil-form></app-profil-form>
</app-modal-button> </app-modal-button>