refactor(04): service code and tab
This commit is contained in:
parent
0409bd4c4a
commit
a77743dd17
2 changed files with 44 additions and 2 deletions
|
|
@ -36,6 +36,14 @@ const branchFilter = selectFilterOptionRefMod(
|
||||||
branchOptions,
|
branchOptions,
|
||||||
'name',
|
'name',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const serviceCodeOpts = ref([{ label: 'mou', value: 'mou' }]);
|
||||||
|
const serviceCodeOptions = ref<Record<string, unknown>[]>([]);
|
||||||
|
const serviceCodeFilter = selectFilterOptionRefMod(
|
||||||
|
serviceCodeOpts,
|
||||||
|
serviceCodeOptions,
|
||||||
|
'label',
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -109,7 +117,40 @@ const branchFilter = selectFilterOptionRefMod(
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="service" class="col-12 row q-col-gutter-sm">
|
<div v-if="service" class="col-12 row q-col-gutter-sm">
|
||||||
<q-input
|
<q-select
|
||||||
|
outlined
|
||||||
|
clearable
|
||||||
|
use-input
|
||||||
|
fill-input
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
hide-selected
|
||||||
|
hide-bottom-space
|
||||||
|
input-debounce="0"
|
||||||
|
:disable="!readonly && disableCode"
|
||||||
|
class="col-3"
|
||||||
|
v-model="serviceCode"
|
||||||
|
id="select-br-id"
|
||||||
|
option-label="label"
|
||||||
|
option-value="value"
|
||||||
|
lazy-rules="ondemand"
|
||||||
|
:dense="dense"
|
||||||
|
:readonly="readonly"
|
||||||
|
:options="serviceCodeOptions"
|
||||||
|
:label="$t('serviceCode')"
|
||||||
|
:hide-dropdown-icon="readonly || disableCode"
|
||||||
|
:rules="[(val: string) => !!val]"
|
||||||
|
@filter="serviceCodeFilter"
|
||||||
|
>
|
||||||
|
<template v-slot:no-option>
|
||||||
|
<q-item>
|
||||||
|
<q-item-section class="text-grey">
|
||||||
|
{{ $t('noResults') }}
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</template>
|
||||||
|
</q-select>
|
||||||
|
<!-- <q-input
|
||||||
lazy-rules="ondemand"
|
lazy-rules="ondemand"
|
||||||
id="input-service-code"
|
id="input-service-code"
|
||||||
for="input-service-code"
|
for="input-service-code"
|
||||||
|
|
@ -122,7 +163,7 @@ const branchFilter = selectFilterOptionRefMod(
|
||||||
:label="$t('serviceCode')"
|
:label="$t('serviceCode')"
|
||||||
v-model="serviceCode"
|
v-model="serviceCode"
|
||||||
:rules="[(val: string) => !!val || $t('pleaseInformation')]"
|
:rules="[(val: string) => !!val || $t('pleaseInformation')]"
|
||||||
/>
|
/> -->
|
||||||
|
|
||||||
<q-select
|
<q-select
|
||||||
outlined
|
outlined
|
||||||
|
|
|
||||||
|
|
@ -893,6 +893,7 @@ async function assignFormDataProductService(id: string) {
|
||||||
const res = await fetchListServiceById(id);
|
const res = await fetchListServiceById(id);
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
|
currentServiceTab.value = 1;
|
||||||
statusToggle.value = res.status === 'INACTIVE' ? false : true;
|
statusToggle.value = res.status === 'INACTIVE' ? false : true;
|
||||||
profileUrl.value = res.imageUrl;
|
profileUrl.value = res.imageUrl;
|
||||||
profileSubmit.value = true;
|
profileSubmit.value = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue