fix: employee handle tab

This commit is contained in:
puriphatt 2024-06-12 08:48:04 +00:00
parent ad942e7035
commit f5a746e84c

View file

@ -829,6 +829,7 @@ async function assignFormDataEmployee(id: string) {
citizenId: fetchOther.citizenId,
};
formDataEmployeeTab.value = 'personalInfo';
currentEmployee.value = foundEmployee;
profileUrl.value = foundEmployee.profileImageUrl;
profileSubmit.value = true;
@ -994,7 +995,7 @@ watch(fieldSelectedCustomer, async () => {
</div>
<div class="row full-width" style="overflow-x: auto">
<StatCardComponent
v-if="customerStats"
v-if="customerStats && selectorLabel === 'EMPLOYER'"
labelI18n
:branch="
customerStats.map((v) => ({
@ -1012,6 +1013,26 @@ watch(fieldSelectedCustomer, async () => {
:dark="$q.dark.isActive"
class="no-wrap"
/>
<StatCardComponent
v-if="customerStats && selectorLabel === 'EMPLOYEE'"
labelI18n
:branch="
customerStats.map((v) => ({
count:
v.name === 'CORP'
? statsCustomerType?.CORP ?? 0
: statsCustomerType?.PERS ?? 0,
label:
v.name === 'CORP'
? 'customerLegalEntity'
: 'customerNaturalPerson',
color: v.name === 'CORP' ? 'pink' : 'green',
}))
"
:dark="$q.dark.isActive"
class="no-wrap"
/>
</div>
</AppBox>
</div>