overdue
This commit is contained in:
parent
bff65bfff0
commit
cd112d0b4c
@ -31,7 +31,6 @@ def update_task(
|
|||||||
) -> Task:
|
) -> Task:
|
||||||
with db.atomic():
|
with db.atomic():
|
||||||
task = Task.get_by_id(task_id)
|
task = Task.get_by_id(task_id)
|
||||||
|
|
||||||
query = Task.update(kwargs).where(Task.id == task_id)
|
query = Task.update(kwargs).where(Task.id == task_id)
|
||||||
query.execute()
|
query.execute()
|
||||||
task = Task.get_by_id(task_id)
|
task = Task.get_by_id(task_id)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import re
|
import re
|
||||||
import datetime
|
import datetime
|
||||||
|
from rich.text import Text
|
||||||
|
|
||||||
|
|
||||||
def remove_rich_tag(text):
|
def remove_rich_tag(text):
|
||||||
@ -39,7 +40,7 @@ def get_colored_date(date: datetime.date) -> str:
|
|||||||
as_str = date.strftime("%Y-%m-%d")
|
as_str = date.strftime("%Y-%m-%d")
|
||||||
today = datetime.date.today()
|
today = datetime.date.today()
|
||||||
if date.date() < today:
|
if date.date() < today:
|
||||||
color = "#FF0000"
|
return Text(as_str, style="black on red")
|
||||||
else:
|
else:
|
||||||
# Calculate weeks into future
|
# Calculate weeks into future
|
||||||
delta = date.date() - today
|
delta = date.date() - today
|
||||||
|
Loading…
Reference in New Issue
Block a user