forked from OrgGo/Tasks
Remove concept of overdue
This commit is contained in:
parent
3c4a010e2c
commit
0b3f2ab638
14
db/tasks.go
14
db/tasks.go
|
@ -132,13 +132,13 @@ func GetTasks(username, status, category string) (types.Context, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
TaskCreated = TaskCreated.Local()
|
TaskCreated = TaskCreated.Local()
|
||||||
if task.Priority != "1" { // if priority is not 1 then calculate, else why bother?
|
// if task.Priority != "1" { // if priority is not 1 then calculate, else why bother?
|
||||||
CurrentTime := time.Now().Local()
|
// CurrentTime := time.Now().Local()
|
||||||
diff := CurrentTime.Sub(TaskCreated).Hours()
|
// diff := CurrentTime.Sub(TaskCreated).Hours()
|
||||||
if diff > 168 {
|
// if diff > 168 {
|
||||||
task.IsOverdue = true // If one week then overdue by default
|
// task.IsOverdue = true // If one week then overdue by default
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
task.Created = TaskCreated.Format("Jan 2 2006")
|
task.Created = TaskCreated.Format("Jan 2 2006")
|
||||||
|
|
||||||
tasks = append(tasks, task)
|
tasks = append(tasks, task)
|
||||||
|
|
Loading…
Reference in New Issue