Commit Graph

156 Commits

Author SHA1 Message Date
Chamika J
abc923a95e refactor(auth): simplify session middleware and remove debug endpoint
- Updated session middleware to remove debug logging and streamline cookie handling for mobile applications.
- Adjusted session cookie configuration to disable secure and domain settings for local development.
- Removed the debug endpoint from the authentication routes to reduce noise in the codebase.
2025-08-06 12:51:21 +05:30
Chamika J
097c281051 feat(auth): enhance session middleware logging and error handling
- Added detailed debug logging to the session middleware for improved visibility into request processing, including URL, method, and header information.
- Updated error handling to log session middleware errors and session ID status after processing.
- Ensured compatibility with mobile applications by refining cookie handling based on header values.
2025-08-06 12:40:11 +05:30
Chamika J
a1aaf9bd59 refactor(auth): remove debug logging from authentication methods
- Eliminated console logs from the `verify` and `googleMobileAuthPassport` methods to streamline the code and reduce noise in the logs.
- Updated session middleware to enhance cookie handling for mobile applications, ensuring proper session management without excessive logging.
- Improved session cookie configuration for production and development environments, maintaining compatibility with mobile app requirements.
2025-08-06 12:37:29 +05:30
Chamika J
66edec201f feat(auth): enhance session ID generation and improve cookie handling
- Replaced the `uid-safe` library with `crypto.randomBytes` for generating session IDs, improving security and randomness.
- Updated session cookie construction to use template literals for better readability.
- Standardized cookie header parsing to use consistent quotation marks, enhancing code clarity.
2025-08-06 12:28:57 +05:30
Chamika J
7ce4ba12ab feat(auth): add cookie-signature dependency and enhance session cookie handling
- Introduced the `@types/cookie-signature` dependency to facilitate proper signing of session cookies.
- Updated session middleware to create a securely signed cookie using the session secret, improving session management for mobile applications.
- Enhanced logging for cookie creation and error handling to aid in debugging session issues.
2025-08-06 11:55:43 +05:30
Chamika J
0959f3f926 feat(auth): enhance session middleware logging and error handling
- Improved logging within the session middleware to provide detailed insights into session ID, cookie headers, and authentication status.
- Added error handling for the session middleware to capture and log any issues during session processing.
- Ensured proper construction of session cookies for mobile applications, maintaining compatibility with existing cookies.
2025-08-06 11:33:14 +05:30
Chamika J
cc68a5e9cc feat(auth): improve session cookie handling and logging in middleware
- Enhanced session middleware to create or replace session cookies based on header values, ensuring proper session management for mobile applications.
- Added detailed logging for cookie headers and session ID usage to facilitate debugging and traceability.
- Updated logic to maintain existing cookies while injecting the session cookie, improving compatibility with other cookies.
2025-08-06 11:06:36 +05:30
Chamika J
3ebf262b8e feat(auth): enhance session handling for mobile compatibility
- Modified session management to allow the use of existing sessions for mobile applications, improving session continuity.
- Added detailed logging for session ID usage, response headers, and session save operations to aid in debugging.
- Updated session middleware to support header-based session IDs, ensuring proper handling when cookies are not available.
- Included additional session information in the response for mobile app integration, facilitating better session management.
2025-08-06 11:02:03 +05:30
Chamika J
57c71357da feat(auth): enhance session management and debugging capabilities
- Improved session regeneration process to enhance security against session fixation attacks.
- Added detailed logging for session regeneration errors and fallback mechanisms.
- Introduced a new debug endpoint to provide insights into session data, cookies, and authentication status for easier troubleshooting.
- Updated response structure to include session ID and cookie name for mobile app integration, ensuring proper session handling.
2025-08-06 10:57:27 +05:30
Chamika J
3cb44e8dc8 fix(auth): correct type assertion for session passport property
- Updated the session passport assignment to use a type assertion for better TypeScript compatibility.
- This change ensures that the session object is correctly recognized, improving type safety in the authentication process.
2025-08-06 10:48:52 +05:30
Chamika J
11a31e5a6d feat(auth): improve session regeneration and response handling in login process
- Enhanced session management by implementing session regeneration to prevent session fixation during login.
- Added detailed logging for session regeneration, save operations, and response headers to aid in debugging.
- Ensured the user is re-established in the new session and included session cookie details in the response for better traceability.
2025-08-06 10:47:33 +05:30
Chamika J
5b00d83847 feat(auth): enhance session handling and response logging in authentication
- Improved session management by ensuring the session is saved before sending the response in the `AuthController`.
- Added detailed logging for session save operations and included the session ID in the response for better debugging.
- Updated session middleware configuration to enhance security and support mobile applications, including adjustments to cookie settings based on the production environment.
2025-08-06 10:35:35 +05:30
Chamika J
8e5d55ce7d feat(auth): add detailed logging for authentication processes
- Introduced console logs in the `verify` and `googleMobileAuthPassport` methods to provide insights into session data, authentication status, and potential errors.
- Enhanced debugging capabilities by logging session IDs, user information, and response details during the authentication flow.
- This update aims to improve visibility and traceability of authentication events for better troubleshooting.
2025-08-06 10:28:28 +05:30
Chamika J
7bb020d448 feat(auth): implement mobile Google authentication using Passport strategy
- Added a new Passport strategy for mobile Google authentication.
- Introduced `googleMobileAuthPassport` method in `AuthController` to handle authentication flow.
- Updated routes to utilize the new Passport strategy for mobile sign-in.
- Added `passport-custom` dependency for custom authentication strategy.
- Updated `package.json` and `package-lock.json` to reflect new dependencies and version requirements.
2025-08-05 17:12:29 +05:30
shancds
f87fba96d8 refactor(task-comments): update response structure for comment data 2025-08-05 09:20:14 +05:30
shancds
81d5c8559c feat(task-comments): enhance comment response with user avatar and attachments
- Added functionality to retrieve user avatar URL and comment details, including created_at timestamp.
- Implemented logic to fetch and format comment attachments for the response.
- Transformed the response structure to include avatar, attachments, and other relevant comment data.
2025-08-05 09:18:40 +05:30
shancds
945c52b770 Merge branch 'chore/added-google-login-from-mobile-app' of https://github.com/Worklenz/worklenz into upstreame-release-v2.1.4 2025-08-05 08:25:56 +05:30
Chamika J
f84d834295 feat(auth): add logging for token audience validation in Google authentication
- Introduced console logs in the `googleMobileAuth` method to display the token audience, allowed client IDs, and the status of relevant environment variables.
- This enhancement aids in debugging and ensures better visibility into the authentication process.
2025-08-04 17:02:48 +05:30
Chamika J
01ce34f3d8 feat(auth): enhance token audience validation for Google authentication
- Updated the `googleMobileAuth` method in `AuthController` to accept multiple client IDs (web, Android, iOS) for token audience validation.
- Improved error handling for invalid token audiences, ensuring a more flexible and robust authentication process.
2025-08-04 16:54:17 +05:30
Chamika J
210a9a7aba fix(labels-controller): update color validation to use WorklenzColorShades for label updates
- Modified color validation logic in `updateLabel` method to check against `WorklenzColorShades` instead of `WorklenzColorCodes`.
- Ensured that the color input is validated correctly during label updates, enhancing data integrity.
2025-08-04 15:28:31 +05:30
Chamika J
6e37208f62 fix(password-validator): adjust password length validation to include maximum length of 32 characters 2025-08-04 15:23:58 +05:30
Chamika J
8188b5c381 feat(auth): enhance Google authentication validation
- Added validation for token audience, issuer, and expiry in the `googleMobileAuth` method of `AuthController`.
- Improved error handling for invalid tokens and expired sessions, ensuring robust authentication flow.
2025-08-04 12:44:34 +05:30
Chamika J
0e21eacd52 feat(auth): implement mobile Google authentication endpoint
- Added `googleMobileAuth` method in `AuthController` to handle mobile Google sign-in.
- Validates ID token and checks for email verification before proceeding.
- Handles user registration and login, creating a session for authenticated users.
- Updated API routes to include the new mobile authentication endpoint.
2025-08-04 12:40:06 +05:30
Chamika J
136dac17fb feat(labels): implement label update functionality and enhance UI
- Added `updateLabel` method in `LabelsController` to handle label updates with validation for name and color.
- Updated API routes to include the new label update endpoint.
- Introduced `LabelsDrawer` component for editing labels, including a color picker and form validation.
- Enhanced localization files to support new UI strings for label management.
- Implemented a new `LabelsSettings` page to manage labels with search and edit capabilities.
- Improved color handling with a comprehensive color palette for better user experience.
2025-08-04 12:28:52 +05:30
Chamika J
7635676289 feat(trial-user-limits): implement trial member limit checks in project and team controllers
- Added TRIAL_MEMBER_LIMIT constant to enforce a maximum number of trial users in project and team member controllers.
- Implemented logic to check current trial members against the limit during user addition, providing appropriate responses for exceeding limits.
- Updated relevant controllers to utilize the new trial member limit functionality, enhancing subscription management for trial users.
- Enhanced error messaging to guide users on upgrading their subscription for additional members.
2025-07-31 12:56:28 +05:30
chamikaJ
b915de2b93 feat(reporting): enhance date handling and export functionality
- Improved date range handling in ReportingControllerBaseWithTimezone to support various date formats from the frontend, ensuring robust parsing and timezone conversion.
- Updated SQL queries to use consistent table aliases for clarity.
- Added export functionality for project members and tasks in ProjectReportsDrawer, allowing users to download relevant data.
- Enhanced the Excel export handler in ProjectsReports to streamline project data exports based on the current session's team name.
2025-07-29 13:05:55 +05:30
Chamika J
f24c0d8955 Merge branch 'release-v2.1.4' into feature/task-activities-by-user 2025-07-29 08:46:05 +05:30
chamikaJ
76adb89caf feat(task-filters): enhance sorting functionality and localization updates
- Added sorting options to task filters, including clear sort, sort ascending, sort descending, and sort by field.
- Updated localization files for multiple languages (Albanian, German, English, Spanish, Portuguese, Chinese) to include new sorting terms.
- Implemented a SortDropdown component for improved user experience in task management.
- Integrated sorting state management in the task management slice for better data handling.
2025-07-28 15:45:12 +05:30
chamikaJ
703a6425fe feat(surveys): add survey tables and initial data for account setup questionnaire
- Created tables for surveys, survey questions, survey responses, and survey answers to support the account setup process.
- Added default account setup survey and corresponding questions to the database.
- Implemented necessary indexes and constraints for data integrity and performance.
2025-07-28 15:17:21 +05:30
chamikaJ
e2a749e0b6 refactor(survey-submission): update validation logic and submission data handling
- Modified the survey submission validator to make both answer_text and answer_json optional, allowing users to submit empty answers.
- Refactored the SurveyPromptModal component to only include answered questions in the submission data, improving data handling and clarity.
2025-07-28 15:07:09 +05:30
chamikaJ
dd511b236f refactor(reporting-layout): streamline sidebar and content layout
- Replaced the existing sidebar implementation with a new ReportingSider component that accepts collapse state and toggle function as props.
- Simplified the ReportingCollapsedButton component for better readability and functionality.
- Updated layout styles to enhance responsiveness and maintain consistent margins.
- Removed unused CSS styles related to the sidebar for cleaner code.
2025-07-28 14:54:54 +05:30
Chamika J
65745e368f Merge branch 'release-v2.1.4' into chore/added-sign-up-survey 2025-07-25 13:03:03 +05:30
chamikaJ
7dc3dedda5 feat(account-setup): enhance localization and UI for account setup process
- Added new language support and improved translations for account setup steps across multiple languages.
- Updated the organization step to streamline user input and enhance suggestions for organization names.
- Refactored task management components to improve user experience when adding and managing tasks.
- Removed outdated CSS for admin center components to simplify styling and improve maintainability.
- Introduced new UI elements and transitions for a more engaging account setup experience.
- Enhanced Redux state management to accommodate new features and localization updates.
2025-07-25 12:50:19 +05:30
Chamika J
ff4b0ed315 Merge pull request #287 from Worklenz/imp/invite--improvement
Imp/invite  improvement
2025-07-25 08:52:44 +05:30
chamikaJ
fe7c15ced1 feat(surveys): implement account setup survey functionality
- Added new database migration to create survey-related tables for storing questions and responses.
- Developed SurveyController to handle fetching and submitting survey data.
- Created survey API routes for account setup, including endpoints for retrieving the survey and submitting responses.
- Implemented frontend components for displaying the survey and capturing user responses, integrating with Redux for state management.
- Enhanced localization files to include survey-related text for multiple languages.
- Added validation middleware for survey submissions to ensure data integrity.
2025-07-24 17:12:47 +05:30
chamikaJ
1931856d31 Merge branch 'main' of https://github.com/Worklenz/worklenz into fix/timelog-timezone-fix 2025-07-24 10:18:52 +05:30
chamikaJ
7ea05d2982 feat(database): add performance indexes for optimized task queries
- Introduced multiple new indexes in the SQL schema to enhance query performance for tasks, including composite indexes for filtering and sorting.
- Added indexes for various task-related entities such as assignees, phases, labels, comments, and attachments to improve data retrieval efficiency.
- Implemented covering indexes to optimize task aggregation and search functionalities, ensuring faster access to frequently queried data.
2025-07-24 10:16:09 +05:30
chamikaJ
daa65465dd feat(reporting): add utility methods for date and time calculations in ReportingMembersController
- Introduced methods to calculate percentage, convert time formats, and determine date-related metrics such as days left, overdue status, and if a date is today.
- Updated existing logic in getSingleMemberProjects to utilize the new utility methods for improved clarity and maintainability.
2025-07-24 09:56:23 +05:30
chamikaJ
de26417247 refactor(reporting): enhance timezone handling and clean up migration
- Updated SQL queries in reporting controllers to join with the timezones table for accurate timezone retrieval.
- Refactored ReportingMembersController to extend ReportingControllerBaseWithTimezone for centralized timezone logic.
- Removed obsolete migration file that added a timezone column to the users table, as it is no longer needed.
2025-07-24 09:25:50 +05:30
chamiakJ
69b2fe1a90 feat(reporting): implement timezone support in reporting allocation and related components
- Added timezone handling in the getMemberTimeSheets method to ensure accurate date calculations based on user timezone.
- Created ReportingControllerBaseWithTimezone to centralize timezone-related logic for reporting.
- Introduced a migration to add a timezone column to the users table for better user experience.
- Updated frontend API services and hooks to include user's timezone in requests.
- Enhanced members time reports page to display time logs in the user's local timezone.
2025-07-24 07:50:01 +05:30
shancds
300d4763f5 Enhance project member management with search functionality and localization updates
- Implemented search functionality for project members in the backend, allowing users to filter members by name or email.
- Updated frontend components to include a search input for members, improving user experience.
- Added localization strings for the search placeholder in multiple languages (Albanian, German, English, Spanish, Portuguese).
- Refactored SQL queries for better performance and clarity in fetching project members.
2025-07-23 10:49:00 +05:30
chamiakJ
a6286eb2b8 feat(migrations): add README for node-pg-migrate and enhance frontend configuration
- Created a README file for database migrations using node-pg-migrate, detailing commands, file format, best practices, and an example migration.
- Added a Vite configuration file for the frontend, including plugin setup, alias resolution, build optimizations, and responsive design adjustments for task list components.
- Updated i18n configuration to preload the 'home' namespace for improved localization.
- Enhanced task list styling with responsive design features for better mobile usability.
2025-07-23 07:46:39 +05:30
chamikaJ
33aace71c8 refactor(tasks): improve code readability and formatting in tasks-controller-v2
- Refactored import statements for better organization and clarity.
- Enhanced formatting of methods and conditionals for improved readability.
- Updated task filtering methods to maintain consistent formatting and style.
- Added performance logging for deprecated methods to assist in monitoring usage.
- Cleaned up unnecessary comments and improved inline documentation for better understanding.
2025-07-22 17:12:06 +05:30
chamikaJ
354b9422ed feat(tasks): add color_code_dark to task groups and enhance task list display
- Introduced color_code_dark property to task groups for improved theming support.
- Updated task list components to utilize color_code_dark based on the current theme mode.
- Enhanced empty state handling in task list to dynamically create an unmapped group for better user experience.
- Refactored task management slice to support dynamic group creation for unmapped tasks.
2025-07-22 16:08:41 +05:30
chamikaJ
0bb748cf89 feat(database-migrations): implement grouping-specific sort orders and constraints
- Added new sort order columns for tasks based on different grouping types (status, priority, phase, member).
- Updated database functions to handle these new sort orders, ensuring proper task updates during sorting operations.
- Implemented a migration to fix existing sort order constraint violations, ensuring data consistency across projects.
- Enhanced functions to avoid sort order conflicts and maintain unique sort orders within each project.
2025-07-15 15:19:16 +05:30
chamikaJ
6d8c475e67 refactor(sort-orders): remove outdated deployment and implementation guides
- Deleted the `DEPLOYMENT_GUIDE_SORT_ORDERS.md` and `SEPARATE_SORT_ORDERS_IMPLEMENTATION.md` files as they are no longer relevant following the recent updates to the sort orders feature.
- Introduced new migration scripts to address duplicate sort orders and ensure data integrity across the updated task sorting system.
- Updated database schema to include new sort order columns and constraints for improved performance and organization.
- Enhanced backend functions and frontend components to support the new sorting logic and maintain user experience during task organization.
2025-07-15 13:18:51 +05:30
chamiakJ
407dc416ec feat(sort-orders): implement separate sort orders for task groupings
- Introduced new columns for `status_sort_order`, `priority_sort_order`, `phase_sort_order`, and `member_sort_order` in the tasks table to maintain distinct sort orders for each grouping type.
- Updated database functions to handle grouping-specific sort orders and avoid unique constraint violations.
- Enhanced backend socket handlers to emit changes based on the selected grouping.
- Modified frontend components to support drag-and-drop functionality with the new sort order fields, ensuring task organization is preserved across different views.
- Added comprehensive migration scripts and verification steps to ensure smooth deployment and backward compatibility.
2025-07-15 07:44:15 +05:30
chamikaJ
61461bb776 feat(user-activity): enhance user activity logs with additional data and improved queries
- Added optional fields for project color, task status, and status color in IUserRecentTask and IUserTimeLoggedTask interfaces.
- Optimized SQL queries to include team filtering and additional data such as project color and task status.
- Updated frontend components to support new data fields and improved styling for better user experience.
- Enhanced dark mode detection and styling in task activity lists.
- Implemented refetching of data on tab change in the user activity feed.
2025-07-14 13:26:28 +05:30
chamikaJ
5b1cbb0c46 Merge branch 'main' of https://github.com/Worklenz/worklenz into feature/task-activities-by-user 2025-07-14 12:46:18 +05:30
Chamika J
6286d4315d Merge pull request #262 from Worklenz/fix/home-page-tasks
fix(home-page): exclude archived projects from task queries and updat…
2025-07-14 11:37:22 +05:30