-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
USH 1204 - Errors in console after CSV Import #924
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works but a change is needed in the showNotification-function in order to show the correct string in the notification-bar.
@@ -25,6 +25,7 @@ export class ImportResultsComponent implements OnInit { | |||
|
|||
ngOnInit(): void { | |||
const jobId = this.route.snapshot.queryParamMap.get('job')?.split(','); | |||
console.log(jobId); | |||
if (jobId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the console.log 🙃
result.forEach((job: any) => { | ||
if (job.result.status === 'SUCCESS') { | ||
this.showNotification('success'); | ||
this.importFinished.next(job.result); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works, but the text in the notification says "Upload complete. You should now see your tagged data in your HDX account.", I think it is the title that is hardcoded on row 95. Maybe we need to send that from the start instead in order to be able to reuse the function?
* First cut, basic functionality fixed. Probably should clean it up though * Removed the snackbar stuff and added an error result page
This PR fixes some issues following a CSV import, specifically allowing the user to be notified that the job was successful or not. Previously this functionality was incomplete, meaning the status page would endlessly loop, the user would never be notified of the job's success or failure and the console would fill up with errors.
https://linear.app/ushahidi/issue/USH-1204/messy-console-with-error-code-500-when-attempting-import