diff --git a/dispatcher/static/table.js b/dispatcher/static/table.js index e2fa788..f958510 100644 --- a/dispatcher/static/table.js +++ b/dispatcher/static/table.js @@ -241,18 +241,20 @@ class Table { } }) - this.addProject( - parent.id, - parent.name, - parent.project_num, - parentDurations.map(v => v === 0 ? "" : v), - true, - parent.is_productive - ) + if (parentDurations.reduce((a, b) => a + b, 0) !== 0) { + this.addProject( + parent.id, + parent.name, + parent.project_num, + parentDurations.map(v => v === 0 ? "" : v), + true, + parent.is_productive + ) - projects.filter(p => p.total !== 0).forEach(project => { - this.addProject(project.id, project.name, "", project.durations) - }) + projects.filter(p => p.total !== 0).forEach(project => { + this.addProject(project.id, project.name, "", project.durations) + }) + } }) this.updateTotals() }