start = self.params.get_str('start')
end = self.params.get_str('end')
days = Day.all(self.conn, date_range=(start, end), fill_gaps=True)
+ for day in days:
+ day.collect_calendarized_todos(self.conn)
return {'start': start, 'end': end, 'days': days}
def do_GET_day(self) -> dict[str, object]:
todo.save(self.conn)
done_ids = self.form_data.get_all_int('done')
comments = self.form_data.get_all_str('comment')
+ efforts = self.form_data.get_all_str('effort')
for i, todo_id in enumerate(self.form_data.get_all_int('todo_id')):
todo = Todo.by_id(self.conn, todo_id)
todo.is_done = todo_id in done_ids
if len(comments) > 0:
todo.comment = comments[i]
+ if len(efforts) > 0:
+ todo.effort = float(efforts[i]) if efforts[i] else None
todo.save(self.conn)
for condition in todo.enables:
condition.save(self.conn)
continue
child = Todo.by_id(self.conn, child_id)
todo.add_child(child)
+ effort = self.form_data.get_str('effort', ignore_strict=True)
+ todo.effort = float(effort) if effort else None
todo.set_conditions(self.conn, self.form_data.get_all_int('condition'))
todo.set_enables(self.conn, self.form_data.get_all_int('enables'))
todo.set_disables(self.conn, self.form_data.get_all_int('disables'))
todo.is_done = len(self.form_data.get_all_str('done')) > 0
+ todo.calendarize = len(self.form_data.get_all_str('calendarize')) > 0
todo.comment = self.form_data.get_str('comment', ignore_strict=True)
todo.save(self.conn)
for condition in todo.enables:
self.form_data.get_all_int('condition'))
process.set_enables(self.conn, self.form_data.get_all_int('enables'))
process.set_disables(self.conn, self.form_data.get_all_int('disables'))
+ process.calendarize = self.form_data.get_all_str('calendarize') != []
process.save(self.conn)
process.explicit_steps = []
steps: list[tuple[int | None, int, int | None]] = []