Skip to content

Commit

Permalink
Merge pull request #412 from fecgov/add-test-button
Browse files Browse the repository at this point in the history
test button for qa
  • Loading branch information
mjtravers authored Jul 26, 2022
2 parents 2b5eb2a + b261733 commit bc7f8c0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ export class TestDotFecComponent implements OnInit {
}

download(): void {
// prettier-ignore
this.http
.get(`${environment.apiUrl}/web-services/dot-fec/${this.report?.id}/`, {
headers: this.apiService.getHeaders(),
responseType: 'text',
})
.subscribe((dotFEC: any) => {
.subscribe((dotFEC: any) => { // eslint-disable-line @typescript-eslint/no-explicit-any
const newBlob = new Blob([dotFEC], { type: 'application/text' });
const data = window.URL.createObjectURL(newBlob);
const link = document.createElement('a');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ <h5 class="m-0">Recent reports</h5>
(click)="editItem(item)"
[ariaLabel]="'edit ' + displayName(item)"
></p-button>
<p-button
pRipple
icon="pi pi-ellipsis-v"
styleClass="p-button-rounded p-button-success mr-2"
(click)="goToTest(item)"
[ariaLabel]="'edit ' + displayName(item)"
></p-button>
</td>
</tr>
</ng-template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ export class ReportListComponent extends TableListBaseComponent<Report> implemen
}
}

public goToTest(item: Report): void {
this.router.navigateByUrl(`/reports/f3x/test-dot-fec/${item.id}`);
}

public createTransaction(item: Report): void {
this.router.navigateByUrl(`/transactions/report/${item.id}/create`);
}
Expand Down

0 comments on commit bc7f8c0

Please sign in to comment.