From 92ff5a97576a20cf588147e2d4fdc7641dc2e788 Mon Sep 17 00:00:00 2001 From: Andrew Boni Signori Date: Tue, 4 Feb 2025 16:32:11 -0800 Subject: [PATCH] Adjust report batch method names --- .../cas-invoice-batch/cas-invoice-batch.aest.controller.ts | 4 ++-- .../cas-invoice-batch/cas-invoice-batch-report.service.ts | 2 +- sources/packages/web/src/services/CASInvoiceBatchService.ts | 4 ++-- sources/packages/web/src/services/http/CASInvoiceBatchApi.ts | 2 +- sources/packages/web/src/views/aest/CASInvoices.vue | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sources/packages/backend/apps/api/src/route-controllers/cas-invoice-batch/cas-invoice-batch.aest.controller.ts b/sources/packages/backend/apps/api/src/route-controllers/cas-invoice-batch/cas-invoice-batch.aest.controller.ts index fc351b9bd4..c1d16a8be2 100644 --- a/sources/packages/backend/apps/api/src/route-controllers/cas-invoice-batch/cas-invoice-batch.aest.controller.ts +++ b/sources/packages/backend/apps/api/src/route-controllers/cas-invoice-batch/cas-invoice-batch.aest.controller.ts @@ -77,13 +77,13 @@ export class CASInvoiceBatchAESTController extends BaseController { */ @Get(":casInvoiceBatchId/report") @ApiNotFoundResponse({ description: "CAS invoice batch not found." }) - async getInvoiceBatchesReport( + async getCASInvoiceBatchReport( @Param("casInvoiceBatchId", ParseIntPipe) casInvoiceBatchId: number, @Res() response: Response, ): Promise { try { const invoiceReport = - await this.casInvoiceBatchReportService.getCASInvoiceBatchesReport( + await this.casInvoiceBatchReportService.getCASInvoiceBatchReport( casInvoiceBatchId, ); const batchDate = getFileNameAsCurrentTimestamp(invoiceReport.batchDate); diff --git a/sources/packages/backend/apps/api/src/services/cas-invoice-batch/cas-invoice-batch-report.service.ts b/sources/packages/backend/apps/api/src/services/cas-invoice-batch/cas-invoice-batch-report.service.ts index cbc6befc18..25aa36c0d8 100644 --- a/sources/packages/backend/apps/api/src/services/cas-invoice-batch/cas-invoice-batch-report.service.ts +++ b/sources/packages/backend/apps/api/src/services/cas-invoice-batch/cas-invoice-batch-report.service.ts @@ -24,7 +24,7 @@ export class CASInvoiceBatchReportService { * @returns an object containing batch data and a CSV formatted string * data for the specified invoice batch. */ - async getCASInvoiceBatchesReport( + async getCASInvoiceBatchReport( invoiceBatchId: number, ): Promise { const reportData = await this.getCASInvoiceBatchesReportData( diff --git a/sources/packages/web/src/services/CASInvoiceBatchService.ts b/sources/packages/web/src/services/CASInvoiceBatchService.ts index 1906075577..13592a2c5d 100644 --- a/sources/packages/web/src/services/CASInvoiceBatchService.ts +++ b/sources/packages/web/src/services/CASInvoiceBatchService.ts @@ -32,10 +32,10 @@ export class CASInvoiceBatchService { * to support the batch approval and allow invoices to be sent to CAS. * @param casInvoiceBatchId batch ID to have the report generated for. */ - async downloadCASInvoiceBatchesReport( + async downloadCASInvoiceBatchReport( casInvoiceBatchId: number, ): Promise { - const file = await ApiClient.CASInvoiceBatchApi.getInvoiceBatchesReport( + const file = await ApiClient.CASInvoiceBatchApi.getCASInvoiceBatchReport( casInvoiceBatchId, ); const { downloadFileAsBlob } = useFileUtils(); diff --git a/sources/packages/web/src/services/http/CASInvoiceBatchApi.ts b/sources/packages/web/src/services/http/CASInvoiceBatchApi.ts index 90e5cbd485..32a20a63ea 100644 --- a/sources/packages/web/src/services/http/CASInvoiceBatchApi.ts +++ b/sources/packages/web/src/services/http/CASInvoiceBatchApi.ts @@ -32,7 +32,7 @@ export class CASInvoiceBatchApi extends HttpBaseClient { * @param casInvoiceBatchId batch ID to have the report generated for. * @returns file contents. */ - async getInvoiceBatchesReport( + async getCASInvoiceBatchReport( casInvoiceBatchId: number, ): Promise> { return this.downloadFile(`cas-invoice-batch/${casInvoiceBatchId}/report`); diff --git a/sources/packages/web/src/views/aest/CASInvoices.vue b/sources/packages/web/src/views/aest/CASInvoices.vue index 00fdc85778..2449b8c40a 100644 --- a/sources/packages/web/src/views/aest/CASInvoices.vue +++ b/sources/packages/web/src/views/aest/CASInvoices.vue @@ -208,7 +208,7 @@ export default defineComponent({ try { batch.downloadInProgress = true; snackBar.success(`Batch ${batch.batchName} report generation started.`); - await CASInvoiceBatchService.shared.downloadCASInvoiceBatchesReport( + await CASInvoiceBatchService.shared.downloadCASInvoiceBatchReport( batch.id, ); } catch (error: unknown) {