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