Merge pull request #556 from dod-ccpo/navigate-to-form-review-page
Navigate to Task Order Form review page
This commit is contained in:
commit
b5ee92025f
@ -19,6 +19,14 @@ def dollars(value):
|
|||||||
return "${:,.0f}".format(numberValue)
|
return "${:,.0f}".format(numberValue)
|
||||||
|
|
||||||
|
|
||||||
|
def dollarsWithCents(value):
|
||||||
|
try:
|
||||||
|
numberValue = float(value)
|
||||||
|
except ValueError:
|
||||||
|
numberValue = 0
|
||||||
|
return "${:,.2f}".format(numberValue)
|
||||||
|
|
||||||
|
|
||||||
def usPhone(number):
|
def usPhone(number):
|
||||||
phone = re.sub(r"\D", "", number)
|
phone = re.sub(r"\D", "", number)
|
||||||
return "+1 ({}) {} - {}".format(phone[0:3], phone[3:6], phone[6:])
|
return "+1 ({}) {} - {}".format(phone[0:3], phone[3:6], phone[6:])
|
||||||
@ -113,6 +121,7 @@ def normalizeOrder(title):
|
|||||||
def register_filters(app):
|
def register_filters(app):
|
||||||
app.jinja_env.filters["iconSvg"] = iconSvg
|
app.jinja_env.filters["iconSvg"] = iconSvg
|
||||||
app.jinja_env.filters["dollars"] = dollars
|
app.jinja_env.filters["dollars"] = dollars
|
||||||
|
app.jinja_env.filters["dollarsWithCents"] = dollarsWithCents
|
||||||
app.jinja_env.filters["usPhone"] = usPhone
|
app.jinja_env.filters["usPhone"] = usPhone
|
||||||
app.jinja_env.filters["readableInteger"] = readableInteger
|
app.jinja_env.filters["readableInteger"] = readableInteger
|
||||||
app.jinja_env.filters["getOptionLabel"] = getOptionLabel
|
app.jinja_env.filters["getOptionLabel"] = getOptionLabel
|
||||||
|
@ -45,8 +45,8 @@ class AppInfoForm(CacheableForm):
|
|||||||
default="",
|
default="",
|
||||||
)
|
)
|
||||||
native_apps = RadioField(
|
native_apps = RadioField(
|
||||||
translate("forms.task_order.native_apps_label"),
|
translate("forms.task_order.native_apps.label"),
|
||||||
description=translate("forms.task_order.native_apps_description"),
|
description=translate("forms.task_order.native_apps.description"),
|
||||||
choices=[("yes", "Yes"), ("no", "No"), ("not_sure", "Not Sure")],
|
choices=[("yes", "Yes"), ("no", "No"), ("not_sure", "Not Sure")],
|
||||||
)
|
)
|
||||||
complexity = SelectMultipleField(
|
complexity = SelectMultipleField(
|
||||||
|
@ -18,56 +18,57 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% if task_order.defense_component %}
|
{% macro ReviewField(heading, field, filter=None) %}
|
||||||
{% set defense_component_description = task_order.defense_component | normalizeOrder %}
|
<div class="col col--grow">
|
||||||
|
<h4 class='task-order-form__heading'>{{ heading }}</h4>
|
||||||
|
{% if field %}
|
||||||
|
<p>{{ field | findFilter(filter) }}</p>
|
||||||
|
{% else %}
|
||||||
|
{{ RequiredLabel() }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if caller %}
|
||||||
|
{{ caller() }}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
{% if task_order.app_migration %}
|
{% macro ReviewOfficerInfo(heading, first_name, last_name, email, phone_number, dod_id, invite) %}
|
||||||
{% set app_migration_description = "forms.task_order.app_migration.{}".format(task_order.app_migration) | translate | removeHtml %}
|
<div class="col col--grow">
|
||||||
|
<h4 class='task-order-form__heading'>{{ heading | translate }}</h4>
|
||||||
|
{{ first_name }} {{ last_name }}<br>
|
||||||
|
{{ email }}<br>
|
||||||
|
{% if phone_number %}
|
||||||
|
{{ phone_number | usPhone }}
|
||||||
|
{% else %}
|
||||||
|
{{ RequiredLabel() }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<br>
|
||||||
{% if task_order.native_apps %}
|
{{ "task_orders.new.review.dod_id" | translate }} {{ dod_id}}<br>
|
||||||
{% set native_apps_description = "task_orders.new.review.{}_native".format(task_order.native_apps) | translate %}
|
{% if invite %}
|
||||||
{% endif %}
|
{{ Icon('ok', classes='icon--green') }} <span class="task-order-invite-message sent">{{ "task_orders.new.review.invited"| translate }}</<span>
|
||||||
|
{% else %}
|
||||||
{% if task_order.team_experience %}
|
{{ Icon('alert', classes='icon--red') }} <span class="task-order-invite-message not-sent">{{ "task_orders.new.review.not_invited"| translate }}</span>
|
||||||
{% set team_experience_description = "forms.task_order.team_experience.{}".format(task_order.team_experience) | translate %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
|
|
||||||
<h3 class="subheading">{{ "task_orders.new.review.app_info"| translate }} {{ TOEditLink(screen=1) }}</h3>
|
<h3 class="subheading">{{ "task_orders.new.review.app_info"| translate }} {{ TOEditLink(screen=1) }}</h3>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col col--grow">
|
{{ ReviewField(("task_orders.new.review.portfolio" | translate), task_order.portfolio_name) }}
|
||||||
<h4 class='task-order-form__heading'>{{ "task_orders.new.review.portfolio"| translate }}</h4>
|
{{ ReviewField(("task_orders.new.review.dod" | translate), task_order.defense_component, filter="normalizeOrder") }}
|
||||||
<p>{{ task_order.portfolio_name or RequiredLabel() }}</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
<div class="col col--grow">
|
{{ ReviewField(("task_orders.new.review.scope" | translate), task_order.scope) }}
|
||||||
<h4 class='task-order-form__heading'>{{ "task_orders.new.review.dod"| translate }}</h4>
|
|
||||||
<p>{{ defense_component_description or RequiredLabel() }}</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<h4 class='task-order-form__heading'>{{ "task_orders.new.review.scope"| translate }}</h4>
|
|
||||||
<p>
|
|
||||||
{{ task_order.scope or RequiredLabel() }}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<h3 class="subheading">{{ "task_orders.new.review.reporting"| translate }} {{ TOEditLink(screen=1, anchor="reporting") }}</h3>
|
<h3 class="subheading">{{ "task_orders.new.review.reporting"| translate }} {{ TOEditLink(screen=1, anchor="reporting") }}</h3>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col col--grow">
|
{{ ReviewField(("forms.task_order.app_migration.label" | translate), ("forms.task_order.app_migration.{}".format(task_order.app_migration) | translate), filter="removeHtml") }}
|
||||||
<h4 class='task-order-form__heading'>{{ "task_orders.new.review.migration"| translate }}</h4>
|
{{ ReviewField(("forms.task_order.native_apps.label" | translate), ("forms.task_order.native_apps.{}".format(task_order.native_apps))| translate) }}
|
||||||
<p>{{ app_migration_description or RequiredLabel() }}</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col col--grow">
|
|
||||||
<h4 class='task-order-form__heading'>{{ "task_orders.new.review.native_apps"| translate }}</h4>
|
|
||||||
<p>{{ native_apps_description or RequiredLabel() }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class='task-order-form__heading'>{{ "task_orders.new.review.complexity"| translate }}</h4>
|
<h4 class='task-order-form__heading'>{{ "task_orders.new.review.complexity"| translate }}</h4>
|
||||||
@ -95,7 +96,6 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
{{ Icon('ok', classes='icon--gray icon--medium') }}{{ "forms.task_order.dev_team.{}".format(item) | translate }}
|
{{ Icon('ok', classes='icon--gray icon--medium') }}{{ "forms.task_order.dev_team.{}".format(item) | translate }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
@ -104,10 +104,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col col--grow">
|
{{ ReviewField(("forms.task_order.team_experience.label" |translate), ("forms.task_order.team_experience.{}".format(task_order.team_experience)) | translate) }}
|
||||||
<h4 class='task-order-form__heading'>{{ "task_orders.new.review.experience"| translate }}</h4>
|
|
||||||
<p>{{ team_experience_description or RequiredLabel() }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
@ -115,22 +112,30 @@
|
|||||||
<h3 class="subheading">{{ "task_orders.new.review.funding"| translate }} {{ TOEditLink(screen=2) }}</h3>
|
<h3 class="subheading">{{ "task_orders.new.review.funding"| translate }} {{ TOEditLink(screen=2) }}</h3>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col col--grow">
|
{% call ReviewField(("task_orders.new.review.performance_period" | translate), task_order.performance_length, filter="translateDuration") %}
|
||||||
<h4 class='task-order-form__heading'>{{ "task_orders.new.review.performance_period"| translate }}</h4>
|
|
||||||
{{ task_order.performance_length | translateDuration or RequiredLabel() }}
|
|
||||||
<p><a href="#" class='icon-link icon-link--left' download>{{ Icon('download') }} {{ "task_orders.new.review.usage_est_link" | translate }}</a></p>
|
<p><a href="#" class='icon-link icon-link--left' download>{{ Icon('download') }} {{ "task_orders.new.review.usage_est_link" | translate }}</a></p>
|
||||||
</div>
|
{% endcall %}
|
||||||
|
|
||||||
<div class="col col--grow">
|
<div class="col col--grow">
|
||||||
<table class="funding-summary__table">
|
<table class="funding-summary__table">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><h4>{{ "task_orders.new.review.to_value"| translate }}</h4></td>
|
<td><h4>{{ "task_orders.new.review.to_value"| translate }}</h4></td>
|
||||||
<td class="table-cell--align-right">{{ '${:,.2f}'.format(task_order.budget) }}</td>
|
<td class="table-cell--align-right">
|
||||||
|
{% if task_order.budget %}
|
||||||
|
{{ task_order.budget | dollarsWithCents }}
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><h4 class='task-order-form__heading funding-summary__td'>{{ "task_orders.new.review.clin_1"| translate }}</h4></td>
|
<td><h4 class='task-order-form__heading funding-summary__td'>{{ "task_orders.new.review.clin_1"| translate }}</h4></td>
|
||||||
<td class="table-cell--align-right">{{ '${:,.2f}'.format(task_order.clin_01) }}</td>
|
<td class="table-cell--align-right">
|
||||||
|
{% if task_order.clin_01 %}
|
||||||
|
{{ task_order.clin_01 | dollarsWithCents }}
|
||||||
|
{% else %}
|
||||||
|
{{ RequiredLabel() }}
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><h4 class="task-order-form__heading funding-summary__td{% if not config.CLASSIFIED %} inactive{% endif %}">
|
<td><h4 class="task-order-form__heading funding-summary__td{% if not config.CLASSIFIED %} inactive{% endif %}">
|
||||||
@ -140,14 +145,20 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</h4></td>
|
</h4></td>
|
||||||
<td class="table-cell--align-right">
|
<td class="table-cell--align-right">
|
||||||
{% if config.CLASSIFIED %}
|
{% if task_order.clin_02 and config.CLASSIFIED %}
|
||||||
{{ '${:,.2f}'.format(task_order.clin_02) }}
|
{{ task_order.clin_02 | dollarsWithCents or RequiredLabel() }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><h4 class='task-order-form__heading funding-summary__td'>{{ "task_orders.new.review.clin_3"| translate }}</h4></td>
|
<td><h4 class='task-order-form__heading funding-summary__td'>{{ "task_orders.new.review.clin_3"| translate }}</h4></td>
|
||||||
<td class="table-cell--align-right">{{ '${:,.2f}'.format(task_order.clin_03) }}</td>
|
<td class="table-cell--align-right">
|
||||||
|
{% if task_order.clin_03 %}
|
||||||
|
{{ task_order.clin_03 | dollarsWithCents or RequiredLabel() }}
|
||||||
|
{% else %}
|
||||||
|
{{ RequiredLabel() }}
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><h4 class="task-order-form__heading funding-summary__td{% if not config.CLASSIFIED %} inactive{% endif %}">
|
<td><h4 class="task-order-form__heading funding-summary__td{% if not config.CLASSIFIED %} inactive{% endif %}">
|
||||||
@ -157,8 +168,8 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</h4></td>
|
</h4></td>
|
||||||
<td class="table-cell--align-right">
|
<td class="table-cell--align-right">
|
||||||
{% if config.CLASSIFIED %}
|
{% if task_order.clin_04 and config.CLASSIFIED %}
|
||||||
{{ '${:,.2f}'.format(task_order.clin_04) }}
|
{{ task_order.clin_04 | dollarsWithCents or RequiredLabel() }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<tr>
|
<tr>
|
||||||
@ -172,45 +183,11 @@
|
|||||||
<h3 class="subheading">{{ "task_orders.new.review.oversight"| translate }} {{ TOEditLink(screen=3) }}</h3>
|
<h3 class="subheading">{{ "task_orders.new.review.oversight"| translate }} {{ TOEditLink(screen=3) }}</h3>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col col--grow">
|
{{ ReviewOfficerInfo("task_orders.new.review.ko", task_order.ko_first_name, task_order.ko_last_name, task_order.ko_email, task_order.ko_phone_number, task_order.ko_dod_id, task_order.ko_invite) }}
|
||||||
<h4 class='task-order-form__heading'>{{ "task_orders.new.review.ko"| translate }}</h4>
|
{{ ReviewOfficerInfo("task_orders.new.review.cor", task_order.cor_first_name, task_order.cor_last_name, task_order.cor_email, task_order.cor_phone_number, task_order.cor_dod_id, task_order.cor_invite) }}
|
||||||
{{ task_order.ko_first_name }} {{ task_order.ko_last_name }}<br>
|
|
||||||
{{ task_order.ko_email }}<br>
|
|
||||||
{{ task_order.ko_phone_number | usPhone }}<br>
|
|
||||||
{{ "task_orders.new.review.dod_id"| translate }} {{ task_order.ko_dod_id}}<br>
|
|
||||||
{% if task_order.ko_invite %}
|
|
||||||
{{ Icon('ok', classes='icon--green') }} <span class="task-order-invite-message sent">{{ "task_orders.new.review.invited"| translate }}</<span>
|
|
||||||
{% else %}
|
|
||||||
{{ Icon('alert', classes='icon--red') }} <span class="task-order-invite-message not-sent">{{ "task_orders.new.review.not_invited"| translate }}</span>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col col--grow">
|
|
||||||
<h4 class='task-order-form__heading'>{{ "task_orders.new.review.cor"| translate }}</h4>
|
|
||||||
{{ task_order.cor_first_name }} {{ task_order.cor_last_name }}<br>
|
|
||||||
{{ task_order.cor_email }}<br>
|
|
||||||
{{ task_order.cor_phone_number | usPhone }}<br>
|
|
||||||
{{ "task_orders.new.review.dod_id"| translate }} {{ task_order.cor_dod_id}}<br>
|
|
||||||
{% if task_order.cor_invite %}
|
|
||||||
{{ Icon('ok', classes='icon--green') }} <span class="task-order-invite-message sent">{{ "task_orders.new.review.invited"| translate }}</<span>
|
|
||||||
{% else %}
|
|
||||||
{{ Icon('alert', classes='icon--red') }} <span class="task-order-invite-message not-sent">{{ "task_orders.new.review.not_invited"| translate }}</span>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col col--grow">
|
{{ ReviewOfficerInfo("task_orders.new.review.so", task_order.so_first_name, task_order.so_last_name, task_order.so_email, task_order.so_phone_number, task_order.so_dod_id, task_order.so_invite) }}
|
||||||
<h4 class='task-order-form__heading'>{{ "task_orders.new.review.so"| translate }}</h4>
|
|
||||||
{{ task_order.so_first_name }} {{ task_order.so_last_name }}<br>
|
|
||||||
{{ task_order.so_email }}<br>
|
|
||||||
{{ task_order.so_phone_number | usPhone }}<br>
|
|
||||||
{{ "task_orders.new.review.dod_id"| translate }} {{ task_order.so_dod_id}}<br>
|
|
||||||
{% if task_order.so_invite %}
|
|
||||||
{{ Icon('ok', classes='icon--green') }} <span class="task-order-invite-message sent">{{ "task_orders.new.review.invited"| translate }}</<span>
|
|
||||||
{% else %}
|
|
||||||
{{ Icon('alert', classes='icon--red') }} <span class="task-order-invite-message not-sent">{{ "task_orders.new.review.not_invited"| translate }}</span>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -222,5 +199,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block form_action %}
|
{% block form_action %}
|
||||||
|
{% if task_order_id %}
|
||||||
<form method='POST' action="{{ url_for('task_orders.invite', task_order_id=task_order_id) }}" autocomplete="off">
|
<form method='POST' action="{{ url_for('task_orders.invite', task_order_id=task_order_id) }}" autocomplete="off">
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -177,8 +177,12 @@ forms:
|
|||||||
both: Yes, migrating from an <strong>on-premise data center</strong> and <strong>another cloud provider</strong>
|
both: Yes, migrating from an <strong>on-premise data center</strong> and <strong>another cloud provider</strong>
|
||||||
none: Not planning to migrate any applications
|
none: Not planning to migrate any applications
|
||||||
not_sure: "Not Sure"
|
not_sure: "Not Sure"
|
||||||
native_apps_label: Native Apps
|
native_apps:
|
||||||
native_apps_description: Do you plan to develop application(s) natively in the cloud?
|
label: Native Apps
|
||||||
|
description: Do you plan to develop application(s) natively in the cloud?
|
||||||
|
'yes': Yes, planning to develop natively in the cloud
|
||||||
|
'no': No, not planning to develop natively in the cloud
|
||||||
|
not_sure: Not sure, unsure if planning to develop natively in the cloud
|
||||||
complexity:
|
complexity:
|
||||||
label: Project Complexity
|
label: Project Complexity
|
||||||
description: Which of these describes how complex your team's use of the cloud will be? Select all that apply.
|
description: Which of these describes how complex your team's use of the cloud will be? Select all that apply.
|
||||||
@ -414,14 +418,8 @@ task_orders:
|
|||||||
dod: DoD Component
|
dod: DoD Component
|
||||||
scope: Scope (Statement of Work)
|
scope: Scope (Statement of Work)
|
||||||
reporting: Reporting
|
reporting: Reporting
|
||||||
migration: App Migration
|
|
||||||
native_apps: Native Apps
|
|
||||||
yes_native: Yes, planning to develop natively in the cloud
|
|
||||||
no_native: No, not planning to develop natively in the cloud
|
|
||||||
not_sure_native: Not sure, unsure if planning to develop natively in the cloud
|
|
||||||
complexity: Project Complexity
|
complexity: Project Complexity
|
||||||
team: Development Team
|
team: Development Team
|
||||||
experience: Team Experience
|
|
||||||
funding: Funding
|
funding: Funding
|
||||||
performance_period: Period of Performance length
|
performance_period: Period of Performance length
|
||||||
usage_est_link: View Usage Estimate
|
usage_est_link: View Usage Estimate
|
||||||
@ -429,7 +427,7 @@ task_orders:
|
|||||||
clin_1: 'CLIN #1: Unclassified Cloud'
|
clin_1: 'CLIN #1: Unclassified Cloud'
|
||||||
clin_2: 'CLIN #2: Classified Cloud'
|
clin_2: 'CLIN #2: Classified Cloud'
|
||||||
clin_3: 'CLIN #3: Unclassified Cloud'
|
clin_3: 'CLIN #3: Unclassified Cloud'
|
||||||
clin_4: 'CLIN $4: Classified Cloud'
|
clin_4: 'CLIN #4: Classified Cloud'
|
||||||
classified_inactive: (Available Soon)
|
classified_inactive: (Available Soon)
|
||||||
oversight: Oversight
|
oversight: Oversight
|
||||||
ko: Contracting Officer (KO)
|
ko: Contracting Officer (KO)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user