From 8a316cd52c826459f5fecad64dee1414abe16f0c Mon Sep 17 00:00:00 2001 From: Mohammed Rajab Date: Thu, 11 Jul 2019 16:40:45 +0300 Subject: [PATCH] fix deletion on index --- dist/js/field.js | 6 +++--- resources/js/components/IndexField.vue | 2 +- resources/js/mixin/global.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/js/field.js b/dist/js/field.js index adf2f21..6a0e967 100644 --- a/dist/js/field.js +++ b/dist/js/field.js @@ -11083,7 +11083,7 @@ var render = function() { var _c = _vm._self._c || _h return _c("language-u-i", { attrs: { field: _vm.field }, - on: { change: _vm.redirect } + on: { change: _vm.redirect, delete: _vm.deleteLocale } }) } var staticRenderFns = [] @@ -12879,10 +12879,10 @@ var global = { this.value = value; }, deleteLocale: function deleteLocale(locale) { - Nova.request().post("/nova-vendor/multilingual-nova/remove-local/" + locale + "?resourceId=" + this.resourceId + "&resourceName=" + this.resourceName, { + Nova.request().post("/nova-vendor/multilingual-nova/remove-local/" + locale + "?resourceId=" + this.field.value.id + "&resourceName=" + this.resourceName, { _method: "DELETE" }); - this.redirect(); + window.location = this.replaceUrlParam(window.location.href, 'lang', locale); } } }; diff --git a/resources/js/components/IndexField.vue b/resources/js/components/IndexField.vue index 5bf1c12..86a58c5 100644 --- a/resources/js/components/IndexField.vue +++ b/resources/js/components/IndexField.vue @@ -1,5 +1,5 @@