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 | .font-family-karla { font-family: karla; }
|
---|
17 | .bg-sidebar { background: #3d68ff; }
|
---|
18 | .cta-btn { color: #3d68ff; }
|
---|
19 | .upgrade-btn { background: #1947ee; }
|
---|
20 | .upgrade-btn:hover { background: #0038fd; }
|
---|
21 | .active-nav-link { background: #1947ee; }
|
---|
22 | .nav-item:hover { background: #1947ee; }
|
---|
23 | .account-link:hover { background: #3d68ff; }
|
---|
24 | .flex-parent-element {
|
---|
25 | display: flex;
|
---|
26 | width: 50%;
|
---|
27 | }
|
---|
28 |
|
---|
29 | .flex-child-element {
|
---|
30 | flex: 1;
|
---|
31 | margin: 10px;
|
---|
32 | }
|
---|
33 |
|
---|
34 | .flex-child-element:first-child {
|
---|
35 | margin-right: 20px;
|
---|
36 | }
|
---|
37 | .container {
|
---|
38 | display: block;
|
---|
39 | position: relative;
|
---|
40 | padding-left: 35px;
|
---|
41 | margin-bottom: 12px;
|
---|
42 | cursor: pointer;
|
---|
43 | font-size: 22px;
|
---|
44 | -webkit-user-select: none;
|
---|
45 | -moz-user-select: none;
|
---|
46 | -ms-user-select: none;
|
---|
47 | user-select: none;
|
---|
48 | }
|
---|
49 | .center {
|
---|
50 | border: 5px solid;
|
---|
51 | width: 50%;
|
---|
52 | padding: 10px;
|
---|
53 | margin-left: 400px;
|
---|
54 | }
|
---|
55 |
|
---|
56 | /* Hide the browser's default checkbox */
|
---|
57 | .container input {
|
---|
58 | position: absolute;
|
---|
59 | opacity: 0;
|
---|
60 | cursor: pointer;
|
---|
61 | height: 0;
|
---|
62 | width: 0;
|
---|
63 | }
|
---|
64 |
|
---|
65 | /* Create a custom checkbox */
|
---|
66 | .checkmark {
|
---|
67 | position: absolute;
|
---|
68 | top: 0;
|
---|
69 | left: 0;
|
---|
70 | height: 25px;
|
---|
71 | width: 25px;
|
---|
72 | background-color: #eee;
|
---|
73 | }
|
---|
74 |
|
---|
75 | /* On mouse-over, add a grey background color */
|
---|
76 | .container:hover input ~ .checkmark {
|
---|
77 | background-color: #ccc;
|
---|
78 | }
|
---|
79 |
|
---|
80 | /* When the checkbox is checked, add a blue background */
|
---|
81 | .container input:checked ~ .checkmark {
|
---|
82 | background-color: #2196F3;
|
---|
83 | }
|
---|
84 |
|
---|
85 | /* Create the checkmark/indicator (hidden when not checked) */
|
---|
86 | .checkmark:after {
|
---|
87 | content: "";
|
---|
88 | position: absolute;
|
---|
89 | display: none;
|
---|
90 | }
|
---|
91 |
|
---|
92 | /* Show the checkmark when checked */
|
---|
93 | .container input:checked ~ .checkmark:after {
|
---|
94 | display: block;
|
---|
95 | }
|
---|
96 |
|
---|
97 | /* Style the checkmark/indicator */
|
---|
98 | .container .checkmark:after {
|
---|
99 | left: 9px;
|
---|
100 | top: 5px;
|
---|
101 | width: 5px;
|
---|
102 | height: 10px;
|
---|
103 | border: solid white;
|
---|
104 | border-width: 0 3px 3px 0;
|
---|
105 | -webkit-transform: rotate(45deg);
|
---|
106 | -ms-transform: rotate(45deg);
|
---|
107 | transform: rotate(45deg);
|
---|
108 | }
|
---|
109 | body > div > main > div > div > form{
|
---|
110 | margin-left: 500px;
|
---|
111 | width: 600px;
|
---|
112 | }
|
---|
113 |
|
---|
114 | </style>
|
---|
115 | <script src="https://cdn.tailwindcss.com"></script>
|
---|
116 |
|
---|
117 | </head>
|
---|
118 | <body class="bg-gray-100 font-family-karla flex">
|
---|
119 | <aside class="relative bg-sidebar h-screen w-64 hidden sm:block shadow-xl">
|
---|
120 | <div class="p-6">
|
---|
121 | @if (Session::get('is_policeman'))
|
---|
122 | <a href="#" class="text-white text-3xl font-semibold uppercase hover:text-gray-300">Полицаец</a>
|
---|
123 | @else
|
---|
124 | <a href="#" class="text-white text-3xl font-semibold uppercase hover:text-gray-300">Началник</a>
|
---|
125 | <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">
|
---|
126 | <i class="fas fa-plus mr-3"></i> <a href="/register-policeman">Додади полицаец</a>
|
---|
127 | </button>
|
---|
128 | @endif
|
---|
129 | </div>
|
---|
130 | <nav class="text-white text-base font-semibold pt-3">
|
---|
131 | <a href="/" class="flex items-center text-white opacity-75 hover:opacity-100 py-4 pl-6 nav-item">
|
---|
132 | <i class="fas fa-tachometer-alt mr-3"></i>
|
---|
133 | Сортирај граѓани
|
---|
134 | </a>
|
---|
135 | <a href="/employees" class="flex items-center text-white opacity-75 hover:opacity-100 py-4 pl-6 nav-item">
|
---|
136 | <i class="fas fa-sticky-note mr-3"></i>
|
---|
137 | Вработени
|
---|
138 | </a>
|
---|
139 | <a href="/filter" class="flex items-center text-white opacity-75 hover:opacity-100 py-4 pl-6 nav-item">
|
---|
140 | <i class="fas fa-table mr-3"></i>
|
---|
141 | Филтрирај граѓани
|
---|
142 | </a>
|
---|
143 | <a href="/cases" class="flex items-center text-white opacity-75 hover:opacity-100 py-4 pl-6 nav-item">
|
---|
144 | <i class="fas fa-align-left mr-3"></i>
|
---|
145 | Случаи
|
---|
146 | </a>
|
---|
147 | <a href="/finished_cases" class="flex items-center text-white opacity-75 hover:opacity-100 py-4 pl-6 nav-item">
|
---|
148 | <i class="fas fa-calendar mr-3"></i>
|
---|
149 | Архива
|
---|
150 | </a>
|
---|
151 | </nav>
|
---|
152 | <a href="#" class="absolute w-full upgrade-btn bottom-0 active-nav-link text-white flex items-center justify-center py-4">
|
---|
153 | <i class="fas fa-arrow-circle-up mr-3"></i>
|
---|
154 | Поставки за профил
|
---|
155 | </a>
|
---|
156 | </aside>
|
---|
157 |
|
---|
158 | <div class="w-full flex flex-col h-screen overflow-y-hidden">
|
---|
159 | <!-- Desktop Header -->
|
---|
160 | <header class="w-full items-center bg-white py-2 px-6 hidden sm:flex">
|
---|
161 | <div class="w-1/2"></div>
|
---|
162 | <div x-data="{ isOpen: false }" class="relative w-1/2 flex justify-end">
|
---|
163 | <button @click="isOpen = !isOpen" 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">
|
---|
164 | <img src="https://source.unsplash.com/uJ8LNVCBjFQ/400x400">
|
---|
165 | </button>
|
---|
166 | <button x-show="isOpen" @click="isOpen = false" class="h-full w-full fixed inset-0 cursor-default"></button>
|
---|
167 | <div x-show="isOpen" class="absolute w-32 bg-white rounded-lg shadow-lg py-2 mt-16">
|
---|
168 | <a href="#" class="block px-4 py-2 account-link hover:text-white">Профил</a>
|
---|
169 | <a href="#" class="block px-4 py-2 account-link hover:text-white">Помош</a>
|
---|
170 | <a href="/logout"class="block px-4 py-2 account-link hover:text-white">Одјави се</a>
|
---|
171 | </div>
|
---|
172 | </div>
|
---|
173 | </header>
|
---|
174 |
|
---|
175 | <!-- Mobile Header & Nav -->
|
---|
176 | <header x-data="{ isOpen: false }" class="w-full bg-sidebar py-5 px-6 sm:hidden">
|
---|
177 | <div class="flex items-center justify-between">
|
---|
178 | <a href="/" class="text-white text-3xl font-semibold uppercase hover:text-gray-300">Началник</a>
|
---|
179 | <button @click="isOpen = !isOpen" class="text-white text-3xl focus:outline-none">
|
---|
180 | <i x-show="!isOpen" class="fas fa-bars"></i>
|
---|
181 | <i x-show="isOpen" class="fas fa-times"></i>
|
---|
182 | </button>
|
---|
183 | </div>
|
---|
184 |
|
---|
185 | <!-- Dropdown Nav -->
|
---|
186 | <nav :class="isOpen ? 'flex': 'hidden'" class="flex flex-col pt-4">
|
---|
187 | <a href="/" class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
|
---|
188 | <i class="fas fa-tachometer-alt mr-3"></i>
|
---|
189 | Контролна табла
|
---|
190 | </a>
|
---|
191 | <a href="/employees" class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
|
---|
192 | <i class="fas fa-sticky-note mr-3"></i>
|
---|
193 | Вработени
|
---|
194 | </a>
|
---|
195 | <a href="/filter" class="flex items-center active-nav-link text-white py-2 pl-4 nav-item">
|
---|
196 | <i class="fas fa-table mr-3"></i>
|
---|
197 | Филтрирај граѓани
|
---|
198 | </a>
|
---|
199 | <a href="/cases" class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
|
---|
200 | <i class="fas fa-align-left mr-3"></i>
|
---|
201 | Случаи
|
---|
202 | </a>
|
---|
203 |
|
---|
204 | <a href="/finished_cases" class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
|
---|
205 | <i class="fas fa-calendar mr-3"></i>
|
---|
206 | Архива
|
---|
207 | </a>
|
---|
208 | <a href="/help" class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
|
---|
209 | <i class="fas fa-cogs mr-3"></i>
|
---|
210 | Помош
|
---|
211 | </a>
|
---|
212 | <a href="/myprofile" class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
|
---|
213 | <i class="fas fa-user mr-3"></i>
|
---|
214 | Мој профил
|
---|
215 | </a>
|
---|
216 | <a href="/logout" class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
|
---|
217 | <i class="fas fa-sign-out-alt mr-3"></i>
|
---|
218 | Одјави се
|
---|
219 | </a>
|
---|
220 |
|
---|
221 | </nav>
|
---|
222 | <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">
|
---|
223 | <i class="fas fa-plus mr-3"></i> Нов извештај
|
---|
224 | </button>
|
---|
225 | </header>
|
---|
226 |
|
---|
227 |
|
---|
228 | <main class="w-full flex-grow p-6">
|
---|
229 |
|
---|
230 | <h1 class="text-3xl text-black pb-6">Контролна табла</h1>
|
---|
231 |
|
---|
232 |
|
---|
233 |
|
---|
234 |
|
---|
235 | <div class="w-full mt-12">
|
---|
236 | <p class="text-xl pb-3 flex items-center">
|
---|
237 | <i class="fas fa-list mr-3"></i> Додавање на полицаец
|
---|
238 | </p>
|
---|
239 |
|
---|
240 | <div class=".center">
|
---|
241 | <form method="POST" action="/register-policeman" class="mt-10 .center">
|
---|
242 | @csrf
|
---|
243 | <div class="mb-6">
|
---|
244 | <label class="block mb-2 uppercase font-bold text-xs text-gray-700"
|
---|
245 | for="embg"
|
---|
246 | >
|
---|
247 | ЕМБГ
|
---|
248 | </label>
|
---|
249 |
|
---|
250 | <input class="border border-gray-400 p-2 w-full"
|
---|
251 | type="text"
|
---|
252 | name="embg"
|
---|
253 | value="{{old('embg')}}"
|
---|
254 | id="embg"
|
---|
255 | required
|
---|
256 | >
|
---|
257 | </div>
|
---|
258 | <div class="mb-6">
|
---|
259 | <label class="block mb-2 uppercase font-bold text-xs text-gray-700"
|
---|
260 | for="first_name"
|
---|
261 | >
|
---|
262 | Име
|
---|
263 | </label>
|
---|
264 |
|
---|
265 | <input class="border border-gray-400 p-2 w-full text-gray-500"
|
---|
266 | type="text"
|
---|
267 | name="first_name"
|
---|
268 | value=""
|
---|
269 | id="first_name"
|
---|
270 | required
|
---|
271 | disabled="disabled">
|
---|
272 | </div>
|
---|
273 |
|
---|
274 | @error('name')
|
---|
275 | <p class="text-red-500 text-xs mt-1">{{$message}}</p>
|
---|
276 | @enderror
|
---|
277 |
|
---|
278 | <div class="mb-6">
|
---|
279 | <label class="block mb-2 uppercase font-bold text-xs text-gray-700"
|
---|
280 | for="last_name"
|
---|
281 | >
|
---|
282 | Презиме
|
---|
283 | </label>
|
---|
284 |
|
---|
285 | <input class="border border-gray-400 p-2 w-full text-gray-500"
|
---|
286 | type="text"
|
---|
287 | name="last_name"
|
---|
288 | value=""
|
---|
289 | id="last_name"
|
---|
290 | required
|
---|
291 | disabled="disabled" >
|
---|
292 | </div>
|
---|
293 | @error('lastname')
|
---|
294 | <p class="text-red-500 text-xs mt-1">{{$message}}</p>
|
---|
295 | @enderror
|
---|
296 |
|
---|
297 | <div class="mb-6">
|
---|
298 | <label class="block mb-2 uppercase font-bold text-xs text-gray-700"
|
---|
299 | for="badge_no"
|
---|
300 | >
|
---|
301 | Број на значка
|
---|
302 | </label>
|
---|
303 |
|
---|
304 | <input class="border border-gray-400 p-2 w-full"
|
---|
305 | type="text"
|
---|
306 | name="badge_no"
|
---|
307 | value="{{old('badge_no')}}"
|
---|
308 | id="badge_no"
|
---|
309 | required
|
---|
310 | >
|
---|
311 | </div>
|
---|
312 | @error('badge_no')
|
---|
313 | <p class="text-red-500 text-xs mt-1">{{$message}}</p>
|
---|
314 | @enderror
|
---|
315 |
|
---|
316 | <div class="mb-6">
|
---|
317 | <label class="block mb-2 uppercase font-bold text-xs text-gray-700"
|
---|
318 | for="password"
|
---|
319 | >
|
---|
320 | Password
|
---|
321 | </label>
|
---|
322 |
|
---|
323 | <input class="border border-gray-400 p-2 w-full"
|
---|
324 | type="password"
|
---|
325 | name="password"
|
---|
326 | id="password"
|
---|
327 | required
|
---|
328 | >
|
---|
329 | </div>
|
---|
330 | <div class="mb-6">
|
---|
331 | <label class="block mb-2 uppercase font-bold text-xs text-gray-700"
|
---|
332 | for="rank"
|
---|
333 | >
|
---|
334 | Ранк
|
---|
335 | </label>
|
---|
336 |
|
---|
337 | <input class="border border-gray-400 p-2 w-full"
|
---|
338 | type="text"
|
---|
339 | name="rank"
|
---|
340 | id="rank"
|
---|
341 | required
|
---|
342 | >
|
---|
343 | </div>
|
---|
344 |
|
---|
345 | <div class="mb-6">
|
---|
346 | <button type="submit"
|
---|
347 | class="bg-blue-400 text-white rounded py-2 px-4 hover:bg-blue-500"
|
---|
348 | >
|
---|
349 | Додади
|
---|
350 | </button>
|
---|
351 | </div>
|
---|
352 | </form>
|
---|
353 | </div>
|
---|
354 | </div>
|
---|
355 | </main>
|
---|
356 | </div>
|
---|
357 |
|
---|
358 |
|
---|
359 | <!-- AlpineJS -->
|
---|
360 | <script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js" defer></script>
|
---|
361 | <!-- Font Awesome -->
|
---|
362 | <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/js/all.min.js" integrity="sha256-KzZiKy0DWYsnwMF+X1DvQngQ2/FxF7MF3Ff72XcpuPs=" crossorigin="anonymous"></script>
|
---|
363 | <!-- ChartJS -->
|
---|
364 | <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.js" integrity="sha256-R4pqcOYV8lt7snxMQO/HSbVCFRPMdrhAFMH+vr9giYI=" crossorigin="anonymous"></script>
|
---|
365 | <script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
|
---|
366 |
|
---|
367 | <script>
|
---|
368 | $(document).ready(function () {
|
---|
369 | $('#embg').on('input', function () {
|
---|
370 | var embg = $(this).val();
|
---|
371 |
|
---|
372 | $.ajax({
|
---|
373 | url: '/get-person', // Replace with your actual route
|
---|
374 | type: 'POST',
|
---|
375 | data: { embg: embg, _token: '{{ csrf_token() }}' },
|
---|
376 | success: function (data) {
|
---|
377 | $('#first_name').val(data.first_name);
|
---|
378 | $('#last_name').val(data.last_name);
|
---|
379 | }
|
---|
380 | });
|
---|
381 | });
|
---|
382 | });
|
---|
383 | </script>
|
---|
384 |
|
---|
385 |
|
---|
386 | </body>
|
---|
387 | </html>
|
---|