refactor: เพิ่ม พื้นฐานให้กับ สาขาที่ลงทะเบียน
This commit is contained in:
parent
99e26e4ad2
commit
fc0abea637
3 changed files with 33 additions and 5 deletions
|
|
@ -23,7 +23,7 @@ const customerBranch = defineModel<{
|
|||
const employeeId = defineModel<string>('employeeId');
|
||||
const nrcNo = defineModel<string>('nrcNo');
|
||||
|
||||
defineProps<{
|
||||
const props = defineProps<{
|
||||
dense?: boolean;
|
||||
outlined?: boolean;
|
||||
readonly?: boolean;
|
||||
|
|
@ -39,14 +39,24 @@ defineEmits<{
|
|||
(e: 'filterOwnerBranch', val: string, update: void): void;
|
||||
}>();
|
||||
|
||||
onMounted(async () => {});
|
||||
onMounted(async () => {
|
||||
|
||||
if(!!props.optionsBranch) {
|
||||
|
||||
registeredBranchId.value = props.optionsBranch[0].id ;
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
|
||||
<div class="col-3 app-text-muted">
|
||||
• {{ $t(`formDialogTitleInformation`) }}
|
||||
</div>
|
||||
<div v-if="!employee" class="col-9 row q-col-gutter-md">
|
||||
|
||||
<q-select
|
||||
id="input-source-nationality"
|
||||
:dense="dense"
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ const name = defineModel<string>('name');
|
|||
const code = defineModel<string>('code');
|
||||
|
||||
const registeredBranchId = defineModel<string>('registeredBranchId');
|
||||
const codeOption = ref([]);
|
||||
const codeOption = ref<{ id: string; name: string }[]>([]);
|
||||
|
||||
defineProps<{
|
||||
const props = defineProps<{
|
||||
dense?: boolean;
|
||||
outlined?: boolean;
|
||||
readonly?: boolean;
|
||||
|
|
@ -31,6 +31,15 @@ onMounted(async () => {
|
|||
if (locale.value === 'th-th') {
|
||||
codeOption.value = option.tha.typeProduct;
|
||||
}
|
||||
|
||||
if(!!props.optionsBranch) {
|
||||
|
||||
|
||||
|
||||
registeredBranchId.value = props.optionsBranch[0].id ;
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import useOptionStore from 'src/stores/options';
|
||||
import { onMounted } from 'vue';
|
||||
|
||||
const optionStore = useOptionStore();
|
||||
|
||||
|
|
@ -13,7 +14,7 @@ const serviceName = defineModel<string>('serviceNameTh');
|
|||
const serviceDescription = defineModel<string>('serviceDescription');
|
||||
|
||||
const registeredBranchId = defineModel<string | null>('registeredBranchId');
|
||||
defineProps<{
|
||||
const props = defineProps<{
|
||||
dense?: boolean;
|
||||
outlined?: boolean;
|
||||
readonly?: boolean;
|
||||
|
|
@ -22,6 +23,14 @@ defineProps<{
|
|||
service?: boolean;
|
||||
optionsBranch?: { id: string; name: string }[];
|
||||
}>();
|
||||
|
||||
onMounted(async () => {
|
||||
if(!!props.optionsBranch) {
|
||||
registeredBranchId.value = props.optionsBranch[0].id ;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue