html and js for monthly budget summary
This commit is contained in:
parent
c34815f23e
commit
34b8368e9b
2 changed files with 57 additions and 0 deletions
10
app/static/monthly_budget_summary.js
Normal file
10
app/static/monthly_budget_summary.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
const monthSelector = document.getElementById('month-selector');
|
||||
const tableBody = document.getElementById('table-body');
|
||||
|
||||
|
||||
document.addEventListener("DOMContentLoaded", (event) => {
|
||||
displayMonthLineItems(monthSelector.value);
|
||||
monthSelector.addEventListener('change', (e) => {
|
||||
displayMonthLineItems(e.target.value);
|
||||
})
|
||||
});
|
||||
47
app/templates/monthly_budget_summary.html
Normal file
47
app/templates/monthly_budget_summary.html
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{% extends 'base.html' %}
|
||||
{% block title %}Monthly Budget Summary{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<main>
|
||||
<div class="container mt-5">
|
||||
<div class="card">
|
||||
<div class="card-header bg-primary text-white">
|
||||
Monthly Budget Summary
|
||||
<br/>
|
||||
<label for="month-selector">Choose a month:</label>
|
||||
|
||||
<select name="month-selector" id="month-selector">
|
||||
{% for month in all_months %}
|
||||
<option value="{{month}}">{{month}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">ID</th>
|
||||
<th scope="col">Parent LineItem ID</th>
|
||||
<th scope="col">Amount</th>
|
||||
<th scope="col">Currency Type</th>
|
||||
<th scope="col">Vendor</th>
|
||||
<th scope="col">Date</th>
|
||||
<th scope="col">Confirmation Code</th>
|
||||
<th scope="col">Note</th>
|
||||
<th scope="col">Reassign Vendor</th>
|
||||
<th scope="col">Split Line?</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="table-body">
|
||||
<tr><td>Loading...</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<script src="{{url_for('.static', filename='monthly_budget_summary.js')}}"></script>
|
||||
|
||||
{% endblock content %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue