Adapted front with back update

This commit is contained in:
2026-05-25 10:53:32 +01:00
parent b03196ce0f
commit d2ca8b1bf2
8 changed files with 12 additions and 16 deletions
@@ -8,7 +8,6 @@ import {QuotationForm} from "../quotation-form/quotation-form";
import {
GetQuotationDto,
GetQuotationProductDto,
QuotationproductsService,
QuotationsService
} from "../../services/api";
import {NzNotificationService} from "ng-zorro-antd/notification";
@@ -34,7 +33,6 @@ import {QuantityForm} from "../quantity-form/quantity-form";
export class QuotationTable implements OnInit {
private quotationsService = inject(QuotationsService);
private notificationService = inject(NzNotificationService);
private quotationProductsService = inject(QuotationproductsService)
private fileService = inject(FileService);
quotations = signal<GetQuotationDto[]>([]);
quotationsLoading = signal<boolean>(false);
@@ -114,7 +112,7 @@ export class QuotationTable implements OnInit {
async deleteProduct(productId: number, quotationId: number) {
this.quotationsLoading.set(true)
try {
await firstValueFrom(this.quotationProductsService.deleteQuotationProductEndpoint(productId, quotationId))
await firstValueFrom(this.quotationsService.deleteProductFromQuotationEndpoint(productId, quotationId))
this.notificationService.success(
'Success',
'Suppression effectuée'
@@ -140,7 +138,7 @@ export class QuotationTable implements OnInit {
try {
const quantity = updateQuantityComponent.quantityForm.getRawValue();
await firstValueFrom(this.quotationProductsService.patchQuotationProductQuantityEndpoint(productId, quotationId, quantity))
await firstValueFrom(this.quotationsService.patchQuotationProductQuantityEndpoint(productId, quotationId, quantity))
this.notificationService.success('Success', 'Quantité modifiée')
} catch (e) {