fix: cockpit url base
This commit is contained in:
parent
c769247146
commit
9e31975d76
|
|
@ -17,6 +17,7 @@ import {
|
||||||
useCourseSessionDetailQuery,
|
useCourseSessionDetailQuery,
|
||||||
} from "@/composables";
|
} from "@/composables";
|
||||||
import { circleFlatLearningContents } from "@/services/circle";
|
import { circleFlatLearningContents } from "@/services/circle";
|
||||||
|
import { getCockpitUrl } from "@/utils/utils";
|
||||||
|
|
||||||
interface Submittable {
|
interface Submittable {
|
||||||
id: string;
|
id: string;
|
||||||
|
|
@ -126,10 +127,12 @@ const getShowDetailsText = (lc: LearningContent) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const getDetailsLink = (lc: LearningContent, circleId: string) => {
|
const getDetailsLink = (lc: LearningContent, circleId: string) => {
|
||||||
|
const base = getCockpitUrl(props.courseSession.course.slug);
|
||||||
|
|
||||||
if (isFeedback(lc)) {
|
if (isFeedback(lc)) {
|
||||||
return `cockpit/feedback/${circleId}`;
|
return `${base}/feedback/${circleId}`;
|
||||||
} else if (isAssignment(lc) || isEdoniqTest(lc)) {
|
} else if (isAssignment(lc) || isEdoniqTest(lc)) {
|
||||||
return `cockpit/assignment/${lc.id}`;
|
return `${base}/assignment/${lc.id}`;
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue