From 789769ad7dc15ea66d875d38f136406154ef80e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20S=C3=A1nchez?= Date: Mon, 29 Jun 2020 09:38:42 +0200 Subject: [PATCH] Destroy edit prop fix --- modules/ticket/front/sale/index.html | 11 ++++------- modules/ticket/front/sale/index.js | 6 ++++-- modules/ticket/front/sale/style.scss | 5 +++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html index ae85fbbfd..1898462fb 100644 --- a/modules/ticket/front/sale/index.html +++ b/modules/ticket/front/sale/index.html @@ -213,9 +213,8 @@ -
+ on-open="$ctrl.getMana()"> +
@@ -247,9 +246,8 @@ -
+ on-open="$ctrl.getMana()"> +
@@ -287,7 +285,6 @@ { sale.price = res.data.price; - + this.edit = null; this.vnApp.showSuccess(this.$t('Data saved!')); }).finally(() => { if (this.newInstances().length === 0) @@ -399,6 +399,8 @@ class Controller extends Section { for (let sale of sales) sale.discount = this.edit.discount; + + this.edit = null; }).catch(e => { this.vnApp.showError(e.message); }); @@ -614,7 +616,7 @@ class Controller extends Section { calculateSalePrice() { const sale = this.checkedLines()[0]; const query = `Sales/${sale.id}/recalculatePrice`; - this.$http.post(query).then(res => { + this.$http.post(query).then(() => { this.vnApp.showSuccess(this.$t('Data saved!')); this.$.model.refresh(); }); diff --git a/modules/ticket/front/sale/style.scss b/modules/ticket/front/sale/style.scss index 142c72295..a1c36f271 100644 --- a/modules/ticket/front/sale/style.scss +++ b/modules/ticket/front/sale/style.scss @@ -24,7 +24,7 @@ vn-ticket-sale { } } vn-dialog.edit { - @extend .edit-price; + @extend .edit-popover; &>div{ padding: 0!important; @@ -81,8 +81,9 @@ vn-ticket-sale { width: 400px } } -.edit-price { +.vn-popover .edit-popover { min-width: 200px; + text-align: center; section.header { background-color: $color-main;