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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user