feat: hide stat 03 customer
This commit is contained in:
parent
bb58273d74
commit
aa5fbb4fa8
3 changed files with 70 additions and 36 deletions
|
|
@ -60,7 +60,7 @@ export default {
|
||||||
person: 'Person',
|
person: 'Person',
|
||||||
recordsPage: 'Showing {resultcurrentPage} out of {total} records',
|
recordsPage: 'Showing {resultcurrentPage} out of {total} records',
|
||||||
showing: 'Showing',
|
showing: 'Showing',
|
||||||
|
dataSum: 'Data Summaries',
|
||||||
...status,
|
...status,
|
||||||
...main,
|
...main,
|
||||||
...address,
|
...address,
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@ export default {
|
||||||
person: 'คน',
|
person: 'คน',
|
||||||
recordsPage: 'แสดง {resultcurrentPage} รายการจาก {total} รายการ',
|
recordsPage: 'แสดง {resultcurrentPage} รายการจาก {total} รายการ',
|
||||||
showing: 'แสดงทีละ',
|
showing: 'แสดงทีละ',
|
||||||
|
dataSum: 'สรุปจำนวนข้อมูล',
|
||||||
...status,
|
...status,
|
||||||
...main,
|
...main,
|
||||||
...address,
|
...address,
|
||||||
|
|
|
||||||
|
|
@ -242,6 +242,7 @@ const formDataEmployee = ref<EmployeeCreate>({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const hideStat = ref(false);
|
||||||
const branchOption = ref<{ id: string; name: string }[]>();
|
const branchOption = ref<{ id: string; name: string }[]>();
|
||||||
const indexTab = ref<number>(0);
|
const indexTab = ref<number>(0);
|
||||||
const statusToggle = ref<boolean>(false);
|
const statusToggle = ref<boolean>(false);
|
||||||
|
|
@ -1332,44 +1333,62 @@ watch([inputSearch, currentStatus], async () => {
|
||||||
|
|
||||||
<div class="column full-height no-wrap">
|
<div class="column full-height no-wrap">
|
||||||
<div v-if="isMainPage" class="column full-height">
|
<div v-if="isMainPage" class="column full-height">
|
||||||
|
<div class="text-body-2 q-mb-xs flex items-center">
|
||||||
|
{{ $t('dataSum') }}
|
||||||
|
<q-btn
|
||||||
|
class="q-ml-xs"
|
||||||
|
icon="mdi-pin"
|
||||||
|
color="primary"
|
||||||
|
size="sm"
|
||||||
|
flat
|
||||||
|
dense
|
||||||
|
rounded
|
||||||
|
@click="hideStat = !hideStat"
|
||||||
|
:style="hideStat ? 'rotate: 90deg' : ''"
|
||||||
|
style="transition: 0.1s ease-in-out"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row full-width">
|
<div class="row full-width">
|
||||||
<!-- stat -->
|
<!-- stat -->
|
||||||
<div class="col-12 q-mb-md">
|
<transition name="slide">
|
||||||
<div class="scroll">
|
<div v-if="!hideStat" class="col-12 q-mb-md">
|
||||||
<StatCardComponent
|
<div class="scroll">
|
||||||
v-if="customerStats"
|
<StatCardComponent
|
||||||
labelI18n
|
v-if="customerStats"
|
||||||
:branch="
|
labelI18n
|
||||||
customerStats &&
|
:branch="
|
||||||
(selectorLabel === 'EMPLOYER'
|
customerStats &&
|
||||||
? customerStats.map((v) => ({
|
(selectorLabel === 'EMPLOYER'
|
||||||
count:
|
? customerStats.map((v) => ({
|
||||||
v.name === 'CORP'
|
count:
|
||||||
? statsCustomerType?.CORP ?? 0
|
v.name === 'CORP'
|
||||||
: statsCustomerType?.PERS ?? 0,
|
? statsCustomerType?.CORP ?? 0
|
||||||
label:
|
: statsCustomerType?.PERS ?? 0,
|
||||||
v.name === 'CORP'
|
label:
|
||||||
? 'customerLegalEntity'
|
v.name === 'CORP'
|
||||||
: 'customerNaturalPerson',
|
? 'customerLegalEntity'
|
||||||
icon:
|
: 'customerNaturalPerson',
|
||||||
v.name === 'CORP'
|
icon:
|
||||||
? 'mdi-office-building'
|
v.name === 'CORP'
|
||||||
: 'mdi-account',
|
? 'mdi-office-building'
|
||||||
color: v.name === 'CORP' ? 'purple' : 'green',
|
: 'mdi-account',
|
||||||
}))
|
color: v.name === 'CORP' ? 'purple' : 'green',
|
||||||
: [
|
}))
|
||||||
{
|
: [
|
||||||
label: 'EMPLOYEE',
|
{
|
||||||
count: statsEmployee,
|
label: 'EMPLOYEE',
|
||||||
icon: 'mdi-account',
|
count: statsEmployee,
|
||||||
color: 'pink',
|
icon: 'mdi-account',
|
||||||
},
|
color: 'pink',
|
||||||
])
|
},
|
||||||
"
|
])
|
||||||
:dark="$q.dark.isActive"
|
"
|
||||||
/>
|
:dark="$q.dark.isActive"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- main -->
|
<!-- main -->
|
||||||
|
|
@ -3050,4 +3069,18 @@ watch([inputSearch, currentStatus], async () => {
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
box-shadow: var(--shadow-3);
|
box-shadow: var(--shadow-3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.slide-enter-active {
|
||||||
|
transition: all 0.1s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide-leave-active {
|
||||||
|
transition: all 0.1s cubic-bezier(1, 0.5, 0.8, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide-enter-from,
|
||||||
|
.slide-leave-to {
|
||||||
|
transform: translateY(-20px);
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue