File size: 19,845 Bytes
1566d24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
<!DOCTYPE html>
<html lang="pt-BR" class="scroll-smooth">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Dashboard | Agenda+</title>
    <link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>📅</text></svg>">
    <script src="https://cdn.tailwindcss.com"></script>
    <script>
        tailwind.config = {
            darkMode: 'class',
            theme: {
                extend: {
                    colors: {
                        primary: {
                            50: '#f0f9ff',
                            100: '#e0f2fe',
                            200: '#bae6fd',
                            300: '#7dd3fc',
                            400: '#38bdf8',
                            500: '#0ea5e9',
                            600: '#0284c7',
                            700: '#0369a1',
                            800: '#075985',
                            900: '#0c4a6e',
                        }
                    }
                }
            }
        }
    </script>
    <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
    <script src="https://unpkg.com/feather-icons"></script>
    <script src="https://cdn.jsdelivr.net/npm/fullcalendar@6.1.9/index.global.min.js"></script>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
        body {
            font-family: 'Inter', sans-serif;
        }
        .sidebar {
            width: 280px;
            transition: all 0.3s ease;
        }
        .main-content {
            margin-left: 280px;
            transition: all 0.3s ease;
        }
        .sidebar.collapsed {
            width: 80px;
        }
        .main-content.expanded {
            margin-left: 80px;
        }
        .fc .fc-toolbar-title {
            font-size: 1.25rem;
            font-weight: 600;
        }
        .fc .fc-button {
            background-color: #0ea5e9;
            border-color: #0ea5e9;
        }
        .fc .fc-button:hover {
            background-color: #0284c7;
            border-color: #0284c7;
        }
    </style>
