-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
527 lines (442 loc) · 21.1 KB
/
index.html
File metadata and controls
527 lines (442 loc) · 21.1 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
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Розрахунок</title>
<link rel="stylesheet" href="style.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
</head>
<body>
<nav class="navbar navbar-expand-lg bg-primary shadow-lg bg-body-rounded navbar-dark">
<div class="container-fluid">
<a class="navbar-brand text-white fw-bold" href="index.html">Розрахунок</a>
<button class="navbar-toggler border border-2 border-white border-opacity-50" type="button"
data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#" data-bs-toggle="modal"
data-bs-target="#exampleModalKnowledgeBase">База знань</a>
</li>
</ul>
<button type="button" class="btn btn-primary d-flex align-items-center gap-2" data-bs-toggle="modal"
data-bs-target="#exampleModal" data-bs-whatever="@mdo">
<i class="bi bi-graph-up"></i>
<h5 class="mb-0">Лінії часу</h5>
</button>
<button type="button" class="buttonIcons btn btn-primary d-flex align-items-center gap-2" data-bs-toggle="modal"
data-bs-target="#exampleModalSettings">
<i class="bi bi-gear ms-auto"></i>
<h5 class="mb-0">Налаштування</h5>
</button>
</div>
</div>
</nav>
<div class="modal fade baseModal" id="exampleModalKnowledgeBase" tabindex="-1" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="exampleModalLabel">База знань</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<h1 class="modalBase">Планувальник бюджету</h1>
<p>Ця програма допоможе вам створювати, аналізувати та порівнювати бюджети, обираючи найкращий фінансовий
план.</p>
<h2 class="modalBase">Основні можливості</h2>
<ul class="ulBase">
<li>Створення та порівняння альтернативних бюджетів.</li>
<li>Розрахунок доходів і витрат за один або кілька періодів.</li>
<li>Графічне відображення доходів/витрат у вигляді кругової діаграми.</li>
<li>Порівняння балансів двох планів по періодах.</li>
</ul>
<h2 class="modalBase">Визначення термінів</h2>
<p><span class="highlight">Період</span> – умовний відрізок часу, який користувач визначає сам (місяць,
тиждень, день).</p>
<p><span class="highlight">Лінія часу</span> – функціонал для розбивання суми грошей на періоди з можливістю
задавати вагу кожного періоду.</p>
<h2 class="modalBase">Приклади використання лінії часу</h2>
<div class="exampleBase">
<p><strong>Приклад 1:</strong> Оплата навчання раз на два місяці.</p>
<p>Період = місяць, ваги: <span class="highlight">1, 0</span>. Це означає, що в першому місяці потрібно
внести всю суму, а в другому – нічого.</p>
</div>
<div class="exampleBase">
<p><strong>Приклад 2:</strong> Погашення кредиту на 3 місяці (сума 3000 грн).</p>
<p>Встановлені ваги: <span class="highlight">1, 0, 2</span>.</p>
<p>Результат:</p>
<ul class="ulBase">
<li>1-й місяць – 1000 грн</li>
<li>2-й місяць – 0 грн</li>
<li>3-й місяць – 2000 грн</li>
</ul>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="exampleModalSettings" tabindex="-1" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="exampleModalLabel">Налаштування</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="flexCheckIncome" checked>
<label class="form-check-label" for="flexCheckChecked">
Дохід
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="flexCheckConsumption" checked>
<label class="form-check-label" for="flexCheckChecked">
Витрати
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="flexCheckComparison" checked>
<label class="form-check-label" for="flexCheckChecked">
Порівняння двох планів
</label>
</div>
<div class="mb-3">
<label for="numberOfPeriods" class="form-label">Кількість періодів</label>
<input type="number" class="form-control" id="numberOfPeriods" aria-describedby="emailHelp" min="1"
value="12" max="100">
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="flexCheckQuantity" checked min="">
<label class="form-check-label" for="flexCheckChecked">
Залишок класти на депозит
</label>
</div>
<div class="mb-3" id="deposit">
<div class="d-flex">
<input type="number" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" min="0"
value="0">
<span class="input-group-text">%</span>
</div>
</div>
<h6>Тип звіту</h6>
<div class="form-check">
<input class="form-check-input" type="radio" name="exampleRadios" id="exampleRadios1" value="option1">
<label class="form-check-label" for="exampleRadios1">
Простий
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="exampleRadios" id="exampleRadios2" value="option2"
checked>
<label class="form-check-label" for="exampleRadios2">
Розширений
</label>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" onclick="save()">Save</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="exampleModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1"
aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="exampleModalLabel">Лінії часу</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="d-flex justify-content-between p-2">
<button type="button" class="btn btn-primary" onclick="add()">Додати+</button>
</div>
<table class="shadow p-3 mb-5 bg-body-tertiary rounded">
<thead>
<tr>
<th>Назва</th>
<th>Кількість періодів</th>
<th>Вага</th>
<th>##</th>
</tr>
</thead>
<tbody id="tbody"></tbody>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<h2 class="plan">План А</h2>
<div class="tables">
<div class="tableIncomeBody" id="tableIncomeA">
<h3 class="incomeText">Дохід</h3>
<div class="checkboxAddText d-flex align-items-center">
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalDeleteInc"
id="deleteInc">Видалити все</button>
<div class="modal fade" id="exampleModalDeleteInc" tabindex="-1" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="exampleModalLabel">Видалити все</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" disabled></button>
</div>
<div class="modal-body">
Ви впевнені?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Ні</button>
<button type="button" class="btn btn-primary" data-bs-dismiss="modal" id="flexSwitchCheckIncome"
onclick="deleteIncome()">Так</button>
</div>
</div>
</div>
</div>
<div class="p-2">
<button type="button" class="btn btn-primary" onclick="addIncome()" id="addInc">Додати+</button>
</div>
</div>
<table class="shadow p-3 mb-5 bg-body-tertiary rounded" id="myTableInc">
<thead id="thead">
<tr>
<th>Назва</th>
<th>Ціна</th>
<th>Кількість</th>
<th></th>
<th>Сума</th>
<th>Лінії часу</th>
<th>##</th>
</tr>
</thead>
<tbody id="tableRowsInc">
</tbody>
</table>
</div>
<div class="tableConsumptionBody" id="tableConsumptionA">
<h3 class="consumptionText">Витрати</h3>
<div class="checkboxAddText d-flex align-items-center">
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalDelete"
id="deleteCons">Видалити все</button>
<div class="modal fade" id="exampleModalDelete" tabindex="-1" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="exampleModalLabel">Видалити все</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" disabled></button>
</div>
<div class="modal-body">
Ви впевнені?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Ні</button>
<button type="button" class="btn btn-primary" data-bs-dismiss="modal" id="flexSwitchCheckConsumption"
onclick="deleteConsumption()">Так</button>
</div>
</div>
</div>
</div>
<div class="p-2">
<button type="button" class="btn btn-primary" onclick="addConsumption()" id="addCons">Додати+</button>
</div>
</div>
<table class="shadow p-3 mb-5 bg-body-tertiary rounded" id="myTableCons">
<thead id="thead">
<tr>
<th>Назва</th>
<th>Ціна</th>
<th>Кількість</th>
<th></th>
<th>Сума</th>
<th>Лінії часу</th>
<th>##</th>
</tr>
</thead>
<tbody id="tableRowsCons">
</tbody>
</table>
</div>
</div>
<div class="planB" id="planB">
<h2 class="plan">План Б</h2>
<div class="tables">
<div class="tableIncomeBody" id="tableIncomeB">
<h3 class="incomeText flex-grow-1">Дохід</h3>
<div class="checkboxAddTextB d-flex align-items-center">
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalDeleteIncB"
id="deleteIncB">Видалити все</button>
<button type="button" class="btn btn-primary ms-2" data-bs-toggle="modal"
data-bs-target="#exampleModalCopyPlanA1" id="copyPlanIncome">Копіювати із Плану А</button>
<div class="modal fade" id="exampleModalDeleteIncB" tabindex="-1" aria-labelledby="exampleModalLabel1"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="exampleModalLabel1">Видалити все</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" disabled></button>
</div>
<div class="modal-body">
Ви впевнені?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Ні</button>
<button type="button" class="btn btn-primary" data-bs-dismiss="modal" id="flexSwitchCheckIncomeB"
onclick="deleteIncomeB()">Так</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="exampleModalCopyPlanA1" tabindex="-1" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="exampleModalLabel">Копіювати із Плану А</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
Ви впевнені?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Ні</button>
<button type="button" class="btn btn-primary" data-bs-dismiss="modal"
onclick="copyPlanAIncome()">Так</button>
</div>
</div>
</div>
</div>
<div class="p-2 ms-auto">
<button type="button" class="btn btn-primary" onclick="addIncomeB()" id="addIncB">Додати+</button>
</div>
</div>
<table class="shadow p-3 mb-5 bg-body-tertiary rounded" id="myTableInc">
<thead id="thead">
<tr>
<th>Назва</th>
<th>Ціна</th>
<th>Кількість</th>
<th></th>
<th>Сума</th>
<th>Лінії часу</th>
<th>##</th>
</tr>
</thead>
<tbody id="tableRowsIncB">
</tbody>
</table>
</div>
<div class="tableConsumptionBody" id="tableConsumptionB">
<h3 class="consumptionText flex-grow-1">Витрати</h3>
<div class="checkboxAddTextB d-flex align-items-center">
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalDeleteB"
id="deleteConsB">Видалити все</button>
<button type="button" class="btn btn-primary ms-2" data-bs-toggle="modal"
data-bs-target="#exampleModalCopyPlanA" id="copyPlanConsumption">Копіювати із Плану А</button>
<div class="modal fade" id="exampleModalDeleteB" tabindex="-1" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="exampleModalLabel">Видалити все</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" disabled></button>
</div>
<div class="modal-body">
Ви впевнені?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Ні</button>
<button type="button" class="btn btn-primary" data-bs-dismiss="modal" id="flexSwitchCheckConsumptionB"
onclick="deleteConsumptionB()">Так</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="exampleModalCopyPlanA" tabindex="-1" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="exampleModalLabel">Копіювати із Плану А</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
Ви впевнені?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Ні</button>
<button type="button" class="btn btn-primary" data-bs-dismiss="modal"
onclick="copyPlanAConsumption()">Так</button>
</div>
</div>
</div>
</div>
<div class="p-2 ms-auto">
<button type="button" class="btn btn-primary" onclick="addConsumptionB()" id="addConsB">Додати+</button>
</div>
</div>
<table class="shadow p-3 mb-5 bg-body-tertiary rounded" id="myTableCons">
<thead id="thead">
<tr>
<th>Назва</th>
<th>Ціна</th>
<th>Кількість</th>
<th></th>
<th>Сума</th>
<th>Лінії часу</th>
<th>##</th>
</tr>
</thead>
<tbody id="tableRowsConsB">
</tbody>
</table>
</div>
</div>
</div>
<div class="button">
<button type="button" class="btn btn-primary" onclick="calculation()" id="calculation">Розрахунок</button>
</div>
<div class="spinner" id="spinner"
style="display: flex; justify-content: center; align-items: center; margin-top: 58px;">$</div>
<table class="shadow p-3 mb-5 mt-10 bg-body-tertiary rounded table3 calcTable" id="tableCalculation">
<thead>
<tr id="calculationHead">
</tr>
</thead>
<tbody id="calculationBody">
</tbody>
</table>
<div id="canvas-wrapper" class="canvas-wrapper">
<div class="pies"></div>
</div>
<div class="centerdiagram">
<div id="divDiagram" class="canvas-diagram"></div>
</div>
<script src="row.js"></script>
<script src="rowTimeLines.js"></script>
<script src="tableTimeLines.js"></script>
<script src="table.js"></script>
<script src="script.js"></script>
<script src="calculation.js"></script>
<script src="chart.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"></script>
</body>
</html>