Show upload button only to experts

This commit is contained in:
Christian Cueni 2022-12-13 14:29:48 +01:00
parent 4ac1c78a4f
commit 786f92595c
1 changed files with 12 additions and 9 deletions

View File

@ -9,6 +9,7 @@ import { reactive, ref } from "vue";
import { useAppStore } from "@/stores/app";
import { useCircleStore } from "@/stores/circle";
import { useCourseSessionsStore } from "@/stores/courseSessions";
import { humanizeDuration } from "@/utils/humanizeDuration";
import _ from "lodash";
import { computed, onMounted } from "vue";
@ -17,6 +18,7 @@ import { useRoute } from "vue-router";
const route = useRoute();
const { t } = useI18n();
const courseSessionsStore = useCourseSessionsStore();
log.debug("CircleView.vue created", route);
@ -161,16 +163,17 @@ onMounted(async () => {
<h3 class="text-blue-dark">
{{ $t("circlePage.documents.title") }}
</h3>
<div class="leading-relaxed mt-4">
{{ $t("circlePage.documents.description") }}
<div v-if="courseSessionsStore.hasCockpit">
<div class="leading-relaxed mt-4">
{{ $t("circlePage.documents.description") }}
</div>
<button
class="btn-primary mt-4 text-xl"
@click="showUploadModal = true"
>
{{ $t("circlePage.documents.action") }}
</button>
</div>
<button
class="btn-primary mt-4 text-xl"
@click="showUploadModal = true"
>
{{ $t("circlePage.documents.action") }}
</button>
</div>
<div class="expert border mt-8 p-6">