display task order info on reports page
This commit is contained in:
parent
97cfdd038f
commit
430efd211c
@ -216,3 +216,13 @@ class Request(Base, mixins.TimestampsMixin):
|
|||||||
@property
|
@property
|
||||||
def displayname(self):
|
def displayname(self):
|
||||||
return self.latest_revision.name or self.id
|
return self.latest_revision.name or self.id
|
||||||
|
|
||||||
|
@property
|
||||||
|
def contracting_officer_full_name(self):
|
||||||
|
if self.latest_revision.fname_co:
|
||||||
|
return "{} {}".format(self.latest_revision.fname_co, self.latest_revision.lname_co)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def contracting_officer_email(self):
|
||||||
|
return self.latest_revision.email_co
|
||||||
|
|
||||||
|
@ -105,16 +105,20 @@ def workspace_reports(workspace_id):
|
|||||||
prev_month = current_month - timedelta(days=28)
|
prev_month = current_month - timedelta(days=28)
|
||||||
two_months_ago = prev_month - timedelta(days=28)
|
two_months_ago = prev_month - timedelta(days=28)
|
||||||
|
|
||||||
# lets just say it expires on Christmas... ho ho ho
|
expiration_date = workspace.request.task_order.expiration_date
|
||||||
expiration_date = date(2018, 12, 25)
|
if expiration_date:
|
||||||
remaining_difference = expiration_date - today
|
remaining_difference = expiration_date - today
|
||||||
remaining_days = remaining_difference.days
|
remaining_days = remaining_difference.days
|
||||||
|
else:
|
||||||
|
remaining_days = 0
|
||||||
|
|
||||||
return render_template(
|
return render_template(
|
||||||
"workspaces/reports/index.html",
|
"workspaces/reports/index.html",
|
||||||
cumulative_budget=Reports.cumulative_budget(workspace),
|
cumulative_budget=Reports.cumulative_budget(workspace),
|
||||||
workspace_totals=Reports.workspace_totals(workspace),
|
workspace_totals=Reports.workspace_totals(workspace),
|
||||||
monthly_totals=Reports.monthly_totals(workspace),
|
monthly_totals=Reports.monthly_totals(workspace),
|
||||||
|
jedi_request=workspace.request,
|
||||||
|
task_order=workspace.request.task_order,
|
||||||
current_month=current_month,
|
current_month=current_month,
|
||||||
prev_month=prev_month,
|
prev_month=prev_month,
|
||||||
two_months_ago=two_months_ago,
|
two_months_ago=two_months_ago,
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
<h2 class='to-summary__heading'>Task Order</h2>
|
<h2 class='to-summary__heading'>Task Order</h2>
|
||||||
<dl class='to-summary__to-number'>
|
<dl class='to-summary__to-number'>
|
||||||
<dt class='usa-sr-only'>Task Order Number</dt>
|
<dt class='usa-sr-only'>Task Order Number</dt>
|
||||||
<dd>1234567890</dd>
|
<dd>{{ task_order.number }}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -87,8 +87,8 @@
|
|||||||
<dl class='to-summary__co'>
|
<dl class='to-summary__co'>
|
||||||
<dt>Contracting Officer</dt>
|
<dt>Contracting Officer</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Pietro Quirines
|
{{ jedi_request.contracting_officer_full_name }}
|
||||||
<a class='icon-link' href='mailto:email@email.com'>email@email.com</a>
|
<a class='icon-link' href='mailto:{{ jedi_request.contracting_officer_email }}'>{{ jedi_request.contracting_officer_email }}</a>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user