Move common to review html into a fragment and delete unused submit confirmation macro and vue component
This commit is contained in:
parent
5b208d9e8d
commit
72da5f36c3
@ -1,28 +0,0 @@
|
|||||||
import checkboxinput from './checkbox_input'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'submit-confirmation',
|
|
||||||
|
|
||||||
components: {
|
|
||||||
checkboxinput,
|
|
||||||
},
|
|
||||||
|
|
||||||
data: function() {
|
|
||||||
return {
|
|
||||||
valid: false,
|
|
||||||
checked: false,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
toggleValid: function() {
|
|
||||||
this.valid = !this.valid
|
|
||||||
},
|
|
||||||
|
|
||||||
handleClose: function() {
|
|
||||||
this.$root.closeModal(this.name)
|
|
||||||
this.checked = false
|
|
||||||
this.valid = false
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
@ -35,7 +35,6 @@ import { isNotInVerticalViewport } from './lib/viewport'
|
|||||||
import DateSelector from './components/date_selector'
|
import DateSelector from './components/date_selector'
|
||||||
import SidenavToggler from './components/sidenav_toggler'
|
import SidenavToggler from './components/sidenav_toggler'
|
||||||
import BaseForm from './components/forms/base_form'
|
import BaseForm from './components/forms/base_form'
|
||||||
import SubmitConfirmation from './components/submit_confirmation'
|
|
||||||
import DeleteConfirmation from './components/delete_confirmation'
|
import DeleteConfirmation from './components/delete_confirmation'
|
||||||
import NewEnvironment from './components/forms/new_environment'
|
import NewEnvironment from './components/forms/new_environment'
|
||||||
import EnvironmentRole from './components/environment_role'
|
import EnvironmentRole from './components/environment_role'
|
||||||
@ -79,7 +78,6 @@ const app = new Vue({
|
|||||||
SidenavToggler,
|
SidenavToggler,
|
||||||
BaseForm,
|
BaseForm,
|
||||||
DeleteConfirmation,
|
DeleteConfirmation,
|
||||||
SubmitConfirmation,
|
|
||||||
nestedcheckboxinput,
|
nestedcheckboxinput,
|
||||||
NewEnvironment,
|
NewEnvironment,
|
||||||
EnvironmentRole,
|
EnvironmentRole,
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
{% from "components/alert.html" import Alert %}
|
|
||||||
{% from "components/checkbox_input.html" import CheckboxInput %}
|
|
||||||
|
|
||||||
{% macro SubmitConfirmation(modal_id, submit_text, submit_action, form, task_order) %}
|
|
||||||
<submit-confirmation inline-template name="{{ modal_id }}" key="{{ modal_id }}">
|
|
||||||
<div>
|
|
||||||
<div class="usa-input">
|
|
||||||
<label for="{{ modal_id }}-deleted-text">
|
|
||||||
<div class="modal__form--header">
|
|
||||||
<h1>Signature confirmation: <em>Task Order #{{task_order.number}}</em></h1>
|
|
||||||
</div>
|
|
||||||
{{ Alert('',
|
|
||||||
message="All task orders require a Contracting Officer signature."
|
|
||||||
) }}
|
|
||||||
</label>
|
|
||||||
<div v-on:change="toggleValid" class="checkbox">
|
|
||||||
<div class='usa-input'>
|
|
||||||
<fieldset data-ally-disabled="true" class="usa-input__choices">
|
|
||||||
<legend>
|
|
||||||
{{ form.signature(**{"v-model": "checked"}) }}
|
|
||||||
{{ form.signature.label | safe }}
|
|
||||||
</legend>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="action-group">
|
|
||||||
<form method="POST" action="{{ submit_action }}">
|
|
||||||
{{ form.csrf_token }}
|
|
||||||
<button class="usa-button usa-button-primary" v-bind:disabled="!valid">
|
|
||||||
{{ submit_text }}
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
<button v-on:click="handleClose" class="usa-button usa-button-secondary">{{ "common.cancel" | translate }}</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</submit-confirmation>
|
|
||||||
{% endmacro %}
|
|
85
templates/fragments/task_order_review.html
Normal file
85
templates/fragments/task_order_review.html
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
{% from "components/icon.html" import Icon %}
|
||||||
|
{% from "components/semi_collapsible_text.html" import SemiCollapsibleText %}
|
||||||
|
{% from "components/totals_box.html" import TotalsBox %}
|
||||||
|
|
||||||
|
|
||||||
|
<div class="task-order">
|
||||||
|
{{ SemiCollapsibleText() }}
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<div class="h1">
|
||||||
|
{{ "task_orders.review.review_your_task_order" | translate }}
|
||||||
|
</div>
|
||||||
|
<p>
|
||||||
|
{{ "task_orders.review.check_paragraph" | translate }}
|
||||||
|
</p>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col task-order__details">
|
||||||
|
<div class="h4">
|
||||||
|
{{ "task_orders.review.task_order_number" | translate }}
|
||||||
|
</div>
|
||||||
|
<div>{{task_order.number}}</div>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<div class="h3">
|
||||||
|
{{ "task_orders.review.funding_summary" | translate }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% for clin in task_order.clins %}
|
||||||
|
<div>
|
||||||
|
{{ "{}".format(clin.jedi_clin_type) | translate}}
|
||||||
|
</div>
|
||||||
|
<table class="fixed-table-wrapper">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>{{ "task_orders.review.clins.amount" | translate }}</th>
|
||||||
|
<th>{{ "task_orders.review.clins.obligated" | translate }}</th>
|
||||||
|
<th>{{ "task_orders.review.clins.pop_start" | translate }}</th>
|
||||||
|
<th>{{ "task_orders.review.clins.pop_end" | translate }}</th>
|
||||||
|
<th>{{ "task_orders.review.clins.loa" | translate }}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>{{ clin.obligated_amount | dollars }}</td>
|
||||||
|
<td>
|
||||||
|
{% if clin.is_obligated() %}
|
||||||
|
{{ "common.yes" | translate }}
|
||||||
|
{% else %}
|
||||||
|
{{ "common.no" | translate }}
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td>{{ clin.start_date | formattedDate }}</td>
|
||||||
|
<td>{{ clin.end_date | formattedDate }}</td>
|
||||||
|
<td>
|
||||||
|
{% for loa in clin.loas %}
|
||||||
|
<span title='{{ loa }}'>
|
||||||
|
{{ loa }}
|
||||||
|
</span>
|
||||||
|
<br />
|
||||||
|
{% endfor %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<div class="h3">
|
||||||
|
{{ "task_orders.review.supporting_document.title" | translate }}
|
||||||
|
</div>
|
||||||
|
<div class="h4">
|
||||||
|
<a class="icon-link icon-link--download" href="{{ url_for('task_orders.download_task_order_pdf', task_order_id=task_order.id) }}">
|
||||||
|
{{ Icon('check-circle-solid') }}
|
||||||
|
{{ task_order.pdf.filename }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{ TotalsBox(task_order=task_order) }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -1,111 +1,12 @@
|
|||||||
{% from "components/icon.html" import Icon %}
|
|
||||||
{% from "components/modal.html" import Modal %}
|
|
||||||
{% from "components/semi_collapsible_text.html" import SemiCollapsibleText %}
|
|
||||||
{% from "components/sticky_cta.html" import StickyCTA %}
|
{% from "components/sticky_cta.html" import StickyCTA %}
|
||||||
{% from "components/submit_confirmation.html" import SubmitConfirmation %}
|
|
||||||
{% from "components/totals_box.html" import TotalsBox %}
|
|
||||||
|
|
||||||
{% extends 'portfolios/base.html' %}
|
{% extends 'portfolios/base.html' %}
|
||||||
|
|
||||||
{% block portfolio_content %}
|
{% block portfolio_content %}
|
||||||
{% set submit_modal_id = "submit-to-1" %}
|
|
||||||
{% call Modal(name=submit_modal_id) %}
|
{% call StickyCTA(text="Task order details") %}
|
||||||
{{
|
<a href="{{ url_for('task_orders.add_pdf', task_order_id=task_order.id) }}" class="usa-button usa-button-secondary" type="submit">Edit</a>
|
||||||
SubmitConfirmation(
|
|
||||||
modal_id=submit_modal_id,
|
|
||||||
submit_text="Confirm & Submit",
|
|
||||||
submit_action=url_for('task_orders.submit_task_order', task_order_id=task_order.id),
|
|
||||||
form=signature_form,
|
|
||||||
task_order=task_order,
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
|
|
||||||
{% call StickyCTA(text="Review Funding") %}
|
{% include "fragments/task_order_review.html" %}
|
||||||
<a href="{{ url_for("task_orders.add_pdf", task_order_id=task_order.id) }}" class="usa-button usa-button-secondary" type="submit">Edit</a>
|
|
||||||
<a v-on:click="openModal('submit-to-1')" class="usa-button usa-button-primary" type="submit">Submit task order</a>
|
|
||||||
{% endcall %}
|
|
||||||
|
|
||||||
<div class="task-order">
|
|
||||||
|
|
||||||
{{ SemiCollapsibleText() }}
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<div class="h1">
|
|
||||||
{{ "task_orders.review.review_your_task_order" | translate }}
|
|
||||||
</div>
|
|
||||||
<p>
|
|
||||||
{{ "task_orders.review.check_paragraph" | translate }}
|
|
||||||
</p>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col task-order__details">
|
|
||||||
<div class="h4">
|
|
||||||
{{ "task_orders.review.task_order_number" | translate }}
|
|
||||||
</div>
|
|
||||||
<div>{{task_order.number}}</div>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<div class="h3">
|
|
||||||
{{ "task_orders.review.funding_summary" | translate }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% for clin in task_order.clins %}
|
|
||||||
<div>
|
|
||||||
{{ "{}".format(clin.jedi_clin_type) | translate}}
|
|
||||||
</div>
|
|
||||||
<table class="fixed-table-wrapper">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>{{ "task_orders.review.clins.amount" | translate }}</th>
|
|
||||||
<th>{{ "task_orders.review.clins.obligated" | translate }}</th>
|
|
||||||
<th>{{ "task_orders.review.clins.pop_start" | translate }}</th>
|
|
||||||
<th>{{ "task_orders.review.clins.pop_end" | translate }}</th>
|
|
||||||
<th>{{ "task_orders.review.clins.loa" | translate }}</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>{{ clin.obligated_amount | dollars }}</td>
|
|
||||||
<td>
|
|
||||||
{% if clin.is_obligated() %}
|
|
||||||
{{ "common.yes" | translate }}
|
|
||||||
{% else %}
|
|
||||||
{{ "common.no" | translate }}
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
<td>{{ clin.start_date | formattedDate }}</td>
|
|
||||||
<td>{{ clin.end_date | formattedDate }}</td>
|
|
||||||
<td>
|
|
||||||
{% for loa in clin.loas %}
|
|
||||||
<span title='{{ loa }}'>
|
|
||||||
{{ loa }}
|
|
||||||
</span>
|
|
||||||
<br />
|
|
||||||
{% endfor %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<div class="h3">
|
|
||||||
{{ "task_orders.review.supporting_document.title" | translate }}
|
|
||||||
</div>
|
|
||||||
<div class="h4">
|
|
||||||
<a class="icon-link icon-link--download" href="{{ url_for('task_orders.download_task_order_pdf', task_order_id=task_order.id) }}">
|
|
||||||
{{ Icon('check-circle-solid') }}
|
|
||||||
{{ task_order.pdf.filename }}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{ TotalsBox(task_order=task_order) }}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
{% extends "task_orders/builder_base.html" %}
|
{% extends "task_orders/builder_base.html" %}
|
||||||
|
|
||||||
{% from "components/icon.html" import Icon %}
|
|
||||||
{% from "components/semi_collapsible_text.html" import SemiCollapsibleText %}
|
|
||||||
{% from "components/totals_box.html" import TotalsBox %}
|
|
||||||
|
|
||||||
{% set action = url_for('task_orders.confirm_signature', task_order_id=task_order_id) %}
|
{% set action = url_for('task_orders.confirm_signature', task_order_id=task_order_id) %}
|
||||||
{% set previous_button_link = url_for("task_orders.add_clins", task_order_id=task_order_id) %}
|
{% set previous_button_link = url_for("task_orders.add_clins", task_order_id=task_order_id) %}
|
||||||
|
|
||||||
@ -16,85 +12,5 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block to_builder_form_field %}
|
{% block to_builder_form_field %}
|
||||||
<div class="task-order">
|
{% include "fragments/task_order_review.html" %}
|
||||||
|
|
||||||
{{ SemiCollapsibleText() }}
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<div class="h1">
|
|
||||||
{{ "task_orders.review.review_your_task_order" | translate }}
|
|
||||||
</div>
|
|
||||||
<p>
|
|
||||||
{{ "task_orders.review.check_paragraph" | translate }}
|
|
||||||
</p>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col task-order__details">
|
|
||||||
<div class="h4">
|
|
||||||
{{ "task_orders.review.task_order_number" | translate }}
|
|
||||||
</div>
|
|
||||||
<div>{{task_order.number}}</div>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<div class="h3">
|
|
||||||
{{ "task_orders.review.funding_summary" | translate }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% for clin in task_order.clins %}
|
|
||||||
<div>
|
|
||||||
{{ "{}".format(clin.jedi_clin_type) | translate}}
|
|
||||||
</div>
|
|
||||||
<table class="fixed-table-wrapper">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>{{ "task_orders.review.clins.amount" | translate }}</th>
|
|
||||||
<th>{{ "task_orders.review.clins.obligated" | translate }}</th>
|
|
||||||
<th>{{ "task_orders.review.clins.pop_start" | translate }}</th>
|
|
||||||
<th>{{ "task_orders.review.clins.pop_end" | translate }}</th>
|
|
||||||
<th>{{ "task_orders.review.clins.loa" | translate }}</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>{{ clin.obligated_amount | dollars }}</td>
|
|
||||||
<td>
|
|
||||||
{% if clin.is_obligated() %}
|
|
||||||
{{ "common.yes" | translate }}
|
|
||||||
{% else %}
|
|
||||||
{{ "common.no" | translate }}
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
<td>{{ clin.start_date | formattedDate }}</td>
|
|
||||||
<td>{{ clin.end_date | formattedDate }}</td>
|
|
||||||
<td>
|
|
||||||
{% for loa in clin.loas %}
|
|
||||||
<span title='{{ loa }}'>
|
|
||||||
{{ loa }}
|
|
||||||
</span>
|
|
||||||
<br />
|
|
||||||
{% endfor %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<div class="h3">
|
|
||||||
{{ "task_orders.review.supporting_document.title" | translate }}
|
|
||||||
</div>
|
|
||||||
<div class="h4">
|
|
||||||
<a class="icon-link icon-link--download" href="{{ url_for('task_orders.download_task_order_pdf', task_order_id=task_order.id) }}">
|
|
||||||
{{ Icon('check-circle-solid') }}
|
|
||||||
{{ task_order.pdf.filename }}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{ TotalsBox(task_order=task_order) }}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user