added loading function

This commit is contained in:
2025-12-04 17:45:20 +01:00
parent 41bfc9b8ae
commit f812ce856c
3 changed files with 14 additions and 4 deletions

View File

@@ -51,6 +51,7 @@ export class QuotationTable implements OnInit {
}
async delete(quotation:number) {
this.quotationsLoading.set(true)
try {
await firstValueFrom(this.quotationsService.deleteQuotationEndpoint(quotation))
this.notificationService.success(
@@ -63,10 +64,12 @@ export class QuotationTable implements OnInit {
'Impossible de supprimer la ligne'
)
}
this.quotationsLoading.set(false)
await this.fetchQuotations();
}
async export(quotationId: number){
this.quotationsLoading.set(true)
try {
const pdf = await firstValueFrom(
this.quotationsService.getQuotationPdfEndpoint(quotationId, "response")
@@ -79,6 +82,7 @@ export class QuotationTable implements OnInit {
'Impossible de générer un PDF'
);
}
this.quotationsLoading.set(false)
}
}