refactor: show title

This commit is contained in:
Thanaphon Frappet 2024-10-01 11:31:42 +07:00
parent d3d73f79d0
commit dab544512c
2 changed files with 40 additions and 0 deletions

View file

@ -13,6 +13,7 @@ const props = defineProps<{
readonly?: boolean; readonly?: boolean;
prefixId?: string; prefixId?: string;
customerType?: 'PERS' | 'CORP'; customerType?: 'PERS' | 'CORP';
showTitle?: boolean;
}>(); }>();
const optionStore = useOptionStore(); const optionStore = useOptionStore();
@ -95,6 +96,29 @@ watch(
<template> <template>
<div class="row q-col-gutter-sm"> <div class="row q-col-gutter-sm">
<div
v-if="showTitle"
class="col-12 text-weight-bold text-body1 row items-center"
>
<q-icon
flat
size="xs"
class="q-pa-sm rounded q-mr-xs"
color="info"
name="mdi-briefcase-outline"
style="background-color: var(--surface-3)"
/>
<span>
{{
$t('form.customerInformation', {
msg: $t(
`${customerType === 'CORP' ? 'customer.employerLegalEntity' : 'customer.employerNaturalPerson'}`,
),
})
}}
</span>
</div>
<template v-if="customerType === 'CORP'"> <template v-if="customerType === 'CORP'">
<div class="col-12 row q-col-gutter-sm"> <div class="col-12 row q-col-gutter-sm">
<q-input <q-input

View file

@ -28,6 +28,7 @@ defineProps<{
outlined?: boolean; outlined?: boolean;
readonly?: boolean; readonly?: boolean;
prefixId: string; prefixId: string;
showTitle?: boolean;
}>(); }>();
onMounted(async () => { onMounted(async () => {
@ -102,6 +103,21 @@ let jobPositionENFilter = selectFilterOptionRefMod(
</script> </script>
<template> <template>
<div class="col-12 row q-col-gutter-sm"> <div class="col-12 row q-col-gutter-sm">
<div
v-if="showTitle"
class="col-12 text-weight-bold text-body1 row items-center"
>
<q-icon
flat
size="xs"
class="q-pa-sm rounded q-mr-xs"
color="info"
name="mdi-briefcase-outline"
style="background-color: var(--surface-3)"
/>
<span>{{ $t('customerBranch.tab.business') }}</span>
</div>
<q-select <q-select
outlined outlined
clearable clearable