From b583d8b12e433918e56c6ad5fd6a9b607e71780d Mon Sep 17 00:00:00 2001 From: joan Date: Tue, 17 Jan 2023 14:57:12 +0100 Subject: [PATCH] Added searchbar panel --- src/components/NavBar.vue | 4 +- src/composables/useArrayData.js | 9 +- src/pages/Customer/CustomerList.vue | 2 +- src/pages/Customer/CustomerMain.vue | 293 ++++++++++++++++++-------- src/pages/Customer/CustomerSearch.vue | 3 + 5 files changed, 221 insertions(+), 90 deletions(-) create mode 100644 src/pages/Customer/CustomerSearch.vue diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index 30afedb7a..ee95e258c 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -38,7 +38,9 @@ function onToggleDrawer() { - {{ appName }} + + {{ appName }} + diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js index 5ce4f03fb..049cea116 100644 --- a/src/composables/useArrayData.js +++ b/src/composables/useArrayData.js @@ -49,8 +49,13 @@ export function useArrayData(key, userOptions) { store.filter = filter; - const requestOptions = { params: { filter: filter } }; - const response = await axios.get(store.url, requestOptions); + const params = { + filter: filter, + }; + + Object.assign(params, store.userParams); + + const response = await axios.get(store.url, { params }); const { limit } = filter; diff --git a/src/pages/Customer/CustomerList.vue b/src/pages/Customer/CustomerList.vue index af0b3ce32..de2a7d7ca 100644 --- a/src/pages/Customer/CustomerList.vue +++ b/src/pages/Customer/CustomerList.vue @@ -25,7 +25,7 @@ function viewSummary(id) {