Fix CTAs for funding page

This commit is contained in:
richard-dds
2019-06-11 14:00:31 -04:00
parent 06f4aeb74d
commit 13eb277f4a
3 changed files with 30 additions and 10 deletions

View File

@@ -64,14 +64,26 @@ class TaskOrder(Base, mixins.TimestampsMixin):
else:
raise TypeError("Could not set attachment with invalid type")
@property
def is_draft(self):
return self.status == Status.DRAFT
@property
def is_active(self):
return self.status == Status.ACTIVE
@property
def is_upcoming(self):
return self.status == Status.UPCOMING
@property
def is_expired(self):
return self.status == Status.EXPIRED
@property
def is_unsigned(self):
return self.status == Status.UNSIGNED
@property
def is_completed(self):
return all([self.pdf, self.number, len(self.clins)])
@@ -146,10 +158,6 @@ class TaskOrder(Base, mixins.TimestampsMixin):
def portfolio_name(self):
return self.portfolio.name
@property
def is_pending(self):
return self.status == Status.PENDING
def to_dictionary(self):
return {
"portfolio_name": self.portfolio_name,