source: resources/views/employees.blade.php

main
Last change on this file was 768f473, checked in by bube-ristovska <ristovska725@…>, 5 months ago

Final features

  • Property mode set to 100644
File size: 10.6 KB
RevLine 
[75151c6]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">
[6b10b67]11 <link href="https://fonts.bunny.net/css?family=figtree:400,600&display=swap" rel="stylesheet"/>
[75151c6]12
13 <!-- Styles -->
14 <style>
15 @import url('https://fonts.googleapis.com/css?family=Karla:400,700&display=swap');
[6b10b67]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 }
[249bf91]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
[75151c6]58 </style>
59 <script src="https://cdn.tailwindcss.com"></script>
60
61</head>
62<body class="bg-gray-100 font-family-karla flex">
63<aside class="relative bg-sidebar h-screen w-64 hidden sm:block shadow-xl">
64 <div class="p-6">
[d9c4096]65 @if (Session::get('is_policeman'))
66 <a href="#" class="text-white text-3xl font-semibold uppercase hover:text-gray-300">Полицаец</a>
67 @else
68 <a href="#" class="text-white text-3xl font-semibold uppercase hover:text-gray-300">Началник</a>
69 <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">
70 <i class="fas fa-plus mr-3"></i> <a href="/register-policeman">Додади полицаец</a>
71 </button>
72 @endif
[75151c6]73 </div>
74 <nav class="text-white text-base font-semibold pt-3">
75 <a href="/" class="flex items-center text-white opacity-75 hover:opacity-100 py-4 pl-6 nav-item">
76 <i class="fas fa-tachometer-alt mr-3"></i>
77 Контролна табла
78 </a>
79 <a href="/employees" class="flex items-center active-nav-link text-white py-4 pl-6 nav-item">
80 <i class="fas fa-sticky-note mr-3"></i>
81 Вработени
82 </a>
83 <a href="/filter" class="flex items-center text-white opacity-75 hover:opacity-100 py-4 pl-6 nav-item">
84 <i class="fas fa-table mr-3"></i>
85 Филтрирај граѓани
86 </a>
87 <a href="/cases" class="flex items-center text-white opacity-75 hover:opacity-100 py-4 pl-6 nav-item">
88 <i class="fas fa-align-left mr-3"></i>
89 Случаи
90 </a>
91 <a href="/finished_cases" class="flex items-center text-white opacity-75 hover:opacity-100 py-4 pl-6 nav-item">
92 <i class="fas fa-calendar mr-3"></i>
93 Архива
94 </a>
95 </nav>
[6b10b67]96 <a href="#"
97 class="absolute w-full upgrade-btn bottom-0 active-nav-link text-white flex items-center justify-center py-4">
[75151c6]98 <i class="fas fa-arrow-circle-up mr-3"></i>
[249bf91]99
[75151c6]100 </a>
101</aside>
102
103<div class="w-full flex flex-col h-screen overflow-y-hidden">
104 <!-- Desktop Header -->
105 <header class="w-full items-center bg-white py-2 px-6 hidden sm:flex">
106 <div class="w-1/2"></div>
107 <div x-data="{ isOpen: false }" class="relative w-1/2 flex justify-end">
[6b10b67]108 <button @click="isOpen = !isOpen"
109 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">
[249bf91]110 @php
111 $person = DB::select('select * from people where pe_id=:pe_id;', ['pe_id' => Session::get('pe_id')]);
112
113 if (!empty($person)) {
114 $image = $person[0]->picture;
115 } else {
116 $image = null;
117 }
118 @endphp
119
120 <img src="{{ $image }}">
121
[768f473]122
[75151c6]123 </button>
124 <button x-show="isOpen" @click="isOpen = false" class="h-full w-full fixed inset-0 cursor-default"></button>
125 <div x-show="isOpen" class="absolute w-32 bg-white rounded-lg shadow-lg py-2 mt-16">
126 <a href="#" class="block px-4 py-2 account-link hover:text-white">Профил</a>
127 <a href="#" class="block px-4 py-2 account-link hover:text-white">Помош</a>
[cf84baa]128 <a href="/logout" class="block px-4 py-2 account-link hover:text-white">Одјави се</a>
[75151c6]129 </div>
130 </div>
131 </header>
132
133 <!-- Mobile Header & Nav -->
134 <header x-data="{ isOpen: false }" class="w-full bg-sidebar py-5 px-6 sm:hidden">
135 <div class="flex items-center justify-between">
136 <a href="/" class="text-white text-3xl font-semibold uppercase hover:text-gray-300">Началник</a>
137 <button @click="isOpen = !isOpen" class="text-white text-3xl focus:outline-none">
138 <i x-show="!isOpen" class="fas fa-bars"></i>
139 <i x-show="isOpen" class="fas fa-times"></i>
140 </button>
141 </div>
142
143 <!-- Dropdown Nav -->
144 <nav :class="isOpen ? 'flex': 'hidden'" class="flex flex-col pt-4">
145 <a href="/" class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
146 <i class="fas fa-tachometer-alt mr-3"></i>
147 Контролна табла
148 </a>
[6b10b67]149 <a href="/employees" class="flex items-center active-nav-link text-white py-2 pl-4 nav-item">
[75151c6]150 <i class="fas fa-sticky-note mr-3"></i>
151 Вработени
152 </a>
153 <a href="/filter" class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
154 <i class="fas fa-table mr-3"></i>
155 Филтрирај граѓани
156 </a>
157 <a href="/cases" class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
158 <i class="fas fa-align-left mr-3"></i>
159 Случаи
160 </a>
161
[6b10b67]162 <a href="/finished_cases"
163 class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
[75151c6]164 <i class="fas fa-calendar mr-3"></i>
165 Архива
166 </a>
167 <a href="/help" class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
168 <i class="fas fa-cogs mr-3"></i>
169 Помош
170 </a>
171 <a href="/myprofile" class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
172 <i class="fas fa-user mr-3"></i>
173 Мој профил
174 </a>
175 <a href="/logout" class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
176 <i class="fas fa-sign-out-alt mr-3"></i>
177 Одјави се
178 </a>
179
180 </nav>
[6b10b67]181 <button
182 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">
[75151c6]183 <i class="fas fa-plus mr-3"></i> Нов извештај
184 </button>
185 </header>
186
187 <div class="w-full overflow-x-hidden border-t flex flex-col">
188 <main class="w-full flex-grow p-6">
[7e9dadd]189 <h1 class="text-3xl text-black pb-6">Вработени во {{$p_address}}</h1>
[75151c6]190
191
192 <div class="w-full mt-12">
193 <p class="text-xl pb-3 flex items-center">
[7e9dadd]194 <i class="fas fa-list mr-3"></i>
[75151c6]195 </p>
196 <div class="bg-white overflow-auto">
[249bf91]197 <table class="min-w-full bg-white" id="clickableTable">
[75151c6]198 <thead class="bg-gray-800 text-white">
199 <tr>
200 <th class="w-1/3 text-left py-3 px-4 uppercase font-semibold text-sm">Име</th>
201 <th class="w-1/3 text-left py-3 px-4 uppercase font-semibold text-sm">Презиме</th>
202 <th class="text-left py-3 px-4 uppercase font-semibold text-sm">Телефон</th>
203 <th class="text-left py-3 px-4 uppercase font-semibold text-sm">Емаил</th>
204 </tr>
205 </thead>
206 <tbody class="text-gray-700">
[6b10b67]207
208 @foreach($employees as $employee)
[249bf91]209 <tr data-id="{{$employee->pe_id}}">
[6b10b67]210 <td class="w-1/3 text-left py-3 px-4">{{$employee->first_name}}</td>
211 <td class="w-1/3 text-left py-3 px-4">{{$employee->last_name}}</td>
212 <td class="text-left py-3 px-4"><a class="hover:text-blue-500"
213 href="tel:622322662">{{$employee->contact}}</a></td>
214 <td class="text-left py-3 px-4"><a
215 class="hover:text-blue-500">{{$employee->nationality}}</a></td>
216 </tr>
217 @endforeach
218
219
[75151c6]220 </tbody>
221 </table>
[6b10b67]222
223
[75151c6]224 </div>
225 </div>
226 </main>
227
228
229 </div>
230
231</div>
232
233<!-- AlpineJS -->
234<script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js" defer></script>
235<!-- Font Awesome -->
[6b10b67]236<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/js/all.min.js"
237 integrity="sha256-KzZiKy0DWYsnwMF+X1DvQngQ2/FxF7MF3Ff72XcpuPs=" crossorigin="anonymous"></script>
[75151c6]238<!-- ChartJS -->
[6b10b67]239<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.js"
240 integrity="sha256-R4pqcOYV8lt7snxMQO/HSbVCFRPMdrhAFMH+vr9giYI=" crossorigin="anonymous"></script>
[249bf91]241<script>
242
243 document.addEventListener('DOMContentLoaded', function() {
244 const rows = document.querySelectorAll('#clickableTable tr');
245
246 rows.forEach(row => {
247 row.addEventListener('click', function() {
248 const id = this.getAttribute('data-id');
249 if (id) {
250 window.location.href = `http://127.0.0.1:8000/employees/${id}`;
251 }
252 });
253 });
254 });
255
256</script>
[75151c6]257
258</body>
259</html>
Note: See TracBrowser for help on using the repository browser.