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:
chamiakJ
2025-07-24 07:50:01 +05:30
parent 78516d8d6c
commit 69b2fe1a90
6 changed files with 527 additions and 0 deletions

View 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)';