All mock reporting data was moved to a JSON file. The concept of what JEDI CLIN a particular environment drew money from was added to the data. This change had a cascade effect to the reporting class methods, templates, and Vue components that ingested that reporting data. Many of these files were modified to adapt to these changes. This also included modifying the obligated funding bar graphs to reflect new design changes.
82 lines
3.6 KiB
HTML
82 lines
3.6 KiB
HTML
{% from "components/empty_state.html" import EmptyState %}
|
|
{% from "components/icon.html" import Icon %}
|
|
|
|
<div>
|
|
<h2>Funds Expended per Application and Environment</h2>
|
|
{% set current_month_index = current_month.strftime('%m/%Y') %}
|
|
{% set prev_month_index = prev_month.strftime('%m/%Y') %}
|
|
|
|
{% if not portfolio.applications %}
|
|
|
|
{% set can_create_applications = user_can(permissions.CREATE_APPLICATION) %}
|
|
{% set message = ('portfolios.reports.empty_state.sub_message.can_create_applications' | translate)
|
|
if can_create_applications
|
|
else ('portfolios.reports.empty_state.sub_message.cannot_create_applications' | translate)
|
|
%}
|
|
|
|
{{ EmptyState(
|
|
header='portfolios.reports.empty_state.message' | translate,
|
|
message=message,
|
|
button_text="portfolios.applications.empty_state.button_text"|translate,
|
|
button_link=url_for("applications.view_new_application_step_1", portfolio_id=portfolio.id),
|
|
view_only_text="portfolios.applications.empty_state.view_only_text"|translate,
|
|
user_can_create=can_create_applications,
|
|
) }}
|
|
|
|
{% else %}
|
|
<spend-table v-bind:applications='{{ monthly_spending | tojson }}' inline-template>
|
|
<div class="responsive-table-wrapper">
|
|
<table class="atat-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Applications and Environments</th>
|
|
<th class="table-cell--align-right">Current Month</th>
|
|
<th class="table-cell--align-right">Last Month</th>
|
|
<th class="table-cell--align-right">Total Spent</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<template v-for='(application, applicationIndex) in applicationsState'>
|
|
<tr>
|
|
<td>
|
|
<button v-on:click='toggle($event, applicationIndex)' class='icon-link icon-link--large'>
|
|
<span v-html='application.name'></span>
|
|
<template v-if='application.isVisible'>{{ Icon('caret_down') }}</template>
|
|
<template v-else>{{ Icon('caret_up') }}</template>
|
|
</button>
|
|
</td>
|
|
<td class="table-cell--align-right">
|
|
<span v-html='formatDollars(application.this_month || 0)'></span>
|
|
</td>
|
|
<td class="table-cell--align-right">
|
|
<span v-html='formatDollars(application.last_month || 0)'></span>
|
|
</td>
|
|
<td class="table-cell--align-right">
|
|
<span v-html='formatDollars(application.total)'></span>
|
|
</td>
|
|
</tr>
|
|
<tr
|
|
v-show='application.isVisible'
|
|
v-for='(environment, index) in application.environments'
|
|
v-bind:class="[ index == application.environments.length -1 ? 'reporting-spend-table__env-row--last' : '']"
|
|
>
|
|
<td>
|
|
<span class="reporting-spend-table__env-row-label" v-html='environment.name'></span>
|
|
</td>
|
|
<td class="table-cell--align-right">
|
|
<span v-html='formatDollars(environment.this_month || 0)'></span>
|
|
</td>
|
|
<td class="table-cell--align-right">
|
|
<span v-html='formatDollars(environment.last_month || 0)'></span>
|
|
</td>
|
|
<td class="table-cell--align-right">
|
|
<span v-html='formatDollars(environment.total)'></span>
|
|
</td>
|
|
</tr>
|
|
</template>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</spend-table>
|
|
{% endif %}
|
|
</div> |