From e28be42358c74c93eb98db056954ce610ce39013 Mon Sep 17 00:00:00 2001 From: Guillaume Heurtier <guillaume.heurtier@maarch.org> Date: Thu, 5 Mar 2020 15:10:22 +0100 Subject: [PATCH] FEAT #13349 TIME 0:20 increment nb follow after actions when indexing --- src/frontend/app/actions/actions.service.ts | 8 ++++---- .../close-mail-action/close-mail-action.component.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/frontend/app/actions/actions.service.ts b/src/frontend/app/actions/actions.service.ts index 69a9ce9f9ac..64af0696bed 100644 --- a/src/frontend/app/actions/actions.service.ts +++ b/src/frontend/app/actions/actions.service.ts @@ -121,10 +121,6 @@ export class ActionsService { if (this.setActionInformations(action, userId, groupId, null, null)) { this.setResourceInformations(datas); - if (datas['followed']) { - this.headerService.nbResourcesFollowed++; - } - this.loading = true; try { this[action.component](); @@ -246,6 +242,10 @@ export class ActionsService { } endAction(resIds: any) { + if (!this.functions.empty(this.currentResourceInformations['followed']) && this.currentResourceInformations['followed']) { + this.headerService.nbResourcesFollowed++; + } + this.notify.success(this.lang.action + ' : "' + this.currentAction.label + '" ' + this.lang.done); this.eventAction.next(resIds); diff --git a/src/frontend/app/actions/close-mail-action/close-mail-action.component.ts b/src/frontend/app/actions/close-mail-action/close-mail-action.component.ts index 1720fc802a1..58847f7757b 100644 --- a/src/frontend/app/actions/close-mail-action/close-mail-action.component.ts +++ b/src/frontend/app/actions/close-mail-action/close-mail-action.component.ts @@ -44,7 +44,7 @@ export class CloseMailActionComponent implements OnInit { checkIndexingClose() { this.http.get(`../../rest/actions/${this.data.action.id}`).pipe( tap((data: any) => { - this.requiredFields = data.action.parameters; + this.requiredFields = data.action.parameters.requiredFields; }), exhaustMap(() => this.http.get(`../../rest/customFields`)), tap((data: any) => this.customFields = data.customFields), -- GitLab