Fix for account id parameter in account tabs (#1711)

Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
This commit is contained in:
José Alberto Hernández
2023-03-17 22:18:43 -06:00
committed by GitHub
co-authored by Jose Alberto Hernandez
parent 7b9e036f01
commit 0f450262b9
11 changed files with 42 additions and 12 deletions
@@ -30,7 +30,7 @@ export class SavingsDocumentsTabComponent implements OnInit {
this.route.data.subscribe((data: { savingsDocuments: any }) => {
this.setSavingsDocumentsData(data.savingsDocuments);
});
this.entityId = this.route.snapshot.params['savingAccountId'];
this.entityId = this.route.parent.snapshot.paramMap.get('savingAccountId');
}
ngOnInit() {
@@ -53,8 +53,8 @@ export class SavingsDocumentsTabComponent implements OnInit {
this.entityDocuments = data;
}
downloadDocument(parentEntityId: string, documentId: string) {
this.savingsService.downloadSavingsDocument(parentEntityId, documentId).subscribe(res => {
downloadDocument(documentId: string) {
this.savingsService.downloadSavingsDocument(this.entityId, documentId).subscribe(res => {
const url = window.URL.createObjectURL(res);
window.open(url);
});