-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd2d737
commit 1669975
Showing
12 changed files
with
235 additions
and
57 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import { createApp } from "vue" | ||
import { createPinia } from "pinia" | ||
import App from "./App.vue" | ||
import router from "./router" | ||
import "bootstrap" | ||
import "./custom_styles.scss" | ||
createApp(App).use(router).mount("#app") | ||
createApp(App).use(router).use(createPinia()).mount("#app") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import type { ProfileResponse } from "@/services/profile" | ||
import { defineStore } from "pinia" | ||
import { ref } from "vue" | ||
|
||
export const useProfileStore = defineStore("profile", () => { | ||
const profile = ref<ProfileResponse | null>(null) | ||
return { profile } | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
<template> | ||
<div class="container"> | ||
<h1>Korga</h1> | ||
|
||
<div | ||
class="card" | ||
v-if=" | ||
store.profile?.permissions.DistributionLists_View || | ||
store.profile?.permissions.DistributionLists_Admin | ||
" | ||
> | ||
<div class="card-body"> | ||
<h5 class="card-title">Verteilerlisten</h5> | ||
<p class="card-text"> | ||
Mit Verteilerlisten kannst du Einzelpersonen, Gruppen oder alle | ||
Personen eines Status per E-Mail erreichen. Praktisch für Rundmails, | ||
gemeinsam genutzte Accounts und mehr. | ||
</p> | ||
<router-link | ||
:to="{ name: 'DistributionLists' }" | ||
class="btn btn-primary" | ||
> | ||
Verteilerlisten ansehen | ||
</router-link> | ||
</div> | ||
</div> | ||
<div class="card" v-if="store.profile?.permissions.ServiceHistory_View"> | ||
<div class="card-body"> | ||
<h5 class="card-title">Diensthistorie</h5> | ||
<p class="card-text"> | ||
Die Diensthistorie zeigt dir, wer im letzten Jahr wie oft für welchen | ||
Dienst eingeteilt war. Das hilft dir bei der Dienstplanung, um Dienste | ||
gleichmäßig zu vergeben. | ||
</p> | ||
<router-link :to="{ name: 'ServiceHistory' }" class="btn btn-primary"> | ||
Diensthistorie ansehen | ||
</router-link> | ||
</div> | ||
</div> | ||
<div | ||
class="card" | ||
v-if=" | ||
store.profile?.permissions.Permissions_View || | ||
store.profile?.permissions.Permissions_Admin | ||
" | ||
> | ||
<div class="card-body"> | ||
<h5 class="card-title">Berechtigungen</h5> | ||
<p class="card-text"> | ||
Mit Berechtigungen kannst du festlegen, wer welche Daten in Korga | ||
sehen und verändern darf. Das ist wichtig um sensible Daten zu | ||
schützen. | ||
</p> | ||
<router-link :to="{ name: 'Permissions' }" class="btn btn-primary"> | ||
Berechtigungen ansehen | ||
</router-link> | ||
</div> | ||
</div> | ||
<button | ||
v-if="store.profile === null" | ||
class="btn btn-primary" | ||
@click.prevent="login" | ||
> | ||
Mit ChurchTools Anmelden | ||
</button> | ||
<div | ||
v-else-if=" | ||
!Object.values(store.profile.permissions).some((obj) => obj === true) | ||
" | ||
> | ||
Ganz schön leer hier, oder? Das liegt daran, dass du noch keine | ||
Berechtigungen hast. Bitte wende dich an den Administrator, um Zugriff zu | ||
erhalten. | ||
</div> | ||
</div> | ||
</template> | ||
<script setup lang="ts"> | ||
import { useProfileStore } from "@/stores/profile" | ||
import korga from "@/services/profile" | ||
async function login() { | ||
try { | ||
await korga.challengeLogin() | ||
} catch (error) { | ||
console.log(error) | ||
} | ||
} | ||
const store = useProfileStore() | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.