feat: refactor delete button rendering logic in MainPage component
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s

This commit is contained in:
puriphatt 2025-07-09 10:33:56 +07:00
parent 4a195494d6
commit 14487ed849

View file

@ -2272,17 +2272,22 @@ watch(currentHq, () => {
@click="drawerEdit()" @click="drawerEdit()"
type="button" type="button"
/> />
<DeleteButton
<template
v-if=" v-if="
formType !== 'edit' && formTypeBranch === 'headOffice' formType !== 'edit' && formTypeBranch === 'headOffice'
? isRoleInclude(['system']) ? isRoleInclude(['system'])
: canAccess('branch', 'create') : canAccess('branch', 'create')
" "
id="btn-info-basic-delete" >
icon-only <DeleteButton
@click="triggerDelete(currentEdit.id)" v-if="formType !== 'edit'"
type="button" id="btn-info-basic-delete"
/> icon-only
@click="triggerDelete(currentEdit.id)"
type="button"
/>
</template>
</div> </div>
</div> </div>
<div <div