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} -