fix: Solve product creation
This commit is contained in:
parent
467a862344
commit
ed5dc2d872
1 changed files with 11 additions and 9 deletions
|
|
@ -41,6 +41,7 @@ const props = defineProps<{
|
||||||
$t(isType ? 'productAndServiceTypeName' : 'productAndServiceGroupName')
|
$t(isType ? 'productAndServiceTypeName' : 'productAndServiceGroupName')
|
||||||
"
|
"
|
||||||
v-model="name"
|
v-model="name"
|
||||||
|
:rules="[(val: string) => !!val || $t('pleaseInformation')]"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
|
|
@ -79,7 +80,6 @@ const props = defineProps<{
|
||||||
|
|
||||||
<q-select
|
<q-select
|
||||||
id="input-source-nationality"
|
id="input-source-nationality"
|
||||||
|
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
outlined
|
outlined
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
|
@ -89,19 +89,21 @@ const props = defineProps<{
|
||||||
map-options
|
map-options
|
||||||
options-dense
|
options-dense
|
||||||
:label="$t('registeredBranch')"
|
:label="$t('registeredBranch')"
|
||||||
class="col-3 "
|
class="col-3"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
v-model="registeredBranchId"
|
v-model="registeredBranchId"
|
||||||
:options="optionsBranch"
|
:options="optionsBranch"
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) => {
|
(val) => {
|
||||||
const roles = getRole() || [];
|
const roles = getRole() || [];
|
||||||
const isSpecialRole = ['admin', 'system', 'head_of_admin'].some(role => roles.includes(role));
|
const isSpecialRole = ['admin', 'system', 'head_of_admin'].some(
|
||||||
return isSpecialRole || !!val || 'กรุณากรอกข้อมูล';
|
(role) => roles.includes(role),
|
||||||
}
|
);
|
||||||
]"
|
return isSpecialRole || !!val || 'กรุณากรอกข้อมูล';
|
||||||
clearable
|
},
|
||||||
|
]"
|
||||||
|
clearable
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue