Added success/error notification for project reanalysis
This commit is contained in:
parent
7938adc55f
commit
1adb4f72e4
@ -1,6 +1,6 @@
|
||||
import { ChangeDetectorRef, Component, HostListener, OnDestroy, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { NotificationService } from '../../notification/notification.service';
|
||||
import { NotificationService, NotificationType } from '../../notification/notification.service';
|
||||
import { AppStateService } from '../../state/app-state.service';
|
||||
import { FileDropOverlayService } from '../../upload/file-drop/service/file-drop-overlay.service';
|
||||
import { FileUploadModel } from '../../upload/model/file-upload.model';
|
||||
@ -114,7 +114,23 @@ export class ProjectOverviewScreenComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
public reanalyseProject() {
|
||||
return this.appStateService.reanalyzeProject().then(() => this.reloadProjects());
|
||||
return this.appStateService
|
||||
.reanalyzeProject()
|
||||
.then(() => {
|
||||
this.reloadProjects();
|
||||
this._notificationService.showToastNotification(
|
||||
this._translateService.instant('project-overview.reanalyse-project.success'),
|
||||
null,
|
||||
NotificationType.SUCCESS
|
||||
);
|
||||
})
|
||||
.catch(() => {
|
||||
this._notificationService.showToastNotification(
|
||||
this._translateService.instant('project-overview.reanalyse-project.error'),
|
||||
null,
|
||||
NotificationType.ERROR
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
public isPending(fileStatusWrapper: FileStatusWrapper) {
|
||||
|
||||
@ -260,6 +260,10 @@
|
||||
"assign": "Assign Reviewer",
|
||||
"reanalyse": "Analyze Documents",
|
||||
"reanalyse-error-outdated": "Not all selected documents can be analyzed, some may not be assigned to you or are already analyzed."
|
||||
},
|
||||
"reanalyse-project": {
|
||||
"success": "Files scheduled for reanalysis.",
|
||||
"error": "Failed to schedule files for reanalysis. Please try again."
|
||||
}
|
||||
},
|
||||
"file-preview": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user