Skip to content

Commit

Permalink
Merge pull request #2067 from fecgov/feature/1194-reports-ui-changes
Browse files Browse the repository at this point in the history
Feature/1194 - Manage Reports UI Changes
  • Loading branch information
mjtravers authored Jul 30, 2024
2 parents a397b6b + a1e12d4 commit f3ef70d
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion front-end/cypress/e2e/F3X/reattributions.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion front-end/cypress/e2e/F3X/redesignations.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion front-end/cypress/e2e/pages/reportListPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:host ::ng-deep .p-datatable-header {
padding-right: 0px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,20 @@ import { DotFecService } from 'app/shared/services/dot-fec.service';
@Component({
selector: 'app-report-list',
templateUrl: './report-list.component.html',
styleUrls: ['./report-list.component.scss'],
})
export class ReportListComponent extends TableListBaseComponent<Report> 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,
),
Expand Down
4 changes: 4 additions & 0 deletions front-end/src/app/reports/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,7 @@ caption {
.p-inputtextarea {
height: auto !important;
}

:host ::ng-deep .p-datatable-header {
padding-right: 0px;
}

0 comments on commit f3ef70d

Please sign in to comment.