Fix link in to KompetenzNavi in main navigation bar
This commit is contained in:
parent
68d37e4f8e
commit
e6fbf0d276
|
|
@ -126,7 +126,11 @@ onMounted(() => {
|
||||||
|
|
||||||
<router-link
|
<router-link
|
||||||
v-if="inCourse() && courseSessionsStore.currentCourseSession"
|
v-if="inCourse() && courseSessionsStore.currentCourseSession"
|
||||||
:to="`${courseSessionsStore.currentCourseSession.competence_url}`"
|
:to="`${courseSessionsStore.currentCourseSession.competence_url.replace(
|
||||||
|
// TODO: remove the `competence_url` with url to Navi...
|
||||||
|
'/competences',
|
||||||
|
''
|
||||||
|
)}`"
|
||||||
class="nav-item"
|
class="nav-item"
|
||||||
:class="{ 'nav-item--active': inCompetenceProfile() }"
|
:class="{ 'nav-item--active': inCompetenceProfile() }"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import type {
|
||||||
PerformanceCriteria,
|
PerformanceCriteria,
|
||||||
} from "@/types";
|
} from "@/types";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
import _ from "lodash";
|
||||||
import cloneDeep from "lodash/cloneDeep";
|
import cloneDeep from "lodash/cloneDeep";
|
||||||
import groupBy from "lodash/groupBy";
|
import groupBy from "lodash/groupBy";
|
||||||
import orderBy from "lodash/orderBy";
|
import orderBy from "lodash/orderBy";
|
||||||
|
|
@ -115,15 +116,19 @@ export const useCompetenceStore = defineStore({
|
||||||
const competenceProfilePage = this.competenceProfilePages.get(userId);
|
const competenceProfilePage = this.competenceProfilePages.get(userId);
|
||||||
|
|
||||||
if (competenceProfilePage?.children.length) {
|
if (competenceProfilePage?.children.length) {
|
||||||
return competenceProfilePage.children.filter((competence) => {
|
return _.orderBy(
|
||||||
let criteria = competence.children;
|
competenceProfilePage.children.filter((competence) => {
|
||||||
if (this.selectedCircle.id != "all") {
|
let criteria = competence.children;
|
||||||
criteria = criteria.filter((criteria) => {
|
if (this.selectedCircle.id != "all") {
|
||||||
return criteria.circle.translation_key === this.selectedCircle.id;
|
criteria = criteria.filter((criteria) => {
|
||||||
});
|
return criteria.circle.translation_key === this.selectedCircle.id;
|
||||||
}
|
});
|
||||||
return criteria.length > 0;
|
}
|
||||||
});
|
return criteria.length > 0;
|
||||||
|
}),
|
||||||
|
["competence_id"],
|
||||||
|
["asc"]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue