diff --git a/ui-display/frontend-app/src/App.js b/ui-display/frontend-app/src/App.js index 19102cf..7aff9ec 100644 --- a/ui-display/frontend-app/src/App.js +++ b/ui-display/frontend-app/src/App.js @@ -57,8 +57,8 @@ function App() {

Timmy

-

Jimmy

Kimmy

+

Jimmy

Timmy Jr

diff --git a/ui-display/frontend-app/src/components/widgets/SuggestedTimeWidget.js b/ui-display/frontend-app/src/components/widgets/SuggestedTimeWidget.js index d42e0cb..5364462 100644 --- a/ui-display/frontend-app/src/components/widgets/SuggestedTimeWidget.js +++ b/ui-display/frontend-app/src/components/widgets/SuggestedTimeWidget.js @@ -35,16 +35,17 @@ export default function SuggestedTimeWidget() { } const [suggestedTime, setSuggestedTime] = useState(""); - const [timeDelta, setTimeDelta] = useState(0); + const [upcomingEvent, setUpcomingEvent] = useState(null); const [loading, setLoading] = useState(true); + const [nearEnd, setNearEnd] = useState(false); const baseURL = 'https://localhost:8000/display/'; useEffect(() => { const interval = setInterval(()=>{ fetchData(); - //fetchTime(); - },50000); + fetchEvents(); + },5000); /* DEFAULT BEHAVIOUR: GET SINGLE RECOMMENDATION OF NEXT NEAREST TIME */ const fetchData = async () => { console.log('data fetched'); @@ -59,7 +60,8 @@ export default function SuggestedTimeWidget() { console.log(dayName); console.log(Constants.DAY_POSITIONS[dayName]); console.log("today:", currentToTimeSlotNum()); - + + const timeSlots = timeSlotsAllWeek.filter(timeSlot => (Constants.DAY_POSITIONS[timeSlot.day] > Constants.DAY_POSITIONS[dayName]) || (Constants.DAY_POSITIONS[timeSlot.day] === Constants.DAY_POSITIONS[dayName] @@ -67,43 +69,82 @@ export default function SuggestedTimeWidget() { console.log(timeSlots); let recommendation = timeSlots[0]; - let recommendations = []; - let currentSlot = timeSlots[0]; - let numberChecked = 0; - //console.log("recommendation", recommendations) - - let consecutiveSlots = 0; - while (consecutiveSlots < 3) { - //console.log("day", Constants.DAY_POSITIONS[currentSlot.day]); - const nextSlot = timeSlots.filter(timeSlot => - (Constants.DAY_POSITIONS[timeSlot.day] === Constants.DAY_POSITIONS[currentSlot.day]) && (timeSlot.slot_num === currentSlot.slot_num + 1) - ); - //console.log("nextSlot", nextSlot); - if (nextSlot && nextSlot.length > 0) { - console.log("next", nextSlot); - //recommendations.push(currentSlot); - if (consecutiveSlots == 0) { - recommendation = currentSlot; - } - currentSlot = nextSlot[0]; - consecutiveSlots++; - } else { - consecutiveSlots = 0; - if (numberChecked < timeSlots.length) { - currentSlot = timeSlots[++numberChecked]; + if (timeSlots && timeSlots.length > 0) { + + let currentSlot = timeSlots[0]; + + let numberChecked = 0; + //console.log("recommendation", recommendations) + + let consecutiveSlots = 0; + while (consecutiveSlots < 3) { + //console.log("day", Constants.DAY_POSITIONS[currentSlot.day]); + const nextSlot = timeSlots.filter(timeSlot => + (Constants.DAY_POSITIONS[timeSlot.day] === Constants.DAY_POSITIONS[currentSlot.day]) && (timeSlot.slot_num === currentSlot.slot_num + 1) + ); + //console.log("nextSlot", nextSlot); + if (nextSlot && nextSlot.length > 0) { + console.log("next", nextSlot); + //recommendations.push(currentSlot); + if (consecutiveSlots == 0) { + recommendation = currentSlot; + } + currentSlot = nextSlot[0]; + consecutiveSlots++; } else { - console.log("no consecutive times found :("); - break; + consecutiveSlots = 0; + if (numberChecked < timeSlots.length) { + currentSlot = timeSlots[++numberChecked]; + if (!currentSlot) { + recommendation = null; + setNearEnd(true); + break; + } + + } else { + console.log("no consecutive times found :("); + setNearEnd(true); + break; + } } } + + } else { + setNearEnd(true); } //console.log(recommendation); - if (recommendation) { + if (timeSlots && recommendation) { setSuggestedTime(dayAndTimeToDate(recommendation['day'], recommendation['time'])); setLoading(false); + } + } + }; + const fetchEvents = async () => { + const response = await fetch("http://localhost:8000/display/family-timeslots"); + const data = await response.json(); + if (data && data.body) { + const timeSlotsAllWeek = Array.from(data.body); + console.log("events:", timeSlotsAllWeek); + // filter out any days already passed + // TODO what do we do when the week is nearly over? + const trueNow = new Date(); + const dayName = Constants.DAYS[addSeconds(trueNow, Constants.TIME_DELTA).getDay()]; + + const timeSlots = timeSlotsAllWeek.filter(timeSlot => + (Constants.DAY_POSITIONS[timeSlot.day] > Constants.DAY_POSITIONS[dayName]) + || (Constants.DAY_POSITIONS[timeSlot.day] === Constants.DAY_POSITIONS[dayName] + && timeSlot.slot_num > currentToTimeSlotNum())); + console.log("events filtered", timeSlots); + + if (timeSlots && timeSlots.length > 0) { + console.log("upcoming", timeSlots[0]); + setUpcomingEvent(timeSlots[0]); + } else { + console.log("no upcoming events"); + setUpcomingEvent(null); } } @@ -121,7 +162,22 @@ export default function SuggestedTimeWidget() {

Oops! Check back in a sec.

: <>

Suggested Time 🪩

-

Everybody is next free {suggestedTime}.

+ {nearEnd ? +

Oops! No more times this week suit everybody. + Maybe try again next week! +

+ : + <> +

Everybody is next free {suggestedTime}.

+ {upcomingEvent ? +

And good news! 🥳 You've got + {(upcomingEvent.data && upcomingEvent.data.length > 1) ? ` ${upcomingEvent.data} ` : " something "} + coming up {dayAndTimeToDate(upcomingEvent['day'], upcomingEvent['time'])} 💗 +

+ : +

Maybe pencil something in!

} + + } } diff --git a/ui-display/frontend-app/src/components/widgets/Widgets.css b/ui-display/frontend-app/src/components/widgets/Widgets.css index 929b41c..cfdabf6 100644 --- a/ui-display/frontend-app/src/components/widgets/Widgets.css +++ b/ui-display/frontend-app/src/components/widgets/Widgets.css @@ -34,6 +34,25 @@ color: var(--darkgrey); } +.SuggestedTime-box h3, p { + padding: 0; + margin: 0; +} +.SuggestedTime-box h3 { + padding-bottom: 0.1em; + font-size: 1em; +} + +.SuggestedTime-box h1 { + margin-top: 0.2em; + font-size: 1.75em; +} + +.SuggestedTime-box p { + font-size: 0.75em; + margin-bottom: 0.5em; +} + .Weather-box { font-family: Nightingale; font-size: 30px; diff --git a/vision/make_availabilities.py b/vision/make_availabilities.py index 73282bf..a4cc3af 100644 --- a/vision/make_availabilities.py +++ b/vision/make_availabilities.py @@ -9,47 +9,44 @@ 'Timmy_Jr': [], } timmy_time_slots = { - 'monday': [0, 1, 2, 3, 4, 5, 6, 7], - 'tuesday': [0, 1, 2, 3, 4, 5, 6, 7], - 'wednesday': [0, 1, 2, 3, 4, 5, 6, 7], - 'thursday': [0, 1, 2, 3, 4, 5, 6, 7], - 'friday': [0, 1, 2, 3, 4, 5, 6, 7], - 'saturday': [0, 1, 2, 3, 4, 5, 6, 7], - 'sunday': [0, 1, 2, 3, 4, 5, 6, 7], + 'monday': [8, 9, 10, 11, 12, 13, 14, 15, 20, 21, 22, 23, 24, 25], + 'tuesday': [8, 9, 10, 11, 12, 13, 14, 15, 20, 21, 22, 23, 24, 25, 28, 29, 30, 31, 32, 33], + 'wednesday': [8, 9, 10, 11, 12, 13, 14, 15, 18], + 'thursday': [8, 9, 10, 11, 12, 13, 14, 15], + 'friday': [8, 9, 10, 11, 12, 13, 14, 15, 20, 21, 22, 23, 24, 25], + 'saturday': [12, 13, 14, 15], } timmj_time_slots = { - 'monday': [0, 1, 2, 3, 4, 5, 6, 7], - 'tuesday': [0, 1, 2, 3, 4, 5, 6, 7], - 'wednesday': [0, 1, 2, 3, 4, 5, 6, 7], - 'thursday': [0, 1, 2, 3, 4, 5, 6, 7], - 'friday': [0, 1, 2, 3, 4, 5, 6, 7], - 'saturday': [0, 1, 2, 3, 4, 5, 6, 7], - 'sunday': [0, 1, 2, 3, 4, 5, 6, 7], + 'monday': [24, 25, 26, 27, 28, 29], + 'wednesday': [22, 23, 24, 25, 26], + 'thursday': [24, 25, 26, 27, 28, 29, 30, 31, 32, 33], + 'saturday': [21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33], + 'sunday': [22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33], } jimmy_time_slots = { - 'monday': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], - 'tuesday': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], - 'wednesday': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], + 'monday': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 16, 17, 18, 19, 20, 21, 22], + 'tuesday': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 16, 17, 18, 19], + 'wednesday': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 19, 20, 21, 24, 25, 26, 27, 28], 'thursday': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], - 'friday': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], - 'saturday': [0, 1, 2, 3, 4, 5, 6, 7], - 'sunday': [0, 1, 2, 3, 4, 5, 6, 7], + 'friday': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 15, 16, 17, 18, 19], + 'saturday': [18, 19, 20, 21, 22, 23, 24, 25, 26, 27], + 'sunday': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], } kimmy_time_slots = { - 'monday': [0, 1, 2, 3, 4, 5, 6, 7], - 'tuesday': [0, 1, 2, 3, 4, 5, 6, 7], - 'wednesday': [0, 1, 2, 3, 4, 5, 6, 7], - 'thursday': [0, 1, 2, 3, 4, 5, 6, 7], - 'friday': [0, 1, 2, 3, 4, 5, 6, 7], - 'saturday': [0, 1, 2, 3, 4, 5, 6, 7], - 'sunday': [0, 1, 2, 3, 4, 5, 6, 7], + 'monday': [10, 11, 12, 13, 15, 16, 17, 18, 27, 30, 31, 32, 33], + 'tuesday': [16, 24, 25, 26, 27], + 'wednesday': [16, 17, 20, 21, 22, 23], + 'thursday': [16, 17, 18, 19, 20, 21, 22, 23, 24], + 'friday': [18, 19, 20, 21, 22, 23, 24, 25, 26, 27], + 'saturday': [0, 1, 2, 3, 4, 5, 14, 15, 16], + 'sunday': [16, 17, 18, 19], } def make_json(person): result = [] for day in person: - for time in day: + for time in person.get(day): result.append( {'day': day, 'time_slot': time, 'data': '', 'colour': 'black'} ) diff --git a/vision/premade/Jimmy.json b/vision/premade/Jimmy.json index 5b2a8ac..fd877b6 100644 --- a/vision/premade/Jimmy.json +++ b/vision/premade/Jimmy.json @@ -1,338 +1,602 @@ [ { - "day": 0, + "day": "monday", "time_slot": 0, "data": "", "colour": "black" }, { - "day": 0, + "day": "monday", "time_slot": 1, "data": "", "colour": "black" }, { - "day": 0, + "day": "monday", "time_slot": 2, "data": "", "colour": "black" }, { - "day": 0, + "day": "monday", "time_slot": 3, "data": "", "colour": "black" }, { - "day": 0, + "day": "monday", "time_slot": 4, "data": "", "colour": "black" }, { - "day": 0, + "day": "monday", "time_slot": 5, "data": "", "colour": "black" }, { - "day": 0, + "day": "monday", "time_slot": 6, "data": "", "colour": "black" }, { - "day": 0, + "day": "monday", "time_slot": 7, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 0, + "day": "monday", + "time_slot": 8, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 1, + "day": "monday", + "time_slot": 9, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 2, + "day": "monday", + "time_slot": 16, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 3, + "day": "monday", + "time_slot": 17, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 4, + "day": "monday", + "time_slot": 18, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 5, + "day": "monday", + "time_slot": 19, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 6, + "day": "monday", + "time_slot": 20, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 7, + "day": "monday", + "time_slot": 21, + "data": "", + "colour": "black" + }, + { + "day": "monday", + "time_slot": 22, "data": "", "colour": "black" }, { - "day": 2, + "day": "tuesday", "time_slot": 0, "data": "", "colour": "black" }, { - "day": 2, + "day": "tuesday", "time_slot": 1, "data": "", "colour": "black" }, { - "day": 2, + "day": "tuesday", "time_slot": 2, "data": "", "colour": "black" }, { - "day": 2, + "day": "tuesday", "time_slot": 3, "data": "", "colour": "black" }, { - "day": 2, + "day": "tuesday", "time_slot": 4, "data": "", "colour": "black" }, { - "day": 2, + "day": "tuesday", "time_slot": 5, "data": "", "colour": "black" }, { - "day": 2, + "day": "tuesday", "time_slot": 6, "data": "", "colour": "black" }, { - "day": 2, + "day": "tuesday", "time_slot": 7, "data": "", "colour": "black" }, { - "day": 3, + "day": "tuesday", + "time_slot": 8, + "data": "", + "colour": "black" + }, + { + "day": "tuesday", + "time_slot": 9, + "data": "", + "colour": "black" + }, + { + "day": "tuesday", + "time_slot": 16, + "data": "", + "colour": "black" + }, + { + "day": "tuesday", + "time_slot": 17, + "data": "", + "colour": "black" + }, + { + "day": "tuesday", + "time_slot": 18, + "data": "", + "colour": "black" + }, + { + "day": "tuesday", + "time_slot": 19, + "data": "", + "colour": "black" + }, + { + "day": "wednesday", "time_slot": 0, "data": "", "colour": "black" }, { - "day": 3, + "day": "wednesday", "time_slot": 1, "data": "", "colour": "black" }, { - "day": 3, + "day": "wednesday", "time_slot": 2, "data": "", "colour": "black" }, { - "day": 3, + "day": "wednesday", "time_slot": 3, "data": "", "colour": "black" }, { - "day": 3, + "day": "wednesday", "time_slot": 4, "data": "", "colour": "black" }, { - "day": 3, + "day": "wednesday", "time_slot": 5, "data": "", "colour": "black" }, { - "day": 3, + "day": "wednesday", "time_slot": 6, "data": "", "colour": "black" }, { - "day": 3, + "day": "wednesday", "time_slot": 7, "data": "", "colour": "black" }, { - "day": 4, + "day": "wednesday", + "time_slot": 8, + "data": "", + "colour": "black" + }, + { + "day": "wednesday", + "time_slot": 9, + "data": "", + "colour": "black" + }, + { + "day": "wednesday", + "time_slot": 19, + "data": "", + "colour": "black" + }, + { + "day": "wednesday", + "time_slot": 20, + "data": "", + "colour": "black" + }, + { + "day": "wednesday", + "time_slot": 21, + "data": "", + "colour": "black" + }, + { + "day": "wednesday", + "time_slot": 24, + "data": "", + "colour": "black" + }, + { + "day": "wednesday", + "time_slot": 25, + "data": "", + "colour": "black" + }, + { + "day": "wednesday", + "time_slot": 26, + "data": "", + "colour": "black" + }, + { + "day": "wednesday", + "time_slot": 27, + "data": "", + "colour": "black" + }, + { + "day": "wednesday", + "time_slot": 28, + "data": "", + "colour": "black" + }, + { + "day": "thursday", "time_slot": 0, "data": "", "colour": "black" }, { - "day": 4, + "day": "thursday", "time_slot": 1, "data": "", "colour": "black" }, { - "day": 4, + "day": "thursday", "time_slot": 2, "data": "", "colour": "black" }, { - "day": 4, + "day": "thursday", "time_slot": 3, "data": "", "colour": "black" }, { - "day": 4, + "day": "thursday", "time_slot": 4, "data": "", "colour": "black" }, { - "day": 4, + "day": "thursday", "time_slot": 5, "data": "", "colour": "black" }, { - "day": 4, + "day": "thursday", "time_slot": 6, "data": "", "colour": "black" }, { - "day": 4, + "day": "thursday", "time_slot": 7, "data": "", "colour": "black" }, { - "day": 5, + "day": "thursday", + "time_slot": 8, + "data": "", + "colour": "black" + }, + { + "day": "thursday", + "time_slot": 9, + "data": "", + "colour": "black" + }, + { + "day": "friday", "time_slot": 0, "data": "", "colour": "black" }, { - "day": 5, + "day": "friday", "time_slot": 1, "data": "", "colour": "black" }, { - "day": 5, + "day": "friday", "time_slot": 2, "data": "", "colour": "black" }, { - "day": 5, + "day": "friday", "time_slot": 3, "data": "", "colour": "black" }, { - "day": 5, + "day": "friday", "time_slot": 4, "data": "", "colour": "black" }, { - "day": 5, + "day": "friday", "time_slot": 5, "data": "", "colour": "black" }, { - "day": 5, + "day": "friday", "time_slot": 6, "data": "", "colour": "black" }, { - "day": 5, + "day": "friday", "time_slot": 7, "data": "", "colour": "black" }, { - "day": 6, + "day": "friday", + "time_slot": 8, + "data": "", + "colour": "black" + }, + { + "day": "friday", + "time_slot": 9, + "data": "", + "colour": "black" + }, + { + "day": "friday", + "time_slot": 15, + "data": "", + "colour": "black" + }, + { + "day": "friday", + "time_slot": 16, + "data": "", + "colour": "black" + }, + { + "day": "friday", + "time_slot": 17, + "data": "", + "colour": "black" + }, + { + "day": "friday", + "time_slot": 18, + "data": "", + "colour": "black" + }, + { + "day": "friday", + "time_slot": 19, + "data": "", + "colour": "black" + }, + { + "day": "saturday", + "time_slot": 18, + "data": "", + "colour": "black" + }, + { + "day": "saturday", + "time_slot": 19, + "data": "", + "colour": "black" + }, + { + "day": "saturday", + "time_slot": 20, + "data": "", + "colour": "black" + }, + { + "day": "saturday", + "time_slot": 21, + "data": "", + "colour": "black" + }, + { + "day": "saturday", + "time_slot": 22, + "data": "", + "colour": "black" + }, + { + "day": "saturday", + "time_slot": 23, + "data": "", + "colour": "black" + }, + { + "day": "saturday", + "time_slot": 24, + "data": "", + "colour": "black" + }, + { + "day": "saturday", + "time_slot": 25, + "data": "", + "colour": "black" + }, + { + "day": "saturday", + "time_slot": 26, + "data": "", + "colour": "black" + }, + { + "day": "saturday", + "time_slot": 27, + "data": "", + "colour": "black" + }, + { + "day": "sunday", "time_slot": 0, "data": "", "colour": "black" }, { - "day": 6, + "day": "sunday", "time_slot": 1, "data": "", "colour": "black" }, { - "day": 6, + "day": "sunday", "time_slot": 2, "data": "", "colour": "black" }, { - "day": 6, + "day": "sunday", "time_slot": 3, "data": "", "colour": "black" }, { - "day": 6, + "day": "sunday", "time_slot": 4, "data": "", "colour": "black" }, { - "day": 6, + "day": "sunday", "time_slot": 5, "data": "", "colour": "black" }, { - "day": 6, + "day": "sunday", "time_slot": 6, "data": "", "colour": "black" }, { - "day": 6, + "day": "sunday", "time_slot": 7, "data": "", "colour": "black" + }, + { + "day": "sunday", + "time_slot": 8, + "data": "", + "colour": "black" + }, + { + "day": "sunday", + "time_slot": 9, + "data": "", + "colour": "black" + }, + { + "day": "sunday", + "time_slot": 10, + "data": "", + "colour": "black" + }, + { + "day": "sunday", + "time_slot": 11, + "data": "", + "colour": "black" + }, + { + "day": "sunday", + "time_slot": 12, + "data": "", + "colour": "black" + }, + { + "day": "sunday", + "time_slot": 13, + "data": "", + "colour": "black" + }, + { + "day": "sunday", + "time_slot": 14, + "data": "", + "colour": "black" + }, + { + "day": "sunday", + "time_slot": 15, + "data": "", + "colour": "black" } ] \ No newline at end of file diff --git a/vision/premade/Kimmy.json b/vision/premade/Kimmy.json index 5b2a8ac..afe4c48 100644 --- a/vision/premade/Kimmy.json +++ b/vision/premade/Kimmy.json @@ -1,337 +1,337 @@ [ { - "day": 0, - "time_slot": 0, + "day": "monday", + "time_slot": 10, "data": "", "colour": "black" }, { - "day": 0, - "time_slot": 1, + "day": "monday", + "time_slot": 11, "data": "", "colour": "black" }, { - "day": 0, - "time_slot": 2, + "day": "monday", + "time_slot": 12, "data": "", "colour": "black" }, { - "day": 0, - "time_slot": 3, + "day": "monday", + "time_slot": 13, "data": "", "colour": "black" }, { - "day": 0, - "time_slot": 4, + "day": "monday", + "time_slot": 15, "data": "", "colour": "black" }, { - "day": 0, - "time_slot": 5, + "day": "monday", + "time_slot": 16, "data": "", "colour": "black" }, { - "day": 0, - "time_slot": 6, + "day": "monday", + "time_slot": 17, "data": "", "colour": "black" }, { - "day": 0, - "time_slot": 7, + "day": "monday", + "time_slot": 18, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 0, + "day": "monday", + "time_slot": 27, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 1, + "day": "monday", + "time_slot": 30, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 2, + "day": "monday", + "time_slot": 31, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 3, + "day": "monday", + "time_slot": 32, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 4, + "day": "monday", + "time_slot": 33, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 5, + "day": "tuesday", + "time_slot": 16, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 6, + "day": "tuesday", + "time_slot": 24, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 7, + "day": "tuesday", + "time_slot": 25, "data": "", "colour": "black" }, { - "day": 2, - "time_slot": 0, + "day": "tuesday", + "time_slot": 26, "data": "", "colour": "black" }, { - "day": 2, - "time_slot": 1, + "day": "tuesday", + "time_slot": 27, "data": "", "colour": "black" }, { - "day": 2, - "time_slot": 2, + "day": "wednesday", + "time_slot": 16, "data": "", "colour": "black" }, { - "day": 2, - "time_slot": 3, + "day": "wednesday", + "time_slot": 17, "data": "", "colour": "black" }, { - "day": 2, - "time_slot": 4, + "day": "wednesday", + "time_slot": 20, "data": "", "colour": "black" }, { - "day": 2, - "time_slot": 5, + "day": "wednesday", + "time_slot": 21, "data": "", "colour": "black" }, { - "day": 2, - "time_slot": 6, + "day": "wednesday", + "time_slot": 22, "data": "", "colour": "black" }, { - "day": 2, - "time_slot": 7, + "day": "wednesday", + "time_slot": 23, "data": "", "colour": "black" }, { - "day": 3, - "time_slot": 0, + "day": "thursday", + "time_slot": 16, "data": "", "colour": "black" }, { - "day": 3, - "time_slot": 1, + "day": "thursday", + "time_slot": 17, "data": "", "colour": "black" }, { - "day": 3, - "time_slot": 2, + "day": "thursday", + "time_slot": 18, "data": "", "colour": "black" }, { - "day": 3, - "time_slot": 3, + "day": "thursday", + "time_slot": 19, "data": "", "colour": "black" }, { - "day": 3, - "time_slot": 4, + "day": "thursday", + "time_slot": 20, "data": "", "colour": "black" }, { - "day": 3, - "time_slot": 5, + "day": "thursday", + "time_slot": 21, "data": "", "colour": "black" }, { - "day": 3, - "time_slot": 6, + "day": "thursday", + "time_slot": 22, "data": "", "colour": "black" }, { - "day": 3, - "time_slot": 7, + "day": "thursday", + "time_slot": 23, "data": "", "colour": "black" }, { - "day": 4, - "time_slot": 0, + "day": "thursday", + "time_slot": 24, "data": "", "colour": "black" }, { - "day": 4, - "time_slot": 1, + "day": "friday", + "time_slot": 18, "data": "", "colour": "black" }, { - "day": 4, - "time_slot": 2, + "day": "friday", + "time_slot": 19, "data": "", "colour": "black" }, { - "day": 4, - "time_slot": 3, + "day": "friday", + "time_slot": 20, "data": "", "colour": "black" }, { - "day": 4, - "time_slot": 4, + "day": "friday", + "time_slot": 21, "data": "", "colour": "black" }, { - "day": 4, - "time_slot": 5, + "day": "friday", + "time_slot": 22, "data": "", "colour": "black" }, { - "day": 4, - "time_slot": 6, + "day": "friday", + "time_slot": 23, "data": "", "colour": "black" }, { - "day": 4, - "time_slot": 7, + "day": "friday", + "time_slot": 24, "data": "", "colour": "black" }, { - "day": 5, - "time_slot": 0, + "day": "friday", + "time_slot": 25, "data": "", "colour": "black" }, { - "day": 5, - "time_slot": 1, + "day": "friday", + "time_slot": 26, "data": "", "colour": "black" }, { - "day": 5, - "time_slot": 2, + "day": "friday", + "time_slot": 27, "data": "", "colour": "black" }, { - "day": 5, - "time_slot": 3, + "day": "saturday", + "time_slot": 0, "data": "", "colour": "black" }, { - "day": 5, - "time_slot": 4, + "day": "saturday", + "time_slot": 1, "data": "", "colour": "black" }, { - "day": 5, - "time_slot": 5, + "day": "saturday", + "time_slot": 2, "data": "", "colour": "black" }, { - "day": 5, - "time_slot": 6, + "day": "saturday", + "time_slot": 3, "data": "", "colour": "black" }, { - "day": 5, - "time_slot": 7, + "day": "saturday", + "time_slot": 4, "data": "", "colour": "black" }, { - "day": 6, - "time_slot": 0, + "day": "saturday", + "time_slot": 5, "data": "", "colour": "black" }, { - "day": 6, - "time_slot": 1, + "day": "saturday", + "time_slot": 14, "data": "", "colour": "black" }, { - "day": 6, - "time_slot": 2, + "day": "saturday", + "time_slot": 15, "data": "", "colour": "black" }, { - "day": 6, - "time_slot": 3, + "day": "saturday", + "time_slot": 16, "data": "", "colour": "black" }, { - "day": 6, - "time_slot": 4, + "day": "sunday", + "time_slot": 16, "data": "", "colour": "black" }, { - "day": 6, - "time_slot": 5, + "day": "sunday", + "time_slot": 17, "data": "", "colour": "black" }, { - "day": 6, - "time_slot": 6, + "day": "sunday", + "time_slot": 18, "data": "", "colour": "black" }, { - "day": 6, - "time_slot": 7, + "day": "sunday", + "time_slot": 19, "data": "", "colour": "black" } diff --git a/vision/premade/Timmy.json b/vision/premade/Timmy.json index 5b2a8ac..beec609 100644 --- a/vision/premade/Timmy.json +++ b/vision/premade/Timmy.json @@ -1,337 +1,415 @@ [ { - "day": 0, - "time_slot": 0, + "day": "monday", + "time_slot": 8, "data": "", "colour": "black" }, { - "day": 0, - "time_slot": 1, + "day": "monday", + "time_slot": 9, "data": "", "colour": "black" }, { - "day": 0, - "time_slot": 2, + "day": "monday", + "time_slot": 10, "data": "", "colour": "black" }, { - "day": 0, - "time_slot": 3, + "day": "monday", + "time_slot": 11, "data": "", "colour": "black" }, { - "day": 0, - "time_slot": 4, + "day": "monday", + "time_slot": 12, "data": "", "colour": "black" }, { - "day": 0, - "time_slot": 5, + "day": "monday", + "time_slot": 13, "data": "", "colour": "black" }, { - "day": 0, - "time_slot": 6, + "day": "monday", + "time_slot": 14, "data": "", "colour": "black" }, { - "day": 0, - "time_slot": 7, + "day": "monday", + "time_slot": 15, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 0, + "day": "monday", + "time_slot": 20, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 1, + "day": "monday", + "time_slot": 21, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 2, + "day": "monday", + "time_slot": 22, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 3, + "day": "monday", + "time_slot": 23, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 4, + "day": "monday", + "time_slot": 24, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 5, + "day": "monday", + "time_slot": 25, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 6, + "day": "tuesday", + "time_slot": 8, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 7, + "day": "tuesday", + "time_slot": 9, "data": "", "colour": "black" }, { - "day": 2, - "time_slot": 0, + "day": "tuesday", + "time_slot": 10, "data": "", "colour": "black" }, { - "day": 2, - "time_slot": 1, + "day": "tuesday", + "time_slot": 11, "data": "", "colour": "black" }, { - "day": 2, - "time_slot": 2, + "day": "tuesday", + "time_slot": 12, "data": "", "colour": "black" }, { - "day": 2, - "time_slot": 3, + "day": "tuesday", + "time_slot": 13, "data": "", "colour": "black" }, { - "day": 2, - "time_slot": 4, + "day": "tuesday", + "time_slot": 14, "data": "", "colour": "black" }, { - "day": 2, - "time_slot": 5, + "day": "tuesday", + "time_slot": 15, "data": "", "colour": "black" }, { - "day": 2, - "time_slot": 6, + "day": "tuesday", + "time_slot": 20, "data": "", "colour": "black" }, { - "day": 2, - "time_slot": 7, + "day": "tuesday", + "time_slot": 21, "data": "", "colour": "black" }, { - "day": 3, - "time_slot": 0, + "day": "tuesday", + "time_slot": 22, "data": "", "colour": "black" }, { - "day": 3, - "time_slot": 1, + "day": "tuesday", + "time_slot": 23, "data": "", "colour": "black" }, { - "day": 3, - "time_slot": 2, + "day": "tuesday", + "time_slot": 24, "data": "", "colour": "black" }, { - "day": 3, - "time_slot": 3, + "day": "tuesday", + "time_slot": 25, "data": "", "colour": "black" }, { - "day": 3, - "time_slot": 4, + "day": "tuesday", + "time_slot": 28, "data": "", "colour": "black" }, { - "day": 3, - "time_slot": 5, + "day": "tuesday", + "time_slot": 29, "data": "", "colour": "black" }, { - "day": 3, - "time_slot": 6, + "day": "tuesday", + "time_slot": 30, "data": "", "colour": "black" }, { - "day": 3, - "time_slot": 7, + "day": "tuesday", + "time_slot": 31, "data": "", "colour": "black" }, { - "day": 4, - "time_slot": 0, + "day": "tuesday", + "time_slot": 32, "data": "", "colour": "black" }, { - "day": 4, - "time_slot": 1, + "day": "tuesday", + "time_slot": 33, "data": "", "colour": "black" }, { - "day": 4, - "time_slot": 2, + "day": "wednesday", + "time_slot": 8, "data": "", "colour": "black" }, { - "day": 4, - "time_slot": 3, + "day": "wednesday", + "time_slot": 9, "data": "", "colour": "black" }, { - "day": 4, - "time_slot": 4, + "day": "wednesday", + "time_slot": 10, "data": "", "colour": "black" }, { - "day": 4, - "time_slot": 5, + "day": "wednesday", + "time_slot": 11, "data": "", "colour": "black" }, { - "day": 4, - "time_slot": 6, + "day": "wednesday", + "time_slot": 12, "data": "", "colour": "black" }, { - "day": 4, - "time_slot": 7, + "day": "wednesday", + "time_slot": 13, "data": "", "colour": "black" }, { - "day": 5, - "time_slot": 0, + "day": "wednesday", + "time_slot": 14, "data": "", "colour": "black" }, { - "day": 5, - "time_slot": 1, + "day": "wednesday", + "time_slot": 15, "data": "", "colour": "black" }, { - "day": 5, - "time_slot": 2, + "day": "wednesday", + "time_slot": 18, "data": "", "colour": "black" }, { - "day": 5, - "time_slot": 3, + "day": "thursday", + "time_slot": 8, "data": "", "colour": "black" }, { - "day": 5, - "time_slot": 4, + "day": "thursday", + "time_slot": 9, "data": "", "colour": "black" }, { - "day": 5, - "time_slot": 5, + "day": "thursday", + "time_slot": 10, "data": "", "colour": "black" }, { - "day": 5, - "time_slot": 6, + "day": "thursday", + "time_slot": 11, "data": "", "colour": "black" }, { - "day": 5, - "time_slot": 7, + "day": "thursday", + "time_slot": 12, "data": "", "colour": "black" }, { - "day": 6, - "time_slot": 0, + "day": "thursday", + "time_slot": 13, "data": "", "colour": "black" }, { - "day": 6, - "time_slot": 1, + "day": "thursday", + "time_slot": 14, "data": "", "colour": "black" }, { - "day": 6, - "time_slot": 2, + "day": "thursday", + "time_slot": 15, "data": "", "colour": "black" }, { - "day": 6, - "time_slot": 3, + "day": "friday", + "time_slot": 8, "data": "", "colour": "black" }, { - "day": 6, - "time_slot": 4, + "day": "friday", + "time_slot": 9, "data": "", "colour": "black" }, { - "day": 6, - "time_slot": 5, + "day": "friday", + "time_slot": 10, "data": "", "colour": "black" }, { - "day": 6, - "time_slot": 6, + "day": "friday", + "time_slot": 11, "data": "", "colour": "black" }, { - "day": 6, - "time_slot": 7, + "day": "friday", + "time_slot": 12, + "data": "", + "colour": "black" + }, + { + "day": "friday", + "time_slot": 13, + "data": "", + "colour": "black" + }, + { + "day": "friday", + "time_slot": 14, + "data": "", + "colour": "black" + }, + { + "day": "friday", + "time_slot": 15, + "data": "", + "colour": "black" + }, + { + "day": "friday", + "time_slot": 20, + "data": "", + "colour": "black" + }, + { + "day": "friday", + "time_slot": 21, + "data": "", + "colour": "black" + }, + { + "day": "friday", + "time_slot": 22, + "data": "", + "colour": "black" + }, + { + "day": "friday", + "time_slot": 23, + "data": "", + "colour": "black" + }, + { + "day": "friday", + "time_slot": 24, + "data": "", + "colour": "black" + }, + { + "day": "friday", + "time_slot": 25, + "data": "", + "colour": "black" + }, + { + "day": "saturday", + "time_slot": 12, + "data": "", + "colour": "black" + }, + { + "day": "saturday", + "time_slot": 13, + "data": "", + "colour": "black" + }, + { + "day": "saturday", + "time_slot": 14, + "data": "", + "colour": "black" + }, + { + "day": "saturday", + "time_slot": 15, "data": "", "colour": "black" } diff --git a/vision/premade/Timmy_Jr.json b/vision/premade/Timmy_Jr.json index 5b2a8ac..77dfa97 100644 --- a/vision/premade/Timmy_Jr.json +++ b/vision/premade/Timmy_Jr.json @@ -1,337 +1,277 @@ [ { - "day": 0, - "time_slot": 0, + "day": "monday", + "time_slot": 24, "data": "", "colour": "black" }, { - "day": 0, - "time_slot": 1, + "day": "monday", + "time_slot": 25, "data": "", "colour": "black" }, { - "day": 0, - "time_slot": 2, + "day": "monday", + "time_slot": 26, "data": "", "colour": "black" }, { - "day": 0, - "time_slot": 3, + "day": "monday", + "time_slot": 27, "data": "", "colour": "black" }, { - "day": 0, - "time_slot": 4, + "day": "monday", + "time_slot": 28, "data": "", "colour": "black" }, { - "day": 0, - "time_slot": 5, + "day": "monday", + "time_slot": 29, "data": "", "colour": "black" }, { - "day": 0, - "time_slot": 6, + "day": "wednesday", + "time_slot": 22, "data": "", "colour": "black" }, { - "day": 0, - "time_slot": 7, + "day": "wednesday", + "time_slot": 23, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 0, + "day": "wednesday", + "time_slot": 24, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 1, + "day": "wednesday", + "time_slot": 25, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 2, + "day": "wednesday", + "time_slot": 26, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 3, + "day": "thursday", + "time_slot": 24, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 4, + "day": "thursday", + "time_slot": 25, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 5, + "day": "thursday", + "time_slot": 26, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 6, + "day": "thursday", + "time_slot": 27, "data": "", "colour": "black" }, { - "day": 1, - "time_slot": 7, + "day": "thursday", + "time_slot": 28, "data": "", "colour": "black" }, { - "day": 2, - "time_slot": 0, + "day": "thursday", + "time_slot": 29, "data": "", "colour": "black" }, { - "day": 2, - "time_slot": 1, + "day": "thursday", + "time_slot": 30, "data": "", "colour": "black" }, { - "day": 2, - "time_slot": 2, + "day": "thursday", + "time_slot": 31, "data": "", "colour": "black" }, { - "day": 2, - "time_slot": 3, + "day": "thursday", + "time_slot": 32, "data": "", "colour": "black" }, { - "day": 2, - "time_slot": 4, + "day": "thursday", + "time_slot": 33, "data": "", "colour": "black" }, { - "day": 2, - "time_slot": 5, + "day": "saturday", + "time_slot": 21, "data": "", "colour": "black" }, { - "day": 2, - "time_slot": 6, + "day": "saturday", + "time_slot": 22, "data": "", "colour": "black" }, { - "day": 2, - "time_slot": 7, + "day": "saturday", + "time_slot": 23, "data": "", "colour": "black" }, { - "day": 3, - "time_slot": 0, + "day": "saturday", + "time_slot": 24, "data": "", "colour": "black" }, { - "day": 3, - "time_slot": 1, + "day": "saturday", + "time_slot": 25, "data": "", "colour": "black" }, { - "day": 3, - "time_slot": 2, + "day": "saturday", + "time_slot": 26, "data": "", "colour": "black" }, { - "day": 3, - "time_slot": 3, + "day": "saturday", + "time_slot": 27, "data": "", "colour": "black" }, { - "day": 3, - "time_slot": 4, + "day": "saturday", + "time_slot": 28, "data": "", "colour": "black" }, { - "day": 3, - "time_slot": 5, + "day": "saturday", + "time_slot": 29, "data": "", "colour": "black" }, { - "day": 3, - "time_slot": 6, + "day": "saturday", + "time_slot": 30, "data": "", "colour": "black" }, { - "day": 3, - "time_slot": 7, + "day": "saturday", + "time_slot": 31, "data": "", "colour": "black" }, { - "day": 4, - "time_slot": 0, + "day": "saturday", + "time_slot": 32, "data": "", "colour": "black" }, { - "day": 4, - "time_slot": 1, + "day": "saturday", + "time_slot": 33, "data": "", "colour": "black" }, { - "day": 4, - "time_slot": 2, + "day": "sunday", + "time_slot": 22, "data": "", "colour": "black" }, { - "day": 4, - "time_slot": 3, + "day": "sunday", + "time_slot": 23, "data": "", "colour": "black" }, { - "day": 4, - "time_slot": 4, + "day": "sunday", + "time_slot": 24, "data": "", "colour": "black" }, { - "day": 4, - "time_slot": 5, + "day": "sunday", + "time_slot": 25, "data": "", "colour": "black" }, { - "day": 4, - "time_slot": 6, + "day": "sunday", + "time_slot": 26, "data": "", "colour": "black" }, { - "day": 4, - "time_slot": 7, + "day": "sunday", + "time_slot": 27, "data": "", "colour": "black" }, { - "day": 5, - "time_slot": 0, + "day": "sunday", + "time_slot": 28, "data": "", "colour": "black" }, { - "day": 5, - "time_slot": 1, + "day": "sunday", + "time_slot": 29, "data": "", "colour": "black" }, { - "day": 5, - "time_slot": 2, + "day": "sunday", + "time_slot": 30, "data": "", "colour": "black" }, { - "day": 5, - "time_slot": 3, + "day": "sunday", + "time_slot": 31, "data": "", "colour": "black" }, { - "day": 5, - "time_slot": 4, + "day": "sunday", + "time_slot": 32, "data": "", "colour": "black" }, { - "day": 5, - "time_slot": 5, - "data": "", - "colour": "black" - }, - { - "day": 5, - "time_slot": 6, - "data": "", - "colour": "black" - }, - { - "day": 5, - "time_slot": 7, - "data": "", - "colour": "black" - }, - { - "day": 6, - "time_slot": 0, - "data": "", - "colour": "black" - }, - { - "day": 6, - "time_slot": 1, - "data": "", - "colour": "black" - }, - { - "day": 6, - "time_slot": 2, - "data": "", - "colour": "black" - }, - { - "day": 6, - "time_slot": 3, - "data": "", - "colour": "black" - }, - { - "day": 6, - "time_slot": 4, - "data": "", - "colour": "black" - }, - { - "day": 6, - "time_slot": 5, - "data": "", - "colour": "black" - }, - { - "day": 6, - "time_slot": 6, - "data": "", - "colour": "black" - }, - { - "day": 6, - "time_slot": 7, + "day": "sunday", + "time_slot": 33, "data": "", "colour": "black" }