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