bulk reanalyse
This commit is contained in:
parent
381143c9a5
commit
5e92d08cdd
@ -73,14 +73,11 @@ export class BulkActionsComponent {
|
||||
});
|
||||
}
|
||||
|
||||
public reanalyse() {
|
||||
const promises = this.selectedFiles
|
||||
.filter((file) => this._permissionsService.fileRequiresReanalysis(file))
|
||||
.map((file) => this._reanalysisControllerService.reanalyzeFile(this._appStateService.activeProject.project.projectId, file.fileId).toPromise());
|
||||
public async reanalyse() {
|
||||
const fileIds = this.selectedFiles.filter((file) => this._permissionsService.fileRequiresReanalysis(file)).map((file) => file.fileId);
|
||||
|
||||
Promise.all(promises).then(() => {
|
||||
this.reload.emit();
|
||||
});
|
||||
await this._reanalysisControllerService.reanalyzeFilesForProject(fileIds, this._appStateService.activeProject.projectId).toPromise();
|
||||
this.reload.emit();
|
||||
}
|
||||
|
||||
// Under review
|
||||
@ -100,6 +97,7 @@ export class BulkActionsComponent {
|
||||
public get canSetToUnderApproval() {
|
||||
return this.selectedFiles.reduce((acc, file) => acc && this._permissionsService.canSetUnderApproval(file), true);
|
||||
}
|
||||
|
||||
public setToUnderApproval() {
|
||||
const promises = this.selectedFiles.map((file) => this._fileActionService.setFileUnderApproval(file).toPromise());
|
||||
|
||||
@ -112,6 +110,7 @@ export class BulkActionsComponent {
|
||||
public get canApprove() {
|
||||
return this.selectedFiles.reduce((acc, file) => acc && this._permissionsService.canApprove(file), true);
|
||||
}
|
||||
|
||||
public approveDocuments() {
|
||||
const promises = this.selectedFiles.map((file) => this._fileActionService.setFileApproved(file).toPromise());
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user