diff --git a/app/src/Controller/PeopleController.php b/app/src/Controller/PeopleController.php index 42cb3eb77..5b234fbf9 100644 --- a/app/src/Controller/PeopleController.php +++ b/app/src/Controller/PeopleController.php @@ -90,6 +90,29 @@ public function beforeRender(\Cake\Event\EventInterface $event) { $this->set('vv_default_name_type', $settings->default_name_type_id); } + if(!$this->request->is('restful') && $this->request->getParam('action') == 'edit') { + // Get the external identity sources for this person + $externalIdentitySources = $this->fetchTable('ExternalIdentities') + ->find() + ->where(['ExternalIdentities.person_id' => $this->request->getParam('pass.0')]) + ->contain([ + 'ExtIdentitySourceRecords' => [ + 'ExternalIdentitySources' + ] + ]) + ->all(); + + // Create a lookup table for badging EIS descriptions on Person Canvas MVEAS + $eisLookupTable = []; + foreach ($externalIdentitySources as $extIdentity) { + if (!empty($extIdentity->ext_identity_source_record) && + !empty($extIdentity->ext_identity_source_record->external_identity_source)) { + $eisLookupTable[$extIdentity->id] = $extIdentity->ext_identity_source_record->external_identity_source->description; + } + } + + $this->set('vv_external_identity_sources', $eisLookupTable); + } return parent::beforeRender($event); } } \ No newline at end of file diff --git a/app/templates/element/mveaJs.php b/app/templates/element/mveaJs.php index ec33c7be2..7baa5f9d9 100644 --- a/app/templates/element/mveaJs.php +++ b/app/templates/element/mveaJs.php @@ -64,7 +64,8 @@ mveaController: '= Cake\Utility\Inflector::dasherize($mveaController) ?>', mveaTitle: '= $title ?>', webroot: '= $this->request->getAttribute('webroot') ?>', - action: '= $vv_action ?>' + action: '= $vv_action ?>', + externalIdentitySources: = json_encode($vv_external_identity_sources ?? null) ?> }, txt: JSON.parse('= json_encode($vueHelper->locales()) ?>'), isLoading: true, diff --git a/app/webroot/css/co-base.css b/app/webroot/css/co-base.css index c07b7a294..2b9e39341 100644 --- a/app/webroot/css/co-base.css +++ b/app/webroot/css/co-base.css @@ -2703,6 +2703,7 @@ html.dark-mode .btn-default:active { margin-top: auto; margin-bottom: auto; line-height: 1.2em; + border: 1px solid var(--cmg-color-bg-006); } .bg-light { color: var(--cmg-color-highlight-005); diff --git a/app/webroot/js/comanage/components/mvea/mvea-item.js b/app/webroot/js/comanage/components/mvea/mvea-item.js index 91098c540..08201704c 100644 --- a/app/webroot/js/comanage/components/mvea/mvea-item.js +++ b/app/webroot/js/comanage/components/mvea/mvea-item.js @@ -59,6 +59,9 @@ export default { var componentReference = 'mvea' + this.core.mveaType; this.$parent.$parent.launchModal(this.core.mveaTitle, this.mveaLink, componentReference); }); + }, + getEisDescription(externalIdentityId) { + return externalIdentityId ? this.core?.externalIdentitySources[externalIdentityId] : null; } }, mounted() { @@ -106,6 +109,7 @@ export default { {{ this.txt['field.primary'] }} {{ this.mvea.type.display_name }} {{ calcLangHR(this.mvea.language) }} + @@ -133,6 +137,10 @@ export default {