fix: Solve product creation

This commit is contained in:
Net 2024-07-24 11:47:03 +07:00
parent 467a862344
commit ed5dc2d872

View file

@ -41,6 +41,7 @@ const props = defineProps<{
$t(isType ? 'productAndServiceTypeName' : 'productAndServiceGroupName')
"
v-model="name"
:rules="[(val: string) => !!val || $t('pleaseInformation')]"
/>
<q-input
:dense="dense"
@ -79,7 +80,6 @@ const props = defineProps<{
<q-select
id="input-source-nationality"
:dense="dense"
outlined
:readonly="readonly"
@ -89,19 +89,21 @@ const props = defineProps<{
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
/>
<q-input