Display export only to experts
This commit is contained in:
parent
033886f00b
commit
232959b92d
|
|
@ -12,6 +12,7 @@ import ItProgress from "@/components/ui/ItProgress.vue";
|
|||
import { type Ref, ref } from "vue";
|
||||
import { exportDataAsXls } from "@/utils/export";
|
||||
import { exportCompetenceElements } from "@/services/dashboard";
|
||||
import { useUserStore } from "@/stores/user";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const props = defineProps<{
|
||||
|
|
@ -21,6 +22,7 @@ const props = defineProps<{
|
|||
}>();
|
||||
|
||||
const statisticFilter: Ref<typeof StatisticFilterList | null> = ref(null);
|
||||
const userStore = useUserStore();
|
||||
|
||||
const assignmentStats = (metrics: AssignmentCompletionMetricsType) => {
|
||||
if (!metrics.ranking_completed) {
|
||||
|
|
@ -55,7 +57,11 @@ async function exportData() {
|
|||
<main>
|
||||
<div class="mb-10 flex items-center justify-between">
|
||||
<h3>{{ $t("a.Kompetenznachweis-Elemente") }}</h3>
|
||||
<button class="flex" @click="exportData">
|
||||
<button
|
||||
v-if="userStore.course_session_experts.length > 0"
|
||||
class="flex"
|
||||
@click="exportData"
|
||||
>
|
||||
<it-icon-export></it-icon-export>
|
||||
<span class="ml inline-block">{{ $t("a.Als Excel exportieren") }}</span>
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import dayjs from "dayjs";
|
|||
import { ref, type Ref } from "vue";
|
||||
import { exportDataAsXls } from "@/utils/export";
|
||||
import { exportAttendance } from "@/services/dashboard";
|
||||
import { useUserStore } from "@/stores/user";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const props = defineProps<{
|
||||
|
|
@ -20,6 +21,7 @@ const props = defineProps<{
|
|||
}>();
|
||||
|
||||
const statisticFilter: Ref<typeof StatisticFilterList | null> = ref(null);
|
||||
const userStore = useUserStore();
|
||||
|
||||
const attendanceStats = (present: number, total: number) => {
|
||||
return {
|
||||
|
|
@ -42,7 +44,11 @@ async function exportData() {
|
|||
<main>
|
||||
<div class="mb-10 flex items-center justify-between">
|
||||
<h3>{{ $t("Anwesenheit") }}</h3>
|
||||
<button class="flex" @click="exportData">
|
||||
<button
|
||||
v-if="userStore.course_session_experts.length > 0"
|
||||
class="flex"
|
||||
@click="exportData"
|
||||
>
|
||||
<it-icon-export></it-icon-export>
|
||||
<span class="ml inline-block">{{ $t("a.Als Excel exportieren") }}</span>
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import { getBlendedColorForRating } from "@/utils/ratingToColor";
|
|||
import { ref, type Ref } from "vue";
|
||||
import { exportDataAsXls } from "@/utils/export";
|
||||
import { exportFeedback } from "@/services/dashboard";
|
||||
import { useUserStore } from "@/stores/user";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const props = defineProps<{
|
||||
|
|
@ -19,6 +20,7 @@ const props = defineProps<{
|
|||
}>();
|
||||
|
||||
const statisticFilter: Ref<typeof StatisticFilterList | null> = ref(null);
|
||||
const userStore = useUserStore();
|
||||
|
||||
async function exportData() {
|
||||
if (!statisticFilter.value) {
|
||||
|
|
@ -33,7 +35,11 @@ async function exportData() {
|
|||
<main>
|
||||
<div class="mb-10 flex items-center justify-between">
|
||||
<h3>{{ $t("a.Feedback Teilnehmer") }}</h3>
|
||||
<button class="flex" @click="exportData">
|
||||
<button
|
||||
v-if="userStore.course_session_experts.length > 0"
|
||||
class="flex"
|
||||
@click="exportData"
|
||||
>
|
||||
<it-icon-export></it-icon-export>
|
||||
<span class="ml inline-block">{{ $t("a.Als Excel exportieren") }}</span>
|
||||
</button>
|
||||
|
|
|
|||
Loading…
Reference in New Issue