Skip to content

Commit

Permalink
Adjust report batch method names
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsignori-aot committed Feb 5, 2025
1 parent f6b893a commit 92ff5a9
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> {
try {
const invoiceReport =
await this.casInvoiceBatchReportService.getCASInvoiceBatchesReport(
await this.casInvoiceBatchReportService.getCASInvoiceBatchReport(
casInvoiceBatchId,
);
const batchDate = getFileNameAsCurrentTimestamp(invoiceReport.batchDate);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<CASInvoiceBatchReport> {
const reportData = await this.getCASInvoiceBatchesReportData(
Expand Down
4 changes: 2 additions & 2 deletions sources/packages/web/src/services/CASInvoiceBatchService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> {
const file = await ApiClient.CASInvoiceBatchApi.getInvoiceBatchesReport(
const file = await ApiClient.CASInvoiceBatchApi.getCASInvoiceBatchReport(
casInvoiceBatchId,
);
const { downloadFileAsBlob } = useFileUtils();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<AxiosResponse<unknown>> {
return this.downloadFile(`cas-invoice-batch/${casInvoiceBatchId}/report`);
Expand Down
2 changes: 1 addition & 1 deletion sources/packages/web/src/views/aest/CASInvoices.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 92ff5a9

Please sign in to comment.