98344: Fixed workflow id passed to backend instead of claimed task id

This commit is contained in:
Alexandre Vryghem
2023-01-10 14:10:44 +01:00
parent f4a303f808
commit b351053489
7 changed files with 65 additions and 36 deletions

View File

@@ -26,7 +26,7 @@ export class AdvancedWorkflowActionSelectReviewerComponent extends AdvancedWorkf
multipleReviewers = true;
selectedReviewers: EPerson[];
selectedReviewers: EPerson[] = [];
reviewersListActionConfig: EPersonListActionConfig;

View File

@@ -41,6 +41,24 @@ export abstract class AdvancedWorkflowActionComponent extends WorkflowItemAction
);
}
/**
* Performs the action and shows a notification based on the outcome of the action
*/
performAction() {
this.sendRequest(this.route.snapshot.queryParams.claimedTask).subscribe((successful: boolean) => {
if (successful) {
const title = this.translationService.get('workflow-item.' + this.type + '.notification.success.title');
const content = this.translationService.get('workflow-item.' + this.type + '.notification.success.content');
this.notificationsService.success(title, content);
this.previousPage();
} else {
const title = this.translationService.get('workflow-item.' + this.type + '.notification.error.title');
const content = this.translationService.get('workflow-item.' + this.type + '.notification.error.content');
this.notificationsService.error(title, content);
}
});
}
/**
* Submits the task with the given {@link createBody}.
*