Add status to project information

This commit is contained in:
Campbell Alden 2023-07-22 00:23:44 +09:00
parent c9dd247175
commit b6497d499f
4 changed files with 4 additions and 3 deletions

View file

@ -27,7 +27,7 @@ logbook.filter(task => {
notes: todo.notes() || null, notes: todo.notes() || null,
status: todo.status(), status: todo.status(),
completion_date: todo.completionDate(), completion_date: todo.completionDate(),
project: proj && { id: proj.id(), title: proj.name() }, project: proj && { id: proj.id(), title: proj.name(), status: proj.status() },
area: area && { id: area.id(), title: area.name() }, area: area && { id: area.id(), title: area.name() },
tags: [...tags, ...todo.tagNames().split(', ')].filter(t => t), tags: [...tags, ...todo.tagNames().split(', ')].filter(t => t),
}); });

View file

@ -27,7 +27,7 @@ logbook.filter(task => {
notes: todo.notes() || null, notes: todo.notes() || null,
status: todo.status(), status: todo.status(),
completion_date: todo.completionDate(), completion_date: todo.completionDate(),
project: proj && { id: proj.id(), title: proj.name() }, project: proj && { id: proj.id(), title: proj.name(), status: proj.status() },
area: area && { id: area.id(), title: area.name() }, area: area && { id: area.id(), title: area.name() },
tags: [...tags, ...todo.tagNames().split(', ')].filter(t => t), tags: [...tags, ...todo.tagNames().split(', ')].filter(t => t),
}); });

View file

@ -19,6 +19,7 @@ pub enum Status {
pub struct Project { pub struct Project {
pub id: String, pub id: String,
pub title: String, pub title: String,
pub status: Status,
} }
#[derive(Deserialize, Debug)] #[derive(Deserialize, Debug)]

View file

@ -15,7 +15,7 @@ today.forEach(todo => {
notes: todo.notes() || null, notes: todo.notes() || null,
status: todo.status(), status: todo.status(),
completion_date: todo.completionDate(), completion_date: todo.completionDate(),
project: proj && { id: proj.id(), title: proj.name() }, project: proj && { id: proj.id(), title: proj.name(), status: proj.status() },
area: area && { id: area.id(), title: area.name() }, area: area && { id: area.id(), title: area.name() },
tags: [...tags, ...todo.tagNames().split(', ')].filter(t => t), tags: [...tags, ...todo.tagNames().split(', ')].filter(t => t),
}); });