refactor: add single prop to conditionally render bank form elements

This commit is contained in:
puriphatt 2025-04-08 12:09:56 +07:00
parent ace3af2a4b
commit 3efe8e19f4

View file

@ -36,6 +36,7 @@ defineProps<{
outlined?: boolean;
readonly?: boolean;
view?: boolean;
single?: boolean;
}>();
defineEmits<{
@ -121,7 +122,7 @@ watch(
/>
{{ $t(`${title}`) }}
<AddButton
v-if="!readonly"
v-if="!readonly && !single"
id="btn-add-bank"
icon-only
class="q-ml-sm"
@ -141,7 +142,10 @@ watch(
style="padding-block: 0.01px"
spaced="lg"
/>
<span class="col-12 app-text-muted-2 flex justify-between items-center">
<span
v-if="!single"
class="col-12 app-text-muted-2 flex justify-between items-center"
>
{{ `${$t('branch.form.bankAccountNo')} ${i + 1}` }}
<div class="row items-center">
<div style="height: 30.8px" />
@ -172,6 +176,7 @@ watch(
</span>
<div
v-if="!single"
class="bordered q-mr-sm rounded col text-center overflow-hidden"
:class="{ 'pointer-none': readonly, 'q-my-sm': $q.screen.lt.md }"
>