-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
170 lines (137 loc) · 4.68 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<!doctype html>
<html lang="pt-BR" data-ng-app="MyCash">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#40435B">
<title>Minha Grana</title>
<link rel="shortcut icon" href="/img/favicon.png">
<link rel="stylesheet" href="/css/normalize.css">
<link rel="stylesheet" href="/css/base.css">
<link rel="stylesheet" href="/css/grid.css">
<link rel="stylesheet" href="/css/form.css">
<link rel="stylesheet" href="/css/card.css">
<link rel="stylesheet" href="/css/pagination.css">
<link rel="stylesheet" href="/css/modifiers.css">
<script src="/lib/angular/angular.js"></script>
<script src="/lib/angular-locale-pt-br/angular-locale_pt-br.js"></script>
<script src="/lib/angularUtils-pagination/dirPagination.js"></script>
<script src="/js/app.js"></script>
<script src="/js/controllers/transaction.ctrl.js"></script>
<script src="/js/constants/config.const.js"></script>
</head>
<body>
<main class="middle full-width"
data-ng-controller="TransactionCtrl as vm">
<section class="card card--light sm-90 md-50 lg-40 center radius">
<form data-ng-submit="vm.saveTransaction(vm.transaction);">
<section class="card__header card__header--cover">
<h1 class="card__title" aria-label="Minha Grana">
<img class="sm-60 center"
src="/img/minha-grana-logo.svg" alt="Minha grana logo">
</h1>
<div class="row">
<div class="col sm-50">
<div class="radio radio--white inline-block">
<input id="sake" type="radio"
data-ng-model="vm.transaction.type"
checked
value="Saque">
<label class="text--white" for="sake">Saque</label>
</div>
<div class="radio radio--white inline-block">
<input id="deposit" type="radio"
data-ng-model="vm.transaction.type"
value="Depósito">
<label class="text--white" for="deposit">Depósito</label>
</div>
</div>
<div class="col sm-50">
<input class="input--white" id="value" type="number"
placeholder="Valor"
min="1"
max="{{ vm.transaction.type === 'Saque' ? vm.balance : '' }}"
step="0.01"
pattern="[0-9]+([\.,][0-9]+)?"
required
data-ng-model="vm.transaction.value">
</div>
</div>
<button class="button button--green button--fab card__fab"
aria-label="Adicionar transação">
<span>+</span>
</button>
</section>
</form>
<section class="card__body">
<p class="text--right">
Saldo
<span class="text--green">
{{ vm.balance | currency : 'R$ ' }}
</span>
</p>
<div class="radio inline-block">
<input id="filterAll" type="radio"
data-ng-model="vm.filterBy"
checked
value="">
<label for="filterAll">Todos</label>
</div>
<div class="radio inline-block">
<input id="filterBySake" type="radio"
data-ng-model="vm.filterBy"
value="Saque">
<label for="filterBySake">Saque</label>
</div>
<div class="radio inline-block">
<input id="filterByDeposit" type="radio"
data-ng-model="vm.filterBy"
value="Depósito">
<label for="filterByDeposit">Depósito</label>
</div>
<p class="text--center" data-ng-hide="vm.transactions.length">
Nenhuma transação
</p>
<table class="table" data-ng-show="vm.transactions.length">
<thead>
<tr>
<th>
<a class="link" href="" data-ng-click="vm.orderBy('type')">
Tipo
<img src="/img/sort-arrows.svg" alt="Ordenar por tipo">
</a>
</th>
<th class="text--right">
<a class="link" href="" data-ng-click="vm.orderBy('value')">
Valor
<img src="/img/sort-arrows.svg" alt="Ordenar por valor">
</a>
</th>
<th class="text--right">
Ações
</th>
</tr>
</thead>
<tbody>
<tr data-dir-paginate="transaction in vm.transactions | filter:vm.filterBy | itemsPerPage:5 | orderBy:vm.orderCriteria:vm.orderDirection">
<td>{{ ::transaction.type }}</td>
<td class="text--right">{{ ::transaction.value | currency : 'R$ ' }}</td>
<td class="text--right">
<a class="text--red link--special" href=""
data-ng-click="vm.deleteTransaction(transaction)">
Remover
</a>
</td>
</tr>
</tbody>
</table>
<dir-pagination-controls
data-max-size="5"
data-direction-links="true"
data-boundary-links="true">
</dir-pagination-controls>
</section>
</section>
</main>
</body>
</html>