</head>
<body class="bg-gray-50 dark:bg-gray-900">
    <div class="flex">
        <!-- Sidebar -->
        <div class="sidebar bg-white dark:bg-gray-800 shadow-lg fixed h-full overflow-y-auto">
            <div class="p-4 border-b border-gray-200 dark:border-gray-700">
                <div class="flex items-center justify-between">
                    <div class="flex items-center">
                        <span class="text-2xl mr-2">📅</span>
                        <span class="text-xl font-bold text-primary-600 dark:text-primary-400">Agenda+</span>
                    </div>
                    <button id="sidebarToggle" class="p-1 rounded-md text-gray-400 hover:text-gray-500">
                        <i data-feather="chevron-left" class="h-5 w-5"></i>
                    </button>
                </div>
            </div>
            
            <nav class="mt-8 px-4 space-y-2">
                <a href="/dashboard" class="flex items-center px-4 py-2 text-gray-700 dark:text-gray-200 bg-primary-100 dark:bg-primary-900 rounded-md">
                    <i data-feather="home" class="h-5 w-5 mr-3"></i>
                    <span>Dashboard</span>
                </a>
                <a href="/agenda" class="flex items-center px-4 py-2 text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md">
                    <i data-feather="calendar" class="h-5 w-5 mr-3"></i>
                    <span>Agenda</span>
                </a>
                <a href="/pacientes" class="flex items-center px-4 py-2 text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md">
                    <i data-feather="users" class="h-5 w-5 mr-3"></i>
                    <span>Pacientes</span>
                </a>
                <a href="/profissionais" class="flex items-center px-4 py-2 text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md">
                    <i data-feather="user-check" class="h-5 w-5 mr-3"></i>
                    <span>Profissionais</span>
                </a>
                <a href="/configuracoes" class="flex items-center px-4 py-2 text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md">
                    <i data-feather="settings" class="h-5 w-5 mr-3"></i>
                    <span>Configurações</span>
                </a>
                <a href="/relatorios" class="flex items-center px-4 py-2 text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md">
                    <i data-feather="bar-chart-2" class="h-5 w-5 mr-3"></i>
                    <span>Relatórios</span>
                </a>
            </nav>
            
            <div class="absolute bottom-0 w-full p-4 border-t border-gray-200 dark:border-gray-700">
                <div class="flex items-center space-x-3">
                    <img class="h-8 w-8 rounded-full" src="http://static.photos/people/200x200/4" alt="User">
                    <div class="flex-1 min-w-0">
                        <p class="text-sm font-medium text-gray-900 dark:text-white truncate">Dr. João Silva</p>
                        <p class="text-sm text-gray-500 dark:text-gray-400 truncate">joao@clinica.com</p>
                    </div>
                    <button class="p-1 rounded-md text-gray-400 hover:text-gray-500">
                        <i data-feather="log-out" class="h-5 w-5"></i>
                    </button>
                </div>
            </div>
        </div>

        <!-- Main Content -->
        <div class="main-content flex-1 min-h-screen">
            <!-- Header -->
            <header class="bg-white dark:bg-gray-800 shadow-sm">
                <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
                    <div class="flex justify-between h-16 items-center">
                        <div>
                            <h1 class="text-2xl font-bold text-gray-900 dark:text-white">Dashboard</h1>
                            <p class="text-sm text-gray-500 dark:text-gray-400">Bem-vindo de volta, Dr. João!</p>
                        </div>
                        <div class="flex items-center space-x-4">
                            <button class="p-2 rounded-md text-gray-400 hover:text-gray-500">
                                <i data-feather="bell" class="h-6 w-6"></i>
                            </button>
                            <div class="relative inline-block w-10 mr-2 align-middle select-none">
                                <input type="checkbox" name="toggle" id="toggle" class="toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer"/>
                                <label for="toggle" class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 cursor-pointer"></label>
                            </div>
                        </div>
                    </div>
                </div>
            </header>

            <!-- Stats -->
            <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
                <div class="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-4">
                    <!-- Total Appointments -->
                    <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-6">
                        <div class="flex items-center">
                            <div class="flex-shrink-0 bg-blue-500 rounded-md p-3">
                                <i data-feather="calendar" class="h-6 w-6 text-white"></i>
                            </div>
                            <div class="ml-5 w-0 flex-1">
                                <dl>
                                    <dt class="text-sm font-medium text-gray-500 dark:text-gray-400 truncate">Consultas Hoje</dt>
                                    <dd class="flex items-baseline">
                                        <div class="text-2xl font-semibold text-gray-900 dark:text-white">12</div>
                                    </dd>
                                </dl>
                            </div>
                        </div>
                    </div>

                    <!-- Revenue -->
                    <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-6">
                        <div class="flex items-center">
                            <div class="flex-shrink-0 bg-green-500 rounded-md p-3">
                                <i data-feather="dollar-sign" class="h-6 w-6 text-white"></i>
                            </div>
                            <div class="ml-5 w-0 flex-1">
                                <dl>
                                    <dt class="text-sm font-medium text-gray-500 dark:text-gray-400 truncate">Receita do Mês</dt>
                                    <dd class="flex items-baseline">
                                        <div class="text-2xl font-semibold text-gray-900 dark:text-white">R$ 8.240</div>
                                    </dd>
                                </dl>
                            </div>
                        </div>
                    </div>

                    <!-- Patient Satisfaction -->
                    <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-6">
                        <div class="flex items-center">
                            <div class="flex-shrink-0 bg-yellow-500 rounded-md p-3">
                                <i data-feather="star" class="h-6 w-6 text-white"></i>
                            </div>
                            <div class="ml-5 w-0 flex-1">
                                <dl>
                                    <dt class="text-sm font-medium text-gray-500 dark:text-gray-400 truncate">Satisfação</dt>
                                    <dd class="flex items-baseline">
                                        <div class="text-2xl font-semibold text-gray-900 dark:text-white">94%</div>
                                    </dd>
                                </dl>
                            </div>
                        </div>
                    </div>

                    <!-- No-shows -->
                    <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-6">
                        <div class="flex items-center">
                            <div class="flex-shrink-0 bg-red-500 rounded-md p-3">
                                <i data-feather="x-circle" class="h-6 w-6 text-white"></i>
                            </div>
                            <div class="ml-5 w-0 flex-1">
                                <dl>
                                    <dt class="text-sm font-medium text-gray-500 dark:text-gray-400 truncate">Faltas</dt>
                                    <dd class="flex items-baseline">
                                        <div class="text-2xl font-semibold text-gray-900 dark:text-white">2</div>
                                    </dd>
                                </dl>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Calendar and Upcoming Appointments -->
            <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pb-8">
                <div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
                    <!-- Calendar -->
                    <div class="bg-white dark:bg-gray-800 rounded-lg shadow">
                        <div class="p-6">
                            <h2 class="text-lg font-medium text-gray-900 dark:text-white mb-4">Calendário</h2>
                            <div id="calendar"></div>
                        </div>
                    </div>

                    <!-- Upcoming Appointments -->
                    <div class="bg-white dark:bg-gray-800 rounded-lg shadow">
                        <div class="p-6">
                            <h2 class="text-lg font-medium text-gray-900 dark:text-white mb-4">Próximas Consultas</h2>
                            <div class="space-y-4">
                                <!-- Appointment 1 -->
                                <div class="flex items-center p-4 bg-gray-50 dark:bg-gray-700 rounded-lg">
                                    <div class="flex-shrink-0 bg-blue-100 dark:bg-blue-900 rounded-full p-3">
                                        <i data-feather="clock" class="h-5 w-5 text-blue-600 dark:text-blue-400"></i>
                                    </div>
                                    <div class="ml-4 flex-1">
                                        <p class="text-sm font-medium text-gray-900 dark:text-white">Maria Santos</p>
                                        <p class="text-sm text-gray-500 dark:text-gray-400">09:00 - Cardiologia</p>
                                    </div>
                                    <button class="p-2 text-gray-400 hover:text-gray-500">
                                        <i data-feather="more-vertical" class="h-5 w-5"></i>
                                    </button>
                                </div>

                                <!-- Appointment 2 -->
                                <div class="flex items-center p-4 bg-gray-50 dark:bg-gray-700 rounded-lg">
                                    <div class="flex-shrink-0 bg-green-100 dark:bg-green-900 rounded-full p-3">
                                        <i data-feather="clock" class="h-5 w-5 text-green-600 dark:text-green-400"></i>
                                    </div>
                                    <div class="ml-4 flex-1">
                                        <p class="text-sm font-medium text-gray-900 dark:text-white">João Oliveira</p>
                                        <p class="text-sm text-gray-500 dark:text-gray-400">10:30 - Psicologia</p>
                                    </div>
                                    <button class="p-2 text-gray-400 hover:text-gray-500">
                                        <i data-feather="more-vertical" class="h-5 w-5"></i>
                                    </button>
                                </div>

                                <!-- Appointment 3 -->
                                <div class="flex items-center p-4 bg-gray-50 dark:bg-gray-700 rounded-lg">
                                    <div class="flex-shrink-0 bg-yellow-100 dark:bg-yellow-900 rounded-full p-3">
                                        <i data-feather="clock" class="h-5 w-5 text-yellow-600 dark:text-yellow-400"></i>
                                    </div>
                                    <div class="ml-4 flex-1">
                                        <p class="text-sm font-medium text-gray-900 dark:text-white">Ana Costa</p>
                                        <p class="text-sm text-gray-500 dark:text-gray-400">14:00 - Dermatologia</p>
                                    </div>
                                    <button class="p-2 text-gray-400 hover:text-gray-500">
                                        <i data-feather="more-vertical" class="h-5 w-5"></i>
                                    </button>
                                </div>

                                <!-- Appointment 4 -->
                                <div class="flex items-center p-4 bg-gray-50 dark:bg-gray-700 rounded-lg">
                                    <div class="flex-shrink-0 bg-purple-100 dark:bg-purple-900 rounded-full p-3">
                                        <i data-feather="clock" class="h-5 w-5 text-purple-600 dark:text-purple-400"></i>
                                    </div>
                                    <div class="ml-4 flex-1">
                                        <p class="text-sm font-medium text-gray-900 dark:text-white">Pedro Almeida</p>
                                        <p class="text-sm text-gray-500 dark:text-gray-400">16:00 - Odontologia</p>
                                    </div>
                                    <button class="p-2 text-gray-400 hover:text-gray-500">
                                        <i data-feather="more-vertical" class="h-5 w-5"></i>
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        // Initialize Feather Icons
        feather.replace();
        
        // Dark mode toggle
        const toggle = document.getElementById('toggle');
        
        // Check for saved user preference, if any, on load of the website
        if (localStorage.getItem('darkMode') === 'true') {
            document.documentElement.classList.add('dark');
            toggle.checked = true;
        } else {
            document.documentElement.classList.remove('dark');
            toggle.checked = false;
        }
        
        // Toggle dark mode
        toggle.addEventListener('change', function() {
            if (this.checked) {
                document.documentElement.classList.add('dark');
                localStorage.setItem('darkMode', 'true');
            } else {
                document.documentElement.classList.remove('dark');
                localStorage.setItem('darkMode', 'false');
            }
        });

        // Sidebar toggle
        const sidebarToggle = document.getElementById('sidebarToggle');
        const sidebar = document.querySelector('.sidebar');
        const mainContent = document.querySelector('.main-content');
        
        sidebarToggle.addEventListener('click', function() {
            sidebar.classList.toggle('collapsed');
            mainContent.classList.toggle('expanded');
            
            const icon = this.querySelector('i');
            if (sidebar.classList.contains('collapsed')) {
                feather.replace(icon, 'chevron-right');
            } else {
                feather.replace(icon, 'chevron-left');
            }
        });

        // Initialize Calendar
        document.addEventListener('DOMContentLoaded', function() {
            const calendarEl = document.getElementById('calendar');
            const calendar = new FullCalendar.Calendar(calendarEl, {
                initialView: 'dayGridMonth',
                headerToolbar: {
                    left: 'prev,next today',
                    center: 'title',
                    right: 'dayGridMonth,timeGridWeek,timeGridDay'
                },
                events: [
                    {
                        title: 'Consulta - Maria Santos',
                        start: new Date().toISOString().split('T')[0] + 'T09:00:00',
                        end: new Date().toISOString().split('T')[0] + 'T10:00:00',
                        color: '#0ea5e9'
                    },
                    {
                        title: 'Consulta - João Oliveira',
                        start: new Date().toISOString().split('T')[0] + 'T10:30:00',
                        end: new Date().toISOString().split('T')[0] + 'T11:30:00',
                        color: '#10b981'
                    },
                    {
                        title: 'Reunião - Equipe',
                        start: new Date().toISOString().split('T')[0] + 'T12:00:00',
                        end: new Date().toISOString().split('T')[0] + 'T13:00:00',
                        color: '#f59e0b'
                    }
                ]
            });
            calendar.render();
        });
    </script>
</body>
</html>