@@ -46,43 +56,59 @@ onMounted(async () => {
+ @filter="codeFilter"
+ >
+
+
+
+ {{ $t('noResults') }}
+
+
+
+
+ @filter="branchFilter"
+ >
+
+
+
+ {{ $t('noResults') }}
+
+
+
+
import { getRole } from 'src/services/keycloak';
import useOptionStore from 'src/stores/options';
-import { onMounted } from 'vue';
+import { selectFilterOptionRefMod } from 'src/stores/utils';
+import { ref } from 'vue';
const optionStore = useOptionStore();
@@ -15,15 +16,27 @@ const serviceName = defineModel('serviceNameTh');
const serviceDescription = defineModel('serviceDescription');
const registeredBranchId = defineModel('registeredBranchId');
-const props = defineProps<{
+
+const optionsBranch = defineModel<{ id: string; name: string }[]>(
+ 'optionsBranch',
+ { required: true },
+);
+
+defineProps<{
dense?: boolean;
outlined?: boolean;
readonly?: boolean;
separator?: boolean;
isType?: boolean;
service?: boolean;
- optionsBranch?: { id: string; name: string }[];
}>();
+
+const branchOptions = ref[]>([]);
+const branchFilter = selectFilterOptionRefMod(
+ optionsBranch,
+ branchOptions,
+ 'name',
+);
@@ -84,22 +97,25 @@ const props = defineProps<{
/>
+ @filter="branchFilter"
+ >
+
+
+
+ {{ $t('noResults') }}
+
+
+
+