Compare commits

...

3 Commits

Author SHA1 Message Date
Tim Gröger 38480a1eec update to v1.0.0-alpha.9 2023-05-16 00:04:42 +02:00
Tim Gröger f0e07138b1 fixed intput theming 2023-05-15 10:32:31 +02:00
Tim Gröger ba7013ac67 add show sended invitation to query 2023-05-13 00:06:27 +02:00
4 changed files with 26 additions and 8 deletions

View File

@ -1,6 +1,6 @@
[metadata]
license = MIT
version = 1.0.0-alpha.8
version = 1.0.0-alpha.9
name = flaschengeist-events
description = Events plugin for Flaschengeist
url = https://flaschengeist.dev/Flaschengeist/flaschengeist-schedule

View File

@ -1,6 +1,6 @@
{
"license": "MIT",
"version": "1.0.0-alpha.8",
"version": "1.0.0-alpha.9",
"name": "@flaschengeist/schedule",
"author": "Ferdinand Thiessen <rpm@fthiessen.de>",
"homepage": "https://flaschengeist.dev/Flaschengeist",

View File

@ -30,10 +30,17 @@
<q-table :title="title" :rows="rows" row-key="id" :columns="columns">
<template #top-right>
<q-input ref="input" v-model="actualType.name" :rules="rules" dense placeholder="Neuer Typ">
<slot name="after"
><q-btn color="primary" icon="mdi-plus" title="Hinzufügen" @click="addType"
/></slot>
<q-input
ref="input"
v-model="actualType.name"
:rules="rules"
dense
filled
placeholder="Neuer Typ"
>
<template #after
><q-btn color="primary" icon="mdi-plus" title="Hinzufügen" round @click="addType"
/></template>
</q-input>
</template>
<template #body-cell-actions="props">

View File

@ -56,6 +56,7 @@
<script lang="ts">
import { formatStartEnd, useMainStore, useUserStore } from '@flaschengeist/api';
import { computed, defineComponent, ref, onBeforeMount, watch } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { QTableProps } from 'quasar';
import { Job } from '../store/models';
import { useEventStore } from '../store';
@ -67,6 +68,8 @@ export default defineComponent({
const store = useEventStore();
const userStore = useUserStore();
const mainStore = useMainStore();
const router = useRouter();
const route = useRoute();
interface RowData extends FG.Invitation {
inviter: FG.User;
@ -155,7 +158,12 @@ export default defineComponent({
.finally(() => (loading.value = false));
};
onBeforeMount(() => {
onBeforeMount(async () => {
if (route.query.sent === 'true') {
showSent.value = true;
}
void Promise.allSettled([
userStore.getUsers(),
store.getInvitations(),
@ -165,10 +173,13 @@ export default defineComponent({
);
});
watch(showSent, () => {
watch(showSent, async () => {
onRequest({ pagination: pagination.value, filter: () => [], getCellValue: () => [] });
await router.replace({ query: { sent: showSent.value ? 'true' : 'false' } });
});
function getType(row: RowData) {
var idx = row.transferee === undefined ? 0 : 1;
if (row.inviter.userid === mainStore.currentUser.userid) idx += 2;