From 4bd9e21748d200cf628adb57739b3765b59a95d7 Mon Sep 17 00:00:00 2001 From: killer-cf Date: Tue, 2 Dec 2025 16:37:48 -0300 Subject: [PATCH] feat: Add 'atas' (minutes/records) management feature, and implement various improvements across UI, backend logic, and authentication. --- .prettierrc | 2 +- .vscode/settings.json | 54 +- apps/web/convex/_generated/api.d.ts | 15 +- apps/web/convex/_generated/api.js | 2 +- apps/web/convex/_generated/dataModel.d.ts | 7 +- apps/web/convex/_generated/server.d.ts | 44 +- apps/web/convex/_generated/server.js | 18 +- apps/web/eslint.config.js | 48 +- apps/web/package.json | 128 +- apps/web/src/app.css | 759 ++++--- apps/web/src/app.d.ts | 10 +- apps/web/src/app.html | 30 +- apps/web/src/hooks.server.ts | 10 +- apps/web/src/lib/auth.ts | 10 +- .../web/src/lib/components/ActionGuard.svelte | 144 +- .../lib/components/AlterarStatusFerias.svelte | 11 +- .../lib/components/AprovarAusencias.svelte | 58 +- .../src/lib/components/AprovarFerias.svelte | 38 +- .../components/CalendarioAfastamentos.svelte | 964 ++++---- apps/web/src/lib/components/ErrorModal.svelte | 81 +- apps/web/src/lib/components/FileUpload.svelte | 686 +++--- .../FuncionarioMatriculaAutocomplete.svelte | 19 +- .../FuncionarioNomeAutocomplete.svelte | 19 +- .../lib/components/FuncionarioSelect.svelte | 2 +- apps/web/src/lib/components/Header.svelte | 6 +- .../src/lib/components/MenuProtection.svelte | 288 ++- .../lib/components/ModelosDeclaracoes.svelte | 408 ++-- apps/web/src/lib/components/PrintModal.svelte | 20 +- .../src/lib/components/ProtectedRoute.svelte | 10 +- .../components/PushNotificationManager.svelte | 251 +-- .../src/lib/components/RelogioPrazo.svelte | 27 +- apps/web/src/lib/components/Sidebar.svelte | 65 +- .../src/lib/components/SolicitarFerias.svelte | 8 +- .../ausencias/CalendarioAusencias.svelte | 1862 ++++++++-------- .../WizardSolicitacaoAusencia.svelte | 16 +- .../lib/components/call/CallControls.svelte | 16 +- .../lib/components/call/CallSettings.svelte | 64 +- .../src/lib/components/call/CallWindow.svelte | 815 +++---- .../lib/components/call/HostControls.svelte | 48 +- .../components/call/RecordingIndicator.svelte | 4 +- .../lib/components/chamados/SlaChart.svelte | 359 +-- .../lib/components/chamados/TicketCard.svelte | 185 +- .../lib/components/chamados/TicketForm.svelte | 565 +++-- .../components/chamados/TicketTimeline.svelte | 147 +- .../src/lib/components/chat/ChatList.svelte | 897 ++++---- .../src/lib/components/chat/ChatWidget.svelte | 24 +- .../src/lib/components/chat/ChatWindow.svelte | 72 +- .../lib/components/chat/MessageInput.svelte | 978 ++++----- .../lib/components/chat/MessageList.svelte | 1605 +++++++------- .../chat/NewConversationModal.svelte | 28 +- .../components/chat/NotificationBell.svelte | 1151 +++++----- .../components/chat/PresenceManager.svelte | 192 +- .../components/chat/SalaReuniaoManager.svelte | 8 +- .../chat/ScheduleMessageModal.svelte | 6 +- .../src/lib/components/chat/UserAvatar.svelte | 2 +- .../components/chat/UserStatusBadge.svelte | 97 +- .../components/ferias/CalendarioFerias.svelte | 17 +- .../components/ferias/DashboardFerias.svelte | 8 +- .../ferias/WizardSolicitacaoFerias.svelte | 55 +- .../components/ponto/ComprovantePonto.svelte | 303 ++- .../components/ponto/LocalizacaoIcon.svelte | 12 +- .../components/ponto/PrintPontoModal.svelte | 40 +- .../lib/components/ponto/RegistroPonto.svelte | 765 ++++--- .../ponto/RelogioSincronizado.svelte | 39 +- .../components/ponto/SaldoDiarioBadge.svelte | 2 +- .../ponto/SaldoDiarioComparativoBadge.svelte | 25 +- .../lib/components/ponto/WebcamCapture.svelte | 220 +- .../ponto/WidgetGestaoPontos.svelte | 69 +- .../lib/components/ti/AlertConfigModal.svelte | 4 +- .../components/ti/CybersecurityWizcard.svelte | 120 +- .../components/ti/ReportGeneratorModal.svelte | 12 +- .../src/lib/components/ti/StatsCard.svelte | 90 +- .../components/ti/SystemMonitorCard.svelte | 857 ++++---- .../ti/SystemMonitorCardLocal.svelte | 51 +- .../lib/components/ti/UserStatusBadge.svelte | 26 +- .../lib/components/ti/charts/AreaChart.svelte | 227 +- .../lib/components/ti/charts/BarChart.svelte | 207 +- .../components/ti/charts/BarChart3D.svelte | 19 +- .../components/ti/charts/DoughnutChart.svelte | 179 +- .../lib/components/ti/charts/LineChart.svelte | 235 +- apps/web/src/lib/hooks/convexAuth.ts | 22 +- apps/web/src/lib/hooks/useConvexWithAuth.ts | 73 +- apps/web/src/lib/stores/auth.svelte.ts | 294 ++- apps/web/src/lib/stores/callStore.ts | 36 +- apps/web/src/lib/stores/chamados.ts | 79 +- apps/web/src/lib/stores/chatStore.ts | 27 +- apps/web/src/lib/stores/convexAuth.ts | 81 +- apps/web/src/lib/stores/loginModal.svelte.ts | 23 +- apps/web/src/lib/utils/browserInfo.ts | 342 +-- apps/web/src/lib/utils/callWindowManager.ts | 7 +- apps/web/src/lib/utils/chamados.ts | 175 +- apps/web/src/lib/utils/constants.ts | 77 +- .../web/src/lib/utils/declaracoesGenerator.ts | 1208 +++++----- apps/web/src/lib/utils/deviceInfo.ts | 162 +- apps/web/src/lib/utils/documentos.ts | 343 +-- apps/web/src/lib/utils/erroHelpers.ts | 22 +- apps/web/src/lib/utils/floatingWindow.ts | 48 +- apps/web/src/lib/utils/jitsi.ts | 58 +- apps/web/src/lib/utils/jitsiPolyfill.ts | 32 +- apps/web/src/lib/utils/mediaRecorder.ts | 16 +- apps/web/src/lib/utils/metricsCollector.ts | 442 ++-- apps/web/src/lib/utils/modelosDeclaracoes.ts | 84 +- apps/web/src/lib/utils/notifications.ts | 368 ++-- apps/web/src/lib/utils/ponto.ts | 21 +- apps/web/src/lib/utils/sincronizacaoTempo.ts | 1 - apps/web/src/lib/utils/temas.ts | 9 +- apps/web/src/lib/utils/webcam.ts | 27 +- .../src/routes/(dashboard)/+layout.server.ts | 22 +- .../web/src/routes/(dashboard)/+layout.svelte | 129 +- apps/web/src/routes/(dashboard)/+page.svelte | 1537 +++++++------ .../(dashboard)/abrir-chamado/+page.svelte | 438 ++-- .../(dashboard)/alterar-senha/+page.svelte | 128 +- .../routes/(dashboard)/compras/+page.svelte | 129 +- .../compras/{produtos => atas}/+page.svelte | Bin 7114 -> 8253 bytes .../(dashboard)/compras/objetos/+page.svelte | 326 +++ .../(dashboard)/comunicacao/+page.svelte | 94 +- .../configuracoes/setores/+page.svelte | 27 +- .../(dashboard)/controladoria/+page.svelte | 184 +- .../(dashboard)/esqueci-senha/+page.svelte | 8 +- .../(dashboard)/financeiro/+page.svelte | 184 +- .../routes/(dashboard)/fluxos/+page.svelte | 158 +- .../fluxos/[id]-fluxo/+page.svelte | 386 +++- .../fluxos/[id]/editor/+page.svelte | 393 +++- .../fluxos/instancias/+page.svelte | 108 +- .../(dashboard)/gestao-pessoas/+page.svelte | 284 ++- .../gestao-ausencias/+page.svelte | 8 +- .../routes/(dashboard)/juridico/+page.svelte | 94 +- .../(dashboard)/licitacoes/+page.svelte | 340 +-- .../licitacoes/contratos/+page.svelte | 12 +- .../licitacoes/contratos/[id]/+page.svelte | 16 +- .../licitacoes/contratos/novo/+page.svelte | 24 +- .../licitacoes/empresas/+page.svelte | 1717 +++++++-------- .../licitacoes/fluxos/+page.svelte | 110 +- .../licitacoes/fluxos/[id]/+page.svelte | 803 +++++-- .../routes/(dashboard)/pedidos/+page.svelte | 20 +- .../(dashboard)/pedidos/[id]/+page.svelte | 375 ++-- .../(dashboard)/pedidos/novo/+page.svelte | 350 +-- .../routes/(dashboard)/perfil/+page.svelte | 108 +- .../(dashboard)/perfil/chamados/+page.svelte | 604 ++--- .../programas-esportivos/+page.svelte | 191 +- .../programas-esportivos/acoes/+page.svelte | 6 +- .../(dashboard)/recursos-humanos/+page.svelte | 640 +++--- .../atestados-licencas/+page.svelte | 278 ++- .../recursos-humanos/ausencias/+page.svelte | 12 +- .../controle-ponto/+page.svelte | 47 +- .../controle-ponto/dispensa/+page.svelte | 68 +- .../controle-ponto/homologacao/+page.svelte | 529 +++-- .../recursos-humanos/ferias/+page.svelte | 1168 +++++----- .../funcionarios/+page.svelte | 163 +- .../funcionarios/[funcionarioId]/+page.svelte | 1691 +++++++------- .../[funcionarioId]/documentos/+page.svelte | 14 +- .../[funcionarioId]/editar/+page.svelte | 44 +- .../enderecos-marcacao/+page.svelte | 121 +- .../funcionarios/cadastro/+page.svelte | 147 +- .../funcionarios/excluir/+page.svelte | 30 +- .../funcionarios/relatorios/+page.svelte | 9 +- .../registro-pontos/+page.svelte | 155 +- .../recursos-humanos/simbolos/+page.svelte | 14 +- .../simbolos/[simboloId]/editar/+page.svelte | 16 +- .../simbolos/cadastro/+page.svelte | 21 +- .../secretaria-executiva/+page.svelte | 282 ++- .../gestao-ausencias/+page.svelte | 11 +- .../src/routes/(dashboard)/ti/+page.svelte | 5 +- .../(dashboard)/ti/auditoria/+page.svelte | 1954 ++++++++++------- .../ti/central-chamados/+page.svelte | 18 +- .../ti/configuracoes-email/+page.svelte | 2 +- .../ti/configuracoes-jitsi/+page.svelte | 12 +- .../ti/configuracoes-ponto/+page.svelte | 48 +- .../enderecos/+page.svelte | 239 +- .../ti/configuracoes-relogio/+page.svelte | 197 +- .../(dashboard)/ti/configuracoes/+page.svelte | 2 +- .../ti/monitoramento-emails/+page.svelte | 17 +- .../(dashboard)/ti/monitoramento/+page.svelte | 4 +- .../(dashboard)/ti/notificacoes/+page.svelte | 1614 +++++++------- .../ti/notificacoes/templates/+page.svelte | 54 +- .../notificacoes/templates/[id]/+page.svelte | 252 +-- .../notificacoes/templates/novo/+page.svelte | 125 +- .../ti/painel-administrativo/+page.svelte | 225 +- .../ti/painel-permissoes/+page.svelte | 19 +- .../routes/(dashboard)/ti/perfis/+page.svelte | 14 +- .../ti/personalizar-permissoes/+page.svelte | 5 +- .../routes/(dashboard)/ti/times/+page.svelte | 8 +- .../(dashboard)/ti/usuarios/+page.svelte | 8 +- .../ti/usuarios/criar/+page.svelte | 8 +- apps/web/src/routes/+layout.svelte | 92 +- .../src/routes/api/auth/[...all]/+server.ts | 2 +- apps/web/src/routes/call/+page.svelte | 7 +- apps/web/src/routes/todos/+page.svelte | 23 +- apps/web/static/sounds/README.md | 1 - apps/web/static/sw.js | 105 +- apps/web/svelte.config.js | 10 +- package.json | 4 +- packages/backend/convex/README.md | 86 +- packages/backend/convex/_generated/api.d.ts | 12 +- packages/backend/convex/acoes.ts | 2 +- packages/backend/convex/actions/email.ts | 389 ++-- .../backend/convex/actions/jitsiServer.ts | 3 +- .../backend/convex/actions/linkPreview.ts | 237 +- .../convex/actions/pushNotifications.ts | 175 +- packages/backend/convex/actions/smtp.ts | 108 +- .../convex/actions/utils/nodeCrypto.ts | 113 +- packages/backend/convex/atas.ts | 77 + packages/backend/convex/atestadosLicencas.ts | 9 +- packages/backend/convex/ausencias.ts | 1188 +++++----- packages/backend/convex/autenticacao.ts | 18 +- packages/backend/convex/auth.config.ts | 12 +- packages/backend/convex/auth.ts | 6 +- packages/backend/convex/auth/utils.ts | 323 ++- packages/backend/convex/chamadas.ts | 77 +- packages/backend/convex/chamados.ts | 1488 +++++++------ packages/backend/convex/chat.ts | 90 +- packages/backend/convex/config.ts | 2 +- packages/backend/convex/configuracaoEmail.ts | 382 ++-- packages/backend/convex/configuracaoJitsi.ts | 128 +- packages/backend/convex/configuracaoPonto.ts | 19 +- .../backend/convex/configuracaoRelogio.ts | 103 +- packages/backend/convex/contratos.ts | 6 +- packages/backend/convex/convex.config.ts | 6 +- packages/backend/convex/crons.ts | 55 +- packages/backend/convex/cursos.ts | 107 +- packages/backend/convex/dashboard.ts | 238 +- packages/backend/convex/documentos.ts | 357 ++- packages/backend/convex/email.ts | 717 +++--- packages/backend/convex/empresas.ts | 492 +++-- packages/backend/convex/enderecosMarcacao.ts | 99 +- packages/backend/convex/ferias.ts | 1295 ++++++----- packages/backend/convex/flows.ts | 26 +- .../backend/convex/funcionarioEnderecos.ts | 32 +- packages/backend/convex/funcionarios.ts | 4 +- packages/backend/convex/healthCheck.ts | 6 +- packages/backend/convex/http.ts | 148 +- packages/backend/convex/logsAcesso.ts | 365 ++- packages/backend/convex/logsAtividades.ts | 4 +- packages/backend/convex/logsLogin.ts | 933 ++++---- packages/backend/convex/monitoramento.ts | 57 +- .../convex/{produtos.ts => objetos.ts} | 30 +- packages/backend/convex/pedidos.ts | 202 +- packages/backend/convex/permissoesAcoes.ts | 2 +- packages/backend/convex/pontos.ts | 391 ++-- packages/backend/convex/pushNotifications.ts | 4 +- packages/backend/convex/roles.ts | 2 +- packages/backend/convex/saldoFerias.ts | 738 ++++--- packages/backend/convex/schema.ts | 34 +- packages/backend/convex/security.ts | 21 +- packages/backend/convex/seed.ts | 6 +- packages/backend/convex/setores.ts | 7 +- packages/backend/convex/simbolos.ts | 2 +- packages/backend/convex/tables/atas.ts | 19 + packages/backend/convex/tables/flows.ts | 2 +- .../backend/convex/tables/funcionarios.ts | 2 +- .../convex/tables/{produtos.ts => objetos.ts} | 10 +- packages/backend/convex/tables/pedidos.ts | 21 +- packages/backend/convex/tables/security.ts | 2 +- packages/backend/convex/templatesMensagens.ts | 1550 ++++++------- packages/backend/convex/times.ts | 583 +++-- packages/backend/convex/tsconfig.json | 15 +- packages/backend/convex/types/web-push.d.ts | 73 +- packages/backend/convex/usuarios.ts | 14 +- .../convex/utils/chatTemplateWrapper.ts | 40 +- .../convex/utils/emailTemplateWrapper.ts | 83 +- packages/backend/convex/utils/getClientIP.ts | 267 ++- .../backend/convex/utils/scanEmailSenders.ts | 321 +-- .../backend/convex/verificarMatriculas.ts | 220 +- packages/backend/eslint.config.js | 6 +- packages/backend/package.json | 66 +- 265 files changed, 29156 insertions(+), 26460 deletions(-) rename apps/web/src/routes/(dashboard)/compras/{produtos => atas}/+page.svelte (50%) create mode 100644 apps/web/src/routes/(dashboard)/compras/objetos/+page.svelte create mode 100644 packages/backend/convex/atas.ts rename packages/backend/convex/{produtos.ts => objetos.ts} (64%) create mode 100644 packages/backend/convex/tables/atas.ts rename packages/backend/convex/tables/{produtos.ts => objetos.ts} (67%) diff --git a/.prettierrc b/.prettierrc index fb40e07..e923d07 100644 --- a/.prettierrc +++ b/.prettierrc @@ -15,4 +15,4 @@ } } ] -} \ No newline at end of file +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 45d220c..4f9b40e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,29 +1,29 @@ { - // "editor.formatOnSave": true, - // "editor.defaultFormatter": "biomejs.biome", - // "editor.codeActionsOnSave": { - // "source.fixAll.biome": "always" - // }, - // "[typescript]": { - // "editor.defaultFormatter": "biomejs.biome" - // }, - // "[svelte]": { - // "editor.defaultFormatter": "biomejs.biome" - // }, - "eslint.useFlatConfig": true, - "eslint.workingDirectories": [ - { "pattern": "apps/*" }, - { "pattern": "packages/*" } - ], - "eslint.validate": [ - "javascript", - "javascriptreact", - "typescript", - "typescriptreact", - "svelte" - ], - "eslint.options": { - "cache": true, - "cacheLocation": ".eslintcache" - } + // "editor.formatOnSave": true, + // "editor.defaultFormatter": "biomejs.biome", + // "editor.codeActionsOnSave": { + // "source.fixAll.biome": "always" + // }, + // "[typescript]": { + // "editor.defaultFormatter": "biomejs.biome" + // }, + // "[svelte]": { + // "editor.defaultFormatter": "biomejs.biome" + // }, + "eslint.useFlatConfig": true, + "eslint.workingDirectories": [ + { "pattern": "apps/*" }, + { "pattern": "packages/*" } + ], + "eslint.validate": [ + "javascript", + "javascriptreact", + "typescript", + "typescriptreact", + "svelte" + ], + "eslint.options": { + "cache": true, + "cacheLocation": ".eslintcache" + } } diff --git a/apps/web/convex/_generated/api.d.ts b/apps/web/convex/_generated/api.d.ts index 73b85e4..f3e9748 100644 --- a/apps/web/convex/_generated/api.d.ts +++ b/apps/web/convex/_generated/api.d.ts @@ -8,11 +8,7 @@ * @module */ -import type { - ApiFromModules, - FilterApi, - FunctionReference, -} from "convex/server"; +import type { ApiFromModules, FilterApi, FunctionReference } from 'convex/server'; /** * A utility for referencing Convex functions in your app's API. @@ -25,13 +21,10 @@ import type { declare const fullApi: ApiFromModules<{}>; declare const fullApiWithMounts: typeof fullApi; -export declare const api: FilterApi< - typeof fullApiWithMounts, - FunctionReference ->; +export declare const api: FilterApi>; export declare const internal: FilterApi< - typeof fullApiWithMounts, - FunctionReference + typeof fullApiWithMounts, + FunctionReference >; export declare const components: {}; diff --git a/apps/web/convex/_generated/api.js b/apps/web/convex/_generated/api.js index 44bf985..24593c7 100644 --- a/apps/web/convex/_generated/api.js +++ b/apps/web/convex/_generated/api.js @@ -8,7 +8,7 @@ * @module */ -import { anyApi, componentsGeneric } from "convex/server"; +import { anyApi, componentsGeneric } from 'convex/server'; /** * A utility for referencing Convex functions in your app's API. diff --git a/apps/web/convex/_generated/dataModel.d.ts b/apps/web/convex/_generated/dataModel.d.ts index fb12533..8e4c6a1 100644 --- a/apps/web/convex/_generated/dataModel.d.ts +++ b/apps/web/convex/_generated/dataModel.d.ts @@ -8,8 +8,8 @@ * @module */ -import { AnyDataModel } from "convex/server"; -import type { GenericId } from "convex/values"; +import { AnyDataModel } from 'convex/server'; +import type { GenericId } from 'convex/values'; /** * No `schema.ts` file found! @@ -43,8 +43,7 @@ export type Doc = any; * IDs are just strings at runtime, but this type can be used to distinguish them from other * strings when type checking. */ -export type Id = - GenericId; +export type Id = GenericId; /** * A type describing your Convex data model. diff --git a/apps/web/convex/_generated/server.d.ts b/apps/web/convex/_generated/server.d.ts index b5c6828..9f1d83e 100644 --- a/apps/web/convex/_generated/server.d.ts +++ b/apps/web/convex/_generated/server.d.ts @@ -9,24 +9,24 @@ */ import { - ActionBuilder, - AnyComponents, - HttpActionBuilder, - MutationBuilder, - QueryBuilder, - GenericActionCtx, - GenericMutationCtx, - GenericQueryCtx, - GenericDatabaseReader, - GenericDatabaseWriter, - FunctionReference, -} from "convex/server"; -import type { DataModel } from "./dataModel.js"; + ActionBuilder, + AnyComponents, + HttpActionBuilder, + MutationBuilder, + QueryBuilder, + GenericActionCtx, + GenericMutationCtx, + GenericQueryCtx, + GenericDatabaseReader, + GenericDatabaseWriter, + FunctionReference +} from 'convex/server'; +import type { DataModel } from './dataModel.js'; type GenericCtx = - | GenericActionCtx - | GenericMutationCtx - | GenericQueryCtx; + | GenericActionCtx + | GenericMutationCtx + | GenericQueryCtx; /** * Define a query in this Convex app's public API. @@ -36,7 +36,7 @@ type GenericCtx = * @param func - The query function. It receives a {@link QueryCtx} as its first argument. * @returns The wrapped query. Include this as an `export` to name it and make it accessible. */ -export declare const query: QueryBuilder; +export declare const query: QueryBuilder; /** * Define a query that is only accessible from other Convex functions (but not from the client). @@ -46,7 +46,7 @@ export declare const query: QueryBuilder; * @param func - The query function. It receives a {@link QueryCtx} as its first argument. * @returns The wrapped query. Include this as an `export` to name it and make it accessible. */ -export declare const internalQuery: QueryBuilder; +export declare const internalQuery: QueryBuilder; /** * Define a mutation in this Convex app's public API. @@ -56,7 +56,7 @@ export declare const internalQuery: QueryBuilder; * @param func - The mutation function. It receives a {@link MutationCtx} as its first argument. * @returns The wrapped mutation. Include this as an `export` to name it and make it accessible. */ -export declare const mutation: MutationBuilder; +export declare const mutation: MutationBuilder; /** * Define a mutation that is only accessible from other Convex functions (but not from the client). @@ -66,7 +66,7 @@ export declare const mutation: MutationBuilder; * @param func - The mutation function. It receives a {@link MutationCtx} as its first argument. * @returns The wrapped mutation. Include this as an `export` to name it and make it accessible. */ -export declare const internalMutation: MutationBuilder; +export declare const internalMutation: MutationBuilder; /** * Define an action in this Convex app's public API. @@ -79,7 +79,7 @@ export declare const internalMutation: MutationBuilder; * @param func - The action. It receives an {@link ActionCtx} as its first argument. * @returns The wrapped action. Include this as an `export` to name it and make it accessible. */ -export declare const action: ActionBuilder; +export declare const action: ActionBuilder; /** * Define an action that is only accessible from other Convex functions (but not from the client). @@ -87,7 +87,7 @@ export declare const action: ActionBuilder; * @param func - The function. It receives an {@link ActionCtx} as its first argument. * @returns The wrapped function. Include this as an `export` to name it and make it accessible. */ -export declare const internalAction: ActionBuilder; +export declare const internalAction: ActionBuilder; /** * Define an HTTP action. diff --git a/apps/web/convex/_generated/server.js b/apps/web/convex/_generated/server.js index 4a21df4..230f1c6 100644 --- a/apps/web/convex/_generated/server.js +++ b/apps/web/convex/_generated/server.js @@ -9,15 +9,15 @@ */ import { - actionGeneric, - httpActionGeneric, - queryGeneric, - mutationGeneric, - internalActionGeneric, - internalMutationGeneric, - internalQueryGeneric, - componentsGeneric, -} from "convex/server"; + actionGeneric, + httpActionGeneric, + queryGeneric, + mutationGeneric, + internalActionGeneric, + internalMutationGeneric, + internalQueryGeneric, + componentsGeneric +} from 'convex/server'; /** * Define a query in this Convex app's public API. diff --git a/apps/web/eslint.config.js b/apps/web/eslint.config.js index 60d180a..ed96683 100644 --- a/apps/web/eslint.config.js +++ b/apps/web/eslint.config.js @@ -1,28 +1,28 @@ import { config as svelteConfigBase } from '@sgse-app/eslint-config/svelte'; -import svelteConfig from './svelte.config.js'; +import { defineConfig } from 'eslint/config'; import ts from 'typescript-eslint'; -import { defineConfig } from "eslint/config"; - +import svelteConfig from './svelte.config.js'; + /** @type {import("eslint").Linter.Config} */ export default defineConfig([ - ...svelteConfigBase, - { - files: ['**/*.svelte'], - languageOptions: { - parserOptions: { - parser: ts.parser, - extraFileExtensions: ['.svelte'], - svelteConfig - } - } - }, - { - ignores: [ - '**/node_modules/**', - '**/.svelte-kit/**', - '**/build/**', - '**/dist/**', - '**/.turbo/**' - ] - } -]) + ...svelteConfigBase, + { + files: ['**/*.svelte'], + languageOptions: { + parserOptions: { + parser: ts.parser, + extraFileExtensions: ['.svelte'], + svelteConfig + } + } + }, + { + ignores: [ + '**/node_modules/**', + '**/.svelte-kit/**', + '**/build/**', + '**/dist/**', + '**/.turbo/**' + ] + } +]); diff --git a/apps/web/package.json b/apps/web/package.json index 44bda5f..db9e0ba 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -1,64 +1,66 @@ { - "name": "web", - "private": true, - "version": "0.0.1", - "type": "module", - "scripts": { - "dev": "bunx --bun vite dev", - "build": "bunx --bun vite build", - "preview": "bunx --bun vite preview", - "prepare": "svelte-kit sync || echo ''", - "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", - "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" - }, - "devDependencies": { - "@sgse-app/eslint-config": "*", - "@sveltejs/adapter-auto": "^6.1.0", - "@sveltejs/kit": "^2.31.1", - "@sveltejs/vite-plugin-svelte": "^6.1.2", - "@tailwindcss/vite": "^4.1.12", - "autoprefixer": "^10.4.21", - "daisyui": "^5.3.8", - "esbuild": "^0.25.11", - "postcss": "^8.5.6", - "svelte": "^5.38.1", - "svelte-adapter-bun": "^1.0.1", - "svelte-check": "^4.3.1", - "svelte-dnd-action": "^0.9.67", - "tailwindcss": "^4.1.12", - "typescript": "catalog:", - "vite": "^7.1.2" - }, - "dependencies": { - "@convex-dev/better-auth": "^0.9.7", - "@dicebear/collection": "^9.2.4", - "@dicebear/core": "^9.2.4", - "@fullcalendar/core": "^6.1.19", - "@fullcalendar/daygrid": "^6.1.19", - "@fullcalendar/interaction": "^6.1.19", - "@fullcalendar/list": "^6.1.19", - "@fullcalendar/multimonth": "^6.1.19", - "@internationalized/date": "^3.10.0", - "@mmailaender/convex-better-auth-svelte": "^0.2.0", - "@sgse-app/backend": "*", - "@tanstack/svelte-form": "^1.19.2", - "@types/papaparse": "^5.3.14", - "better-auth": "catalog:", - "convex": "catalog:", - "convex-svelte": "^0.0.12", - "date-fns": "^4.1.0", - "emoji-picker-element": "^1.27.0", - "eslint": "catalog:", - "exceljs": "^4.4.0", - "is-network-error": "^1.3.0", - "jspdf": "^3.0.3", - "jspdf-autotable": "^5.0.2", - "lib-jitsi-meet": "^1.0.6", - "lucide-svelte": "^0.552.0", - "papaparse": "^5.4.1", - "svelte-sonner": "^1.0.5", - "xlsx": "^0.18.5", - "xlsx-js-style": "^1.2.0", - "zod": "^4.1.12" - } -} \ No newline at end of file + "name": "web", + "private": true, + "version": "0.0.1", + "type": "module", + "scripts": { + "dev": "bunx --bun vite dev", + "build": "bunx --bun vite build", + "preview": "bunx --bun vite preview", + "prepare": "svelte-kit sync || echo ''", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "lint": "eslint .", + "format": "prettier --write ." + }, + "devDependencies": { + "@sgse-app/eslint-config": "*", + "@sveltejs/adapter-auto": "^6.1.0", + "@sveltejs/kit": "^2.31.1", + "@sveltejs/vite-plugin-svelte": "^6.1.2", + "@tailwindcss/vite": "^4.1.12", + "autoprefixer": "^10.4.21", + "daisyui": "^5.3.8", + "esbuild": "^0.25.11", + "postcss": "^8.5.6", + "svelte": "^5.38.1", + "svelte-adapter-bun": "^1.0.1", + "svelte-check": "^4.3.1", + "svelte-dnd-action": "^0.9.67", + "tailwindcss": "^4.1.12", + "typescript": "catalog:", + "vite": "^7.1.2" + }, + "dependencies": { + "@convex-dev/better-auth": "^0.9.7", + "@dicebear/collection": "^9.2.4", + "@dicebear/core": "^9.2.4", + "@fullcalendar/core": "^6.1.19", + "@fullcalendar/daygrid": "^6.1.19", + "@fullcalendar/interaction": "^6.1.19", + "@fullcalendar/list": "^6.1.19", + "@fullcalendar/multimonth": "^6.1.19", + "@internationalized/date": "^3.10.0", + "@mmailaender/convex-better-auth-svelte": "^0.2.0", + "@sgse-app/backend": "*", + "@tanstack/svelte-form": "^1.19.2", + "@types/papaparse": "^5.3.14", + "better-auth": "catalog:", + "convex": "catalog:", + "convex-svelte": "^0.0.12", + "date-fns": "^4.1.0", + "emoji-picker-element": "^1.27.0", + "eslint": "catalog:", + "exceljs": "^4.4.0", + "is-network-error": "^1.3.0", + "jspdf": "^3.0.3", + "jspdf-autotable": "^5.0.2", + "lib-jitsi-meet": "^1.0.6", + "lucide-svelte": "^0.552.0", + "papaparse": "^5.4.1", + "svelte-sonner": "^1.0.5", + "xlsx": "^0.18.5", + "xlsx-js-style": "^1.2.0", + "zod": "^4.1.12" + } +} diff --git a/apps/web/src/app.css b/apps/web/src/app.css index 865aaf1..9622199 100644 --- a/apps/web/src/app.css +++ b/apps/web/src/app.css @@ -1,426 +1,425 @@ -@import "tailwindcss"; -@plugin "daisyui"; +@import 'tailwindcss'; +@plugin 'daisyui'; /* FullCalendar CSS - v6 não exporta CSS separado, estilos são aplicados via JavaScript */ /* Estilo padrão dos botões - mesmo estilo do sidebar */ .btn-standard { - @apply font-medium flex items-center justify-center gap-2 text-center p-3 rounded-xl border border-base-300 bg-base-100 hover:bg-primary/60 active:bg-primary text-base-content hover:text-white active:text-white transition-colors; + @apply border-base-300 bg-base-100 hover:bg-primary/60 active:bg-primary text-base-content flex items-center justify-center gap-2 rounded-xl border p-3 text-center font-medium transition-colors hover:text-white active:text-white; } /* Sobrescrever estilos DaisyUI para seguir o padrão */ .btn-primary { - @apply font-medium flex items-center justify-center gap-2 text-center px-4 py-2 rounded-xl border border-base-300 bg-base-100 hover:bg-primary/60 active:bg-primary text-base-content hover:text-white active:text-white transition-colors; + @apply border-base-300 bg-base-100 hover:bg-primary/60 active:bg-primary text-base-content flex items-center justify-center gap-2 rounded-xl border px-4 py-2 text-center font-medium transition-colors hover:text-white active:text-white; } .btn-ghost { - @apply font-medium flex items-center justify-center gap-2 text-center px-4 py-2 rounded-xl border border-base-300 bg-base-100 hover:bg-base-200 active:bg-base-300 text-base-content transition-colors; + @apply border-base-300 bg-base-100 hover:bg-base-200 active:bg-base-300 text-base-content flex items-center justify-center gap-2 rounded-xl border px-4 py-2 text-center font-medium transition-colors; } .btn-error { - @apply font-medium flex items-center justify-center gap-2 text-center px-4 py-2 rounded-xl border border-error bg-base-100 hover:bg-error/60 active:bg-error text-error hover:text-white active:text-white transition-colors; + @apply border-error bg-base-100 hover:bg-error/60 active:bg-error text-error flex items-center justify-center gap-2 rounded-xl border px-4 py-2 text-center font-medium transition-colors hover:text-white active:text-white; } - /* Tema Aqua (padrão roxo/azul) - customizado para garantir funcionamento */ -html[data-theme="aqua"], -html[data-theme="aqua"] body, -[data-theme="aqua"] { - color-scheme: light; - --p: 217 91% 60%; - --pf: 217 91% 50%; - --pc: 0 0% 100%; - --s: 217 91% 60%; - --sf: 217 91% 50%; - --sc: 0 0% 100%; - --a: 217 91% 60%; - --af: 217 91% 50%; - --ac: 0 0% 100%; - --n: 217 20% 17%; - --nf: 217 20% 10%; - --nc: 0 0% 100%; - --b1: 0 0% 100%; - --b2: 217 20% 95%; - --b3: 217 20% 90%; - --bc: 217 20% 17%; - --in: 217 91% 60%; - --inc: 0 0% 100%; - --su: 142 76% 36%; - --suc: 0 0% 100%; - --wa: 38 92% 50%; - --wac: 0 0% 100%; - --er: 0 84% 60%; - --erc: 0 0% 100%; - --rounded-box: 1rem; - --rounded-btn: 0.5rem; - --rounded-badge: 1.9rem; - --animation-btn: 0.25s; - --animation-input: 0.2s; - --btn-focus-scale: 0.95; - --border-btn: 1px; - --tab-border: 1px; - --tab-radius: 0.5rem; +html[data-theme='aqua'], +html[data-theme='aqua'] body, +[data-theme='aqua'] { + color-scheme: light; + --p: 217 91% 60%; + --pf: 217 91% 50%; + --pc: 0 0% 100%; + --s: 217 91% 60%; + --sf: 217 91% 50%; + --sc: 0 0% 100%; + --a: 217 91% 60%; + --af: 217 91% 50%; + --ac: 0 0% 100%; + --n: 217 20% 17%; + --nf: 217 20% 10%; + --nc: 0 0% 100%; + --b1: 0 0% 100%; + --b2: 217 20% 95%; + --b3: 217 20% 90%; + --bc: 217 20% 17%; + --in: 217 91% 60%; + --inc: 0 0% 100%; + --su: 142 76% 36%; + --suc: 0 0% 100%; + --wa: 38 92% 50%; + --wac: 0 0% 100%; + --er: 0 84% 60%; + --erc: 0 0% 100%; + --rounded-box: 1rem; + --rounded-btn: 0.5rem; + --rounded-badge: 1.9rem; + --animation-btn: 0.25s; + --animation-input: 0.2s; + --btn-focus-scale: 0.95; + --border-btn: 1px; + --tab-border: 1px; + --tab-radius: 0.5rem; } /* Temas customizados para SGSE - Azul */ -html[data-theme="sgse-blue"], -html[data-theme="sgse-blue"] body, -[data-theme="sgse-blue"] { - color-scheme: light; - --p: 217 91% 60%; - --pf: 217 91% 50%; - --pc: 0 0% 100%; - --s: 217 91% 60%; - --sf: 217 91% 50%; - --sc: 0 0% 100%; - --a: 217 91% 60%; - --af: 217 91% 50%; - --ac: 0 0% 100%; - --n: 217 20% 17%; - --nf: 217 20% 10%; - --nc: 0 0% 100%; - --b1: 0 0% 100%; - --b2: 217 20% 95%; - --b3: 217 20% 90%; - --bc: 217 20% 17%; - --in: 217 91% 60%; - --inc: 0 0% 100%; - --su: 142 76% 36%; - --suc: 0 0% 100%; - --wa: 38 92% 50%; - --wac: 0 0% 100%; - --er: 0 84% 60%; - --erc: 0 0% 100%; - --rounded-box: 1rem; - --rounded-btn: 0.5rem; - --rounded-badge: 1.9rem; - --animation-btn: 0.25s; - --animation-input: 0.2s; - --btn-focus-scale: 0.95; - --border-btn: 1px; - --tab-border: 1px; - --tab-radius: 0.5rem; +html[data-theme='sgse-blue'], +html[data-theme='sgse-blue'] body, +[data-theme='sgse-blue'] { + color-scheme: light; + --p: 217 91% 60%; + --pf: 217 91% 50%; + --pc: 0 0% 100%; + --s: 217 91% 60%; + --sf: 217 91% 50%; + --sc: 0 0% 100%; + --a: 217 91% 60%; + --af: 217 91% 50%; + --ac: 0 0% 100%; + --n: 217 20% 17%; + --nf: 217 20% 10%; + --nc: 0 0% 100%; + --b1: 0 0% 100%; + --b2: 217 20% 95%; + --b3: 217 20% 90%; + --bc: 217 20% 17%; + --in: 217 91% 60%; + --inc: 0 0% 100%; + --su: 142 76% 36%; + --suc: 0 0% 100%; + --wa: 38 92% 50%; + --wac: 0 0% 100%; + --er: 0 84% 60%; + --erc: 0 0% 100%; + --rounded-box: 1rem; + --rounded-btn: 0.5rem; + --rounded-badge: 1.9rem; + --animation-btn: 0.25s; + --animation-input: 0.2s; + --btn-focus-scale: 0.95; + --border-btn: 1px; + --tab-border: 1px; + --tab-radius: 0.5rem; } /* Garantir que todas as variáveis CSS sejam aplicadas em todos os elementos */ html[data-theme] { - color-scheme: var(--color-scheme, light); + color-scheme: var(--color-scheme, light); } html[data-theme] * { - color-scheme: inherit; + color-scheme: inherit; } -html[data-theme="sgse-green"], -html[data-theme="sgse-green"] body, -[data-theme="sgse-green"] { - color-scheme: light; - --p: 142 76% 36%; - --pf: 142 76% 26%; - --pc: 0 0% 100%; - --s: 142 76% 36%; - --sf: 142 76% 26%; - --sc: 0 0% 100%; - --a: 142 76% 36%; - --af: 142 76% 26%; - --ac: 0 0% 100%; - --n: 142 20% 17%; - --nf: 142 20% 10%; - --nc: 0 0% 100%; - --b1: 0 0% 100%; - --b2: 142 20% 95%; - --b3: 142 20% 90%; - --bc: 142 20% 17%; - --in: 142 76% 36%; - --inc: 0 0% 100%; - --su: 142 76% 36%; - --suc: 0 0% 100%; - --wa: 38 92% 50%; - --wac: 0 0% 100%; - --er: 0 84% 60%; - --erc: 0 0% 100%; - --rounded-box: 1rem; - --rounded-btn: 0.5rem; - --rounded-badge: 1.9rem; - --animation-btn: 0.25s; - --animation-input: 0.2s; - --btn-focus-scale: 0.95; - --border-btn: 1px; - --tab-border: 1px; - --tab-radius: 0.5rem; +html[data-theme='sgse-green'], +html[data-theme='sgse-green'] body, +[data-theme='sgse-green'] { + color-scheme: light; + --p: 142 76% 36%; + --pf: 142 76% 26%; + --pc: 0 0% 100%; + --s: 142 76% 36%; + --sf: 142 76% 26%; + --sc: 0 0% 100%; + --a: 142 76% 36%; + --af: 142 76% 26%; + --ac: 0 0% 100%; + --n: 142 20% 17%; + --nf: 142 20% 10%; + --nc: 0 0% 100%; + --b1: 0 0% 100%; + --b2: 142 20% 95%; + --b3: 142 20% 90%; + --bc: 142 20% 17%; + --in: 142 76% 36%; + --inc: 0 0% 100%; + --su: 142 76% 36%; + --suc: 0 0% 100%; + --wa: 38 92% 50%; + --wac: 0 0% 100%; + --er: 0 84% 60%; + --erc: 0 0% 100%; + --rounded-box: 1rem; + --rounded-btn: 0.5rem; + --rounded-badge: 1.9rem; + --animation-btn: 0.25s; + --animation-input: 0.2s; + --btn-focus-scale: 0.95; + --border-btn: 1px; + --tab-border: 1px; + --tab-radius: 0.5rem; } -html[data-theme="sgse-orange"], -html[data-theme="sgse-orange"] body, -[data-theme="sgse-orange"] { - color-scheme: light; - --p: 25 95% 53%; - --pf: 25 95% 43%; - --pc: 0 0% 100%; - --s: 25 95% 53%; - --sf: 25 95% 43%; - --sc: 0 0% 100%; - --a: 25 95% 53%; - --af: 25 95% 43%; - --ac: 0 0% 100%; - --n: 25 20% 17%; - --nf: 25 20% 10%; - --nc: 0 0% 100%; - --b1: 0 0% 100%; - --b2: 25 20% 95%; - --b3: 25 20% 90%; - --bc: 25 20% 17%; - --in: 25 95% 53%; - --inc: 0 0% 100%; - --su: 142 76% 36%; - --suc: 0 0% 100%; - --wa: 38 92% 50%; - --wac: 0 0% 100%; - --er: 0 84% 60%; - --erc: 0 0% 100%; - --rounded-box: 1rem; - --rounded-btn: 0.5rem; - --rounded-badge: 1.9rem; - --animation-btn: 0.25s; - --animation-input: 0.2s; - --btn-focus-scale: 0.95; - --border-btn: 1px; - --tab-border: 1px; - --tab-radius: 0.5rem; +html[data-theme='sgse-orange'], +html[data-theme='sgse-orange'] body, +[data-theme='sgse-orange'] { + color-scheme: light; + --p: 25 95% 53%; + --pf: 25 95% 43%; + --pc: 0 0% 100%; + --s: 25 95% 53%; + --sf: 25 95% 43%; + --sc: 0 0% 100%; + --a: 25 95% 53%; + --af: 25 95% 43%; + --ac: 0 0% 100%; + --n: 25 20% 17%; + --nf: 25 20% 10%; + --nc: 0 0% 100%; + --b1: 0 0% 100%; + --b2: 25 20% 95%; + --b3: 25 20% 90%; + --bc: 25 20% 17%; + --in: 25 95% 53%; + --inc: 0 0% 100%; + --su: 142 76% 36%; + --suc: 0 0% 100%; + --wa: 38 92% 50%; + --wac: 0 0% 100%; + --er: 0 84% 60%; + --erc: 0 0% 100%; + --rounded-box: 1rem; + --rounded-btn: 0.5rem; + --rounded-badge: 1.9rem; + --animation-btn: 0.25s; + --animation-input: 0.2s; + --btn-focus-scale: 0.95; + --border-btn: 1px; + --tab-border: 1px; + --tab-radius: 0.5rem; } -html[data-theme="sgse-red"], -html[data-theme="sgse-red"] body, -[data-theme="sgse-red"] { - color-scheme: light; - --p: 0 84% 60%; - --pf: 0 84% 50%; - --pc: 0 0% 100%; - --s: 0 84% 60%; - --sf: 0 84% 50%; - --sc: 0 0% 100%; - --a: 0 84% 60%; - --af: 0 84% 50%; - --ac: 0 0% 100%; - --n: 0 20% 17%; - --nf: 0 20% 10%; - --nc: 0 0% 100%; - --b1: 0 0% 100%; - --b2: 0 20% 95%; - --b3: 0 20% 90%; - --bc: 0 20% 17%; - --in: 0 84% 60%; - --inc: 0 0% 100%; - --su: 142 76% 36%; - --suc: 0 0% 100%; - --wa: 38 92% 50%; - --wac: 0 0% 100%; - --er: 0 84% 60%; - --erc: 0 0% 100%; - --rounded-box: 1rem; - --rounded-btn: 0.5rem; - --rounded-badge: 1.9rem; - --animation-btn: 0.25s; - --animation-input: 0.2s; - --btn-focus-scale: 0.95; - --border-btn: 1px; - --tab-border: 1px; - --tab-radius: 0.5rem; +html[data-theme='sgse-red'], +html[data-theme='sgse-red'] body, +[data-theme='sgse-red'] { + color-scheme: light; + --p: 0 84% 60%; + --pf: 0 84% 50%; + --pc: 0 0% 100%; + --s: 0 84% 60%; + --sf: 0 84% 50%; + --sc: 0 0% 100%; + --a: 0 84% 60%; + --af: 0 84% 50%; + --ac: 0 0% 100%; + --n: 0 20% 17%; + --nf: 0 20% 10%; + --nc: 0 0% 100%; + --b1: 0 0% 100%; + --b2: 0 20% 95%; + --b3: 0 20% 90%; + --bc: 0 20% 17%; + --in: 0 84% 60%; + --inc: 0 0% 100%; + --su: 142 76% 36%; + --suc: 0 0% 100%; + --wa: 38 92% 50%; + --wac: 0 0% 100%; + --er: 0 84% 60%; + --erc: 0 0% 100%; + --rounded-box: 1rem; + --rounded-btn: 0.5rem; + --rounded-badge: 1.9rem; + --animation-btn: 0.25s; + --animation-input: 0.2s; + --btn-focus-scale: 0.95; + --border-btn: 1px; + --tab-border: 1px; + --tab-radius: 0.5rem; } -html[data-theme="sgse-pink"], -html[data-theme="sgse-pink"] body, -[data-theme="sgse-pink"] { - color-scheme: light; - --p: 330 81% 60%; - --pf: 330 81% 50%; - --pc: 0 0% 100%; - --s: 330 81% 60%; - --sf: 330 81% 50%; - --sc: 0 0% 100%; - --a: 330 81% 60%; - --af: 330 81% 50%; - --ac: 0 0% 100%; - --n: 330 20% 17%; - --nf: 330 20% 10%; - --nc: 0 0% 100%; - --b1: 0 0% 100%; - --b2: 330 20% 95%; - --b3: 330 20% 90%; - --bc: 330 20% 17%; - --in: 330 81% 60%; - --inc: 0 0% 100%; - --su: 142 76% 36%; - --suc: 0 0% 100%; - --wa: 38 92% 50%; - --wac: 0 0% 100%; - --er: 0 84% 60%; - --erc: 0 0% 100%; - --rounded-box: 1rem; - --rounded-btn: 0.5rem; - --rounded-badge: 1.9rem; - --animation-btn: 0.25s; - --animation-input: 0.2s; - --btn-focus-scale: 0.95; - --border-btn: 1px; - --tab-border: 1px; - --tab-radius: 0.5rem; +html[data-theme='sgse-pink'], +html[data-theme='sgse-pink'] body, +[data-theme='sgse-pink'] { + color-scheme: light; + --p: 330 81% 60%; + --pf: 330 81% 50%; + --pc: 0 0% 100%; + --s: 330 81% 60%; + --sf: 330 81% 50%; + --sc: 0 0% 100%; + --a: 330 81% 60%; + --af: 330 81% 50%; + --ac: 0 0% 100%; + --n: 330 20% 17%; + --nf: 330 20% 10%; + --nc: 0 0% 100%; + --b1: 0 0% 100%; + --b2: 330 20% 95%; + --b3: 330 20% 90%; + --bc: 330 20% 17%; + --in: 330 81% 60%; + --inc: 0 0% 100%; + --su: 142 76% 36%; + --suc: 0 0% 100%; + --wa: 38 92% 50%; + --wac: 0 0% 100%; + --er: 0 84% 60%; + --erc: 0 0% 100%; + --rounded-box: 1rem; + --rounded-btn: 0.5rem; + --rounded-badge: 1.9rem; + --animation-btn: 0.25s; + --animation-input: 0.2s; + --btn-focus-scale: 0.95; + --border-btn: 1px; + --tab-border: 1px; + --tab-radius: 0.5rem; } -html[data-theme="sgse-teal"], -html[data-theme="sgse-teal"] body, -[data-theme="sgse-teal"] { - color-scheme: light; - --p: 173 80% 40%; - --pf: 173 80% 30%; - --pc: 0 0% 100%; - --s: 173 80% 40%; - --sf: 173 80% 30%; - --sc: 0 0% 100%; - --a: 173 80% 40%; - --af: 173 80% 30%; - --ac: 0 0% 100%; - --n: 173 20% 17%; - --nf: 173 20% 10%; - --nc: 0 0% 100%; - --b1: 0 0% 100%; - --b2: 173 20% 95%; - --b3: 173 20% 90%; - --bc: 173 20% 17%; - --in: 173 80% 40%; - --inc: 0 0% 100%; - --su: 142 76% 36%; - --suc: 0 0% 100%; - --wa: 38 92% 50%; - --wac: 0 0% 100%; - --er: 0 84% 60%; - --erc: 0 0% 100%; - --rounded-box: 1rem; - --rounded-btn: 0.5rem; - --rounded-badge: 1.9rem; - --animation-btn: 0.25s; - --animation-input: 0.2s; - --btn-focus-scale: 0.95; - --border-btn: 1px; - --tab-border: 1px; - --tab-radius: 0.5rem; +html[data-theme='sgse-teal'], +html[data-theme='sgse-teal'] body, +[data-theme='sgse-teal'] { + color-scheme: light; + --p: 173 80% 40%; + --pf: 173 80% 30%; + --pc: 0 0% 100%; + --s: 173 80% 40%; + --sf: 173 80% 30%; + --sc: 0 0% 100%; + --a: 173 80% 40%; + --af: 173 80% 30%; + --ac: 0 0% 100%; + --n: 173 20% 17%; + --nf: 173 20% 10%; + --nc: 0 0% 100%; + --b1: 0 0% 100%; + --b2: 173 20% 95%; + --b3: 173 20% 90%; + --bc: 173 20% 17%; + --in: 173 80% 40%; + --inc: 0 0% 100%; + --su: 142 76% 36%; + --suc: 0 0% 100%; + --wa: 38 92% 50%; + --wac: 0 0% 100%; + --er: 0 84% 60%; + --erc: 0 0% 100%; + --rounded-box: 1rem; + --rounded-btn: 0.5rem; + --rounded-badge: 1.9rem; + --animation-btn: 0.25s; + --animation-input: 0.2s; + --btn-focus-scale: 0.95; + --border-btn: 1px; + --tab-border: 1px; + --tab-radius: 0.5rem; } -html[data-theme="sgse-corporate"], -html[data-theme="sgse-corporate"] body, -[data-theme="sgse-corporate"] { - color-scheme: dark; - --p: 217 91% 60%; - --pf: 217 91% 50%; - --pc: 0 0% 100%; - --s: 217 91% 60%; - --sf: 217 91% 50%; - --sc: 0 0% 100%; - --a: 217 91% 60%; - --af: 217 91% 50%; - --ac: 0 0% 100%; - --n: 217 30% 15%; - --nf: 217 30% 8%; - --nc: 0 0% 100%; - --b1: 217 30% 10%; - --b2: 217 30% 15%; - --b3: 217 30% 20%; - --bc: 217 10% 90%; - --in: 217 91% 60%; - --inc: 0 0% 100%; - --su: 142 76% 36%; - --suc: 0 0% 100%; - --wa: 38 92% 50%; - --wac: 0 0% 100%; - --er: 0 84% 60%; - --erc: 0 0% 100%; - --rounded-box: 1rem; - --rounded-btn: 0.5rem; - --rounded-badge: 1.9rem; - --animation-btn: 0.25s; - --animation-input: 0.2s; - --btn-focus-scale: 0.95; - --border-btn: 1px; - --tab-border: 1px; - --tab-radius: 0.5rem; +html[data-theme='sgse-corporate'], +html[data-theme='sgse-corporate'] body, +[data-theme='sgse-corporate'] { + color-scheme: dark; + --p: 217 91% 60%; + --pf: 217 91% 50%; + --pc: 0 0% 100%; + --s: 217 91% 60%; + --sf: 217 91% 50%; + --sc: 0 0% 100%; + --a: 217 91% 60%; + --af: 217 91% 50%; + --ac: 0 0% 100%; + --n: 217 30% 15%; + --nf: 217 30% 8%; + --nc: 0 0% 100%; + --b1: 217 30% 10%; + --b2: 217 30% 15%; + --b3: 217 30% 20%; + --bc: 217 10% 90%; + --in: 217 91% 60%; + --inc: 0 0% 100%; + --su: 142 76% 36%; + --suc: 0 0% 100%; + --wa: 38 92% 50%; + --wac: 0 0% 100%; + --er: 0 84% 60%; + --erc: 0 0% 100%; + --rounded-box: 1rem; + --rounded-btn: 0.5rem; + --rounded-badge: 1.9rem; + --animation-btn: 0.25s; + --animation-input: 0.2s; + --btn-focus-scale: 0.95; + --border-btn: 1px; + --tab-border: 1px; + --tab-radius: 0.5rem; } /* Tema Light customizado para garantir funcionamento completo */ -html[data-theme="light"], -html[data-theme="light"] body, -[data-theme="light"] { - color-scheme: light; - --p: 217 91% 60%; - --pf: 217 91% 50%; - --pc: 0 0% 100%; - --s: 217 91% 60%; - --sf: 217 91% 50%; - --sc: 0 0% 100%; - --a: 217 91% 60%; - --af: 217 91% 50%; - --ac: 0 0% 100%; - --n: 217 20% 17%; - --nf: 217 20% 10%; - --nc: 0 0% 100%; - --b1: 0 0% 100%; - --b2: 217 20% 95%; - --b3: 217 20% 90%; - --bc: 217 20% 17%; - --in: 217 91% 60%; - --inc: 0 0% 100%; - --su: 142 76% 36%; - --suc: 0 0% 100%; - --wa: 38 92% 50%; - --wac: 0 0% 100%; - --er: 0 84% 60%; - --erc: 0 0% 100%; - --rounded-box: 1rem; - --rounded-btn: 0.5rem; - --rounded-badge: 1.9rem; - --animation-btn: 0.25s; - --animation-input: 0.2s; - --btn-focus-scale: 0.95; - --border-btn: 1px; - --tab-border: 1px; - --tab-radius: 0.5rem; +html[data-theme='light'], +html[data-theme='light'] body, +[data-theme='light'] { + color-scheme: light; + --p: 217 91% 60%; + --pf: 217 91% 50%; + --pc: 0 0% 100%; + --s: 217 91% 60%; + --sf: 217 91% 50%; + --sc: 0 0% 100%; + --a: 217 91% 60%; + --af: 217 91% 50%; + --ac: 0 0% 100%; + --n: 217 20% 17%; + --nf: 217 20% 10%; + --nc: 0 0% 100%; + --b1: 0 0% 100%; + --b2: 217 20% 95%; + --b3: 217 20% 90%; + --bc: 217 20% 17%; + --in: 217 91% 60%; + --inc: 0 0% 100%; + --su: 142 76% 36%; + --suc: 0 0% 100%; + --wa: 38 92% 50%; + --wac: 0 0% 100%; + --er: 0 84% 60%; + --erc: 0 0% 100%; + --rounded-box: 1rem; + --rounded-btn: 0.5rem; + --rounded-badge: 1.9rem; + --animation-btn: 0.25s; + --animation-input: 0.2s; + --btn-focus-scale: 0.95; + --border-btn: 1px; + --tab-border: 1px; + --tab-radius: 0.5rem; } /* Tema Dark customizado para garantir funcionamento completo */ -html[data-theme="dark"], -html[data-theme="dark"] body, -[data-theme="dark"] { - color-scheme: dark; - --p: 217 91% 60%; - --pf: 217 91% 50%; - --pc: 0 0% 100%; - --s: 217 91% 60%; - --sf: 217 91% 50%; - --sc: 0 0% 100%; - --a: 217 91% 60%; - --af: 217 91% 50%; - --ac: 0 0% 100%; - --n: 217 30% 15%; - --nf: 217 30% 8%; - --nc: 0 0% 100%; - --b1: 217 30% 10%; - --b2: 217 30% 15%; - --b3: 217 30% 20%; - --bc: 217 10% 90%; - --in: 217 91% 60%; - --inc: 0 0% 100%; - --su: 142 76% 36%; - --suc: 0 0% 100%; - --wa: 38 92% 50%; - --wac: 0 0% 100%; - --er: 0 84% 60%; - --erc: 0 0% 100%; - --rounded-box: 1rem; - --rounded-btn: 0.5rem; - --rounded-badge: 1.9rem; - --animation-btn: 0.25s; - --animation-input: 0.2s; - --btn-focus-scale: 0.95; - --border-btn: 1px; - --tab-border: 1px; - --tab-radius: 0.5rem; -} \ No newline at end of file +html[data-theme='dark'], +html[data-theme='dark'] body, +[data-theme='dark'] { + color-scheme: dark; + --p: 217 91% 60%; + --pf: 217 91% 50%; + --pc: 0 0% 100%; + --s: 217 91% 60%; + --sf: 217 91% 50%; + --sc: 0 0% 100%; + --a: 217 91% 60%; + --af: 217 91% 50%; + --ac: 0 0% 100%; + --n: 217 30% 15%; + --nf: 217 30% 8%; + --nc: 0 0% 100%; + --b1: 217 30% 10%; + --b2: 217 30% 15%; + --b3: 217 30% 20%; + --bc: 217 10% 90%; + --in: 217 91% 60%; + --inc: 0 0% 100%; + --su: 142 76% 36%; + --suc: 0 0% 100%; + --wa: 38 92% 50%; + --wac: 0 0% 100%; + --er: 0 84% 60%; + --erc: 0 0% 100%; + --rounded-box: 1rem; + --rounded-btn: 0.5rem; + --rounded-badge: 1.9rem; + --animation-btn: 0.25s; + --animation-input: 0.2s; + --btn-focus-scale: 0.95; + --border-btn: 1px; + --tab-border: 1px; + --tab-radius: 0.5rem; +} diff --git a/apps/web/src/app.d.ts b/apps/web/src/app.d.ts index 6633a80..2104354 100644 --- a/apps/web/src/app.d.ts +++ b/apps/web/src/app.d.ts @@ -1,9 +1,9 @@ declare global { - namespace App { - interface Locals { - token: string | undefined; - } - } + namespace App { + interface Locals { + token: string | undefined; + } + } } export {}; diff --git a/apps/web/src/app.html b/apps/web/src/app.html index 7732350..e912c97 100644 --- a/apps/web/src/app.html +++ b/apps/web/src/app.html @@ -10,9 +10,9 @@ - -{#if verificando} -
-
- -

Verificando permissões...

-
-
-{:else if permitido} - {@render children?.()} -{:else} -
-
-
- -
-

Acesso Negado

-

- Você não tem permissão para acessar esta ação. -

-
-
-{/if} + + +{#if verificando} +
+
+ +

Verificando permissões...

+
+
+{:else if permitido} + {@render children?.()} +{:else} +
+
+
+ +
+

Acesso Negado

+

Você não tem permissão para acessar esta ação.

+
+
+{/if} diff --git a/apps/web/src/lib/components/AlterarStatusFerias.svelte b/apps/web/src/lib/components/AlterarStatusFerias.svelte index 2eff5bb..5e80f6f 100644 --- a/apps/web/src/lib/components/AlterarStatusFerias.svelte +++ b/apps/web/src/lib/components/AlterarStatusFerias.svelte @@ -1,7 +1,7 @@
-
- -
-

Calendário de Afastamentos

+
+ +
+

Calendário de Afastamentos

- -
- Filtrar: -
- - - - - - -
-
-
+ +
+ Filtrar: +
+ + + + + + +
+
+
- -
-
-
- Atestado Médico -
-
-
- Declaração -
-
-
- Licença Maternidade -
-
-
- Licença Paternidade -
-
-
- Férias -
-
+ +
+
+
+ Atestado Médico +
+
+
+ Declaração +
+
+
+ Licença Maternidade +
+
+
+ Licença Paternidade +
+
+
+ Férias +
+
- -
-
-
+ +
+
+
- - {#if showModal && eventoSelecionado} - - -
(showModal = false)} - role="dialog" - aria-modal="true" - > - -
e.stopPropagation()} - > - -
-
-
-

- {eventoSelecionado.funcionarioNome} -

-

- {getTipoNome(eventoSelecionado.tipo)} -

-
- -
-
+ + {#if showModal && eventoSelecionado} + + +
(showModal = false)} + role="dialog" + aria-modal="true" + > + +
e.stopPropagation()} + > + +
+
+
+

