refactor: enhance vacation request component and improve error handling

- Updated the SolicitarFerias component to improve the user interface and experience.
- Added validation for overlapping vacation periods and ensured proper error messages are displayed.
- Refactored the logic for adding and removing vacation periods, enhancing code readability and maintainability.
- Improved the handling of form submission and error states for better user feedback.
This commit is contained in:
2025-11-12 14:38:08 -03:00
parent 553fc578a6
commit 3a783727dc
7 changed files with 4030 additions and 3481 deletions

View File

@@ -48,11 +48,7 @@
// Queries
const funcionarioQuery = $derived(
currentUser?.data?.funcionarioId
? useQuery(api.funcionarios.getById, {
id: currentUser.data.funcionarioId
})
: { data: null }
currentUser?.data?.funcionarioId ? useQuery(api.funcionarios.getCurrent, {}) : { data: null }
);
const solicitacoesSubordinadosQuery = $derived(