fix(core): replace legacy *_id_random with V3 short-form IDs across all core pages
- sites, accounts, addresses, contacts, users list/detail pages - ae_comp__person_obj_tbl: fix bulkGet→where/anyOf, rename prop person_id_random_li→person_id_li - person_view: ~20 person_id_random refs in API calls/props - people page + search + form components - activity_logs: intentionally unchanged (person_id_random is a real field there)
This commit is contained in:
@@ -183,7 +183,7 @@ async function handle_add_account() {
|
||||
</h3>
|
||||
|
||||
<div class="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
||||
{#each filtered_li as acct (acct.account_id_random)}
|
||||
{#each filtered_li as acct (acct.account_id)}
|
||||
<div
|
||||
class="card preset-tonal-surface border-surface-500/10 hover:border-primary-500/30 group relative space-y-4 border p-5 shadow-md transition-all">
|
||||
<div class="absolute top-4 right-4 flex gap-1">
|
||||
@@ -233,13 +233,13 @@ async function handle_add_account() {
|
||||
size={14}
|
||||
class="text-secondary-500 shrink-0" />
|
||||
<span class="truncate font-mono"
|
||||
>{acct.account_id_random}</span>
|
||||
>{acct.account_id}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a
|
||||
class="btn btn-sm preset-filled-primary w-full font-bold shadow-lg transition-all group-hover:brightness-110"
|
||||
href="/core/accounts/{acct.account_id_random}">
|
||||
href="/core/accounts/{acct.account_id}">
|
||||
Manage Account
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -87,8 +87,8 @@ onMount(() => {
|
||||
onSave={(new_addr) => {
|
||||
show_add_form = false;
|
||||
load_addresses();
|
||||
if (new_addr.address_id_random) {
|
||||
goto(`/core/addresses/${new_addr.address_id_random}`);
|
||||
if (new_addr.address_id) {
|
||||
goto(`/core/addresses/${new_addr.address_id}`);
|
||||
}
|
||||
}}
|
||||
onCancel={() => (show_add_form = false)} />
|
||||
@@ -153,7 +153,7 @@ onMount(() => {
|
||||
</h3>
|
||||
|
||||
<div class="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
||||
{#each filtered_li as addr (addr.address_id_random)}
|
||||
{#each filtered_li as addr (addr.address_id)}
|
||||
<div
|
||||
class="card preset-tonal-surface border-surface-500/10 hover:border-primary-500/30 group relative space-y-4 border p-5 shadow-md transition-all">
|
||||
<div class="absolute top-4 right-4">
|
||||
@@ -206,7 +206,7 @@ onMount(() => {
|
||||
|
||||
<a
|
||||
class="btn btn-sm preset-filled-primary w-full font-bold shadow-lg transition-all group-hover:brightness-110"
|
||||
href="/core/addresses/{addr.address_id_random}">
|
||||
href="/core/addresses/{addr.address_id}">
|
||||
View Details
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -297,7 +297,7 @@ async function handle_delete() {
|
||||
<p class="flex justify-between">
|
||||
<span>ID:</span>
|
||||
<span class="text-primary-500 font-bold"
|
||||
>{address.address_id_random}</span>
|
||||
>{address.address_id}</span>
|
||||
</p>
|
||||
<p class="flex justify-between">
|
||||
<span>Created:</span>
|
||||
|
||||
@@ -82,11 +82,11 @@ async function handleSubmit(event: Event) {
|
||||
|
||||
try {
|
||||
let result;
|
||||
if (address?.address_id_random) {
|
||||
if (address?.address_id) {
|
||||
// Update existing
|
||||
result = await update_ae_obj__address({
|
||||
api_cfg: $ae_api,
|
||||
address_id: address.address_id_random,
|
||||
address_id: address.address_id,
|
||||
data_kv: payload,
|
||||
log_lvl: 1
|
||||
});
|
||||
|
||||
@@ -29,7 +29,7 @@ import {
|
||||
interface Props {
|
||||
// Exports
|
||||
container_class_li?: string | Array<string>;
|
||||
person_id_random_li?: Array<string>;
|
||||
person_id_li?: Array<string>;
|
||||
allow_basic?: boolean;
|
||||
allow_moderator?: boolean;
|
||||
show_user_fields?: boolean;
|
||||
@@ -38,7 +38,7 @@ interface Props {
|
||||
|
||||
let {
|
||||
container_class_li = [],
|
||||
person_id_random_li = $bindable(['']),
|
||||
person_id_li = $bindable([]),
|
||||
allow_basic = false,
|
||||
allow_moderator = false,
|
||||
show_user_fields = false,
|
||||
@@ -49,12 +49,12 @@ let {
|
||||
|
||||
// *** Functions and Logic
|
||||
let lq_kv__person_obj_li = $derived(
|
||||
liveQuery(() => db_core.person.bulkGet(person_id_random_li))
|
||||
liveQuery(() => db_core.person.where('person_id').anyOf(person_id_li).toArray())
|
||||
);
|
||||
</script>
|
||||
|
||||
<section class="ae_comp person_obj_tbl container {container_class_li}">
|
||||
{#if person_id_random_li && $lq_kv__person_obj_li && $lq_kv__person_obj_li?.length > 0}
|
||||
{#if person_id_li && $lq_kv__person_obj_li && $lq_kv__person_obj_li?.length > 0}
|
||||
<div class="overflow-auto">
|
||||
<h2 class="h3">
|
||||
<span class="text-md"> Results: </span>
|
||||
@@ -85,15 +85,15 @@ let lq_kv__person_obj_li = $derived(
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{#each $lq_kv__person_obj_li as person_obj (person_obj?.person_id_random)}
|
||||
{#each $lq_kv__person_obj_li as person_obj (person_obj?.person_id)}
|
||||
<tr class:dim={person_obj?.hide}>
|
||||
<td class="px-4 py-2">
|
||||
<User size="1em" />
|
||||
<a
|
||||
href="/core/people/{person_obj?.person_id_random}"
|
||||
href="/core/people/{person_obj?.person_id}"
|
||||
class="text-blue-500 underline hover:text-blue-800"
|
||||
title="View {person_obj?.full_name ??
|
||||
'no name'} (ID={person_obj?.person_id_random})">
|
||||
'no name'} (ID={person_obj?.person_id})">
|
||||
<!-- {@html person_obj?.full_name ?? ae_snip.html__not_set} -->
|
||||
{@html person_obj?.full_name
|
||||
? person_obj?.full_name
|
||||
@@ -121,7 +121,7 @@ let lq_kv__person_obj_li = $derived(
|
||||
|
||||
{#if show_user_fields}
|
||||
<td class="px-4 py-2">
|
||||
{#if person_obj?.user_id_random}
|
||||
{#if person_obj?.user_id}
|
||||
<div class="flex flex-col gap-1">
|
||||
<span
|
||||
class="flex items-center gap-1 font-bold">
|
||||
@@ -129,7 +129,7 @@ let lq_kv__person_obj_li = $derived(
|
||||
size="1em"
|
||||
class="text-success-500" />
|
||||
<a
|
||||
href="/core/users/{person_obj?.user_id_random}"
|
||||
href="/core/users/{person_obj?.user_id}"
|
||||
class="text-blue-500 underline hover:text-blue-800">
|
||||
{@html person_obj?.username ??
|
||||
'-- no username --'}
|
||||
@@ -137,7 +137,7 @@ let lq_kv__person_obj_li = $derived(
|
||||
</span>
|
||||
<span
|
||||
class="font-mono text-[10px] opacity-50"
|
||||
>{person_obj.user_id_random}</span>
|
||||
>{person_obj.user_id}</span>
|
||||
</div>
|
||||
{:else}
|
||||
<span
|
||||
@@ -161,7 +161,7 @@ let lq_kv__person_obj_li = $derived(
|
||||
class="badge preset-filled-primary text-[10px]"
|
||||
>Admin</span
|
||||
>{/if}
|
||||
{#if !person_obj?.user_id_random}<span
|
||||
{#if !person_obj?.user_id}<span
|
||||
class="opacity-30">--</span
|
||||
>{/if}
|
||||
</div>
|
||||
|
||||
@@ -85,8 +85,8 @@ onMount(() => {
|
||||
onSave={(new_con) => {
|
||||
show_add_form = false;
|
||||
load_contacts();
|
||||
if (new_con.contact_id_random) {
|
||||
goto(`/core/contacts/${new_con.contact_id_random}`);
|
||||
if (new_con.contact_id) {
|
||||
goto(`/core/contacts/${new_con.contact_id}`);
|
||||
}
|
||||
}}
|
||||
onCancel={() => (show_add_form = false)} />
|
||||
@@ -151,7 +151,7 @@ onMount(() => {
|
||||
</h3>
|
||||
|
||||
<div class="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
||||
{#each filtered_li as con (con.contact_id_random)}
|
||||
{#each filtered_li as con (con.contact_id)}
|
||||
<div
|
||||
class="card preset-tonal-surface border-surface-500/10 hover:border-primary-500/30 group relative space-y-4 border p-5 shadow-md transition-all">
|
||||
<div class="absolute top-4 right-4">
|
||||
@@ -202,7 +202,7 @@ onMount(() => {
|
||||
|
||||
<a
|
||||
class="btn btn-sm preset-filled-primary w-full font-bold shadow-lg transition-all group-hover:brightness-110"
|
||||
href="/core/contacts/{con.contact_id_random}">
|
||||
href="/core/contacts/{con.contact_id}">
|
||||
Manage Contact
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -292,7 +292,7 @@ async function handle_delete() {
|
||||
<p class="flex justify-between">
|
||||
<span>ID:</span>
|
||||
<span class="text-primary-500 font-bold"
|
||||
>{contact.contact_id_random}</span>
|
||||
>{contact.contact_id}</span>
|
||||
</p>
|
||||
<p class="flex justify-between">
|
||||
<span>Created:</span>
|
||||
|
||||
@@ -86,11 +86,11 @@ async function handleSubmit(event: Event) {
|
||||
|
||||
try {
|
||||
let result;
|
||||
if (contact?.contact_id_random) {
|
||||
if (contact?.contact_id) {
|
||||
// Update existing
|
||||
result = await update_ae_obj__contact({
|
||||
api_cfg: $ae_api,
|
||||
contact_id: contact.contact_id_random,
|
||||
contact_id: contact.contact_id,
|
||||
data_kv: payload,
|
||||
log_lvl: 1
|
||||
});
|
||||
|
||||
@@ -8,7 +8,7 @@ import Comp_person_search from './ae_comp__person_search.svelte';
|
||||
import Comp_person_obj_tbl from '../ae_comp__person_obj_tbl.svelte';
|
||||
import Person_form from './ae_comp__person_form.svelte';
|
||||
|
||||
let person_id_random_li: string[] = $state([]);
|
||||
let person_id_li: string[] = $state([]);
|
||||
let show_add_form = $state(false);
|
||||
|
||||
onMount(() => {
|
||||
@@ -46,7 +46,7 @@ onMount(() => {
|
||||
<Person_form
|
||||
onSave={(new_person) => {
|
||||
show_add_form = false;
|
||||
goto(`/core/people/${new_person.person_id_random}`);
|
||||
goto(`/core/people/${new_person.person_id}`);
|
||||
}}
|
||||
onCancel={() => (show_add_form = false)} />
|
||||
</div>
|
||||
@@ -54,7 +54,7 @@ onMount(() => {
|
||||
|
||||
<Comp_person_search
|
||||
on_results={(results) => {
|
||||
person_id_random_li = results.map((p) => p.person_id_random);
|
||||
person_id_li = results.map((p) => p.person_id);
|
||||
$ae_sess.person.show_report__person_li = true;
|
||||
}} />
|
||||
|
||||
@@ -66,11 +66,11 @@ onMount(() => {
|
||||
<ListFilter size={18} class="text-secondary-500" />
|
||||
Search Results
|
||||
<span class="badge preset-tonal-secondary ml-auto"
|
||||
>{person_id_random_li.length} found</span>
|
||||
>{person_id_li.length} found</span>
|
||||
</h3>
|
||||
<div class="overflow-x-auto">
|
||||
<Comp_person_obj_tbl
|
||||
bind:person_id_random_li
|
||||
bind:person_id_li
|
||||
show_user_fields={$ae_loc.administrator_access}
|
||||
></Comp_person_obj_tbl>
|
||||
</div>
|
||||
|
||||
@@ -108,11 +108,11 @@ async function handleSubmit(event: Event) {
|
||||
|
||||
try {
|
||||
let result;
|
||||
if (person?.person_id_random) {
|
||||
if (person?.person_id) {
|
||||
// Update existing
|
||||
result = await core_func.update_ae_obj__person({
|
||||
api_cfg: $ae_api,
|
||||
person_id: person.person_id_random,
|
||||
person_id: person.person_id,
|
||||
data_kv: payload,
|
||||
log_lvl: 1
|
||||
});
|
||||
|
||||
@@ -36,7 +36,7 @@ async function handle_search() {
|
||||
p.primary_email
|
||||
?.toLowerCase()
|
||||
.includes(qry_str.toLowerCase()) ||
|
||||
p.person_id_random
|
||||
p.person_id
|
||||
?.toLowerCase()
|
||||
.includes(qry_str.toLowerCase())
|
||||
)
|
||||
|
||||
@@ -121,7 +121,7 @@ $effect(() => {
|
||||
<li class:hidden={!$ae_loc.trusted_access || !$ae_loc.edit_mode}>
|
||||
<Element_ae_obj_field_editor
|
||||
object_type={'person'}
|
||||
object_id={$lq__person_obj.person_id_random}
|
||||
object_id={$lq__person_obj.person_id}
|
||||
field_name={'external_id'}
|
||||
field_type={'text'}
|
||||
current_value={$lq__person_obj.external_id}
|
||||
@@ -129,7 +129,7 @@ $effect(() => {
|
||||
on_success={() =>
|
||||
core_func.load_ae_obj_id__person({
|
||||
api_cfg: $ae_api,
|
||||
person_id: $lq__person_obj?.person_id_random,
|
||||
person_id: $lq__person_obj?.person_id,
|
||||
log_lvl: 1
|
||||
})}>
|
||||
<IdCard size="1em" />
|
||||
@@ -142,7 +142,7 @@ $effect(() => {
|
||||
<li class:hidden={!$ae_loc.trusted_access || !$ae_loc.edit_mode}>
|
||||
<Element_ae_obj_field_editor
|
||||
object_type={'person'}
|
||||
object_id={$lq__person_obj.person_id_random}
|
||||
object_id={$lq__person_obj.person_id}
|
||||
field_name={'external_sys_id'}
|
||||
field_type={'text'}
|
||||
current_value={$lq__person_obj.external_sys_id}
|
||||
@@ -150,7 +150,7 @@ $effect(() => {
|
||||
on_success={() =>
|
||||
core_func.load_ae_obj_id__person({
|
||||
api_cfg: $ae_api,
|
||||
person_id: $lq__person_obj?.person_id_random,
|
||||
person_id: $lq__person_obj?.person_id,
|
||||
log_lvl: 1
|
||||
})}>
|
||||
<Fingerprint size="1em" />
|
||||
@@ -167,14 +167,14 @@ $effect(() => {
|
||||
|
||||
<Element_ae_obj_field_editor
|
||||
object_type={'person'}
|
||||
object_id={$lq__person_obj.person_id_random}
|
||||
object_id={$lq__person_obj.person_id}
|
||||
field_name={'given_name'}
|
||||
field_type={'text'}
|
||||
current_value={$lq__person_obj.given_name}
|
||||
on_success={() =>
|
||||
core_func.load_ae_obj_id__person({
|
||||
api_cfg: $ae_api,
|
||||
person_id: $lq__person_obj?.person_id_random,
|
||||
person_id: $lq__person_obj?.person_id,
|
||||
log_lvl: 1
|
||||
})}>
|
||||
<span class="font-bold">
|
||||
@@ -183,14 +183,14 @@ $effect(() => {
|
||||
</Element_ae_obj_field_editor>
|
||||
<Element_ae_obj_field_editor
|
||||
object_type={'person'}
|
||||
object_id={$lq__person_obj.person_id_random}
|
||||
object_id={$lq__person_obj.person_id}
|
||||
field_name={'family_name'}
|
||||
field_type={'text'}
|
||||
current_value={$lq__person_obj.family_name}
|
||||
on_success={() =>
|
||||
core_func.load_ae_obj_id__person({
|
||||
api_cfg: $ae_api,
|
||||
person_id: $lq__person_obj?.person_id_random,
|
||||
person_id: $lq__person_obj?.person_id,
|
||||
log_lvl: 1
|
||||
})}>
|
||||
<span class="font-bold">
|
||||
@@ -201,7 +201,7 @@ $effect(() => {
|
||||
<li>
|
||||
<Element_ae_obj_field_editor
|
||||
object_type={'person'}
|
||||
object_id={$lq__person_obj.person_id_random}
|
||||
object_id={$lq__person_obj.person_id}
|
||||
field_name={'primary_email'}
|
||||
field_type={'text'}
|
||||
current_value={$lq__person_obj.primary_email}
|
||||
@@ -209,7 +209,7 @@ $effect(() => {
|
||||
on_success={() =>
|
||||
core_func.load_ae_obj_id__person({
|
||||
api_cfg: $ae_api,
|
||||
person_id: $lq__person_obj?.person_id_random,
|
||||
person_id: $lq__person_obj?.person_id,
|
||||
log_lvl: 1
|
||||
})}>
|
||||
<Mail size="1em" />
|
||||
@@ -231,7 +231,7 @@ $effect(() => {
|
||||
<li>
|
||||
<Element_ae_obj_field_editor
|
||||
object_type={'person'}
|
||||
object_id={$lq__person_obj.person_id_random}
|
||||
object_id={$lq__person_obj.person_id}
|
||||
field_name={'affiliations'}
|
||||
field_type={'text'}
|
||||
current_value={$lq__person_obj.affiliations}
|
||||
@@ -239,7 +239,7 @@ $effect(() => {
|
||||
on_success={() =>
|
||||
core_func.load_ae_obj_id__person({
|
||||
api_cfg: $ae_api,
|
||||
person_id: $lq__person_obj?.person_id_random,
|
||||
person_id: $lq__person_obj?.person_id,
|
||||
log_lvl: 1
|
||||
})}>
|
||||
<Building2 size="1em" />
|
||||
@@ -252,7 +252,7 @@ $effect(() => {
|
||||
<li>
|
||||
<Element_ae_obj_field_editor
|
||||
object_type={'person'}
|
||||
object_id={$lq__person_obj.person_id_random}
|
||||
object_id={$lq__person_obj.person_id}
|
||||
field_name={'professional_title'}
|
||||
field_type={'text'}
|
||||
current_value={$lq__person_obj.professional_title}
|
||||
@@ -260,7 +260,7 @@ $effect(() => {
|
||||
on_success={() =>
|
||||
core_func.load_ae_obj_id__person({
|
||||
api_cfg: $ae_api,
|
||||
person_id: $lq__person_obj?.person_id_random,
|
||||
person_id: $lq__person_obj?.person_id,
|
||||
log_lvl: 1
|
||||
})}>
|
||||
<Tag size="1em" />
|
||||
@@ -275,7 +275,7 @@ $effect(() => {
|
||||
<li>
|
||||
<Element_ae_obj_field_editor
|
||||
object_type={'person'}
|
||||
object_id={$lq__person_obj.person_id_random}
|
||||
object_id={$lq__person_obj.person_id}
|
||||
field_name={'passcode'}
|
||||
field_type={'text'}
|
||||
current_value={$lq__person_obj.passcode}
|
||||
@@ -283,7 +283,7 @@ $effect(() => {
|
||||
on_success={() =>
|
||||
core_func.load_ae_obj_id__person({
|
||||
api_cfg: $ae_api,
|
||||
person_id: $lq__person_obj?.person_id_random,
|
||||
person_id: $lq__person_obj?.person_id,
|
||||
log_lvl: 1
|
||||
})}>
|
||||
<UserRound size="1em" />
|
||||
@@ -307,12 +307,12 @@ $effect(() => {
|
||||
await api.update_ae_obj({
|
||||
api_cfg: $ae_api,
|
||||
obj_type: 'person',
|
||||
obj_id: $lq__person_obj?.person_id_random,
|
||||
obj_id: $lq__person_obj?.person_id,
|
||||
fields: { hide: !$lq__person_obj?.hide }
|
||||
});
|
||||
core_func.load_ae_obj_id__person({
|
||||
api_cfg: $ae_api,
|
||||
person_id: $lq__person_obj?.person_id_random,
|
||||
person_id: $lq__person_obj?.person_id,
|
||||
log_lvl: 1
|
||||
});
|
||||
}}
|
||||
@@ -340,12 +340,12 @@ $effect(() => {
|
||||
await api.update_ae_obj({
|
||||
api_cfg: $ae_api,
|
||||
obj_type: 'person',
|
||||
obj_id: $lq__person_obj?.person_id_random,
|
||||
obj_id: $lq__person_obj?.person_id,
|
||||
fields: { enable: !$lq__person_obj?.enable }
|
||||
});
|
||||
core_func.load_ae_obj_id__person({
|
||||
api_cfg: $ae_api,
|
||||
person_id: $lq__person_obj?.person_id_random,
|
||||
person_id: $lq__person_obj?.person_id,
|
||||
log_lvl: 1
|
||||
});
|
||||
}}
|
||||
@@ -376,12 +376,12 @@ $effect(() => {
|
||||
await api.update_ae_obj({
|
||||
api_cfg: $ae_api,
|
||||
obj_type: 'person',
|
||||
obj_id: $lq__person_obj?.person_id_random,
|
||||
obj_id: $lq__person_obj?.person_id,
|
||||
fields: { priority: !$lq__person_obj?.priority }
|
||||
});
|
||||
core_func.load_ae_obj_id__person({
|
||||
api_cfg: $ae_api,
|
||||
person_id: $lq__person_obj?.person_id_random,
|
||||
person_id: $lq__person_obj?.person_id,
|
||||
log_lvl: 1
|
||||
});
|
||||
}}
|
||||
@@ -407,14 +407,14 @@ $effect(() => {
|
||||
await api.update_ae_obj({
|
||||
api_cfg: $ae_api,
|
||||
obj_type: 'person',
|
||||
obj_id: $lq__person_obj?.person_id_random,
|
||||
obj_id: $lq__person_obj?.person_id,
|
||||
fields: {
|
||||
allow_auth_key: !$lq__person_obj?.allow_auth_key
|
||||
}
|
||||
});
|
||||
core_func.load_ae_obj_id__person({
|
||||
api_cfg: $ae_api,
|
||||
person_id: $lq__person_obj?.person_id_random,
|
||||
person_id: $lq__person_obj?.person_id,
|
||||
log_lvl: 1
|
||||
});
|
||||
}}
|
||||
@@ -491,7 +491,7 @@ $effect(() => {
|
||||
ae_promises.update__person_obj = core_func
|
||||
.update_ae_obj__person({
|
||||
api_cfg: $ae_api,
|
||||
person_id: $lq__person_obj.person_id_random,
|
||||
person_id: $lq__person_obj.person_id,
|
||||
data_kv: person_data,
|
||||
log_lvl: 0
|
||||
})
|
||||
|
||||
@@ -186,7 +186,7 @@ async function handle_add_site() {
|
||||
</h3>
|
||||
|
||||
<div class="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
||||
{#each filtered_li as site (site.site_id_random)}
|
||||
{#each filtered_li as site (site.site_id)}
|
||||
<div
|
||||
class="card preset-tonal-surface border-surface-500/10 hover:border-primary-500/30 group relative space-y-4 border p-5 shadow-md transition-all">
|
||||
<div class="absolute top-4 right-4 flex gap-1">
|
||||
@@ -236,13 +236,13 @@ async function handle_add_site() {
|
||||
size={14}
|
||||
class="text-secondary-500 shrink-0" />
|
||||
<span class="truncate font-mono"
|
||||
>{site.site_id_random}</span>
|
||||
>{site.site_id}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a
|
||||
class="btn btn-sm preset-filled-primary w-full font-bold shadow-lg transition-all group-hover:brightness-110"
|
||||
href="/core/sites/{site.site_id_random}">
|
||||
href="/core/sites/{site.site_id}">
|
||||
Manage Site
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -98,7 +98,7 @@ async function handle_toggle_domain(dom: any) {
|
||||
await update_ae_obj__site_domain({
|
||||
api_cfg: $ae_api,
|
||||
site_id,
|
||||
site_domain_id: dom.site_domain_id_random,
|
||||
site_domain_id: dom.site_domain_id,
|
||||
data_kv: { enable: !dom.enable },
|
||||
log_lvl: 1
|
||||
});
|
||||
@@ -110,7 +110,7 @@ async function handle_delete_domain(dom: any) {
|
||||
await delete_ae_obj_id__site_domain({
|
||||
api_cfg: $ae_api,
|
||||
site_id,
|
||||
site_domain_id: dom.site_domain_id_random,
|
||||
site_domain_id: dom.site_domain_id,
|
||||
method: 'delete',
|
||||
log_lvl: 1
|
||||
});
|
||||
@@ -273,7 +273,7 @@ async function handle_delete_domain(dom: any) {
|
||||
</p>
|
||||
{:else}
|
||||
<div class="space-y-3">
|
||||
{#each domain_li as dom (dom.site_domain_id_random)}
|
||||
{#each domain_li as dom (dom.site_domain_id)}
|
||||
<div
|
||||
class="card preset-tonal-surface border-surface-500/10 group flex items-center justify-between border p-3 shadow-sm">
|
||||
<div class="flex flex-col">
|
||||
|
||||
@@ -188,7 +188,7 @@ async function handle_add_user() {
|
||||
</h3>
|
||||
|
||||
<div class="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
||||
{#each user_li as user (user.user_id_random)}
|
||||
{#each user_li as user (user.user_id)}
|
||||
<div
|
||||
class="card preset-tonal-surface border-surface-500/10 hover:border-primary-500/30 group space-y-4 border p-5 shadow-md transition-all">
|
||||
<header class="flex items-start justify-between">
|
||||
@@ -244,13 +244,13 @@ async function handle_add_user() {
|
||||
size={14}
|
||||
class="text-secondary-500" />
|
||||
<span class="font-mono"
|
||||
>{user.user_id_random}</span>
|
||||
>{user.user_id}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a
|
||||
class="btn btn-sm preset-filled-primary w-full font-bold shadow-lg transition-all group-hover:brightness-110"
|
||||
href="/core/users/{user.user_id_random}">
|
||||
href="/core/users/{user.user_id}">
|
||||
Manage User
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -52,7 +52,7 @@ async function handle_save() {
|
||||
|
||||
const result = await update_ae_obj__user({
|
||||
api_cfg: $ae_api,
|
||||
user_id: user.user_id_random,
|
||||
user_id: user.user_id,
|
||||
data_kv,
|
||||
log_lvl: 1
|
||||
});
|
||||
@@ -68,7 +68,7 @@ async function handle_delete() {
|
||||
|
||||
const result = await delete_ae_obj_id__user({
|
||||
api_cfg: $ae_api,
|
||||
user_id: user.user_id_random,
|
||||
user_id: user.user_id,
|
||||
method: 'disable',
|
||||
log_lvl: 1
|
||||
});
|
||||
@@ -99,7 +99,7 @@ async function handle_delete() {
|
||||
</h1>
|
||||
<p
|
||||
class="text-[10px] font-bold tracking-widest uppercase opacity-50">
|
||||
UID: {user.user_id_random}
|
||||
UID: {user.user_id}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -306,11 +306,11 @@ async function handle_delete() {
|
||||
class="font-bold tracking-tighter uppercase opacity-50"
|
||||
>Linked Person</span>
|
||||
<span class="font-mono font-bold">
|
||||
{#if user.person_id_random}
|
||||
{#if user.person_id}
|
||||
<a
|
||||
href="/core/people/{user.person_id_random}"
|
||||
href="/core/people/{user.person_id}"
|
||||
class="text-primary-500 hover:underline">
|
||||
{user.person_id_random}
|
||||
{user.person_id}
|
||||
</a>
|
||||
{:else}
|
||||
<span class="text-error-500 italic"
|
||||
|
||||
Reference in New Issue
Block a user