From cdbd16c42baa83d5207760108397fc180ccc5470 Mon Sep 17 00:00:00 2001 From: Mateus Machado Luna Date: Fri, 13 Apr 2018 11:54:38 -0300 Subject: [PATCH] Fixes Vuex error messages on Fields and Filter Page. --- src/admin/components/lists/fields-list.vue | 52 ++++++---- src/admin/components/lists/filters-list.vue | 106 +++++++++++--------- src/js/store/modules/fields/actions.js | 10 +- src/js/store/modules/fields/mutations.js | 2 +- src/js/store/modules/filter/actions.js | 19 +++- src/js/store/modules/filter/mutations.js | 8 ++ 6 files changed, 121 insertions(+), 76 deletions(-) diff --git a/src/admin/components/lists/fields-list.vue b/src/admin/components/lists/fields-list.vue index 56d0e4da3..48b087a48 100644 --- a/src/admin/components/lists/fields-list.vue +++ b/src/admin/components/lists/fields-list.vue @@ -7,10 +7,10 @@

{{ $i18n.get('label_available_field_types') }}

{ - let index = this.activeFieldList.findIndex(deletedField => deletedField.id === field.id); - if (index >= 0) - this.activeFieldList.splice(index, 1); - + .then(() => { if (!this.isRepositoryLevel) this.updateFieldsOrder(); }) @@ -275,14 +291,6 @@ export default { this.openedFieldId = ''; } }, - computed: { - availableFieldList() { - return this.getFieldTypes(); - }, - activeFieldList() { - return this.getFields(); - } - }, created() { this.isLoadingFieldTypes = true; this.isLoadingFields = true; diff --git a/src/admin/components/lists/filters-list.vue b/src/admin/components/lists/filters-list.vue index 032c76cee..9ff75636e 100644 --- a/src/admin/components/lists/filters-list.vue +++ b/src/admin/components/lists/filters-list.vue @@ -10,7 +10,7 @@ class="active-filters-area" @change="handleChange" :class="{'filters-area-receive': isDraggingFromAvailable}" - :list="activeFilterList" + v-model="activeFilterList" :options="{ group: { name:'filters', pull: false, put: true }, sort: openedFilterId == '' || openedFilterId == undefined, @@ -120,7 +120,7 @@

{{ $i18n.get('label_available_field_types') }}