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.
This commit is contained in:
8
worklenz-backend/src/migrations/add_user_timezone.sql
Normal file
8
worklenz-backend/src/migrations/add_user_timezone.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
-- Add timezone column to users table
|
||||
ALTER TABLE users ADD COLUMN IF NOT EXISTS timezone VARCHAR(50) DEFAULT 'UTC';
|
||||
|
||||
-- Add index for better query performance
|
||||
CREATE INDEX IF NOT EXISTS idx_users_timezone ON users(timezone);
|
||||
|
||||
-- Update existing users to use their browser timezone (this would be done via application logic)
|
||||
COMMENT ON COLUMN users.timezone IS 'IANA timezone identifier (e.g., America/New_York, Asia/Tokyo)';
|
||||
Reference in New Issue
Block a user