Add action link
This commit is contained in:
parent
15d6baac81
commit
91ee3e605b
|
|
@ -5,7 +5,7 @@ import { COURSE_QUERY, COURSE_SESSION_DETAIL_QUERY } from "@/graphql/queries";
|
||||||
import {
|
import {
|
||||||
circleFlatChildren,
|
circleFlatChildren,
|
||||||
circleFlatLearningContents,
|
circleFlatLearningContents,
|
||||||
circleFlatLearningUnits
|
circleFlatLearningUnits,
|
||||||
} from "@/services/circle";
|
} from "@/services/circle";
|
||||||
import type { DashboardPersonType } from "@/services/dashboard";
|
import type { DashboardPersonType } from "@/services/dashboard";
|
||||||
import { fetchDashboardPersons } from "@/services/dashboard";
|
import { fetchDashboardPersons } from "@/services/dashboard";
|
||||||
|
|
@ -25,7 +25,7 @@ import type {
|
||||||
LearningMentor,
|
LearningMentor,
|
||||||
LearningPathType,
|
LearningPathType,
|
||||||
LearningUnitPerformanceCriteria,
|
LearningUnitPerformanceCriteria,
|
||||||
PerformanceCriteria
|
PerformanceCriteria,
|
||||||
} from "@/types";
|
} from "@/types";
|
||||||
import { useQuery } from "@urql/vue";
|
import { useQuery } from "@urql/vue";
|
||||||
import orderBy from "lodash/orderBy";
|
import orderBy from "lodash/orderBy";
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,21 @@ const { loading: loadingPersons, dashboardPersons } = useDashboardPersons();
|
||||||
<div>{{ cs.user_role }}</div>
|
<div>{{ cs.user_role }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="md:w-1/4 md:text-right">
|
<div class="md:w-1/4 md:text-right">
|
||||||
<div>action</div>
|
<div>
|
||||||
|
<router-link
|
||||||
|
:to="{
|
||||||
|
name: 'profileLearningPath',
|
||||||
|
params: {
|
||||||
|
userId: person.user_id,
|
||||||
|
courseSlug: cs.course_slug,
|
||||||
|
},
|
||||||
|
query: { courseSessionId: cs.id },
|
||||||
|
}"
|
||||||
|
class="link w-full lg:text-right"
|
||||||
|
>
|
||||||
|
{{ $t("a.Profil anzeigen") }}
|
||||||
|
</router-link>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ export async function handleCourseSessionAsQueryParam(to: RouteLocationNormalize
|
||||||
return {
|
return {
|
||||||
path: to.path,
|
path: to.path,
|
||||||
query: restOfQuery,
|
query: restOfQuery,
|
||||||
replace: true,
|
// replace: true,
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
// courseSessionId is invalid for current user -> redirect to home
|
// courseSessionId is invalid for current user -> redirect to home
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ export type DashboardPersonCourseSessionType = {
|
||||||
session_title: string;
|
session_title: string;
|
||||||
course_id: number;
|
course_id: number;
|
||||||
course_title: string;
|
course_title: string;
|
||||||
|
course_slug: string;
|
||||||
user_role: DashboardPersonRoleType;
|
user_role: DashboardPersonRoleType;
|
||||||
my_role: DashboardPersonRoleType;
|
my_role: DashboardPersonRoleType;
|
||||||
is_uk: boolean;
|
is_uk: boolean;
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,7 @@ def get_dashboard_persons(request):
|
||||||
"session_title": cs.title,
|
"session_title": cs.title,
|
||||||
"course_id": cs.course.id,
|
"course_id": cs.course.id,
|
||||||
"course_title": cs.course.title,
|
"course_title": cs.course.title,
|
||||||
|
"course_slug": cs.course.slug,
|
||||||
"user_role": csu.role,
|
"user_role": csu.role,
|
||||||
"my_role": my_role,
|
"my_role": my_role,
|
||||||
"is_uk": cs.course.configuration.is_uk,
|
"is_uk": cs.course.configuration.is_uk,
|
||||||
|
|
@ -117,9 +118,10 @@ def get_dashboard_persons(request):
|
||||||
for participant in lm.participants.all():
|
for participant in lm.participants.all():
|
||||||
course_session_entry = {
|
course_session_entry = {
|
||||||
"id": cs.id,
|
"id": cs.id,
|
||||||
"course_id": cs.course.id,
|
|
||||||
"session_title": cs.title,
|
"session_title": cs.title,
|
||||||
|
"course_id": cs.course.id,
|
||||||
"course_title": cs.course.title,
|
"course_title": cs.course.title,
|
||||||
|
"course_slug": cs.course.slug,
|
||||||
"user_role": "LEARNING_MENTEE",
|
"user_role": "LEARNING_MENTEE",
|
||||||
"my_role": "LEARNING_MENTOR",
|
"my_role": "LEARNING_MENTOR",
|
||||||
"is_uk": cs.course.configuration.is_uk,
|
"is_uk": cs.course.configuration.is_uk,
|
||||||
|
|
@ -151,6 +153,7 @@ def get_dashboard_persons(request):
|
||||||
"session_title": cs.title,
|
"session_title": cs.title,
|
||||||
"course_id": cs.course.id,
|
"course_id": cs.course.id,
|
||||||
"course_title": cs.course.title,
|
"course_title": cs.course.title,
|
||||||
|
"course_slug": cs.course.slug,
|
||||||
"user_role": "LEARNING_MENTOR",
|
"user_role": "LEARNING_MENTOR",
|
||||||
"my_role": "LEARNING_MENTEE",
|
"my_role": "LEARNING_MENTEE",
|
||||||
"is_uk": cs.course.configuration.is_uk,
|
"is_uk": cs.course.configuration.is_uk,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue