refactor: add hideDelete prop to various components and update delete button visibility logic
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s
This commit is contained in:
parent
f646b3c9ba
commit
a5791a1b54
7 changed files with 40 additions and 57 deletions
|
|
@ -102,7 +102,13 @@ const telephoneNo = defineModel<string>('telephoneNo', { default: '' });
|
|||
class="col-md-6"
|
||||
:readonly
|
||||
:disabled="
|
||||
!isRoleInclude(['admin', 'system', 'head_of_admin']) && !readonly
|
||||
!isRoleInclude([
|
||||
'admin',
|
||||
'system',
|
||||
'head_of_admin',
|
||||
'executive',
|
||||
'accountant',
|
||||
]) && !readonly
|
||||
"
|
||||
:label="$t('customer.form.registeredBranch')"
|
||||
select-first-value
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ withDefaults(
|
|||
actionDisabled?: boolean;
|
||||
customerType?: 'CORP' | 'PERS';
|
||||
hideAction?: boolean;
|
||||
hideDelete?: boolean;
|
||||
}>(),
|
||||
{
|
||||
hideAction: false,
|
||||
|
|
@ -81,7 +82,7 @@ withDefaults(
|
|||
/>
|
||||
<DeleteButton
|
||||
icon-only
|
||||
v-if="readonly"
|
||||
v-if="readonly && !hideDelete"
|
||||
@click="$emit('delete')"
|
||||
type="button"
|
||||
:disabled="actionDisabled"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue