refactor: ตรวจสอบเงื่อนไขการกด
This commit is contained in:
parent
015673032b
commit
99e26e4ad2
1 changed files with 7 additions and 21 deletions
|
|
@ -987,11 +987,12 @@ watch(locale, () => {
|
|||
<q-tr
|
||||
:class="{
|
||||
'app-text-muted': props.row.status === 'INACTIVE',
|
||||
'cursor-pointer': props.row._count.branch !== 0,
|
||||
}"
|
||||
:props="props"
|
||||
@click="
|
||||
() => {
|
||||
if (props.row.isHeadOffice) {
|
||||
if (props.row.isHeadOffice && props.row._count.branch !==0) {
|
||||
fieldSelectedBranch.value = '';
|
||||
inputSearch = '';
|
||||
currentHq = {
|
||||
|
|
@ -1059,25 +1060,7 @@ watch(locale, () => {
|
|||
}}
|
||||
</q-td>
|
||||
<q-td>
|
||||
<q-btn
|
||||
icon="mdi-eye-outline"
|
||||
size="sm"
|
||||
dense
|
||||
round
|
||||
flat
|
||||
@click.stop="
|
||||
() => {
|
||||
triggerEdit(
|
||||
'drawer',
|
||||
props.row.id,
|
||||
props.row.isHeadOffice
|
||||
? 'headOffice'
|
||||
: 'subBranch',
|
||||
props.row.code,
|
||||
);
|
||||
}
|
||||
"
|
||||
/>
|
||||
|
||||
|
||||
<q-btn
|
||||
icon="mdi-dots-vertical"
|
||||
|
|
@ -1240,9 +1223,12 @@ watch(locale, () => {
|
|||
<div class="col-12 col-md-6">
|
||||
<BranchCard
|
||||
:id="`branch-card-${props.row.name}`"
|
||||
:class="{
|
||||
'cursor-pointer': props.row._count.branch !== 0,
|
||||
}"
|
||||
@click="
|
||||
() => {
|
||||
if (props.row.isHeadOffice) {
|
||||
if (props.row.isHeadOffice && props.row._count.branch !==0) {
|
||||
fieldSelectedBranch.value = '';
|
||||
inputSearch = '';
|
||||
currentHq = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue