fix: แก้เงื่อนไขการแสดงปุ่ม add

This commit is contained in:
Net 2024-06-14 09:22:34 +07:00
parent 24a491288a
commit 83d58ab92a

View file

@ -6,6 +6,8 @@ import { Pagination } from 'src/stores/types';
import useCustomerStore from 'src/stores/customer'; import useCustomerStore from 'src/stores/customer';
import useEmployeeStore from 'src/stores/employee'; import useEmployeeStore from 'src/stores/employee';
import { Status } from 'src/stores/types';
import ButtonAddComponent from 'src/components/ButtonAddCompoent.vue'; import ButtonAddComponent from 'src/components/ButtonAddCompoent.vue';
import PersonCard from 'components/home/PersonCard.vue'; import PersonCard from 'components/home/PersonCard.vue';
import UsersDetailCardComponent from 'src/components/UsersDetailCardComponent.vue'; import UsersDetailCardComponent from 'src/components/UsersDetailCardComponent.vue';
@ -1134,7 +1136,7 @@ watch(genderselector, async (gender) => {
</script> </script>
<template> <template>
<ButtonAddComponent style="z-index: 999" v-if="selectorLabel !== 'EMPLOYER'"> <ButtonAddComponent style="z-index: 999" v-if="selectorLabel === 'EMPLOYER'">
<q-fab-action <q-fab-action
style="color: white; background-color: hsla(var(--purple-11-hsl))" style="color: white; background-color: hsla(var(--purple-11-hsl))"
@click="triggerCreate('CORP')" @click="triggerCreate('CORP')"
@ -1145,7 +1147,6 @@ watch(genderselector, async (gender) => {
label-position="left" label-position="left"
/> />
<q-fab-action <q-fab-action
v-if="selectorLabel === 'EMPLOYER'"
:label="$t('add') + ' ' + $t('customerNaturalPerson')" :label="$t('add') + ' ' + $t('customerNaturalPerson')"
external-label external-label
label-position="left" label-position="left"
@ -1156,7 +1157,7 @@ watch(genderselector, async (gender) => {
></q-fab-action> ></q-fab-action>
</ButtonAddComponent> </ButtonAddComponent>
<ButtonAddComponent style="z-index: 999" v-if="selectorLabel === 'EMPLOYER'"> <ButtonAddComponent style="z-index: 999" v-if="selectorLabel === 'EMPLOYEE'">
<q-fab-action <q-fab-action
:label="$t('add') + ' ' + $t('EMPLOYEE')" :label="$t('add') + ' ' + $t('EMPLOYEE')"
external-label external-label