working categorisation
This commit is contained in:
parent
7fb7a22f82
commit
8c180f2e47
@ -3,7 +3,7 @@ html, body {
|
||||
font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
|
||||
background: #111;
|
||||
color: #fff;
|
||||
height: 100vh;
|
||||
min-height: 100vh;
|
||||
}
|
||||
body {
|
||||
padding: 50px;
|
||||
|
@ -95,14 +95,15 @@ function computeData(jsonConvertedData) {
|
||||
// trouver le nombre de tâches ayant un tag en particulier
|
||||
// et rajouter ce nombre à chaque tag, dans countTasks : N
|
||||
|
||||
// let counterOfTasks = jsonConvertedData.tasklist
|
||||
let counterOfTasks = gtgData.tasklist[0].task
|
||||
// compter les tâches
|
||||
// console.log('counterOfTasks',counterOfTasks);
|
||||
|
||||
jsonAllData.all = gtgData
|
||||
|
||||
jsonAllData.stats = {
|
||||
// tasksCount : counterOfTasks.length,
|
||||
tasksCount: 0,
|
||||
tasksCount : counterOfTasks.length,
|
||||
// tasksCount: 0,
|
||||
tasksClosed: 0,
|
||||
tasksOpen: 0,
|
||||
maxTasksCountPerTag: 0,
|
||||
@ -202,8 +203,8 @@ function computeData(jsonConvertedData) {
|
||||
}
|
||||
// sort tags by name
|
||||
|
||||
console.log('stats', jsonAllData.stats);
|
||||
return jsonAllData.stats
|
||||
console.log('stats', jsonAllData);
|
||||
return jsonAllData
|
||||
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@ block content
|
||||
h1= title
|
||||
p Welcome to #{title}
|
||||
section.tasks
|
||||
h2 #{json.tasks.project.task.length} Tâches
|
||||
h2 #{json.stats.tasksCount} Tâches
|
||||
ul.stats
|
||||
li #{json.stats.listOpen.length} ouvertes
|
||||
li #{json.stats.listOpenWeekly.length} ouvertes cette semaine
|
||||
@ -16,7 +16,7 @@ block content
|
||||
h2 Rapport de dev de la semaine
|
||||
article(language="md")= weeklyDevReport
|
||||
section.tags
|
||||
h2 #{json.tags.tagstore.tag.length} Tags
|
||||
h2 #{json.stats.listTags.length} Tags
|
||||
p maximum de #{json.stats.maxTasksCountPerTag} tâches pour un tag.
|
||||
ul.tags
|
||||
li.head
|
||||
@ -27,20 +27,20 @@ block content
|
||||
span.tasks finies
|
||||
span.tasks actives
|
||||
span.tasks actives %
|
||||
each t in json.tags.tagstore.tag
|
||||
each tagItem in json.stats.listTags
|
||||
li
|
||||
span.name(class= {emphasis: t.tasks == json.stats.maxTasksCountPerTag})= t['$'].name
|
||||
span.color= t['$'].color
|
||||
span.parent= t['$'].parent
|
||||
if t.tasksListIsDoneByTitle
|
||||
span.text-right(class=computeBgColorOnProportionOfOpenTasks(getPercent(t.tasks, json.stats.maxTasksCountPerTag)))= t.tasks
|
||||
if t.tasksListIsDoneByTitle
|
||||
span.text-right.tasks= t.tasksListIsDoneByTitle.length
|
||||
if t.tasksListIsActiveByTitle
|
||||
span.text-right.tasks #{t.tasksListIsActiveByTitle.length}
|
||||
span.text-right.tasks(class=computeBgColorOnProportionOfOpenTasks(getPercent(t.tasksListIsActiveByTitle.length, t.tasks))) #{getPercent(t.tasksListIsActiveByTitle.length, t.tasks)} %
|
||||
span.text-right.tasks #{getPercent(t.tasksListIsActiveByTitle.length,json.stats.listOpen.length )} %
|
||||
button.text-right.toggle voir
|
||||
ul
|
||||
each activetask in t.tasksListIsActiveByTitle
|
||||
li.task_item= activetask
|
||||
span.name(class= {emphasis: tagItem.subtasks == json.stats.maxTasksCountPerTag})= tagItem['$'].name
|
||||
span.color= tagItem['$'].color
|
||||
span.parent= tagItem['$'].parent
|
||||
//- if t.tasksListIsDoneByTitle
|
||||
//- span.text-right(class=computeBgColorOnProportionOfOpenTasks(getPercent(t.tasks, json.stats.maxTasksCountPerTag)))= t.tasks
|
||||
//- if t.tasksListIsDoneByTitle
|
||||
//- span.text-right.tasks= t.tasksListIsDoneByTitle.length
|
||||
//- if t.tasksListIsActiveByTitle
|
||||
//- span.text-right.tasks #{t.tasksListIsActiveByTitle.length}
|
||||
//- span.text-right.tasks(class=computeBgColorOnProportionOfOpenTasks(getPercent(t.tasksListIsActiveByTitle.length, t.tasks))) #{getPercent(t.tasksListIsActiveByTitle.length, t.tasks)} %
|
||||
//- span.text-right.tasks #{getPercent(t.tasksListIsActiveByTitle.length,json.stats.listOpen.length )} %
|
||||
//- button.text-right.toggle voir
|
||||
//- ul
|
||||
//- each activetask in t.tasksListIsActiveByTitle
|
||||
//- li.task_item= activetask
|
||||
|
Loading…
x
Reference in New Issue
Block a user