Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
kdheepak committed Sep 27, 2023
1 parent 5f92b3e commit d190974
Showing 1 changed file with 37 additions and 39 deletions.
76 changes: 37 additions & 39 deletions src/components/task_report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,42 @@ use crate::{
action::Action,
config::{Config, KeyBindings},
};
const VIRTUAL_TAGS: [&str; 34] = [
"PROJECT",
"BLOCKED",
"UNBLOCKED",
"BLOCKING",
"DUE",
"DUETODAY",
"TODAY",
"OVERDUE",
"WEEK",
"MONTH",
"QUARTER",
"YEAR",
"ACTIVE",
"SCHEDULED",
"PARENT",
"CHILD",
"UNTIL",
"WAITING",
"ANNOTATED",
"READY",
"YESTERDAY",
"TOMORROW",
"TAGGED",
"PENDING",
"COMPLETED",
"DELETED",
"UDA",
"ORPHAN",
"PRIORITY",
"PROJECT",
"LATEST",
"RECURRING",
"INSTANCE",
"TEMPLATE",
];

#[derive(Default)]
pub struct TaskReport {
Expand All @@ -43,45 +79,7 @@ pub struct TaskReport {
impl TaskReport {
pub fn new() -> Self {
let mut s = Self::default();
s.virtual_tags = vec![
"PROJECT",
"BLOCKED",
"UNBLOCKED",
"BLOCKING",
"DUE",
"DUETODAY",
"TODAY",
"OVERDUE",
"WEEK",
"MONTH",
"QUARTER",
"YEAR",
"ACTIVE",
"SCHEDULED",
"PARENT",
"CHILD",
"UNTIL",
"WAITING",
"ANNOTATED",
"READY",
"YESTERDAY",
"TOMORROW",
"TAGGED",
"PENDING",
"COMPLETED",
"DELETED",
"UDA",
"ORPHAN",
"PRIORITY",
"PROJECT",
"LATEST",
"RECURRING",
"INSTANCE",
"TEMPLATE",
]
.iter()
.map(|s| s.to_string())
.collect::<Vec<_>>();
s.virtual_tags = VIRTUAL_TAGS.iter().map(|s| s.to_string()).collect::<Vec<_>>();
s
}

Expand Down

0 comments on commit d190974

Please sign in to comment.