added loading function
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user