fixed errors of price view in supplier page

This commit is contained in:
2025-11-30 15:47:43 +01:00
parent 1c8be0a261
commit b4aaa18103
4 changed files with 16 additions and 14 deletions

View File

@@ -26,21 +26,21 @@
<td>{{ supplier.deliveryDelay }} jours</td> <td>{{ supplier.deliveryDelay }} jours</td>
<td> <td>
<app-modal-button type="link" [name]="'Voir les produits'"> <app-modal-button type="link" [name]="'Voir les produits'">
<nz-table [nzData]="supplier.products" [nzFrontPagination]="false"> <nz-table [nzData]="suppliers()"
[nzFrontPagination]="false">
<thead> <thead>
<tr style="text-align: center"> <tr style="text-align: center">
<th>Produits</th> <th>Produit</th>
<th>Nom</th>
<th>Référence</th> <th>Référence</th>
<th>Prix</th> <th>Prix</th>
</tr> </tr>
</thead> </thead>
<tbody style="text-align: center"> <tbody style="text-align: center">
@for (product of supplier.products; track product.id) { @for (product of supplier.prices; track product.id) {
<tr> <tr>
<td>{{ product.name }}</td> <td>{{ product.productName }}</td>
<td>{{ product.references }}</td> <td>{{ product.productReferences }}</td>
<td>Price ???</td> <td>{{ product.sellingPrice }}€</td>
</tr> </tr>
} }
</tbody> </tbody>

View File

@@ -5,7 +5,7 @@ import {NzIconDirective} from "ng-zorro-antd/icon";
import {NzTableComponent} from "ng-zorro-antd/table"; import {NzTableComponent} from "ng-zorro-antd/table";
import {ModalButton} from "../modal-button/modal-button"; import {ModalButton} from "../modal-button/modal-button";
import {SupplierForm} from "../supplier-form/supplier-form"; import {SupplierForm} from "../supplier-form/supplier-form";
import {GetSupplierDto, SuppliersService} from "../../services/api"; import {GetPriceDto, GetSupplierDto, SuppliersService} from "../../services/api";
import {NzNotificationService} from "ng-zorro-antd/notification"; import {NzNotificationService} from "ng-zorro-antd/notification";
import {firstValueFrom} from "rxjs"; import {firstValueFrom} from "rxjs";

View File

@@ -17,7 +17,7 @@ export interface GetPriceDto {
supplierEmail?: string | null; supplierEmail?: string | null;
supplierPhone?: string | null; supplierPhone?: string | null;
supplierAddress?: string | null; supplierAddress?: string | null;
supplierZipCode?: number; supplierZipCode?: string | null;
supplierCity?: string | null; supplierCity?: string | null;
supplierDeliveryDelay?: number; supplierDeliveryDelay?: number;
productId?: number; productId?: number;
@@ -25,7 +25,7 @@ export interface GetPriceDto {
productName?: string | null; productName?: string | null;
productDuration?: number; productDuration?: number;
productCaliber?: number; productCaliber?: number;
productApprovalNumber?: number; productApprovalNumber?: string | null;
productWeight?: number; productWeight?: number;
productNec?: number; productNec?: number;
productImage?: string | null; productImage?: string | null;

View File

@@ -7,6 +7,7 @@
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
import { GetPriceDto } from './get-price-dto';
import { GetProductDto } from './get-product-dto'; import { GetProductDto } from './get-product-dto';
@@ -20,5 +21,6 @@ export interface GetSupplierDto {
city?: string | null; city?: string | null;
deliveryDelay?: number; deliveryDelay?: number;
products?: Array<GetProductDto> | null; products?: Array<GetProductDto> | null;
prices?: Array<GetPriceDto> | null;
} }