Remove unused code, use prettier
This commit is contained in:
parent
2ab8f580bc
commit
229262a609
|
|
@ -1,6 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<QuestionSummary :title="props.title" :text="props.text">
|
<QuestionSummary :title="props.title" :text="props.text">
|
||||||
<h5 class="mb-6 text-base">{{ props.items.length }} {{ $t("feedback.answers") }}</h5>
|
<h5 class="mb-6 text-base">
|
||||||
|
{{ props.items.length }} {{ $t("feedback.answers") }}
|
||||||
|
</h5>
|
||||||
<div
|
<div
|
||||||
v-for="{ label, percentage } in chartItems"
|
v-for="{ label, percentage } in chartItems"
|
||||||
:key="label"
|
:key="label"
|
||||||
|
|
@ -15,9 +17,7 @@
|
||||||
>
|
>
|
||||||
<p>
|
<p>
|
||||||
{{
|
{{
|
||||||
`"${label}" ${percentage * props.items.length} ${$t(
|
`"${label}" ${percentage * props.items.length} ${$t("feedback.answers")}`
|
||||||
"feedback.answers"
|
|
||||||
)}`
|
|
||||||
}}
|
}}
|
||||||
</p>
|
</p>
|
||||||
</PopoverPanel>
|
</PopoverPanel>
|
||||||
|
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
<script setup lang="ts"></script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<li
|
|
||||||
class="flex flex-row justify-between border-b border-gray-500 py-4 leading-[45px] last:border-0"
|
|
||||||
>
|
|
||||||
<div class="flex flex-row">
|
|
||||||
<slot name="left"></slot>
|
|
||||||
</div>
|
|
||||||
<div class="leading-[45px]">
|
|
||||||
<slot name="center"></slot>
|
|
||||||
</div>
|
|
||||||
<div class="leading-[45px]">
|
|
||||||
<slot name="link"></slot>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
|
||||||
|
|
@ -1,78 +0,0 @@
|
||||||
<script setup lang="ts">
|
|
||||||
import ItListRow from "@/components/ui/ItListRow.vue";
|
|
||||||
import * as log from "loglevel";
|
|
||||||
|
|
||||||
log.debug("ProfileView created");
|
|
||||||
|
|
||||||
const fakeData = {
|
|
||||||
notifications: [
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
source: {
|
|
||||||
name: "Daniel",
|
|
||||||
title: "EFZ Kaufmann/-frau",
|
|
||||||
course: "üK",
|
|
||||||
avatar: "https://picsum.photos/200",
|
|
||||||
},
|
|
||||||
ago: "Vor 1 Stunde",
|
|
||||||
title: "hat den Transferauftrag «Die Motorhaftpflicht» mit dir geteilt.",
|
|
||||||
unread: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
source: {
|
|
||||||
name: "Sofia",
|
|
||||||
title: "EFZ Kaufmann/-frau",
|
|
||||||
course: "üK",
|
|
||||||
avatar: "https://picsum.photos/200",
|
|
||||||
},
|
|
||||||
ago: "Vor 1 Tag",
|
|
||||||
title: "hat dir ein Feedback zum Kreis «Analyse» mit dir geteilt.",
|
|
||||||
unread: false,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div class="bg-gray-200">
|
|
||||||
<div class="container-large">
|
|
||||||
<header class="mt-12 mb-8">
|
|
||||||
<h1>{{ $t("general.notification", 2) }}</h1>
|
|
||||||
</header>
|
|
||||||
<main>
|
|
||||||
<div class="bg-white px-8 py-2">
|
|
||||||
<ItListRow
|
|
||||||
v-for="notification in fakeData.notifications"
|
|
||||||
:key="notification.id"
|
|
||||||
>
|
|
||||||
<template #left>
|
|
||||||
<img
|
|
||||||
class="mr-2 h-[45px] rounded-full"
|
|
||||||
:src="notification.source.avatar"
|
|
||||||
/>
|
|
||||||
<div class="ml-1">
|
|
||||||
<p class="leading-6">
|
|
||||||
{{ `${notification.source.name} ${notification.title}` }}
|
|
||||||
</p>
|
|
||||||
<p class="text-sm leading-6 text-gray-800">
|
|
||||||
{{ `${notification.source.title} ‐ ${notification.ago}` }}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template #link>
|
|
||||||
<div
|
|
||||||
v-if="notification.unread"
|
|
||||||
class="flex h-[45px] flex-row items-center"
|
|
||||||
>
|
|
||||||
<div class="h-[10px] w-[10px] rounded-full bg-blue-500"></div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</ItListRow>
|
|
||||||
</div>
|
|
||||||
</main>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped></style>
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import IconLogout from "@/components/icons/IconLogout.vue";
|
import IconLogout from "@/components/icons/IconLogout.vue";
|
||||||
import IconSettings from "@/components/icons/IconSettings.vue";
|
import IconSettings from "@/components/icons/IconSettings.vue";
|
||||||
|
import HorizontalBarChart from "@/components/ui/HorizontalBarChart.vue";
|
||||||
import ItCheckbox from "@/components/ui/ItCheckbox.vue";
|
import ItCheckbox from "@/components/ui/ItCheckbox.vue";
|
||||||
import ItCheckboxGroup from "@/components/ui/ItCheckboxGroup.vue";
|
import ItCheckboxGroup from "@/components/ui/ItCheckboxGroup.vue";
|
||||||
import ItDropdown from "@/components/ui/ItDropdown.vue";
|
import ItDropdown from "@/components/ui/ItDropdown.vue";
|
||||||
|
|
@ -9,7 +10,6 @@ import ItRadioGroup from "@/components/ui/ItRadioGroup.vue";
|
||||||
import ItTextarea from "@/components/ui/ItTextarea.vue";
|
import ItTextarea from "@/components/ui/ItTextarea.vue";
|
||||||
import RatingScale from "@/components/ui/RatingScale.vue";
|
import RatingScale from "@/components/ui/RatingScale.vue";
|
||||||
import VerticalBarChart from "@/components/ui/VerticalBarChart.vue";
|
import VerticalBarChart from "@/components/ui/VerticalBarChart.vue";
|
||||||
import HorizontalBarChart from "@/components/ui/HorizontalBarChart.vue";
|
|
||||||
import logger from "loglevel";
|
import logger from "loglevel";
|
||||||
import { reactive, ref } from "vue";
|
import { reactive, ref } from "vue";
|
||||||
|
|
||||||
|
|
@ -110,7 +110,7 @@ const barChartItems = [
|
||||||
"TV",
|
"TV",
|
||||||
"TV",
|
"TV",
|
||||||
"TV",
|
"TV",
|
||||||
"Anderes"
|
"Anderes",
|
||||||
];
|
];
|
||||||
|
|
||||||
function log(data: any) {
|
function log(data: any) {
|
||||||
|
|
@ -447,7 +447,11 @@ function log(data: any) {
|
||||||
title="Frage 3"
|
title="Frage 3"
|
||||||
text="Wie zufrieden bist du mit dem Kurs “Überbetriebliche Kurse” im Allgemeinen?"
|
text="Wie zufrieden bist du mit dem Kurs “Überbetriebliche Kurse” im Allgemeinen?"
|
||||||
/>
|
/>
|
||||||
<VerticalBarChart title="Frage X" text="Fragentext" :ratings="[true, true, false, true, true, false, true, false]" />
|
<VerticalBarChart
|
||||||
|
title="Frage X"
|
||||||
|
text="Fragentext"
|
||||||
|
:ratings="[true, true, false, true, true, false, true, false]"
|
||||||
|
/>
|
||||||
<HorizontalBarChart title="Frage X" text="Fragentext" :items="barChartItems" />
|
<HorizontalBarChart title="Frage X" text="Fragentext" :items="barChartItems" />
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
|
||||||
|
|
@ -126,8 +126,8 @@ function setActiveClasses(translationKey: string) {
|
||||||
learningPathStore.learningPathForUser(props.courseSlug, userStore.id)
|
learningPathStore.learningPathForUser(props.courseSlug, userStore.id)
|
||||||
?.circles || []
|
?.circles || []
|
||||||
"
|
"
|
||||||
:course-id="courseSessionStore.courseSessionForRoute?.course.id"
|
:course-id="courseSessionStore.courseSessionForRoute?.course.id || 0"
|
||||||
:url="courseSessionStore.courseSessionForRoute.course_url"
|
:url="courseSessionStore.courseSessionForRoute?.course_url || ''"
|
||||||
></FeedbackSummary>
|
></FeedbackSummary>
|
||||||
<div>
|
<div>
|
||||||
<!-- progress -->
|
<!-- progress -->
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,8 @@
|
||||||
v-else-if="horizontalChartKeys.includes(question.key)"
|
v-else-if="horizontalChartKeys.includes(question.key)"
|
||||||
:title="`${$t('feedback.questionTitle')} ${i}`"
|
:title="`${$t('feedback.questionTitle')} ${i}`"
|
||||||
:text="question.question"
|
:text="question.question"
|
||||||
:items="feedbackData.questions[question.key].map((a: string) => `${a}%`)" />
|
:items="feedbackData.questions[question.key].map((a: string) => `${a}%`)"
|
||||||
|
/>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</main>
|
</main>
|
||||||
|
|
@ -64,6 +65,13 @@ import * as log from "loglevel";
|
||||||
import { onMounted, reactive } from "vue";
|
import { onMounted, reactive } from "vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
|
|
||||||
|
interface FeedbackData {
|
||||||
|
amount: number;
|
||||||
|
questions: {
|
||||||
|
[key: string]: any;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
courseSlug: string;
|
courseSlug: string;
|
||||||
circleId: string;
|
circleId: string;
|
||||||
|
|
@ -136,7 +144,7 @@ const openKeys = [
|
||||||
"instructor_open_feedback",
|
"instructor_open_feedback",
|
||||||
];
|
];
|
||||||
|
|
||||||
const feedbackData = reactive({});
|
const feedbackData = reactive<FeedbackData>({ amount: 0, questions: {} });
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
log.debug("FeedbackPage mounted");
|
log.debug("FeedbackPage mounted");
|
||||||
|
|
@ -145,7 +153,6 @@ onMounted(async () => {
|
||||||
);
|
);
|
||||||
Object.assign(feedbackData, data);
|
Object.assign(feedbackData, data);
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
|
|
||||||
|
|
@ -138,10 +138,6 @@ const router = createRouter({
|
||||||
path: "/profile",
|
path: "/profile",
|
||||||
component: () => import("@/pages/ProfilePage.vue"),
|
component: () => import("@/pages/ProfilePage.vue"),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: "/notifications",
|
|
||||||
component: () => import("@/pages/NotificationsPage.vue"),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: "/styleguide",
|
path: "/styleguide",
|
||||||
component: () => import("../pages/StyleGuidePage.vue"),
|
component: () => import("../pages/StyleGuidePage.vue"),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue