refactor: ลบโค้คไม่ได้ใช้
This commit is contained in:
parent
27ccda97f1
commit
59d56329b6
1 changed files with 0 additions and 142 deletions
|
|
@ -1431,152 +1431,10 @@ watch(locale, () => {
|
|||
</template>
|
||||
</q-table>
|
||||
</div>
|
||||
|
||||
<!-- <BranchCard
|
||||
class="col-6"
|
||||
:id="`branch-card-${item.name}`"
|
||||
v-for="item in treeData
|
||||
.flatMap((v) => [v, ...v.branch])
|
||||
.filter((v) => {
|
||||
if (
|
||||
statusFilter === 'statusACTIVE' &&
|
||||
v.status === 'INACTIVE'
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
statusFilter === 'statusINACTIVE' &&
|
||||
v.status !== 'INACTIVE'
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const terms = `${v.code} ${$i18n.locale === 'en-US' ? v.nameEN : v.name} ${v.telephoneNo}`;
|
||||
if (inputSearch && !terms.includes(inputSearch)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!!currentHq.id && currentHq.id === v.headOfficeId) {
|
||||
console.log('ทำงาน');
|
||||
|
||||
return true;
|
||||
}
|
||||
if (fieldSelectedBranch.value === 'all') return true;
|
||||
if (fieldSelectedBranch.value === 'branchHQLabel')
|
||||
return v.isHeadOffice;
|
||||
if (fieldSelectedBranch.value === 'branchLabel')
|
||||
return !v.isHeadOffice;
|
||||
|
||||
return false;
|
||||
})"
|
||||
@click="
|
||||
() => {
|
||||
if (item.isHeadOffice) {
|
||||
fieldSelectedBranch.value = '';
|
||||
inputSearch = '';
|
||||
currentHq = { id: item.id, code: item.code };
|
||||
beforeBranch = {
|
||||
id: '',
|
||||
code: '',
|
||||
};
|
||||
}
|
||||
}
|
||||
"
|
||||
:metadata="item"
|
||||
:color="item.isHeadOffice ? 'hq' : 'br'"
|
||||
:key="item.id"
|
||||
:data="{
|
||||
branchLabelCode: item.code,
|
||||
branchLabelName:
|
||||
$i18n.locale === 'en-US' ? item.nameEN : item.name,
|
||||
branchLabelTel: item.contact
|
||||
.map((c) => c.telephoneNo)
|
||||
.join(','),
|
||||
branchLabelAddress:
|
||||
$i18n.locale === 'en-US'
|
||||
? `${item.addressEN || ''} ${item.subDistrict?.nameEN || ''} ${item.district?.nameEN || ''} ${item.province?.nameEN || ''}`
|
||||
: `${item.address || ''} ${item.subDistrict?.name || ''} ${item.district?.name || ''} ${item.province?.name || ''}`,
|
||||
branchLabelType: $t(
|
||||
item.isHeadOffice ? 'branchHQLabel' : 'branchLabel',
|
||||
),
|
||||
}"
|
||||
:field-selected="fieldSelected"
|
||||
:badge-field="['branchLabelStatus']"
|
||||
:inactive="item.status === 'INACTIVE'"
|
||||
@view-detail="
|
||||
(v) => {
|
||||
triggerEdit(
|
||||
'drawer',
|
||||
v.id,
|
||||
v.isHeadOffice ? 'headOffice' : 'subBranch',
|
||||
v.code,
|
||||
);
|
||||
}
|
||||
"
|
||||
/> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</q-splitter>
|
||||
|
||||
<!-- <div class="tree-container bordered-r surface-2">
|
||||
<div class="row">
|
||||
<button
|
||||
style="border: none; background: transparent"
|
||||
:class="{ 'cursor-pointer': !!currentHq.id }"
|
||||
id="br-prev"
|
||||
>
|
||||
<Icon
|
||||
icon="ep:arrow-left-bold"
|
||||
width="21px"
|
||||
:class="{ 'app-text-muted': !currentHq.id }"
|
||||
@click="
|
||||
() => {
|
||||
if (currentHq.id) {
|
||||
beforeBranch = currentHq;
|
||||
currentHq = { id: '', code: '' };
|
||||
fieldSelectedBranch = {
|
||||
label: $t('branchHQLabel'),
|
||||
value: 'branchHQLabel',
|
||||
};
|
||||
}
|
||||
}
|
||||
"
|
||||
/>
|
||||
</button>
|
||||
|
||||
<button
|
||||
style="border: none; background: transparent; padding: 0"
|
||||
:class="{ 'cursor-pointer': !!beforeBranch.id }"
|
||||
id="br-next"
|
||||
>
|
||||
<Icon
|
||||
icon="ep:arrow-right-bold"
|
||||
width="21px"
|
||||
:class="{
|
||||
'app-text-muted': !beforeBranch.id,
|
||||
}"
|
||||
@click="
|
||||
() => {
|
||||
if (beforeBranch.id) {
|
||||
currentHq = beforeBranch;
|
||||
beforeBranch = { id: '', code: '' };
|
||||
fieldSelectedBranch = {
|
||||
label: '',
|
||||
value: '',
|
||||
};
|
||||
}
|
||||
}
|
||||
"
|
||||
/>
|
||||
</button>
|
||||
|
||||
<q-space />
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- ssssssssssssssssssss -->
|
||||
|
||||
<!-- ---- -->
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue