account, schduels, timezone profile and many imporant updates
This commit is contained in:
127
frontend/src/constants/timezones.ts
Normal file
127
frontend/src/constants/timezones.ts
Normal file
@@ -0,0 +1,127 @@
|
||||
export const COUNTRIES = [
|
||||
{ value: 'US', label: 'United States' },
|
||||
{ value: 'GB', label: 'United Kingdom' },
|
||||
{ value: 'CA', label: 'Canada' },
|
||||
{ value: 'AU', label: 'Australia' },
|
||||
{ value: 'IN', label: 'India' },
|
||||
{ value: 'PK', label: 'Pakistan' },
|
||||
{ value: 'DE', label: 'Germany' },
|
||||
{ value: 'FR', label: 'France' },
|
||||
{ value: 'ES', label: 'Spain' },
|
||||
{ value: 'IT', label: 'Italy' },
|
||||
{ value: 'NL', label: 'Netherlands' },
|
||||
{ value: 'SE', label: 'Sweden' },
|
||||
{ value: 'NO', label: 'Norway' },
|
||||
{ value: 'DK', label: 'Denmark' },
|
||||
{ value: 'FI', label: 'Finland' },
|
||||
{ value: 'BE', label: 'Belgium' },
|
||||
{ value: 'AT', label: 'Austria' },
|
||||
{ value: 'CH', label: 'Switzerland' },
|
||||
{ value: 'IE', label: 'Ireland' },
|
||||
{ value: 'NZ', label: 'New Zealand' },
|
||||
{ value: 'SG', label: 'Singapore' },
|
||||
{ value: 'AE', label: 'United Arab Emirates' },
|
||||
{ value: 'SA', label: 'Saudi Arabia' },
|
||||
{ value: 'ZA', label: 'South Africa' },
|
||||
{ value: 'BR', label: 'Brazil' },
|
||||
{ value: 'MX', label: 'Mexico' },
|
||||
{ value: 'AR', label: 'Argentina' },
|
||||
{ value: 'CL', label: 'Chile' },
|
||||
{ value: 'CO', label: 'Colombia' },
|
||||
{ value: 'JP', label: 'Japan' },
|
||||
{ value: 'KR', label: 'South Korea' },
|
||||
{ value: 'CN', label: 'China' },
|
||||
{ value: 'TH', label: 'Thailand' },
|
||||
{ value: 'MY', label: 'Malaysia' },
|
||||
{ value: 'ID', label: 'Indonesia' },
|
||||
{ value: 'PH', label: 'Philippines' },
|
||||
{ value: 'VN', label: 'Vietnam' },
|
||||
{ value: 'BD', label: 'Bangladesh' },
|
||||
{ value: 'LK', label: 'Sri Lanka' },
|
||||
{ value: 'EG', label: 'Egypt' },
|
||||
{ value: 'NG', label: 'Nigeria' },
|
||||
{ value: 'KE', label: 'Kenya' },
|
||||
{ value: 'GH', label: 'Ghana' },
|
||||
];
|
||||
|
||||
export const COUNTRY_TIMEZONE_MAP: Record<string, string> = {
|
||||
US: 'America/New_York',
|
||||
GB: 'Europe/London',
|
||||
CA: 'America/Toronto',
|
||||
AU: 'Australia/Sydney',
|
||||
IN: 'Asia/Kolkata',
|
||||
PK: 'Asia/Karachi',
|
||||
DE: 'Europe/Berlin',
|
||||
FR: 'Europe/Paris',
|
||||
ES: 'Europe/Madrid',
|
||||
IT: 'Europe/Rome',
|
||||
NL: 'Europe/Amsterdam',
|
||||
SE: 'Europe/Stockholm',
|
||||
NO: 'Europe/Oslo',
|
||||
DK: 'Europe/Copenhagen',
|
||||
FI: 'Europe/Helsinki',
|
||||
BE: 'Europe/Brussels',
|
||||
AT: 'Europe/Vienna',
|
||||
CH: 'Europe/Zurich',
|
||||
IE: 'Europe/Dublin',
|
||||
NZ: 'Pacific/Auckland',
|
||||
SG: 'Asia/Singapore',
|
||||
AE: 'Asia/Dubai',
|
||||
SA: 'Asia/Riyadh',
|
||||
ZA: 'Africa/Johannesburg',
|
||||
BR: 'America/Sao_Paulo',
|
||||
MX: 'America/Mexico_City',
|
||||
AR: 'America/Argentina/Buenos_Aires',
|
||||
CL: 'America/Santiago',
|
||||
CO: 'America/Bogota',
|
||||
JP: 'Asia/Tokyo',
|
||||
KR: 'Asia/Seoul',
|
||||
CN: 'Asia/Shanghai',
|
||||
TH: 'Asia/Bangkok',
|
||||
MY: 'Asia/Kuala_Lumpur',
|
||||
ID: 'Asia/Jakarta',
|
||||
PH: 'Asia/Manila',
|
||||
VN: 'Asia/Ho_Chi_Minh',
|
||||
BD: 'Asia/Dhaka',
|
||||
LK: 'Asia/Colombo',
|
||||
EG: 'Africa/Cairo',
|
||||
NG: 'Africa/Lagos',
|
||||
KE: 'Africa/Nairobi',
|
||||
GH: 'Africa/Accra',
|
||||
};
|
||||
|
||||
export const TIMEZONE_OPTIONS = [
|
||||
{ value: 'UTC', label: 'UTC (Coordinated Universal Time)' },
|
||||
{ value: 'Etc/GMT+12', label: 'UTC-12:00 (Baker Island)' },
|
||||
{ value: 'Etc/GMT+11', label: 'UTC-11:00 (American Samoa)' },
|
||||
{ value: 'Etc/GMT+10', label: 'UTC-10:00 (Hawaii)' },
|
||||
{ value: 'Etc/GMT+9', label: 'UTC-09:00 (Alaska)' },
|
||||
{ value: 'Etc/GMT+8', label: 'UTC-08:00 (Pacific Time)' },
|
||||
{ value: 'Etc/GMT+7', label: 'UTC-07:00 (Mountain Time)' },
|
||||
{ value: 'Etc/GMT+6', label: 'UTC-06:00 (Central Time)' },
|
||||
{ value: 'Etc/GMT+5', label: 'UTC-05:00 (Eastern Time)' },
|
||||
{ value: 'Etc/GMT+4', label: 'UTC-04:00 (Atlantic Time)' },
|
||||
{ value: 'Etc/GMT+3', label: 'UTC-03:00 (Buenos Aires)' },
|
||||
{ value: 'Etc/GMT+2', label: 'UTC-02:00 (Mid-Atlantic)' },
|
||||
{ value: 'Etc/GMT+1', label: 'UTC-01:00 (Azores)' },
|
||||
{ value: 'UTC', label: 'UTC+00:00 (London)' },
|
||||
{ value: 'Etc/GMT-1', label: 'UTC+01:00 (Berlin, Paris)' },
|
||||
{ value: 'Etc/GMT-2', label: 'UTC+02:00 (Athens, Cairo)' },
|
||||
{ value: 'Etc/GMT-3', label: 'UTC+03:00 (Riyadh)' },
|
||||
{ value: 'Etc/GMT-4', label: 'UTC+04:00 (Dubai)' },
|
||||
{ value: 'Etc/GMT-5', label: 'UTC+05:00 (Karachi)' },
|
||||
{ value: 'Etc/GMT-6', label: 'UTC+06:00 (Dhaka)' },
|
||||
{ value: 'Etc/GMT-7', label: 'UTC+07:00 (Bangkok)' },
|
||||
{ value: 'Etc/GMT-8', label: 'UTC+08:00 (Singapore)' },
|
||||
{ value: 'Etc/GMT-9', label: 'UTC+09:00 (Tokyo)' },
|
||||
{ value: 'Etc/GMT-10', label: 'UTC+10:00 (Sydney)' },
|
||||
{ value: 'Etc/GMT-11', label: 'UTC+11:00 (Solomon Islands)' },
|
||||
{ value: 'Etc/GMT-12', label: 'UTC+12:00 (Auckland)' },
|
||||
{ value: 'Etc/GMT-13', label: 'UTC+13:00 (Samoa)' },
|
||||
{ value: 'Etc/GMT-14', label: 'UTC+14:00 (Line Islands)' },
|
||||
];
|
||||
|
||||
export const getTimezoneForCountry = (countryCode?: string): string => {
|
||||
if (!countryCode) return 'UTC';
|
||||
return COUNTRY_TIMEZONE_MAP[countryCode.toUpperCase()] || 'UTC';
|
||||
};
|
||||
Reference in New Issue
Block a user