Merge pull request #889 from dod-ccpo/funding-page-ctas
Funding page CTAs
This commit is contained in:
@@ -64,14 +64,34 @@ 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 has_begun(self):
|
||||
return Clock.today() >= self.start_date
|
||||
|
||||
@property
|
||||
def has_ended(self):
|
||||
return Clock.today() >= self.end_date
|
||||
|
||||
@property
|
||||
def is_completed(self):
|
||||
return all([self.pdf, self.number, len(self.clins)])
|
||||
@@ -146,10 +166,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,
|
||||
|
Reference in New Issue
Block a user