[O] Remove unnecessary getAssignmentTypes()

This commit is contained in:
Hykilpikonna
2019-11-09 20:45:30 -05:00
parent f6d44dd1f2
commit fce47648c8
+2 -17
View File
@@ -14,8 +14,8 @@
</el-col> </el-col>
</el-row> </el-row>
<AssignmentTypeHead v-for="type in getAssignmentTypes()" :key="type" <AssignmentTypeHead v-for="type in course.assignmentTypes" :key="type.id"
:type-name="type" :assignments="course.assignments"> :type="type" :assignments="course.assignments">
</AssignmentTypeHead> </AssignmentTypeHead>
</div> </div>
</el-card> </el-card>
@@ -51,21 +51,6 @@
} }
else return this.unread; else return this.unread;
} }
/**
* Get all the types of the assignments.
*/
getAssignmentTypes(): string[]
{
// Get all types
let types = this.course.assignments.map(a => a.type);
// Remove duplicates
types = types.filter((type, i, a) => a.indexOf(type) == i);
// Return it
return types;
}
} }
</script> </script>