Skip to content

Commit

Permalink
Merge pull request #372 from bcgov/hotfix
Browse files Browse the repository at this point in the history
Hotfix
  • Loading branch information
ychung-mot authored Jun 5, 2024
2 parents 187f73c + 29a4a5f commit 764dfed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions frontend/src/app/app.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
.title {
color: #FFFFFF;
font-size: 1.75rem;
max-width: 50%;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { PagingResponse, PagingResponsePageInfo } from '../models/paging-respons
import { UserDataService } from '../services/user-data.service';
import { forkJoin } from 'rxjs';
import { User } from '../models/user';
import { GlobalLoaderService } from '../services/global-loader.service';

@Component({
selector: 'app-listing-upload-history-table',
Expand Down Expand Up @@ -47,6 +48,7 @@ export class ListingUploadHistoryTableComponent implements OnInit {
private listingDataService: ListingDataService,
private delistingService: DelistingService,
private userDataService: UserDataService,
private loaderService: GlobalLoaderService,
) { }

ngOnInit(): void {
Expand Down Expand Up @@ -98,14 +100,18 @@ export class ListingUploadHistoryTableComponent implements OnInit {
}

onDownloadErrors(rowId: number, platform: string, date: string): void {
this.loaderService.loadingStart(' It may take several minutes to prepare your download file. Please do not close this tab until your download is complete.');
this.listingDataService.getUploadHistoryErrors(rowId).subscribe({
next: (content) => {
const element = document.createElement('a');
element.setAttribute('href', `data:text/plain;charset=utf-8,${encodeURIComponent(content)}`);
element.setAttribute('download', `errors_${platform}_${date}.csv`);

element.click();
}
},
complete: () => {
this.loaderService.loadingEnd();
},
})
}

Expand Down

0 comments on commit 764dfed

Please sign in to comment.