- changed status to resolved
Break up the times into discrete shifts
Issue #2
resolved
Have a distinct record for a person / day, register availability as PersonDay / shift:
class PersonDay(models.Model):
person = models.ForeignKey(Person)
day = models.DateField()
class Meta:
unique_together = [
('person', 'day'),
]
class Availablilty(models.Model):
personday = models.ForeignKey(PersonDay)
shift = models.ForeignKey(Shift)
AVAILABILITY_CHOICES = [
('available', 'Available'),
('working', 'Working - Available'),
('rest', 'Rest day'),
]
availability = models.CharField(choices=AVAILABILITY_CHOICES)
Show unavailable by a PersonDay with no Availability. Show shifts in the big ol' table, instead of blobs of time. Colour days that have been processed differently than days that have not.
Comments (1)
-
reporter - Log in to comment
Done!