[balance] fix context to add shortcuts
This commit is contained in:
parent
561025d646
commit
ca9e4bdbcb
|
@ -13,9 +13,9 @@
|
|||
:label="shortcut.toFixed(2).toString() + ' €'"
|
||||
@click="changeBalance(shortcut)"
|
||||
>
|
||||
<q-popup-proxy context-menu>
|
||||
<q-menu anchor="bottom middle" self="top middle" context-menu>
|
||||
<q-btn label="Entfernen" @click="removeShortcut(shortcut)" />
|
||||
</q-popup-proxy>
|
||||
</q-menu>
|
||||
<q-tooltip>Rechtsklick um Verknüpfung zu entfernen</q-tooltip>
|
||||
</q-btn>
|
||||
</div></q-card-section
|
||||
|
|
|
@ -18,8 +18,10 @@
|
|||
label="Anschreiben"
|
||||
@click="changeBalance(amount * -1)"
|
||||
>
|
||||
<q-tooltip>Rechtsklick um Betrag als Verknüpfung hinzuzufügen</q-tooltip>
|
||||
<q-menu context-menu>
|
||||
<q-tooltip v-if="canAddShortcut">
|
||||
Rechtsklick um Betrag als Verknüpfung hinzuzufügen
|
||||
</q-tooltip>
|
||||
<q-menu v-if="canAddShortcut" anchor="bottom middle" self="top middle" context-menu>
|
||||
<q-btn label="neue Verknüpfung" @click="addShortcut"></q-btn>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
|
@ -49,6 +51,10 @@ export default defineComponent({
|
|||
type: [Object, String] as PropType<FG.User | string>,
|
||||
required: true,
|
||||
},
|
||||
canAddShortcut: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
emits: {
|
||||
changeBalance: (user: FG.User) => user,
|
||||
|
|
|
@ -29,7 +29,11 @@
|
|||
<q-card-section>
|
||||
<q-tab-panels v-model="tab" animated>
|
||||
<q-tab-panel name="add" class="fit column q-gutter-sm">
|
||||
<balance-add-body :user="props.row.userid" @changeBalance="updateBalance" />
|
||||
<balance-add-body
|
||||
:user="props.row.userid"
|
||||
:can-add-shortcut="false"
|
||||
@changeBalance="updateBalance"
|
||||
/>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="transfer" class="fit column q-gutter-sm">
|
||||
<balance-transfer-body
|
||||
|
|
Loading…
Reference in New Issue