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