refactor: use shared component instead of select input
This commit is contained in:
parent
ed13856449
commit
995debe69c
1 changed files with 8 additions and 11 deletions
|
|
@ -16,9 +16,9 @@ import {
|
||||||
import { User } from 'src/stores/user/types';
|
import { User } from 'src/stores/user/types';
|
||||||
|
|
||||||
import SelectMenuWithSearch from '../shared/SelectMenuWithSearch.vue';
|
import SelectMenuWithSearch from '../shared/SelectMenuWithSearch.vue';
|
||||||
import SelectInput from '../shared/SelectInput.vue';
|
|
||||||
import ToggleButton from 'src/components/button/ToggleButton.vue';
|
import ToggleButton from 'src/components/button/ToggleButton.vue';
|
||||||
import NoData from '../NoData.vue';
|
import NoData from '../NoData.vue';
|
||||||
|
import SelectBranch from '../shared/select/SelectBranch.vue';
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
readonly?: boolean;
|
readonly?: boolean;
|
||||||
|
|
@ -180,17 +180,14 @@ onMounted(async () => {
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="col-12 row q-col-gutter-sm">
|
<section class="col-12 row q-col-gutter-sm">
|
||||||
<SelectInput
|
<SelectBranch
|
||||||
v-if="role.includes('system')"
|
|
||||||
:readonly
|
|
||||||
v-model="registerBranchId"
|
|
||||||
class="col-2"
|
|
||||||
:option="userStore.userOption.hqOpts"
|
|
||||||
:label="$t('branch.form.code')"
|
:label="$t('branch.form.code')"
|
||||||
:rules="[
|
:readonly
|
||||||
(val: string) =>
|
code-only
|
||||||
(role.includes('system') && !!val) || $t('form.error.required'),
|
v-model:value="registerBranchId"
|
||||||
]"
|
v-if="role.includes('system')"
|
||||||
|
class="col-3"
|
||||||
|
required
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
:readonly
|
:readonly
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue