diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-10-16 11:05:42 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-10-16 11:05:42 +0100 |
commit | eb8497dcd3758d20447d4de977780c2c78a38613 (patch) | |
tree | f5c188ad01ac8db9156db587c821706396671100 /ctrack/register/models.py | |
parent | c0067e3dd35f56ad0cf9452f9ef1e8532b6378b4 (diff) |
Improvements to simple event form.
Diffstat (limited to '')
-rw-r--r-- | ctrack/register/models.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ctrack/register/models.py b/ctrack/register/models.py index 3ab760e..11e4a6b 100644 --- a/ctrack/register/models.py +++ b/ctrack/register/models.py @@ -17,6 +17,7 @@ class EventType(Enum): PHONE_CALL = auto() VIDEO_CALL = auto() EMAIL = auto() + NOTE = auto() # single date caf events CAF_INITIAL_CAF_RECEIVED = auto() CAF_FEEDBACK_EMAILED_OES = auto() @@ -157,18 +158,31 @@ class ResponseRequiredMixin(models.Model): abstract = True +class PrivateEventMixin(models.Model): + private = models.BooleanField( + default=False, help_text="Private events can only be seen by you. Official records should " + "not be private, but you can use private events to track your own " + "work." + ) + + class Meta: + abstract = True + + class SingleDateTimeEvent( EventBase, ResponseRequiredMixin, URLEventMixin, ThirdPartyEventMixin, SingleDateTimeEventMixin, + PrivateEventMixin, ): AVAILABLE_TYPES = [ (EventType.MEETING.name, "Meeting"), (EventType.PHONE_CALL.name, "Phone Call"), (EventType.VIDEO_CALL.name, "Video Call"), (EventType.EMAIL.name, "Email"), + (EventType.NOTE.name, "Note"), ] type_descriptor = models.CharField( blank=False, max_length=50, choices=AVAILABLE_TYPES |