diff --git a/Common/Types/TimezoneCode.ts b/Common/Types/TimezoneCode.ts new file mode 100644 index 0000000000..f5a76368c1 --- /dev/null +++ b/Common/Types/TimezoneCode.ts @@ -0,0 +1,63 @@ +enum TimezoneCode { + UTC = 'UTC', + GMT = 'GMT', + EST = 'EST', + EDT = 'EDT', + CST = 'CST', + CDT = 'CDT', + MST = 'MST', + MDT = 'MDT', + PST = 'PST', + PDT = 'PDT', + AKST = 'AKST', + AKDT = 'AKDT', + HST = 'HST', + HDT = 'HDT', + AEST = 'AEST', + AEDT = 'AEDT', + ACST = 'ACST', + ACDT = 'ACDT', + AWST = 'AWST', + AWDT = 'AWDT', + NZST = 'NZST', + NZDT = 'NZDT', + NFT = 'NFT', + IDLW = 'IDLW', + NT = 'NT', + CAT = 'CAT', + EAT = 'EAT', + IST = 'IST', + MSK = 'MSK', + EET = 'EET', + CET = 'CET', + WAT = 'WAT', + GMT1 = 'GMT+1', + GMT2 = 'GMT+2', + GMT3 = 'GMT+3', + GMT4 = 'GMT+4', + GMT5 = 'GMT+5', + GMT6 = 'GMT+6', + GMT7 = 'GMT+7', + GMT8 = 'GMT+8', + GMT9 = 'GMT+9', + GMT10 = 'GMT+10', + GMT11 = 'GMT+11', + GMT12 = 'GMT+12', + GMT13 = 'GMT+13', + GMT14 = 'GMT+14', + GMT_1 = 'GMT-1', + GMT_2 = 'GMT-2', + GMT_3 = 'GMT-3', + GMT_4 = 'GMT-4', + GMT_5 = 'GMT-5', + GMT_6 = 'GMT-6', + GMT_7 = 'GMT-7', + GMT_8 = 'GMT-8', + GMT_9 = 'GMT-9', + GMT_10 = 'GMT-10', + GMT_11 = 'GMT-11', + GMT_12 = 'GMT-12', + GMT_13 = 'GMT-13', +} + +export default TimezoneCode; diff --git a/Dashboard/src/Pages/Global/UserProfile/Index.tsx b/Dashboard/src/Pages/Global/UserProfile/Index.tsx index c8c9544778..8355349fcf 100644 --- a/Dashboard/src/Pages/Global/UserProfile/Index.tsx +++ b/Dashboard/src/Pages/Global/UserProfile/Index.tsx @@ -3,9 +3,11 @@ import RouteMap, { RouteUtil } from '../../../Utils/RouteMap'; import PageComponentProps from '../../PageComponentProps'; import SideMenu from './SideMenu'; import Route from 'Common/Types/API/Route'; +import TimezoneCode from 'Common/Types/TimezoneCode'; import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType'; import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail'; import Page from 'CommonUI/src/Components/Page/Page'; +import DropdownUtil from 'CommonUI/src/Utils/Dropdown'; import UserUtil from 'CommonUI/src/Utils/User'; import User from 'Model/Models/User'; import React, { FunctionComponent, ReactElement } from 'react'; @@ -60,6 +62,21 @@ const Home: FunctionComponent = ( required: true, title: 'Full Name', }, + { + field: { + timezone: true, + }, + fieldType: FormFieldSchemaType.Dropdown, + dropdownOptions: + DropdownUtil.getDropdownOptionsFromEnum( + TimezoneCode + ), + placeholder: 'Select Timezone', + description: + 'Select your timezone. This will be used for all date and time related notifications sent out to you.', + required: false, + title: 'Timezone', + }, ]} modelDetailProps={{ showDetailsInNumberOfColumns: 2, @@ -78,6 +95,13 @@ const Home: FunctionComponent = ( }, title: 'Email', }, + { + field: { + timezone: true, + }, + title: 'Timezone', + placeholder: 'No timezone selected', + }, ], modelId: UserUtil.getUserId(), }}