diff --git a/src/app/components/product-table/product-table.css b/src/app/components/product-table/product-table.css deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/components/product-table/product-table.html b/src/app/components/product-table/product-table.html deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/components/product-table/product-table.ts b/src/app/components/product-table/product-table.ts deleted file mode 100644 index b5d283e..0000000 --- a/src/app/components/product-table/product-table.ts +++ /dev/null @@ -1,10 +0,0 @@ -import {Component} from '@angular/core'; - -@Component({ - selector: 'app-product-table', - imports: [], - templateUrl: './product-table.html', - styleUrl: './product-table.css', -}) -export class ProductTable { -} diff --git a/src/app/components/purchase-order-table/purchase-order-table.html b/src/app/components/purchase-order-table/purchase-order-table.html index 55a6d49..7e08ab4 100644 --- a/src/app/components/purchase-order-table/purchase-order-table.html +++ b/src/app/components/purchase-order-table/purchase-order-table.html @@ -16,7 +16,7 @@ {{ purchaseOrder.id }} {{ purchaseOrder.purchaseConditions }} - Fournisseur ??? + {{ purchaseOrder.supplierName }}
@@ -36,7 +36,7 @@ {{ product.productName }} {{ product.productReference }} - {{ product.productPrice }} + {{ product.productPrice }} € {{ product.quantity }}
diff --git a/src/app/components/quotation-table/quotation-table.html b/src/app/components/quotation-table/quotation-table.html index 0591d24..37da021 100644 --- a/src/app/components/quotation-table/quotation-table.html +++ b/src/app/components/quotation-table/quotation-table.html @@ -36,7 +36,7 @@ {{ product.productReference }} {{ product.productName }} - Price ??? + {{ product.productPrice }} € {{ product.quantity }}
diff --git a/src/app/pages/stock/stock.ts b/src/app/pages/stock/stock.ts index 0a0096b..9107402 100644 --- a/src/app/pages/stock/stock.ts +++ b/src/app/pages/stock/stock.ts @@ -2,7 +2,6 @@ import {Component, inject, viewChild} from '@angular/core'; import {StockTable} from "../../components/stock-table/stock-table"; import {Search} from "../../components/search/search"; import {ModalButton} from "../../components/modal-button/modal-button"; -import {QuotationForm} from "../../components/quotation-form/quotation-form"; import {PurchaseordersService, QuotationsService} from "../../services/api"; import {NzNotificationService} from "ng-zorro-antd/notification"; import {firstValueFrom} from "rxjs"; @@ -113,12 +112,14 @@ export class Stock { ); this.notificationService.success('Succès', 'Devis créé'); } catch (e) { + console.log(this.createQuotation()); this.notificationService.error('Erreur', 'Erreur lors de la création du devis.'); } } async onModalQuotationOk() { + console.log(this.createQuotation().createQuotationForm.getRawValue()); await this.addQuotation(); this.createQuotation().createQuotationForm.reset(); this.modalButtonQuotation().isVisible = false; diff --git a/src/app/services/api/README.md b/src/app/services/api/README.md index 4d71313..29f22fe 100644 --- a/src/app/services/api/README.md +++ b/src/app/services/api/README.md @@ -59,9 +59,9 @@ In your Angular project: ```typescript -import {ApplicationConfig} from '@angular/core'; -import {provideHttpClient} from '@angular/common/http'; -import {provideApi} from ''; +import { ApplicationConfig } from '@angular/core'; +import { provideHttpClient } from '@angular/common/http'; +import { provideApi } from ''; export const appConfig: ApplicationConfig = { providers: [ diff --git a/src/app/services/api/model/get-purchase-order-dto.ts b/src/app/services/api/model/get-purchase-order-dto.ts index d10815a..7885bc4 100644 --- a/src/app/services/api/model/get-purchase-order-dto.ts +++ b/src/app/services/api/model/get-purchase-order-dto.ts @@ -13,7 +13,7 @@ import {GetPurchaseProductDto} from './get-purchase-product-dto'; export interface GetPurchaseOrderDto { id?: number; purchaseConditions?: string | null; - supplierId?: number; + supplierName?: string | null; products?: Array | null; } diff --git a/src/app/services/api/model/get-quotation-product-dto.ts b/src/app/services/api/model/get-quotation-product-dto.ts index b60dab7..c6eb321 100644 --- a/src/app/services/api/model/get-quotation-product-dto.ts +++ b/src/app/services/api/model/get-quotation-product-dto.ts @@ -22,6 +22,7 @@ export interface GetQuotationProductDto { productImage?: string | null; productLink?: string | null; productMinimalQuantity?: number; + productPrice?: number; quotationId?: number; }