When the worker has subscribed to a shift template but not yet to a
shift, the shift used to generate her next shift is the first shift
found in the shift template (so this is a shift that is attached to
another worker from the same shift template).
Now the system pays attention to not use a shift that has no start time
or end time defined.
There was an issue that shows an error message when trying to modify the
settings for shift in the website configuration.
This is due to a missing sequence in the database. I don't know why this
sequence where not present. But a simple query create it if it doesn't
exists.
Show the shift status in the list of the next shifts of a worker. For
small screen shift status is represented by a colored label.
Add shift status as a label for the past shift of a worker on small screen.
Issue when no timezone set to a regular worker. It try to use the user
timezone but has it doesn't exists runs into an error.
To solve this, it first takes the timezone of the user, if it is
empty, it takes the timezone of the context, and if also empty it uses
UTC.
[IMP] website_shift: Next shifts for regular
Refactor the generation of the next shift for regular worker.
Fix: no next shifts shown when the worker is a new worker and doesn't have any
past shift
Fix: no next shifts shown when the next shift of the worker is not
generated yet.
[ADD] website_shift: Help texts
[FIX] website_shift: Help texts
Fix help text for the status based on the input from the members office
[IMP] website_shift: Help texts translation
Add translation for the help texts.
[IMP] website_shift: Future alert date
The future alert date has moved to beesdoo_shift module. So we use this
one instead of re-compute it in the controller.
[IMP] website_shift: Update manifest
[FIX] website_shift: Better position for help text
On a small screen help texts appear on the top of the page leaving
useful info on the bottom. Now help texts is moved on the bottom of the
page.
[ADD] website_shift: Feedback when subscribing
Add a feedback to the user about the successfulness of the subscription.
[FIX] website_shift: Super-cooperator info modal
The modal showing the super-cooperator information didn't work for the
'fictive' shift generated for regular workers. It's due to the fact that
a 'fictive' shift doesn't have an id. So we should not use it to
generate xml ids. Instead we use the index of the foreach loop.
[FIX] website_shift: Wrong time when crossing DST
The issue: There was a time difference of one hour when the fictive
shifts cross the DST (Daylight Saving Time).
Explanation: Python works with two types of datetime. The datetime
without a timezone called *naive* and the one with a timezone called
*non-naive*. `timedelta()` is used to add a number of day to a datetime.
However, changing a non-naive datetime with `timedelta` just change the
date but leave the timezone unchanged. That's no correct because the new
date may not be in the same timezone because of the DST. If the new date
is after a change of time, due to DST, the timezone of the non-naive
datetime should be updated. Python don't do that because `timedelta`
doesn't realy add days but add the corresponding hours ! So when adding
hours it's consistent to not change the timezone (you can use
`normalize()` to get your datetime in the right timezone after a cross
of DST). To fix this, after adding a `timedelta` the timezone of the
datetime should be set to none and the relocalized with the `localize()`
function of the `pytz` corresponding timezone.
[FIX] website_shift: Translations