refactor: clean & attribute
This commit is contained in:
parent
8cba38f538
commit
879e256a1e
5 changed files with 20 additions and 15 deletions
|
|
@ -117,6 +117,7 @@ defineProps<{
|
||||||
<VueDatePicker
|
<VueDatePicker
|
||||||
utc
|
utc
|
||||||
autoApply
|
autoApply
|
||||||
|
:teleport="true"
|
||||||
v-model="birthDate"
|
v-model="birthDate"
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ defineProps<{
|
||||||
readonly?: boolean;
|
readonly?: boolean;
|
||||||
addressTitle?: string;
|
addressTitle?: string;
|
||||||
addressTitleEN?: string;
|
addressTitleEN?: string;
|
||||||
|
noAddress?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const address = defineModel('address', { default: '' });
|
const address = defineModel('address', { default: '' });
|
||||||
|
|
@ -38,7 +39,7 @@ const zipCode = defineModel<string>('zipCode', { default: '' });
|
||||||
<div class="row q-col-gutter-y-md">
|
<div class="row q-col-gutter-y-md">
|
||||||
<slot name="information"></slot>
|
<slot name="information"></slot>
|
||||||
<slot name="person"></slot>
|
<slot name="person"></slot>
|
||||||
<slot name="address">
|
<slot name="address" v-if="!noAddress">
|
||||||
<FormAddress
|
<FormAddress
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
|
|
||||||
|
|
@ -130,12 +130,15 @@ defineEmits<{
|
||||||
:model-value="!v.disabled"
|
:model-value="!v.disabled"
|
||||||
val="xs"
|
val="xs"
|
||||||
padding="none"
|
padding="none"
|
||||||
:label="
|
>
|
||||||
v.disabled
|
<div class="q-ml-xs">
|
||||||
? $t('switchOnLabel')
|
{{
|
||||||
: $t('switchOffLabel')
|
v.disabled
|
||||||
"
|
? $t('switchOnLabel')
|
||||||
/>
|
: $t('switchOffLabel')
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
</q-toggle>
|
||||||
</div>
|
</div>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
@ -214,11 +217,7 @@ defineEmits<{
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<div v-for="(d, j) in v.detail" :key="j">
|
<div v-for="(d, j) in v.detail" :key="j">
|
||||||
<span
|
<span class="app-text-muted-2">
|
||||||
:style="{
|
|
||||||
color: $q.dark.isActive ? 'var(--foreground)' : 'var(--stone-7)',
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
{{ d.label }}
|
{{ d.label }}
|
||||||
</span>
|
</span>
|
||||||
<span>{{ d.value || '-' }}</span>
|
<span>{{ d.value || '-' }}</span>
|
||||||
|
|
|
||||||
|
|
@ -136,6 +136,10 @@ onMounted(async () => {
|
||||||
const user = getUsername();
|
const user = getUsername();
|
||||||
const uid = getUserId();
|
const uid = getUserId();
|
||||||
|
|
||||||
|
userStore.userOption.roleOpts.length === 0
|
||||||
|
? await userStore.fetchRoleOption()
|
||||||
|
: '';
|
||||||
|
|
||||||
const userRoles = getRole();
|
const userRoles = getRole();
|
||||||
if (userRoles) {
|
if (userRoles) {
|
||||||
filterRole.value = userRoles.filter(
|
filterRole.value = userRoles.filter(
|
||||||
|
|
|
||||||
|
|
@ -739,9 +739,9 @@ watch(
|
||||||
<div class="q-ma-md">
|
<div class="q-ma-md">
|
||||||
<AppBox class="surface-1" style="padding: 0">
|
<AppBox class="surface-1" style="padding: 0">
|
||||||
<PersonCard
|
<PersonCard
|
||||||
noHover
|
no-hover
|
||||||
noAction
|
no-action
|
||||||
noDetail
|
no-detail
|
||||||
no-bg
|
no-bg
|
||||||
:list="infoPersonCard"
|
:list="infoPersonCard"
|
||||||
:gridColumns="1"
|
:gridColumns="1"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue