Last active
February 5, 2016 21:59
-
-
Save alexrothenberg/5c269ef1e64b66dbb4b9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// What should we call the things under each day? | |
// Its kinda like a recurring event but not quite | |
// "WeeklyScheduleEventThingy"? We can do better! | |
// http://delorean/schedules?staff_member_uid=asdfasdfasfd | |
// create, update, index, show | |
{ | |
"schedule": { | |
"start_date": "2016-01-01", | |
"end_date": "2016-12-31", | |
"timezone": "America/Chicago", | |
"sunday": [ | |
], | |
"monday": [ | |
{"uid":"abc123", "location": "Burlington", "start_time": "09:00", "end_time": "17:00"} | |
], | |
"tuesday": [ | |
{"uid":"abc222", "location": "Burlington", "start_time": "09:00", "end_time": "17:00"} | |
], | |
"wednesday": [ | |
{"uid":"abc333", "location": "Burlington", "start_time": "09:00", "end_time": "17:00"} | |
], | |
"thursday": [ | |
{"uid":"abc444", "location": "Burlington", "start_time": "09:00", "end_time": "12:00"}, | |
{"uid":"abc555", "location": "Dorchester", "start_time": "13:00", "end_time": "17:00"} | |
], | |
"friday": [ | |
{"uid":"abc666", "location": "Dorchester", "start_time": "09:00", "end_time": "17:00"} | |
], | |
"saturday": [ | |
], | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#SAVE | |
scheduling ember app | |
utc <---> americas/nyc --- display | |
schedule api | |
create: | |
1. turn the "things" in thursday into recurring events | |
a. 9:00(thursday start time) + america/new york(sched time zone) + 1/1/2016(sched start date) -> 1/5/2016 14:00UTC | |
b. add other recurring event fields ("every thursday", etc) | |
2. call recurring event creator on each one | |
recurring events creator | |
recurring events table & events table | |
#GET | |
scheduling ember app | |
utc <---> americas/nyc --- display | |
schedule api | |
index: | |
0. call recurring event model query | |
1. slot into days of the week | |
2. change "14:00 utc" to "09:00" | |
recurring events table & events table | |
Another proposed change, return who the schedule is for
{
"schedule":{
"uid":"UID9",
"start_date":"2016-01-31",
"end_date":null,
"timezone":"US/Arizona",
"schedulable_type":"practice_user",
"schedulable_id":"UID12345",
"sunday":[],
"monday":[
{"location_id":"LOC123","start_time":"05:00","end_time":"07:00"},
{"location_id":"LOC234","start_time":"08:00","end_time":"18:00"}
],
"tuesday":[],
"wednesday":[
{"location_id":"LOC123","start_time":"08:00","end_time":"18:00"}
],
"thursday":[],
"friday":[],
"saturday":[]
}
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Proposed change: change location to be the location uid, don't put uid on the blown chunks, but put it on the schedule: