From 9c7bdb68d57a236719de8ce9098f024d6a57c51c Mon Sep 17 00:00:00 2001 From: Andrei Date: Fri, 3 Oct 2025 12:25:15 +0000 Subject: [PATCH] feat: Add Europe/Bucharest and expand timezone options, update DTOs for timezone and time format --- .../src/modules/auth/dto/update-profile.dto.ts | 8 ++++++++ maternal-web/components/settings/TimeZoneSelector.tsx | 11 +++++++++++ 2 files changed, 19 insertions(+) diff --git a/maternal-app/maternal-app-backend/src/modules/auth/dto/update-profile.dto.ts b/maternal-app/maternal-app-backend/src/modules/auth/dto/update-profile.dto.ts index cbefd5e..c5d32b8 100644 --- a/maternal-app/maternal-app-backend/src/modules/auth/dto/update-profile.dto.ts +++ b/maternal-app/maternal-app-backend/src/modules/auth/dto/update-profile.dto.ts @@ -14,6 +14,10 @@ export class UserPreferencesDto { @IsOptional() @IsIn(['metric', 'imperial']) measurementUnit?: 'metric' | 'imperial'; + + @IsOptional() + @IsIn(['12h', '24h']) + timeFormat?: '12h' | '24h'; } export class UpdateProfileDto { @@ -25,6 +29,10 @@ export class UpdateProfileDto { @IsString() locale?: string; + @IsOptional() + @IsString() + timezone?: string; + @IsOptional() @IsObject() @ValidateNested() diff --git a/maternal-web/components/settings/TimeZoneSelector.tsx b/maternal-web/components/settings/TimeZoneSelector.tsx index a637163..e81815a 100644 --- a/maternal-web/components/settings/TimeZoneSelector.tsx +++ b/maternal-web/components/settings/TimeZoneSelector.tsx @@ -40,7 +40,18 @@ const TIMEZONES = { { value: 'Europe/Brussels', label: 'Brussels' }, { value: 'Europe/Vienna', label: 'Vienna' }, { value: 'Europe/Athens', label: 'Athens' }, + { value: 'Europe/Bucharest', label: 'Bucharest' }, + { value: 'Europe/Budapest', label: 'Budapest' }, + { value: 'Europe/Warsaw', label: 'Warsaw' }, + { value: 'Europe/Prague', label: 'Prague' }, + { value: 'Europe/Stockholm', label: 'Stockholm' }, + { value: 'Europe/Copenhagen', label: 'Copenhagen' }, + { value: 'Europe/Oslo', label: 'Oslo' }, + { value: 'Europe/Helsinki', label: 'Helsinki' }, + { value: 'Europe/Dublin', label: 'Dublin' }, + { value: 'Europe/Lisbon', label: 'Lisbon' }, { value: 'Europe/Moscow', label: 'Moscow' }, + { value: 'Europe/Istanbul', label: 'Istanbul' }, ], 'Asia': [ { value: 'Asia/Dubai', label: 'Dubai' },