Update filter to always display base circles
This commit is contained in:
parent
f5fe285986
commit
e3090fcfa1
|
|
@ -308,6 +308,7 @@ export const COURSE_QUERY = graphql(`
|
|||
description
|
||||
goals
|
||||
profiles
|
||||
is_base_circle
|
||||
...CoursePageFields
|
||||
learning_sequences {
|
||||
icon
|
||||
|
|
|
|||
|
|
@ -41,11 +41,12 @@ const scrollLearnPathDiagram = (offset: number) => {
|
|||
|
||||
const filterCircles = (topic: TopicType) => {
|
||||
// return [];
|
||||
if (props.filter === undefined) {
|
||||
if (props.filter === undefined || props.filter === "") {
|
||||
return topic.circles;
|
||||
}
|
||||
return topic.circles.filter(
|
||||
(circle) => circle.profiles.indexOf(props.filter as string) > -1
|
||||
(circle) =>
|
||||
circle.profiles.indexOf(props.filter as string) > -1 || circle.is_base_circle
|
||||
);
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -95,7 +95,11 @@ class CourseSessionProfileMutation(relay.ClientIDMutation):
|
|||
course_profile = input.get("course_profile")
|
||||
course_slug = input.get("course_slug")
|
||||
user = info.context.user
|
||||
|
||||
try:
|
||||
if course_profile == "":
|
||||
profile = None
|
||||
else:
|
||||
profile = CourseProfile.objects.get(code=course_profile)
|
||||
|
||||
# csu = user.coursesessionuser_set.first()
|
||||
|
|
|
|||
Loading…
Reference in New Issue