develop #9

Merged
walamana merged 26 commits from develop into main 2026-07-14 22:47:20 +02:00
Showing only changes of commit 5e854e4341 - Show all commits
+23 -1
View File
@@ -3,7 +3,7 @@ import {ref} from "vue"
import type {Gottesdienst, Mark, SimplifiedMinistrant} from "@/models/models" import type {Gottesdienst, Mark, SimplifiedMinistrant} from "@/models/models"
import GottesdienstCard from "@/components/GottesdienstCard.vue" import GottesdienstCard from "@/components/GottesdienstCard.vue"
defineProps<{ const props = defineProps<{
gottesdienste: Gottesdienst[] gottesdienste: Gottesdienst[]
ministranten: SimplifiedMinistrant[] ministranten: SimplifiedMinistrant[]
marks: Mark[] marks: Mark[]
@@ -22,6 +22,10 @@ const emit = defineEmits<{
}>() }>()
const activeTab = ref<"gottesdienste" | "ministranten">("gottesdienste") const activeTab = ref<"gottesdienste" | "ministranten">("gottesdienste")
function countXMarks(miniId: number): number {
return props.marks.filter(m => m.mid === miniId && m.value === 1).length
}
</script> </script>
<template> <template>
@@ -64,6 +68,7 @@ const activeTab = ref<"gottesdienste" | "ministranten">("gottesdienste")
<div v-for="mini in ministranten" :key="mini.id" class="mini-row"> <div v-for="mini in ministranten" :key="mini.id" class="mini-row">
<span class="mini-name">{{ mini.firstname }} {{ mini.lastname }}</span> <span class="mini-name">{{ mini.firstname }} {{ mini.lastname }}</span>
<span class="mini-username">@{{ mini.username }}</span> <span class="mini-username">@{{ mini.username }}</span>
<span class="x-count">{{ countXMarks(mini.id) }}</span>
<button v-if="admin" class="edit-btn" @click="emit('editMinistrant', mini.id)"> <button v-if="admin" class="edit-btn" @click="emit('editMinistrant', mini.id)">
<i class="icon">edit</i> <i class="icon">edit</i>
</button> </button>
@@ -82,6 +87,12 @@ const activeTab = ref<"gottesdienste" | "ministranten">("gottesdienste")
<style scoped lang="less"> <style scoped lang="less">
.list-view { .list-view {
padding: 12px; padding: 12px;
max-width: 800px;
margin: 0 auto;
@media(min-width: 800px) {
}
} }
.tab-bar { .tab-bar {
@@ -149,6 +160,17 @@ const activeTab = ref<"gottesdienste" | "ministranten">("gottesdienste")
.mini-username { .mini-username {
font-size: 13px; font-size: 13px;
color: #999; color: #999;
flex: 1;
}
.x-count {
font-size: 13px;
font-weight: 700;
color: #045b04;
background: #d1fcd1;
padding: 1px 8px;
border-radius: 10px;
margin: 0 8px;
} }
} }