From e545fa52bfa908205d67e08ba6659e8d875962b0 Mon Sep 17 00:00:00 2001 From: Elaine Krauss Date: Tue, 30 Jul 2024 15:37:17 -0400 Subject: [PATCH 1/3] Implements styling changes to manage reports page --- .../src/app/reports/report-list/report-list.component.ts | 5 +++-- front-end/src/app/reports/styles.scss | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) 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 331baf30fb..17e1590dca 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 @@ -15,19 +15,20 @@ import { DotFecService } from 'app/shared/services/dot-fec.service'; @Component({ selector: 'app-report-list', templateUrl: './report-list.component.html', + styleUrls: ['../styles.scss'], }) export class ReportListComponent extends TableListBaseComponent implements OnInit, OnDestroy { dialogVisible = false; committeeAccount?: CommitteeAccount; public rowActions: TableAction[] = [ new TableAction( - 'Edit report', + 'Edit', this.editItem.bind(this), (report: Report) => report.report_status === ReportStatus.IN_PROGRESS, ), new TableAction('Amend', this.amendReport.bind(this), (report: Report) => report.canAmend), new TableAction( - 'Review report', + 'Review', this.editItem.bind(this), (report: Report) => report.report_status !== ReportStatus.IN_PROGRESS, ), diff --git a/front-end/src/app/reports/styles.scss b/front-end/src/app/reports/styles.scss index d5c0703177..23a4605a5a 100644 --- a/front-end/src/app/reports/styles.scss +++ b/front-end/src/app/reports/styles.scss @@ -88,3 +88,7 @@ caption { .p-inputtextarea { height: auto !important; } + +:host ::ng-deep .p-datatable-header { + padding-right: 0px; +} From 13b46768d4ca3daefb98b46a3fa409f1f511021b Mon Sep 17 00:00:00 2001 From: Elaine Krauss Date: Tue, 30 Jul 2024 15:42:18 -0400 Subject: [PATCH 2/3] Isolates scss changes to one new file --- .../src/app/reports/report-list/report-list.component.scss | 3 +++ front-end/src/app/reports/report-list/report-list.component.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 front-end/src/app/reports/report-list/report-list.component.scss diff --git a/front-end/src/app/reports/report-list/report-list.component.scss b/front-end/src/app/reports/report-list/report-list.component.scss new file mode 100644 index 0000000000..1ddffe59ad --- /dev/null +++ b/front-end/src/app/reports/report-list/report-list.component.scss @@ -0,0 +1,3 @@ +:host ::ng-deep .p-datatable-header { + padding-right: 0px; +} 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 17e1590dca..af738b8c4b 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 @@ -15,7 +15,7 @@ import { DotFecService } from 'app/shared/services/dot-fec.service'; @Component({ selector: 'app-report-list', templateUrl: './report-list.component.html', - styleUrls: ['../styles.scss'], + styleUrls: ['./report-list.component.scss'], }) export class ReportListComponent extends TableListBaseComponent implements OnInit, OnDestroy { dialogVisible = false; From a1e12d429df12cd91c1fd38c22ecd6f677e478a3 Mon Sep 17 00:00:00 2001 From: Elaine Krauss Date: Tue, 30 Jul 2024 15:46:57 -0400 Subject: [PATCH 3/3] Fixes broken E2E tests --- front-end/cypress/e2e/F3X/reattributions.cy.ts | 2 +- front-end/cypress/e2e/F3X/redesignations.cy.ts | 2 +- front-end/cypress/e2e/pages/reportListPage.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/front-end/cypress/e2e/F3X/reattributions.cy.ts b/front-end/cypress/e2e/F3X/reattributions.cy.ts index ab79836b33..dd95bba6b7 100644 --- a/front-end/cypress/e2e/F3X/reattributions.cy.ts +++ b/front-end/cypress/e2e/F3X/reattributions.cy.ts @@ -96,7 +96,7 @@ describe('Reattributions', () => { CreateReceipt(); ReportListPage.createF3X(reportFormDataJuly); ReportListPage.submitReport(APRIL_15); - ReportListPage.editReport(APRIL_15, 'Review report'); + ReportListPage.editReport(APRIL_15, 'Review'); PageUtils.clickSidebarSection('REVIEW TRANSACTIONS'); cy.wait(500); Reattribute(true); diff --git a/front-end/cypress/e2e/F3X/redesignations.cy.ts b/front-end/cypress/e2e/F3X/redesignations.cy.ts index 4802509d24..281a1b0bbf 100644 --- a/front-end/cypress/e2e/F3X/redesignations.cy.ts +++ b/front-end/cypress/e2e/F3X/redesignations.cy.ts @@ -79,7 +79,7 @@ describe('Redesignations', () => { CreateContribution(); ReportListPage.createF3X(reportFormDataJuly); ReportListPage.submitReport(APRIL_15); - ReportListPage.editReport(APRIL_15, 'Review report'); + ReportListPage.editReport(APRIL_15, 'Review'); PageUtils.clickSidebarSection('REVIEW TRANSACTIONS'); cy.wait(500); Redesignate(true); diff --git a/front-end/cypress/e2e/pages/reportListPage.ts b/front-end/cypress/e2e/pages/reportListPage.ts index 4632aaf13a..9dcd3aeeec 100644 --- a/front-end/cypress/e2e/pages/reportListPage.ts +++ b/front-end/cypress/e2e/pages/reportListPage.ts @@ -74,7 +74,7 @@ export class ReportListPage { cy.get('[data-cy="start-report"]').click(); } - static editReport(reportName: string, fieldName = 'Edit report') { + static editReport(reportName: string, fieldName = 'Edit') { ReportListPage.goToPage(); cy.wait(500); PageUtils.getKabob(reportName).contains(fieldName).first().click({ force: true });