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()}`); +});