showing transactions, next step: CRUD

This commit is contained in:
2016-03-07 17:06:19 +01:00
parent fe18e91101
commit 56799eaefe
19 changed files with 3158 additions and 15 deletions
@@ -0,0 +1,40 @@
<div ng-init="initList()">
<div>
<div>
<form role="form" ng-submit="postTransaction()">
<div>
<input ng-model='amount' type='text' size='10' maxlength='10' />
</div>
<div>
<select ng-model='categorySelection' size='1' ng-options="category.name for category in categories track by category._links.self.href">
</select>
</div>
<div>
<input ng-model='date' type='text' size='10' maxlength='10' />
</div>
<div>
<input ng-model='description' type='text' size='10' maxlength='10' />
</div>
<div>
<input type="submit"/>
</div>
</form>
<table class="listing">
<tr>
<th>Datum</th>
<th>Kategorie</th>
<th>Betrag</th>
<th>Beschreibung</th>
</tr>
<tr ng-repeat="transaction in transactions" ng-click="showTransaction(transaction)" class="clickable">
<td>{{transaction.date | date:'dd.MM.yyyy'}}</td>
<td>{{transaction.category.name}}</td>
<td align="right" ng-class="{credit: transaction.creditor.name}">{{transaction.amount | number : 2}}&nbsp;&euro;</td>
<td>{{transaction.description}}</td>
</tr>
</table>
</div>
</div>
</div>