-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
248 lines (223 loc) · 8.84 KB
/
Copy pathindex.html
File metadata and controls
248 lines (223 loc) · 8.84 KB
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
{% extends 'layout.html' %}
{% block content %}
<header>
<hgroup class="container hero">
<h1>Pynance Parser</h1>
<p>Manage Bankaccounts like a Boss !</p>
</hgroup>
</header>
<main class="container">
<section>
<p>
Importiere neue Kontoumsätze oder wähle die Übersicht aus, an der du weiterarbeiten möchtest.
</p>
</section>
<section class="grid m-12 l-6-6 xxl-8-4 margin">
<article>
<header>
<strong>Konten</strong>
</header>
<div class="grid m-6-6 xxl-6-6 margin">
{% if ibans %}
{% for iban in ibans %}
<button class="outline contrast" data-target="add-iban" data-iban="{{iban}}" onclick="toggleModal(event)">📔 {{iban}}</button>
{% endfor %}
{% endif %}
<button class="outline" data-target="add-iban" onclick="toggleModal(event)"><b>+</b></button>
</div>
</article>
<article>
<header>
<strong>Gruppen</strong>
</header>
<div class="grid m-6-6 xl-12 margin">
{% if groups %}
{% for group in groups %}
<button class="outline contrast" data-target="add-group" data-group="{{group}}" onclick="toggleModal(event)">📚 {{group}}</button>
{% endfor %}
{% endif %}
{% if ibans %}
<button class="outline" data-target="add-group" onclick="toggleModal(event)"><b>+</b></button>
{% else %}
<small><i>Es existiert noch kein Konto für eine Gruppe.</i></small>
{% endif %}
</div>
</article>
</section>
<section>
<p>Das Konto wird bei einem Import automatisch erstellt.</p>
<p><a href="/logout" role="button" class="secondary margin-top">Logout</a></p>
</section>
</main>
<footer>
<section class="bottom-fixed right">
<button class="secondary outline" data-target="settings-popup" onclick="toggleModal(event)">⚙️</button>
</section>
</footer>
<!-- PopUps -->
<dialog id="add-iban">
<article>
<header>
<button aria-label="Close" rel="prev" data-target="add-iban" onclick="toggleModal(event)"></button>
<h2>Konten verwalten</h2>
</header>
<p>Importiere Kontoumsätze in folgendem Konto:</p>
<div role="group">
<input type="text" name="iban-input" id="iban-input" placeholder="DE XXXXXXXXXXXXX" list="iban-list"
oninput="this.value = this.value.replace(/\s+/g, '')">
<datalist id="iban-list">
{% for iban in ibans %}
<option value="{{iban}}"></option>
{% endfor %}
</datalist>
<button class="outline delete" onclick="deleteDB()">Löschen</button>
</div>
<p id="iban-stats">
Aktuell <b>? Transaktionen</b> im Zeitraum vom <b>?</b> bis zum <b>?</b>.
</p>
<p>
<select id="bank-type">
<option value="Generic">Standardimport</option>
<option>Comdirect</option>
<option>Commerzbank</option>
<option>Volksbank Mittelhessen</option>
</select>
<small>
Nicht ünterstützte Banken können als CSV mit
<span class="long-tooltip" data-tooltip="Spalten: Buchungstag, Valuta, Art, Buchungstext, Betrag, Währung, Gegenkonto (optional) | Trenner ';'">
vorgegebenem Format
</span>
Über den Standardimport eingelesen werden.
</small>
</p>
<div role="group">
<div id="file-drop-area">
<span id="file-label">PDF / CSV / HTML</span>
<input type="file" id="file-input" name="file-input" accept=".csv,.pdf,.html" multiple style="display: none;">
</div>
<button onclick="uploadIban()" class="contrast">Import</button>
</div>
<details>
<summary>
Transaktionen neu parsen.
</summary>
<p>
Aller Transaktionen dieser IBAN werden mit den aktuellen Parsing-Mustern eingelesen und <i>(nur)</i> die Ergebnisse des Parsings überschrieben.
</p>
<p class="center">
<a role="button" class="delete outline" href="javascript:reParse()">Erneut parsen</a>
</p>
</details>
<footer>
<a role="button" href="">Öffnen</a>
</footer>
</article>
</dialog>
<dialog id="upload-list">
<article>
<header>
<button aria-label="Close" rel="prev" data-target="upload-list" onclick="toggleModal(event)"></button>
<h2>Import</h2>
</header>
<table>
</table>
<footer>
<a role="button" href="">Öffnen</a>
</footer>
</article>
</dialog>
<dialog id="reparse-iban">
<article>
<header>
<button aria-label="Close" rel="prev" data-target="upload-list" onclick="toggleModal(event)"></button>
<h2>Erneutes Parsing</h2>
</header>
<p>Geänderte Datensätze: <span>0</span></p>
<p><progress value="0" max="1" /></p>
<footer>
<a role="button" class="primary" href="/">OK</a>
</footer>
</article>
</dialog>
<dialog id="add-group">
<article>
<header>
<button aria-label="Close" rel="prev" data-target="add-group" onclick="toggleModal(event)"></button>
<h2>Gruppen verwalten</h2>
</header>
<p>Du kannst eine Gruppe hier ohne Änderungen öffnen, sie löschen, oder neue Konten zuordnen.</p>
<fieldset>
{% for iban in ibans %}
<label>
<input type="checkbox" name="iban-checkbox" role="switch" value="{{iban}}">
{{iban}}
</label>
{% endfor %}
</fieldset>
<div role="group">
<input type="text" name="group-input" id="group-input" placeholder="Gruppenname" list="group-list">
<datalist id="group-list">
{% for group in groups %}
<option value="{{group}}"></option>
{% endfor %}
</datalist>
<button class="delete outline" onclick="deleteDB(true)">Löschen</button>
</div>
<footer>
<button onclick="saveGroup()">Speichern</button>
<a role="button" href="" class="contrast">Öffnen</a>
</footer>
</article>
</dialog>
<dialog id="settings-popup">
<article>
<header>
<button aria-label="Close" rel="prev" data-target='settings-popup' onclick="toggleModal(event)"></button>
<h2>Settings</h2>
</header>
<p>Einstellungen können hier als <kbd>json</kbd> Datei hochgeladen oder über ein Eingabefeld geändert werden.</p>
<details>
<summary>
Import einer Datei in die Datenbank:
</summary>
<p>
<select id="settings-type">
<option value="rule">Regel</option>
<option value="parser">Parsing-Anweisung</option>
<option value="config">Einstellungen</option>
</select>
</p>
<div role="group">
<div id="settings-drop-area">
<span id="settings-label">.json</span>
<input type="file" id="settings-input" name="settings-input" accept=".json" style="display: none;">
</div>
<button onclick="importSettings()">Importieren</button>
</div>
<small>Diese Datei kann auch im Server-Backend abgelegt werden, um für alle verfügbar zu sein.</small>
</details>
<details>
<summary>
Abfragen oder Editieren von Werten:
</summary>
<p>
<select id="read-setting">
{% for m in meta %}
<option value="{{m.uuid}}">{{m.metatype}} "{{m.name}}" ({{m.uuid}})</option>
{% endfor %}
</select>
<textarea id="set-setting" placeholder="Setting Wert" rows="10" cols="15"></textarea>
</p>
<p>
<small>Settings ohne <i>uuid</i> werden als neuer Eintrag erstellt.</small>
</p>
<footer dir="rtl">
<button class="secondary" onclick="loadSetting()">Laden</button>
<button onclick="saveSetting()">Speichern</button>
<button class="delete" onclick="deleteSetting()">Löschen</button>
</footer>
</details>
</article>
</dialog>
<script src="{{ url_for('static', filename='js/index.js') }}"></script>
{% endblock %}