feat: replace SVG icons with Lucide components in various dashboard pages for improved consistency and maintainability

This commit is contained in:
2025-12-04 15:34:24 -03:00
parent 88f25dc6ab
commit eb7f3507d3
14 changed files with 151 additions and 1248 deletions

View File

@@ -8,6 +8,7 @@
import { chamadosStore } from '$lib/stores/chamados'; import { chamadosStore } from '$lib/stores/chamados';
import { resolve } from '$app/paths'; import { resolve } from '$app/paths';
import { useConvexWithAuth } from '$lib/hooks/useConvexWithAuth'; import { useConvexWithAuth } from '$lib/hooks/useConvexWithAuth';
import { LifeBuoy, Info } from 'lucide-svelte';
type Ticket = Doc<'tickets'>; type Ticket = Doc<'tickets'>;
@@ -170,20 +171,7 @@
> >
<div class="mb-6 flex items-center gap-3"> <div class="mb-6 flex items-center gap-3">
<div class="bg-primary/10 rounded-xl p-2"> <div class="bg-primary/10 rounded-xl p-2">
<svg <LifeBuoy class="text-primary h-6 w-6" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="text-primary h-6 w-6"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
/>
</svg>
</div> </div>
<div> <div>
<h2 class="text-base-content text-2xl font-bold">Formulário</h2> <h2 class="text-base-content text-2xl font-bold">Formulário</h2>
@@ -208,20 +196,7 @@
> >
<div class="mb-4 flex items-center gap-3"> <div class="mb-4 flex items-center gap-3">
<div class="bg-info/10 rounded-xl p-2"> <div class="bg-info/10 rounded-xl p-2">
<svg <Info class="text-info h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="text-info h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
</div> </div>
<h3 class="text-base-content text-lg font-bold">Como funciona a timeline</h3> <h3 class="text-base-content text-lg font-bold">Como funciona a timeline</h3>
</div> </div>

View File

