refactor(04): remove type from 04

This commit is contained in:
puriphatt 2024-09-04 09:48:29 +07:00
parent 2e72cb3071
commit eec5325806
4 changed files with 420 additions and 326 deletions

View file

@ -51,7 +51,10 @@ defineEmits<{
class="full-width q-py-xs"
:class="{
'clickable-node': typeTree === 'product' || node.isHeadOffice,
'cursor-pointer': node.type === 'group' || node.type === 'type',
'cursor-pointer':
node.type === 'group' ||
node.type === 'type' ||
node.type === 'productService',
'active-node': expandedTree[expandedTree.length - 1] === node.id,
}"
v-touch-hold.mouse="() => $emit('handleHold', node)"
@ -65,7 +68,7 @@ defineEmits<{
<div class="row col items-center justify-between full-width no-wrap">
<q-icon
v-if="
(node.type === 'group' && node._count.type > 0) ||
node.type === 'group' ||
(node.isHeadOffice && node._count.branch !== 0)
"
name="mdi-triangle-down"
@ -75,7 +78,10 @@ defineEmits<{
/>
<div
class="col row"
:class="{ 'q-pl-sm': node.type === 'type' }"
:class="{
'q-pl-sm q-py-xs':
node.type === 'type' || node.type === 'productService',
}"
:style="`padding-left:${(node.type === 'group' && node._count.type === 0) || (node.isHeadOffice && node._count.branch === 0) ? '36px' : ''}`"
>
<span
@ -101,7 +107,7 @@ defineEmits<{
>
<slot></slot>
<q-btn
v-if="typeTree === 'product'"
v-if="typeTree === 'product' && !node.actionDisabled"
icon="mdi-eye-outline"
:id="`btn-tree-eye-${node.name}`"
size="sm"