diff options
author | Markus Krogh <markus@nordu.net> | 2016-03-15 12:37:16 +0000 |
---|---|---|
committer | Markus Krogh <markus@nordu.net> | 2016-03-15 12:37:16 +0000 |
commit | 2d953d27d0d1aad7491485c739a9507127354af9 (patch) | |
tree | a5a47c5d0ed8e3295e3babcb2f25267ff2892dc1 /maconomy/models.py | |
parent | c9d7afac4f1396b6e632277b39fea816b974131e (diff) |
Update manager mails and ceo mail
Diffstat (limited to 'maconomy/models.py')
-rw-r--r-- | maconomy/models.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/maconomy/models.py b/maconomy/models.py index f878172..7f4fcd4 100644 --- a/maconomy/models.py +++ b/maconomy/models.py @@ -38,5 +38,14 @@ class Timesheet: return self.approved == 1 def __str__(self): return self.__unicode__() + def status_summary(self): + status = u"[OK]" + if self.is_missing(): + status = u"[Missing]" + elif not self.is_submitted(): + status = u"[Unsubmitted]" + elif not self.is_approved(): + status = u"[Not approved]" + return u"{} {}".format(status, self.employee) def __unicode__(self): u"{} ({})".format(self.week, self.status) |