Giving more permissions to trusted/staff users.
This commit is contained in:
@@ -924,12 +924,14 @@ export function sync_config__event_pres_mgmt(
|
||||
log_lvl?: number
|
||||
}
|
||||
) {
|
||||
log_lvl = 1;
|
||||
if (log_lvl) {
|
||||
console.log(`*** sync_config__event_pres_mgmt() *** pres_mgmt_cfg_remote:`, pres_mgmt_cfg_remote);
|
||||
}
|
||||
|
||||
// Deal with things that can not be overridden first:
|
||||
// Labels:
|
||||
pres_mgmt_cfg_local.label__person_external_id = pres_mgmt_cfg_remote?.label__person_external_id ?? 'External ID';
|
||||
pres_mgmt_cfg_local.label__presenter_external_id = pres_mgmt_cfg_remote?.label__presenter_external_id ?? 'External ID';
|
||||
|
||||
pres_mgmt_cfg_local.label__session_poc_type = pres_mgmt_cfg_remote?.label__session_poc_type ?? 'poc';
|
||||
|
||||
@@ -419,7 +419,7 @@ $: if ($lq__event_presenter_obj) {
|
||||
field_type={'text'}
|
||||
field_value={$lq__event_presenter_obj.external_id}
|
||||
allow_null={true}
|
||||
hide_edit_btn={!$ae_loc.administrator_access || !$ae_loc.edit_mode}
|
||||
hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode}
|
||||
outline_element={false}
|
||||
show_crud={false}
|
||||
display_inline={true}
|
||||
@@ -427,6 +427,7 @@ $: if ($lq__event_presenter_obj) {
|
||||
class_li={''}
|
||||
on:ae_crud_updated={e => {
|
||||
console.log(`ae_crud_updated:`, e.detail);
|
||||
if (!confirm('Use caution with changing the external ID. This can break links and synchronizations. Are you sure you want to update the external ID?')) {return false;}
|
||||
|
||||
events_func.load_ae_obj_id__event_presenter({
|
||||
api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl: 0
|
||||
@@ -464,7 +465,8 @@ $: if ($lq__event_presenter_obj) {
|
||||
}}
|
||||
>
|
||||
<span class="fas fa-star-of-life"></span>
|
||||
Person External ID:
|
||||
<span class="fas fa-id-card"></span>
|
||||
{$events_loc.pres_mgmt?.label__person_external_id ?? 'Person External ID'}:
|
||||
<span class="font-bold">
|
||||
{@html $lq__event_presenter_obj.person_external_id ?? ae_snip.html__not_set}
|
||||
</span>
|
||||
@@ -1166,15 +1168,15 @@ $: if ($lq__event_presenter_obj) {
|
||||
{@html ae_snip.html__not_set}
|
||||
{/if}
|
||||
|
||||
{#if $ae_loc.administrator_access && $ae_loc.edit_mode}
|
||||
{#if $ae_loc.trusted_access && $ae_loc.edit_mode}
|
||||
|
||||
{#if ae_tmp?.show__edit_person}
|
||||
|
||||
{#await $slct.person_obj_li}
|
||||
<span class="fas fa-spinner fa-spin mx-1"></span>
|
||||
{:then person_obj_li}
|
||||
<!-- loaded -->
|
||||
{/await}
|
||||
{#await $slct.person_obj_li}
|
||||
<span class="fas fa-spinner fa-spin mx-1"></span>
|
||||
{:then person_obj_li}
|
||||
<!-- loaded -->
|
||||
{/await}
|
||||
|
||||
<!-- {/if} -->
|
||||
|
||||
@@ -1193,7 +1195,7 @@ $: if ($lq__event_presenter_obj) {
|
||||
<span class="hidden group-hover:inline">Cancel</span>
|
||||
</button>
|
||||
|
||||
{:else}
|
||||
{:else if !$lq__event_presenter_obj.person_id || $ae_loc.administrator_access}
|
||||
|
||||
<button
|
||||
type="button"
|
||||
@@ -1288,15 +1290,20 @@ $: if ($lq__event_presenter_obj) {
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
{#if $ae_loc.administrator_access && !$lq__event_presenter_obj?.person_id}
|
||||
{#if $ae_loc.trusted_access && !$lq__event_presenter_obj?.person_id}
|
||||
<button
|
||||
type="button"
|
||||
on:click={async () => {
|
||||
console.log('Add Person');
|
||||
if (!confirm(`Add a new person to the account? You will be able to edit their details after the person record is created.\n\n${$ae_loc.account_name}\nID: ${$slct.account_id}`)) {
|
||||
if ($ae_loc.administrator_access) {
|
||||
if (!confirm(`Add a new person (${$lq__event_presenter_obj.person_given_name}) to the account? You will be able to edit their details after the person record is created.\n\n${$ae_loc.account_name}\nID: ${$slct.account_id}`)) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (!confirm(`Add a new person (${$lq__event_presenter_obj.person_given_name}) to the account based on this presenter? Be sure to check if there is an existing person record first.\n\n${$ae_loc.account_name}\nID: ${$slct.account_id}`)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
let person_data = {
|
||||
account_id_random: $slct.account_id,
|
||||
source_code: 'manual:SK:presenter',
|
||||
|
||||
Reference in New Issue
Block a user