Display category labels

This commit is contained in:
Franc Camps-Febrer
2018-12-04 10:35:56 +00:00
parent 3e38a0b94b
commit 9c60dfee03
3 changed files with 6 additions and 23 deletions

View File

@@ -227,8 +227,8 @@ Stop and start the development process in terminal after you have added your tok
// categories.sort((a, b) => {
// return (+a.slice(-2) > +b.slice(-2));
// });
categories.forEach(group => {
eventCount[group] = 0
categories.forEach(cat => {
eventCount[cat.category] = 0
});
location.events.forEach((event) => {;
@@ -239,9 +239,9 @@ Stop and start the development process in terminal after you have added your tok
const events = [];
while (i < categories.length) {
let _eventsCount = eventCount[categories[i]];
let _eventsCount = eventCount[categories[i].category];
for (let j = i + 1; j < categories.length; j++) {
_eventsCount += eventCount[categories[j]];
_eventsCount += eventCount[categories[j].category];
}
events.push(_eventsCount);
i++;