1 | <!DOCTYPE html>
|
---|
2 | <html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
---|
3 | <head>
|
---|
4 | <meta charset="utf-8">
|
---|
5 | <meta name="viewport" content="width=device-width, initial-scale=1">
|
---|
6 |
|
---|
7 | <title>Laravel</title>
|
---|
8 |
|
---|
9 | <!-- Fonts -->
|
---|
10 | <link rel="preconnect" href="https://fonts.bunny.net">
|
---|
11 | <link href="https://fonts.bunny.net/css?family=figtree:400,600&display=swap" rel="stylesheet"/>
|
---|
12 |
|
---|
13 | <!-- Styles -->
|
---|
14 | <style>
|
---|
15 | @import url('https://fonts.googleapis.com/css?family=Karla:400,700&display=swap');
|
---|
16 |
|
---|
17 | .font-family-karla {
|
---|
18 | font-family: karla;
|
---|
19 | }
|
---|
20 |
|
---|
21 | .bg-sidebar {
|
---|
22 | background: #3d68ff;
|
---|
23 | }
|
---|
24 |
|
---|
25 | .cta-btn {
|
---|
26 | color: #3d68ff;
|
---|
27 | }
|
---|
28 |
|
---|
29 | .upgrade-btn {
|
---|
30 | background: #1947ee;
|
---|
31 | }
|
---|
32 |
|
---|
33 | .upgrade-btn:hover {
|
---|
34 | background: #0038fd;
|
---|
35 | }
|
---|
36 |
|
---|
37 | .active-nav-link {
|
---|
38 | background: #1947ee;
|
---|
39 | }
|
---|
40 |
|
---|
41 | .nav-item:hover {
|
---|
42 | background: #1947ee;
|
---|
43 | }
|
---|
44 |
|
---|
45 | .account-link:hover {
|
---|
46 | background: #3d68ff;
|
---|
47 | }
|
---|
48 | /* styles.css */
|
---|
49 | #clickableTable tr {
|
---|
50 | cursor: pointer;
|
---|
51 | transition: background-color 0.2s ease;
|
---|
52 | }
|
---|
53 |
|
---|
54 | #clickableTable tr:hover {
|
---|
55 | background-color: #d7d4d4;
|
---|
56 | }
|
---|
57 | /* styles.css */
|
---|
58 | body {
|
---|
59 | font-family: Arial, sans-serif;
|
---|
60 | background-color: #f4f4f4;
|
---|
61 | margin: 0;
|
---|
62 | padding: 0;
|
---|
63 | display: flex;
|
---|
64 | justify-content: center;
|
---|
65 | align-items: center;
|
---|
66 | height: 100vh;
|
---|
67 | }
|
---|
68 |
|
---|
69 | .employee-details {
|
---|
70 | background: white;
|
---|
71 | padding: 20px;
|
---|
72 | border-radius: 8px;
|
---|
73 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
---|
74 | max-width: 800px;
|
---|
75 | width: 100%;
|
---|
76 | text-align: left;
|
---|
77 | }
|
---|
78 |
|
---|
79 | .employee-card {
|
---|
80 | display: flex;
|
---|
81 | align-items: center;
|
---|
82 | gap: 20px;
|
---|
83 | }
|
---|
84 |
|
---|
85 | .employee-photo img {
|
---|
86 | border-radius: 50%;
|
---|
87 | width: 150px;
|
---|
88 | height: 150px;
|
---|
89 | object-fit: cover;
|
---|
90 | }
|
---|
91 |
|
---|
92 | .employee-info p {
|
---|
93 | margin: 8px 0;
|
---|
94 | }
|
---|
95 |
|
---|
96 | .employee-info p strong {
|
---|
97 | display: inline-block;
|
---|
98 | width: 150px;
|
---|
99 | }
|
---|
100 |
|
---|
101 | .back-button {
|
---|
102 | display: inline-block;
|
---|
103 | margin-top: 20px;
|
---|
104 | padding: 10px 15px;
|
---|
105 | background-color: #007bff;
|
---|
106 | color: white;
|
---|
107 | text-decoration: none;
|
---|
108 | border-radius: 5px;
|
---|
109 | }
|
---|
110 |
|
---|
111 | .back-button:hover {
|
---|
112 | background-color: #0056b3;
|
---|
113 | }
|
---|
114 | .cases-card {
|
---|
115 | margin-top: 20px;
|
---|
116 | }
|
---|
117 |
|
---|
118 | .case-card {
|
---|
119 | background-color: #f9f9f9;
|
---|
120 | border: 1px solid #ddd;
|
---|
121 | border-radius: 5px;
|
---|
122 | margin-bottom: 10px;
|
---|
123 | padding: 10px;
|
---|
124 | cursor: pointer;
|
---|
125 | transition: all 0.3s;
|
---|
126 | }
|
---|
127 |
|
---|
128 | .case-card:hover {
|
---|
129 | background-color: #f1f1f1;
|
---|
130 | }
|
---|
131 |
|
---|
132 | .case-details {
|
---|
133 | display: none;
|
---|
134 | padding: 10px;
|
---|
135 | }
|
---|
136 |
|
---|
137 | .case-card.active .case-details {
|
---|
138 | display: block;
|
---|
139 | }
|
---|
140 |
|
---|
141 | .case-card .case-title {
|
---|
142 | font-weight: bold;
|
---|
143 | }
|
---|
144 |
|
---|
145 | </style>
|
---|
146 | <script src="https://cdn.tailwindcss.com"></script>
|
---|
147 |
|
---|
148 | </head>
|
---|
149 | <body class="bg-gray-100 font-family-karla flex">
|
---|
150 | <aside class="relative bg-sidebar h-screen w-64 hidden sm:block shadow-xl">
|
---|
151 | <div class="p-6">
|
---|
152 | @if (Session::get('is_policeman'))
|
---|
153 | <a href="#" class="text-white text-3xl font-semibold uppercase hover:text-gray-300">Полицаец</a>
|
---|
154 |
|
---|
155 | @else
|
---|
156 | <a href="#" class="text-white text-3xl font-semibold uppercase hover:text-gray-300">Началник</a>
|
---|
157 | <button class="w-full bg-white cta-btn font-semibold py-2 mt-5 rounded-br-lg rounded-bl-lg rounded-tr-lg shadow-lg hover:shadow-xl hover:bg-gray-300 flex items-center justify-center">
|
---|
158 | <i class="fas fa-plus mr-3"></i> <a href="/register-policeman">Додади полицаец</a>
|
---|
159 | </button>
|
---|
160 | @endif
|
---|
161 | </div>
|
---|
162 | <nav class="text-white text-base font-semibold pt-3">
|
---|
163 | <a href="/" class="flex items-center text-white opacity-75 hover:opacity-100 py-4 pl-6 nav-item">
|
---|
164 | <i class="fas fa-tachometer-alt mr-3"></i>
|
---|
165 | Контролна табла
|
---|
166 | </a>
|
---|
167 | <a href="/employees" class="flex items-center active-nav-link text-white py-4 pl-6 nav-item">
|
---|
168 | <i class="fas fa-sticky-note mr-3"></i>
|
---|
169 | Вработени
|
---|
170 | </a>
|
---|
171 | <a href="/filter" class="flex items-center text-white opacity-75 hover:opacity-100 py-4 pl-6 nav-item">
|
---|
172 | <i class="fas fa-table mr-3"></i>
|
---|
173 | Филтрирај граѓани
|
---|
174 | </a>
|
---|
175 | <a href="/cases" class="flex items-center text-white opacity-75 hover:opacity-100 py-4 pl-6 nav-item">
|
---|
176 | <i class="fas fa-align-left mr-3"></i>
|
---|
177 | Случаи
|
---|
178 | </a>
|
---|
179 | <a href="/finished_cases" class="flex items-center text-white opacity-75 hover:opacity-100 py-4 pl-6 nav-item">
|
---|
180 | <i class="fas fa-calendar mr-3"></i>
|
---|
181 | Архива
|
---|
182 | </a>
|
---|
183 | </nav>
|
---|
184 | <a href="#"
|
---|
185 | class="absolute w-full upgrade-btn bottom-0 active-nav-link text-white flex items-center justify-center py-4">
|
---|
186 | <i class="fas fa-arrow-circle-up mr-3"></i>
|
---|
187 |
|
---|
188 |
|
---|
189 | </a>
|
---|
190 | </aside>
|
---|
191 |
|
---|
192 | <div class="w-full flex flex-col h-screen overflow-y-hidden">
|
---|
193 | <!-- Desktop Header -->
|
---|
194 | <header class="w-full items-center bg-white py-2 px-6 hidden sm:flex">
|
---|
195 | <div class="w-1/2"></div>
|
---|
196 | <div x-data="{ isOpen: false }" class="relative w-1/2 flex justify-end">
|
---|
197 | <button @click="isOpen = !isOpen"
|
---|
198 | class="realtive z-10 w-12 h-12 rounded-full overflow-hidden border-4 border-gray-400 hover:border-gray-300 focus:border-gray-300 focus:outline-none">
|
---|
199 | @php
|
---|
200 | $person = DB::select('select * from people where pe_id=:pe_id;', ['pe_id' => Session::get('pe_id')]);
|
---|
201 |
|
---|
202 | if (!empty($person)) {
|
---|
203 | $image = $person[0]->picture;
|
---|
204 | } else {
|
---|
205 | $image = null;
|
---|
206 | }
|
---|
207 | @endphp
|
---|
208 |
|
---|
209 | <img src="{{ $image }}">
|
---|
210 |
|
---|
211 | </button>
|
---|
212 | <button x-show="isOpen" @click="isOpen = false" class="h-full w-full fixed inset-0 cursor-default"></button>
|
---|
213 | <div x-show="isOpen" class="absolute w-32 bg-white rounded-lg shadow-lg py-2 mt-16">
|
---|
214 | <a href="#" class="block px-4 py-2 account-link hover:text-white">Профил</a>
|
---|
215 | <a href="#" class="block px-4 py-2 account-link hover:text-white">Помош</a>
|
---|
216 | <a href="/logout" class="block px-4 py-2 account-link hover:text-white">Одјави се</a>
|
---|
217 | </div>
|
---|
218 | </div>
|
---|
219 | </header>
|
---|
220 |
|
---|
221 | <!-- Mobile Header & Nav -->
|
---|
222 | <header x-data="{ isOpen: false }" class="w-full bg-sidebar py-5 px-6 sm:hidden">
|
---|
223 | <div class="flex items-center justify-between">
|
---|
224 | <a href="/" class="text-white text-3xl font-semibold uppercase hover:text-gray-300">Началник</a>
|
---|
225 | <button @click="isOpen = !isOpen" class="text-white text-3xl focus:outline-none">
|
---|
226 | <i x-show="!isOpen" class="fas fa-bars"></i>
|
---|
227 | <i x-show="isOpen" class="fas fa-times"></i>
|
---|
228 | </button>
|
---|
229 | </div>
|
---|
230 |
|
---|
231 | <!-- Dropdown Nav -->
|
---|
232 | <nav :class="isOpen ? 'flex': 'hidden'" class="flex flex-col pt-4">
|
---|
233 | <a href="/" class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
|
---|
234 | <i class="fas fa-tachometer-alt mr-3"></i>
|
---|
235 | Контролна табла
|
---|
236 | </a>
|
---|
237 | <a href="/employees" class="flex items-center active-nav-link text-white py-2 pl-4 nav-item">
|
---|
238 | <i class="fas fa-sticky-note mr-3"></i>
|
---|
239 | Вработени
|
---|
240 | </a>
|
---|
241 | <a href="/filter" class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
|
---|
242 | <i class="fas fa-table mr-3"></i>
|
---|
243 | Филтрирај граѓани
|
---|
244 | </a>
|
---|
245 | <a href="/cases" class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
|
---|
246 | <i class="fas fa-align-left mr-3"></i>
|
---|
247 | Случаи
|
---|
248 | </a>
|
---|
249 |
|
---|
250 | <a href="/finished_cases"
|
---|
251 | class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
|
---|
252 | <i class="fas fa-calendar mr-3"></i>
|
---|
253 | Архива
|
---|
254 | </a>
|
---|
255 | <a href="/help" class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
|
---|
256 | <i class="fas fa-cogs mr-3"></i>
|
---|
257 | Помош
|
---|
258 | </a>
|
---|
259 | <a href="/myprofile" class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
|
---|
260 | <i class="fas fa-user mr-3"></i>
|
---|
261 | Мој профил
|
---|
262 | </a>
|
---|
263 | <a href="/logout" class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
|
---|
264 | <i class="fas fa-sign-out-alt mr-3"></i>
|
---|
265 | Одјави се
|
---|
266 | </a>
|
---|
267 |
|
---|
268 | </nav>
|
---|
269 | <button
|
---|
270 | class="w-full bg-white cta-btn font-semibold py-2 mt-5 rounded-br-lg rounded-bl-lg rounded-tr-lg shadow-lg hover:shadow-xl hover:bg-gray-300 flex items-center justify-center">
|
---|
271 | <i class="fas fa-plus mr-3"></i> Нов извештај
|
---|
272 | </button>
|
---|
273 | </header>
|
---|
274 |
|
---|
275 | <div class="w-full overflow-x-hidden border-t flex flex-col">
|
---|
276 | <main class="w-full flex-grow p-6">
|
---|
277 | <h1 class="text-3xl text-black pb-6">Вработен: {{$employee->first_name}}</h1>
|
---|
278 |
|
---|
279 |
|
---|
280 |
|
---|
281 |
|
---|
282 |
|
---|
283 | <div class="w-full flex flex-col sm:flex-row h-screen overflow-y-hidden">
|
---|
284 | <main class="w-full sm:w-2/4 flex-grow p-6">
|
---|
285 | <div class="employee-details">
|
---|
286 | <h1>Детали за вработениот</h1>
|
---|
287 | <div class="employee-card">
|
---|
288 | <div class="employee-photo">
|
---|
289 | <img src="{{ $employee->picture }}" alt="Фотографија на вработениот">
|
---|
290 | </div>
|
---|
291 | <div class="employee-info">
|
---|
292 | <p><strong>Име:</strong> {{ $employee->first_name }}</p>
|
---|
293 | <p><strong>Презиме:</strong> {{ $employee->last_name }}</p>
|
---|
294 | <p><strong>Пол:</strong> {{ $employee->gender }}</p>
|
---|
295 | <p><strong>Адреса:</strong> {{ $employee->address }}</p>
|
---|
296 | <p><strong>Контакт:</strong> {{ $employee->contact }}</p>
|
---|
297 | <p><strong>ЕМБГ:</strong> {{ $employee->embg }}</p>
|
---|
298 | <p><strong>Дата на раѓање:</strong> {{ $employee->date_of_birth }}</p>
|
---|
299 | <p><strong>Држава:</strong> {{ $employee->country }}</p>
|
---|
300 | <p><strong>Националност:</strong> {{ $employee->nationality }}</p>
|
---|
301 | <p><strong>Број на значка:</strong> {{ $employee->badge_no }}</p>
|
---|
302 | <p><strong>Дата на вработување:</strong> {{ $employee->p_date_of_employment }}</p>
|
---|
303 | <p><strong>Ранг:</strong> {{ $employee->rank }}</p>
|
---|
304 | <p><strong>Адреса на полициска станица:</strong> {{ $p_address }}</p>
|
---|
305 | </div>
|
---|
306 | </div>
|
---|
307 | <a href="{{ url()->previous() }}" class="back-button">Назад</a>
|
---|
308 |
|
---|
309 | </div>
|
---|
310 | </main>
|
---|
311 |
|
---|
312 | <aside class="sm:w-2/4">
|
---|
313 | <h2>Случаи на вработениот</h2>
|
---|
314 | <div class="cases-card p-6">
|
---|
315 | @foreach($cases as $case)
|
---|
316 | <div class="case-card" onclick="toggleDetails(this)">
|
---|
317 | <div class="case-title">{{ $case->description }}</div>
|
---|
318 | <div class="case-details">
|
---|
319 | <p><strong>Идентификација на изјава:</strong> {{ $case->s_id }}</p>
|
---|
320 | <p><strong>Дата на изјава:</strong> {{ $case->statement_date }}</p>
|
---|
321 | <p><strong>Време на инцидент:</strong> {{ $case->incident_timestamp }}</p>
|
---|
322 | <p><strong>Место на инцидент:</strong> {{ $case->incident_place }}</p>
|
---|
323 | <p><strong>Идентификација на случај:</strong> {{ $case->c_id }}</p>
|
---|
324 | <p><strong>Жртва ИД:</strong> {{ $case->victim_pe_id }}</p>
|
---|
325 | <p><strong>Сведок ИД:</strong> {{ $case->witness_pe_id }}</p>
|
---|
326 | </div>
|
---|
327 | </div>
|
---|
328 | @endforeach
|
---|
329 | </div>
|
---|
330 | </aside>
|
---|
331 | </div>
|
---|
332 |
|
---|
333 | </main>
|
---|
334 |
|
---|
335 |
|
---|
336 | </div>
|
---|
337 |
|
---|
338 | </div>
|
---|
339 |
|
---|
340 | <!-- AlpineJS -->
|
---|
341 | <script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js" defer></script>
|
---|
342 | <!-- Font Awesome -->
|
---|
343 | <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/js/all.min.js"
|
---|
344 | integrity="sha256-KzZiKy0DWYsnwMF+X1DvQngQ2/FxF7MF3Ff72XcpuPs=" crossorigin="anonymous"></script>
|
---|
345 | <!-- ChartJS -->
|
---|
346 | <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.js"
|
---|
347 | integrity="sha256-R4pqcOYV8lt7snxMQO/HSbVCFRPMdrhAFMH+vr9giYI=" crossorigin="anonymous"></script>
|
---|
348 | <script>
|
---|
349 | function toggleDetails(element) {
|
---|
350 | element.classList.toggle('active');
|
---|
351 | }
|
---|
352 | </script>
|
---|
353 | </body>
|
---|
354 | </html>
|
---|