diff --git a/src/components/04_product-service/BasicInfoProduct.vue b/src/components/04_product-service/BasicInfoProduct.vue index 1bf17d1a..1b911a26 100644 --- a/src/components/04_product-service/BasicInfoProduct.vue +++ b/src/components/04_product-service/BasicInfoProduct.vue @@ -33,14 +33,9 @@ onMounted(async () => { codeOption.value = option.tha.typeProduct; } - if(!!props.optionsBranch) { - - - - registeredBranchId.value = props.optionsBranch[0].id ; + if (!!props.optionsBranch) { + registeredBranchId.value = props.optionsBranch[0].id; } - - }); @@ -81,19 +76,21 @@ onMounted(async () => { map-options options-dense :label="$t('registeredBranch')" - class="col-3 " + class="col-3" option-label="name" option-value="id" v-model="registeredBranchId" :options="optionsBranch" :rules="[ - (val) => { - const roles = getRole() || []; - const isSpecialRole = ['admin', 'system', 'head_of_admin'].some(role => roles.includes(role)); - return isSpecialRole || !!val || 'กรุณากรอกข้อมูล'; - } -]" -clearable + (val) => { + const roles = getRole() || []; + const isSpecialRole = ['admin', 'system', 'head_of_admin'].some( + (role) => roles.includes(role), + ); + return isSpecialRole || !!val || 'กรุณากรอกข้อมูล'; + }, + ]" + clearable />