marcpage / scheduling

Restaurant staff scheduling website
The Unlicense
3 stars 4 forks source link

[html / javascript] Create a dynamic view for employee availabilities #53

Open marcpage opened 2 years ago

marcpage commented 2 years ago

In src/restaurant.html it would be nice to view a week at a time, similar to Google calendar, showing hours and color coded sections showing when they would like to work, could work, prefer not to work, and not available to work.

Then have controls that would allow you to go forward and backwards a week at a time.

The javascript logic can be stored in src/ui.

The data right now is just dumped raw. Instead it can be dumped into a javascript section in src/restaurant.html

marcpage commented 2 years ago

I'm thinking the javascript may also come in handy when we are visualizing the shifts for GMs

marcpage commented 2 years ago

The current data being dumped looks like this:


day_of_week: 0 start: 2021-12-31 00:00:00 end: 2022-12-31 00:00:00 earliest: 540 latest: 1020 priority: 1.0 note: None
day_of_week: 1 start: 2021-12-31 00:00:00 end: 2022-12-31 00:00:00 earliest: 540 latest: 1020 priority: 1.0 note: None
day_of_week: 2 start: 2021-12-31 00:00:00 end: 2022-12-31 00:00:00 earliest: 540 latest: 1020 priority: 2.0 note: None
day_of_week: 4 start: 2021-12-31 00:00:00 end: 2022-12-31 00:00:00 earliest: 540 latest: 1020 priority: 3.0 note: None```

Where day_of_week 0=Monday, earliest and latest are the number of minutes since midnight, and priority 1=want to work, 2=could work, 3=prefer not to work, 4=cannot work. Note may be None or may be notes the the scheduler for more information.
ghost commented 2 years ago

So basically what functionality you want to add?

marcpage commented 2 years ago

Take the data shown in the comment above and use javascript to create a table showing days of the week and hours of each day and showing what times people can work, cannot work, etc. Kind of like week-view in Google Calendar.

marcpage commented 2 years ago

To have more of a visual, something like this

Screen Shot 2022-01-02 at 3 55 24 PM

:

marcpage commented 2 years ago

It doesn't have to be exactly like the above, but I would like to map the data to a visual presentation something like the above

ghost commented 2 years ago

Is there any way we can connect it directly with Google Calendar?

On Mon, Jan 3, 2022, 3:07 AM Marc Page @.***> wrote:

Take the data shown in the comment above and use javascript to create a table showing days of the week and hours of each day and showing what times people can work, cannot work, etc. Kind of like week-view in Google Calendar.

— Reply to this email directly, view it on GitHub https://github.com/marcpage/scheduling/issues/53#issuecomment-1003779233, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT7PRYZPPC72LHXW3VTICH3UUDARLANCNFSM5LBWRL5A . You are receiving this because you commented.Message ID: @.***>

marcpage commented 2 years ago

Not in an easy way. This is availability, which we would not want to clutter their personal calendar. For shift scheduling we can have a calendar they can add to Google calendar. We also don't want to require them to have a Google account.