From ba157ac17494c0f6f6a47de72e8b27be0d34a86d Mon Sep 17 00:00:00 2001 From: Alex ORLUC <alex.orluc@maarch.org> Date: Fri, 29 Mar 2019 11:43:32 +0100 Subject: [PATCH] fix close modal after action --- .../send-shipping-action/send-shipping-action.component.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/frontend/app/actions/send-shipping-action/send-shipping-action.component.ts b/src/frontend/app/actions/send-shipping-action/send-shipping-action.component.ts index b1b75737c9b..6f325f13b88 100644 --- a/src/frontend/app/actions/send-shipping-action/send-shipping-action.component.ts +++ b/src/frontend/app/actions/send-shipping-action/send-shipping-action.component.ts @@ -63,11 +63,10 @@ export class SendShippingActionComponent implements OnInit { this.http.put('../../rest/resourcesList/users/' + this.data.currentBasketInfo.ownerId + '/groups/' + this.data.currentBasketInfo.groupId + '/baskets/' + this.data.currentBasketInfo.basketId + '/actions/' + this.data.action.id, { resources: realResSelected, data: { shippingTemplateId: this.currentShipping.id }, note: this.noteEditor.getNoteContent() }) .subscribe((data: any) => { - if (data && data.data != null) { - this.dialogRef.close('success'); - } if (data && data.errors != null) { this.notify.error(data.errors); + } else { + this.dialogRef.close('success'); } this.loading = false; }, (err: any) => { -- GitLab