release v2.0.0 #4

Merged
crimsen merged 481 commits from develop into master 2024-01-18 15:15:08 +00:00
4 changed files with 31 additions and 32 deletions
Showing only changes of commit 9b273c2501 - Show all commits

View File

@ -3,7 +3,7 @@
<q-page padding>
<q-card>
<q-card-section>
<q-table :data="rows" row-key="userid" :columns="columns" />
<q-table :rows="rows" row-key="userid" :columns="columns" />
</q-card-section>
</q-card>
</q-page>
@ -32,28 +32,28 @@ export default defineComponent({
field: 'userid',
required: true,
align: 'left',
sortable: true,
sortable: true
},
{
name: 'credit',
label: 'Haben',
field: 'credit',
format: (val: number) => val.toFixed(2),
format: (val: number) => val.toFixed(2)
},
{
name: 'debit',
label: 'Soll',
field: 'debit',
format: (val: number) => val.toFixed(2),
format: (val: number) => val.toFixed(2)
},
{
name: 'balance',
label: 'Kontostand',
format: (_: undefined, row: { debit: number; credit: number }) =>
(row.credit - row.debit).toFixed(2),
},
(row.credit - row.debit).toFixed(2)
}
];
return { rows, columns };
},
}
});
</script>

View File

@ -10,7 +10,7 @@
<q-table
v-model:pagination="pagination"
title="Buchungen"
:data="data"
:rows="data"
:columns="columns"
row-key="id"
:loading="loading"
@ -50,7 +50,7 @@ export default defineComponent({
void userStore.getUsers().then(() =>
onRequest({
pagination: pagination.value,
filter: undefined,
filter: undefined
})
);
});
@ -63,7 +63,7 @@ export default defineComponent({
descending: false,
page: 1,
rowsPerPage: 3,
rowsNumber: 10,
rowsNumber: 10
});
interface PaginationInterface {
@ -87,7 +87,7 @@ export default defineComponent({
offset: startRow,
limit: fetchCount,
showCancelled: showCancelled.value,
showReversals: false,
showReversals: false
});
// clear out existing data and add new
data.value.splice(0, data.value.length, ...result.transactions);
@ -112,7 +112,7 @@ export default defineComponent({
field: 'time',
required: true,
sortable: true,
format: (val: Date) => formatDateTime(new Date(val), true, true, true),
format: (val: Date) => formatDateTime(new Date(val), true, true, true)
},
{
name: 'type',
@ -126,7 +126,7 @@ export default defineComponent({
else return 'Gesendet an X';
}
}
},
}
},
{
name: 'text',
@ -140,13 +140,13 @@ export default defineComponent({
else return 'Gesendet an X';
}
}
},
}
},
{
name: 'amount',
label: 'Betrag',
field: 'amount',
format: (val: number) => `${val.toFixed(2)}`,
format: (val: number) => `${val.toFixed(2)}`
},
{
name: 'author_id',
@ -156,11 +156,11 @@ export default defineComponent({
const user = userStore.users.filter((x) => x.userid == val);
if (user.length > 0) return user[0].display_name;
else return val;
},
},
}
}
];
return { data, pagination, onRequest, loading, balance, columns, showCancelled };
},
}
});
</script>

View File

@ -16,7 +16,7 @@
</q-dialog>
<q-page padding>
<q-table title="Getränkearten" :data="rows" :row-key="(row) => row.id" :columns="columns">
<q-table title="Getränkearten" :rows="rows" :row-key="(row) => row.id" :columns="columns">
<template #top-right>
<q-input
v-model="newDrinkType"
@ -63,7 +63,6 @@ export default defineComponent({
console.log(store);
void store.getDrinkTypes();
});
const rows = computed(() => store.drinkTypes);
const columns = [
{
@ -71,14 +70,14 @@ export default defineComponent({
label: 'Getränkeart',
field: 'name',
align: 'left',
sortable: true,
sortable: true
},
{
name: 'actions',
label: 'Aktionen',
field: 'actions',
align: 'right',
},
align: 'right'
}
];
async function addType() {
@ -95,7 +94,7 @@ export default defineComponent({
try {
await store.changeDrinkTypeName({
id: actualDrinkType.value.id,
name: newDrinkTypeName.value,
name: newDrinkTypeName.value
});
} catch (e) {}
discardChanges();
@ -122,9 +121,9 @@ export default defineComponent({
actualDrinkType,
newDrinkTypeName,
discardChanges,
saveChanges,
saveChanges
};
},
}
});
</script>

View File

@ -1,6 +1,6 @@
<template>
<div>
<q-table title="Getränke" :columns="columns" :data="drinks" row-key="name">
<q-table title="Getränke" :columns="columns" :rows="drinks" row-key="name">
<template #body-cell-prices="{ row: { prices } }">
<q-td>
<div v-for="price in prices" :key="price.id" class="row">
@ -34,7 +34,7 @@ export default defineComponent({
},
setCurrency(price: number) {
return `${price.toFixed(2)}`;
},
}
},
setup() {
const store = usePricelistStore();
@ -47,15 +47,15 @@ export default defineComponent({
{
name: 'name',
label: 'Getränk',
field: 'name',
field: 'name'
},
{
name: 'prices',
label: 'Preise',
field: 'prices',
},
field: 'prices'
}
];
return { columns, drinks };
},
}
});
</script>