refactor: enhance vacation management components and add status update functionality

- Improved the vacation request component with better loading states and error handling.
- Added a new mutation to update the status of vacation requests, allowing transitions between different states.
- Enhanced the calendar display for vacation periods and integrated a 3D bar chart for visualizing vacation data.
- Refactored the code for better readability and maintainability, ensuring a smoother user experience.
This commit is contained in:
2025-11-13 05:51:55 -03:00
parent 0b7f1ad621
commit ebde59c6d2
6 changed files with 1503 additions and 721 deletions

View File

@@ -91,6 +91,7 @@
: { data: null }
);
// Query para times onde o usuário é gestor - usando $derived para garantir reatividade
const meusTimesGestorQuery = $derived(
currentUser?.data?._id
? useQuery(api.times.listarPorGestor, {
@@ -105,6 +106,8 @@
const minhasSolicitacoes = $derived(minhasSolicitacoesQuery?.data || []);
const minhasAusencias = $derived(minhasAusenciasQuery?.data || []);
const meuTime = $derived(meuTimeQuery?.data);
// Extração de meusTimesGestor
const meusTimesGestor = $derived(meusTimesGestorQuery?.data || []);
// Verificar se é gestor