From ce94eb53b363579a1c8d7a116e39013af7773722 Mon Sep 17 00:00:00 2001 From: killer-cf Date: Fri, 21 Nov 2025 14:02:22 -0300 Subject: [PATCH 01/13] generated file --- packages/backend/convex/_generated/api.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/convex/_generated/api.d.ts b/packages/backend/convex/_generated/api.d.ts index 14944ae..eab189a 100644 --- a/packages/backend/convex/_generated/api.d.ts +++ b/packages/backend/convex/_generated/api.d.ts @@ -29,8 +29,8 @@ import type * as cursos from "../cursos.js"; import type * as dashboard from "../dashboard.js"; import type * as documentos from "../documentos.js"; import type * as email from "../email.js"; -import type * as enderecosMarcacao from "../enderecosMarcacao.js"; import type * as empresas from "../empresas.js"; +import type * as enderecosMarcacao from "../enderecosMarcacao.js"; import type * as ferias from "../ferias.js"; import type * as funcionarioEnderecos from "../funcionarioEnderecos.js"; import type * as funcionarios from "../funcionarios.js"; @@ -84,8 +84,8 @@ declare const fullApi: ApiFromModules<{ dashboard: typeof dashboard; documentos: typeof documentos; email: typeof email; - enderecosMarcacao: typeof enderecosMarcacao; empresas: typeof empresas; + enderecosMarcacao: typeof enderecosMarcacao; ferias: typeof ferias; funcionarioEnderecos: typeof funcionarioEnderecos; funcionarios: typeof funcionarios; -- 2.49.1 From b8a2e67f3a89253d90b83792140ca56ed46a5274 Mon Sep 17 00:00:00 2001 From: killer-cf Date: Sat, 22 Nov 2025 10:25:43 -0300 Subject: [PATCH 02/13] refactor: Update email configuration page to load data once and improve error handling, and add Svelte agent rules documentation. --- .agent/rules/svelte-rules.md | 28 + .../ti/configuracoes-email/+page.svelte | 1034 ++++++++--------- 2 files changed, 530 insertions(+), 532 deletions(-) create mode 100644 .agent/rules/svelte-rules.md diff --git a/.agent/rules/svelte-rules.md b/.agent/rules/svelte-rules.md new file mode 100644 index 0000000..30b100a --- /dev/null +++ b/.agent/rules/svelte-rules.md @@ -0,0 +1,28 @@ +--- +trigger: glob +globs: **/*.svelte.ts,**/*.svelte +--- + +You are able to use the Svelte MCP server, where you have access to comprehensive Svelte 5 and SvelteKit documentation. Here's how to use the available tools effectively: + +## Available MCP Tools: + +### 1. list-sections + +Use this FIRST to discover all available documentation sections. Returns a structured list with titles, use_cases, and paths. +When asked about Svelte or SvelteKit topics, ALWAYS use this tool at the start of the chat to find relevant sections. + +### 2. get-documentation + +Retrieves full documentation content for specific sections. Accepts single or multiple sections. +After calling the list-sections tool, you MUST analyze the returned documentation sections (especially the use_cases field) and then use the get-documentation tool to fetch ALL documentation sections that are relevant for the user's task. + +### 3. svelte-autofixer + +Analyzes Svelte code and returns issues and suggestions. +You MUST use this tool whenever writing Svelte code before sending it to the user. Keep calling it until no issues or suggestions are returned. + +### 4. playground-link + +Generates a Svelte Playground link with the provided code. +After completing the code, ask the user if they want a playground link. Only call this tool after user confirmation and NEVER if code was written to files in their project. diff --git a/apps/web/src/routes/(dashboard)/ti/configuracoes-email/+page.svelte b/apps/web/src/routes/(dashboard)/ti/configuracoes-email/+page.svelte index 15a7f1a..3e316e6 100644 --- a/apps/web/src/routes/(dashboard)/ti/configuracoes-email/+page.svelte +++ b/apps/web/src/routes/(dashboard)/ti/configuracoes-email/+page.svelte @@ -1,574 +1,544 @@ -
- -
-
-
- - - -
-
-

- Configurações de Email (SMTP) -

-

- Configurar servidor de email para envio de notificações -

-
-
-
+
+ +
+
+
+ + + +
+
+

Configurações de Email (SMTP)

+

+ Configurar servidor de email para envio de notificações +

+
+
+
- - {#if mensagem} -
- - {#if mensagem.tipo === "success"} - - {:else} - - {/if} - - {mensagem.texto} -
- {/if} + + {#if mensagem} +
+ + {#if mensagem.tipo === 'success'} + + {:else} + + {/if} + + {mensagem.texto} +
+ {/if} - - {#if isLoading} -
- - Carregando configurações... -
- {/if} + + {#if isLoading} +
+ + Carregando configurações... +
+ {/if} - - {#if !isLoading} -
- - {#if configAtual?.data?.ativo} - - {:else} - - {/if} - - - Status: - {statusConfig} - {#if configAtual?.data?.testadoEm} - - Última conexão testada em {new Date( - configAtual.data.testadoEm, - ).toLocaleString("pt-BR")} - {/if} - -
- {/if} + + {#if !isLoading} +
+ + {#if configAtual?.data?.ativo} + + {:else} + + {/if} + + + Status: + {statusConfig} + {#if configAtual?.data?.testadoEm} + - Última conexão testada em {new Date(configAtual.data.testadoEm).toLocaleString('pt-BR')} + {/if} + +
+ {/if} - - {#if !isLoading} -
-
-

Dados do Servidor SMTP

+ + {#if !isLoading} +
+
+

Dados do Servidor SMTP

-
- -
- - -
- Ex: smtp.gmail.com, smtp.office365.com -
-
+
+ +
+ + +
+ Ex: smtp.gmail.com, smtp.office365.com +
+
- -
- - -
- Comum: 587 (TLS), 465 (SSL), 25 -
-
+ +
+ + +
+ Comum: 587 (TLS), 465 (SSL), 25 +
+
- -
- - -
+ +
+ + +
- -
- - -
- - {#if configAtual?.data?.ativo} - Deixe em branco para manter a senha atual - {:else} - Digite a senha da conta de email - {/if} - -
-
+ +
+ + +
+ + {#if configAtual?.data?.ativo} + Deixe em branco para manter a senha atual + {:else} + Digite a senha da conta de email + {/if} + +
+
- -
- - -
+ +
+ + +
- -
- - -
-
+ +
+ + +
+
- -
-

Configurações de Segurança

+ +
+

Configurações de Segurança

-
-
- -
+
+
+ +
-
- -
-
+
+ +
+
- -
- + +
+ - -
-
-
- {/if} + +
+
+
+ {/if} - -
-
-

Exemplos de Configuração

+ +
+
+

Exemplos de Configuração

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ProvedorServidorPortaSegurança
Gmailsmtp.gmail.com587TLS
Outlook/Office365smtp.office365.com587TLS
Yahoosmtp.mail.yahoo.com465SSL
SendGridsmtp.sendgrid.net587TLS
-
-
-
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ProvedorServidorPortaSegurança
Gmailsmtp.gmail.com587TLS
Outlook/Office365smtp.office365.com587TLS
Yahoosmtp.mail.yahoo.com465SSL
SendGridsmtp.sendgrid.net587TLS
+
+
+
- -
- - - -
-

- Dica de Segurança: Para Gmail e outros provedores, você - pode precisar gerar uma "senha de app" específica em vez de usar sua senha - principal. -

-

- Gmail: Conta Google → Segurança → Verificação em duas etapas → Senhas de - app -

-
-
+ +
+ + + +
+

+ Dica de Segurança: Para Gmail e outros provedores, você pode precisar gerar + uma "senha de app" específica em vez de usar sua senha principal. +

+

+ Gmail: Conta Google → Segurança → Verificação em duas etapas → Senhas de app +

+
+
-- 2.49.1 From 90e81e46675cc69abdb08dac6c76492e8128c5b3 Mon Sep 17 00:00:00 2001 From: deyvisonwanderley Date: Sat, 22 Nov 2025 22:40:30 -0300 Subject: [PATCH 03/13] feat: add "Controle de Ponto" section with management options for employee time records - Introduced a new section for "Controle de Ponto" in the recursos-humanos page, allowing users to manage employee time records. - Added options for viewing and managing point records, editing records, and handling dispensations, enhancing functionality for HR management. --- .../(dashboard)/recursos-humanos/+page.svelte | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/apps/web/src/routes/(dashboard)/recursos-humanos/+page.svelte b/apps/web/src/routes/(dashboard)/recursos-humanos/+page.svelte index 60992a0..41844a9 100644 --- a/apps/web/src/routes/(dashboard)/recursos-humanos/+page.svelte +++ b/apps/web/src/routes/(dashboard)/recursos-humanos/+page.svelte @@ -77,6 +77,34 @@ }, ], }, + { + categoria: "Controle de Ponto", + descricao: "Gerencie registros de ponto dos funcionários", + Icon: Clock, + gradient: "from-cyan-500/10 to-cyan-600/20", + accentColor: "text-cyan-600", + bgIcon: "bg-cyan-500/20", + opcoes: [ + { + nome: "Registro de Pontos", + descricao: "Visualizar e gerenciar registros de ponto", + href: "/recursos-humanos/registro-pontos", + Icon: Clock, + }, + { + nome: "Homologação de Registro", + descricao: "Edite registros de ponto e ajuste banco de horas", + href: "/recursos-humanos/controle-ponto/homologacao", + Icon: CheckCircle2, + }, + { + nome: "Dispensa de Registro", + descricao: "Gerencie períodos de dispensa de registro de ponto", + href: "/recursos-humanos/controle-ponto/dispensa", + Icon: XCircle, + }, + ], + }, { categoria: "Gestão de Férias e Licenças", descricao: "Controle de férias, atestados e licenças", @@ -121,34 +149,6 @@ }, ], }, - { - categoria: "Controle de Ponto", - descricao: "Gerencie registros de ponto dos funcionários", - Icon: Clock, - gradient: "from-cyan-500/10 to-cyan-600/20", - accentColor: "text-cyan-600", - bgIcon: "bg-cyan-500/20", - opcoes: [ - { - nome: "Registro de Pontos", - descricao: "Visualizar e gerenciar registros de ponto", - href: "/recursos-humanos/registro-pontos", - Icon: Clock, - }, - { - nome: "Homologação de Registro", - descricao: "Edite registros de ponto e ajuste banco de horas", - href: "/recursos-humanos/controle-ponto/homologacao", - Icon: CheckCircle2, - }, - { - nome: "Dispensa de Registro", - descricao: "Gerencie períodos de dispensa de registro de ponto", - href: "/recursos-humanos/controle-ponto/dispensa", - Icon: XCircle, - }, - ], - }, ]; -- 2.49.1 From 467e04b605286b743de6f6ea8fbef9a4db1d05ab Mon Sep 17 00:00:00 2001 From: deyvisonwanderley Date: Sat, 22 Nov 2025 23:57:05 -0300 Subject: [PATCH 04/13] feat: enhance RegistroPonto and WebcamCapture components for improved data handling and user experience - Added a refresh mechanism in the RegistroPonto component to ensure queries are updated after point registration, improving data accuracy. - Expanded the WebcamCapture component to prevent multiple simultaneous play calls, enhancing video playback reliability. - Updated the registro-pontos page to default the date range to the last 30 days for better visibility and user convenience. - Introduced debug logging for queries and data handling to assist in development and troubleshooting. --- .../components/ponto/ComprovantePonto.svelte | 76 ++++++++++++++- .../lib/components/ponto/RegistroPonto.svelte | 39 +++++++- .../lib/components/ponto/WebcamCapture.svelte | 92 ++++++++++++------- .../registro-pontos/+page.svelte | 32 ++++++- packages/backend/convex/pontos.ts | 88 +++++++++++++++--- 5 files changed, 269 insertions(+), 58 deletions(-) diff --git a/apps/web/src/lib/components/ponto/ComprovantePonto.svelte b/apps/web/src/lib/components/ponto/ComprovantePonto.svelte index aabb54f..4656d4e 100644 --- a/apps/web/src/lib/components/ponto/ComprovantePonto.svelte +++ b/apps/web/src/lib/components/ponto/ComprovantePonto.svelte @@ -237,18 +237,36 @@ } -