diff --git a/src/routes/core/lookups/+page.svelte b/src/routes/core/lookups/+page.svelte index ccabe9ea..36bf80f6 100644 --- a/src/routes/core/lookups/+page.svelte +++ b/src/routes/core/lookups/+page.svelte @@ -2,10 +2,11 @@ import { onMount } from 'svelte'; import { ae_api, ae_loc } from '$lib/stores/ae_stores'; import { goto } from '$app/navigation'; - import { List, Globe, Clock, MapPin, ListFilter, RefreshCcw, Landmark, Info } from 'lucide-svelte'; + import { List, Globe, Clock, MapPin, ListFilter, RefreshCcw, Landmark, Info, Star } from 'lucide-svelte'; import { api } from '$lib/api/api'; let loading = $state(true); + let tz_only_priority = $state(false); let lookups: any = $state({ countries: [], time_zones: [], @@ -15,19 +16,24 @@ async function load_lookups() { loading = true; try { - const [countries, time_zones, subdivisions] = await Promise.all([ + const [countries, subdivisions, time_zones] = await Promise.all([ api.get_ae_obj_li_for_lu({ api_cfg: $ae_api, for_lu_type: 'country', log_lvl: 1 }), - api.get_ae_obj_li_for_lu({ api_cfg: $ae_api, for_lu_type: 'time_zone', log_lvl: 1 }), - api.get_ae_obj_li_for_lu({ api_cfg: $ae_api, for_lu_type: 'country_subdivision', log_lvl: 1 }) + api.get_ae_obj_li_for_lu({ api_cfg: $ae_api, for_lu_type: 'country_subdivision', log_lvl: 1 }), + api.get_ae_obj_li_for_lu({ + api_cfg: $ae_api, + for_lu_type: 'time_zone', + only_priority: tz_only_priority, + log_lvl: 1 + }) ]); console.log('Lookup Results - Countries:', countries); - console.log('Lookup Results - Time Zones:', time_zones); console.log('Lookup Results - Subdivisions:', subdivisions); + console.log('Lookup Results - Time Zones:', time_zones); lookups.countries = countries || []; - lookups.time_zones = time_zones || []; lookups.subdivisions = subdivisions || []; + lookups.time_zones = time_zones || []; } catch (error) { console.error('Failed to load lookups:', error); } finally { @@ -42,6 +48,12 @@ } load_lookups(); }); + + // Handle TZ priority toggle + function toggle_tz_priority() { + tz_only_priority = !tz_only_priority; + load_lookups(); + }
| Country | +Name | +Code | +
|---|---|---|
| {s.country_alpha_2_code} | +{s.name} | +{s.code} | +
| Country | -Name | -Code | -
|---|---|---|
| {s.country_alpha_2_code} | -{s.name} | -{s.code} | -
Lookup data is synchronized with the global system database and used for addresses, event scheduling, and localized displays.