feat: integrate interactive absence calendar in atestados-licencas page
- Added the CalendarioAfastamentos component to display an interactive calendar for managing absences. - Removed the previous static calendar placeholder and replaced it with a dynamic query to fetch absence events. - Enhanced user experience by allowing users to visualize absence events directly in the calendar format.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
import FuncionarioSelect from "$lib/components/FuncionarioSelect.svelte";
|
||||
import FileUpload from "$lib/components/FileUpload.svelte";
|
||||
import ErrorModal from "$lib/components/ErrorModal.svelte";
|
||||
import CalendarioAfastamentos from "$lib/components/CalendarioAfastamentos.svelte";
|
||||
import type { Id } from "@sgse-app/backend/convex/_generated/dataModel";
|
||||
|
||||
const client = useConvexClient();
|
||||
@@ -767,31 +768,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Calendário Simplificado -->
|
||||
<div class="card bg-base-100 shadow-xl mb-6">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title mb-4">Calendário de Afastamentos</h2>
|
||||
<div class="alert alert-info">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
class="stroke-current shrink-0 w-6 h-6"
|
||||
>
|
||||
<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
|
||||
>O calendário interativo completo será implementado em breve. Por
|
||||
enquanto, visualize os eventos na tabela abaixo.</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Calendário Interativo -->
|
||||
{#if eventosQuery?.data}
|
||||
<CalendarioAfastamentos eventos={eventosQuery.data} tipoFiltro={filtroTipo} />
|
||||
{/if}
|
||||
|
||||
<!-- Gráficos -->
|
||||
{#if graficosQuery?.data}
|
||||
|
||||
Reference in New Issue
Block a user