Abänderungen
This commit is contained in:
parent
298e0ad6db
commit
02b38cbd8b
@ -68,6 +68,22 @@
|
|||||||
:rows-per-page-options="[0]"
|
:rows-per-page-options="[0]"
|
||||||
virtual-scroll
|
virtual-scroll
|
||||||
>
|
>
|
||||||
|
<template #body-cell-name="props">
|
||||||
|
<q-td
|
||||||
|
:props="props"
|
||||||
|
>
|
||||||
|
<q-btn
|
||||||
|
flat
|
||||||
|
color="red"
|
||||||
|
size="small"
|
||||||
|
padding="xs"
|
||||||
|
icon="delete"
|
||||||
|
:disabled="!wirdDieShiftTasteGehalten"
|
||||||
|
@click="personRausschmeißen(props.value)"
|
||||||
|
/>
|
||||||
|
{{ props.value }}
|
||||||
|
</q-td>
|
||||||
|
</template>
|
||||||
<template #body-cell-geblecht="props">
|
<template #body-cell-geblecht="props">
|
||||||
<q-td
|
<q-td
|
||||||
v-if="props.row.geblecht.length && witzigeEffekte"
|
v-if="props.row.geblecht.length && witzigeEffekte"
|
||||||
@ -132,13 +148,6 @@
|
|||||||
:disabled="!personenAuswähler"
|
:disabled="!personenAuswähler"
|
||||||
@click="geldBlechen"
|
@click="geldBlechen"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-btn
|
|
||||||
color="deep-orange"
|
|
||||||
label="Entfernen"
|
|
||||||
:disabled="!personenAuswähler"
|
|
||||||
@click="personRausschmeißen"
|
|
||||||
/>
|
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
@ -216,6 +225,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
// TODO: Multiselect wenn Geld blechen um nur bestimmte Personen mit einzubeziehen
|
||||||
|
|
||||||
import { computed, onMounted, ref } from 'vue';
|
import { computed, onMounted, ref } from 'vue';
|
||||||
|
|
||||||
const personen = ref({});
|
const personen = ref({});
|
||||||
@ -264,9 +275,13 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// function blechGründe (nameDerPerson) {
|
const wirdDieShiftTasteGehalten = ref(false);
|
||||||
// return personen.value[nameDerPerson].geblecht;
|
document.onkeydown = event => {
|
||||||
// }
|
wirdDieShiftTasteGehalten.value = event.shiftKey;
|
||||||
|
};
|
||||||
|
document.onkeyup = event => {
|
||||||
|
wirdDieShiftTasteGehalten.value = event.shiftKey;
|
||||||
|
};
|
||||||
|
|
||||||
function speicherLeute () {
|
function speicherLeute () {
|
||||||
localStorage.setItem('personen', JSON.stringify(personen.value));
|
localStorage.setItem('personen', JSON.stringify(personen.value));
|
||||||
@ -285,12 +300,8 @@ function personHinzufügen () {
|
|||||||
speicherLeute();
|
speicherLeute();
|
||||||
}
|
}
|
||||||
|
|
||||||
function personRausschmeißen () {
|
function personRausschmeißen (personenName) {
|
||||||
delete personen.value[personenAuswähler.value];
|
delete personen.value[personenName];
|
||||||
|
|
||||||
personenAuswähler.value = null;
|
|
||||||
grundEingabeFeld.value = '';
|
|
||||||
geldEingabeFeld.value = 0.0;
|
|
||||||
|
|
||||||
speicherLeute();
|
speicherLeute();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user