Move requests & workspaces templates into directories

This commit is contained in:
Patrick Smith
2018-09-06 10:52:17 -04:00
parent 011a5371b5
commit 00e91ba789
18 changed files with 28 additions and 19 deletions

View File

@@ -0,0 +1,47 @@
{% extends "base.html" %}
{% block content %}
<div class="col">
{% include 'requests/menu.html' %}
{% block form_action %}
{% if request_id %}
<form method='POST' action="{{ url_for('requests.requests_form_update', screen=current, request_id=request_id) }}" autocomplete="off">
{% else %}
<form method='POST' action="{{ url_for('requests.requests_form_update', screen=current) }}" autocomplete="off">
{% endif %}
{% endblock %}
<div class="panel">
<div class="panel__heading">
<h1>New Request</h1>
<div class="subtitle">{% block subtitle %}{% endblock %}</div>
</div>
<div class="panel__content">
{{ f.csrf_token }}
{% block form %}
form goes here
{% endblock %}
</div>
</div>
{% block next %}
<div class='action-group'>
<input type='submit' class='usa-button usa-button-primary' value='Save & Continue' />
</div>
{% endblock %}
</form>
</div>
{% endblock %}

View File

@@ -0,0 +1,270 @@
{% extends "base.html" %}
{% from "components/icon.html" import Icon %}
{% from "components/alert.html" import Alert %}
{% block content %}
<article class='col col--grow request-approval'>
<form>
<section class='panel'>
<header class='panel__heading request-approval__heading'>
<h1 class='h2'>Request #1234567890</h1>
<span class='label label--info'>Pending</span>
</header>
<div class='panel__content'>
<p>Ongoing maintainence for Death Star (a moon-sized Imperial military battlestation armed with a planet-destroying superlaser). Its definitely hasn't been sabotaged from the start.</p>
{% with data = {
"primary_poc": {
"am_poc": False,
"dodid_poc": "1234567890",
"email_poc": "fake@email.com",
"fname_poc": "Amanda",
"lname_poc": "Adamson",
},
"details_of_use": {
"jedi_usage": "adf",
"start_date": "2018-08-08",
"cloud_native": "yes",
"dollar_value": 500000,
"dod_component": "Air Force, Department of the",
"data_transfers": "Less than 100GB",
"expected_completion_date": "Less than 1 month",
"jedi_migration": "yes",
"num_software_systems": 1,
"number_user_sessions": 2,
"average_daily_traffic": 1,
"engineering_assessment": "yes",
"technical_support_team": "yes",
"estimated_monthly_spend": 100,
"average_daily_traffic_gb": 4,
"rationalization_software_systems": "yes",
"organization_providing_assistance": "In-house staff",
},
"information_about_you": {
"citizenship": "United States",
"designation": "military",
"phone_number": "1234567890",
"email_request": "fake@email.mil",
"fname_request": "Amanda",
"lname_request": "Adamson",
"service_branch": "Air Force, Department of the",
"date_latest_training": "2018-08-06",
}
}, service_branches=service_branches %}
{% include "requests/_review.html" %}
{% endwith %}
</div>
</section>
<section class='panel'>
<header class='panel__heading'>
<h2 class='h3'>Approval Notes</h2>
</header>
<div class='panel__content'>
<div class="form__sub-fields">
<h3>Instructions for the Requestor</h3>
Provide instructions or notes for additional information that is necessary to approve the request here. The requestor may then re-submit the updated request or initiate contact outside of AT-AT if further discussion is required. <b>These notes will be visible to the person making the JEDI request</b>.
<div class='usa-input'>
<label for='notes'>Comments <em>(optional)</em></label>
<textarea id='notes' placeholder='Add notes or comments explaining what changes are being requested or why further discussion is needed about this request.'/></textarea>
</div>
</div>
<div class="form-row">
<div class="form-col">
<h3>Authorizing Officials</h3>
<p>This section is not visible to the person making the request. It is only viewable by CCPO staff.</p>
<p>Provide the name of the key officials for both parties that have authorized this request to move forward.</p>
</div>
</div>
<h4 class="h3">Mission Authorizing Official</h4>
<div class='form-row'>
<div class='form-col form-col--half'>
<div class='usa-input'>
<label for='mo-behalf-fname'>First Name</label>
<input id='mo-behalf-fname' type='text' placeholder='First name of mission authorizing official' />
</div>
</div>
<div class='form-col form-col--half'>
<div class='usa-input'>
<label for='mo-behalf-lname'>Last Name</label>
<input id='mo-behalf-lname' type='text' placeholder='Last name of mission authorizing official'/>
</div>
</div>
</div>
<div class='form-row'>
<div class='form-col form-col--half'>
<div class='usa-input'>
<label for='mo-behalf-email'>Mission Owner e-mail (optional)</label>
<input id='mo-behalf-email' type='email' placeholder='name@mail.mil'/>
</div>
</div>
<div class='form-col form-col--half'>
<div class='usa-input'>
<label for='mo-behalf-phone'>Mission Owner phone number (optional)</label>
<input id='mo-behalf-phone' type='tel' placeholder='(123) 456-7890'/>
</div>
</div>
</div>
<h4 class="h3">CCPO Authorizing Official</h4>
<div class='form-row'>
<div class='form-col form-col--half'>
<div class='usa-input'>
<label for='ccpo-behalf-fname'>First Name</label>
<input id='ccpo-behalf-fname' type='text' placeholder='First name of CCPO authorizing official' />
</div>
</div>
<div class='form-col form-col--half'>
<div class='usa-input'>
<label for='ccpo-behalf-lname'>Last Name</label>
<input id='ccpo-behalf-lname' type='text' placeholder='Last name of CCPO authorizing official'/>
</div>
</div>
</div>
<h4 class="h3">CCPO Internal Notes</h4>
<p>You may add additional comments and notes for internal CCPO reference and follow-up here.</p>
<div class='form-row'>
<div class='form-col'>
<div class='usa-input'>
<label for='notes'>Internal Comments <em>(optional)</em></label>
<textarea id='notes' placeholder='Add notes or comments for internal CCPO reference.'/></textarea>
</div>
</div>
</div>
</div>
</section>
<section class='action-group'>
<a href='#' class='usa-button usa-button-big'>Approve Request</a>
<a href='#' class='usa-button usa-button-big usa-button-secondary'>Mark as Changes Requested</a>
<a href='#' class='icon-link'>
{{ Icon('x') }}
<span>Cancel</span>
</a>
</section>
<section class='panel'>
<header class='panel__heading'>
<h2 class='h3 request-approval__columns__heading'>Approval Log</h2>
</header>
<div>
<div class='approval-log'>
<ol>
<li>
<article class='approval-log__log-item'>
<div>
<h3 class='approval-log__log-item__header'>Denied by Darth Vader</h3>
<p>"You have failed me for the last time, Admiral. Captain Piett. Yes, my lord. Make ready to land out troops beyond the energy shield and deploy the fleet so that nothing gets off that system."</p>
<div class='approval-log__behalfs'>
<div class='approval-log__behalf'>
<h3 class='approval-log__log-item__header'>Mission Owner approval on behalf of:</h3>
<span>Grand Moff Tarkin</span>
<span>tarkin@empire.mil</span>
<span>(234) 567-8901</span>
</div>
<div class='approval-log__behalf'>
<h3 class='approval-log__log-item__header'>CCPO approval on behalf of:</h3>
<span>Emperor Palpatine</span>
<span>palpatine@empire.mil</span>
<span>(345) 678-9012</span>
</div>
</div>
</div>
<footer class='approval-log__log-item__timestamp'><time datetime='2018-07-02 04:23:02 EST'>2018-07-02 04:23:02 EST</time></footer>
</article>
</li>
<li>
<article class='approval-log__log-item'>
<div>
<h3 class='approval-log__log-item__header'>Denied by Darth Vader</h3>
<p>"You have failed me for the last time, Admiral. Captain Piett. Yes, my lord. Make ready to land out troops beyond the energy shield and deploy the fleet so that nothing gets off that system."</p>
<div class='approval-log__behalfs'>
<div class='approval-log__behalf'>
<h3 class='approval-log__log-item__header'>Mission Owner approval on behalf of:</h3>
<span>Grand Moff Tarkin</span>
<span>tarkin@empire.mil</span>
<span>(234) 567-8901</span>
</div>
<div class='approval-log__behalf'>
<h3 class='approval-log__log-item__header'>CCPO approval on behalf of:</h3>
<span>Emperor Palpatine</span>
<span>palpatine@empire.mil</span>
<span>(345) 678-9012</span>
</div>
</div>
</div>
<footer class='approval-log__log-item__timestamp'><time datetime='2018-07-02 04:23:02 EST'>2018-07-02 04:23:02 EST</time></footer>
</article>
</li>
</ol>
</div>
</div>
</section>
</form>
</article>
{% endblock %}

