removed some unnecessary data
This commit is contained in:
@@ -1,16 +1,6 @@
|
||||
<form nz-form nzLayout="horizontal" [formGroup]="QuotationForm" (ngSubmit)="submitForm()">
|
||||
<nz-form-item nz-flex>
|
||||
<nz-form-label nzSpan="9" nzRequired>
|
||||
Quantité
|
||||
</nz-form-label>
|
||||
|
||||
<nz-form-control nzSpan="12" nzErrorTip="Ce champ est requis">
|
||||
<input nz-input type="number" placeholder="Quantité" formControlName="quantity">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item nz-flex>
|
||||
<nz-form-label nzSpan="9">
|
||||
ID Devis
|
||||
</nz-form-label>
|
||||
|
||||
@@ -30,7 +20,7 @@
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item nz-flex>
|
||||
<nz-form-label nzSpan="9">
|
||||
<nz-form-label nzSpan="9" nzRequired>
|
||||
Conditions de vente
|
||||
</nz-form-label>
|
||||
|
||||
@@ -40,112 +30,12 @@
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item nz-flex>
|
||||
<nz-form-label nzSpan="9">
|
||||
ID Produit
|
||||
<nz-form-label nzSpan="9" nzRequired>
|
||||
Fournisseur
|
||||
</nz-form-label>
|
||||
|
||||
<nz-form-control nzSpan="12">
|
||||
<input nz-input type="number" placeholder="ID Produit" formControlName="productId">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item nz-flex>
|
||||
<nz-form-label nzSpan="9">
|
||||
Référence produit
|
||||
</nz-form-label>
|
||||
|
||||
<nz-form-control nzSpan="12">
|
||||
<input nz-input type="number" placeholder="Référence produit" formControlName="productReferences">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item nz-flex>
|
||||
<nz-form-label nzSpan="9">
|
||||
Nom du produit
|
||||
</nz-form-label>
|
||||
|
||||
<nz-form-control nzSpan="12">
|
||||
<input nz-input placeholder="Nom du produit" formControlName="productName">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item nz-flex>
|
||||
<nz-form-label nzSpan="9">
|
||||
Durée produit
|
||||
</nz-form-label>
|
||||
|
||||
<nz-form-control nzSpan="12">
|
||||
<input nz-input type="number" placeholder="Durée produit" formControlName="productDuration">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item nz-flex>
|
||||
<nz-form-label nzSpan="9">
|
||||
Calibre produit
|
||||
</nz-form-label>
|
||||
|
||||
<nz-form-control nzSpan="12">
|
||||
<input nz-input type="number" placeholder="Calibre produit" formControlName="productCaliber">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item nz-flex>
|
||||
<nz-form-label nzSpan="9">
|
||||
Numéro d'approbation
|
||||
</nz-form-label>
|
||||
|
||||
<nz-form-control nzSpan="12">
|
||||
<input nz-input type="number" placeholder="Numéro d'approbation" formControlName="productApprovalNumber">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item nz-flex>
|
||||
<nz-form-label nzSpan="9">
|
||||
Poids produit
|
||||
</nz-form-label>
|
||||
|
||||
<nz-form-control nzSpan="12">
|
||||
<input nz-input type="number" placeholder="Poids produit" formControlName="productWeight">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item nz-flex>
|
||||
<nz-form-label nzSpan="9">
|
||||
NEC Produit
|
||||
</nz-form-label>
|
||||
|
||||
<nz-form-control nzSpan="12">
|
||||
<input nz-input type="number" placeholder="NEC Produit" formControlName="productNec">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item nz-flex>
|
||||
<nz-form-label nzSpan="9">
|
||||
Image produit
|
||||
</nz-form-label>
|
||||
|
||||
<nz-form-control nzSpan="12">
|
||||
<input nz-input placeholder="Image produit" formControlName="productImage">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item nz-flex>
|
||||
<nz-form-label nzSpan="9">
|
||||
Lien produit
|
||||
</nz-form-label>
|
||||
|
||||
<nz-form-control nzSpan="12">
|
||||
<input nz-input placeholder="Lien produit" formControlName="productLink">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item nz-flex>
|
||||
<nz-form-label nzSpan="9">
|
||||
Quantité minimale
|
||||
</nz-form-label>
|
||||
|
||||
<nz-form-control nzSpan="12">
|
||||
<input nz-input type="number" placeholder="Quantité minimale" formControlName="productMinimalQuantity">
|
||||
<input nz-input placeholder="Fournisseur" formControlName="quotationProvider">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</form>
|
||||
|
||||
@@ -16,29 +16,16 @@ import {NzDatePickerComponent} from "ng-zorro-antd/date-picker";
|
||||
NzColDirective,
|
||||
NzFlexDirective,
|
||||
NzFormDirective,
|
||||
ReactiveFormsModule,
|
||||
NzDatePickerComponent
|
||||
ReactiveFormsModule
|
||||
],
|
||||
templateUrl: './quotation-form.html',
|
||||
styleUrl: './quotation-form.css',
|
||||
})
|
||||
export class QuotationForm {
|
||||
QuotationForm: FormGroup = new FormGroup({
|
||||
quantity: new FormControl<number>(null, [Validators.required]),
|
||||
quotationId: new FormControl<number>(null),
|
||||
quotationMessage: new FormControl<string>(null),
|
||||
quotationConditionsSale: new FormControl<string>(null),
|
||||
productId: new FormControl<number>(null),
|
||||
productReferences: new FormControl<number>(null),
|
||||
productName: new FormControl<string>(null),
|
||||
productDuration: new FormControl<number>(null),
|
||||
productCaliber: new FormControl<number>(null),
|
||||
productApprovalNumber: new FormControl<number>(null),
|
||||
productWeight: new FormControl<number>(null),
|
||||
productNec: new FormControl<number>(null),
|
||||
productImage: new FormControl<string>(null),
|
||||
productLink: new FormControl<string>(null),
|
||||
productMinimalQuantity: new FormControl<number>(null)
|
||||
})
|
||||
|
||||
submitForm() {
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
<nz-table #basicTable [nzData]="quotations" class="mr-7">
|
||||
<thead>
|
||||
<tr class="text-center">
|
||||
<th>ID Devis</th>
|
||||
<th>Nom du produit</th>
|
||||
<th>Quantité</th>
|
||||
<th>Numéro de Devis</th>
|
||||
<th>Message</th>
|
||||
<th>Conditions de vente</th>
|
||||
<th>Détails produit</th>
|
||||
<th>Fournisseur</th>
|
||||
<th>Produit</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead >
|
||||
@@ -14,27 +13,31 @@
|
||||
@for (data of basicTable.data; track data) {
|
||||
<tr>
|
||||
<td>{{data.quotationId}}</td>
|
||||
<td>{{data.productName}}</td>
|
||||
<td>{{data.quantity}}</td>
|
||||
<td>{{data.quotationMessage}}</td>
|
||||
<td>{{data.quotationConditionsSale}}</td>
|
||||
<td>{{data.Supplier}}</td>
|
||||
|
||||
|
||||
<td>
|
||||
<app-modal-button type="link" name="Voir détails">
|
||||
<app-modal-button type="link" name="Voir les produits">
|
||||
<div style="max-height: 400px; overflow-y: auto;">
|
||||
<table style="width: 100%; text-align: left;">
|
||||
<tbody>
|
||||
<tr><th style="padding: 8px; font-weight: 600;">ID Produit:</th><td style="padding: 8px;">{{data.productId}}</td></tr>
|
||||
<tr><th style="padding: 8px; font-weight: 600;">Référence:</th><td style="padding: 8px;">{{data.productReferences}}</td></tr>
|
||||
<tr><th style="padding: 8px; font-weight: 600;">Durée:</th><td style="padding: 8px;">{{data.productDuration}}</td></tr>
|
||||
<tr><th style="padding: 8px; font-weight: 600;">Calibre:</th><td style="padding: 8px;">{{data.productCaliber}}</td></tr>
|
||||
<tr><th style="padding: 8px; font-weight: 600;">Numéro d'approbation:</th><td style="padding: 8px;">{{data.productApprovalNumber}}</td></tr>
|
||||
<tr><th style="padding: 8px; font-weight: 600;">Poids:</th><td style="padding: 8px;">{{data.productWeight}}</td></tr>
|
||||
<tr><th style="padding: 8px; font-weight: 600;">NEC:</th><td style="padding: 8px;">{{data.productNec}}</td></tr>
|
||||
<tr><th style="padding: 8px; font-weight: 600;">Quantité min:</th><td style="padding: 8px;">{{data.productMinimalQuantity}}</td></tr>
|
||||
<tr><th style="padding: 8px; font-weight: 600;">Image:</th><td style="padding: 8px;">{{data.productImage}}</td></tr>
|
||||
<tr><th style="padding: 8px; font-weight: 600;">Lien:</th><td style="padding: 8px;">{{data.productLink}}</td></tr>
|
||||
<nz-table>
|
||||
<thead>
|
||||
<tr class="text-center">
|
||||
<th>Réference</th>
|
||||
<th>Nom</th>
|
||||
<th>Quantité</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="text-center">
|
||||
<tr>
|
||||
<td>{{data.quotationProductReference}}</td>
|
||||
<td>{{data.quotationProductName}}</td>
|
||||
<td>{{data.quotationProductQuantity}}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</nz-table>
|
||||
</div>
|
||||
</app-modal-button>
|
||||
</td>
|
||||
|
||||
@@ -7,21 +7,13 @@ import {NzIconDirective} from "ng-zorro-antd/icon";
|
||||
import {QuotationForm} from "../quotation-form/quotation-form";
|
||||
|
||||
interface QuotationInfo {
|
||||
quantity: number;
|
||||
quotationId: number;
|
||||
quotationMessage?: string;
|
||||
quotationConditionsSale?: string;
|
||||
productId: number;
|
||||
productReferences: number;
|
||||
productName?: string;
|
||||
productDuration: number;
|
||||
productCaliber: number;
|
||||
productApprovalNumber: number;
|
||||
productWeight: number;
|
||||
productNec: number;
|
||||
productImage?: string;
|
||||
productLink?: string;
|
||||
productMinimalQuantity: number;
|
||||
quotationProductReference: string;
|
||||
quotationProductName: string;
|
||||
quotationProductQuantity?: number;
|
||||
Supplier?: string;
|
||||
}
|
||||
|
||||
@Component({
|
||||
@@ -41,55 +33,31 @@ interface QuotationInfo {
|
||||
export class QuotationTable {
|
||||
quotations: QuotationInfo[] = [
|
||||
{
|
||||
quantity: 10,
|
||||
quotationId: 101,
|
||||
quotationMessage: 'Livraison urgente demandée',
|
||||
quotationConditionsSale: 'Paiement à 30 jours',
|
||||
productId: 5001,
|
||||
productReferences: 123456,
|
||||
productName: 'Feu d\'artifice A',
|
||||
productDuration: 45.5,
|
||||
productCaliber: 30,
|
||||
productApprovalNumber: 998877,
|
||||
productWeight: 1.5,
|
||||
productNec: 0.5,
|
||||
productImage: 'url_to_image_a',
|
||||
productLink: 'http://example.com/product/a',
|
||||
productMinimalQuantity: 5
|
||||
quotationProductReference: 'DLV-1000',
|
||||
quotationProductName: 'Produit1',
|
||||
quotationProductQuantity: 5,
|
||||
Supplier: 'fireworkssupplier&Co'
|
||||
},
|
||||
{
|
||||
quantity: 20,
|
||||
quotationId: 102,
|
||||
quotationMessage: 'Livraison standard',
|
||||
quotationConditionsSale: 'Payé d\'avance',
|
||||
productId: 5002,
|
||||
productReferences: 654321,
|
||||
productName: 'Feu d\'artifice B',
|
||||
productDuration: 60.0,
|
||||
productCaliber: 50,
|
||||
productApprovalNumber: 112233,
|
||||
productWeight: 2.0,
|
||||
productNec: 0.8,
|
||||
productImage: 'url_to_image_b',
|
||||
productLink: 'http://example.com/product/b',
|
||||
productMinimalQuantity: 10
|
||||
quotationProductReference: 'DLV-1001',
|
||||
quotationProductName: 'Produit2',
|
||||
quotationProductQuantity: 6,
|
||||
Supplier: 'fireworkssupplier&Co'
|
||||
},
|
||||
{
|
||||
quantity: 5,
|
||||
quotationId: 103,
|
||||
quotationMessage: null,
|
||||
quotationMessage: 'Livraison rapide',
|
||||
quotationConditionsSale: 'Paiement à 15 jours',
|
||||
productId: 5003,
|
||||
productReferences: 789012,
|
||||
productName: 'Feu d\'artifice C',
|
||||
productDuration: 30.0,
|
||||
productCaliber: 25,
|
||||
productApprovalNumber: 445566,
|
||||
productWeight: 1.0,
|
||||
productNec: 0.3,
|
||||
productImage: null,
|
||||
productLink: null,
|
||||
productMinimalQuantity: 1
|
||||
quotationProductReference: 'DLV-1002',
|
||||
quotationProductName: 'Produit3',
|
||||
quotationProductQuantity: 7,
|
||||
Supplier: 'fireworkssupplier&Co'
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
@@ -9,9 +9,7 @@ import {QuotationTable} from "../../components/quotation-table/quotation-table";
|
||||
@Component({
|
||||
selector: 'app-quotation',
|
||||
imports: [
|
||||
DelivereryNoteTable,
|
||||
ModalButton,
|
||||
DelivereryNoteForm,
|
||||
Search,
|
||||
QuotationForm,
|
||||
QuotationTable
|
||||
|
||||
Reference in New Issue
Block a user