Merge pull request #359 from dod-ccpo/task-order-expiration
Fix report display for task order with no expiration date
This commit is contained in:
commit
ad49d3f71f
@ -121,7 +121,7 @@ def workspace_reports(workspace_id):
|
|||||||
remaining_difference = expiration_date - today
|
remaining_difference = expiration_date - today
|
||||||
remaining_days = remaining_difference.days
|
remaining_days = remaining_difference.days
|
||||||
else:
|
else:
|
||||||
remaining_days = 0
|
remaining_days = None
|
||||||
|
|
||||||
return render_template(
|
return render_template(
|
||||||
"workspaces/reports/index.html",
|
"workspaces/reports/index.html",
|
||||||
|
@ -65,16 +65,26 @@
|
|||||||
<div>
|
<div>
|
||||||
<dt>Expires</dt>
|
<dt>Expires</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<local-datetime
|
{% if expiration_date %}
|
||||||
timestamp='{{ expiration_date }}'
|
<local-datetime
|
||||||
format='MMMM D, YYYY'>
|
timestamp='{{ expiration_date }}'
|
||||||
</local-datetime>
|
format='MMMM D, YYYY'>
|
||||||
|
</local-datetime>
|
||||||
|
{% else %}
|
||||||
|
-
|
||||||
|
{% endif %}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<dt>Remaining</dt>
|
<dt>Remaining</dt>
|
||||||
<dd>{{ remaining_days }} days</dd>
|
<dd>
|
||||||
|
{% if remaining_days is not none %}
|
||||||
|
{{ remaining_days }} days
|
||||||
|
{% else %}
|
||||||
|
-
|
||||||
|
{% endif %}
|
||||||
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user