From e7de8b88b84bd3815909a85c3c7c70d50500a3c5 Mon Sep 17 00:00:00 2001 From: Sasha Dresden Date: Fri, 23 Aug 2024 13:21:08 -0400 Subject: [PATCH] Remove confirm unamend --- .../report-list/report-list.component.spec.ts | 6 ------ .../reports/report-list/report-list.component.ts | 15 +-------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/front-end/src/app/reports/report-list/report-list.component.spec.ts b/front-end/src/app/reports/report-list/report-list.component.spec.ts index 7a03a43b5..d4adf56ee 100644 --- a/front-end/src/app/reports/report-list/report-list.component.spec.ts +++ b/front-end/src/app/reports/report-list/report-list.component.spec.ts @@ -99,12 +99,6 @@ describe('ReportListComponent', () => { }); describe('unamend', () => { - it('should call confirm', () => { - const confirmSpy = spyOn(component.confirmationService, 'confirm'); - component.confirmUnamend(testActiveReport); - expect(confirmSpy).toHaveBeenCalledTimes(1); - }); - it('should hit service', () => { const unamendSpy = spyOn(reportService, 'startUnamendment').and.returnValue(of('')); component.unamendReport({ id: '999' } as Report); diff --git a/front-end/src/app/reports/report-list/report-list.component.ts b/front-end/src/app/reports/report-list/report-list.component.ts index eac17d18a..d7a1a8bd8 100644 --- a/front-end/src/app/reports/report-list/report-list.component.ts +++ b/front-end/src/app/reports/report-list/report-list.component.ts @@ -33,7 +33,7 @@ export class ReportListComponent extends TableListBaseComponent implemen (report: Report) => report.report_status !== ReportStatus.IN_PROGRESS, ), new TableAction('Delete', this.confirmDelete.bind(this), (report: Report) => report.can_delete), - new TableAction('Unamend', this.confirmUnamend.bind(this), (report: Report) => report.can_unamend), + new TableAction('Unamend', this.unamendReport.bind(this), (report: Report) => report.can_unamend), new TableAction('Download as .fec', this.download.bind(this)), ]; @@ -108,19 +108,6 @@ export class ReportListComponent extends TableListBaseComponent implemen }); } - public confirmUnamend(report: Report): void { - this.confirmationService.confirm({ - message: 'Are you sure you want to unamend this amendent? This action cannot be undone.', - header: 'Hang on...', - rejectLabel: 'Cancel', - rejectIcon: 'none', - rejectButtonStyleClass: 'p-button-secondary', - acceptLabel: 'Confirm', - acceptIcon: 'none', - accept: async () => this.unamendReport(report), - }); - } - async unamendReport(report: Report) { this.itemService .startUnamendment(report)