Commit Graph

350 Commits

Author SHA1 Message Date
4ed90d380d refactor: improve layout and backend monitoring functionality
- Streamlined the layout component in Svelte for better readability and consistency.
- Enhanced the backend monitoring functions by updating argument structures and improving code clarity.
- Added new query functions for system status and database activity, providing better insights into system performance.
- Cleaned up existing code to ensure maintainability and improved error handling across various functions.
2025-11-08 18:30:27 -03:00
5d76c375c2 refactor: streamline chat widget and backend user management
- Removed the .editorconfig file to simplify project configuration.
- Refactored the ChatWidget component to enhance readability and maintainability, including the integration of current user data and improved notification handling.
- Updated backend functions to utilize the new getCurrentUserFunction for user authentication, ensuring consistent user data retrieval across various modules.
- Cleaned up code in multiple backend files, enhancing clarity and performance while maintaining functionality.
- Improved error handling and user feedback mechanisms in user-related operations.
2025-11-08 17:46:10 -03:00
57b5f6821b refactor: remove biome configuration and update dependencies
- Deleted the obsolete biome.json file to streamline project configuration.
- Updated package.json and bun.lock to include new ESLint and Prettier dependencies for improved code quality and consistency.
- Added ESLint configuration package for better linting support across the project.
- Cleaned up various package dependencies to ensure a more maintainable and efficient codebase.
2025-11-08 17:16:43 -03:00
4e30d6a2ba refactor: remove obsolete authentication documentation and files
- Deleted multiple markdown files related to authentication analysis, push notifications configuration, and environment variable setup to streamline the documentation.
- Removed outdated scripts and guides that are no longer relevant due to the migration to Better Auth.
- Cleaned up the repository by eliminating unnecessary files, ensuring a more focused and maintainable codebase.
2025-11-08 17:16:29 -03:00
9a5f2b294d refactor: integrate current user data across components
- Replaced instances of `authStore` with `currentUser` to streamline user authentication handling.
- Updated permission checks and user-related data retrieval to utilize the new `useQuery` for better performance and clarity.
- Cleaned up component structures and improved formatting for consistency and readability.
- Enhanced error handling and user feedback mechanisms in various components to improve user experience.
2025-11-08 10:52:33 -03:00
01138b3e1c refactor: clean up Svelte components and improve code readability
- Refactored multiple Svelte components to enhance code clarity and maintainability.
- Standardized formatting and indentation across various files for consistency.
- Improved error handling messages in the AprovarAusencias component for better user feedback.
- Updated class names in the UI components to align with the new design system.
- Removed unnecessary whitespace and comments to streamline the codebase.
2025-11-08 10:11:40 -03:00
28107b4050 refactor: enhance Sidebar component with Better Auth integration
- Replaced the use of `useConvexClient` with `useQuery` for fetching the current user.
- Updated avatar URL retrieval to utilize the current user data from Better Auth.
- Refactored login and logout functions to use the new `authClient` methods for improved authentication flow.
- Cleaned up the component structure and styling for better readability and maintainability.
- Adjusted sidebar and footer styles for consistency with the new design system.
2025-11-08 09:48:12 -03:00
3a32f5e4eb refactor: remove authentication module and integrate Better Auth
- Deleted the `autenticacao.ts` file to streamline the authentication process.
- Updated the `auth.ts` file to include new functions for user management and password updates.
- Modified the schema to enforce the presence of `authId` for users, ensuring integration with Better Auth.
- Refactored the seed process to create users with Better Auth integration, enhancing user management capabilities.
- Cleaned up the `usuarios.ts` file to utilize the new authentication functions and improve code clarity.
2025-11-07 23:33:09 -03:00
427c78ec37 refactor: update better-auth configuration and clean up code
- Changed the version of "better-auth" to use a catalog reference in package.json and bun.lock for better dependency management.
- Removed unnecessary comments and cleaned up the code in various files to enhance readability and maintainability.
- Updated the authentication handling in hooks.server.ts to ensure proper token retrieval.
- Simplified the layout and structure of Svelte components for improved clarity and performance.
2025-11-07 11:18:34 -03:00
57dd9492ef refactor base auth 2025-11-07 10:33:48 -03:00
6f4df44a00 refactor: simplify auth component configuration
- Removed the local schema configuration from the auth component, streamlining the integration with Better Auth.
- Updated the client creation to focus solely on the DataModel, enhancing clarity and maintainability.
2025-11-07 09:18:41 -03:00
ca51839082 initial better auth config 2025-11-06 11:42:48 -03:00
ffeab9cace Merge remote-tracking branch 'origin/correcao-smtp' into feat-better-auth 2025-11-06 09:41:02 -03:00
06f03b53e5 feat: integrate Better Auth and enhance authentication flow
- Added Better Auth integration to the web application, allowing for dual login support with both custom and Better Auth systems.
- Updated authentication client configuration to dynamically set the base URL based on the environment.
- Enhanced chat components to utilize user authentication status, improving user experience and security.
- Refactored various components to support Better Auth, including error handling and user identity management.
- Improved notification handling and user feedback mechanisms during authentication processes.
2025-11-06 09:35:36 -03:00
33f305220b feat: improve email status querying and URL handling
- Updated email status query to execute only when there are email IDs, enhancing performance.
- Ensured URL handling in email sending functions always includes a protocol, improving reliability.
- Added new queries for fetching emails by IDs and listing scheduled emails, enriching email management capabilities.
2025-11-05 16:23:47 -03:00
Kilder Costa
db9a93a58b Merge pull request #9 from killer-cf/ajuste_chat
Ajuste chat
2025-11-05 15:44:43 -03:00
36933b53cb Merge remote-tracking branch 'origin/master' into ajuste_chat 2025-11-05 15:17:26 -03:00
05244b9207 feat: enhance ChatWidget with improved drag-and-resize functionality
- Introduced drag threshold and movement detection to prevent unintended clicks during dragging.
- Added reactive window dimensions to ensure proper positioning and resizing of the chat widget.
- Refactored mouse event handlers for better separation of concerns and improved user experience.
- Enhanced position adjustment logic to maintain visibility within the viewport during dragging and resizing.
2025-11-05 15:16:20 -03:00
Kilder Costa
dc7447cfbc Merge pull request #8 from killer-cf/fix-email
feat: update email handling and user management logic
2025-11-05 15:11:42 -03:00
1b02ea7c22 feat: enhance notification management with new clearing functionalities
- Added functionality to clear all notifications and clear unread notifications for improved user control.
- Updated NotificationBell component to support modal display for notifications, enhancing user experience.
- Refactored notification handling to separate read and unread notifications, providing clearer organization.
- Introduced new UI elements for managing notifications, including buttons for clearing notifications directly from the modal.
- Improved backend mutations to handle notification deletion securely, ensuring users can only delete their own notifications.
2025-11-05 15:06:41 -03:00
fe83a3d371 feat: update email handling and user management logic
- Added logic to update user email if it differs from the existing record when updating a funcionario.
- Refactored email sending action to improve code readability and maintainability, including consistent formatting and error handling.
- Enhanced logging for email configuration and sending processes to provide clearer feedback during operations.
2025-11-05 15:05:54 -03:00
6166043735 feat: enhance ErrorModal and chat components with new features and improvements
- Refactored ErrorModal to utilize a dialog element for better accessibility and user experience, including a close button with an icon.
- Updated chat components to improve participant display and message read status, enhancing user engagement and clarity.
- Introduced loading indicators for user and conversation data in SalaReuniaoManager to improve responsiveness during data fetching.
- Enhanced message handling in MessageList to indicate whether messages have been read, providing users with better feedback on message status.
- Improved overall structure and styling across various components for consistency and maintainability.
2025-11-05 14:05:52 -03:00
c459297968 refactor: update components to use lucide icons and improve structure
- Replaced SVG icons with lucide-svelte components across various files for consistency and improved performance.
- Refactored ActionGuard, ErrorModal, FileUpload, and other components to enhance readability and maintainability.
- Updated the dashboard pages to include new icons and improved layout for better user experience.
- Enhanced StatsCard component to support dynamic icon rendering, allowing for more flexible usage.
- Improved overall styling and structure in multiple components to align with design standards.
2025-11-05 12:09:41 -03:00
6cb7414dcc fix: update dependencies and improve chat component structure
- Updated `lucide-svelte` dependency to version 0.552.0 across multiple files for consistency.
- Refactored chat components to enhance structure and readability, including adjustments to the Sidebar, ChatList, and MessageInput components.
- Improved notification handling in chat components to ensure better user experience and responsiveness.
- Added type safety enhancements in various components to ensure better integration with backend data models.
2025-11-05 11:52:01 -03:00
Kilder Costa
d0bcef4d40 Merge pull request #7 from killer-cf/feat-ausencia
Feat ausencia
2025-11-05 10:49:12 -03:00
1774b135b3 feat: enhance chat functionality with global notifications and user management
- Implemented global notifications for new messages, allowing users to receive alerts even when the chat is minimized or closed.
- Added functionality for users to leave group conversations and meeting rooms, with appropriate notifications sent to remaining participants.
- Introduced a modal for sending notifications within meeting rooms, enabling admins to communicate important messages to all participants.
- Enhanced the chat components to support mention functionality, allowing users to tag participants in messages for better engagement.
- Updated backend mutations to handle user exit from conversations and sending notifications, ensuring robust data handling and user experience.
2025-11-05 10:40:30 -03:00
8ca737c62f feat: enhance chat functionality with new conversation and meeting room features
- Added support for creating and managing group conversations and meeting rooms, allowing users to initiate discussions with multiple participants.
- Implemented a modal for creating new conversations, including options for individual, group, and meeting room types.
- Enhanced the chat list component to filter and display conversations based on type, improving user navigation.
- Introduced admin functionalities for meeting rooms, enabling user management and role assignments within the chat interface.
- Updated backend schema and API to accommodate new conversation types and related operations, ensuring robust data handling.
2025-11-05 07:20:37 -03:00
aa3e3470cd feat: enhance push notification management and error handling
- Implemented error handling for unhandled promise rejections related to message channels, improving stability during push notification operations.
- Updated the PushNotificationManager component to manage push subscription registration with timeouts, preventing application hangs.
- Enhanced the sidebar and chat components to display user avatars, improving user experience and visual consistency.
- Refactored email processing logic to support scheduled email sending, integrating new backend functionalities for better email management.
- Improved overall error handling and logging across components to reduce console spam and enhance debugging capabilities.
2025-11-05 06:14:52 -03:00
f6671e0f16 feat: enhance email monitoring and management features
- Added a new section for monitoring email status, allowing users to track the email queue and identify sending issues.
- Updated the backend to support new internal queries for listing pending emails and retrieving email configurations.
- Refactored email-related mutations to improve error handling and streamline the email sending process.
- Enhanced the overall email management experience by providing clearer feedback and monitoring capabilities.
2025-11-04 21:27:48 -03:00
12db52a8a7 refactor: enhance chat components with type safety and response functionality
- Updated type definitions in ChatWindow and MessageList components for better type safety.
- Improved MessageInput to handle message responses, including a preview feature for replying to messages.
- Enhanced the chat message handling logic to support message references and improve user interaction.
- Refactored notification utility functions to support push notifications and rate limiting for email sending.
- Updated backend schema to accommodate new features related to message responses and notifications.
2025-11-04 20:36:01 -03:00
15374276d5 refactor: streamline absence management interface and enhance user experience
- Reorganized the absence management page to improve navigation and accessibility.
- Introduced a menu structure for better categorization of absence-related options.
- Updated the layout and styling for a more modern and user-friendly interface.
- Enhanced the overall user experience by providing clearer descriptions and visual cues for actions related to absence management.
2025-11-04 19:19:51 -03:00
c86397f150 Merge remote-tracking branch 'origin/master' into feat-ausencia 2025-11-04 15:10:35 -03:00
c1e0998a5f feat: enhance absence management with calendar integration and error handling
- Added functionality to check for date overlaps with existing absence requests in the absence calendar.
- Implemented a modal to display error messages when users attempt to create overlapping absence requests.
- Updated the calendar component to visually indicate blocked days due to existing approved or pending absence requests.
- Improved user feedback by providing alerts for unavailable periods and enhancing the overall user experience in absence management.
2025-11-04 15:09:15 -03:00
Kilder Costa
9ff61b325f Merge pull request #6 from killer-cf/fix-usuarios-page
Fix usuarios page
2025-11-04 14:42:21 -03:00
fbec5c46c2 feat: enhance user management with matricula retrieval and validation
- Updated user-related queries and mutations to retrieve the matricula from associated funcionario records, improving data accuracy.
- Refactored user creation and listing functionalities to ensure matricula is correctly handled and displayed.
- Enhanced error handling and validation for user operations, ensuring a more robust user management experience.
- Improved the overall structure of user-related code for better maintainability and clarity.
2025-11-04 14:37:28 -03:00
a93d55f02b feat: implement absence management features in the dashboard
- Added functionality for managing absence requests, including listing, approving, and rejecting requests.
- Enhanced the user interface to display statistics and pending requests for better oversight.
- Updated backend schema to support absence requests and notifications, ensuring data integrity and efficient handling.
- Integrated new components for absence request forms and approval workflows, improving user experience and administrative efficiency.
2025-11-04 14:23:46 -03:00
d0692c3608 chore: update editorconfig and tool versions
- Changed the indent size in .editorconfig from 4 to 2 spaces for consistency.
- Updated Node.js version in .tool-versions from 25.0.0 to 22.21.1 to align with project requirements.
2025-11-04 13:41:12 -03:00
f02eb473ca feat: add salary family and income tax options for dependents in employee registration
- Enhanced the employee registration form by adding checkboxes for "Salário Família" and "Imposto de Renda" for each dependent.
- Updated the backend schema and mutations to include optional fields for salary family and income tax benefits.
- Improved the handling of dependent data to accommodate the new fields, enhancing the overall functionality of the dependents management section.
2025-11-04 10:54:39 -03:00
f7cc758d33 refactor: improve UI and functionality in employee registration and audit pages
- Enhanced the employee registration form by adding a dependents management section, allowing users to input details such as relationship, name, CPF, and birth date.
- Updated the layout and styling of the audit page, including improved statistics display and user feedback elements.
- Refined the handling of user actions in the audit logs, providing clearer labels and better organization of information.
- Improved the overall user experience by ensuring consistent design patterns and responsive elements across the registration and audit interfaces.
2025-11-04 06:31:28 -03:00
d5c01aabab feat: add dependents management to employee registration
- Introduced functionality to manage dependents during employee registration, allowing users to add details such as relationship, name, CPF, and birth date.
- Updated the backend schema and mutation to support optional dependents, enhancing the employee data model.
- Enhanced the frontend form to include fields for dependents, improving the user experience in the employee registration process.
2025-11-04 05:05:13 -03:00
90eee27ba7 feat: enhance alert configuration modal with improved user interface and functionality
- Updated the AlertConfigModal component to provide a more interactive and user-friendly experience for configuring alerts.
- Added options for selecting metrics and conditions, along with a preview of the alert configuration.
- Improved form handling for creating and editing alerts, including better state management and error handling.
- Enhanced the display of configured alerts with clear status indicators and action buttons for editing and deleting alerts.
2025-11-04 04:35:03 -03:00
0fee0cfd35 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.
2025-11-04 04:02:07 -03:00
bc3c7df00f feat: refactor document URL retrieval for atestados and licencas
- Updated the document URL fetching logic in the +page.svelte file to use a new query method, enhancing the retrieval process.
- Added a new query in atestadosLicencas.ts to obtain stored document URLs, improving authentication checks and error handling.
- Streamlined the user experience by ensuring URLs are fetched correctly and opened in a new tab when available.
2025-11-04 03:46:50 -03:00
ccc8c5d5f4 fix: update licencaOriginalId handling and improve error feedback in document retrieval
- Changed the initialization of licencaOriginalId to undefined for better clarity in state management.
- Added logic to ensure licencaOriginalId is cleared when not a prorrogação, enhancing data integrity.
- Improved error handling for document retrieval, providing clearer user feedback when URLs cannot be obtained.
- Refactored document URL fetching to streamline the process and enhance user experience.
2025-11-04 03:45:09 -03:00
6d613fe618 feat: add required field validation and error handling in file upload component
- Introduced a `required` prop in the `FileUpload` component to enforce mandatory file uploads.
- Enhanced error handling by implementing a modal for displaying error messages related to missing required fields and upload issues.
- Updated the `+page.svelte` file to integrate the new error modal and improve user feedback during form submissions.
- Ensured that all relevant file upload sections now validate the presence of documents before allowing form submission.
2025-11-04 03:37:22 -03:00
c6c88f85a7 feat: enhance login process with IP capture and improved error handling
- Implemented an internal mutation for login that captures the user's IP address and user agent for better security and tracking.
- Enhanced the HTTP login endpoint to extract and log client IP, improving the overall authentication process.
- Added validation for IP addresses to ensure only valid formats are recorded, enhancing data integrity.
- Updated the login mutation to handle rate limiting and user status checks more effectively, providing clearer feedback on login attempts.
2025-11-04 03:26:34 -03:00
f278ad4d17 feat: capture and log browser information during user login
- Integrated browser information capture in the login process, including user agent and IP address.
- Enhanced device and browser detection logic to provide more detailed insights into user environments.
- Improved system detection for various operating systems and devices, ensuring accurate reporting during authentication.
2025-11-04 02:27:56 -03:00
372b2b5bf9 feat: add statistics and filtering options for user roles in dashboard
- Introduced a new `StatsCard` component to display statistics related to user roles, including total profiles and access levels.
- Implemented filtering options for user roles based on access level, enhancing the user experience in the dashboard.
- Improved the layout and styling of the dashboard, including adjustments to the filters and role display cards for better usability.
- Added derived state for active filters and statistics, ensuring real-time updates in the UI.
2025-11-04 02:19:09 -03:00
5d2df8077b feat: enhance email handling with improved error reporting and statistics
- Updated the `reenviarEmail` mutation to return detailed error messages for better user feedback.
- Added a new query to obtain email queue statistics, providing insights into email statuses.
- Enhanced the `processarFilaEmails` mutation to track processing failures and successes more effectively.
- Implemented a manual email processing mutation for immediate testing and control over email sending.
- Improved email validation and error handling in the email sending action, ensuring robust delivery processes.
2025-11-04 02:14:07 -03:00
e6105ae8ea fix: update email configuration handling and improve type safety
- Changed the mutation for testing SMTP connection to use an action for better handling.
- Introduced an internal mutation to update the test timestamp for email configurations.
- Enhanced type safety by specifying document types for user and session queries.
- Improved error handling in the SMTP connection test to provide clearer feedback on failures.
2025-11-04 01:59:08 -03:00