From accf61517a2367ca0f09923b23f29d060784f96b Mon Sep 17 00:00:00 2001 From: Jon Date: Thu, 5 Dec 2024 13:31:39 +0100 Subject: [PATCH] refactor: refs #8194 requested changes --- src/components/common/VnSelectWorker.vue | 24 ++++++++++++------- src/pages/Customer/CustomerList.vue | 1 - src/pages/Item/ItemRequestFilter.vue | 2 ++ src/pages/Order/Card/OrderFilter.vue | 3 +++ src/pages/Route/Card/RouteFilter.vue | 1 - src/pages/Route/Card/RouteForm.vue | 2 +- src/pages/Supplier/Card/SupplierBasicData.vue | 2 +- .../Ticket/Card/TicketCreateTracking.vue | 2 +- src/pages/Worker/WorkerList.vue | 1 + 9 files changed, 24 insertions(+), 14 deletions(-) diff --git a/src/components/common/VnSelectWorker.vue b/src/components/common/VnSelectWorker.vue index a6caeb300..07288954a 100644 --- a/src/components/common/VnSelectWorker.vue +++ b/src/components/common/VnSelectWorker.vue @@ -31,23 +31,28 @@ const value = computed({ emit('update:modelValue', val); }, }); +const url = computed(() => { + let url = 'Workers/search'; + const { departmentCodes } = $props.params ?? {}; + if (!departmentCodes) return url; + const params = new URLSearchParams({ + departmentCodes: JSON.stringify(departmentCodes), + }); + + return url.concat(`?${params.toString()}`); +});