aboutsummaryrefslogtreecommitdiff
path: root/src/templates/summary.html
diff options
context:
space:
mode:
Diffstat (limited to 'src/templates/summary.html')
-rw-r--r--src/templates/summary.html101
1 files changed, 69 insertions, 32 deletions
diff --git a/src/templates/summary.html b/src/templates/summary.html
index 5bf828e..bffd46b 100644
--- a/src/templates/summary.html
+++ b/src/templates/summary.html
@@ -9,37 +9,74 @@
<body>
<h1>{{name}}'s Budget</h1>
- <form method="post" action="/transaction">
- <input id="datePicker" name="when" placeholder="date" type="date">
- <input name="where" placeholder="where" type="text">
- <input name="amount" placeholder="amount" type="number" step="0.01">
- <input name="category" placeholder="category" type="text">
- <input name="subcategory" placeholder="tags (csv)" type="text">
- <input type="submit" value="Add">
- </form>
- <table>
- <tr>
- <th></th>
- <th>When</th>
- <th>Where</th>
- <th>Amount</th>
- <th>Category</th>
- <th>Tags</th>
- </tr>
- {{#each ledger}}
- <tr>
- <td>{{this.index}}</td>
- <td>{{this.when}}</td>
- <td>{{this.where}}</td>
- <td>{{this.amount}}</td>
- <td>{{this.category}}</td>
- <td>{{this.subcategory}}</td>
- </tr>
- {{/each}}
- </table>
- <script>
- document.getElementById('datePicker').value = new Date().toLocaleDateString();
- </script>
+ <div>
+ <a href="/ledger"><button>Ledger</button></a>
+ <a href="/summary"><button class="bold">Summary</button></a>
+ <a href="/goals"><button>Goals</button></a>
+ <a href="/expected"><button>Expected</button></a>
+ </div>
+
+ <div class="summary-panel">
+ <h2>Weekly</h2>
+ <table class="table">
+ <tr>
+ <th>Year</th>
+ <th>Week</th>
+ <th>In</th>
+ <th>Out</th>
+ <th>Net</th>
+ </tr>
+ {{#each week}}
+ <tr>
+ <td>{{this.y}}</td>
+ <td>{{this.w}}</td>
+ <td>{{this.in}}</td>
+ <td>{{this.out}}</td>
+ <td class="{{this.classes}}">{{this.net}}</td>
+ </tr>
+ {{/each}}
+ </table>
+ </div>
+ <div class="summary-panel">
+ <h2>Monthly</h2>
+ <table class="table">
+ <tr>
+ <th>Year</th>
+ <th>Month</th>
+ <th>In</th>
+ <th>Out</th>
+ <th>Net</th>
+ </tr>
+ {{#each month}}
+ <tr>
+ <td>{{this.y}}</td>
+ <td>{{this.m}}</td>
+ <td>{{this.in}}</td>
+ <td>{{this.out}}</td>
+ <td class="{{this.classes}}">{{this.net}}</td>
+ </tr>
+ {{/each}}
+ </table>
+ </div>
+ <div class="summary-panel">
+ <h2>Yearly</h2>
+ <table class="table">
+ <tr>
+ <th>Year</th>
+ <th>In</th>
+ <th>Out</th>
+ <th>Net</th>
+ </tr>
+ {{#each year}}
+ <tr>
+ <td>{{this.y}}</td>
+ <td>{{this.in}}</td>
+ <td>{{this.out}}</td>
+ <td class="{{this.classes}}">{{this.net}}</td>
+ </tr>
+ {{/each}}
+ </table>
+ </div>
</body>
-</html>
+</html> \ No newline at end of file