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?: number
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
|
log_lvl = 1;
|
||||||
if (log_lvl) {
|
if (log_lvl) {
|
||||||
console.log(`*** sync_config__event_pres_mgmt() *** pres_mgmt_cfg_remote:`, pres_mgmt_cfg_remote);
|
console.log(`*** sync_config__event_pres_mgmt() *** pres_mgmt_cfg_remote:`, pres_mgmt_cfg_remote);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deal with things that can not be overridden first:
|
// Deal with things that can not be overridden first:
|
||||||
// Labels:
|
// 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__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';
|
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_type={'text'}
|
||||||
field_value={$lq__event_presenter_obj.external_id}
|
field_value={$lq__event_presenter_obj.external_id}
|
||||||
allow_null={true}
|
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}
|
outline_element={false}
|
||||||
show_crud={false}
|
show_crud={false}
|
||||||
display_inline={true}
|
display_inline={true}
|
||||||
@@ -427,6 +427,7 @@ $: if ($lq__event_presenter_obj) {
|
|||||||
class_li={''}
|
class_li={''}
|
||||||
on:ae_crud_updated={e => {
|
on:ae_crud_updated={e => {
|
||||||
console.log(`ae_crud_updated:`, e.detail);
|
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({
|
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
|
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>
|
<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">
|
<span class="font-bold">
|
||||||
{@html $lq__event_presenter_obj.person_external_id ?? ae_snip.html__not_set}
|
{@html $lq__event_presenter_obj.person_external_id ?? ae_snip.html__not_set}
|
||||||
</span>
|
</span>
|
||||||
@@ -1166,15 +1168,15 @@ $: if ($lq__event_presenter_obj) {
|
|||||||
{@html ae_snip.html__not_set}
|
{@html ae_snip.html__not_set}
|
||||||
{/if}
|
{/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}
|
{#if ae_tmp?.show__edit_person}
|
||||||
|
|
||||||
{#await $slct.person_obj_li}
|
{#await $slct.person_obj_li}
|
||||||
<span class="fas fa-spinner fa-spin mx-1"></span>
|
<span class="fas fa-spinner fa-spin mx-1"></span>
|
||||||
{:then person_obj_li}
|
{:then person_obj_li}
|
||||||
<!-- loaded -->
|
<!-- loaded -->
|
||||||
{/await}
|
{/await}
|
||||||
|
|
||||||
<!-- {/if} -->
|
<!-- {/if} -->
|
||||||
|
|
||||||
@@ -1193,7 +1195,7 @@ $: if ($lq__event_presenter_obj) {
|
|||||||
<span class="hidden group-hover:inline">Cancel</span>
|
<span class="hidden group-hover:inline">Cancel</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{:else}
|
{:else if !$lq__event_presenter_obj.person_id || $ae_loc.administrator_access}
|
||||||
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@@ -1288,15 +1290,20 @@ $: if ($lq__event_presenter_obj) {
|
|||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if $ae_loc.administrator_access && !$lq__event_presenter_obj?.person_id}
|
{#if $ae_loc.trusted_access && !$lq__event_presenter_obj?.person_id}
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
on:click={async () => {
|
on:click={async () => {
|
||||||
console.log('Add Person');
|
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;
|
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 = {
|
let person_data = {
|
||||||
account_id_random: $slct.account_id,
|
account_id_random: $slct.account_id,
|
||||||
source_code: 'manual:SK:presenter',
|
source_code: 'manual:SK:presenter',
|
||||||
|
|||||||
Reference in New Issue
Block a user