+ {eventoSelecionado.funcionarioNome} +

+

+ {getTipoNome(eventoSelecionado.tipo)} +

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

Data Início

-

- {formatarData(eventoSelecionado.start)} -

-
-
+ +
+
+ + + +
+

Data Início

+

+ {formatarData(eventoSelecionado.start)} +

+
+
-
- - - -
-

Data Fim

-

- {formatarData(eventoSelecionado.end)} -

-
-
+
+ + + +
+

Data Fim

+

+ {formatarData(eventoSelecionado.end)} +

+
+
-
- - - -
-

Duração

-

- {(() => { - const inicio = new Date(eventoSelecionado.start); - const fim = new Date(eventoSelecionado.end); - const diffTime = Math.abs(fim.getTime() - inicio.getTime()); - const diffDays = - Math.ceil(diffTime / (1000 * 60 * 60 * 24)) + 1; - return `${diffDays} ${diffDays === 1 ? "dia" : "dias"}`; - })()} -

-
-
-
+
+ + + +
+

Duração

+

+ {(() => { + const inicio = new Date(eventoSelecionado.start); + const fim = new Date(eventoSelecionado.end); + const diffTime = Math.abs(fim.getTime() - inicio.getTime()); + const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24)) + 1; + return `${diffDays} ${diffDays === 1 ? 'dia' : 'dias'}`; + })()} +

+
+
+
- -
- -
-
-
- {/if} -
+ +
+ +
+
+
+ {/if} +
diff --git a/apps/web/src/lib/components/ErrorModal.svelte b/apps/web/src/lib/components/ErrorModal.svelte index c1cb5a0..8438636 100644 --- a/apps/web/src/lib/components/ErrorModal.svelte +++ b/apps/web/src/lib/components/ErrorModal.svelte @@ -1,5 +1,5 @@ {#if open} -