diff --git a/build_templates/tests_mod.rs b/build_templates/tests_mod.rs index aa3a9507..dc625fb0 100644 --- a/build_templates/tests_mod.rs +++ b/build_templates/tests_mod.rs @@ -29,7 +29,12 @@ mod TEST_MODULE_NAME { let input: Input = input_output::get_input_from_json(input_path).unwrap(); let desired_output: String = input_output::get_output_string_from_json(output_path); - let output = scheduler::run_scheduler(input.start_date, input.end_date, &input.goals); + let output = scheduler::run_scheduler( + input.start_date, + input.end_date, + &input.goals, + &input.tasks_completed_today, + ); let actual_output = serde_json::to_string_pretty(&output).unwrap(); diff --git a/src/bin/main.rs b/src/bin/main.rs index a694c636..4a94ac72 100644 --- a/src/bin/main.rs +++ b/src/bin/main.rs @@ -3,7 +3,10 @@ use serde::Deserialize; use serde_json::Value; use std::{fs, path::Path}; extern crate scheduler; -use scheduler::{models::goal::Goal, run_scheduler}; +use scheduler::{ + models::{goal::Goal, task::TaskCompletedToday}, + run_scheduler, +}; fn main() { println!("Running!"); let path = Path::new("./tests/jsons/stable/algorithm-challenge/input.json"); @@ -12,7 +15,12 @@ fn main() { dbg!(&json); let input: Input = serde_json::from_value(json).unwrap(); dbg!(&input); - run_scheduler(input.start_date, input.end_date, &input.goals); + run_scheduler( + input.start_date, + input.end_date, + &input.goals, + &input.tasks_completed_today, + ); } #[derive(Deserialize, Debug)] @@ -21,4 +29,5 @@ struct Input { start_date: NaiveDateTime, end_date: NaiveDateTime, goals: Vec, + tasks_completed_today: Vec, } diff --git a/src/lib.rs b/src/lib.rs index 1fe8cd74..6393079d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -53,6 +53,7 @@ //! quality perception of the ZinZen® projects. use chrono::NaiveDateTime; +use models::task::TaskCompletedToday; use models::{calendar::Calendar, goal::Goal, task::FinalTasks}; use serde_wasm_bindgen::{from_value, to_value}; use services::activity_generator; @@ -80,7 +81,12 @@ pub fn schedule(input: &JsValue) -> Result { console_error_panic_hook::set_once(); // JsError implements From, so we can just use `?` on any Error let input: Input = from_value(input.clone())?; - let final_tasks = run_scheduler(input.start_date, input.end_date, &input.goals); + let final_tasks = run_scheduler( + input.start_date, + input.end_date, + &input.goals, + &input.tasks_completed_today, + ); Ok(to_value(&final_tasks)?) } @@ -88,6 +94,7 @@ pub fn run_scheduler( start_date: NaiveDateTime, end_date: NaiveDateTime, goals: &[Goal], + tasks_completed_today: &[TaskCompletedToday], ) -> FinalTasks { let mut calendar = Calendar::new(start_date, end_date); dbg!(&calendar); @@ -96,6 +103,12 @@ pub fn run_scheduler( let mut base_activities = activity_generator::get_base_activities(&calendar, goals); + base_activities = activity_placer::place_tasks_completed_today( + &mut calendar, + base_activities, + tasks_completed_today, + ); + base_activities = activity_placer::place(&mut calendar, base_activities); calendar.log_impossible_min_day_budgets(); diff --git a/src/models/budget.rs b/src/models/budget.rs index 85221b1d..c48d78ec 100644 --- a/src/models/budget.rs +++ b/src/models/budget.rs @@ -20,12 +20,12 @@ pub struct Budget { pub time_filters: Filters, } impl Budget { - pub fn reduce_for_(&mut self, goal: &str, duration_offset: usize) { + pub fn reduce_for_(&mut self, goal: &str, cal_index: usize) { if self.participating_goals.contains(&goal.to_string()) { let iterator = self.time_budgets.iter_mut().enumerate(); for (_, time_budget) in iterator { - if duration_offset >= time_budget.calendar_start_index - && duration_offset < time_budget.calendar_end_index + if cal_index >= time_budget.calendar_start_index + && cal_index < time_budget.calendar_end_index { time_budget.scheduled += 1 } diff --git a/src/models/calendar.rs b/src/models/calendar.rs index ea8ff41a..cbfb30d7 100644 --- a/src/models/calendar.rs +++ b/src/models/calendar.rs @@ -286,10 +286,10 @@ impl Calendar { } } - pub fn update_budgets_for(&mut self, goal: &str, duration_offset: usize) { + pub fn update_budgets_for(&mut self, goal: &str, cal_index: usize) { let iterator = self.budgets.iter_mut(); for budget in iterator { - budget.reduce_for_(goal, duration_offset); + budget.reduce_for_(goal, cal_index); } } diff --git a/src/models/task.rs b/src/models/task.rs index fb5b57e0..2bcad308 100644 --- a/src/models/task.rs +++ b/src/models/task.rs @@ -1,6 +1,6 @@ ///Tasks are only used for outputting use chrono::{NaiveDate, NaiveDateTime}; -use serde::Serialize; +use serde::{Deserialize, Serialize}; use super::calendar::ImpossibleActivity; @@ -26,3 +26,10 @@ pub struct DayTasks { pub day: NaiveDate, pub tasks: Vec, } + +#[derive(Deserialize, Debug, Clone)] +pub struct TaskCompletedToday { + pub goalid: String, + pub start: NaiveDateTime, + pub deadline: NaiveDateTime, +} diff --git a/src/services/activity_placer.rs b/src/services/activity_placer.rs index ee9541ac..5905033d 100644 --- a/src/services/activity_placer.rs +++ b/src/services/activity_placer.rs @@ -1,6 +1,7 @@ use crate::models::{ activity::{Activity, ActivityType, Status}, calendar::{Calendar, Hour, ImpossibleActivity}, + task::TaskCompletedToday, }; use std::{cmp, rc::Rc}; @@ -132,3 +133,59 @@ pub(crate) fn reset_postponed(mut base_activities: Vec) -> Vec, + tasks_completed_today: &[TaskCompletedToday], +) -> Vec { + dbg!(&calendar); + for task in tasks_completed_today.iter() { + let start_index = calendar.get_index_of(task.start); + let end_index = calendar.get_index_of(task.deadline); + + for hour_index in start_index..end_index { + let mut act_index_to_schedule: Option = None; + for (act_index, activity) in base_activities.iter().enumerate() { + if activity.goal_id == task.goalid + //by default, just pick the first + //but if you find one that has is claiming the index - use that + { + if act_index_to_schedule.is_none() { + act_index_to_schedule = Some(act_index); + } + if activity.calendar_overlay[hour_index].is_some() { + //check if hour is claimed and if so - override and break + act_index_to_schedule = Some(act_index); + break; + } + } + } + + //hardcode hours in calendar per hour: + if let Some(act_index_to_schedule) = act_index_to_schedule { + println!("hardcoding {:?} hours...", end_index - start_index); + Rc::make_mut(&mut calendar.hours[hour_index]); + calendar.hours[hour_index] = Rc::new(Hour::Occupied { + activity_index: act_index_to_schedule, + activity_title: base_activities[act_index_to_schedule].title.clone(), + activity_goalid: base_activities[act_index_to_schedule].goal_id.clone(), + }); + calendar.update_budgets_for( + &base_activities[act_index_to_schedule].goal_id.clone(), + hour_index, + ); + if base_activities[act_index_to_schedule].duration_left > 0 { + base_activities[act_index_to_schedule].duration_left -= 1; + }; + if base_activities[act_index_to_schedule].duration_left == 0 { + base_activities[act_index_to_schedule].status = Status::Scheduled; + (base_activities[act_index_to_schedule]).release_claims(); + } + } + } + } + dbg!(&calendar); + + base_activities +} diff --git a/src/technical/input_output.rs b/src/technical/input_output.rs index bb1e4420..22f62751 100644 --- a/src/technical/input_output.rs +++ b/src/technical/input_output.rs @@ -1,4 +1,5 @@ use crate::models::goal::Goal; +use crate::models::task::TaskCompletedToday; use chrono::NaiveDateTime; use serde::Deserialize; use std::error::Error; @@ -14,6 +15,7 @@ pub struct Input { pub start_date: NaiveDateTime, pub end_date: NaiveDateTime, pub goals: Vec, + pub tasks_completed_today: Vec, } pub fn get_input_from_json>(path: P) -> Result> { diff --git a/tests/jsons/stable/after-12/input.json b/tests/jsons/stable/after-12/input.json index 2d183a6e..8967612f 100644 --- a/tests/jsons/stable/after-12/input.json +++ b/tests/jsons/stable/after-12/input.json @@ -25,5 +25,6 @@ "maxPerWeek": 7 } } - ] + ], + "tasksCompletedToday": [] } \ No newline at end of file diff --git a/tests/jsons/stable/algorithm-challenge/input.json b/tests/jsons/stable/algorithm-challenge/input.json index 39f08619..a2bd448f 100644 --- a/tests/jsons/stable/algorithm-challenge/input.json +++ b/tests/jsons/stable/algorithm-challenge/input.json @@ -30,5 +30,6 @@ "start": "2022-01-01T12:00:00", "deadline": "2022-01-01T14:00:00" } - ] + ], + "tasksCompletedToday": [] } \ No newline at end of file diff --git a/tests/jsons/stable/basic-1/input.json b/tests/jsons/stable/basic-1/input.json index 6f27f2ba..bc846f03 100644 --- a/tests/jsons/stable/basic-1/input.json +++ b/tests/jsons/stable/basic-1/input.json @@ -23,5 +23,6 @@ "start": "2022-01-01T13:00:00", "deadline": "2022-01-01T18:00:00" } - ] + ], + "tasksCompletedToday": [] } \ No newline at end of file diff --git a/tests/jsons/stable/budget-and-goal-one-day/input.json b/tests/jsons/stable/budget-and-goal-one-day/input.json index 0f80e4e5..91f00ad1 100644 --- a/tests/jsons/stable/budget-and-goal-one-day/input.json +++ b/tests/jsons/stable/budget-and-goal-one-day/input.json @@ -34,5 +34,6 @@ "maxPerWeek": 56 } } - ] + ], + "tasksCompletedToday": [] } \ No newline at end of file diff --git a/tests/jsons/stable/budget-with-subgoal/input.json b/tests/jsons/stable/budget-with-subgoal/input.json index 903126d6..92ea689d 100644 --- a/tests/jsons/stable/budget-with-subgoal/input.json +++ b/tests/jsons/stable/budget-with-subgoal/input.json @@ -33,5 +33,6 @@ "createdAt": "2024-01-08T10:59:47.137Z", "minDuration": 1 } - ] + ], + "tasksCompletedToday": [] } \ No newline at end of file diff --git a/tests/jsons/stable/bug-start-missing/input.json b/tests/jsons/stable/bug-start-missing/input.json index b4129dcd..b752f9e6 100644 --- a/tests/jsons/stable/bug-start-missing/input.json +++ b/tests/jsons/stable/bug-start-missing/input.json @@ -29,5 +29,6 @@ "createdAt": "2024-01-08T19:44:40.695Z", "minDuration": 1 } - ] + ], + "tasksCompletedToday": [] } \ No newline at end of file diff --git a/tests/jsons/stable/conflict-without-deadline/input.json b/tests/jsons/stable/conflict-without-deadline/input.json index 3b42bc50..85243de1 100644 --- a/tests/jsons/stable/conflict-without-deadline/input.json +++ b/tests/jsons/stable/conflict-without-deadline/input.json @@ -28,5 +28,6 @@ "start": "2022-01-01T00:00:00", "deadline": "2022-01-01T12:00:00" } - ] + ], + "tasksCompletedToday": [] } \ No newline at end of file diff --git a/tests/jsons/stable/default-budgets/input.json b/tests/jsons/stable/default-budgets/input.json index 44c3f688..5f15c694 100644 --- a/tests/jsons/stable/default-budgets/input.json +++ b/tests/jsons/stable/default-budgets/input.json @@ -248,5 +248,6 @@ "maxPerWeek": 7 } } - ] + ], + "tasksCompletedToday": [] } \ No newline at end of file diff --git a/tests/jsons/stable/filler-goal/input.json b/tests/jsons/stable/filler-goal/input.json index d63c5131..55dc3505 100644 --- a/tests/jsons/stable/filler-goal/input.json +++ b/tests/jsons/stable/filler-goal/input.json @@ -27,5 +27,6 @@ "start": "2022-01-01T10:00:00", "deadline": "2022-01-01T18:00:00" } - ] + ], + "tasksCompletedToday": [] } \ No newline at end of file diff --git a/tests/jsons/stable/impossible/input.json b/tests/jsons/stable/impossible/input.json index 85bf7c71..e3ceddb6 100644 --- a/tests/jsons/stable/impossible/input.json +++ b/tests/jsons/stable/impossible/input.json @@ -29,5 +29,6 @@ "minDuration": 3, "start": "2022-01-01T23:00:00" } - ] + ], + "tasksCompletedToday": [] } \ No newline at end of file diff --git a/tests/jsons/stable/issue-overflow/input.json b/tests/jsons/stable/issue-overflow/input.json index 0d9384e4..dac4c1e6 100644 --- a/tests/jsons/stable/issue-overflow/input.json +++ b/tests/jsons/stable/issue-overflow/input.json @@ -8,5 +8,6 @@ "createdAt": 1691295894105, "minDuration": 20 } - ] + ], + "tasksCompletedToday": [] } \ No newline at end of file diff --git a/tests/jsons/stable/not-on/input.json b/tests/jsons/stable/not-on/input.json index de0edf1b..369dc46c 100644 --- a/tests/jsons/stable/not-on/input.json +++ b/tests/jsons/stable/not-on/input.json @@ -15,5 +15,6 @@ } ] } - ] + ], + "tasksCompletedToday": [] } \ No newline at end of file diff --git a/tests/jsons/stable/simple-without-deadline/input.json b/tests/jsons/stable/simple-without-deadline/input.json index 2e6998d9..8c78a9c6 100644 --- a/tests/jsons/stable/simple-without-deadline/input.json +++ b/tests/jsons/stable/simple-without-deadline/input.json @@ -22,5 +22,6 @@ "start": "2022-01-01T23:00:00", "deadline": "2022-01-02T00:00:00" } - ] + ], + "tasksCompletedToday": [] } \ No newline at end of file diff --git a/tests/jsons/stable/sleep-1/input.json b/tests/jsons/stable/sleep-1/input.json index ec9b283b..1cbd973a 100644 --- a/tests/jsons/stable/sleep-1/input.json +++ b/tests/jsons/stable/sleep-1/input.json @@ -27,5 +27,6 @@ ] } } - ] + ], + "tasksCompletedToday": [] } \ No newline at end of file diff --git a/tests/jsons/stable/start-before-cal-start/input.json b/tests/jsons/stable/start-before-cal-start/input.json index 7b2374e5..3c23b9ab 100644 --- a/tests/jsons/stable/start-before-cal-start/input.json +++ b/tests/jsons/stable/start-before-cal-start/input.json @@ -9,5 +9,6 @@ "start": "2000-01-01T00:00:00", "deadline": "2022-01-01T13:00:00" } - ] + ], + "tasksCompletedToday": [] } \ No newline at end of file diff --git a/tests/jsons/stable/task-done-today/expected.json b/tests/jsons/stable/task-done-today/expected.json new file mode 100644 index 00000000..d6ad04a8 --- /dev/null +++ b/tests/jsons/stable/task-done-today/expected.json @@ -0,0 +1,792 @@ +{ + "scheduled": [ + { + "day": "2024-04-26", + "tasks": [ + { + "taskid": 0, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 5, + "start": "2024-04-26T00:00:00", + "deadline": "2024-04-26T05:00:00" + }, + { + "taskid": 1, + "goalid": "543db004-39c5-479c-bc8d-b3824c82d2f7", + "title": "Me time 🧘🏽😌", + "duration": 1, + "start": "2024-04-26T05:00:00", + "deadline": "2024-04-26T06:00:00" + }, + { + "taskid": 2, + "goalid": "a818bc5c-e4ac-4156-b2ab-bb3a887664ac", + "title": "Breakfast πŸ₯πŸ₯£", + "duration": 1, + "start": "2024-04-26T06:00:00", + "deadline": "2024-04-26T07:00:00" + }, + { + "taskid": 3, + "goalid": "c49713e8-0799-448a-b87b-e614218f6e42", + "title": "Work πŸ’ͺ🏽", + "duration": 5, + "start": "2024-04-26T07:00:00", + "deadline": "2024-04-26T12:00:00" + }, + { + "taskid": 4, + "goalid": "6cba6d14-36e5-4a67-adcb-baa7dc7f3bb4", + "title": "Lunch πŸ₯ͺ", + "duration": 1, + "start": "2024-04-26T12:00:00", + "deadline": "2024-04-26T13:00:00" + }, + { + "taskid": 5, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-04-26T13:00:00", + "deadline": "2024-04-26T14:00:00" + }, + { + "taskid": 6, + "goalid": "c49713e8-0799-448a-b87b-e614218f6e42", + "title": "Work πŸ’ͺ🏽", + "duration": 3, + "start": "2024-04-26T14:00:00", + "deadline": "2024-04-26T17:00:00" + }, + { + "taskid": 7, + "goalid": "db64fa8f-b04d-4c19-ae84-947482dba09f", + "title": "Walk 🚢🏽", + "duration": 1, + "start": "2024-04-26T17:00:00", + "deadline": "2024-04-26T18:00:00" + }, + { + "taskid": 8, + "goalid": "72b3d9e1-430e-453b-b7b1-58d8132c4f93", + "title": "Dinner 🍽️", + "duration": 1, + "start": "2024-04-26T18:00:00", + "deadline": "2024-04-26T19:00:00" + }, + { + "taskid": 9, + "goalid": "free", + "title": "free", + "duration": 2, + "start": "2024-04-26T19:00:00", + "deadline": "2024-04-26T21:00:00" + }, + { + "taskid": 10, + "goalid": "e8cb3f40-d704-4194-9d02-c40f867d9082", + "title": "Family time πŸ₯°", + "duration": 1, + "start": "2024-04-26T21:00:00", + "deadline": "2024-04-26T22:00:00" + }, + { + "taskid": 11, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 2, + "start": "2024-04-26T22:00:00", + "deadline": "2024-04-27T00:00:00" + } + ] + }, + { + "day": "2024-04-27", + "tasks": [ + { + "taskid": 12, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 5, + "start": "2024-04-27T00:00:00", + "deadline": "2024-04-27T05:00:00" + }, + { + "taskid": 13, + "goalid": "543db004-39c5-479c-bc8d-b3824c82d2f7", + "title": "Me time 🧘🏽😌", + "duration": 1, + "start": "2024-04-27T05:00:00", + "deadline": "2024-04-27T06:00:00" + }, + { + "taskid": 14, + "goalid": "db64fa8f-b04d-4c19-ae84-947482dba09f", + "title": "Walk 🚢🏽", + "duration": 1, + "start": "2024-04-27T06:00:00", + "deadline": "2024-04-27T07:00:00" + }, + { + "taskid": 15, + "goalid": "a818bc5c-e4ac-4156-b2ab-bb3a887664ac", + "title": "Breakfast πŸ₯πŸ₯£", + "duration": 1, + "start": "2024-04-27T07:00:00", + "deadline": "2024-04-27T08:00:00" + }, + { + "taskid": 16, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-04-27T08:00:00", + "deadline": "2024-04-27T09:00:00" + }, + { + "taskid": 17, + "goalid": "a4da5446-8064-4f79-bbf2-973f59fe9294", + "title": "House chores πŸ‘πŸ§ΉπŸ› οΈ", + "duration": 1, + "start": "2024-04-27T09:00:00", + "deadline": "2024-04-27T10:00:00" + }, + { + "taskid": 18, + "goalid": "e8cb3f40-d704-4194-9d02-c40f867d9082", + "title": "Family time πŸ₯°", + "duration": 2, + "start": "2024-04-27T10:00:00", + "deadline": "2024-04-27T12:00:00" + }, + { + "taskid": 19, + "goalid": "6cba6d14-36e5-4a67-adcb-baa7dc7f3bb4", + "title": "Lunch πŸ₯ͺ", + "duration": 1, + "start": "2024-04-27T12:00:00", + "deadline": "2024-04-27T13:00:00" + }, + { + "taskid": 20, + "goalid": "a4da5446-8064-4f79-bbf2-973f59fe9294", + "title": "House chores πŸ‘πŸ§ΉπŸ› οΈ", + "duration": 1, + "start": "2024-04-27T13:00:00", + "deadline": "2024-04-27T14:00:00" + }, + { + "taskid": 21, + "goalid": "2e3e5fee-dcd7-456e-a6ca-994caea9b82b", + "title": "Hobby project πŸš‚πŸš‹", + "duration": 1, + "start": "2024-04-27T14:00:00", + "deadline": "2024-04-27T15:00:00" + }, + { + "taskid": 22, + "goalid": "free", + "title": "free", + "duration": 3, + "start": "2024-04-27T15:00:00", + "deadline": "2024-04-27T18:00:00" + }, + { + "taskid": 23, + "goalid": "72b3d9e1-430e-453b-b7b1-58d8132c4f93", + "title": "Dinner 🍽️", + "duration": 1, + "start": "2024-04-27T18:00:00", + "deadline": "2024-04-27T19:00:00" + }, + { + "taskid": 24, + "goalid": "free", + "title": "free", + "duration": 2, + "start": "2024-04-27T19:00:00", + "deadline": "2024-04-27T21:00:00" + }, + { + "taskid": 25, + "goalid": "e8cb3f40-d704-4194-9d02-c40f867d9082", + "title": "Family time πŸ₯°", + "duration": 1, + "start": "2024-04-27T21:00:00", + "deadline": "2024-04-27T22:00:00" + }, + { + "taskid": 26, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 2, + "start": "2024-04-27T22:00:00", + "deadline": "2024-04-28T00:00:00" + } + ] + }, + { + "day": "2024-04-28", + "tasks": [ + { + "taskid": 27, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 5, + "start": "2024-04-28T00:00:00", + "deadline": "2024-04-28T05:00:00" + }, + { + "taskid": 28, + "goalid": "543db004-39c5-479c-bc8d-b3824c82d2f7", + "title": "Me time 🧘🏽😌", + "duration": 1, + "start": "2024-04-28T05:00:00", + "deadline": "2024-04-28T06:00:00" + }, + { + "taskid": 29, + "goalid": "db64fa8f-b04d-4c19-ae84-947482dba09f", + "title": "Walk 🚢🏽", + "duration": 1, + "start": "2024-04-28T06:00:00", + "deadline": "2024-04-28T07:00:00" + }, + { + "taskid": 30, + "goalid": "a818bc5c-e4ac-4156-b2ab-bb3a887664ac", + "title": "Breakfast πŸ₯πŸ₯£", + "duration": 1, + "start": "2024-04-28T07:00:00", + "deadline": "2024-04-28T08:00:00" + }, + { + "taskid": 31, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-04-28T08:00:00", + "deadline": "2024-04-28T09:00:00" + }, + { + "taskid": 32, + "goalid": "a4da5446-8064-4f79-bbf2-973f59fe9294", + "title": "House chores πŸ‘πŸ§ΉπŸ› οΈ", + "duration": 1, + "start": "2024-04-28T09:00:00", + "deadline": "2024-04-28T10:00:00" + }, + { + "taskid": 33, + "goalid": "e8cb3f40-d704-4194-9d02-c40f867d9082", + "title": "Family time πŸ₯°", + "duration": 1, + "start": "2024-04-28T10:00:00", + "deadline": "2024-04-28T11:00:00" + }, + { + "taskid": 34, + "goalid": "2e3e5fee-dcd7-456e-a6ca-994caea9b82b", + "title": "Hobby project πŸš‚πŸš‹", + "duration": 1, + "start": "2024-04-28T11:00:00", + "deadline": "2024-04-28T12:00:00" + }, + { + "taskid": 35, + "goalid": "6cba6d14-36e5-4a67-adcb-baa7dc7f3bb4", + "title": "Lunch πŸ₯ͺ", + "duration": 1, + "start": "2024-04-28T12:00:00", + "deadline": "2024-04-28T13:00:00" + }, + { + "taskid": 36, + "goalid": "2e3e5fee-dcd7-456e-a6ca-994caea9b82b", + "title": "Hobby project πŸš‚πŸš‹", + "duration": 2, + "start": "2024-04-28T13:00:00", + "deadline": "2024-04-28T15:00:00" + }, + { + "taskid": 37, + "goalid": "free", + "title": "free", + "duration": 3, + "start": "2024-04-28T15:00:00", + "deadline": "2024-04-28T18:00:00" + }, + { + "taskid": 38, + "goalid": "72b3d9e1-430e-453b-b7b1-58d8132c4f93", + "title": "Dinner 🍽️", + "duration": 1, + "start": "2024-04-28T18:00:00", + "deadline": "2024-04-28T19:00:00" + }, + { + "taskid": 39, + "goalid": "free", + "title": "free", + "duration": 2, + "start": "2024-04-28T19:00:00", + "deadline": "2024-04-28T21:00:00" + }, + { + "taskid": 40, + "goalid": "e8cb3f40-d704-4194-9d02-c40f867d9082", + "title": "Family time πŸ₯°", + "duration": 1, + "start": "2024-04-28T21:00:00", + "deadline": "2024-04-28T22:00:00" + }, + { + "taskid": 41, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 2, + "start": "2024-04-28T22:00:00", + "deadline": "2024-04-29T00:00:00" + } + ] + }, + { + "day": "2024-04-29", + "tasks": [ + { + "taskid": 42, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 5, + "start": "2024-04-29T00:00:00", + "deadline": "2024-04-29T05:00:00" + }, + { + "taskid": 43, + "goalid": "543db004-39c5-479c-bc8d-b3824c82d2f7", + "title": "Me time 🧘🏽😌", + "duration": 1, + "start": "2024-04-29T05:00:00", + "deadline": "2024-04-29T06:00:00" + }, + { + "taskid": 44, + "goalid": "a818bc5c-e4ac-4156-b2ab-bb3a887664ac", + "title": "Breakfast πŸ₯πŸ₯£", + "duration": 1, + "start": "2024-04-29T06:00:00", + "deadline": "2024-04-29T07:00:00" + }, + { + "taskid": 45, + "goalid": "c49713e8-0799-448a-b87b-e614218f6e42", + "title": "Work πŸ’ͺ🏽", + "duration": 5, + "start": "2024-04-29T07:00:00", + "deadline": "2024-04-29T12:00:00" + }, + { + "taskid": 46, + "goalid": "6cba6d14-36e5-4a67-adcb-baa7dc7f3bb4", + "title": "Lunch πŸ₯ͺ", + "duration": 1, + "start": "2024-04-29T12:00:00", + "deadline": "2024-04-29T13:00:00" + }, + { + "taskid": 47, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-04-29T13:00:00", + "deadline": "2024-04-29T14:00:00" + }, + { + "taskid": 48, + "goalid": "c49713e8-0799-448a-b87b-e614218f6e42", + "title": "Work πŸ’ͺ🏽", + "duration": 3, + "start": "2024-04-29T14:00:00", + "deadline": "2024-04-29T17:00:00" + }, + { + "taskid": 49, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-04-29T17:00:00", + "deadline": "2024-04-29T18:00:00" + }, + { + "taskid": 50, + "goalid": "72b3d9e1-430e-453b-b7b1-58d8132c4f93", + "title": "Dinner 🍽️", + "duration": 1, + "start": "2024-04-29T18:00:00", + "deadline": "2024-04-29T19:00:00" + }, + { + "taskid": 51, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-04-29T19:00:00", + "deadline": "2024-04-29T20:00:00" + }, + { + "taskid": 52, + "goalid": "db64fa8f-b04d-4c19-ae84-947482dba09f", + "title": "Walk 🚢🏽", + "duration": 1, + "start": "2024-04-29T20:00:00", + "deadline": "2024-04-29T21:00:00" + }, + { + "taskid": 53, + "goalid": "e8cb3f40-d704-4194-9d02-c40f867d9082", + "title": "Family time πŸ₯°", + "duration": 1, + "start": "2024-04-29T21:00:00", + "deadline": "2024-04-29T22:00:00" + }, + { + "taskid": 54, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 2, + "start": "2024-04-29T22:00:00", + "deadline": "2024-04-30T00:00:00" + } + ] + }, + { + "day": "2024-04-30", + "tasks": [ + { + "taskid": 55, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 5, + "start": "2024-04-30T00:00:00", + "deadline": "2024-04-30T05:00:00" + }, + { + "taskid": 56, + "goalid": "543db004-39c5-479c-bc8d-b3824c82d2f7", + "title": "Me time 🧘🏽😌", + "duration": 1, + "start": "2024-04-30T05:00:00", + "deadline": "2024-04-30T06:00:00" + }, + { + "taskid": 57, + "goalid": "a818bc5c-e4ac-4156-b2ab-bb3a887664ac", + "title": "Breakfast πŸ₯πŸ₯£", + "duration": 1, + "start": "2024-04-30T06:00:00", + "deadline": "2024-04-30T07:00:00" + }, + { + "taskid": 58, + "goalid": "c49713e8-0799-448a-b87b-e614218f6e42", + "title": "Work πŸ’ͺ🏽", + "duration": 5, + "start": "2024-04-30T07:00:00", + "deadline": "2024-04-30T12:00:00" + }, + { + "taskid": 59, + "goalid": "6cba6d14-36e5-4a67-adcb-baa7dc7f3bb4", + "title": "Lunch πŸ₯ͺ", + "duration": 1, + "start": "2024-04-30T12:00:00", + "deadline": "2024-04-30T13:00:00" + }, + { + "taskid": 60, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-04-30T13:00:00", + "deadline": "2024-04-30T14:00:00" + }, + { + "taskid": 61, + "goalid": "c49713e8-0799-448a-b87b-e614218f6e42", + "title": "Work πŸ’ͺ🏽", + "duration": 3, + "start": "2024-04-30T14:00:00", + "deadline": "2024-04-30T17:00:00" + }, + { + "taskid": 62, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-04-30T17:00:00", + "deadline": "2024-04-30T18:00:00" + }, + { + "taskid": 63, + "goalid": "72b3d9e1-430e-453b-b7b1-58d8132c4f93", + "title": "Dinner 🍽️", + "duration": 1, + "start": "2024-04-30T18:00:00", + "deadline": "2024-04-30T19:00:00" + }, + { + "taskid": 64, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-04-30T19:00:00", + "deadline": "2024-04-30T20:00:00" + }, + { + "taskid": 65, + "goalid": "db64fa8f-b04d-4c19-ae84-947482dba09f", + "title": "Walk 🚢🏽", + "duration": 1, + "start": "2024-04-30T20:00:00", + "deadline": "2024-04-30T21:00:00" + }, + { + "taskid": 66, + "goalid": "e8cb3f40-d704-4194-9d02-c40f867d9082", + "title": "Family time πŸ₯°", + "duration": 1, + "start": "2024-04-30T21:00:00", + "deadline": "2024-04-30T22:00:00" + }, + { + "taskid": 67, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 2, + "start": "2024-04-30T22:00:00", + "deadline": "2024-05-01T00:00:00" + } + ] + }, + { + "day": "2024-05-01", + "tasks": [ + { + "taskid": 68, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 5, + "start": "2024-05-01T00:00:00", + "deadline": "2024-05-01T05:00:00" + }, + { + "taskid": 69, + "goalid": "543db004-39c5-479c-bc8d-b3824c82d2f7", + "title": "Me time 🧘🏽😌", + "duration": 1, + "start": "2024-05-01T05:00:00", + "deadline": "2024-05-01T06:00:00" + }, + { + "taskid": 70, + "goalid": "a818bc5c-e4ac-4156-b2ab-bb3a887664ac", + "title": "Breakfast πŸ₯πŸ₯£", + "duration": 1, + "start": "2024-05-01T06:00:00", + "deadline": "2024-05-01T07:00:00" + }, + { + "taskid": 71, + "goalid": "c49713e8-0799-448a-b87b-e614218f6e42", + "title": "Work πŸ’ͺ🏽", + "duration": 5, + "start": "2024-05-01T07:00:00", + "deadline": "2024-05-01T12:00:00" + }, + { + "taskid": 72, + "goalid": "6cba6d14-36e5-4a67-adcb-baa7dc7f3bb4", + "title": "Lunch πŸ₯ͺ", + "duration": 1, + "start": "2024-05-01T12:00:00", + "deadline": "2024-05-01T13:00:00" + }, + { + "taskid": 73, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-05-01T13:00:00", + "deadline": "2024-05-01T14:00:00" + }, + { + "taskid": 74, + "goalid": "c49713e8-0799-448a-b87b-e614218f6e42", + "title": "Work πŸ’ͺ🏽", + "duration": 3, + "start": "2024-05-01T14:00:00", + "deadline": "2024-05-01T17:00:00" + }, + { + "taskid": 75, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-05-01T17:00:00", + "deadline": "2024-05-01T18:00:00" + }, + { + "taskid": 76, + "goalid": "72b3d9e1-430e-453b-b7b1-58d8132c4f93", + "title": "Dinner 🍽️", + "duration": 1, + "start": "2024-05-01T18:00:00", + "deadline": "2024-05-01T19:00:00" + }, + { + "taskid": 77, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-05-01T19:00:00", + "deadline": "2024-05-01T20:00:00" + }, + { + "taskid": 78, + "goalid": "db64fa8f-b04d-4c19-ae84-947482dba09f", + "title": "Walk 🚢🏽", + "duration": 1, + "start": "2024-05-01T20:00:00", + "deadline": "2024-05-01T21:00:00" + }, + { + "taskid": 79, + "goalid": "e8cb3f40-d704-4194-9d02-c40f867d9082", + "title": "Family time πŸ₯°", + "duration": 1, + "start": "2024-05-01T21:00:00", + "deadline": "2024-05-01T22:00:00" + }, + { + "taskid": 80, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 2, + "start": "2024-05-01T22:00:00", + "deadline": "2024-05-02T00:00:00" + } + ] + }, + { + "day": "2024-05-02", + "tasks": [ + { + "taskid": 81, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 5, + "start": "2024-05-02T00:00:00", + "deadline": "2024-05-02T05:00:00" + }, + { + "taskid": 82, + "goalid": "543db004-39c5-479c-bc8d-b3824c82d2f7", + "title": "Me time 🧘🏽😌", + "duration": 1, + "start": "2024-05-02T05:00:00", + "deadline": "2024-05-02T06:00:00" + }, + { + "taskid": 83, + "goalid": "a818bc5c-e4ac-4156-b2ab-bb3a887664ac", + "title": "Breakfast πŸ₯πŸ₯£", + "duration": 1, + "start": "2024-05-02T06:00:00", + "deadline": "2024-05-02T07:00:00" + }, + { + "taskid": 84, + "goalid": "c49713e8-0799-448a-b87b-e614218f6e42", + "title": "Work πŸ’ͺ🏽", + "duration": 5, + "start": "2024-05-02T07:00:00", + "deadline": "2024-05-02T12:00:00" + }, + { + "taskid": 85, + "goalid": "6cba6d14-36e5-4a67-adcb-baa7dc7f3bb4", + "title": "Lunch πŸ₯ͺ", + "duration": 1, + "start": "2024-05-02T12:00:00", + "deadline": "2024-05-02T13:00:00" + }, + { + "taskid": 86, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-05-02T13:00:00", + "deadline": "2024-05-02T14:00:00" + }, + { + "taskid": 87, + "goalid": "c49713e8-0799-448a-b87b-e614218f6e42", + "title": "Work πŸ’ͺ🏽", + "duration": 3, + "start": "2024-05-02T14:00:00", + "deadline": "2024-05-02T17:00:00" + }, + { + "taskid": 88, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-05-02T17:00:00", + "deadline": "2024-05-02T18:00:00" + }, + { + "taskid": 89, + "goalid": "72b3d9e1-430e-453b-b7b1-58d8132c4f93", + "title": "Dinner 🍽️", + "duration": 1, + "start": "2024-05-02T18:00:00", + "deadline": "2024-05-02T19:00:00" + }, + { + "taskid": 90, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-05-02T19:00:00", + "deadline": "2024-05-02T20:00:00" + }, + { + "taskid": 91, + "goalid": "db64fa8f-b04d-4c19-ae84-947482dba09f", + "title": "Walk 🚢🏽", + "duration": 1, + "start": "2024-05-02T20:00:00", + "deadline": "2024-05-02T21:00:00" + }, + { + "taskid": 92, + "goalid": "e8cb3f40-d704-4194-9d02-c40f867d9082", + "title": "Family time πŸ₯°", + "duration": 1, + "start": "2024-05-02T21:00:00", + "deadline": "2024-05-02T22:00:00" + }, + { + "taskid": 93, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 2, + "start": "2024-05-02T22:00:00", + "deadline": "2024-05-03T00:00:00" + } + ] + } + ], + "impossible": [] +} \ No newline at end of file diff --git a/tests/jsons/stable/task-done-today/input.json b/tests/jsons/stable/task-done-today/input.json new file mode 100644 index 00000000..cd3837a6 --- /dev/null +++ b/tests/jsons/stable/task-done-today/input.json @@ -0,0 +1,263 @@ +{ + "startDate": "2024-04-26T00:00:00", + "endDate": "2024-05-03T00:00:00", + "goals": [ + { + "id": "ebe4474d-0d9e-460e-83ea-f9c047b1adc6", + "title": "Daily habits πŸ”", + "createdAt": "2024-04-26T10:59:24.666Z", + "children": [ + "db64fa8f-b04d-4c19-ae84-947482dba09f", + "543db004-39c5-479c-bc8d-b3824c82d2f7", + "72b3d9e1-430e-453b-b7b1-58d8132c4f93", + "6cba6d14-36e5-4a67-adcb-baa7dc7f3bb4", + "a818bc5c-e4ac-4156-b2ab-bb3a887664ac" + ] + }, + { + "id": "e8cb3f40-d704-4194-9d02-c40f867d9082", + "title": "Family time πŸ₯°", + "filters": { + "afterTime": 9, + "beforeTime": 24, + "onDays": [ + "mon", + "tue", + "wed", + "thu", + "fri", + "sat", + "sun" + ] + }, + "createdAt": "2024-04-26T10:59:24.665Z", + "budget": { + "minPerDay": 1, + "maxPerDay": 6, + "minPerWeek": 10, + "maxPerWeek": 10 + } + }, + { + "id": "db64fa8f-b04d-4c19-ae84-947482dba09f", + "title": "Walk 🚢🏽", + "filters": { + "afterTime": 6, + "beforeTime": 21, + "onDays": [ + "mon", + "tue", + "wed", + "thu", + "fri", + "sat", + "sun" + ] + }, + "createdAt": "2024-04-26T10:59:24.666Z", + "budget": { + "minPerDay": 1, + "maxPerDay": 1, + "minPerWeek": 7, + "maxPerWeek": 7 + } + }, + { + "id": "c49713e8-0799-448a-b87b-e614218f6e42", + "title": "Work πŸ’ͺ🏽", + "filters": { + "afterTime": 6, + "beforeTime": 18, + "onDays": [ + "mon", + "tue", + "wed", + "thu", + "fri" + ] + }, + "createdAt": "2024-04-26T10:59:24.666Z", + "budget": { + "minPerDay": 6, + "maxPerDay": 10, + "minPerWeek": 40, + "maxPerWeek": 40 + } + }, + { + "id": "a818bc5c-e4ac-4156-b2ab-bb3a887664ac", + "title": "Breakfast πŸ₯πŸ₯£", + "filters": { + "afterTime": 6, + "beforeTime": 9, + "onDays": [ + "mon", + "tue", + "wed", + "thu", + "fri", + "sat", + "sun" + ] + }, + "createdAt": "2024-04-26T10:59:24.667Z", + "budget": { + "minPerDay": 1, + "maxPerDay": 1, + "minPerWeek": 7, + "maxPerWeek": 7 + } + }, + { + "id": "a4da5446-8064-4f79-bbf2-973f59fe9294", + "title": "House chores πŸ‘πŸ§ΉπŸ› οΈ", + "filters": { + "afterTime": 9, + "beforeTime": 24, + "onDays": [ + "sat", + "sun" + ] + }, + "createdAt": "2024-04-26T10:59:24.665Z", + "budget": { + "minPerDay": 1, + "maxPerDay": 3, + "minPerWeek": 2, + "maxPerWeek": 3 + } + }, + { + "id": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "filters": { + "afterTime": 22, + "beforeTime": 7, + "onDays": [ + "mon", + "tue", + "wed", + "thu", + "fri", + "sat", + "sun" + ] + }, + "createdAt": "2024-04-26T10:59:24.664Z", + "budget": { + "minPerDay": 6, + "maxPerDay": 8, + "minPerWeek": 42, + "maxPerWeek": 52 + } + }, + { + "id": "72b3d9e1-430e-453b-b7b1-58d8132c4f93", + "title": "Dinner 🍽️", + "filters": { + "afterTime": 18, + "beforeTime": 20, + "onDays": [ + "mon", + "tue", + "wed", + "thu", + "fri", + "sat", + "sun" + ] + }, + "createdAt": "2024-04-26T10:59:24.666Z", + "budget": { + "minPerDay": 1, + "maxPerDay": 1, + "minPerWeek": 7, + "maxPerWeek": 7 + } + }, + { + "id": "6cba6d14-36e5-4a67-adcb-baa7dc7f3bb4", + "title": "Lunch πŸ₯ͺ", + "filters": { + "afterTime": 12, + "beforeTime": 14, + "onDays": [ + "mon", + "tue", + "wed", + "thu", + "fri", + "sat", + "sun" + ] + }, + "createdAt": "2024-04-26T10:59:24.666Z", + "budget": { + "minPerDay": 1, + "maxPerDay": 1, + "minPerWeek": 7, + "maxPerWeek": 7 + } + }, + { + "id": "543db004-39c5-479c-bc8d-b3824c82d2f7", + "title": "Me time 🧘🏽😌", + "filters": { + "afterTime": 5, + "beforeTime": 23, + "onDays": [ + "mon", + "tue", + "wed", + "thu", + "fri", + "sat", + "sun" + ] + }, + "createdAt": "2024-04-26T10:59:24.666Z", + "budget": { + "minPerDay": 1, + "maxPerDay": 1, + "minPerWeek": 7, + "maxPerWeek": 7 + } + }, + { + "id": "2e3e5fee-dcd7-456e-a6ca-994caea9b82b", + "title": "Hobby project πŸš‚πŸš‹", + "filters": { + "afterTime": 9, + "beforeTime": 24, + "onDays": [ + "mon", + "tue", + "wed", + "thu", + "fri", + "sat", + "sun" + ] + }, + "createdAt": "2024-04-26T10:59:24.665Z", + "budget": { + "minPerDay": 0, + "maxPerDay": 4, + "minPerWeek": 1, + "maxPerWeek": 4 + } + } + ], + "tasksCompletedToday": [ + { + "goalid": "c49713e8-0799-448a-b87b-e614218f6e42", + "start": "2024-04-26T14:00:00", + "deadline": "2024-04-26T17:00:00" + }, + { + "goalid": "c49713e8-0799-448a-b87b-e614218f6e42", + "start": "2024-04-26T07:00:00", + "deadline": "2024-04-26T12:00:00" + } + ] +} \ No newline at end of file diff --git a/tests/jsons/stable/task-done-today/observed.json b/tests/jsons/stable/task-done-today/observed.json new file mode 100644 index 00000000..d6ad04a8 --- /dev/null +++ b/tests/jsons/stable/task-done-today/observed.json @@ -0,0 +1,792 @@ +{ + "scheduled": [ + { + "day": "2024-04-26", + "tasks": [ + { + "taskid": 0, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 5, + "start": "2024-04-26T00:00:00", + "deadline": "2024-04-26T05:00:00" + }, + { + "taskid": 1, + "goalid": "543db004-39c5-479c-bc8d-b3824c82d2f7", + "title": "Me time 🧘🏽😌", + "duration": 1, + "start": "2024-04-26T05:00:00", + "deadline": "2024-04-26T06:00:00" + }, + { + "taskid": 2, + "goalid": "a818bc5c-e4ac-4156-b2ab-bb3a887664ac", + "title": "Breakfast πŸ₯πŸ₯£", + "duration": 1, + "start": "2024-04-26T06:00:00", + "deadline": "2024-04-26T07:00:00" + }, + { + "taskid": 3, + "goalid": "c49713e8-0799-448a-b87b-e614218f6e42", + "title": "Work πŸ’ͺ🏽", + "duration": 5, + "start": "2024-04-26T07:00:00", + "deadline": "2024-04-26T12:00:00" + }, + { + "taskid": 4, + "goalid": "6cba6d14-36e5-4a67-adcb-baa7dc7f3bb4", + "title": "Lunch πŸ₯ͺ", + "duration": 1, + "start": "2024-04-26T12:00:00", + "deadline": "2024-04-26T13:00:00" + }, + { + "taskid": 5, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-04-26T13:00:00", + "deadline": "2024-04-26T14:00:00" + }, + { + "taskid": 6, + "goalid": "c49713e8-0799-448a-b87b-e614218f6e42", + "title": "Work πŸ’ͺ🏽", + "duration": 3, + "start": "2024-04-26T14:00:00", + "deadline": "2024-04-26T17:00:00" + }, + { + "taskid": 7, + "goalid": "db64fa8f-b04d-4c19-ae84-947482dba09f", + "title": "Walk 🚢🏽", + "duration": 1, + "start": "2024-04-26T17:00:00", + "deadline": "2024-04-26T18:00:00" + }, + { + "taskid": 8, + "goalid": "72b3d9e1-430e-453b-b7b1-58d8132c4f93", + "title": "Dinner 🍽️", + "duration": 1, + "start": "2024-04-26T18:00:00", + "deadline": "2024-04-26T19:00:00" + }, + { + "taskid": 9, + "goalid": "free", + "title": "free", + "duration": 2, + "start": "2024-04-26T19:00:00", + "deadline": "2024-04-26T21:00:00" + }, + { + "taskid": 10, + "goalid": "e8cb3f40-d704-4194-9d02-c40f867d9082", + "title": "Family time πŸ₯°", + "duration": 1, + "start": "2024-04-26T21:00:00", + "deadline": "2024-04-26T22:00:00" + }, + { + "taskid": 11, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 2, + "start": "2024-04-26T22:00:00", + "deadline": "2024-04-27T00:00:00" + } + ] + }, + { + "day": "2024-04-27", + "tasks": [ + { + "taskid": 12, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 5, + "start": "2024-04-27T00:00:00", + "deadline": "2024-04-27T05:00:00" + }, + { + "taskid": 13, + "goalid": "543db004-39c5-479c-bc8d-b3824c82d2f7", + "title": "Me time 🧘🏽😌", + "duration": 1, + "start": "2024-04-27T05:00:00", + "deadline": "2024-04-27T06:00:00" + }, + { + "taskid": 14, + "goalid": "db64fa8f-b04d-4c19-ae84-947482dba09f", + "title": "Walk 🚢🏽", + "duration": 1, + "start": "2024-04-27T06:00:00", + "deadline": "2024-04-27T07:00:00" + }, + { + "taskid": 15, + "goalid": "a818bc5c-e4ac-4156-b2ab-bb3a887664ac", + "title": "Breakfast πŸ₯πŸ₯£", + "duration": 1, + "start": "2024-04-27T07:00:00", + "deadline": "2024-04-27T08:00:00" + }, + { + "taskid": 16, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-04-27T08:00:00", + "deadline": "2024-04-27T09:00:00" + }, + { + "taskid": 17, + "goalid": "a4da5446-8064-4f79-bbf2-973f59fe9294", + "title": "House chores πŸ‘πŸ§ΉπŸ› οΈ", + "duration": 1, + "start": "2024-04-27T09:00:00", + "deadline": "2024-04-27T10:00:00" + }, + { + "taskid": 18, + "goalid": "e8cb3f40-d704-4194-9d02-c40f867d9082", + "title": "Family time πŸ₯°", + "duration": 2, + "start": "2024-04-27T10:00:00", + "deadline": "2024-04-27T12:00:00" + }, + { + "taskid": 19, + "goalid": "6cba6d14-36e5-4a67-adcb-baa7dc7f3bb4", + "title": "Lunch πŸ₯ͺ", + "duration": 1, + "start": "2024-04-27T12:00:00", + "deadline": "2024-04-27T13:00:00" + }, + { + "taskid": 20, + "goalid": "a4da5446-8064-4f79-bbf2-973f59fe9294", + "title": "House chores πŸ‘πŸ§ΉπŸ› οΈ", + "duration": 1, + "start": "2024-04-27T13:00:00", + "deadline": "2024-04-27T14:00:00" + }, + { + "taskid": 21, + "goalid": "2e3e5fee-dcd7-456e-a6ca-994caea9b82b", + "title": "Hobby project πŸš‚πŸš‹", + "duration": 1, + "start": "2024-04-27T14:00:00", + "deadline": "2024-04-27T15:00:00" + }, + { + "taskid": 22, + "goalid": "free", + "title": "free", + "duration": 3, + "start": "2024-04-27T15:00:00", + "deadline": "2024-04-27T18:00:00" + }, + { + "taskid": 23, + "goalid": "72b3d9e1-430e-453b-b7b1-58d8132c4f93", + "title": "Dinner 🍽️", + "duration": 1, + "start": "2024-04-27T18:00:00", + "deadline": "2024-04-27T19:00:00" + }, + { + "taskid": 24, + "goalid": "free", + "title": "free", + "duration": 2, + "start": "2024-04-27T19:00:00", + "deadline": "2024-04-27T21:00:00" + }, + { + "taskid": 25, + "goalid": "e8cb3f40-d704-4194-9d02-c40f867d9082", + "title": "Family time πŸ₯°", + "duration": 1, + "start": "2024-04-27T21:00:00", + "deadline": "2024-04-27T22:00:00" + }, + { + "taskid": 26, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 2, + "start": "2024-04-27T22:00:00", + "deadline": "2024-04-28T00:00:00" + } + ] + }, + { + "day": "2024-04-28", + "tasks": [ + { + "taskid": 27, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 5, + "start": "2024-04-28T00:00:00", + "deadline": "2024-04-28T05:00:00" + }, + { + "taskid": 28, + "goalid": "543db004-39c5-479c-bc8d-b3824c82d2f7", + "title": "Me time 🧘🏽😌", + "duration": 1, + "start": "2024-04-28T05:00:00", + "deadline": "2024-04-28T06:00:00" + }, + { + "taskid": 29, + "goalid": "db64fa8f-b04d-4c19-ae84-947482dba09f", + "title": "Walk 🚢🏽", + "duration": 1, + "start": "2024-04-28T06:00:00", + "deadline": "2024-04-28T07:00:00" + }, + { + "taskid": 30, + "goalid": "a818bc5c-e4ac-4156-b2ab-bb3a887664ac", + "title": "Breakfast πŸ₯πŸ₯£", + "duration": 1, + "start": "2024-04-28T07:00:00", + "deadline": "2024-04-28T08:00:00" + }, + { + "taskid": 31, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-04-28T08:00:00", + "deadline": "2024-04-28T09:00:00" + }, + { + "taskid": 32, + "goalid": "a4da5446-8064-4f79-bbf2-973f59fe9294", + "title": "House chores πŸ‘πŸ§ΉπŸ› οΈ", + "duration": 1, + "start": "2024-04-28T09:00:00", + "deadline": "2024-04-28T10:00:00" + }, + { + "taskid": 33, + "goalid": "e8cb3f40-d704-4194-9d02-c40f867d9082", + "title": "Family time πŸ₯°", + "duration": 1, + "start": "2024-04-28T10:00:00", + "deadline": "2024-04-28T11:00:00" + }, + { + "taskid": 34, + "goalid": "2e3e5fee-dcd7-456e-a6ca-994caea9b82b", + "title": "Hobby project πŸš‚πŸš‹", + "duration": 1, + "start": "2024-04-28T11:00:00", + "deadline": "2024-04-28T12:00:00" + }, + { + "taskid": 35, + "goalid": "6cba6d14-36e5-4a67-adcb-baa7dc7f3bb4", + "title": "Lunch πŸ₯ͺ", + "duration": 1, + "start": "2024-04-28T12:00:00", + "deadline": "2024-04-28T13:00:00" + }, + { + "taskid": 36, + "goalid": "2e3e5fee-dcd7-456e-a6ca-994caea9b82b", + "title": "Hobby project πŸš‚πŸš‹", + "duration": 2, + "start": "2024-04-28T13:00:00", + "deadline": "2024-04-28T15:00:00" + }, + { + "taskid": 37, + "goalid": "free", + "title": "free", + "duration": 3, + "start": "2024-04-28T15:00:00", + "deadline": "2024-04-28T18:00:00" + }, + { + "taskid": 38, + "goalid": "72b3d9e1-430e-453b-b7b1-58d8132c4f93", + "title": "Dinner 🍽️", + "duration": 1, + "start": "2024-04-28T18:00:00", + "deadline": "2024-04-28T19:00:00" + }, + { + "taskid": 39, + "goalid": "free", + "title": "free", + "duration": 2, + "start": "2024-04-28T19:00:00", + "deadline": "2024-04-28T21:00:00" + }, + { + "taskid": 40, + "goalid": "e8cb3f40-d704-4194-9d02-c40f867d9082", + "title": "Family time πŸ₯°", + "duration": 1, + "start": "2024-04-28T21:00:00", + "deadline": "2024-04-28T22:00:00" + }, + { + "taskid": 41, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 2, + "start": "2024-04-28T22:00:00", + "deadline": "2024-04-29T00:00:00" + } + ] + }, + { + "day": "2024-04-29", + "tasks": [ + { + "taskid": 42, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 5, + "start": "2024-04-29T00:00:00", + "deadline": "2024-04-29T05:00:00" + }, + { + "taskid": 43, + "goalid": "543db004-39c5-479c-bc8d-b3824c82d2f7", + "title": "Me time 🧘🏽😌", + "duration": 1, + "start": "2024-04-29T05:00:00", + "deadline": "2024-04-29T06:00:00" + }, + { + "taskid": 44, + "goalid": "a818bc5c-e4ac-4156-b2ab-bb3a887664ac", + "title": "Breakfast πŸ₯πŸ₯£", + "duration": 1, + "start": "2024-04-29T06:00:00", + "deadline": "2024-04-29T07:00:00" + }, + { + "taskid": 45, + "goalid": "c49713e8-0799-448a-b87b-e614218f6e42", + "title": "Work πŸ’ͺ🏽", + "duration": 5, + "start": "2024-04-29T07:00:00", + "deadline": "2024-04-29T12:00:00" + }, + { + "taskid": 46, + "goalid": "6cba6d14-36e5-4a67-adcb-baa7dc7f3bb4", + "title": "Lunch πŸ₯ͺ", + "duration": 1, + "start": "2024-04-29T12:00:00", + "deadline": "2024-04-29T13:00:00" + }, + { + "taskid": 47, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-04-29T13:00:00", + "deadline": "2024-04-29T14:00:00" + }, + { + "taskid": 48, + "goalid": "c49713e8-0799-448a-b87b-e614218f6e42", + "title": "Work πŸ’ͺ🏽", + "duration": 3, + "start": "2024-04-29T14:00:00", + "deadline": "2024-04-29T17:00:00" + }, + { + "taskid": 49, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-04-29T17:00:00", + "deadline": "2024-04-29T18:00:00" + }, + { + "taskid": 50, + "goalid": "72b3d9e1-430e-453b-b7b1-58d8132c4f93", + "title": "Dinner 🍽️", + "duration": 1, + "start": "2024-04-29T18:00:00", + "deadline": "2024-04-29T19:00:00" + }, + { + "taskid": 51, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-04-29T19:00:00", + "deadline": "2024-04-29T20:00:00" + }, + { + "taskid": 52, + "goalid": "db64fa8f-b04d-4c19-ae84-947482dba09f", + "title": "Walk 🚢🏽", + "duration": 1, + "start": "2024-04-29T20:00:00", + "deadline": "2024-04-29T21:00:00" + }, + { + "taskid": 53, + "goalid": "e8cb3f40-d704-4194-9d02-c40f867d9082", + "title": "Family time πŸ₯°", + "duration": 1, + "start": "2024-04-29T21:00:00", + "deadline": "2024-04-29T22:00:00" + }, + { + "taskid": 54, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 2, + "start": "2024-04-29T22:00:00", + "deadline": "2024-04-30T00:00:00" + } + ] + }, + { + "day": "2024-04-30", + "tasks": [ + { + "taskid": 55, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 5, + "start": "2024-04-30T00:00:00", + "deadline": "2024-04-30T05:00:00" + }, + { + "taskid": 56, + "goalid": "543db004-39c5-479c-bc8d-b3824c82d2f7", + "title": "Me time 🧘🏽😌", + "duration": 1, + "start": "2024-04-30T05:00:00", + "deadline": "2024-04-30T06:00:00" + }, + { + "taskid": 57, + "goalid": "a818bc5c-e4ac-4156-b2ab-bb3a887664ac", + "title": "Breakfast πŸ₯πŸ₯£", + "duration": 1, + "start": "2024-04-30T06:00:00", + "deadline": "2024-04-30T07:00:00" + }, + { + "taskid": 58, + "goalid": "c49713e8-0799-448a-b87b-e614218f6e42", + "title": "Work πŸ’ͺ🏽", + "duration": 5, + "start": "2024-04-30T07:00:00", + "deadline": "2024-04-30T12:00:00" + }, + { + "taskid": 59, + "goalid": "6cba6d14-36e5-4a67-adcb-baa7dc7f3bb4", + "title": "Lunch πŸ₯ͺ", + "duration": 1, + "start": "2024-04-30T12:00:00", + "deadline": "2024-04-30T13:00:00" + }, + { + "taskid": 60, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-04-30T13:00:00", + "deadline": "2024-04-30T14:00:00" + }, + { + "taskid": 61, + "goalid": "c49713e8-0799-448a-b87b-e614218f6e42", + "title": "Work πŸ’ͺ🏽", + "duration": 3, + "start": "2024-04-30T14:00:00", + "deadline": "2024-04-30T17:00:00" + }, + { + "taskid": 62, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-04-30T17:00:00", + "deadline": "2024-04-30T18:00:00" + }, + { + "taskid": 63, + "goalid": "72b3d9e1-430e-453b-b7b1-58d8132c4f93", + "title": "Dinner 🍽️", + "duration": 1, + "start": "2024-04-30T18:00:00", + "deadline": "2024-04-30T19:00:00" + }, + { + "taskid": 64, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-04-30T19:00:00", + "deadline": "2024-04-30T20:00:00" + }, + { + "taskid": 65, + "goalid": "db64fa8f-b04d-4c19-ae84-947482dba09f", + "title": "Walk 🚢🏽", + "duration": 1, + "start": "2024-04-30T20:00:00", + "deadline": "2024-04-30T21:00:00" + }, + { + "taskid": 66, + "goalid": "e8cb3f40-d704-4194-9d02-c40f867d9082", + "title": "Family time πŸ₯°", + "duration": 1, + "start": "2024-04-30T21:00:00", + "deadline": "2024-04-30T22:00:00" + }, + { + "taskid": 67, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 2, + "start": "2024-04-30T22:00:00", + "deadline": "2024-05-01T00:00:00" + } + ] + }, + { + "day": "2024-05-01", + "tasks": [ + { + "taskid": 68, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 5, + "start": "2024-05-01T00:00:00", + "deadline": "2024-05-01T05:00:00" + }, + { + "taskid": 69, + "goalid": "543db004-39c5-479c-bc8d-b3824c82d2f7", + "title": "Me time 🧘🏽😌", + "duration": 1, + "start": "2024-05-01T05:00:00", + "deadline": "2024-05-01T06:00:00" + }, + { + "taskid": 70, + "goalid": "a818bc5c-e4ac-4156-b2ab-bb3a887664ac", + "title": "Breakfast πŸ₯πŸ₯£", + "duration": 1, + "start": "2024-05-01T06:00:00", + "deadline": "2024-05-01T07:00:00" + }, + { + "taskid": 71, + "goalid": "c49713e8-0799-448a-b87b-e614218f6e42", + "title": "Work πŸ’ͺ🏽", + "duration": 5, + "start": "2024-05-01T07:00:00", + "deadline": "2024-05-01T12:00:00" + }, + { + "taskid": 72, + "goalid": "6cba6d14-36e5-4a67-adcb-baa7dc7f3bb4", + "title": "Lunch πŸ₯ͺ", + "duration": 1, + "start": "2024-05-01T12:00:00", + "deadline": "2024-05-01T13:00:00" + }, + { + "taskid": 73, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-05-01T13:00:00", + "deadline": "2024-05-01T14:00:00" + }, + { + "taskid": 74, + "goalid": "c49713e8-0799-448a-b87b-e614218f6e42", + "title": "Work πŸ’ͺ🏽", + "duration": 3, + "start": "2024-05-01T14:00:00", + "deadline": "2024-05-01T17:00:00" + }, + { + "taskid": 75, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-05-01T17:00:00", + "deadline": "2024-05-01T18:00:00" + }, + { + "taskid": 76, + "goalid": "72b3d9e1-430e-453b-b7b1-58d8132c4f93", + "title": "Dinner 🍽️", + "duration": 1, + "start": "2024-05-01T18:00:00", + "deadline": "2024-05-01T19:00:00" + }, + { + "taskid": 77, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-05-01T19:00:00", + "deadline": "2024-05-01T20:00:00" + }, + { + "taskid": 78, + "goalid": "db64fa8f-b04d-4c19-ae84-947482dba09f", + "title": "Walk 🚢🏽", + "duration": 1, + "start": "2024-05-01T20:00:00", + "deadline": "2024-05-01T21:00:00" + }, + { + "taskid": 79, + "goalid": "e8cb3f40-d704-4194-9d02-c40f867d9082", + "title": "Family time πŸ₯°", + "duration": 1, + "start": "2024-05-01T21:00:00", + "deadline": "2024-05-01T22:00:00" + }, + { + "taskid": 80, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 2, + "start": "2024-05-01T22:00:00", + "deadline": "2024-05-02T00:00:00" + } + ] + }, + { + "day": "2024-05-02", + "tasks": [ + { + "taskid": 81, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 5, + "start": "2024-05-02T00:00:00", + "deadline": "2024-05-02T05:00:00" + }, + { + "taskid": 82, + "goalid": "543db004-39c5-479c-bc8d-b3824c82d2f7", + "title": "Me time 🧘🏽😌", + "duration": 1, + "start": "2024-05-02T05:00:00", + "deadline": "2024-05-02T06:00:00" + }, + { + "taskid": 83, + "goalid": "a818bc5c-e4ac-4156-b2ab-bb3a887664ac", + "title": "Breakfast πŸ₯πŸ₯£", + "duration": 1, + "start": "2024-05-02T06:00:00", + "deadline": "2024-05-02T07:00:00" + }, + { + "taskid": 84, + "goalid": "c49713e8-0799-448a-b87b-e614218f6e42", + "title": "Work πŸ’ͺ🏽", + "duration": 5, + "start": "2024-05-02T07:00:00", + "deadline": "2024-05-02T12:00:00" + }, + { + "taskid": 85, + "goalid": "6cba6d14-36e5-4a67-adcb-baa7dc7f3bb4", + "title": "Lunch πŸ₯ͺ", + "duration": 1, + "start": "2024-05-02T12:00:00", + "deadline": "2024-05-02T13:00:00" + }, + { + "taskid": 86, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-05-02T13:00:00", + "deadline": "2024-05-02T14:00:00" + }, + { + "taskid": 87, + "goalid": "c49713e8-0799-448a-b87b-e614218f6e42", + "title": "Work πŸ’ͺ🏽", + "duration": 3, + "start": "2024-05-02T14:00:00", + "deadline": "2024-05-02T17:00:00" + }, + { + "taskid": 88, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-05-02T17:00:00", + "deadline": "2024-05-02T18:00:00" + }, + { + "taskid": 89, + "goalid": "72b3d9e1-430e-453b-b7b1-58d8132c4f93", + "title": "Dinner 🍽️", + "duration": 1, + "start": "2024-05-02T18:00:00", + "deadline": "2024-05-02T19:00:00" + }, + { + "taskid": 90, + "goalid": "free", + "title": "free", + "duration": 1, + "start": "2024-05-02T19:00:00", + "deadline": "2024-05-02T20:00:00" + }, + { + "taskid": 91, + "goalid": "db64fa8f-b04d-4c19-ae84-947482dba09f", + "title": "Walk 🚢🏽", + "duration": 1, + "start": "2024-05-02T20:00:00", + "deadline": "2024-05-02T21:00:00" + }, + { + "taskid": 92, + "goalid": "e8cb3f40-d704-4194-9d02-c40f867d9082", + "title": "Family time πŸ₯°", + "duration": 1, + "start": "2024-05-02T21:00:00", + "deadline": "2024-05-02T22:00:00" + }, + { + "taskid": 93, + "goalid": "a3ced7de-ec61-42c8-aec8-ecc8c1e5dd98", + "title": "Sleep πŸ˜΄πŸŒ™", + "duration": 2, + "start": "2024-05-02T22:00:00", + "deadline": "2024-05-03T00:00:00" + } + ] + } + ], + "impossible": [] +} \ No newline at end of file