feat: add Kaisertisch feature with view and integration in DiaryView
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 56s

This commit is contained in:
Torsten Schulz (local)
2026-08-14 12:28:33 +02:00
parent 09b7788fdf
commit 3320884cef
4 changed files with 218 additions and 0 deletions

View File

@@ -65,6 +65,7 @@ export const SIDEBAR_NAVIGATION = {
items: [
{ to: '/members', icon: '👥', labelKey: 'navigation.members', permission: ['members', 'read'] },
{ to: '/diary', icon: '📝', labelKey: 'navigation.diary', permission: ['diary', 'read'] },
{ to: '/kaisertisch', icon: '🏓', label: 'Kaisertisch' },
{
to: '/calendar',
icon: '📆',

View File

@@ -18,6 +18,7 @@ const CreateClub = () => import('./views/CreateClub.vue');
const ClubView = () => import('./views/ClubView.vue');
const MembersView = () => import('./views/MembersView.vue');
const DiaryView = () => import('./views/DiaryView.vue');
const KaisertischView = () => import('./views/KaisertischView.vue');
const CalendarView = () => import('./views/CalendarView.vue');
const PendingApprovalsView = () => import('./views/PendingApprovalsView.vue');
const ScheduleView = () => import('./views/ScheduleView.vue');
@@ -175,6 +176,7 @@ const routes = [
{ path: '/showclub/:clubId', name: 'show-club', component: ClubView, meta: withMeta({ products: fullAppProducts }) },
{ path: '/members', name: 'members', component: MembersView, meta: withMeta({ products: fullAppProducts, permission: ['members', 'read'] }) },
{ path: '/diary', name: 'diary', component: DiaryView, meta: withMeta({ products: trainerOnly }) },
{ path: '/kaisertisch', name: 'kaisertisch', component: KaisertischView, meta: withMeta({ products: trainerOnly }) },
{ path: '/calendar', name: 'calendar', component: CalendarView, meta: withMeta({ products: allProducts, anyPermission: [['diary', 'read'], ['schedule', 'read'], ['tournaments', 'read']] }) },
{ path: '/pending-approvals', name: 'pending-approvals', component: PendingApprovalsView, meta: withMeta({ products: fullAppProducts, capability: 'approvals' }) },
{ path: '/schedule', name: 'schedule', component: ScheduleView, meta: withMeta({ products: fullAppProducts, permission: ['schedule', 'read'] }) },

View File

@@ -179,6 +179,14 @@
>
{{ $t('diary.trainingDaySummaryPdfShort') }}
</button>
<button
v-if="date && date.id"
type="button"
aria-label="Kaisertisch für diesen Trainingstag starten"
@click="startKaisertisch"
>
🏓 Kaisertisch starten
</button>
</div>
</div>
<div style="overflow: visible; position: relative;">
@@ -2964,6 +2972,10 @@ export default {
pdf.addTrainingPlan(this.currentClubName, this.date.date, this.trainingStart, this.trainingEnd, this.trainingPlan);
pdf.save('trainingsplan.pdf');
},
startKaisertisch() {
if (!this.date?.id) return;
this.$router.push({ path: '/kaisertisch', query: { dateId: String(this.date.id) } });
},
async generateTrainingDayPDF() {
if (!this.date || !this.participants || this.participants.length === 0) {
this.showInfo('Fehler', 'Keine Teilnehmer für diesen Trainingstag vorhanden.', '', 'error');

File diff suppressed because one or more lines are too long