Fix url to self evalution
This commit is contained in:
parent
17bd36fe54
commit
181efbc382
|
|
@ -3,13 +3,20 @@ import PerformanceCriteriaRow from "@/components/competences/PerformanceCriteria
|
||||||
import ItProgress from "@/components/ui/ItProgress.vue";
|
import ItProgress from "@/components/ui/ItProgress.vue";
|
||||||
import { useCompetenceStore } from "@/stores/competence";
|
import { useCompetenceStore } from "@/stores/competence";
|
||||||
import type { CompetencePage } from "@/types";
|
import type { CompetencePage } from "@/types";
|
||||||
|
import { PerformanceCriteria } from "@/types";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
const competenceStore = useCompetenceStore();
|
const competenceStore = useCompetenceStore();
|
||||||
|
|
||||||
const props = defineProps<{
|
interface Props {
|
||||||
competence: CompetencePage;
|
competence: CompetencePage;
|
||||||
}>();
|
courseSlug: string;
|
||||||
|
showAssessAgain?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
showAssessAgain: true,
|
||||||
|
});
|
||||||
|
|
||||||
const isOpen = ref(false);
|
const isOpen = ref(false);
|
||||||
|
|
||||||
|
|
@ -51,6 +58,8 @@ const togglePerformanceCriteria = () => {
|
||||||
<PerformanceCriteriaRow
|
<PerformanceCriteriaRow
|
||||||
:criteria="performanceCriteria"
|
:criteria="performanceCriteria"
|
||||||
:show-state="true"
|
:show-state="true"
|
||||||
|
:course-slug="props.courseSlug"
|
||||||
|
:show-assess-again="props.showAssessAgain"
|
||||||
></PerformanceCriteriaRow>
|
></PerformanceCriteriaRow>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,17 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { PerformanceCriteria } from "@/types";
|
import type { PerformanceCriteria } from "@/types";
|
||||||
import { useRoute } from "vue-router";
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
criteria: PerformanceCriteria;
|
criteria: PerformanceCriteria;
|
||||||
|
courseSlug: string;
|
||||||
showState?: boolean;
|
showState?: boolean;
|
||||||
|
showAssessAgain?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
showState: false,
|
showState: false,
|
||||||
|
showAssessAgain: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
const route = useRoute();
|
|
||||||
const profilePageSlug = route.params["competenceProfilePageSlug"];
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -47,8 +46,9 @@ const profilePageSlug = route.params["competenceProfilePageSlug"];
|
||||||
</p>
|
</p>
|
||||||
<span class="whitespace-nowrap">
|
<span class="whitespace-nowrap">
|
||||||
<router-link
|
<router-link
|
||||||
|
v-if="props.showAssessAgain"
|
||||||
class="link"
|
class="link"
|
||||||
:to="`/competence/${profilePageSlug}/criteria/${criteria.slug}`"
|
:to="`/course/${props.courseSlug}/competence/criteria/${criteria.slug}`"
|
||||||
>
|
>
|
||||||
{{ $t("competences.assessAgain") }}
|
{{ $t("competences.assessAgain") }}
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -90,7 +90,11 @@ function setActiveClasses(isActive: boolean) {
|
||||||
:key="competence.id"
|
:key="competence.id"
|
||||||
class="bg-white p-8 mb-8"
|
class="bg-white p-8 mb-8"
|
||||||
>
|
>
|
||||||
<CompetenceDetail :competence="competence"></CompetenceDetail>
|
<CompetenceDetail
|
||||||
|
:competence="competence"
|
||||||
|
:course-slug="props.courseSlug"
|
||||||
|
:show-assess-again="false"
|
||||||
|
></CompetenceDetail>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,10 @@ import { computed } from "vue";
|
||||||
|
|
||||||
log.debug("CompetenceIndexPage created");
|
log.debug("CompetenceIndexPage created");
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
courseSlug: string;
|
||||||
|
}>();
|
||||||
|
|
||||||
const competenceStore = useCompetenceStore();
|
const competenceStore = useCompetenceStore();
|
||||||
|
|
||||||
const failedCriteria = computed(() => {
|
const failedCriteria = computed(() => {
|
||||||
|
|
@ -150,7 +154,10 @@ const countStatus = computed(() => {
|
||||||
:key="criteria.id"
|
:key="criteria.id"
|
||||||
class="mb-4 pb-4 border-b"
|
class="mb-4 pb-4 border-b"
|
||||||
>
|
>
|
||||||
<PerformanceCriteriaRow :criteria="criteria"></PerformanceCriteriaRow>
|
<PerformanceCriteriaRow
|
||||||
|
:criteria="criteria"
|
||||||
|
:course-slug="props.courseSlug"
|
||||||
|
></PerformanceCriteriaRow>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<router-link
|
<router-link
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,11 @@ import ItDropdownSelect from "@/components/ui/ItDropdownSelect.vue";
|
||||||
import { useCompetenceStore } from "@/stores/competence";
|
import { useCompetenceStore } from "@/stores/competence";
|
||||||
import * as log from "loglevel";
|
import * as log from "loglevel";
|
||||||
|
|
||||||
log.debug("CompetencesMainView created");
|
log.debug("CompetenceListPage created");
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
courseSlug: string;
|
||||||
|
}>();
|
||||||
|
|
||||||
const competenceStore = useCompetenceStore();
|
const competenceStore = useCompetenceStore();
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -35,7 +39,10 @@ const competenceStore = useCompetenceStore();
|
||||||
:key="competence.id"
|
:key="competence.id"
|
||||||
class="bg-white p-8 mb-8"
|
class="bg-white p-8 mb-8"
|
||||||
>
|
>
|
||||||
<CompetenceDetail :competence="competence"></CompetenceDetail>
|
<CompetenceDetail
|
||||||
|
:competence="competence"
|
||||||
|
:course-slug="props.courseSlug"
|
||||||
|
></CompetenceDetail>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,11 @@ import type { Ref } from "vue";
|
||||||
import { computed, ref } from "vue";
|
import { computed, ref } from "vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
|
|
||||||
log.debug("CompetencesMainView created");
|
log.debug("PerformanceCriteriaPage created");
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
courseSlug: string;
|
||||||
|
}>();
|
||||||
|
|
||||||
interface MenuItem {
|
interface MenuItem {
|
||||||
id: CourseCompletionStatus;
|
id: CourseCompletionStatus;
|
||||||
|
|
@ -107,6 +111,7 @@ function updateActiveState(status: CourseCompletionStatus) {
|
||||||
<PerformanceCriteriaRow
|
<PerformanceCriteriaRow
|
||||||
:criteria="criteria"
|
:criteria="criteria"
|
||||||
:show-state="true"
|
:show-state="true"
|
||||||
|
:course-slug="props.courseSlug"
|
||||||
></PerformanceCriteriaRow>
|
></PerformanceCriteriaRow>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
|
|
@ -59,10 +59,12 @@ const router = createRouter({
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "",
|
path: "",
|
||||||
|
props: true,
|
||||||
component: () => import("@/pages/competence/CompetenceIndexPage.vue"),
|
component: () => import("@/pages/competence/CompetenceIndexPage.vue"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "competences",
|
path: "competences",
|
||||||
|
props: true,
|
||||||
component: () => import("@/pages/competence/CompetenceListPage.vue"),
|
component: () => import("@/pages/competence/CompetenceListPage.vue"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -71,6 +73,7 @@ const router = createRouter({
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "criteria/:criteriaSlug",
|
path: "criteria/:criteriaSlug",
|
||||||
|
props: true,
|
||||||
component: () =>
|
component: () =>
|
||||||
import("@/pages/competence/SinglePerformanceCriteriaPage.vue"),
|
import("@/pages/competence/SinglePerformanceCriteriaPage.vue"),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue