-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain-HTML.html
147 lines (129 loc) · 6.42 KB
/
main-HTML.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
<!doctype html>
<html lang="ru">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<!-- Bootstrap CSS -->
<?!= include("bootstrap-css") ?>
<?!= include("css/css") ?>
<?!= include("bootstrap-script") ?>
</head>
<body>
<header id="header">
<nav class="navbar navbar-expand-lg navbar-dark bg-gradient-danger bg-danger sticky-top" role="navigation">
<div class="container-fluid">
<a href="#" class="navbar-brand" id="nav-brand-tab">FRIEDMAN</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navContent"
aria-controls="navContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navContent">
<ul class="nav navbar-nav mr-auto mb-3 mb-lg-0">
<li class="nav-item">
<a class="nav-link" href="#" id="nav-newproekt-tab" data-bs-toggle="tab" data-bs-target="#nav-newproekt"
type="button" role="tab" aria-controls="nav-newproekt" aria-selected="true">Внесення нового проєкту</a>
</li>
<li class="nav-item">
<a class="nav-link" id="nav-arriwalwaste-tab" data-bs-toggle="tab" data-bs-target="#nav-arriwalwaste"
type="button" role="tab" aria-controls="nav-arriwalwaste" aria-selected="true">Прихід-витрати</a>
</li>
<li class="nav-item active">
<a class="nav-link active" id="nav-buhgalter-tab" data-bs-toggle="tab" data-bs-target="#nav-buhgalter"
type="button" role="tab" aria-controls="nav-buhgalter" aria-selected="true">BUHGALTER</a>
</li>
<li class="nav-item">
<a class="nav-link" id="nav-fin-tab" data-bs-toggle="tab" data-bs-target="#nav-fin" type="button"
role="tab" aria-controls="nav-fin" aria-selected="true">Фінансы</a>
</li>
<li class="nav-item">
<a class="nav-link" id="nav-reestr-tab" data-bs-toggle="tab" data-bs-target="#nav-reestr" type="button"
role="tab" aria-controls="nav-reestr" aria-selected="true">тРеєстр</a>
</li>
<li class="nav-item">
<a class="nav-link" id="nav-job-tab" data-bs-toggle="tab" data-bs-target="#nav-job" type="button"
role="tab" aria-controls="nav-job" aria-selected="true">job</a>
</li>
</ul>
<div class="text-light position-absolute end-0 translate-middle-y top-50">
<div><input type="date" class="bg-danger form-control" id="calendar"></div>
</div>
<div id='nav_finance_data' class="text-light position-absolute end-0 p-5 translate-middle-y top-50">
<div class="nav-maim-data-date d-flex justify-content-center"></div>
<div class="nav-maim-data-time d-flex justify-content-center"></div>
</div>
</div>
</nav>
<header>
<div class="tab-content" id="nav-tabContent">
<div class="tab-pane fade" id="nav-newproekt" role="tabpanel" aria-labelledby="nav-newproekt-tab">
<?!= loadNewProektView() ?>
</div>
<div class="tab-pane fade" id="nav-arriwalwaste" role="tabpanel" aria-labelledby="nav-arriwalwaste-tab">
<?!= loadArriwalWasteView() ?>
</div>
<div class="tab-pane active" id="nav-buhgalter" role="tabpanel" aria-labelledby="nav-buhgalter-tab">
<?!= loadBuhgalterView() ?>
</div>
<div class="tab-pane fade" id="nav-fin" role="tabpanel" aria-labelledby="nav-fin-tab">
<?!= loadTableFinanceView() ?>
</div>
<div class="tab-pane fade" id="nav-reestr" role="tabpanel" aria-labelledby="nav-reestr-tab">
<?!= loadTableReestrView() ?>
</div>
<div class="tab-pane fade" id="nav-job" role="tabpanel" aria-labelledby="nav-job-tab">
<?!= loadTableJobView() ?>
</div>
</div>
<div id="app"></div>
<?!= include("arriwalwaste/arrivalWaste-script") ?>
<?!= include("newproekt/newProekt-script") ?>
<?!= include("finance/finance-script") ?>
<?!= include("reestr/tableReestr-script") ?>
<?!= include("job/job-script") ?>
<?!= include("snippets") ?>
<script>
"use strict";
window.onload = function () {
lastPageOnReload();
ifLastBuc();
startTableNewProekt();
startTableReestr();
startTableFinance();
startArrivalWaste();
}
// функция, которая при перезагрузке открывает последнюю просмотренную страницу
function lastPageOnReload() {
const elem = $('.nav-link').click(function () {
sessionStorage.setItem('idElemNavLink', this.id);
});
const getItemStorage = sessionStorage.getItem('idElemNavLink');
if (getItemStorage) {
$(`#${getItemStorage}`)[0].click();
} else {
$('#nav-buhgalter-tab')[0].click();
}
}
// функция, которая проверяет, если последняя сраница была Бухгалтер, запускает последнюю нажатую кнопку
function ifLastBuc() {
//if(sessionStorage.getItem('idElemNavLink') === 'nav-buhgalter-tab') {
$(sessionStorage.getItem('buttonsBuhLiButton')).click();
// все кнопки с бухгалтера enabled
document.querySelectorAll(".btn-buh").forEach(btn => btn.disabled = false);
// }
}
// имитация клика на Бренд
document.getElementById("nav-brand-tab").addEventListener("click", () =>
document.getElementById("nav-buhgalter-tab").click());
// вставка дати на головну
(function addDate() {
document.querySelector('.nav-maim-data-date').innerText = formatDateTime(new Date(), `dd.mm.yyyy`);
document.querySelector('.nav-maim-data-time').innerText = formatDateTime(new Date(), `hh:mm`);
setTimeout(addDate, 30000);
})();
// Імітація кліка на календар
/* document.getElementById("nav_finance_data").addEventListener("click", () =>
document.getElementById("calendar").click());
*/
</script>
</body>
</html>