@@ -5,6 +5,7 @@
import { api } from '@sgse-app/backend/convex/_generated/api'; import { api } from '@sgse-app/backend/convex/_generated/api';
import AprovarAusencias from '$lib/components/AprovarAusencias.svelte'; import AprovarAusencias from '$lib/components/AprovarAusencias.svelte';
import type { Id } from '@sgse-app/backend/convex/_generated/dataModel'; import type { Id } from '@sgse-app/backend/convex/_generated/dataModel';
import { Clock, ArrowLeft, FileText, CheckCircle, XCircle, Info, Eye } from 'lucide-svelte';
const client = useConvexClient(); const client = useConvexClient();
const currentUser = useQuery(api.auth.getCurrentUser, {}); const currentUser = useQuery(api.auth.getCurrentUser, {});
@@ -86,20 +87,7 @@
<div class="flex items-center justify-between"> <div class="flex items-center justify-between">
<div class="flex items-center gap-4"> <div class="flex items-center gap-4">
<div class="rounded-xl bg-orange-500/20 p-3"> <div class="rounded-xl bg-orange-500/20 p-3">
<svg <Clock class="h-8 w-8 text-orange-600" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-8 w-8 text-orange-600"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
</div> </div>
<div> <div>
<h1 class="text-primary text-3xl font-bold">Dashboard de Ausências</h1> <h1 class="text-primary text-3xl font-bold">Dashboard de Ausências</h1>
@@ -107,20 +95,7 @@
</div> </div>
</div> </div>
<button class="btn gap-2" onclick={() => goto(resolve('/recursos-humanos'))}> <button class="btn gap-2" onclick={() => goto(resolve('/recursos-humanos'))}>
<svg <ArrowLeft class="h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M10 19l-7-7m0 0l7-7m-7 7h18"
/>
</svg>
Voltar Voltar
</button> </button>
</div> </div>
@@ -130,20 +105,7 @@
<div class="mb-6 grid grid-cols-1 gap-4 md:grid-cols-4"> <div class="mb-6 grid grid-cols-1 gap-4 md:grid-cols-4">
<div class="stat bg-base-100 rounded-box border-base-300 border shadow-lg"> <div class="stat bg-base-100 rounded-box border-base-300 border shadow-lg">
<div class="stat-figure text-orange-500"> <div class="stat-figure text-orange-500">
<svg <FileText class="h-8 w-8" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-8 w-8"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
/>
</svg>
</div> </div>
<div class="stat-title">Total</div> <div class="stat-title">Total</div>
<div class="stat-value text-orange-500">{stats.total}</div> <div class="stat-value text-orange-500">{stats.total}</div>
@@ -152,20 +114,7 @@
<div class="stat bg-base-100 rounded-box border-warning/30 border shadow-lg"> <div class="stat bg-base-100 rounded-box border-warning/30 border shadow-lg">
<div class="stat-figure text-warning"> <div class="stat-figure text-warning">
<svg <Clock class="h-8 w-8" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-8 w-8"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
</div> </div>
<div class="stat-title">Pendentes</div> <div class="stat-title">Pendentes</div>
<div class="stat-value text-warning">{stats.aguardando}</div> <div class="stat-value text-warning">{stats.aguardando}</div>
@@ -174,20 +123,7 @@
<div class="stat bg-base-100 rounded-box border-success/30 border shadow-lg"> <div class="stat bg-base-100 rounded-box border-success/30 border shadow-lg">
<div class="stat-figure text-success"> <div class="stat-figure text-success">
<svg <CheckCircle class="h-8 w-8" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-8 w-8"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
</div> </div>
<div class="stat-title">Aprovadas</div> <div class="stat-title">Aprovadas</div>
<div class="stat-value text-success">{stats.aprovadas}</div> <div class="stat-value text-success">{stats.aprovadas}</div>
@@ -196,20 +132,7 @@
<div class="stat bg-base-100 rounded-box border-error/30 border shadow-lg"> <div class="stat bg-base-100 rounded-box border-error/30 border shadow-lg">
<div class="stat-figure text-error"> <div class="stat-figure text-error">
<svg <XCircle class="h-8 w-8" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-8 w-8"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
</div> </div>
<div class="stat-title">Reprovadas</div> <div class="stat-title">Reprovadas</div>
<div class="stat-value text-error">{stats.reprovadas}</div> <div class="stat-value text-error">{stats.reprovadas}</div>
@@ -246,19 +169,7 @@
{#if ausenciasFiltradas.length === 0} {#if ausenciasFiltradas.length === 0}
<div class="alert"> <div class="alert">
<svg <Info class="stroke-info h-6 w-6 shrink-0" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
class="stroke-info h-6 w-6 shrink-0"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
></path>
</svg>
<span>Nenhuma solicitação encontrada com os filtros aplicados.</span> <span>Nenhuma solicitação encontrada com os filtros aplicados.</span>
</div> </div>
{:else} {:else}
@@ -320,26 +231,7 @@
class="btn btn-primary btn-sm gap-2" class="btn btn-primary btn-sm gap-2"
onclick={() => selecionarSolicitacao(ausencia._id)} onclick={() => selecionarSolicitacao(ausencia._id)}
> >
<svg <Eye class="h-4 w-4" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-4 w-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"
/>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"
/>
</svg>
Ver Detalhes Ver Detalhes
</button> </button>
{:else} {:else}
@@ -348,26 +240,7 @@
class="btn btn-sm gap-2" class="btn btn-sm gap-2"
onclick={() => selecionarSolicitacao(ausencia._id)} onclick={() => selecionarSolicitacao(ausencia._id)}
> >
<svg <Eye class="h-4 w-4" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-4 w-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"
/>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"
/>
</svg>
Ver Detalhes Ver Detalhes
</button> </button>
{/if} {/if}

View File

@@ -1,5 +1,5 @@
<script lang="ts"> <script lang="ts">
import { Clock, CheckCircle2, XCircle } from 'lucide-svelte'; import { Clock, CheckCircle2, XCircle, ChevronRight } from 'lucide-svelte';
import { resolve } from '$app/paths'; import { resolve } from '$app/paths';
</script> </script>
@@ -27,20 +27,7 @@
<div class="rounded-2xl bg-blue-500/20 p-4"> <div class="rounded-2xl bg-blue-500/20 p-4">
<Clock class="h-8 w-8 text-blue-600" strokeWidth={2} /> <Clock class="h-8 w-8 text-blue-600" strokeWidth={2} />
</div> </div>
<svg <ChevronRight class="text-base-content/30 h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="text-base-content/30 h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 5l7 7-7 7"
/>
</svg>
</div> </div>
<h2 class="card-title mb-2 text-xl">Gestão de Pontos</h2> <h2 class="card-title mb-2 text-xl">Gestão de Pontos</h2>
<p class="text-base-content/70"> <p class="text-base-content/70">
@@ -59,20 +46,7 @@
<div class="rounded-2xl bg-green-500/20 p-4"> <div class="rounded-2xl bg-green-500/20 p-4">
<CheckCircle2 class="h-8 w-8 text-green-600" strokeWidth={2} /> <CheckCircle2 class="h-8 w-8 text-green-600" strokeWidth={2} />
</div> </div>
<svg <ChevronRight class="text-base-content/30 h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="text-base-content/30 h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 5l7 7-7 7"
/>
</svg>
</div> </div>
<h2 class="card-title mb-2 text-xl">Homologação de Registro</h2> <h2 class="card-title mb-2 text-xl">Homologação de Registro</h2>
<p class="text-base-content/70"> <p class="text-base-content/70">
@@ -92,20 +66,7 @@
<div class="rounded-2xl bg-orange-500/20 p-4"> <div class="rounded-2xl bg-orange-500/20 p-4">
<XCircle class="h-8 w-8 text-orange-600" strokeWidth={2} /> <XCircle class="h-8 w-8 text-orange-600" strokeWidth={2} />
</div> </div>
<svg <ChevronRight class="text-base-content/30 h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="text-base-content/30 h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 5l7 7-7 7"
/>
</svg>
</div> </div>
<h2 class="card-title mb-2 text-xl">Dispensa de Registro</h2> <h2 class="card-title mb-2 text-xl">Dispensa de Registro</h2>
<p class="text-base-content/70"> <p class="text-base-content/70">

View File

@@ -6,6 +6,7 @@
import type { SimboloTipo } from '@sgse-app/backend/convex/schema'; import type { SimboloTipo } from '@sgse-app/backend/convex/schema';
import type { Id } from '@sgse-app/backend/convex/_generated/dataModel'; import type { Id } from '@sgse-app/backend/convex/_generated/dataModel';
import PrintModal from '$lib/components/PrintModal.svelte'; import PrintModal from '$lib/components/PrintModal.svelte';
import { Users, Plus, Filter, X, Inbox, MoreVertical, XCircle } from 'lucide-svelte';
const client = useConvexClient(); const client = useConvexClient();
@@ -192,20 +193,7 @@
<div class="flex flex-col items-start justify-between gap-4 sm:flex-row sm:items-center"> <div class="flex flex-col items-start justify-between gap-4 sm:flex-row sm:items-center">
<div class="flex items-center gap-4"> <div class="flex items-center gap-4">
<div class="rounded-xl bg-blue-500/20 p-3"> <div class="rounded-xl bg-blue-500/20 p-3">
<svg <Users class="h-8 w-8 text-blue-600" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-8 w-8 text-blue-600"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"
/>
</svg>
</div> </div>
<div> <div>
<h1 class="text-primary text-3xl font-bold">Funcionários Cadastrados</h1> <h1 class="text-primary text-3xl font-bold">Funcionários Cadastrados</h1>
@@ -216,18 +204,7 @@
class="btn btn-primary btn-lg gap-2 shadow-md transition-all hover:shadow-lg" class="btn btn-primary btn-lg gap-2 shadow-md transition-all hover:shadow-lg"
onclick={navCadastro} onclick={navCadastro}
> >
<svg <Plus class="h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5"
viewBox="0 0 20 20"
fill="currentColor"
>
<path
fill-rule="evenodd"
d="M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z"
clip-rule="evenodd"
/>
</svg>
Novo Funcionário Novo Funcionário
</button> </button>
</div> </div>
@@ -237,20 +214,7 @@
<div class="card bg-base-100/90 border-base-300 mb-4 shrink-0 border shadow-xl backdrop-blur-sm"> <div class="card bg-base-100/90 border-base-300 mb-4 shrink-0 border shadow-xl backdrop-blur-sm">
<div class="card-body"> <div class="card-body">
<h2 class="card-title mb-4 text-lg"> <h2 class="card-title mb-4 text-lg">
<svg <Filter class="h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"
/>
</svg>
Filtros de Pesquisa Filtros de Pesquisa
</h2> </h2>
<div class="grid grid-cols-1 items-end gap-4 md:grid-cols-4"> <div class="grid grid-cols-1 items-end gap-4 md:grid-cols-4">
@@ -318,20 +282,7 @@
applyFilters(); applyFilters();
}} }}
> >
<svg <X class="h-4 w-4" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-4 w-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M6 18L18 6M6 6l12 12"
/>
</svg>
Limpar Filtros Limpar Filtros
</button> </button>
</div> </div>
@@ -381,20 +332,7 @@
<tr> <tr>
<td colspan="7" class="py-12 text-center"> <td colspan="7" class="py-12 text-center">
<div class="flex flex-col items-center justify-center gap-4"> <div class="flex flex-col items-center justify-center gap-4">
<svg <Users class="text-base-content/30 h-16 w-16" strokeWidth={1.5} />
xmlns="http://www.w3.org/2000/svg"
class="text-base-content/30 h-16 w-16"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="1.5"
d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"
/>
</svg>
<div class="text-base-content/60 text-center"> <div class="text-base-content/60 text-center">
<p class="mb-1 text-lg font-semibold">Nenhum funcionário encontrado</p> <p class="mb-1 text-lg font-semibold">Nenhum funcionário encontrado</p>
<p class="text-sm"> <p class="text-sm">
@@ -440,16 +378,7 @@
class="btn btn-sm btn-ghost hover:btn-primary transition-all" class="btn btn-sm btn-ghost hover:btn-primary transition-all"
onclick={() => toggleMenu(f._id)} onclick={() => toggleMenu(f._id)}
> >
<svg <MoreVertical class="h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5"
viewBox="0 0 20 20"
fill="currentColor"
>
<path
d="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z"
/>
</svg>
</button> </button>
<ul <ul
class="dropdown-content menu bg-base-100 rounded-box border-base-300 z-20 w-52 border p-2 shadow-xl" class="dropdown-content menu bg-base-100 rounded-box border-base-300 z-20 w-52 border p-2 shadow-xl"
@@ -543,20 +472,7 @@
{#if setoresError} {#if setoresError}
<div class="alert alert-error mt-4"> <div class="alert alert-error mt-4">
<svg <XCircle class="h-6 w-6 shrink-0 stroke-current" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-6 w-6 shrink-0 stroke-current"
fill="none"
viewBox="0 0 24 24"
aria-hidden="true"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
<span>{setoresError}</span> <span>{setoresError}</span>
</div> </div>
{/if} {/if}

View File

@@ -15,7 +15,27 @@
APOSENTADO_OPTIONS APOSENTADO_OPTIONS
} from '$lib/utils/constants'; } from '$lib/utils/constants';
import PrintModal from '$lib/components/PrintModal.svelte'; import PrintModal from '$lib/components/PrintModal.svelte';
import { MapPin } from 'lucide-svelte'; import {
MapPin,
User,
Edit,
FileText,
Printer,
DollarSign,
Calendar,
ArrowRight,
Download,
Mail,
Phone,
Home,
Building,
File,
X,
Check,
Plus,
ExternalLink,
BookOpen
} from 'lucide-svelte';
const client = useConvexClient(); const client = useConvexClient();
@@ -113,20 +133,7 @@
<div class="flex flex-col items-start justify-between gap-4 sm:flex-row sm:items-center"> <div class="flex flex-col items-start justify-between gap-4 sm:flex-row sm:items-center">
<div class="flex items-center gap-4"> <div class="flex items-center gap-4">
<div class="rounded-xl bg-blue-500/20 p-3"> <div class="rounded-xl bg-blue-500/20 p-3">
<svg <User class="h-8 w-8 text-blue-600" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-8 w-8 text-blue-600"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"
/>
</svg>
</div> </div>
<div> <div>
<h1 class="text-primary text-3xl font-bold">{funcionario.nome}</h1> <h1 class="text-primary text-3xl font-bold">{funcionario.nome}</h1>
@@ -141,20 +148,7 @@
class="btn btn-primary gap-2" class="btn btn-primary gap-2"
onclick={() => goto(resolve(`/recursos-humanos/funcionarios/${funcionarioId}/editar`))} onclick={() => goto(resolve(`/recursos-humanos/funcionarios/${funcionarioId}/editar`))}
> >
<svg <Edit class="h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"
/>
</svg>
Editar Editar
</button> </button>
<button <button
@@ -162,37 +156,11 @@
onclick={() => onclick={() =>
goto(resolve(`/recursos-humanos/funcionarios/${funcionarioId}/documentos`))} goto(resolve(`/recursos-humanos/funcionarios/${funcionarioId}/documentos`))}
> >
<svg <FileText class="h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
/>
</svg>
Ver Documentos Ver Documentos
</button> </button>
<button class="btn btn-accent gap-2" onclick={() => (showPrintModal = true)}> <button class="btn btn-accent gap-2" onclick={() => (showPrintModal = true)}>
<svg <Printer class="h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z"
/>
</svg>
Imprimir Ficha Imprimir Ficha
</button> </button>
<button <button
@@ -214,20 +182,7 @@
> >
<div class="card-body"> <div class="card-body">
<h3 class="card-title mb-4 border-b pb-3 text-xl"> <h3 class="card-title mb-4 border-b pb-3 text-xl">
<svg <DollarSign class="text-success h-6 w-6" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="text-success h-6 w-6"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
Dados Financeiros Dados Financeiros
</h3> </h3>
<div class="grid grid-cols-1 gap-4 md:grid-cols-3"> <div class="grid grid-cols-1 gap-4 md:grid-cols-3">
@@ -276,20 +231,7 @@
<div class="flex items-center justify-between"> <div class="flex items-center justify-between">
<div class="flex items-center gap-3"> <div class="flex items-center gap-3">
<div class="rounded-xl bg-purple-500/20 p-3"> <div class="rounded-xl bg-purple-500/20 p-3">
<svg <Calendar class="h-6 w-6 text-purple-600" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-6 w-6 text-purple-600"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
/>
</svg>
</div> </div>
<div> <div>
<h3 class="text-lg font-bold">Status Atual</h3> <h3 class="text-lg font-bold">Status Atual</h3>
@@ -303,20 +245,7 @@
</div> </div>
</div> </div>
<a href={resolve('/recursos-humanos/ferias')} class="btn btn-primary btn-sm gap-2"> <a href={resolve('/recursos-humanos/ferias')} class="btn btn-primary btn-sm gap-2">
<svg <Plus class="h-4 w-4" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-4 w-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 4v16m8-8H4"
/>
</svg>
Gerenciar Férias Gerenciar Férias
</a> </a>
</div> </div>
@@ -574,20 +503,7 @@
<div class="card bg-base-100 shadow-xl"> <div class="card bg-base-100 shadow-xl">
<div class="card-body"> <div class="card-body">
<h3 class="card-title mb-3 border-b pb-2 text-lg"> <h3 class="card-title mb-3 border-b pb-2 text-lg">
<svg <BookOpen class="h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"
/>
</svg>
Cursos e Treinamentos Cursos e Treinamentos
</h3> </h3>
<div class="space-y-3"> <div class="space-y-3">
@@ -596,20 +512,7 @@
<div class="flex-1"> <div class="flex-1">
<p class="text-sm font-semibold">{curso.descricao}</p> <p class="text-sm font-semibold">{curso.descricao}</p>
<p class="text-base-content/70 mt-1 text-xs"> <p class="text-base-content/70 mt-1 text-xs">
<svg <Calendar class="mr-1 inline h-3 w-3" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="mr-1 inline h-3 w-3"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
/>
</svg>
{curso.data} {curso.data}
</p> </p>
</div> </div>
@@ -620,20 +523,7 @@
rel="noopener noreferrer" rel="noopener noreferrer"
class="btn btn-xs btn-primary gap-1" class="btn btn-xs btn-primary gap-1"
> >
<svg <FileText class="h-3 w-3" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-3 w-3"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
/>
</svg>
Certificado Certificado
</a> </a>
{/if} {/if}
@@ -727,20 +617,7 @@
<div class="card bg-base-100 shadow-xl"> <div class="card bg-base-100 shadow-xl">
<div class="card-body"> <div class="card-body">
<h3 class="card-title mb-4 border-b pb-3 text-xl"> <h3 class="card-title mb-4 border-b pb-3 text-xl">
<svg <FileText class="h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
/>
</svg>
Documentos Anexados Documentos Anexados
</h3> </h3>
@@ -758,35 +635,9 @@
class={`flex h-8 w-8 shrink-0 items-center justify-center rounded ${temDocumento ? 'bg-success/20' : 'bg-base-300'}`} class={`flex h-8 w-8 shrink-0 items-center justify-center rounded ${temDocumento ? 'bg-success/20' : 'bg-base-300'}`}
> >
{#if temDocumento} {#if temDocumento}
<svg <Check class="text-success h-4 w-4" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="text-success h-4 w-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M5 13l4 4L19 7"
/>
</svg>
{:else} {:else}
<svg <Plus class="text-base-content/40 h-4 w-4" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="text-base-content/40 h-4 w-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 4v16m8-8H4"
/>
</svg>
{/if} {/if}
</div> </div>
<div class="min-w-0 flex-1"> <div class="min-w-0 flex-1">
@@ -799,20 +650,7 @@
class="btn btn-xs btn-ghost mt-2 gap-1" class="btn btn-xs btn-ghost mt-2 gap-1"
onclick={() => downloadDocumento(documentosUrls[doc.campo] || '', doc.nome)} onclick={() => downloadDocumento(documentosUrls[doc.campo] || '', doc.nome)}
> >
<svg <Download class="h-3 w-3" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-3 w-3"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
/>
</svg>
Baixar Baixar
</button> </button>
{/if} {/if}
@@ -829,20 +667,7 @@
onclick={() => onclick={() =>
goto(resolve(`/recursos-humanos/funcionarios/${funcionarioId}/documentos`))} goto(resolve(`/recursos-humanos/funcionarios/${funcionarioId}/documentos`))}
> >
<svg <ExternalLink class="h-4 w-4" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-4 w-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
/>
</svg>
Gerenciar Documentos Gerenciar Documentos
</button> </button>
</div> </div>

View File

@@ -6,7 +6,7 @@
import { goto } from '$app/navigation'; import { goto } from '$app/navigation';
import { resolve } from '$app/paths'; import { resolve } from '$app/paths';
import type { Id } from '@sgse-app/backend/convex/_generated/dataModel'; import type { Id } from '@sgse-app/backend/convex/_generated/dataModel';
import { MapPin, Plus, X, Edit, Trash2, Search } from 'lucide-svelte'; import { MapPin, Plus, X, Edit, Trash2, Search, Info } from 'lucide-svelte';
import { toast } from 'svelte-sonner'; import { toast } from 'svelte-sonner';
const client = useConvexClient(); const client = useConvexClient();
@@ -357,19 +357,7 @@
<!-- Aviso sobre endereços tipo "sede" --> <!-- Aviso sobre endereços tipo "sede" -->
{#if associacoes.length === 0} {#if associacoes.length === 0}
<div class="alert alert-info mb-6"> <div class="alert alert-info mb-6">
<svg <Info class="h-6 w-6 shrink-0 stroke-current" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
class="h-6 w-6 shrink-0 stroke-current"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
></path>
</svg>
<span> <span>
Este funcionário não possui endereços específicos associados. O sistema usará Este funcionário não possui endereços específicos associados. O sistema usará
automaticamente os endereços tipo "Sede Principal" configurados globalmente. automaticamente os endereços tipo "Sede Principal" configurados globalmente.

View File

@@ -4,6 +4,20 @@
import { goto } from '$app/navigation'; import { goto } from '$app/navigation';
import { resolve } from '$app/paths'; import { resolve } from '$app/paths';
import { onMount } from 'svelte'; import { onMount } from 'svelte';
import {
Home,
Trash2,
ArrowLeft,
CheckCircle,
XCircle,
X,
Filter,
Users,
Inbox,
Search,
AlertTriangle,
User
} from 'lucide-svelte';
const client = useConvexClient(); const client = useConvexClient();
@@ -82,20 +96,7 @@
<ul> <ul>
<li> <li>
<a href={resolve('/')} class="text-primary hover:text-primary-focus"> <a href={resolve('/')} class="text-primary hover:text-primary-focus">
<svg <Home class="h-4 w-4" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-4 w-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"
/>
</svg>
Dashboard Dashboard
</a> </a>
</li> </li>
@@ -118,40 +119,14 @@
<div class="mb-6"> <div class="mb-6">
<div class="mb-2 flex items-center gap-3"> <div class="mb-2 flex items-center gap-3">
<div class="bg-error/10 rounded-xl p-3"> <div class="bg-error/10 rounded-xl p-3">
<svg <Trash2 class="text-error h-8 w-8" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="text-error h-8 w-8"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
/>
</svg>
</div> </div>
<div class="flex-1"> <div class="flex-1">
<h1 class="text-base-content text-3xl font-bold">Excluir Funcionários</h1> <h1 class="text-base-content text-3xl font-bold">Excluir Funcionários</h1>
<p class="text-base-content/60 mt-1">Selecione o funcionário que deseja remover do sistema</p> <p class="text-base-content/60 mt-1">Selecione o funcionário que deseja remover do sistema</p>
</div> </div>
<button class="btn gap-2" onclick={back}> <button class="btn gap-2" onclick={back}>
<svg <ArrowLeft class="h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M10 19l-7-7m0 0l7-7m-7 7h18"
/>
</svg>
Voltar Voltar
</button> </button>
</div> </div>
@@ -165,50 +140,13 @@
class:alert-error={notice.kind === 'error'} class:alert-error={notice.kind === 'error'}
> >
{#if notice.kind === 'success'} {#if notice.kind === 'success'}
<svg <CheckCircle class="h-6 w-6 shrink-0 stroke-current" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-6 w-6 shrink-0 stroke-current"
fill="none"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
{:else} {:else}
<svg <XCircle class="h-6 w-6 shrink-0 stroke-current" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-6 w-6 shrink-0 stroke-current"
fill="none"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
{/if} {/if}
<span class="font-semibold">{notice.text}</span> <span class="font-semibold">{notice.text}</span>
<button class="btn btn-sm btn-ghost" onclick={() => (notice = null)} aria-label="Fechar alerta"> <button class="btn btn-sm btn-ghost" onclick={() => (notice = null)} aria-label="Fechar alerta">
<svg <X class="h-4 w-4" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-4 w-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M6 18L18 6M6 6l12 12"
/>
</svg>
</button> </button>
</div> </div>
{/if} {/if}
@@ -218,38 +156,12 @@
<div class="card-body"> <div class="card-body">
<div class="mb-4 flex items-center justify-between"> <div class="mb-4 flex items-center justify-between">
<h2 class="card-title text-lg"> <h2 class="card-title text-lg">
<svg <Filter class="text-primary h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="text-primary h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"
/>
</svg>
Filtros de Busca Filtros de Busca
</h2> </h2>
{#if filtro} {#if filtro}
<button class="btn btn-sm btn-ghost gap-2" onclick={limparFiltro}> <button class="btn btn-sm btn-ghost gap-2" onclick={limparFiltro}>
<svg <X class="h-4 w-4" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-4 w-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M6 18L18 6M6 6l12 12"
/>
</svg>
Limpar Filtros Limpar Filtros
</button> </button>
{/if} {/if}
@@ -282,40 +194,14 @@
<div class="card bg-base-100 shadow-xl"> <div class="card bg-base-100 shadow-xl">
<div class="card-body"> <div class="card-body">
<h2 class="card-title mb-4 text-lg"> <h2 class="card-title mb-4 text-lg">
<svg <Users class="text-primary h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="text-primary h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"
/>
</svg>
Lista de Funcionários Lista de Funcionários
</h2> </h2>
{#if list.length === 0} {#if list.length === 0}
<div class="flex flex-col items-center justify-center py-12 text-center"> <div class="flex flex-col items-center justify-center py-12 text-center">
<div class="bg-base-200 mb-4 rounded-full p-4"> <div class="bg-base-200 mb-4 rounded-full p-4">
<svg <Inbox class="text-base-content/30 h-12 w-12" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="text-base-content/30 h-12 w-12"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"
/>
</svg>
</div> </div>
<p class="text-base-content/70 text-lg font-semibold">Nenhum funcionário cadastrado</p> <p class="text-base-content/70 text-lg font-semibold">Nenhum funcionário cadastrado</p>
<p class="text-base-content/50 mt-2 text-sm"> <p class="text-base-content/50 mt-2 text-sm">
@@ -325,20 +211,7 @@
{:else if filtered.length === 0} {:else if filtered.length === 0}
<div class="flex flex-col items-center justify-center py-12 text-center"> <div class="flex flex-col items-center justify-center py-12 text-center">
<div class="bg-base-200 mb-4 rounded-full p-4"> <div class="bg-base-200 mb-4 rounded-full p-4">
<svg <Search class="text-base-content/30 h-12 w-12" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="text-base-content/30 h-12 w-12"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
/>
</svg>
</div> </div>
<p class="text-base-content/70 text-lg font-semibold">Nenhum resultado encontrado</p> <p class="text-base-content/70 text-lg font-semibold">Nenhum resultado encontrado</p>
<p class="text-base-content/50 mt-2 text-sm">Tente ajustar os filtros de busca</p> <p class="text-base-content/50 mt-2 text-sm">Tente ajustar os filtros de busca</p>
@@ -366,20 +239,7 @@
class="btn btn-error btn-sm gap-2" class="btn btn-error btn-sm gap-2"
onclick={() => openDeleteModal(f._id, f.nome, f.cpf, f.matricula)} onclick={() => openDeleteModal(f._id, f.nome, f.cpf, f.matricula)}
> >
<svg <Trash2 class="h-4 w-4" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-4 w-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
/>
</svg>
Excluir Excluir
</button> </button>
</td> </td>
@@ -396,37 +256,12 @@
<dialog id="delete_modal_func_excluir" class="modal"> <dialog id="delete_modal_func_excluir" class="modal">
<div class="modal-box max-w-md"> <div class="modal-box max-w-md">
<h3 class="text-error mb-4 flex items-center gap-2 text-2xl font-bold"> <h3 class="text-error mb-4 flex items-center gap-2 text-2xl font-bold">
<svg <AlertTriangle class="h-7 w-7" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-7 w-7"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
/>
</svg>
Confirmar Exclusão Confirmar Exclusão
</h3> </h3>
<div class="alert alert-warning mb-4"> <div class="alert alert-warning mb-4">
<svg <AlertTriangle class="h-6 w-6 shrink-0 stroke-current" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-6 w-6 shrink-0 stroke-current"
fill="none"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
/>
</svg>
<div> <div>
<span class="font-bold">Atenção!</span> <span class="font-bold">Atenção!</span>
<p class="text-sm">Esta ação não pode ser desfeita!</p> <p class="text-sm">Esta ação não pode ser desfeita!</p>
@@ -440,20 +275,7 @@
</p> </p>
<div class="space-y-2"> <div class="space-y-2">
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
<svg <User class="text-primary h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="text-primary h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"
/>
</svg>
<strong class="text-error text-lg">{toDelete.nome}</strong> <strong class="text-error text-lg">{toDelete.nome}</strong>
</div> </div>
<div class="flex items-center gap-2 text-sm"> <div class="flex items-center gap-2 text-sm">
@@ -472,20 +294,7 @@
<div class="modal-action justify-between"> <div class="modal-action justify-between">
<button class="btn gap-2" onclick={closeDeleteModal} disabled={deletingId !== null}> <button class="btn gap-2" onclick={closeDeleteModal} disabled={deletingId !== null}>
<svg <X class="h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M6 18L18 6M6 6l12 12"
/>
</svg>
Cancelar Cancelar
</button> </button>
<button class="btn btn-error gap-2" onclick={confirmDelete} disabled={deletingId !== null}> <button class="btn btn-error gap-2" onclick={confirmDelete} disabled={deletingId !== null}>
@@ -493,20 +302,7 @@
<span class="loading loading-spinner loading-sm"></span> <span class="loading loading-spinner loading-sm"></span>
Excluindo... Excluindo...
{:else} {:else}
<svg <Trash2 class="h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
/>
</svg>
Confirmar Exclusão Confirmar Exclusão
{/if} {/if}
</button> </button>

View File

@@ -4,6 +4,7 @@
import type { Id } from '@sgse-app/backend/convex/_generated/dataModel'; import type { Id } from '@sgse-app/backend/convex/_generated/dataModel';
import { onMount } from 'svelte'; import { onMount } from 'svelte';
import { resolve } from '$app/paths'; import { resolve } from '$app/paths';
import { Award, Plus, CheckCircle, XCircle, Filter, X, MoreVertical, Edit, Trash2, AlertTriangle } from 'lucide-svelte';
const client = useConvexClient(); const client = useConvexClient();
let isLoading = true; let isLoading = true;
@@ -92,20 +93,7 @@
<div class="flex flex-col items-start justify-between gap-4 sm:flex-row sm:items-center"> <div class="flex flex-col items-start justify-between gap-4 sm:flex-row sm:items-center">
<div class="flex items-center gap-4"> <div class="flex items-center gap-4">
<div class="rounded-xl bg-green-500/20 p-3"> <div class="rounded-xl bg-green-500/20 p-3">
<svg <Award class="h-8 w-8 text-green-600" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-8 w-8 text-green-600"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z"
/>
</svg>
</div> </div>
<div> <div>
<h1 class="text-primary text-3xl font-bold">Símbolos Cadastrados</h1> <h1 class="text-primary text-3xl font-bold">Símbolos Cadastrados</h1>
@@ -113,18 +101,7 @@
</div> </div>
</div> </div>
<a href={resolve('/recursos-humanos/simbolos/cadastro')} class="btn btn-primary btn-lg gap-2"> <a href={resolve('/recursos-humanos/simbolos/cadastro')} class="btn btn-primary btn-lg gap-2">
<svg <Plus class="h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5"
viewBox="0 0 20 20"
fill="currentColor"
>
<path
fill-rule="evenodd"
d="M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z"
clip-rule="evenodd"
/>
</svg>
Novo Símbolo Novo Símbolo
</a> </a>
</div> </div>
@@ -136,29 +113,12 @@
class="alert mb-6 shadow-lg" class="alert mb-6 shadow-lg"
class:alert-success={notice.kind === 'success'} class:alert-success={notice.kind === 'success'}
class:alert-error={notice.kind === 'error'} class:alert-error={notice.kind === 'error'}
>
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-6 w-6 shrink-0 stroke-current"
fill="none"
viewBox="0 0 24 24"
> >
{#if notice.kind === 'success'} {#if notice.kind === 'success'}
<path <CheckCircle class="h-6 w-6 shrink-0 stroke-current" strokeWidth={2} />
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"
/>
{:else} {:else}
<path <XCircle class="h-6 w-6 shrink-0 stroke-current" strokeWidth={2} />
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"
/>
{/if} {/if}
</svg>
<span>{notice.text}</span> <span>{notice.text}</span>
</div> </div>
{/if} {/if}
@@ -167,20 +127,7 @@
<div class="card bg-base-100 mb-6 shadow-xl"> <div class="card bg-base-100 mb-6 shadow-xl">
<div class="card-body"> <div class="card-body">
<h2 class="card-title mb-4 text-lg"> <h2 class="card-title mb-4 text-lg">
<svg <Filter class="h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"
/>
</svg>
Filtros de Pesquisa Filtros de Pesquisa
</h2> </h2>
<div class="grid grid-cols-1 gap-4 md:grid-cols-3"> <div class="grid grid-cols-1 gap-4 md:grid-cols-3">
@@ -231,20 +178,7 @@
filtroDescricao = ''; filtroDescricao = '';
}} }}
> >
<svg <X class="h-4 w-4" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-4 w-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M6 18L18 6M6 6l12 12"
/>
</svg>
Limpar Filtros Limpar Filtros
</button> </button>
</div> </div>
@@ -305,32 +239,14 @@
class="btn btn-sm" class="btn btn-sm"
onclick={() => toggleMenu(simbolo._id)} onclick={() => toggleMenu(simbolo._id)}
> >
<svg <MoreVertical class="h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5"
viewBox="0 0 20 20"
fill="currentColor"
>
<path
d="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z"
/>
</svg>
</button> </button>
<ul <ul
class="dropdown-content menu bg-base-100 rounded-box border-base-300 z-10 w-52 border p-2 shadow-lg" class="dropdown-content menu bg-base-100 rounded-box border-base-300 z-10 w-52 border p-2 shadow-lg"
> >
<li> <li>
<a href={resolve(`/recursos-humanos/simbolos/${simbolo._id}/editar`)}> <a href={resolve(`/recursos-humanos/simbolos/${simbolo._id}/editar`)}>
<svg <Edit class="h-4 w-4" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-4 w-4"
viewBox="0 0 20 20"
fill="currentColor"
>
<path
d="M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM11.379 5.793L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"
/>
</svg>
Editar Editar
</a> </a>
</li> </li>
@@ -340,18 +256,7 @@
onclick={() => openDeleteModal(simbolo._id, simbolo.nome)} onclick={() => openDeleteModal(simbolo._id, simbolo.nome)}
class="text-error" class="text-error"
> >
<svg <Trash2 class="h-4 w-4" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-4 w-4"
viewBox="0 0 20 20"
fill="currentColor"
>
<path
fill-rule="evenodd"
d="M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z"
clip-rule="evenodd"
/>
</svg>
Excluir Excluir
</button> </button>
</li> </li>
@@ -386,19 +291,7 @@
<div class="modal-box"> <div class="modal-box">
<h3 class="mb-4 text-lg font-bold">Confirmar Exclusão</h3> <h3 class="mb-4 text-lg font-bold">Confirmar Exclusão</h3>
<div class="alert alert-warning mb-4"> <div class="alert alert-warning mb-4">
<svg <AlertTriangle class="h-6 w-6 shrink-0 stroke-current" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-6 w-6 shrink-0 stroke-current"
fill="none"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
/>
</svg>
<span>Esta ação não pode ser desfeita!</span> <span>Esta ação não pode ser desfeita!</span>
</div> </div>
{#if simboloToDelete} {#if simboloToDelete}
@@ -421,18 +314,7 @@
<span class="loading loading-spinner loading-sm"></span> <span class="loading loading-spinner loading-sm"></span>
Excluindo... Excluindo...
{:else} {:else}
<svg <Trash2 class="h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5"
viewBox="0 0 20 20"
fill="currentColor"
>
<path
fill-rule="evenodd"
d="M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z"
clip-rule="evenodd"
/>
</svg>
Confirmar Exclusão Confirmar Exclusão
{/if} {/if}
</button> </button>

View File

@@ -6,6 +6,7 @@
import { goto } from '$app/navigation'; import { goto } from '$app/navigation';
import type { SimboloTipo } from '@sgse-app/backend/convex/schema'; import type { SimboloTipo } from '@sgse-app/backend/convex/schema';
import { resolve } from '$app/paths'; import { resolve } from '$app/paths';
import { Award, CheckCircle, XCircle, Info, ArrowLeft, Save } from 'lucide-svelte';
const client = useConvexClient(); const client = useConvexClient();
@@ -116,20 +117,7 @@
<div class="mb-6"> <div class="mb-6">
<div class="mb-2 flex items-center gap-4"> <div class="mb-2 flex items-center gap-4">
<div class="rounded-xl bg-green-500/20 p-3"> <div class="rounded-xl bg-green-500/20 p-3">
<svg <Award class="h-8 w-8 text-green-600" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-8 w-8 text-green-600"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z"
/>
</svg>
</div> </div>
<div> <div>
<h1 class="text-primary text-3xl font-bold">Cadastro de Símbolo</h1> <h1 class="text-primary text-3xl font-bold">Cadastro de Símbolo</h1>
@@ -146,29 +134,12 @@
class="alert mb-6 shadow-lg" class="alert mb-6 shadow-lg"
class:alert-success={notice.kind === 'success'} class:alert-success={notice.kind === 'success'}
class:alert-error={notice.kind === 'error'} class:alert-error={notice.kind === 'error'}
>
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-6 w-6 shrink-0 stroke-current"
fill="none"
viewBox="0 0 24 24"
> >
{#if notice.kind === 'success'} {#if notice.kind === 'success'}
<path <CheckCircle class="h-6 w-6 shrink-0 stroke-current" strokeWidth={2} />
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"
/>
{:else} {:else}
<path <XCircle class="h-6 w-6 shrink-0 stroke-current" strokeWidth={2} />
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"
/>
{/if} {/if}
</svg>
<span>{notice.text}</span> <span>{notice.text}</span>
</div> </div>
{/if} {/if}
@@ -393,19 +364,7 @@
<!-- Preview do Total --> <!-- Preview do Total -->
{#if getTotalPreview()} {#if getTotalPreview()}
<div class="alert alert-info shadow-lg"> <div class="alert alert-info shadow-lg">
<svg <Info class="h-6 w-6 shrink-0 stroke-current" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
class="h-6 w-6 shrink-0 stroke-current"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
></path>
</svg>
<div> <div>
<h3 class="font-bold">Valor Total Calculado</h3> <h3 class="font-bold">Valor Total Calculado</h3>
<div class="mt-1 text-2xl font-bold">R$ {getTotalPreview()}</div> <div class="mt-1 text-2xl font-bold">R$ {getTotalPreview()}</div>
@@ -478,20 +437,7 @@
disabled={isSubmitting} disabled={isSubmitting}
onclick={() => goto(resolve('/recursos-humanos/simbolos'))} onclick={() => goto(resolve('/recursos-humanos/simbolos'))}
> >
<svg <ArrowLeft class="h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M6 18L18 6M6 6l12 12"
/>
</svg>
Cancelar Cancelar
</button> </button>
<button <button
@@ -503,20 +449,7 @@
<span class="loading loading-spinner"></span> <span class="loading loading-spinner"></span>
Cadastrando... Cadastrando...
{:else} {:else}
<svg <Save class="h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M5 13l4 4L19 7"
/>
</svg>
Cadastrar Símbolo Cadastrar Símbolo
{/if} {/if}
</button> </button>

View File

@@ -1,13 +1,13 @@
<script lang="ts"> <script lang="ts">
import { resolve } from '$app/paths'; import { resolve } from '$app/paths';
import WidgetGestaoPontos from '$lib/components/ponto/WidgetGestaoPontos.svelte'; import WidgetGestaoPontos from '$lib/components/ponto/WidgetGestaoPontos.svelte';
import { Clock, ChevronRight, Info } from 'lucide-svelte';
const menuItems = [ const menuItems = [
{ {
categoria: 'Gestão de Ausências', categoria: 'Gestão de Ausências',
descricao: 'Gerencie solicitações de ausências e aprovações', descricao: 'Gerencie solicitações de ausências e aprovações',
icon: `<svg xmlns="http://www.w3.org/2000/svg" class="h-12 w-12" fill="none" viewBox="0 0 24 24" stroke="currentColor"> iconComponent: Clock,
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>`,
gradient: 'from-orange-500/10 to-orange-600/20', gradient: 'from-orange-500/10 to-orange-600/20',
accentColor: 'text-orange-600', accentColor: 'text-orange-600',
bgIcon: 'bg-orange-500/20', bgIcon: 'bg-orange-500/20',
@@ -16,9 +16,7 @@
nome: 'Gestão de Ausências', nome: 'Gestão de Ausências',
descricao: 'Visualizar e gerenciar solicitações de ausências', descricao: 'Visualizar e gerenciar solicitações de ausências',
href: '/secretaria-executiva/gestao-ausencias', href: '/secretaria-executiva/gestao-ausencias',
icon: `<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"> iconComponent: Clock
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>`
} }
] ]
} }
@@ -48,9 +46,7 @@
<!-- Cabeçalho da Categoria --> <!-- Cabeçalho da Categoria -->
<div class="mb-6 flex items-start gap-6"> <div class="mb-6 flex items-start gap-6">
<div class="p-4 {categoria.bgIcon} rounded-2xl"> <div class="p-4 {categoria.bgIcon} rounded-2xl">
<div class={categoria.accentColor}> <svelte:component this={categoria.iconComponent} class="h-12 w-12 {categoria.accentColor}" strokeWidth={2} />
{@html categoria.icon}
</div>
</div> </div>
<div class="flex-1"> <div class="flex-1">
<h2 class="card-title mb-2 text-2xl {categoria.accentColor}"> <h2 class="card-title mb-2 text-2xl {categoria.accentColor}">
@@ -72,24 +68,9 @@
<div <div
class="bg-base-100 group-hover:bg-primary rounded-lg p-3 transition-colors duration-300 group-hover:text-white" class="bg-base-100 group-hover:bg-primary rounded-lg p-3 transition-colors duration-300 group-hover:text-white"
> >
<div class="{categoria.accentColor} group-hover:text-white"> <svelte:component this={opcao.iconComponent} class="h-5 w-5 {categoria.accentColor} group-hover:text-white" strokeWidth={2} />
{@html opcao.icon}
</div> </div>
</div> <ChevronRight class="text-base-content/30 group-hover:text-primary h-5 w-5 transition-colors duration-300" strokeWidth={2} />
<svg
xmlns="http://www.w3.org/2000/svg"
class="text-base-content/30 group-hover:text-primary h-5 w-5 transition-colors duration-300"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 5l7 7-7 7"
/>
</svg>
</div> </div>
<h3 <h3
class="text-base-content group-hover:text-primary mb-2 text-lg font-bold transition-colors duration-300" class="text-base-content group-hover:text-primary mb-2 text-lg font-bold transition-colors duration-300"
@@ -115,19 +96,7 @@
<!-- Card de Ajuda --> <!-- Card de Ajuda -->
<div class="alert alert-info mt-8 shadow-lg"> <div class="alert alert-info mt-8 shadow-lg">
<svg <Info class="h-6 w-6 shrink-0 stroke-current" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
class="h-6 w-6 shrink-0 stroke-current"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
></path>
</svg>
<div> <div>
<h3 class="font-bold">Precisa de ajuda?</h3> <h3 class="font-bold">Precisa de ajuda?</h3>
<div class="text-sm"> <div class="text-sm">

View File

@@ -5,6 +5,7 @@
import { api } from '@sgse-app/backend/convex/_generated/api'; import { api } from '@sgse-app/backend/convex/_generated/api';
import AprovarAusencias from '$lib/components/AprovarAusencias.svelte'; import AprovarAusencias from '$lib/components/AprovarAusencias.svelte';
import type { Id } from '@sgse-app/backend/convex/_generated/dataModel'; import type { Id } from '@sgse-app/backend/convex/_generated/dataModel';
import { Clock, ArrowLeft, FileText, CheckCircle, XCircle, Info, Eye } from 'lucide-svelte';
const client = useConvexClient(); const client = useConvexClient();
const currentUser = useQuery(api.auth.getCurrentUser, {}); const currentUser = useQuery(api.auth.getCurrentUser, {});
@@ -86,20 +87,7 @@
<div class="flex items-center justify-between"> <div class="flex items-center justify-between">
<div class="flex items-center gap-4"> <div class="flex items-center gap-4">
<div class="rounded-xl bg-orange-500/20 p-3"> <div class="rounded-xl bg-orange-500/20 p-3">
<svg <Clock class="h-8 w-8 text-orange-600" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-8 w-8 text-orange-600"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
</div> </div>
<div> <div>
<h1 class="text-primary text-3xl font-bold">Gestão de Ausências</h1> <h1 class="text-primary text-3xl font-bold">Gestão de Ausências</h1>
@@ -107,20 +95,7 @@
</div> </div>
</div> </div>
<button class="btn gap-2" onclick={() => goto(resolve('/secretaria-executiva'))}> <button class="btn gap-2" onclick={() => goto(resolve('/secretaria-executiva'))}>
<svg <ArrowLeft class="h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M10 19l-7-7m0 0l7-7m-7 7h18"
/>
</svg>
Voltar Voltar
</button> </button>
</div> </div>
@@ -130,20 +105,7 @@
<div class="mb-6 grid grid-cols-1 gap-4 md:grid-cols-4"> <div class="mb-6 grid grid-cols-1 gap-4 md:grid-cols-4">
<div class="stat bg-base-100 rounded-box border-base-300 border shadow-lg"> <div class="stat bg-base-100 rounded-box border-base-300 border shadow-lg">
<div class="stat-figure text-orange-500"> <div class="stat-figure text-orange-500">
<svg <FileText class="h-8 w-8" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-8 w-8"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
/>
</svg>
</div> </div>
<div class="stat-title">Total</div> <div class="stat-title">Total</div>
<div class="stat-value text-orange-500">{stats.total}</div> <div class="stat-value text-orange-500">{stats.total}</div>
@@ -152,20 +114,7 @@
<div class="stat bg-base-100 rounded-box border-warning/30 border shadow-lg"> <div class="stat bg-base-100 rounded-box border-warning/30 border shadow-lg">
<div class="stat-figure text-warning"> <div class="stat-figure text-warning">
<svg <Clock class="h-8 w-8" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-8 w-8"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
</div> </div>
<div class="stat-title">Pendentes</div> <div class="stat-title">Pendentes</div>
<div class="stat-value text-warning">{stats.aguardando}</div> <div class="stat-value text-warning">{stats.aguardando}</div>
@@ -174,20 +123,7 @@
<div class="stat bg-base-100 rounded-box border-success/30 border shadow-lg"> <div class="stat bg-base-100 rounded-box border-success/30 border shadow-lg">
<div class="stat-figure text-success"> <div class="stat-figure text-success">
<svg <CheckCircle class="h-8 w-8" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-8 w-8"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
</div> </div>
<div class="stat-title">Aprovadas</div> <div class="stat-title">Aprovadas</div>
<div class="stat-value text-success">{stats.aprovadas}</div> <div class="stat-value text-success">{stats.aprovadas}</div>
@@ -196,20 +132,7 @@
<div class="stat bg-base-100 rounded-box border-error/30 border shadow-lg"> <div class="stat bg-base-100 rounded-box border-error/30 border shadow-lg">
<div class="stat-figure text-error"> <div class="stat-figure text-error">
<svg <XCircle class="h-8 w-8" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-8 w-8"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
</div> </div>
<div class="stat-title">Reprovadas</div> <div class="stat-title">Reprovadas</div>
<div class="stat-value text-error">{stats.reprovadas}</div> <div class="stat-value text-error">{stats.reprovadas}</div>
@@ -246,19 +169,7 @@
{#if ausenciasFiltradas.length === 0} {#if ausenciasFiltradas.length === 0}
<div class="alert"> <div class="alert">
<svg <Info class="stroke-info h-6 w-6 shrink-0" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
class="stroke-info h-6 w-6 shrink-0"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
></path>
</svg>
<span>Nenhuma solicitação encontrada com os filtros aplicados.</span> <span>Nenhuma solicitação encontrada com os filtros aplicados.</span>
</div> </div>
{:else} {:else}
@@ -320,26 +231,7 @@
class="btn btn-primary btn-sm gap-2" class="btn btn-primary btn-sm gap-2"
onclick={() => selecionarSolicitacao(ausencia._id)} onclick={() => selecionarSolicitacao(ausencia._id)}
> >
<svg <Eye class="h-4 w-4" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-4 w-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"
/>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"
/>
</svg>
Ver Detalhes Ver Detalhes
</button> </button>
{:else} {:else}
@@ -348,26 +240,7 @@
class="btn btn-sm gap-2" class="btn btn-sm gap-2"
onclick={() => selecionarSolicitacao(ausencia._id)} onclick={() => selecionarSolicitacao(ausencia._id)}
> >
<svg <Eye class="h-4 w-4" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-4 w-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"
/>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"
/>
</svg>
Ver Detalhes Ver Detalhes
</button> </button>
{/if} {/if}

View File

@@ -4,6 +4,7 @@
import type { FunctionReference } from 'convex/server'; import type { FunctionReference } from 'convex/server';
import type { Id, Doc } from '@sgse-app/backend/convex/_generated/dataModel'; import type { Id, Doc } from '@sgse-app/backend/convex/_generated/dataModel';
import { resolve } from '$app/paths'; import { resolve } from '$app/paths';
import { FileText, ArrowLeft, Plus, Edit, Trash2, X } from 'lucide-svelte';
const client = useConvexClient(); const client = useConvexClient();
const currentUser = useQuery(api.auth.getCurrentUser as FunctionReference<'query'>); const currentUser = useQuery(api.auth.getCurrentUser as FunctionReference<'query'>);
@@ -105,20 +106,7 @@
<div class="flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between"> <div class="flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between">
<div class="flex items-center gap-4"> <div class="flex items-center gap-4">
<div class="from-info/15 via-primary/10 to-secondary/10 rounded-2xl bg-gradient-to-br p-3"> <div class="from-info/15 via-primary/10 to-secondary/10 rounded-2xl bg-gradient-to-br p-3">
<svg <FileText class="text-info h-9 w-9" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="text-info h-9 w-9"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
/>
</svg>
</div> </div>
<div> <div>
<h1 class="text-base-content text-3xl font-bold">Gerenciar Templates</h1> <h1 class="text-base-content text-3xl font-bold">Gerenciar Templates</h1>
@@ -131,20 +119,7 @@
</div> </div>
</div> </div>
<a href="/ti/notificacoes" class="btn btn-outline gap-2"> <a href="/ti/notificacoes" class="btn btn-outline gap-2">
<svg <ArrowLeft class="h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M10 19l-7-7m0 0l7-7m-7 7h18"
/>
</svg>
Voltar para Notificações Voltar para Notificações
</a> </a>
</div> </div>
@@ -163,7 +138,7 @@
class="btn btn-sm btn-circle btn-ghost" class="btn btn-sm btn-circle btn-ghost"
onclick={() => (mensagem = null)} onclick={() => (mensagem = null)}
> >
<X class="h-4 w-4" strokeWidth={2} />
</button> </button>
</div> </div>
{/if} {/if}
@@ -204,20 +179,7 @@
<div class="mb-4 flex items-center justify-between"> <div class="mb-4 flex items-center justify-between">
<h2 class="card-title">Templates ({templatesFiltrados.length})</h2> <h2 class="card-title">Templates ({templatesFiltrados.length})</h2>
<a href={resolve('/ti/notificacoes/templates/novo')} class="btn btn-primary gap-2"> <a href={resolve('/ti/notificacoes/templates/novo')} class="btn btn-primary gap-2">
<svg <Plus class="h-5 w-5" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 4v16m8-8H4"
/>
</svg>
Novo Template Novo Template
</a> </a>
</div> </div>
@@ -284,20 +246,7 @@
class="btn btn-sm btn-ghost" class="btn btn-sm btn-ghost"
title="Editar" title="Editar"
> >
<svg <Edit class="h-4 w-4" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-4 w-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"
/>
</svg>
</a> </a>
{#if template.tipo === 'customizado'} {#if template.tipo === 'customizado'}
<button <button
@@ -307,20 +256,7 @@
disabled={processando} disabled={processando}
title="Excluir" title="Excluir"
> >
<svg <Trash2 class="h-4 w-4" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="h-4 w-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
/>
</svg>
</button> </button>
{/if} {/if}
</div> </div>

View File

@@ -6,6 +6,7 @@
import type { Doc, Id } from '@sgse-app/backend/convex/_generated/dataModel'; import type { Doc, Id } from '@sgse-app/backend/convex/_generated/dataModel';
import { goto } from '$app/navigation'; import { goto } from '$app/navigation';
import { resolve } from '$app/paths'; import { resolve } from '$app/paths';
import { FileText } from 'lucide-svelte';
const client = useConvexClient(); const client = useConvexClient();
const currentUser = useQuery(api.auth.getCurrentUser as FunctionReference<'query'>); const currentUser = useQuery(api.auth.getCurrentUser as FunctionReference<'query'>);
@@ -140,20 +141,7 @@
<div class="mb-4 flex items-center justify-between"> <div class="mb-4 flex items-center justify-between">
<div class="flex items-center gap-4"> <div class="flex items-center gap-4">
<div class="from-info/15 via-primary/10 to-secondary/10 rounded-2xl bg-gradient-to-br p-3"> <div class="from-info/15 via-primary/10 to-secondary/10 rounded-2xl bg-gradient-to-br p-3">
<svg <FileText class="text-info h-9 w-9" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="text-info h-9 w-9"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
/>
</svg>
</div> </div>
<div> <div>
<h1 class="text-base-content text-3xl font-bold">Editar Template</h1> <h1 class="text-base-content text-3xl font-bold">Editar Template</h1>

View File

@@ -5,6 +5,7 @@
import type { Id } from '@sgse-app/backend/convex/_generated/dataModel'; import type { Id } from '@sgse-app/backend/convex/_generated/dataModel';
import { goto } from '$app/navigation'; import { goto } from '$app/navigation';
import { resolve } from '$app/paths'; import { resolve } from '$app/paths';
import { FileText } from 'lucide-svelte';
const client = useConvexClient(); const client = useConvexClient();
const currentUser = useQuery(api.auth.getCurrentUser as FunctionReference<'query'>); const currentUser = useQuery(api.auth.getCurrentUser as FunctionReference<'query'>);
@@ -86,20 +87,7 @@
<div class="mb-4 flex items-center justify-between"> <div class="mb-4 flex items-center justify-between">
<div class="flex items-center gap-4"> <div class="flex items-center gap-4">
<div class="bg-gradient-to-br from-info/15 via-primary/10 to-secondary/10 rounded-2xl p-3"> <div class="bg-gradient-to-br from-info/15 via-primary/10 to-secondary/10 rounded-2xl p-3">
<svg <FileText class="text-info h-9 w-9" strokeWidth={2} />
xmlns="http://www.w3.org/2000/svg"
class="text-info h-9 w-9"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
/>
</svg>
</div> </div>
<div> <div>
<h1 class="text-base-content text-3xl font-bold">Novo Template</h1> <h1 class="text-base-content text-3xl font-bold">Novo Template</h1>