diff --git a/public/src/components/GottesdienstCard.vue b/public/src/components/GottesdienstCard.vue new file mode 100644 index 0000000..f57e05b --- /dev/null +++ b/public/src/components/GottesdienstCard.vue @@ -0,0 +1,345 @@ + + + + + diff --git a/public/src/components/ListView.vue b/public/src/components/ListView.vue new file mode 100644 index 0000000..ff9f6d2 --- /dev/null +++ b/public/src/components/ListView.vue @@ -0,0 +1,37 @@ + + + + + diff --git a/public/src/views/PlanView.vue b/public/src/views/PlanView.vue index deb49d0..d86497f 100644 --- a/public/src/views/PlanView.vue +++ b/public/src/views/PlanView.vue @@ -5,6 +5,7 @@ import TablePlan from "@/components/TablePlan.vue"; import {API, UnauthorizedError} from "@/services/api"; import type {Gottesdienst, GottesdienstGroup, Mark, SimplifiedMinistrant} from "@/models/models"; import MobilePlan from "@/components/MobilePlan.vue"; +import ListView from "@/components/ListView.vue"; import PlanActionBar from "@/components/PlanActionBar.vue"; import {Auth} from "@/services/auth"; import GroupView from "@/components/GroupView.vue"; @@ -38,6 +39,8 @@ const plan = reactive<{ groups: [] }) const mobile = ref(window.innerWidth <= MAX_WIDTH_MOBILE) +const viewMode = ref<"table" | "list">("table") +const currentUsername = ref("") const editedMarks = reactive([]); const editPlanAdmin = ref(false) const planId = ref(parseInt(route.params.id as string)) @@ -79,6 +82,7 @@ async function loadPlan() { Auth.loggedInSubject.subscribe(async (loggedIn) => { console.log("logged in " + loggedIn) if (loggedIn) { + currentUsername.value = Auth.getUser() plan.editable = Auth.getPrivileges() if (Auth.getUser() == "admin") { editPlanAdmin.value = true @@ -86,6 +90,7 @@ Auth.loggedInSubject.subscribe(async (loggedIn) => { console.log("Plan", plan.ministranten) } } else { + currentUsername.value = "" editPlanAdmin.value = false plan.editable = [] } @@ -312,40 +317,70 @@ async function importZelebrationsplan() {