Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shift calendar + let people assign themselves to shifts #23

Closed
simonw opened this issue Mar 30, 2022 · 6 comments
Closed

Shift calendar + let people assign themselves to shifts #23

simonw opened this issue Mar 30, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@simonw
Copy link
Collaborator

simonw commented Mar 30, 2022

No description provided.

@simonw simonw added the enhancement New feature or request label Mar 30, 2022
@simonw simonw added this to the Training launch milestone Mar 30, 2022
natbat added a commit that referenced this issue Mar 30, 2022
@natbat
Copy link
Owner

natbat commented Mar 30, 2022

Screen Shot 2022-03-30 at 1 52 53 PM

always choose the lowest tide shift that day

if you click on a day that has a shift on it:

if it is AVAILABLE ot PARTFULL: "would you like to sign up to the shift on the 12th March between 10:05 and 4:45pm?"

If it is FULL "There are 5 people scheduled on this shift already, would you also like to sign up to the shift on the 12th March between 10:05 and 4:45pm?"

If it is yours then "you are signed up to the shift on the 12th March between 10:05 and 4:45pm, would you like to cancel your shift?"

@simonw simonw changed the title Let people assign themselves to shifts Shift calendar + let people assign themselves to shifts Mar 30, 2022
@simonw
Copy link
Collaborator Author

simonw commented Mar 30, 2022

I'm going to have it always start by showing this current month and the next three months.

@simonw
Copy link
Collaborator Author

simonw commented Mar 30, 2022

Tiny bit ugly but it will work for the first version:

confirm("There are 5 people scheduled on this shift already, would you also like to sign up to the shift on the 12th March between 10:05 and 4:45pm?")

image

@simonw
Copy link
Collaborator Author

simonw commented Mar 31, 2022

TIL: https://til.simonwillison.net/python/calendar-weeks - using calendar from Python standard library.

@simonw
Copy link
Collaborator Author

simonw commented Mar 31, 2022

Here are the CSS classes I need to apply:

    <tr>
        <td class="shiftday available"><a href="#">4<span class="context-text">th April, shift is between</span>
          <span class="shifttime">10am-2pm</span></a></td>
        <td class="noshift">5<span class="context-text">th April</span></td>
        <td class="noshift">6<span class="context-text">th April</span></td>
        <td class="shiftday partfull"><a href="#">7<span class="context-text">th April, shift is between</span>
          <span class="shifttime">10am-2pm</span></a></td>
        <td class="noshift">8<span class="context-text">th April</span></td>
        <td class="weekend noshift">9<span class="context-text">th April</span></td>
        <td class="weekend noshift">10<span class="context-text">th April</span></td>
    </tr>

Also:

        <td class="weekend shiftday full yours"><a href="#">24<span class="context-text">th April, shift is between</span>
        <span class="shifttime">10am-2pm</span></a></td>

simonw added a commit that referenced this issue Mar 31, 2022
simonw added a commit that referenced this issue Apr 2, 2022
@simonw
Copy link
Collaborator Author

simonw commented Apr 2, 2022

Need to remove the Ajax but that's a separate issue:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants