feat: show # of widgets on templates

ability to hide drafts
This commit is contained in:
Barış Soner Uşaklı
2023-10-23 10:14:36 -04:00
parent 2ae031edde
commit 2ca5192b8a
5 changed files with 36 additions and 11 deletions

View File

@@ -61,6 +61,7 @@ function buildTemplatesFromAreas(areas) {
templates.push({
template: area.template,
areas: [],
widgetCount: area.data.length,
});
index += 1;
@@ -70,6 +71,7 @@ function buildTemplatesFromAreas(areas) {
name: area.name,
location: area.location,
});
templates[list[area.template]].widgetCount += area.data.length;
});
return templates;
}