From b330afacbe16438c65a408c2f1289c0764db5efd Mon Sep 17 00:00:00 2001 From: Alex ORLUC <alex.orluc@maarch.org> Date: Tue, 2 Apr 2019 17:43:55 +0200 Subject: [PATCH] FIX #9777 fix action mass v1 --- src/frontend/app/actions/actions-list.component.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/frontend/app/actions/actions-list.component.ts b/src/frontend/app/actions/actions-list.component.ts index d7fbfb363b3..cceda4ef8ea 100644 --- a/src/frontend/app/actions/actions-list.component.ts +++ b/src/frontend/app/actions/actions-list.component.ts @@ -74,14 +74,16 @@ export class ActionsListComponent implements OnInit { this.arrRes = []; this.currentAction = action; - if (action.component == 'v1Action' && this.selectedRes.length > 0) { + if (this.contextMode && this.selectedRes.length == 0) { + this.arrRes = [this.contextResId]; + } else { + this.arrRes = this.selectedRes; + } + + if (action.component == 'v1Action' && this.arrRes.length > 1) { alert(this.lang.actionMassForbidden); } else { - if (this.contextMode && this.selectedRes.length == 0) { - this.arrRes = [this.contextResId]; - } else { - this.arrRes = this.selectedRes; - } + this.http.put('../../rest/resourcesList/users/' + this.currentBasketInfo.ownerId + '/groups/' + this.currentBasketInfo.groupId + '/baskets/' + this.currentBasketInfo.basketId + '/lock', { resources: this.arrRes }) .subscribe((data: any) => { try { -- GitLab