diff --git a/src/lib/ae_core/core__person.ts b/src/lib/ae_core/core__person.ts index b88848f4..a7f2d9f3 100644 --- a/src/lib/ae_core/core__person.ts +++ b/src/lib/ae_core/core__person.ts @@ -587,7 +587,7 @@ let properties_to_save = [ 'comments', 'allow_auth_key', // For sign in without password - // 'auth_key', + // 'auth_key', // Should this be saved locally? 'passcode', // 'passcode_timeout', @@ -625,6 +625,27 @@ let properties_to_save = [ 'user_manager', 'user_administrator', 'user_public', + + 'organization_id', + 'organization_id_random', + 'organization_name', + + 'contact_id', + 'contact_id_random', + 'contact_name', + 'contact_email', + 'contact_cc_email', + 'contact_phone_mobile', + 'contact_phone_home', + 'contact_phone_office', + 'contact_phone_land', + 'contact_phone_fax', + 'contact_phone_other', + + 'address_id', + 'address_id_random', + 'address_city', + 'address_country_alpha_2_code', // contact_address_country_alpha_2_code ]; @@ -742,6 +763,27 @@ export async function process_ae_obj__person_props( user_manager: obj.user_manager, user_administrator: obj.user_administrator, user_public: obj.user_public, + + organization_id: obj.organization_id_random, + organization_id_random: obj.organization_id_random, + organization_name: obj.organization_name, + + contact_id: obj.contact_id_random, + contact_id_random: obj.contact_id_random, + contact_name: obj.contact_name, + contact_email: obj.contact_email, + contact_cc_email: obj.contact_cc_email, + contact_phone_mobile: obj.contact_phone_mobile, + contact_phone_home: obj.contact_phone_home, + contact_phone_office: obj.contact_phone_office, + contact_phone_land: obj.contact_phone_land, + contact_phone_fax: obj.contact_phone_fax, + contact_phone_other: obj.contact_phone_other, + + address_id: obj.contact_address_id_random, + address_id_random: obj.contact_address_id_random, + address_city: obj.contact_address_city, + address_country_alpha_2_code: obj.contact_address_country_alpha_2_code, // contact_address_country_alpha_2_code }; processed_obj_li.push(processed_obj); diff --git a/src/lib/ae_core/db_core.ts b/src/lib/ae_core/db_core.ts index be667646..5a4a7221 100644 --- a/src/lib/ae_core/db_core.ts +++ b/src/lib/ae_core/db_core.ts @@ -81,7 +81,7 @@ export interface Person { comments?: null|string; allow_auth_key?: null|boolean; // For sign in without password - auth_key?: null|string; + auth_key?: null|string; // Should this be saved locally? passcode?: null|string; data_json?: null|string; @@ -95,6 +95,11 @@ export interface Person { created_on: Date; updated_on?: null|Date; + // Generated fields for sorting locally only + tmp_sort_1?: null|string; + tmp_sort_2?: null|string; + tmp_sort_3?: null|string; + // Additional fields for convenience (database views) username?: string; user_name?: null|string; @@ -104,6 +109,27 @@ export interface Person { user_manager?: boolean; user_administrator?: boolean; user_public?: boolean; + + organization_id?: null|string; // The organization this person belongs to, if any. + organization_id_random?: null|string; // The random ID of the organization this person belongs to, if any. + organization_name?: null|string; + + contact_id?: null|string; // The contact ID of the person, if any. + contact_id_random?: null|string; // The random ID of the contact, if any. + contact_name?: null|string; + contact_email?: null|string; + contact_cc_email?: null|string; + contact_phone_mobile?: null|string; + contact_phone_home?: null|string; + contact_phone_office?: null|string; + contact_phone_landline?: null|string; + contact_phone_fax?: null|string; + contact_phone_other?: null|string; + + address_id?: null|string; // The address ID of the person, if any. + address_id_random?: null|string; // The random ID of the address, if any. + address_city?: null|string; + address_country_alpha_2_code?: null|string; // ISO 3166-1 alpha-2 country code } diff --git a/src/lib/ae_stores.ts b/src/lib/ae_stores.ts index 15960f7f..ebad53cd 100644 --- a/src/lib/ae_stores.ts +++ b/src/lib/ae_stores.ts @@ -125,6 +125,8 @@ const ae_app_local_data_defaults: key_val = { primary_email: null, // The primary email of the logged-in person/user user_id: null, // The user ID of the logged-in user + qry_limit__people: 100, + show_content__person_page_help: false, }, @@ -143,6 +145,8 @@ const ae_app_local_data_defaults: key_val = { public: false, // Is the user a public user (can view public content) person_id: null, // The person ID of the logged-in user access_type: null, // The access type of the logged-in user + + qry_limit__users: 100, }, 'qry__enabled': 'enabled', // all, disabled, enabled diff --git a/src/routes/core/ae_comp__person_obj_tbl.svelte b/src/routes/core/ae_comp__person_obj_tbl.svelte index 06f5c5e6..8fbc7f20 100644 --- a/src/routes/core/ae_comp__person_obj_tbl.svelte +++ b/src/routes/core/ae_comp__person_obj_tbl.svelte @@ -78,8 +78,10 @@ let lq_kv__person_obj_li = liveQuery( - {@html person_obj?.full_name ?? ae_snip.html__not_set} + + {@html person_obj?.full_name ? person_obj?.full_name : ae_snip.html__not_set}