View File

@@ -0,0 +1,147 @@
{% extends "base.html" %}
{% from "components/alert.html" import Alert %}
{% from "components/modal.html" import Modal %}
{% from "components/empty_state.html" import EmptyState %}
{% block content %}
{% call Modal(name='pendingFinancialVerification', dismissable=True) %}
<h1>Request submitted!</h1>
{% include 'fragments/pending_financial_verification.html' %}
<div class='action-group'>
<a v-on:click="closeModal('pendingFinancialVerification')" class='action-group__action usa-button'>Close</a>
</div>
{% endcall %}
{% call Modal(name='pendingCCPOApproval', dismissable=True) %}
{% include 'fragments/pending_ccpo_approval_modal.html' %}
<div class='action-group'>
<a v-on:click="closeModal('pendingCCPOApproval')" class='action-group__action usa-button'>Close</a>
</div>
{% endcall %}
{% if num_action_required %}
{% set title -%}
Action required on {{ num_action_required }} requests.
{%- endset %}
{{ Alert (title)}}
{% endif %}
{% if not requests %}
{{ EmptyState(
'You currently have no JEDI workspaces.',
sub_message='A JEDI Workspace is where you manage your projects and control user access to those projects.',
action_label='Create a new JEDI Cloud Request',
action_href=url_for('requests.requests_form_new', screen=1),
icon='document'
) }}
{% else %}
{% if pending_financial_verification %}
{{ Alert('Pending Financial Verification', fragment="fragments/pending_financial_verification.html") }}
{% endif %}
{% if pending_ccpo_approval %}
{{ Alert('Request submitted. Approval pending.', fragment="fragments/pending_ccpo_approval_alert.html") }}
{% endif %}
{% if extended_view %}
<div class="row kpi">
<div class="kpi__item col col--grow">
<div class="kpi__item__value">{{ kpi_inprogress }}</div>
<div class="kpi__item__description">In Progress</div>
</div>
<div class="kpi__item col col--grow">
<div class="kpi__item__value">{{ kpi_pending }}</div>
<div class="kpi__item__description">Pending CCPO Action</div>
</div>
<div class="kpi__item col col--grow">
<div class="kpi__item__value">{{ kpi_completed }}</div>
<div class="kpi__item__description">Completed (Overall)</div>
</div>
</div>
{% endif %}
<div class="col col--grow">
{% if extended_view %}
<form class='search-bar'>
<div class='usa-input search-input'>
<label for='requests-search'>Search requests by Order ID</label>
<input type='search' id='requests-search' name='requests-search' placeholder="Search by Order ID"/>
<button type="submit">
<span class="hide">Search</span>
</button>
</div>
<div class='usa-input'>
<label for='filter-status'>Filter requests by status</label>
<select id="filter-status" name="filter-status">
<option value="" selected disabled>Filter by status</option>
<option value="">Active</option>
<option value="">Pending</option>
<option value="">Denied</option>
</select>
</div>
</form>
{% endif %}
<div class='responsive-table-wrapper'>
<table>
<thead>
<tr>
<th scope="col">JEDI Cloud Request ID</th>
<th scope="col">Date Request Submitted</th>
{% if extended_view %}
<th scope="col">Requester</th>
<th scope="col">Reason Flagged</th>
{% endif %}
<th scope="col">Projected Annual Usage ($)</th>
<th scope="col">Request Status</th>
</tr>
</thead>
<tbody>
{% for r in requests %}
<tr>
<th scope="row">
<a class='icon-link icon-link--large' href="{{ r['edit_link'] }}">{{ r['order_id'] }}</a>
{% if r.action_required %}<span class="label label--info">Action Required</span>{% endif %}
</th>
<td>{{ r.last_submission_timestamp }}</td>
{% if extended_view %}
<td>{{ r['full_name'] }}</td>
<td></td>
{% endif %}
<td>{{ r['annual_usage'] | dollars }}</td>
<td>
{% if r.status == 'Approved' %}
<a href="{{ url_for('workspaces.workspace_projects', workspace_id=r.workspace_id) }}">
{{ r.status }}
</a>
{% else %}
{{ r.status }}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endif %}
{% endblock %}

View File

@@ -1,4 +1,4 @@
{% extends 'requests_new.html' %}
{% extends 'requests/_new.html' %}
{% from "components/alert.html" import Alert %}
{% from "components/text_input.html" import TextInput %}

View File

@@ -1,4 +1,4 @@
{% extends 'requests_new.html' %}
{% extends 'requests/_new.html' %}
{% from "components/alert.html" import Alert %}
{% from "components/text_input.html" import TextInput %}

View File

@@ -1,4 +1,4 @@
{% extends 'requests_new.html' %}
{% extends 'requests/_new.html' %}
{% from "components/alert.html" import Alert %}
{% from "components/text_input.html" import TextInput %}

View File

@@ -2,7 +2,7 @@
<span class='label label--error'>Response Required</span>
{%- endmacro %}
{% extends 'requests_new.html' %}
{% extends 'requests/_new.html' %}
{% from "components/alert.html" import Alert %}
{% from "components/text_input.html" import TextInput %}