feat: replace SVG icons with Lucide components across various Svelte components for improved consistency and maintainability

This commit is contained in:
2025-12-04 14:30:31 -03:00
parent a3d9e782af
commit 88f25dc6ab
21 changed files with 457 additions and 2921 deletions

View File

@@ -19,6 +19,29 @@
import logoGovPE from '$lib/assets/logo_governo_PE.png';
import { format } from 'date-fns';
import { ptBR } from 'date-fns/locale';
import {
Calendar,
ArrowLeft,
BarChart3,
FileText,
Printer,
XCircle,
Clock,
CheckCircle,
X,
Download,
Filter,
Eye,
Edit,
Trash2,
Info,
AlertTriangle,
FileCheck,
Baby,
User,
Heart,
Check
} from 'lucide-svelte';
const client = useConvexClient();
@@ -1200,20 +1223,7 @@
<div class="flex flex-wrap items-center justify-between gap-4">
<div class="flex items-center gap-4">
<div class="rounded-xl bg-purple-500/20 p-3">
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-8 w-8 text-purple-600"
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>
<FileCheck class="h-8 w-8 text-purple-600" strokeWidth={2} />
</div>
<div>
<h1 class="text-primary text-3xl font-bold">Atestados & Licenças</h1>
@@ -1221,20 +1231,7 @@
</div>
</div>
<button class="btn gap-2" onclick={() => goto(resolve('/recursos-humanos'))}>
<svg
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>
<ArrowLeft class="h-5 w-5" strokeWidth={2} />
Voltar
</button>
</div>
@@ -1246,120 +1243,42 @@
class="tab gap-2 {abaAtiva === 'dashboard' ? 'tab-active' : ''}"
onclick={() => (abaAtiva = 'dashboard')}
>
<svg
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 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"
/>
</svg>
<BarChart3 class="h-5 w-5" strokeWidth={2} />
<span class="font-medium">Dashboard</span>
</button>
<button
class="tab gap-2 {abaAtiva === 'atestado' ? 'tab-active' : ''}"
onclick={() => (abaAtiva = 'atestado')}
>
<svg
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>
<FileText class="h-5 w-5" strokeWidth={2} />
<span class="font-medium">Atestado Médico</span>
</button>
<button
class="tab gap-2 {abaAtiva === 'declaracao' ? 'tab-active' : ''}"
onclick={() => (abaAtiva = 'declaracao')}
>
<svg
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>
<FileText class="h-5 w-5" strokeWidth={2} />
<span class="font-medium">Declaração</span>
</button>
<button
class="tab gap-2 {abaAtiva === 'maternidade' ? 'tab-active' : ''}"
onclick={() => (abaAtiva = 'maternidade')}
>
<svg
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="M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"
/>
</svg>
<Baby class="h-5 w-5" strokeWidth={2} />
<span class="font-medium">Licença Maternidade</span>
</button>
<button
class="tab gap-2 {abaAtiva === 'paternidade' ? 'tab-active' : ''}"
onclick={() => (abaAtiva = 'paternidade')}
>
<svg
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="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"
/>
</svg>
<User class="h-5 w-5" strokeWidth={2} />
<span class="font-medium">Licença Paternidade</span>
</button>
<button
class="tab gap-2 {abaAtiva === 'relatorios' ? 'tab-active' : ''}"
onclick={() => (abaAtiva = 'relatorios')}
>
<svg
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>
<Printer class="h-5 w-5" strokeWidth={2} />
<span class="font-medium">Imprimir Relatórios</span>
</button>
</div>
@@ -1372,20 +1291,7 @@
<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-figure text-error">
<svg
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>
<FileText class="h-8 w-8" strokeWidth={2} />
</div>
<div class="stat-title">Atestados Ativos</div>
<div class="stat-value text-error">
@@ -1395,20 +1301,7 @@
<div class="stat bg-base-100 rounded-box border-base-300 border shadow-lg">
<div class="stat-figure text-secondary">
<svg
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="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>
<Calendar class="h-8 w-8" strokeWidth={2} />
</div>
<div class="stat-title">Licenças Ativas</div>
<div class="stat-value text-secondary">
@@ -1418,20 +1311,7 @@
<div class="stat bg-base-100 rounded-box border-base-300 border shadow-lg">
<div class="stat-figure text-warning">
<svg
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="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>
<User class="h-8 w-8" strokeWidth={2} />
</div>
<div class="stat-title">Afastados Hoje</div>
<div class="stat-value text-warning">
@@ -1441,20 +1321,7 @@
<div class="stat bg-base-100 rounded-box border-base-300 border shadow-lg">
<div class="stat-figure text-info">
<svg
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="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>
<Calendar class="h-8 w-8" strokeWidth={2} />
</div>
<div class="stat-title">Dias no Mês</div>
<div class="stat-value text-info">
@@ -1828,20 +1695,7 @@
<div class="card-body">
<div class="mb-6 flex items-center gap-3">
<div class="bg-error/10 rounded-lg p-2">
<svg
xmlns="http://www.w3.org/2000/svg"
class="text-error 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>
<FileText class="text-error h-6 w-6" strokeWidth={2} />
</div>
<div>
<h2 class="card-title text-2xl">Registrar Atestado Médico</h2>
@@ -1927,20 +1781,7 @@
<div class="divider my-6"></div>
<div class="card-actions justify-end gap-3">
<button class="btn btn-outline" onclick={resetarFormularioAtestado}>
<svg
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>
<X class="h-5 w-5" strokeWidth={2} />
Cancelar
</button>
<button
@@ -1952,20 +1793,7 @@
<span class="loading loading-spinner loading-sm"></span>
Salvando...
{:else}
<svg
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>
<Check class="h-5 w-5" strokeWidth={2} />
Salvar
{/if}
</button>
@@ -1978,20 +1806,7 @@
<div class="card-body">
<div class="mb-6 flex items-center gap-3">
<div class="bg-warning/10 rounded-lg p-2">
<svg
xmlns="http://www.w3.org/2000/svg"
class="text-warning 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>
<FileText class="text-warning h-6 w-6" strokeWidth={2} />
</div>
<div>
<h2 class="card-title text-2xl">Registrar Declaração de Comparecimento</h2>
@@ -2063,20 +1878,7 @@
<div class="divider my-6"></div>
<div class="card-actions justify-end gap-3">
<button class="btn btn-outline" onclick={resetarFormularioDeclaracao}>
<svg
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>
<X class="h-5 w-5" strokeWidth={2} />
Cancelar
</button>
<button
@@ -2088,20 +1890,7 @@
<span class="loading loading-spinner loading-sm"></span>
Salvando...
{:else}
<svg
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>
<Check class="h-5 w-5" strokeWidth={2} />
Salvar
{/if}
</button>
@@ -2114,20 +1903,7 @@
<div class="card-body">
<div class="mb-6 flex items-center gap-3">
<div class="bg-secondary/10 rounded-lg p-2">
<svg
xmlns="http://www.w3.org/2000/svg"
class="text-secondary h-6 w-6"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"
/>
</svg>
<Baby class="text-secondary h-6 w-6" strokeWidth={2} />
</div>
<div>
<h2 class="card-title text-2xl">Registrar Licença Maternidade</h2>
@@ -2241,20 +2017,7 @@
<div class="divider my-6"></div>
<div class="card-actions justify-end gap-3">
<button class="btn btn-outline" onclick={resetarFormularioMaternidade}>
<svg
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>
<X class="h-5 w-5" strokeWidth={2} />
Cancelar
</button>
<button
@@ -2266,20 +2029,7 @@
<span class="loading loading-spinner loading-sm"></span>
Salvando...
{:else}
<svg
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>
<Check class="h-5 w-5" strokeWidth={2} />
Salvar
{/if}
</button>
@@ -2292,20 +2042,7 @@
<div class="card-body">
<div class="mb-6 flex items-center gap-3">
<div class="bg-info/10 rounded-lg p-2">
<svg
xmlns="http://www.w3.org/2000/svg"
class="text-info h-6 w-6"
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>
<User class="text-info h-6 w-6" strokeWidth={2} />
</div>
<div>
<h2 class="card-title text-2xl">Registrar Licença Paternidade</h2>
@@ -2382,20 +2119,7 @@
<div class="divider my-6"></div>
<div class="card-actions justify-end gap-3">
<button class="btn btn-outline" onclick={resetarFormularioPaternidade}>
<svg
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>
<X class="h-5 w-5" strokeWidth={2} />
Cancelar
</button>
<button
@@ -2407,20 +2131,7 @@
<span class="loading loading-spinner loading-sm"></span>
Salvando...
{:else}
<svg
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>
<Check class="h-5 w-5" strokeWidth={2} />
Salvar
{/if}
</button>
@@ -2433,20 +2144,7 @@
<div class="card-body">
<div class="mb-6 flex items-center gap-3">
<div class="bg-primary/10 rounded-lg p-2">
<svg
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="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>
<Printer class="text-primary h-6 w-6" strokeWidth={2} />
</div>
<div>
<h2 class="card-title text-2xl">Imprimir Relatórios</h2>
@@ -2590,20 +2288,7 @@
{#if gerandoRelatorio}
<span class="loading loading-spinner loading-sm"></span>
{:else}
<svg
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>
<FileText class="h-5 w-5" strokeWidth={2} />
{/if}
Imprimir PDF
</button>
@@ -2615,20 +2300,7 @@
{#if gerandoRelatorio}
<span class="loading loading-spinner loading-sm"></span>
{:else}
<svg
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 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 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>
<Download class="h-5 w-5" strokeWidth={2} />
{/if}
Exportar Excel
</button>

View File

@@ -19,6 +19,23 @@
import { format } from 'date-fns';
import { ptBR } from 'date-fns/locale';
import { toast } from 'svelte-sonner';
import {
Calendar,
ArrowLeft,
BarChart3,
FileText,
Printer,
XCircle,
Clock,
CheckCircle,
X,
Download,
Search,
Filter,
Eye,
Edit,
Trash2
} from 'lucide-svelte';
type CalendarConstructor = typeof import('@fullcalendar/core').Calendar;
type CalendarInstance = import('@fullcalendar/core').Calendar;
type EventInput = import('@fullcalendar/core').EventInput;
@@ -1914,20 +1931,7 @@
<div class="mb-6">
<div class="flex items-center justify-between">
<div class="flex items-center gap-4">
<div class="rounded-xl bg-purple-500/20 p-3">
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-8 w-8 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"
/>
<div class="rounded-xl bg-purple-500/20 p-3">
<Calendar class="h-8 w-8 text-purple-600" strokeWidth={2} />
</div>
<div>
@@ -1935,20 +1939,7 @@
<p class="text-base-content/70">Visão geral de todas as solicitações e funcionários</p>
</div>
</div>
<button class="btn gap-2" onclick={() => goto(resolve('/recursos-humanos'))}>
<svg
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"
/>
<button class="btn gap-2" onclick={() => goto(resolve('/recursos-humanos'))}>
<ArrowLeft class="h-5 w-5" strokeWidth={2} />
Voltar
</button>
@@ -1960,60 +1951,21 @@
<button
class="tab gap-2 {abaAtiva === 'dashboard' ? 'tab-active' : ''}"
onclick={() => (abaAtiva = 'dashboard')}
>
<svg
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 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"
/>
>
<BarChart3 class="h-5 w-5" strokeWidth={2} />
<span class="font-medium">Dashboard</span>
</button>
<button
class="tab gap-2 {abaAtiva === 'solicitacoes' ? 'tab-active' : ''}"
onclick={() => (abaAtiva = 'solicitacoes')}
>
<svg
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"
/>
>
<FileText class="h-5 w-5" strokeWidth={2} />
<span class="font-medium">Solicitações</span>
</button>
<button
class="tab gap-2 {abaAtiva === 'relatorios' ? 'tab-active' : ''}"
onclick={() => (abaAtiva = 'relatorios')}
>
<svg
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"
/>
>
<Printer class="h-5 w-5" strokeWidth={2} />
<span class="font-medium">Imprimir Relatórios</span>
</button>
@@ -2021,19 +1973,7 @@
<!-- Mensagem de erro -->
{#if hasError}
<div class="alert alert-error mb-6 shadow-lg">
<svg
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"
/>
<div class="alert alert-error mb-6 shadow-lg">
<XCircle class="h-6 w-6 shrink-0 stroke-current" />
<div>
<h3 class="font-bold">Erro ao carregar dados</h3>
@@ -2048,20 +1988,7 @@
<!-- Header -->
<div class="mb-6">
<div class="flex items-center gap-3">
<div class="bg-primary/10 rounded-lg p-2.5">
<svg
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 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"
/>
<div class="bg-primary/10 rounded-lg p-2.5">
<BarChart3 class="text-primary h-6 w-6" strokeWidth={2} />
</div>
<div>
@@ -2086,20 +2013,7 @@
{/each}
{:else}
<div class="stat bg-base-100 rounded-box border-base-300 border shadow-lg">
<div class="stat-figure text-primary">
<svg
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"
/>
<div class="stat-figure text-primary">
<FileText class="h-8 w-8" strokeWidth={2} />
</div>
<div class="stat-title">Total</div>
@@ -2108,20 +2022,7 @@
</div>
<div class="stat bg-base-100 rounded-box border-warning/30 border shadow-lg">
<div class="stat-figure text-warning">
<svg
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"
/>
<div class="stat-figure text-warning">
<Clock class="h-8 w-8" strokeWidth={2} />
</div>
<div class="stat-title">Aguardando</div>
@@ -2130,20 +2031,7 @@
</div>
<div class="stat bg-base-100 rounded-box border-success/30 border shadow-lg">
<div class="stat-figure text-success">
<svg
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"
/>
<div class="stat-figure text-success">
<CheckCircle class="h-8 w-8" strokeWidth={2} />
</div>
<div class="stat-title">Aprovadas</div>
@@ -2152,17 +2040,8 @@
</div>
<div class="stat bg-base-100 rounded-box border-error/30 border shadow-lg">
<div class="stat-figure text-error">
<svg
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"
<div class="stat-figure text-error">
<X class="h-8 w-8" strokeWidth={2} />
</div>
d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"
/>
@@ -2194,20 +2073,7 @@
<div class="card-body space-y-6">
<div class="flex flex-wrap items-center justify-between gap-3">
<div class="flex items-center gap-3">
<div class="bg-primary/10 rounded-lg p-2.5">
<svg
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="M3 4a1 1 0 011-1h4a1 1 0 01.894.553L10.382 6H19a1 1 0 011 1v2M3 4v16a1 1 0 001 1h16a1 1 0 001-1V9m-9 4h4m-4 4h4m-8-4h.01M9 17h.01"
/>
<div class="bg-primary/10 rounded-lg p-2.5">
<Filter class="text-primary h-6 w-6" strokeWidth={2} />
</div>
<div>
@@ -2462,20 +2328,7 @@
<div class="card bg-base-100 border-primary/20 mb-6 border shadow-lg">
<div class="card-body space-y-4 p-6">
<div class="flex items-center gap-3">
<div class="bg-primary/10 rounded-lg p-2.5">
<svg
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="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
/>
<div class="bg-primary/10 rounded-lg p-2.5">
<Calendar class="text-primary h-6 w-6" strokeWidth={2} />
</div>
<div>
@@ -2513,20 +2366,7 @@
<div class="card bg-base-100 border-accent/20 border shadow-lg">
<div class="card-body space-y-4 p-6">
<div class="flex items-center gap-3">
<div class="bg-accent/10 rounded-lg p-2.5">
<svg
xmlns="http://www.w3.org/2000/svg"
class="text-accent 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 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"
/>
<div class="bg-accent/10 rounded-lg p-2.5">
<BarChart3 class="text-accent h-6 w-6" strokeWidth={2} />
</div>
<div>
@@ -2556,20 +2396,7 @@
<!-- Header -->
<div class="mb-6">
<div class="flex items-center gap-3">
<div class="bg-primary/10 rounded-lg p-2.5">
<svg
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"
/>
<div class="bg-primary/10 rounded-lg p-2.5">
<FileText class="text-primary h-6 w-6" strokeWidth={2} />
</div>
<div>
@@ -2600,20 +2427,7 @@
<div class="card-body space-y-6">
<div class="flex flex-wrap items-center justify-between gap-3">
<div class="flex items-center gap-3">
<div class="bg-primary/10 rounded-lg p-2.5">
<svg
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="M3 4a1 1 0 011-1h4a1 1 0 01.894.553L10.382 6H19a1 1 0 011 1v2M3 4v16a1 1 0 001 1h16a1 1 0 001-1V9m-9 4h4m-4 4h4m-8-4h.01M9 17h.01"
/>
<div class="bg-primary/10 rounded-lg p-2.5">
<Filter class="text-primary h-6 w-6" strokeWidth={2} />
</div>
<div>
@@ -2862,19 +2676,7 @@
</h2>
{#if solicitacoesFiltradas.length === 0}
<div class="alert">
<svg
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>
<div class="alert">
<Info class="stroke-info h-6 w-6 shrink-0" />
<span>Nenhuma solicitação encontrada com os filtros aplicados.</span>
</div>
@@ -2951,26 +2753,7 @@
type="button"
class="btn btn-primary btn-sm gap-2"
onclick={() => selecionarPeriodo(periodo._id)}
>
<svg
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"
/>
>
<Eye class="h-4 w-4" strokeWidth={2} />
Alterar Status
</button>
@@ -2989,20 +2772,7 @@
<!-- Header -->
<div class="mb-6">
<div class="flex items-center gap-3">
<div class="bg-accent/10 rounded-lg p-2.5">
<svg
xmlns="http://www.w3.org/2000/svg"
class="text-accent h-6 w-6"
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"
/>
<div class="bg-accent/10 rounded-lg p-2.5">
<Printer class="text-accent h-6 w-6" strokeWidth={2} />
</div>
<div>
@@ -3019,20 +2789,7 @@
<div class="card-body space-y-6">
<div class="flex flex-wrap items-center justify-between gap-3">
<div class="flex items-center gap-3">
<div class="bg-accent/10 rounded-lg p-2.5">
<svg
xmlns="http://www.w3.org/2000/svg"
class="text-accent h-6 w-6"
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-1h4a1 1 0 01.894.553L10.382 6H19a1 1 0 011 1v2M3 4v16a1 1 0 001 1h16a1 1 0 001-1V9m-9 4h4m-4 4h4m-8-4h.01M9 17h.01"
/>
<div class="bg-accent/10 rounded-lg p-2.5">
<Filter class="text-accent h-6 w-6" strokeWidth={2} />
</div>
<div>
@@ -3232,17 +2989,7 @@
<!-- Seção: Imprimir programação de Férias -->
<div class="space-y-4">
<div class="flex items-center gap-3">
<div class="bg-accent/10 rounded-lg p-2.5">
<svg
xmlns="http://www.w3.org/2000/svg"
class="text-accent h-6 w-6"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
<div class="bg-accent/10 rounded-lg p-2.5">
<Printer class="text-accent h-6 w-6" strokeWidth={2} />
d="M17 17h2a2 2 0 002-2v-5a2 2 0 00-2-2h-2V6a2 2 0 00-2-2H9a2 2 0 00-2 2v2H5a2 2 0 00-2 2v5a2 2 0 002 2h2m10 0v2a2 2 0 01-2 2H9a2 2 0 01-2-2v-2m10 0H7"
/>
@@ -3268,20 +3015,7 @@
>
{#if gerandoRelatorio}
<span class="loading loading-spinner loading-sm"></span>
{:else}
<svg
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"
/>
{:else}
<FileText class="h-5 w-5" strokeWidth={2} />
{/if}
Imprimir PDF
@@ -3295,20 +3029,7 @@
>
{#if gerandoRelatorio}
<span class="loading loading-spinner loading-sm"></span>
{:else}
<svg
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 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 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"
/>
{:else}
<Download class="h-5 w-5" strokeWidth={2} />
{/if}
Exportar Excel