fernandocoelho79 commited on
Commit
a320da1
·
verified ·
1 Parent(s): 0297b91

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +479 -19
  3. prompts.txt +0 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Granjafamiliar
3
- emoji: 👁
4
- colorFrom: purple
5
- colorTo: indigo
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: granjafamiliar
3
+ emoji: 🐳
4
+ colorFrom: gray
5
+ colorTo: purple
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,479 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="pt-BR">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>GranjaControl - Gestão Financeira</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
10
+ <style>
11
+ .sidebar {
12
+ transition: all 0.3s;
13
+ }
14
+ .sidebar-collapsed {
15
+ width: 70px;
16
+ }
17
+ .sidebar-collapsed .sidebar-text {
18
+ display: none;
19
+ }
20
+ .sidebar-collapsed .logo-text {
21
+ display: none;
22
+ }
23
+ .sidebar-collapsed .menu-item {
24
+ justify-content: center;
25
+ }
26
+ .content {
27
+ transition: all 0.3s;
28
+ }
29
+ .content-expanded {
30
+ margin-left: 70px;
31
+ }
32
+ </style>
33
+ </head>
34
+ <body class="bg-gray-100 font-sans">
35
+ <div class="flex h-screen overflow-hidden">
36
+ <!-- Sidebar -->
37
+ <div id="sidebar" class="sidebar bg-blue-800 text-white w-64 flex flex-col">
38
+ <div class="p-4 flex items-center space-x-2 border-b border-blue-700">
39
+ <i class="fas fa-egg text-2xl"></i>
40
+ <span class="logo-text text-xl font-bold">GranjaControl</span>
41
+ </div>
42
+ <div class="p-4 border-b border-blue-700 flex items-center space-x-3">
43
+ <img src="https://ui-avatars.com/api/?name=Admin+User&background=random" class="w-10 h-10 rounded-full">
44
+ <div class="sidebar-text">
45
+ <div class="font-medium">Admin User</div>
46
+ <div class="text-xs text-blue-200">Administrador</div>
47
+ </div>
48
+ </div>
49
+ <nav class="flex-1 overflow-y-auto">
50
+ <div class="p-2">
51
+ <div class="menu-item px-3 py-2 rounded flex items-center space-x-3 hover:bg-blue-700 cursor-pointer">
52
+ <i class="fas fa-tachometer-alt"></i>
53
+ <span class="sidebar-text">Dashboard</span>
54
+ </div>
55
+ <div class="menu-item px-3 py-2 rounded flex items-center space-x-3 hover:bg-blue-700 cursor-pointer">
56
+ <i class="fas fa-dollar-sign"></i>
57
+ <span class="sidebar-text">Lançamentos</span>
58
+ </div>
59
+ <div class="menu-item px-3 py-2 rounded flex items-center space-x-3 hover:bg-blue-700 cursor-pointer">
60
+ <i class="fas fa-tags"></i>
61
+ <span class="sidebar-text">Centros de Custo</span>
62
+ </div>
63
+ <div class="menu-item px-3 py-2 rounded flex items-center space-x-3 hover:bg-blue-700 cursor-pointer">
64
+ <i class="fas fa-users"></i>
65
+ <span class="sidebar-text">Usuários</span>
66
+ </div>
67
+ <div class="menu-item px-3 py-2 rounded flex items-center space-x-3 hover:bg-blue-700 cursor-pointer">
68
+ <i class="fas fa-file-export"></i>
69
+ <span class="sidebar-text">Exportar Dados</span>
70
+ </div>
71
+ <div class="menu-item px-3 py-2 rounded flex items-center space-x-3 hover:bg-blue-700 cursor-pointer">
72
+ <i class="fas fa-cog"></i>
73
+ <span class="sidebar-text">Configurações</span>
74
+ </div>
75
+ </div>
76
+ </nav>
77
+ <div class="p-4 border-t border-blue-700">
78
+ <div class="menu-item px-3 py-2 rounded flex items-center space-x-3 hover:bg-blue-700 cursor-pointer">
79
+ <i class="fas fa-sign-out-alt"></i>
80
+ <span class="sidebar-text">Sair</span>
81
+ </div>
82
+ </div>
83
+ <div class="p-2 text-center text-xs text-blue-300">
84
+ <button id="toggle-sidebar" class="p-2 rounded-full hover:bg-blue-700">
85
+ <i class="fas fa-chevron-left"></i>
86
+ </button>
87
+ </div>
88
+ </div>
89
+
90
+ <!-- Main Content -->
91
+ <div id="content" class="content flex-1 flex flex-col overflow-hidden">
92
+ <!-- Top Navigation -->
93
+ <header class="bg-white shadow-sm">
94
+ <div class="px-6 py-4 flex justify-between items-center">
95
+ <h1 class="text-2xl font-semibold text-gray-800">Dashboard</h1>
96
+ <div class="flex items-center space-x-4">
97
+ <div class="relative">
98
+ <i class="fas fa-bell text-gray-500 hover:text-blue-600 cursor-pointer"></i>
99
+ <span class="absolute top-0 right-0 h-2 w-2 rounded-full bg-red-500"></span>
100
+ </div>
101
+ <div class="relative">
102
+ <input type="text" placeholder="Pesquisar..." class="pl-10 pr-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
103
+ <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
104
+ </div>
105
+ </div>
106
+ </div>
107
+ </header>
108
+
109
+ <!-- Dashboard Content -->
110
+ <main class="flex-1 overflow-y-auto p-6">
111
+ <!-- Summary Cards -->
112
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-6">
113
+ <div class="bg-white rounded-lg shadow p-6">
114
+ <div class="flex justify-between items-start">
115
+ <div>
116
+ <p class="text-gray-500">Receitas Totais</p>
117
+ <h3 class="text-2xl font-bold text-green-600">R$ 25,480.00</h3>
118
+ <p class="text-sm text-gray-500 mt-1">+12% em relação ao mês passado</p>
119
+ </div>
120
+ <div class="bg-green-100 p-3 rounded-full">
121
+ <i class="fas fa-arrow-up text-green-600"></i>
122
+ </div>
123
+ </div>
124
+ </div>
125
+ <div class="bg-white rounded-lg shadow p-6">
126
+ <div class="flex justify-between items-start">
127
+ <div>
128
+ <p class="text-gray-500">Despesas Totais</p>
129
+ <h3 class="text-2xl font-bold text-red-600">R$ 18,230.50</h3>
130
+ <p class="text-sm text-gray-500 mt-1">+5% em relação ao mês passado</p>
131
+ </div>
132
+ <div class="bg-red-100 p-3 rounded-full">
133
+ <i class="fas fa-arrow-up text-red-600"></i>
134
+ </div>
135
+ </div>
136
+ </div>
137
+ <div class="bg-white rounded-lg shadow p-6">
138
+ <div class="flex justify-between items-start">
139
+ <div>
140
+ <p class="text-gray-500">Resultado Líquido</p>
141
+ <h3 class="text-2xl font-bold text-blue-600">R$ 7,249.50</h3>
142
+ <p class="text-sm text-gray-500 mt-1">+24% em relação ao mês passado</p>
143
+ </div>
144
+ <div class="bg-blue-100 p-3 rounded-full">
145
+ <i class="fas fa-chart-line text-blue-600"></i>
146
+ </div>
147
+ </div>
148
+ </div>
149
+ </div>
150
+
151
+ <!-- Charts -->
152
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6">
153
+ <div class="bg-white rounded-lg shadow p-6">
154
+ <h2 class="text-lg font-semibold mb-4">Receitas vs Despesas</h2>
155
+ <canvas id="revenueChart" height="250"></canvas>
156
+ </div>
157
+ <div class="bg-white rounded-lg shadow p-6">
158
+ <h2 class="text-lg font-semibold mb-4">Distribuição por Centro de Custo</h2>
159
+ <canvas id="costCenterChart" height="250"></canvas>
160
+ </div>
161
+ </div>
162
+
163
+ <!-- Recent Transactions -->
164
+ <div class="bg-white rounded-lg shadow overflow-hidden">
165
+ <div class="px-6 py-4 border-b border-gray-200 flex justify-between items-center">
166
+ <h2 class="text-lg font-semibold">Últimos Lançamentos</h2>
167
+ <button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg flex items-center space-x-2">
168
+ <i class="fas fa-plus"></i>
169
+ <span>Novo Lançamento</span>
170
+ </button>
171
+ </div>
172
+ <div class="overflow-x-auto">
173
+ <table class="min-w-full divide-y divide-gray-200">
174
+ <thead class="bg-gray-50">
175
+ <tr>
176
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">ID</th>
177
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Data</th>
178
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Centro de Custo</th>
179
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Tipo</th>
180
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Valor</th>
181
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Ações</th>
182
+ </tr>
183
+ </thead>
184
+ <tbody class="bg-white divide-y divide-gray-200">
185
+ <tr>
186
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">#10025</td>
187
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">15/06/2023</td>
188
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Ração</td>
189
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
190
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">Débito</span>
191
+ </td>
192
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">R$ 2,450.00</td>
193
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
194
+ <button class="text-blue-600 hover:text-blue-900 mr-3"><i class="fas fa-edit"></i></button>
195
+ <button class="text-red-600 hover:text-red-900"><i class="fas fa-trash"></i></button>
196
+ </td>
197
+ </tr>
198
+ <tr>
199
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">#10024</td>
200
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">14/06/2023</td>
201
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Venda de Ovos</td>
202
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
203
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Crédito</span>
204
+ </td>
205
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">R$ 3,820.50</td>
206
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
207
+ <button class="text-blue-600 hover:text-blue-900 mr-3"><i class="fas fa-edit"></i></button>
208
+ <button class="text-red-600 hover:text-red-900"><i class="fas fa-trash"></i></button>
209
+ </td>
210
+ </tr>
211
+ <tr>
212
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">#10023</td>
213
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">12/06/2023</td>
214
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Mão de Obra</td>
215
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
216
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">Débito</span>
217
+ </td>
218
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">R$ 1,750.00</td>
219
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
220
+ <button class="text-blue-600 hover:text-blue-900 mr-3"><i class="fas fa-edit"></i></button>
221
+ <button class="text-red-600 hover:text-red-900"><i class="fas fa-trash"></i></button>
222
+ </td>
223
+ </tr>
224
+ <tr>
225
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">#10022</td>
226
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">10/06/2023</td>
227
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Venda de Aves</td>
228
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
229
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Crédito</span>
230
+ </td>
231
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">R$ 5,200.00</td>
232
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
233
+ <button class="text-blue-600 hover:text-blue-900 mr-3"><i class="fas fa-edit"></i></button>
234
+ <button class="text-red-600 hover:text-red-900"><i class="fas fa-trash"></i></button>
235
+ </td>
236
+ </tr>
237
+ <tr>
238
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">#10021</td>
239
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">08/06/2023</td>
240
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Equipamentos</td>
241
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
242
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">Débito</span>
243
+ </td>
244
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">R$ 980.50</td>
245
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
246
+ <button class="text-blue-600 hover:text-blue-900 mr-3"><i class="fas fa-edit"></i></button>
247
+ <button class="text-red-600 hover:text-red-900"><i class="fas fa-trash"></i></button>
248
+ </td>
249
+ </tr>
250
+ </tbody>
251
+ </table>
252
+ </div>
253
+ <div class="px-6 py-4 border-t border-gray-200 flex items-center justify-between">
254
+ <div class="text-sm text-gray-500">
255
+ Mostrando <span class="font-medium">1</span> a <span class="font-medium">5</span> de <span class="font-medium">124</span> resultados
256
+ </div>
257
+ <div class="flex space-x-2">
258
+ <button class="px-3 py-1 border rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50">
259
+ Anterior
260
+ </button>
261
+ <button class="px-3 py-1 border rounded-md text-sm font-medium text-white bg-blue-600 hover:bg-blue-700">
262
+ 1
263
+ </button>
264
+ <button class="px-3 py-1 border rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50">
265
+ 2
266
+ </button>
267
+ <button class="px-3 py-1 border rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50">
268
+ Próximo
269
+ </button>
270
+ </div>
271
+ </div>
272
+ </div>
273
+ </main>
274
+ </div>
275
+ </div>
276
+
277
+ <!-- Modal Novo Lançamento -->
278
+ <div id="newTransactionModal" class="fixed inset-0 bg-gray-600 bg-opacity-50 flex items-center justify-center hidden">
279
+ <div class="bg-white rounded-lg shadow-xl w-full max-w-2xl">
280
+ <div class="px-6 py-4 border-b border-gray-200 flex justify-between items-center">
281
+ <h3 class="text-lg font-semibold">Novo Lançamento</h3>
282
+ <button id="closeModal" class="text-gray-500 hover:text-gray-700">
283
+ <i class="fas fa-times"></i>
284
+ </button>
285
+ </div>
286
+ <div class="p-6">
287
+ <form>
288
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
289
+ <div>
290
+ <label class="block text-sm font-medium text-gray-700 mb-1">Data do Lançamento</label>
291
+ <input type="date" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
292
+ </div>
293
+ <div>
294
+ <label class="block text-sm font-medium text-gray-700 mb-1">Centro de Custo</label>
295
+ <select class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
296
+ <option value="">Selecione...</option>
297
+ <option value="1">Ração</option>
298
+ <option value="2">Equipamentos</option>
299
+ <option value="3">Mão de Obra</option>
300
+ <option value="4">Gasolina</option>
301
+ <option value="5">Comissão</option>
302
+ <option value="6">Venda de Ovos</option>
303
+ <option value="7">Venda de Aves</option>
304
+ </select>
305
+ </div>
306
+ <div>
307
+ <label class="block text-sm font-medium text-gray-700 mb-1">Tipo</label>
308
+ <div class="flex space-x-4">
309
+ <label class="inline-flex items-center">
310
+ <input type="radio" name="transactionType" value="C" class="h-4 w-4 text-blue-600 focus:ring-blue-500">
311
+ <span class="ml-2 text-sm text-gray-700">Crédito (Receita)</span>
312
+ </label>
313
+ <label class="inline-flex items-center">
314
+ <input type="radio" name="transactionType" value="D" class="h-4 w-4 text-blue-600 focus:ring-blue-500">
315
+ <span class="ml-2 text-sm text-gray-700">Débito (Despesa)</span>
316
+ </label>
317
+ </div>
318
+ </div>
319
+ <div>
320
+ <label class="block text-sm font-medium text-gray-700 mb-1">Valor (R$)</label>
321
+ <input type="number" step="0.01" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
322
+ </div>
323
+ <div class="md:col-span-2">
324
+ <label class="block text-sm font-medium text-gray-700 mb-1">Observações</label>
325
+ <textarea rows="3" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"></textarea>
326
+ </div>
327
+ </div>
328
+ </form>
329
+ </div>
330
+ <div class="px-6 py-4 border-t border-gray-200 flex justify-end space-x-3">
331
+ <button class="px-4 py-2 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50">
332
+ Cancelar
333
+ </button>
334
+ <button class="px-4 py-2 border border-transparent rounded-md text-sm font-medium text-white bg-blue-600 hover:bg-blue-700">
335
+ Salvar Lançamento
336
+ </button>
337
+ </div>
338
+ </div>
339
+ </div>
340
+
341
+ <script>
342
+ // Toggle Sidebar
343
+ document.getElementById('toggle-sidebar').addEventListener('click', function() {
344
+ const sidebar = document.getElementById('sidebar');
345
+ const content = document.getElementById('content');
346
+ const toggleIcon = this.querySelector('i');
347
+
348
+ sidebar.classList.toggle('sidebar-collapsed');
349
+ content.classList.toggle('content-expanded');
350
+
351
+ if (sidebar.classList.contains('sidebar-collapsed')) {
352
+ toggleIcon.classList.remove('fa-chevron-left');
353
+ toggleIcon.classList.add('fa-chevron-right');
354
+ } else {
355
+ toggleIcon.classList.remove('fa-chevron-right');
356
+ toggleIcon.classList.add('fa-chevron-left');
357
+ }
358
+ });
359
+
360
+ // Modal Handling
361
+ const modal = document.getElementById('newTransactionModal');
362
+ const closeModal = document.getElementById('closeModal');
363
+ const newTransactionBtn = document.querySelector('table + div button');
364
+
365
+ newTransactionBtn.addEventListener('click', function() {
366
+ modal.classList.remove('hidden');
367
+ });
368
+
369
+ closeModal.addEventListener('click', function() {
370
+ modal.classList.add('hidden');
371
+ });
372
+
373
+ window.addEventListener('click', function(event) {
374
+ if (event.target === modal) {
375
+ modal.classList.add('hidden');
376
+ }
377
+ });
378
+
379
+ // Charts
380
+ // Revenue vs Expenses Chart
381
+ const revenueCtx = document.getElementById('revenueChart').getContext('2d');
382
+ const revenueChart = new Chart(revenueCtx, {
383
+ type: 'bar',
384
+ data: {
385
+ labels: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun'],
386
+ datasets: [
387
+ {
388
+ label: 'Receitas',
389
+ data: [12000, 15000, 18000, 21000, 24000, 25000],
390
+ backgroundColor: 'rgba(16, 185, 129, 0.7)',
391
+ borderColor: 'rgba(16, 185, 129, 1)',
392
+ borderWidth: 1
393
+ },
394
+ {
395
+ label: 'Despesas',
396
+ data: [8000, 9500, 12000, 15000, 17000, 18000],
397
+ backgroundColor: 'rgba(239, 68, 68, 0.7)',
398
+ borderColor: 'rgba(239, 68, 68, 1)',
399
+ borderWidth: 1
400
+ }
401
+ ]
402
+ },
403
+ options: {
404
+ responsive: true,
405
+ scales: {
406
+ y: {
407
+ beginAtZero: true,
408
+ ticks: {
409
+ callback: function(value) {
410
+ return 'R$ ' + value.toLocaleString();
411
+ }
412
+ }
413
+ }
414
+ },
415
+ plugins: {
416
+ tooltip: {
417
+ callbacks: {
418
+ label: function(context) {
419
+ let label = context.dataset.label || '';
420
+ if (label) {
421
+ label += ': ';
422
+ }
423
+ label += 'R$ ' + context.raw.toLocaleString();
424
+ return label;
425
+ }
426
+ }
427
+ }
428
+ }
429
+ }
430
+ });
431
+
432
+ // Cost Center Distribution Chart
433
+ const costCenterCtx = document.getElementById('costCenterChart').getContext('2d');
434
+ const costCenterChart = new Chart(costCenterCtx, {
435
+ type: 'doughnut',
436
+ data: {
437
+ labels: ['Ração', 'Equipamentos', 'Mão de Obra', 'Gasolina', 'Comissão'],
438
+ datasets: [{
439
+ data: [35, 20, 25, 10, 10],
440
+ backgroundColor: [
441
+ 'rgba(59, 130, 246, 0.7)',
442
+ 'rgba(16, 185, 129, 0.7)',
443
+ 'rgba(245, 158, 11, 0.7)',
444
+ 'rgba(139, 92, 246, 0.7)',
445
+ 'rgba(239, 68, 68, 0.7)'
446
+ ],
447
+ borderColor: [
448
+ 'rgba(59, 130, 246, 1)',
449
+ 'rgba(16, 185, 129, 1)',
450
+ 'rgba(245, 158, 11, 1)',
451
+ 'rgba(139, 92, 246, 1)',
452
+ 'rgba(239, 68, 68, 1)'
453
+ ],
454
+ borderWidth: 1
455
+ }]
456
+ },
457
+ options: {
458
+ responsive: true,
459
+ plugins: {
460
+ legend: {
461
+ position: 'right',
462
+ },
463
+ tooltip: {
464
+ callbacks: {
465
+ label: function(context) {
466
+ const label = context.label || '';
467
+ const value = context.raw || 0;
468
+ const total = context.dataset.data.reduce((a, b) => a + b, 0);
469
+ const percentage = Math.round((value / total) * 100);
470
+ return `${label}: ${percentage}% (R$ ${(18230.5 * percentage/100).toLocaleString(undefined, {maximumFractionDigits: 2})})`;
471
+ }
472
+ }
473
+ }
474
+ }
475
+ }
476
+ });
477
+ </script>
478
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=fernandocoelho79/granjafamiliar" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
479
+ </html>
prompts.txt ADDED
File without changes