diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index e1e3c9719..29967d8c7 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -23,12 +23,21 @@ const userParams = ref({}); onMounted(() => { const params = store.userParams; if (params) { - userParams.value = params; + userParams.value = Object.assign({}, params); } }); async function search() { const params = userParams.value; + for (const param in params) { + if (params[param] === '' || params[param] === null) { + delete userParams.value[param]; + delete store.userParams[param]; + } + } + + // if (Object.keys(params)) + await arrayData.addFilter({ params }); } @@ -64,7 +73,7 @@ async function remove(key) { removable > -
+
{{ chip.label }}: "{{ chip.value }}"
@@ -97,17 +106,17 @@ async function remove(key) {
- + - { - "en": { - "appliedFilters": "Applied filters" - }, - "es": { - "appliedFilters": "Filtros aplicados" - } +{ + "en": { + "appliedFilters": "Applied filters" + }, + "es": { + "appliedFilters": "Filtros aplicados" } - +} + diff --git a/src/components/ui/VnSearchbar.vue b/src/components/ui/VnSearchbar.vue index f380079d5..456fd5917 100644 --- a/src/components/ui/VnSearchbar.vue +++ b/src/components/ui/VnSearchbar.vue @@ -69,6 +69,14 @@ async function search() { + diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js index 37d6febc7..b68a73f5e 100644 --- a/src/composables/useArrayData.js +++ b/src/composables/useArrayData.js @@ -123,7 +123,7 @@ export function useArrayData(key, userOptions) { } async function refresh() { - // TODO: Refresh + await fetch({ append: false }); } function updateStateParams() { diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index 8fc99d166..29fcfc3e9 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -16,7 +16,7 @@ const stateStore = useStateStore(); v-model="stateStore.rightDrawer" side="right" :width="256" - :breakpoint="800" + :breakpoint="1000" :persistent="false" > diff --git a/src/pages/Customer/Card/CustomerCard.vue b/src/pages/Customer/Card/CustomerCard.vue index 8d6288fe5..ebeac4425 100644 --- a/src/pages/Customer/Card/CustomerCard.vue +++ b/src/pages/Customer/Card/CustomerCard.vue @@ -1,4 +1,5 @@ + + + { + "en": { + "searchLabel": "Search by customer id or name" + }, + "es": { + "searchLabel": "Buscar por id o nombre del cliente" + } + } + diff --git a/src/pages/Customer/CustomerFilter.vue b/src/pages/Customer/CustomerFilter.vue index dcc363487..5b44fceb6 100644 --- a/src/pages/Customer/CustomerFilter.vue +++ b/src/pages/Customer/CustomerFilter.vue @@ -1,8 +1,10 @@