diff --git a/Closure_Front_End/src/components/ProgressBox.vue b/Closure_Front_End/src/components/ProgressBox.vue index 1bb0f6aa..171ff2b5 100644 --- a/Closure_Front_End/src/components/ProgressBox.vue +++ b/Closure_Front_End/src/components/ProgressBox.vue @@ -3,14 +3,18 @@
סך הכל: - + 15%
חובה: - + 15%
@@ -19,7 +23,7 @@ חובת בחירה: 15% @@ -28,7 +32,7 @@
בחירה: - + 15%
@@ -43,28 +47,39 @@ export default { total: 50, mandatory: 30, mand_choice: 20, - choice: 15 + choice: 15, }; }, methods: { + /** + * a helper method for grouping courses. + * will be mostly used to group by type + */ groupBy: function (xs, key) { return xs.reduce(function (rv, x) { (rv[x[key]] = rv[x[key]] || []).push(x); return rv; }, {}); }, - sum: function(allcourses, index){ - var courses = this.groupBy(this.allcourses, "type")[index]; - var sum = 0; - for (var i = 0; i