Spaces:
Running
Running
Add 3 files
Browse files- README.md +7 -5
- index.html +902 -19
- prompts.txt +1 -0
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
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: prstore38-sst-menager
|
3 |
+
emoji: 🐳
|
4 |
+
colorFrom: yellow
|
5 |
+
colorTo: gray
|
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,902 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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>SST Document Manager - Cadastro de Terceiros</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 |
+
<style>
|
10 |
+
.gradient-bg {
|
11 |
+
background: linear-gradient(135deg, #10b981 0%, #ffffff 50%, #1f2937 100%);
|
12 |
+
}
|
13 |
+
.document-card:hover {
|
14 |
+
transform: translateY(-5px);
|
15 |
+
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
|
16 |
+
}
|
17 |
+
.sidebar {
|
18 |
+
transition: all 0.3s ease;
|
19 |
+
}
|
20 |
+
.chat-bubble {
|
21 |
+
animation: fadeIn 0.3s ease-in-out;
|
22 |
+
}
|
23 |
+
@keyframes fadeIn {
|
24 |
+
from { opacity: 0; transform: translateY(10px); }
|
25 |
+
to { opacity: 1; transform: translateY(0); }
|
26 |
+
}
|
27 |
+
.pulse-alert {
|
28 |
+
animation: pulse 2s infinite;
|
29 |
+
}
|
30 |
+
@keyframes pulse {
|
31 |
+
0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
|
32 |
+
70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
|
33 |
+
100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
|
34 |
+
}
|
35 |
+
.slide-in {
|
36 |
+
animation: slideIn 0.3s ease-out;
|
37 |
+
}
|
38 |
+
@keyframes slideIn {
|
39 |
+
from { transform: translateX(100%); opacity: 0; }
|
40 |
+
to { transform: translateX(0); opacity: 1; }
|
41 |
+
}
|
42 |
+
.input-error {
|
43 |
+
border-color: #ef4444;
|
44 |
+
}
|
45 |
+
.error-message {
|
46 |
+
color: #ef4444;
|
47 |
+
font-size: 0.75rem;
|
48 |
+
margin-top: 0.25rem;
|
49 |
+
}
|
50 |
+
</style>
|
51 |
+
</head>
|
52 |
+
<body class="bg-gray-50 font-sans">
|
53 |
+
<!-- Main Container -->
|
54 |
+
<div class="flex h-screen overflow-hidden">
|
55 |
+
<!-- Sidebar -->
|
56 |
+
<div class="sidebar bg-gray-800 text-white w-64 flex-shrink-0 flex flex-col">
|
57 |
+
<div class="p-4 flex items-center justify-center border-b border-gray-700">
|
58 |
+
<div class="flex items-center">
|
59 |
+
<div class="w-10 h-10 rounded-full bg-green-500 flex items-center justify-center mr-3">
|
60 |
+
<i class="fas fa-shield-alt text-white"></i>
|
61 |
+
</div>
|
62 |
+
<span class="text-xl font-bold">SST Manager</span>
|
63 |
+
</div>
|
64 |
+
</div>
|
65 |
+
<div class="p-4 border-b border-gray-700">
|
66 |
+
<div class="flex items-center space-x-3">
|
67 |
+
<div class="w-10 h-10 rounded-full bg-green-100 flex items-center justify-center">
|
68 |
+
<i class="fas fa-user text-green-800"></i>
|
69 |
+
</div>
|
70 |
+
<div>
|
71 |
+
<p class="font-medium">Admin User</p>
|
72 |
+
<p class="text-xs text-gray-400">[email protected]</p>
|
73 |
+
</div>
|
74 |
+
</div>
|
75 |
+
</div>
|
76 |
+
<nav class="flex-1 overflow-y-auto">
|
77 |
+
<div class="p-2">
|
78 |
+
<p class="text-xs uppercase text-gray-400 mb-2 px-2">Menu Principal</p>
|
79 |
+
<a href="#" class="flex items-center space-x-2 px-3 py-2 rounded hover:bg-gray-700 text-gray-300 hover:text-white">
|
80 |
+
<i class="fas fa-tachometer-alt w-5"></i>
|
81 |
+
<span>Dashboard</span>
|
82 |
+
</a>
|
83 |
+
<a href="#" class="flex items-center space-x-2 px-3 py-2 rounded hover:bg-gray-700 text-gray-300 hover:text-white mt-1">
|
84 |
+
<i class="fas fa-file-alt w-5"></i>
|
85 |
+
<span>Documentos SST</span>
|
86 |
+
</a>
|
87 |
+
<a href="#" class="flex items-center space-x-2 px-3 py-2 rounded hover:bg-gray-700 text-gray-300 hover:text-white mt-1">
|
88 |
+
<i class="fas fa-leaf w-5"></i>
|
89 |
+
<span>Ambientais</span>
|
90 |
+
</a>
|
91 |
+
<a href="terceiros.html" class="flex items-center space-x-2 px-3 py-2 rounded bg-gray-700 text-white mt-1">
|
92 |
+
<i class="fas fa-building w-5"></i>
|
93 |
+
<span>Terceiros</span>
|
94 |
+
</a>
|
95 |
+
<a href="#" class="flex items-center space-x-2 px-3 py-2 rounded hover:bg-gray-700 text-gray-300 hover:text-white mt-1">
|
96 |
+
<i class="fas fa-cog w-5"></i>
|
97 |
+
<span>Configurações</span>
|
98 |
+
</a>
|
99 |
+
</div>
|
100 |
+
<div class="p-2 mt-4">
|
101 |
+
<p class="text-xs uppercase text-gray-400 mb-2 px-2">Ramo de Atividade</p>
|
102 |
+
<div class="px-2">
|
103 |
+
<select class="w-full bg-gray-700 text-white rounded px-3 py-2 text-sm border border-gray-600 focus:outline-none focus:ring-1 focus:ring-green-500">
|
104 |
+
<option>Construção Civil</option>
|
105 |
+
<option>Indústria</option>
|
106 |
+
<option>Comércio</option>
|
107 |
+
<option>Serviços</option>
|
108 |
+
<option>Saúde</option>
|
109 |
+
</select>
|
110 |
+
</div>
|
111 |
+
</div>
|
112 |
+
</nav>
|
113 |
+
<div class="p-4 border-t border-gray-700">
|
114 |
+
<button class="w-full bg-gray-700 hover:bg-gray-600 text-white py-2 rounded flex items-center justify-center space-x-2">
|
115 |
+
<i class="fas fa-sign-out-alt"></i>
|
116 |
+
<span>Sair</span>
|
117 |
+
</button>
|
118 |
+
</div>
|
119 |
+
</div>
|
120 |
+
|
121 |
+
<!-- Main Content -->
|
122 |
+
<div class="flex-1 flex flex-col overflow-hidden">
|
123 |
+
<!-- Top Navigation -->
|
124 |
+
<header class="bg-white border-b border-gray-200 flex items-center justify-between px-6 py-3">
|
125 |
+
<div class="flex items-center">
|
126 |
+
<button id="sidebarToggle" class="text-gray-500 mr-4 md:hidden">
|
127 |
+
<i class="fas fa-bars"></i>
|
128 |
+
</button>
|
129 |
+
<h1 class="text-xl font-semibold text-gray-800">Cadastro de Terceiros</h1>
|
130 |
+
</div>
|
131 |
+
<div class="flex items-center space-x-4">
|
132 |
+
<div class="relative">
|
133 |
+
<button class="text-gray-500 hover:text-gray-700">
|
134 |
+
<i class="fas fa-bell"></i>
|
135 |
+
</button>
|
136 |
+
<span class="absolute top-0 right-0 w-2 h-2 bg-red-500 rounded-full"></span>
|
137 |
+
</div>
|
138 |
+
<div class="relative">
|
139 |
+
<button class="text-gray-500 hover:text-gray-700">
|
140 |
+
<i class="fas fa-envelope"></i>
|
141 |
+
</button>
|
142 |
+
<span class="absolute top-0 right-0 w-2 h-2 bg-blue-500 rounded-full"></span>
|
143 |
+
</div>
|
144 |
+
<div class="w-8 h-8 rounded-full bg-green-100 flex items-center justify-center">
|
145 |
+
<i class="fas fa-user text-green-800"></i>
|
146 |
+
</div>
|
147 |
+
</div>
|
148 |
+
</header>
|
149 |
+
|
150 |
+
<!-- Dashboard Content -->
|
151 |
+
<main class="flex-1 overflow-y-auto p-6 bg-gray-50">
|
152 |
+
<!-- Terceiros Content -->
|
153 |
+
<div class="grid grid-cols-1 lg:grid-cols-4 gap-6">
|
154 |
+
<!-- Lista de Terceiros -->
|
155 |
+
<div class="lg:col-span-1 bg-white rounded-lg shadow overflow-hidden">
|
156 |
+
<div class="px-6 py-4 border-b border-gray-200 flex justify-between items-center">
|
157 |
+
<h2 class="text-lg font-semibold text-gray-800">Terceiros Cadastrados</h2>
|
158 |
+
<span class="text-xs bg-green-100 text-green-800 px-2 py-1 rounded-full">24</span>
|
159 |
+
</div>
|
160 |
+
<div class="divide-y divide-gray-200 max-h-[calc(100vh-220px)] overflow-y-auto">
|
161 |
+
<!-- Terceiro Item -->
|
162 |
+
<div class="p-4 hover:bg-gray-50 cursor-pointer transition flex items-center justify-between group">
|
163 |
+
<div class="flex items-center space-x-3">
|
164 |
+
<div class="w-10 h-10 rounded-full bg-blue-100 flex items-center justify-center">
|
165 |
+
<i class="fas fa-building text-blue-600"></i>
|
166 |
+
</div>
|
167 |
+
<div>
|
168 |
+
<p class="font-medium group-hover:text-blue-600">Construtora ABC</p>
|
169 |
+
<p class="text-xs text-gray-500">CNPJ: 12.345.678/0001-99</p>
|
170 |
+
</div>
|
171 |
+
</div>
|
172 |
+
<span class="text-xs bg-green-100 text-green-800 px-2 py-1 rounded-full">Ativo</span>
|
173 |
+
</div>
|
174 |
+
|
175 |
+
<!-- Terceiro Item -->
|
176 |
+
<div class="p-4 hover:bg-gray-50 cursor-pointer transition flex items-center justify-between group">
|
177 |
+
<div class="flex items-center space-x-3">
|
178 |
+
<div class="w-10 h-10 rounded-full bg-purple-100 flex items-center justify-center">
|
179 |
+
<i class="fas fa-tools text-purple-600"></i>
|
180 |
+
</div>
|
181 |
+
<div>
|
182 |
+
<p class="font-medium group-hover:text-blue-600">Manutenção Industrial</p>
|
183 |
+
<p class="text-xs text-gray-500">CNPJ: 98.765.432/0001-11</p>
|
184 |
+
</div>
|
185 |
+
</div>
|
186 |
+
<span class="text-xs bg-yellow-100 text-yellow-800 px-2 py-1 rounded-full">Pendente</span>
|
187 |
+
</div>
|
188 |
+
|
189 |
+
<!-- Terceiro Item -->
|
190 |
+
<div class="p-4 hover:bg-gray-50 cursor-pointer transition flex items-center justify-between group">
|
191 |
+
<div class="flex items-center space-x-3">
|
192 |
+
<div class="w-10 h-10 rounded-full bg-red-100 flex items-center justify-center">
|
193 |
+
<i class="fas fa-truck text-red-600"></i>
|
194 |
+
</div>
|
195 |
+
<div>
|
196 |
+
<p class="font-medium group-hover:text-blue-600">Transportes XYZ</p>
|
197 |
+
<p class="text-xs text-gray-500">CNPJ: 45.678.123/0001-44</p>
|
198 |
+
</div>
|
199 |
+
</div>
|
200 |
+
<span class="text-xs bg-red-100 text-red-800 px-2 py-1 rounded-full">Vencido</span>
|
201 |
+
</div>
|
202 |
+
|
203 |
+
<!-- Terceiro Item -->
|
204 |
+
<div class="p-4 hover:bg-gray-50 cursor-pointer transition flex items-center justify-between group">
|
205 |
+
<div class="flex items-center space-x-3">
|
206 |
+
<div class="w-10 h-10 rounded-full bg-green-100 flex items-center justify-center">
|
207 |
+
<i class="fas fa-bolt text-green-600"></i>
|
208 |
+
</div>
|
209 |
+
<div>
|
210 |
+
<p class="font-medium group-hover:text-blue-600">Energia Solar Ltda</p>
|
211 |
+
<p class="text-xs text-gray-500">CNPJ: 78.912.345/0001-66</p>
|
212 |
+
</div>
|
213 |
+
</div>
|
214 |
+
<span class="text-xs bg-green-100 text-green-800 px-2 py-1 rounded-full">Ativo</span>
|
215 |
+
</div>
|
216 |
+
|
217 |
+
<!-- Terceiro Item -->
|
218 |
+
<div class="p-4 hover:bg-gray-50 cursor-pointer transition flex items-center justify-between group">
|
219 |
+
<div class="flex items-center space-x-3">
|
220 |
+
<div class="w-10 h-10 rounded-full bg-orange-100 flex items-center justify-center">
|
221 |
+
<i class="fas fa-shield-alt text-orange-600"></i>
|
222 |
+
</div>
|
223 |
+
<div>
|
224 |
+
<p class="font-medium group-hover:text-blue-600">Segurança Total</p>
|
225 |
+
<p class="text-xs text-gray-500">CNPJ: 34.567.891/0001-22</p>
|
226 |
+
</div>
|
227 |
+
</div>
|
228 |
+
<span class="text-xs bg-green-100 text-green-800 px-2 py-1 rounded-full">Ativo</span>
|
229 |
+
</div>
|
230 |
+
|
231 |
+
<!-- Botão Adicionar -->
|
232 |
+
<div class="p-4">
|
233 |
+
<button id="addTerceiroBtn" class="w-full bg-green-600 hover:bg-green-700 text-white py-2 rounded flex items-center justify-center space-x-2 transition">
|
234 |
+
<i class="fas fa-plus"></i>
|
235 |
+
<span>Adicionar Terceiro</span>
|
236 |
+
</button>
|
237 |
+
</div>
|
238 |
+
</div>
|
239 |
+
</div>
|
240 |
+
|
241 |
+
<!-- Formulário de Cadastro -->
|
242 |
+
<div class="lg:col-span-3">
|
243 |
+
<div id="formContainer" class="bg-white rounded-lg shadow overflow-hidden slide-in">
|
244 |
+
<div class="px-6 py-4 border-b border-gray-200 flex justify-between items-center">
|
245 |
+
<h2 class="text-lg font-semibold text-gray-800">Cadastrar Novo Terceiro</h2>
|
246 |
+
<div class="flex items-center space-x-2">
|
247 |
+
<span class="text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded-full">Obrigatório</span>
|
248 |
+
<span class="text-xs bg-gray-100 text-gray-800 px-2 py-1 rounded-full">Todos os campos</span>
|
249 |
+
</div>
|
250 |
+
</div>
|
251 |
+
<form id="terceiroForm" class="p-6">
|
252 |
+
<!-- Dados Básicos -->
|
253 |
+
<div class="mb-8">
|
254 |
+
<h3 class="text-md font-semibold text-gray-700 mb-4 flex items-center">
|
255 |
+
<i class="fas fa-info-circle text-blue-500 mr-2"></i>
|
256 |
+
Dados Básicos
|
257 |
+
</h3>
|
258 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
259 |
+
<div>
|
260 |
+
<label for="razaoSocial" class="block text-sm font-medium text-gray-700 mb-1">Razão Social *</label>
|
261 |
+
<input type="text" id="razaoSocial" name="razaoSocial" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500" required>
|
262 |
+
<p id="razaoSocialError" class="error-message hidden">Campo obrigatório</p>
|
263 |
+
</div>
|
264 |
+
<div>
|
265 |
+
<label for="nomeFantasia" class="block text-sm font-medium text-gray-700 mb-1">Nome Fantasia</label>
|
266 |
+
<input type="text" id="nomeFantasia" name="nomeFantasia" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500">
|
267 |
+
</div>
|
268 |
+
<div>
|
269 |
+
<label for="cnpj" class="block text-sm font-medium text-gray-700 mb-1">CNPJ *</label>
|
270 |
+
<input type="text" id="cnpj" name="cnpj" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500" required>
|
271 |
+
<p id="cnpjError" class="error-message hidden">CNPJ inválido</p>
|
272 |
+
</div>
|
273 |
+
<div>
|
274 |
+
<label for="inscricaoEstadual" class="block text-sm font-medium text-gray-700 mb-1">Inscrição Estadual</label>
|
275 |
+
<input type="text" id="inscricaoEstadual" name="inscricaoEstadual" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500">
|
276 |
+
</div>
|
277 |
+
</div>
|
278 |
+
</div>
|
279 |
+
|
280 |
+
<!-- Contato -->
|
281 |
+
<div class="mb-8">
|
282 |
+
<h3 class="text-md font-semibold text-gray-700 mb-4 flex items-center">
|
283 |
+
<i class="fas fa-address-book text-blue-500 mr-2"></i>
|
284 |
+
Contato
|
285 |
+
</h3>
|
286 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
287 |
+
<div>
|
288 |
+
<label for="email" class="block text-sm font-medium text-gray-700 mb-1">E-mail *</label>
|
289 |
+
<input type="email" id="email" name="email" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500" required>
|
290 |
+
<p id="emailError" class="error-message hidden">E-mail inválido</p>
|
291 |
+
</div>
|
292 |
+
<div>
|
293 |
+
<label for="telefone" class="block text-sm font-medium text-gray-700 mb-1">Telefone *</label>
|
294 |
+
<input type="tel" id="telefone" name="telefone" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500" required>
|
295 |
+
<p id="telefoneError" class="error-message hidden">Telefone inválido</p>
|
296 |
+
</div>
|
297 |
+
<div>
|
298 |
+
<label for="responsavel" class="block text-sm font-medium text-gray-700 mb-1">Responsável</label>
|
299 |
+
<input type="text" id="responsavel" name="responsavel" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500">
|
300 |
+
</div>
|
301 |
+
<div>
|
302 |
+
<label for="celularResponsavel" class="block text-sm font-medium text-gray-700 mb-1">Celular do Responsável</label>
|
303 |
+
<input type="tel" id="celularResponsavel" name="celularResponsavel" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500">
|
304 |
+
</div>
|
305 |
+
</div>
|
306 |
+
</div>
|
307 |
+
|
308 |
+
<!-- Endereço -->
|
309 |
+
<div class="mb-8">
|
310 |
+
<h3 class="text-md font-semibold text-gray-700 mb-4 flex items-center">
|
311 |
+
<i class="fas fa-map-marker-alt text-blue-500 mr-2"></i>
|
312 |
+
Endereço
|
313 |
+
</h3>
|
314 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
315 |
+
<div>
|
316 |
+
<label for="cep" class="block text-sm font-medium text-gray-700 mb-1">CEP</label>
|
317 |
+
<div class="flex">
|
318 |
+
<input type="text" id="cep" name="cep" class="flex-1 px-3 py-2 border border-gray-300 rounded-l-md focus:outline-none focus:ring-1 focus:ring-blue-500">
|
319 |
+
<button type="button" id="buscarCep" class="bg-blue-500 text-white px-3 py-2 rounded-r-md hover:bg-blue-600 transition">
|
320 |
+
<i class="fas fa-search"></i>
|
321 |
+
</button>
|
322 |
+
</div>
|
323 |
+
</div>
|
324 |
+
<div>
|
325 |
+
<label for="logradouro" class="block text-sm font-medium text-gray-700 mb-1">Logradouro</label>
|
326 |
+
<input type="text" id="logradouro" name="logradouro" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500">
|
327 |
+
</div>
|
328 |
+
<div>
|
329 |
+
<label for="numero" class="block text-sm font-medium text-gray-700 mb-1">Número</label>
|
330 |
+
<input type="text" id="numero" name="numero" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500">
|
331 |
+
</div>
|
332 |
+
<div>
|
333 |
+
<label for="complemento" class="block text-sm font-medium text-gray-700 mb-1">Complemento</label>
|
334 |
+
<input type="text" id="complemento" name="complemento" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500">
|
335 |
+
</div>
|
336 |
+
<div>
|
337 |
+
<label for="bairro" class="block text-sm font-medium text-gray-700 mb-1">Bairro</label>
|
338 |
+
<input type="text" id="bairro" name="bairro" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500">
|
339 |
+
</div>
|
340 |
+
<div>
|
341 |
+
<label for="cidade" class="block text-sm font-medium text-gray-700 mb-1">Cidade</label>
|
342 |
+
<input type="text" id="cidade" name="cidade" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500">
|
343 |
+
</div>
|
344 |
+
<div>
|
345 |
+
<label for="estado" class="block text-sm font-medium text-gray-700 mb-1">Estado</label>
|
346 |
+
<select id="estado" name="estado" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500">
|
347 |
+
<option value="">Selecione...</option>
|
348 |
+
<option value="AC">Acre</option>
|
349 |
+
<option value="AL">Alagoas</option>
|
350 |
+
<option value="AP">Amapá</option>
|
351 |
+
<option value="AM">Amazonas</option>
|
352 |
+
<option value="BA">Bahia</option>
|
353 |
+
<option value="CE">Ceará</option>
|
354 |
+
<option value="DF">Distrito Federal</option>
|
355 |
+
<option value="ES">Espírito Santo</option>
|
356 |
+
<option value="GO">Goiás</option>
|
357 |
+
<option value="MA">Maranhão</option>
|
358 |
+
<option value="MT">Mato Grosso</option>
|
359 |
+
<option value="MS">Mato Grosso do Sul</option>
|
360 |
+
<option value="MG">Minas Gerais</option>
|
361 |
+
<option value="PA">Pará</option>
|
362 |
+
<option value="PB">Paraíba</option>
|
363 |
+
<option value="PR">Paraná</option>
|
364 |
+
<option value="PE">Pernambuco</option>
|
365 |
+
<option value="PI">Piauí</option>
|
366 |
+
<option value="RJ">Rio de Janeiro</option>
|
367 |
+
<option value="RN">Rio Grande do Norte</option>
|
368 |
+
<option value="RS">Rio Grande do Sul</option>
|
369 |
+
<option value="RO">Rondônia</option>
|
370 |
+
<option value="RR">Roraima</option>
|
371 |
+
<option value="SC">Santa Catarina</option>
|
372 |
+
<option value="SP">São Paulo</option>
|
373 |
+
<option value="SE">Sergipe</option>
|
374 |
+
<option value="TO">Tocantins</option>
|
375 |
+
</select>
|
376 |
+
</div>
|
377 |
+
</div>
|
378 |
+
</div>
|
379 |
+
|
380 |
+
<!-- Informações Adicionais -->
|
381 |
+
<div class="mb-8">
|
382 |
+
<h3 class="text-md font-semibold text-gray-700 mb-4 flex items-center">
|
383 |
+
<i class="fas fa-clipboard-list text-blue-500 mr-2"></i>
|
384 |
+
Informações Adicionais
|
385 |
+
</h3>
|
386 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
387 |
+
<div>
|
388 |
+
<label for="ramoAtividade" class="block text-sm font-medium text-gray-700 mb-1">Ramo de Atividade *</label>
|
389 |
+
<select id="ramoAtividade" name="ramoAtividade" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500" required>
|
390 |
+
<option value="">Selecione...</option>
|
391 |
+
<option value="construcao">Construção Civil</option>
|
392 |
+
<option value="industria">Indústria</option>
|
393 |
+
<option value="comercio">Comércio</option>
|
394 |
+
<option value="servicos">Serviços</option>
|
395 |
+
<option value="transporte">Transporte</option>
|
396 |
+
<option value="limpeza">Limpeza</option>
|
397 |
+
<option value="seguranca">Segurança</option>
|
398 |
+
<option value="alimentacao">Alimentação</option>
|
399 |
+
<option value="outro">Outro</option>
|
400 |
+
</select>
|
401 |
+
<p id="ramoAtividadeError" class="error-message hidden">Campo obrigatório</p>
|
402 |
+
</div>
|
403 |
+
<div>
|
404 |
+
<label for="tipoServico" class="block text-sm font-medium text-gray-700 mb-1">Tipo de Serviço Prestado</label>
|
405 |
+
<input type="text" id="tipoServico" name="tipoServico" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500">
|
406 |
+
</div>
|
407 |
+
<div class="md:col-span-2">
|
408 |
+
<label for="observacoes" class="block text-sm font-medium text-gray-700 mb-1">Observações</label>
|
409 |
+
<textarea id="observacoes" name="observacoes" rows="3" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500"></textarea>
|
410 |
+
</div>
|
411 |
+
</div>
|
412 |
+
</div>
|
413 |
+
|
414 |
+
<!-- Documentos Obrigatórios -->
|
415 |
+
<div class="mb-8">
|
416 |
+
<h3 class="text-md font-semibold text-gray-700 mb-4 flex items-center">
|
417 |
+
<i class="fas fa-file-contract text-blue-500 mr-2"></i>
|
418 |
+
Documentos Obrigatórios
|
419 |
+
</h3>
|
420 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
421 |
+
<div>
|
422 |
+
<label class="block text-sm font-medium text-gray-700 mb-2">Documentos</label>
|
423 |
+
<div class="space-y-2">
|
424 |
+
<div class="flex items-center">
|
425 |
+
<input type="checkbox" id="docCarteiraTrabalho" name="docCarteiraTrabalho" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
|
426 |
+
<label for="docCarteiraTrabalho" class="ml-2 block text-sm text-gray-700">Carteira de Trabalho</label>
|
427 |
+
</div>
|
428 |
+
<div class="flex items-center">
|
429 |
+
<input type="checkbox" id="docASO" name="docASO" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
|
430 |
+
<label for="docASO" class="ml-2 block text-sm text-gray-700">ASO</label>
|
431 |
+
</div>
|
432 |
+
<div class="flex items-center">
|
433 |
+
<input type="checkbox" id="docEPI" name="docEPI" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
|
434 |
+
<label for="docEPI" class="ml-2 block text-sm text-gray-700">EPI</label>
|
435 |
+
</div>
|
436 |
+
</div>
|
437 |
+
</div>
|
438 |
+
<div>
|
439 |
+
<label for="validadeDocumentos" class="block text-sm font-medium text-gray-700 mb-1">Validade dos Documentos</label>
|
440 |
+
<input type="date" id="validadeDocumentos" name="validadeDocumentos" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500">
|
441 |
+
</div>
|
442 |
+
</div>
|
443 |
+
</div>
|
444 |
+
|
445 |
+
<!-- Status -->
|
446 |
+
<div class="mb-8">
|
447 |
+
<h3 class="text-md font-semibold text-gray-700 mb-4 flex items-center">
|
448 |
+
<i class="fas fa-toggle-on text-blue-500 mr-2"></i>
|
449 |
+
Status
|
450 |
+
</h3>
|
451 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
452 |
+
<div>
|
453 |
+
<label for="statusTerceiro" class="block text-sm font-medium text-gray-700 mb-1">Status *</label>
|
454 |
+
<select id="statusTerceiro" name="statusTerceiro" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500" required>
|
455 |
+
<option value="ativo" selected>Ativo</option>
|
456 |
+
<option value="inativo">Inativo</option>
|
457 |
+
<option value="pendente">Pendente</option>
|
458 |
+
<option value="bloqueado">Bloqueado</option>
|
459 |
+
</select>
|
460 |
+
</div>
|
461 |
+
<div>
|
462 |
+
<label for="dataCadastro" class="block text-sm font-medium text-gray-700 mb-1">Data de Cadastro</label>
|
463 |
+
<input type="date" id="dataCadastro" name="dataCadastro" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500">
|
464 |
+
</div>
|
465 |
+
</div>
|
466 |
+
</div>
|
467 |
+
|
468 |
+
<!-- Botões de Ação -->
|
469 |
+
<div class="flex justify-end space-x-4 pt-6 border-t border-gray-200">
|
470 |
+
<button type="button" id="cancelarBtn" class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50 transition">
|
471 |
+
Cancelar
|
472 |
+
</button>
|
473 |
+
<button type="submit" class="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition flex items-center">
|
474 |
+
<i class="fas fa-save mr-2"></i>
|
475 |
+
Salvar Terceiro
|
476 |
+
</button>
|
477 |
+
</div>
|
478 |
+
</form>
|
479 |
+
</div>
|
480 |
+
|
481 |
+
<!-- Visualização de Terceiro (Oculto por padrão) -->
|
482 |
+
<div id="viewContainer" class="bg-white rounded-lg shadow overflow-hidden hidden">
|
483 |
+
<div class="px-6 py-4 border-b border-gray-200 flex justify-between items-center">
|
484 |
+
<h2 class="text-lg font-semibold text-gray-800">Detalhes do Terceiro</h2>
|
485 |
+
<div class="flex items-center space-x-2">
|
486 |
+
<span class="text-xs bg-green-100 text-green-800 px-2 py-1 rounded-full">Ativo</span>
|
487 |
+
<button id="editTerceiroBtn" class="text-blue-600 hover:text-blue-800">
|
488 |
+
<i class="fas fa-edit"></i>
|
489 |
+
</button>
|
490 |
+
</div>
|
491 |
+
</div>
|
492 |
+
<div class="p-6">
|
493 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
|
494 |
+
<!-- Dados Básicos -->
|
495 |
+
<div>
|
496 |
+
<h3 class="text-md font-semibold text-gray-700 mb-4 flex items-center">
|
497 |
+
<i class="fas fa-info-circle text-blue-500 mr-2"></i>
|
498 |
+
Dados Básicos
|
499 |
+
</h3>
|
500 |
+
<div class="space-y-3">
|
501 |
+
<div>
|
502 |
+
<p class="text-sm text-gray-500">Razão Social</p>
|
503 |
+
<p class="font-medium">Construtora ABC Ltda</p>
|
504 |
+
</div>
|
505 |
+
<div>
|
506 |
+
<p class="text-sm text-gray-500">Nome Fantasia</p>
|
507 |
+
<p class="font-medium">Construtora ABC</p>
|
508 |
+
</div>
|
509 |
+
<div>
|
510 |
+
<p class="text-sm text-gray-500">CNPJ</p>
|
511 |
+
<p class="font-medium">12.345.678/0001-99</p>
|
512 |
+
</div>
|
513 |
+
<div>
|
514 |
+
<p class="text-sm text-gray-500">Inscrição Estadual</p>
|
515 |
+
<p class="font-medium">123.456.789.112</p>
|
516 |
+
</div>
|
517 |
+
</div>
|
518 |
+
</div>
|
519 |
+
|
520 |
+
<!-- Contato -->
|
521 |
+
<div>
|
522 |
+
<h3 class="text-md font-semibold text-gray-700 mb-4 flex items-center">
|
523 |
+
<i class="fas fa-address-book text-blue-500 mr-2"></i>
|
524 |
+
Contato
|
525 |
+
</h3>
|
526 |
+
<div class="space-y-3">
|
527 |
+
<div>
|
528 |
+
<p class="text-sm text-gray-500">E-mail</p>
|
529 |
+
<p class="font-medium">[email protected]</p>
|
530 |
+
</div>
|
531 |
+
<div>
|
532 |
+
<p class="text-sm text-gray-500">Telefone</p>
|
533 |
+
<p class="font-medium">(11) 1234-5678</p>
|
534 |
+
</div>
|
535 |
+
<div>
|
536 |
+
<p class="text-sm text-gray-500">Responsável</p>
|
537 |
+
<p class="font-medium">João da Silva</p>
|
538 |
+
</div>
|
539 |
+
<div>
|
540 |
+
<p class="text-sm text-gray-500">Celular do Responsável</p>
|
541 |
+
<p class="font-medium">(11) 98765-4321</p>
|
542 |
+
</div>
|
543 |
+
</div>
|
544 |
+
</div>
|
545 |
+
|
546 |
+
<!-- Endereço -->
|
547 |
+
<div>
|
548 |
+
<h3 class="text-md font-semibold text-gray-700 mb-4 flex items-center">
|
549 |
+
<i class="fas fa-map-marker-alt text-blue-500 mr-2"></i>
|
550 |
+
Endereço
|
551 |
+
</h3>
|
552 |
+
<div class="space-y-3">
|
553 |
+
<div>
|
554 |
+
<p class="text-sm text-gray-500">CEP</p>
|
555 |
+
<p class="font-medium">01234-567</p>
|
556 |
+
</div>
|
557 |
+
<div>
|
558 |
+
<p class="text-sm text-gray-500">Logradouro</p>
|
559 |
+
<p class="font-medium">Rua das Construções, 123</p>
|
560 |
+
</div>
|
561 |
+
<div>
|
562 |
+
<p class="text-sm text-gray-500">Complemento</p>
|
563 |
+
<p class="font-medium">Sala 45</p>
|
564 |
+
</div>
|
565 |
+
<div>
|
566 |
+
<p class="text-sm text-gray-500">Bairro</p>
|
567 |
+
<p class="font-medium">Centro</p>
|
568 |
+
</div>
|
569 |
+
<div>
|
570 |
+
<p class="text-sm text-gray-500">Cidade/Estado</p>
|
571 |
+
<p class="font-medium">São Paulo/SP</p>
|
572 |
+
</div>
|
573 |
+
</div>
|
574 |
+
</div>
|
575 |
+
|
576 |
+
<!-- Informações Adicionais -->
|
577 |
+
<div>
|
578 |
+
<h3 class="text-md font-semibold text-gray-700 mb-4 flex items-center">
|
579 |
+
<i class="fas fa-clipboard-list text-blue-500 mr-2"></i>
|
580 |
+
Informações Adicionais
|
581 |
+
</h3>
|
582 |
+
<div class="space-y-3">
|
583 |
+
<div>
|
584 |
+
<p class="text-sm text-gray-500">Ramo de Atividade</p>
|
585 |
+
<p class="font-medium">Construção Civil</p>
|
586 |
+
</div>
|
587 |
+
<div>
|
588 |
+
<p class="text-sm text-gray-500">Tipo de Serviço Prestado</p>
|
589 |
+
<p class="font-medium">Construção de edifícios comerciais</p>
|
590 |
+
</div>
|
591 |
+
<div>
|
592 |
+
<p class="text-sm text-gray-500">Observações</p>
|
593 |
+
<p class="font-medium">Empresa especializada em estruturas metálicas.</p>
|
594 |
+
</div>
|
595 |
+
<div>
|
596 |
+
<p class="text-sm text-gray-500">Documentos Obrigatórios</p>
|
597 |
+
<p class="font-medium">Carteira de Trabalho, ASO, EPI</p>
|
598 |
+
</div>
|
599 |
+
<div>
|
600 |
+
<p class="text-sm text-gray-500">Validade dos Documentos</p>
|
601 |
+
<p class="font-medium">31/12/2023</p>
|
602 |
+
</div>
|
603 |
+
</div>
|
604 |
+
</div>
|
605 |
+
</div>
|
606 |
+
|
607 |
+
<!-- Botões de Ação -->
|
608 |
+
<div class="flex justify-end space-x-4 pt-6 mt-6 border-t border-gray-200">
|
609 |
+
<button id="backToListBtn" class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50 transition">
|
610 |
+
Voltar para Lista
|
611 |
+
</button>
|
612 |
+
<button class="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition flex items-center">
|
613 |
+
<i class="fas fa-print mr-2"></i>
|
614 |
+
Imprimir Ficha
|
615 |
+
</button>
|
616 |
+
</div>
|
617 |
+
</div>
|
618 |
+
</div>
|
619 |
+
</div>
|
620 |
+
</div>
|
621 |
+
</main>
|
622 |
+
</div>
|
623 |
+
</div>
|
624 |
+
|
625 |
+
<!-- Modal de Confirmação -->
|
626 |
+
<div id="confirmModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
|
627 |
+
<div class="bg-white rounded-lg shadow-xl w-full max-w-md">
|
628 |
+
<div class="px-6 py-4 border-b border-gray-200">
|
629 |
+
<h3 class="text-lg font-semibold text-gray-800">Confirmar Exclusão</h3>
|
630 |
+
</div>
|
631 |
+
<div class="p-6">
|
632 |
+
<p class="text-gray-700 mb-6">Tem certeza que deseja excluir este terceiro? Esta ação não pode ser desfeita.</p>
|
633 |
+
<div class="flex justify-end space-x-3">
|
634 |
+
<button id="cancelDeleteBtn" class="px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50">
|
635 |
+
Cancelar
|
636 |
+
</button>
|
637 |
+
<button id="confirmDeleteBtn" class="px-4 py-2 bg-red-600 hover:bg-red-700 text-white rounded-lg">
|
638 |
+
Confirmar Exclusão
|
639 |
+
</button>
|
640 |
+
</div>
|
641 |
+
</div>
|
642 |
+
</div>
|
643 |
+
</div>
|
644 |
+
|
645 |
+
<!-- Modal de Sucesso -->
|
646 |
+
<div id="successModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
|
647 |
+
<div class="bg-white rounded-lg shadow-xl w-full max-w-md">
|
648 |
+
<div class="px-6 py-4 border-b border-gray-200 flex justify-between items-center">
|
649 |
+
<h3 class="text-lg font-semibold text-gray-800">Sucesso!</h3>
|
650 |
+
<button id="closeSuccessModal" class="text-gray-500 hover:text-gray-700">
|
651 |
+
<i class="fas fa-times"></i>
|
652 |
+
</button>
|
653 |
+
</div>
|
654 |
+
<div class="p-6 text-center">
|
655 |
+
<div class="w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4">
|
656 |
+
<i class="fas fa-check text-green-600 text-2xl"></i>
|
657 |
+
</div>
|
658 |
+
<p class="text-gray-700 mb-6" id="successMessage">Terceiro cadastrado com sucesso!</p>
|
659 |
+
<button id="okSuccessBtn" class="px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg">
|
660 |
+
OK
|
661 |
+
</button>
|
662 |
+
</div>
|
663 |
+
</div>
|
664 |
+
</div>
|
665 |
+
|
666 |
+
<script>
|
667 |
+
// Toggle sidebar on mobile
|
668 |
+
document.getElementById('sidebarToggle').addEventListener('click', function() {
|
669 |
+
document.querySelector('.sidebar').classList.toggle('hidden');
|
670 |
+
document.querySelector('.sidebar').classList.toggle('block');
|
671 |
+
});
|
672 |
+
|
673 |
+
// Máscaras para os campos
|
674 |
+
document.addEventListener('DOMContentLoaded', function() {
|
675 |
+
// Máscara para CNPJ
|
676 |
+
const cnpjInput = document.getElementById('cnpj');
|
677 |
+
cnpjInput.addEventListener('input', function(e) {
|
678 |
+
let value = e.target.value.replace(/\D/g, '');
|
679 |
+
|
680 |
+
if (value.length > 2) {
|
681 |
+
value = value.substring(0, 2) + '.' + value.substring(2);
|
682 |
+
}
|
683 |
+
if (value.length > 6) {
|
684 |
+
value = value.substring(0, 6) + '.' + value.substring(6);
|
685 |
+
}
|
686 |
+
if (value.length > 10) {
|
687 |
+
value = value.substring(0, 10) + '/' + value.substring(10);
|
688 |
+
}
|
689 |
+
if (value.length > 15) {
|
690 |
+
value = value.substring(0, 15) + '-' + value.substring(15);
|
691 |
+
}
|
692 |
+
if (value.length > 18) {
|
693 |
+
value = value.substring(0, 18);
|
694 |
+
}
|
695 |
+
|
696 |
+
e.target.value = value;
|
697 |
+
});
|
698 |
+
|
699 |
+
// Máscara para Telefone
|
700 |
+
const telefoneInput = document.getElementById('telefone');
|
701 |
+
telefoneInput.addEventListener('input', function(e) {
|
702 |
+
let value = e.target.value.replace(/\D/g, '');
|
703 |
+
|
704 |
+
if (value.length > 0) {
|
705 |
+
value = '(' + value.substring(0, 2) + ') ' + value.substring(2);
|
706 |
+
}
|
707 |
+
if (value.length > 10) {
|
708 |
+
value = value.substring(0, 10) + '-' + value.substring(10, 14);
|
709 |
+
}
|
710 |
+
if (value.length > 15) {
|
711 |
+
value = value.substring(0, 15);
|
712 |
+
}
|
713 |
+
|
714 |
+
e.target.value = value;
|
715 |
+
});
|
716 |
+
|
717 |
+
// Máscara para Celular
|
718 |
+
const celularInput = document.getElementById('celularResponsavel');
|
719 |
+
celularInput.addEventListener('input', function(e) {
|
720 |
+
let value = e.target.value.replace(/\D/g, '');
|
721 |
+
|
722 |
+
if (value.length > 0) {
|
723 |
+
value = '(' + value.substring(0, 2) + ') ' + value.substring(2);
|
724 |
+
}
|
725 |
+
if (value.length > 10) {
|
726 |
+
value = value.substring(0, 10) + '-' + value.substring(10, 15);
|
727 |
+
}
|
728 |
+
if (value.length > 16) {
|
729 |
+
value = value.substring(0, 16);
|
730 |
+
}
|
731 |
+
|
732 |
+
e.target.value = value;
|
733 |
+
});
|
734 |
+
|
735 |
+
// Máscara para CEP
|
736 |
+
const cepInput = document.getElementById('cep');
|
737 |
+
cepInput.addEventListener('input', function(e) {
|
738 |
+
let value = e.target.value.replace(/\D/g, '');
|
739 |
+
|
740 |
+
if (value.length > 5) {
|
741 |
+
value = value.substring(0, 5) + '-' + value.substring(5, 8);
|
742 |
+
}
|
743 |
+
if (value.length > 9) {
|
744 |
+
value = value.substring(0, 9);
|
745 |
+
}
|
746 |
+
|
747 |
+
e.target.value = value;
|
748 |
+
});
|
749 |
+
});
|
750 |
+
|
751 |
+
// Buscar CEP
|
752 |
+
document.getElementById('buscarCep').addEventListener('click', function() {
|
753 |
+
const cep = document.getElementById('cep').value.replace(/\D/g, '');
|
754 |
+
|
755 |
+
if (cep.length !== 8) {
|
756 |
+
alert('CEP inválido! Digite um CEP com 8 dígitos.');
|
757 |
+
return;
|
758 |
+
}
|
759 |
+
|
760 |
+
// Simulação de busca de CEP (em uma aplicação real, seria uma chamada API)
|
761 |
+
setTimeout(() => {
|
762 |
+
document.getElementById('logradouro').value = 'Rua das Construções';
|
763 |
+
document.getElementById('bairro').value = 'Centro';
|
764 |
+
document.getElementById('cidade').value = 'São Paulo';
|
765 |
+
document.getElementById('estado').value = 'SP';
|
766 |
+
}, 1000);
|
767 |
+
});
|
768 |
+
|
769 |
+
// Validação do formulário
|
770 |
+
document.getElementById('terceiroForm').addEventListener('submit', function(e) {
|
771 |
+
e.preventDefault();
|
772 |
+
|
773 |
+
let isValid = true;
|
774 |
+
|
775 |
+
// Validação Razão Social
|
776 |
+
const razaoSocial = document.getElementById('razaoSocial');
|
777 |
+
const razaoSocialError = document.getElementById('razaoSocialError');
|
778 |
+
if (!razaoSocial.value.trim()) {
|
779 |
+
razaoSocial.classList.add('input-error');
|
780 |
+
razaoSocialError.classList.remove('hidden');
|
781 |
+
isValid = false;
|
782 |
+
} else {
|
783 |
+
razaoSocial.classList.remove('input-error');
|
784 |
+
razaoSocialError.classList.add('hidden');
|
785 |
+
}
|
786 |
+
|
787 |
+
// Validação CNPJ
|
788 |
+
const cnpj = document.getElementById('cnpj');
|
789 |
+
const cnpjError = document.getElementById('cnpjError');
|
790 |
+
if (!cnpj.value.trim() || cnpj.value.replace(/\D/g, '').length !== 14) {
|
791 |
+
cnpj.classList.add('input-error');
|
792 |
+
cnpjError.classList.remove('hidden');
|
793 |
+
isValid = false;
|
794 |
+
} else {
|
795 |
+
cnpj.classList.remove('input-error');
|
796 |
+
cnpjError.classList.add('hidden');
|
797 |
+
}
|
798 |
+
|
799 |
+
// Validação Email
|
800 |
+
const email = document.getElementById('email');
|
801 |
+
const emailError = document.getElementById('emailError');
|
802 |
+
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
803 |
+
if (!email.value.trim() || !emailRegex.test(email.value)) {
|
804 |
+
email.classList.add('input-error');
|
805 |
+
emailError.classList.remove('hidden');
|
806 |
+
isValid = false;
|
807 |
+
} else {
|
808 |
+
email.classList.remove('input-error');
|
809 |
+
emailError.classList.add('hidden');
|
810 |
+
}
|
811 |
+
|
812 |
+
// Validação Telefone
|
813 |
+
const telefone = document.getElementById('telefone');
|
814 |
+
const telefoneError = document.getElementById('telefoneError');
|
815 |
+
if (!telefone.value.trim() || telefone.value.replace(/\D/g, '').length < 10) {
|
816 |
+
telefone.classList.add('input-error');
|
817 |
+
telefoneError.classList.remove('hidden');
|
818 |
+
isValid = false;
|
819 |
+
} else {
|
820 |
+
telefone.classList.remove('input-error');
|
821 |
+
telefoneError.classList.add('hidden');
|
822 |
+
}
|
823 |
+
|
824 |
+
// Validação Ramo de Atividade
|
825 |
+
const ramoAtividade = document.getElementById('ramoAtividade');
|
826 |
+
const ramoAtividadeError = document.getElementById('ramoAtividadeError');
|
827 |
+
if (!ramoAtividade.value) {
|
828 |
+
ramoAtividade.classList.add('input-error');
|
829 |
+
ramoAtividadeError.classList.remove('hidden');
|
830 |
+
isValid = false;
|
831 |
+
} else {
|
832 |
+
ramoAtividade.classList.remove('input-error');
|
833 |
+
ramoAtividadeError.classList.add('hidden');
|
834 |
+
}
|
835 |
+
|
836 |
+
if (isValid) {
|
837 |
+
// Simular envio do formulário
|
838 |
+
setTimeout(() => {
|
839 |
+
document.getElementById('successMessage').textContent = 'Terceiro cadastrado com sucesso!';
|
840 |
+
document.getElementById('successModal').classList.remove('hidden');
|
841 |
+
}, 1000);
|
842 |
+
}
|
843 |
+
});
|
844 |
+
|
845 |
+
// Navegação entre formulário e visualização
|
846 |
+
document.getElementById('addTerceiroBtn').addEventListener('click', function() {
|
847 |
+
document.getElementById('formContainer').classList.remove('hidden');
|
848 |
+
document.getElementById('viewContainer').classList.add('hidden');
|
849 |
+
document.getElementById('terceiroForm').reset();
|
850 |
+
});
|
851 |
+
|
852 |
+
document.getElementById('cancelarBtn').addEventListener('click', function() {
|
853 |
+
document.getElementById('formContainer').classList.add('hidden');
|
854 |
+
document.getElementById('viewContainer').classList.remove('hidden');
|
855 |
+
});
|
856 |
+
|
857 |
+
document.getElementById('editTerceiroBtn').addEventListener('click', function() {
|
858 |
+
document.getElementById('formContainer').classList.remove('hidden');
|
859 |
+
document.getElementById('viewContainer').classList.add('hidden');
|
860 |
+
});
|
861 |
+
|
862 |
+
document.getElementById('backToListBtn').addEventListener('click', function() {
|
863 |
+
document.getElementById('formContainer').classList.add('hidden');
|
864 |
+
document.getElementById('viewContainer').classList.add('hidden');
|
865 |
+
});
|
866 |
+
|
867 |
+
// Modal de confirmação
|
868 |
+
document.getElementById('confirmDeleteBtn').addEventListener('click', function() {
|
869 |
+
document.getElementById('confirmModal').classList.add('hidden');
|
870 |
+
document.getElementById('successMessage').textContent = 'Terceiro excluído com sucesso!';
|
871 |
+
document.getElementById('successModal').classList.remove('hidden');
|
872 |
+
});
|
873 |
+
|
874 |
+
document.getElementById('cancelDeleteBtn').addEventListener('click', function() {
|
875 |
+
document.getElementById('confirmModal').classList.add('hidden');
|
876 |
+
});
|
877 |
+
|
878 |
+
// Modal de sucesso
|
879 |
+
document.getElementById('okSuccessBtn').addEventListener('click', function() {
|
880 |
+
document.getElementById('successModal').classList.add('hidden');
|
881 |
+
document.getElementById('formContainer').classList.add('hidden');
|
882 |
+
document.getElementById('viewContainer').classList.remove('hidden');
|
883 |
+
});
|
884 |
+
|
885 |
+
document.getElementById('closeSuccessModal').addEventListener('click', function() {
|
886 |
+
document.getElementById('successModal').classList.add('hidden');
|
887 |
+
document.getElementById('formContainer').classList.add('hidden');
|
888 |
+
document.getElementById('viewContainer').classList.remove('hidden');
|
889 |
+
});
|
890 |
+
|
891 |
+
// Selecionar terceiro da lista
|
892 |
+
document.querySelectorAll('.group').forEach(item => {
|
893 |
+
item.addEventListener('click', function() {
|
894 |
+
if (!this.querySelector('button')) { // Não disparar quando clicar no botão de adicionar
|
895 |
+
document.getElementById('formContainer').classList.add('hidden');
|
896 |
+
document.getElementById('viewContainer').classList.remove('hidden');
|
897 |
+
}
|
898 |
+
});
|
899 |
+
});
|
900 |
+
</script>
|
901 |
+
<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=Prstore38/prstore38-sst-menager" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
902 |
+
</html>
|
prompts.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Precizamos fazer melhorias nao esta aparecendo a tela de cadastro de terceiros
|