From 6dbcff72712db5821617d73399a56f6d879adb02 Mon Sep 17 00:00:00 2001 From: Cyril Joseph Date: Tue, 19 Aug 2025 10:33:03 -0300 Subject: [PATCH] print and param updates --- .../core/services/carnet/carnet.service.ts | 8 +++--- src/app/home/home.component.html | 2 +- src/app/home/home.component.ts | 26 ++++++++++++++++--- .../manage-country.component.ts | 6 ++--- 4 files changed, 31 insertions(+), 11 deletions(-) diff --git a/src/app/core/services/carnet/carnet.service.ts b/src/app/core/services/carnet/carnet.service.ts index a39e4aa..642dba9 100644 --- a/src/app/core/services/carnet/carnet.service.ts +++ b/src/app/core/services/carnet/carnet.service.ts @@ -71,7 +71,9 @@ export class CarnetService { P_HEADERID: headerid, P_PRINTGL: 'N' } - return this.http.post(`${this.apiUrl}/${this.apiDb}/PrintCarnet`, data); + return this.http.post(`${this.apiUrl}/${this.apiDb}/PrintCarnet`, data, { + responseType: 'blob', // Important: Set responseType to 'blob' + }); } printGeneralList(headerid: number): Observable { @@ -89,9 +91,7 @@ export class CarnetService { P_USERID: this.userService.getUser(), P_CARNETNO: carnetNumber } - return this.http.patch(`${this.apiUrl}/${this.apiDb}/DuplicateCarnet`, data, { - responseType: 'blob', // Important: Set responseType to 'blob' - }); + return this.http.patch(`${this.apiUrl}/${this.apiDb}/DuplicateCarnet`, data); } extendCarnet(carnetNumber: string): Observable { diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html index 5a0636e..6ad6ba7 100644 --- a/src/app/home/home.component.html +++ b/src/app/home/home.component.html @@ -116,7 +116,7 @@ print Print GL -