diff --git a/src/routes/core/addresses/+page.svelte b/src/routes/core/addresses/+page.svelte index 52867d5b..436983ec 100644 --- a/src/routes/core/addresses/+page.svelte +++ b/src/routes/core/addresses/+page.svelte @@ -2,13 +2,24 @@ import { onMount } from 'svelte'; import { ae_loc, ae_api, slct } from '$lib/stores/ae_stores'; import { goto } from '$app/navigation'; - import { MapPin, Plus, Search, ExternalLink, X, ListFilter, MapPinned } from 'lucide-svelte'; + import { MapPin, Plus, Search, ExternalLink, X, ListFilter, MapPinned, Globe, Building2 } from 'lucide-svelte'; import { load_ae_obj_li__address, create_ae_obj__address } from '$lib/ae_core/ae_core__address'; import Address_form from './ae_comp__address_form.svelte'; let address_li: any[] = $state([]); let loading = $state(true); let show_add_form = $state(false); + let qry_str = $state(''); + let filtered_li: any[] = $derived( + qry_str + ? address_li.filter(a => + a.city?.toLowerCase().includes(qry_str.toLowerCase()) || + a.state_province?.toLowerCase().includes(qry_str.toLowerCase()) || + a.organization_name?.toLowerCase().includes(qry_str.toLowerCase()) || + a.line_1?.toLowerCase().includes(qry_str.toLowerCase()) + ) + : address_li + ); async function load_addresses() { if (!$ae_loc.account_id) return; @@ -67,11 +78,35 @@ {/if} +
| City | -State/Province | -Country | -Status | -Actions | -
|---|---|---|---|---|
| {addr.city || '--'} | -{addr.state_province || '--'} | -{addr.country || '--'} | -- - {addr.enable ? 'Active' : 'Disabled'} - - | -
-
- Manage |
-
{addr.city || '--'}
+{addr.state_province || '--'}
+Address Detail
+Attention To
-{address.attention_to || '--'}
+
+
{address.attention_to || '--'}
Organization
-{address.organization_name || '--'}
+
+
{address.organization_name || '--'}
Address Lines
-{address.line_1}
- {#if address.line_2}{address.line_2}
{/if} - {#if address.line_3}{address.line_3}
{/if} +Street Address
+{address.line_1}
+ {#if address.line_2}{address.line_2}
{/if} + {#if address.line_3}{address.line_3}
{/if} +City, State/Province
-{address.city}, {address.state_province || '--'}
+
+
{address.city}, {address.state_province || '--'}
Postal Code / Country
-{address.postal_code || '--'} / {address.country_name || address.country || '--'}
+
+
{address.postal_code || '--'} / {address.country_name || address.country || '--'}
Timezone
-{address.timezone || '--'}
+
+
{address.timezone || '--'}
Coordinates
-{address.latitude || '--'}, {address.longitude || '--'}
+
+
{address.latitude || '--'}, {address.longitude || '--'}
Internal Notes
-{address.notes || '--'}
+
+
ID: {address.address_id_random}
-Created: {new Date(address.created_on).toLocaleString()}
- {#if address.updated_on} -Updated: {new Date(address.updated_on).toLocaleString()}
- {/if} +System Audit
+ID: {address.address_id_random}
+Created: {new Date(address.created_on).toLocaleString()}
+ {#if address.updated_on} +Updated: {new Date(address.updated_on).toLocaleString()}
+ {/if} +| Name / Title | -Phone | -Status | -Actions | -|
|---|---|---|---|---|
|
-
-
-
-
- {con.title || con.name || '--'}
- |
-
- {#if con.email}
-
-
- {:else}
- No Email
- {/if}
- |
- - {con.phone_office || con.phone_mobile || '--'} - | -- - {con.enable ? 'Active' : 'Disabled'} - - | -
-
- Manage |
-
{con.name || con.title || '--'}
+{con.title || 'Support Contact'}
+Contact Detail
+Title / Name
-{contact.title || contact.name || '--'}
-Tagline
-{contact.tagline || '--'}
-{contact.email || '--'}
-Website
-- {#if contact.website_url} - {contact.website_url} - {:else} - -- - {/if} +
+
{contact.name || contact.title || '--'}
+
+
{contact.tagline || '--'}
+
+
{contact.email || '--'}
+Mobile Phone
-{contact.phone_mobile || contact.phone || '--'}
+
+
{contact.phone_mobile || contact.phone || '--'}
Office Phone
-{contact.phone_office || '--'}
+
+
{contact.phone_office || '--'}
{contact.linkedin_url || '--'}
+
+
{contact.linkedin_url || '--'}
Socials
-
+
Internal Notes
-{contact.notes || '--'}
-ID: {contact.contact_id_random}
-Created: {new Date(contact.created_on).toLocaleString()}
- {#if contact.updated_on} -Updated: {new Date(contact.updated_on).toLocaleString()}
- {/if} +System Audit
+ID: {contact.contact_id_random}
+Created: {new Date(contact.created_on).toLocaleString()}
+ {#if contact.updated_on} +Updated: {new Date(contact.updated_on).toLocaleString()}
+ {/if} +