source: resources/views/welcome.blade.php@ 249bf91

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

New feature - details for employee

  • Property mode set to 100644
File size: 13.7 KB
RevLine 
[c454c0f]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 </style>
25 <script src="https://cdn.tailwindcss.com"></script>
26
27 </head>
28 <body class="bg-gray-100 font-family-karla flex">
29 <aside class="relative bg-sidebar h-screen w-64 hidden sm:block shadow-xl">
30 <div class="p-6">
[cf84baa]31 @if (Session::get('is_policeman'))
32 <a href="#" class="text-white text-3xl font-semibold uppercase hover:text-gray-300">Полицаец</a>
[249bf91]33 <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">
34 <i class="fas fa-plus mr-3"></i> <a href="/register-statement">Додади изјава</a>
35 </button>
[cf84baa]36 @else
37 <a href="#" class="text-white text-3xl font-semibold uppercase hover:text-gray-300">Началник</a>
[d9c4096]38 <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">
39 <i class="fas fa-plus mr-3"></i> <a href="/register-policeman">Додади полицаец</a>
40 </button>
[cf84baa]41 @endif
[c454c0f]42 </div>
43 <nav class="text-white text-base font-semibold pt-3">
[75151c6]44 <a href="/" class="flex items-center active-nav-link text-white py-4 pl-6 nav-item">
[c454c0f]45 <i class="fas fa-tachometer-alt mr-3"></i>
[75151c6]46 Контролна табла
[c454c0f]47 </a>
[75151c6]48 <a href="/employees" class="flex items-center text-white opacity-75 hover:opacity-100 py-4 pl-6 nav-item">
[c454c0f]49 <i class="fas fa-sticky-note mr-3"></i>
[75151c6]50 Вработени
[c454c0f]51 </a>
[75151c6]52 <a href="/filter" class="flex items-center text-white opacity-75 hover:opacity-100 py-4 pl-6 nav-item">
[c454c0f]53 <i class="fas fa-table mr-3"></i>
[75151c6]54 Филтрирај граѓани
[c454c0f]55 </a>
[75151c6]56 <a href="/cases" class="flex items-center text-white opacity-75 hover:opacity-100 py-4 pl-6 nav-item">
[c454c0f]57 <i class="fas fa-align-left mr-3"></i>
[75151c6]58 Случаи
[c454c0f]59 </a>
[75151c6]60 <a href="/finished_cases" class="flex items-center text-white opacity-75 hover:opacity-100 py-4 pl-6 nav-item">
[c454c0f]61 <i class="fas fa-calendar mr-3"></i>
[75151c6]62 Архива
[c454c0f]63 </a>
64 </nav>
65 <a href="#" class="absolute w-full upgrade-btn bottom-0 active-nav-link text-white flex items-center justify-center py-4">
66 <i class="fas fa-arrow-circle-up mr-3"></i>
[249bf91]67
[c454c0f]68 </a>
69 </aside>
70
71 <div class="w-full flex flex-col h-screen overflow-y-hidden">
72 <!-- Desktop Header -->
73 <header class="w-full items-center bg-white py-2 px-6 hidden sm:flex">
74 <div class="w-1/2"></div>
75 <div x-data="{ isOpen: false }" class="relative w-1/2 flex justify-end">
76 <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">
[249bf91]77 @php
78 $person = DB::select('select * from people where pe_id=:pe_id;', ['pe_id' => Session::get('pe_id')]);
79
80 if (!empty($person)) {
81 $image = $person[0]->picture;
82 } else {
83 $image = null;
84 }
85 @endphp
86
87 <img src="{{ $image }}">
[c454c0f]88 </button>
89 <button x-show="isOpen" @click="isOpen = false" class="h-full w-full fixed inset-0 cursor-default"></button>
90 <div x-show="isOpen" class="absolute w-32 bg-white rounded-lg shadow-lg py-2 mt-16">
[75151c6]91 <a href="#" class="block px-4 py-2 account-link hover:text-white">Профил</a>
92 <a href="#" class="block px-4 py-2 account-link hover:text-white">Помош</a>
[cf84baa]93 <a href="/logout" class="block px-4 py-2 account-link hover:text-white">Одјави се</a>
[c454c0f]94 </div>
95 </div>
96 </header>
97
98 <!-- Mobile Header & Nav -->
99 <header x-data="{ isOpen: false }" class="w-full bg-sidebar py-5 px-6 sm:hidden">
100 <div class="flex items-center justify-between">
[75151c6]101 <a href="/" class="text-white text-3xl font-semibold uppercase hover:text-gray-300">Началник</a>
[c454c0f]102 <button @click="isOpen = !isOpen" class="text-white text-3xl focus:outline-none">
103 <i x-show="!isOpen" class="fas fa-bars"></i>
104 <i x-show="isOpen" class="fas fa-times"></i>
105 </button>
106 </div>
107
108 <!-- Dropdown Nav -->
109 <nav :class="isOpen ? 'flex': 'hidden'" class="flex flex-col pt-4">
[75151c6]110 <a href="/" class="flex items-center active-nav-link text-white py-2 pl-4 nav-item">
[c454c0f]111 <i class="fas fa-tachometer-alt mr-3"></i>
[75151c6]112 Контролна табла
[c454c0f]113 </a>
[75151c6]114 <a href="/employees" class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
[c454c0f]115 <i class="fas fa-sticky-note mr-3"></i>
[75151c6]116 Вработени
[c454c0f]117 </a>
[75151c6]118 <a href="/filter" class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
[c454c0f]119 <i class="fas fa-table mr-3"></i>
[75151c6]120 Филтрирај граѓани
[c454c0f]121 </a>
[75151c6]122 <a href="/cases" class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
[c454c0f]123 <i class="fas fa-align-left mr-3"></i>
[75151c6]124 Случаи
[c454c0f]125 </a>
[75151c6]126
127 <a href="/finished_cases" class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
[c454c0f]128 <i class="fas fa-calendar mr-3"></i>
[75151c6]129 Архива
[c454c0f]130 </a>
[75151c6]131 <a href="/help" class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
[c454c0f]132 <i class="fas fa-cogs mr-3"></i>
[75151c6]133 Помош
[c454c0f]134 </a>
[75151c6]135 <a href="/myprofile" class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
[c454c0f]136 <i class="fas fa-user mr-3"></i>
[75151c6]137 Мој профил
[c454c0f]138 </a>
[75151c6]139 <a href="/logout" class="flex items-center text-white opacity-75 hover:opacity-100 py-2 pl-4 nav-item">
[c454c0f]140 <i class="fas fa-sign-out-alt mr-3"></i>
[75151c6]141 Одјави се
[c454c0f]142 </a>
[75151c6]143
[c454c0f]144 </nav>
[75151c6]145 <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">
146 <i class="fas fa-plus mr-3"></i> Нов извештај
147 </button>
[c454c0f]148 </header>
149
150 <div class="w-full overflow-x-hidden border-t flex flex-col">
151 <main class="w-full flex-grow p-6">
[75151c6]152 <h1 class="text-3xl text-black pb-6">Контролна табла</h1>
[c454c0f]153
154 <div class="flex flex-wrap mt-6">
155 <div class="w-full lg:w-1/2 pr-0 lg:pr-2">
156 <p class="text-xl pb-3 flex items-center">
157 <i class="fas fa-plus mr-3"></i> Месечни извештаи
158 </p>
159 <div class="p-6 bg-white">
160 <canvas id="chartOne" width="400" height="200"></canvas>
161 </div>
162 </div>
163 <div class="w-full lg:w-1/2 pl-0 lg:pl-2 mt-12 lg:mt-0">
164 <p class="text-xl pb-3 flex items-center">
[75151c6]165 <i class="fas fa-check mr-3"></i> Решени случаи
[c454c0f]166 </p>
167 <div class="p-6 bg-white">
168 <canvas id="chartTwo" width="400" height="200"></canvas>
169 </div>
170 </div>
171 </div>
172
[75151c6]173
[c454c0f]174 </main>
175
176 <footer class="w-full bg-white text-right p-4">
[75151c6]177 UI/UX инспирирано од <a target="_blank" href="https://davidgrzyb.com" class="underline">David Grzyb</a>.
[c454c0f]178 </footer>
179 </div>
180
181 </div>
182
183 <!-- AlpineJS -->
184 <script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js" defer></script>
185 <!-- Font Awesome -->
186 <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>
187 <!-- ChartJS -->
188 <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.js" integrity="sha256-R4pqcOYV8lt7snxMQO/HSbVCFRPMdrhAFMH+vr9giYI=" crossorigin="anonymous"></script>
189
190 <script>
191 var chartOne = document.getElementById('chartOne');
192 var myChart = new Chart(chartOne, {
193 type: 'bar',
194 data: {
[75151c6]195 labels: ['Јануари', 'Фебруари', 'Март', 'Април', 'Мај', 'Јуни'],
[c454c0f]196 datasets: [{
[75151c6]197 label: 'Прва половина на 2023 година',
[c454c0f]198 data: [12, 19, 3, 5, 2, 3],
199 backgroundColor: [
200 'rgba(255, 99, 132, 0.2)',
201 'rgba(54, 162, 235, 0.2)',
202 'rgba(255, 206, 86, 0.2)',
203 'rgba(75, 192, 192, 0.2)',
204 'rgba(153, 102, 255, 0.2)',
205 'rgba(255, 159, 64, 0.2)'
206 ],
207 borderColor: [
208 'rgba(255, 99, 132, 1)',
209 'rgba(54, 162, 235, 1)',
210 'rgba(255, 206, 86, 1)',
211 'rgba(75, 192, 192, 1)',
212 'rgba(153, 102, 255, 1)',
213 'rgba(255, 159, 64, 1)'
214 ],
215 borderWidth: 1
216 }]
217 },
218 options: {
219 scales: {
220 yAxes: [{
221 ticks: {
222 beginAtZero: true
223 }
224 }]
225 }
226 }
227 });
228
229 var chartTwo = document.getElementById('chartTwo');
230 var myLineChart = new Chart(chartTwo, {
231 type: 'line',
232 data: {
[75151c6]233 labels: ['Јануари', 'Фебруари', 'Март', 'Април', 'Мај', 'Јуни'],
[c454c0f]234 datasets: [{
[75151c6]235 label: 'До моменталниот месец',
[c454c0f]236 data: [12, 19, 3, 5, 2, 3],
237 backgroundColor: [
238 'rgba(255, 99, 132, 0.2)',
239 'rgba(54, 162, 235, 0.2)',
240 'rgba(255, 206, 86, 0.2)',
241 'rgba(75, 192, 192, 0.2)',
242 'rgba(153, 102, 255, 0.2)',
243 'rgba(255, 159, 64, 0.2)'
244 ],
245 borderColor: [
246 'rgba(255, 99, 132, 1)',
247 'rgba(54, 162, 235, 1)',
248 'rgba(255, 206, 86, 1)',
249 'rgba(75, 192, 192, 1)',
250 'rgba(153, 102, 255, 1)',
251 'rgba(255, 159, 64, 1)'
252 ],
253 borderWidth: 1
254 }]
255 },
256 options: {
257 scales: {
258 yAxes: [{
259 ticks: {
260 beginAtZero: true
261 }
262 }]
263 }
264 }
265 });
266 </script>
267 </body>
268</html>
Note: See TracBrowser for help on using the repository browser.