From e834bc94fef9258e4355c389de1623a9423a6bbd Mon Sep 17 00:00:00 2001 From: Tom Buskirk Date: Thu, 27 Dec 2018 14:45:39 -0600 Subject: [PATCH] #5 #8 #9 Corrected Issues --- index.html | 4 ++-- js/cass-ui-ga/cui-ga-main.js | 25 ++++++++++++++----------- js/cass-ui-ga/cui-ga-session-util.js | 24 +++++++++++++++++++----- 3 files changed, 35 insertions(+), 18 deletions(-) diff --git a/index.html b/index.html index 0477678..99c4537 100644 --- a/index.html +++ b/index.html @@ -28,9 +28,9 @@

Gap Analysis Tools diff --git a/js/cass-ui-ga/cui-ga-main.js b/js/cass-ui-ga/cui-ga-main.js index 91c8fb8..439d352 100644 --- a/js/cass-ui-ga/cui-ga-main.js +++ b/js/cass-ui-ga/cui-ga-main.js @@ -1405,17 +1405,20 @@ function buildAssertionMaps() { profileAssertionsMap = {}; assertionNegativeMap = {}; $(assertionList).each(function (i, as) { - registerAssertionSourceName(as); - assertionMap[as.shortId()] = as; - assertionNegativeMap[as.shortId()] = as.getNegative(); - if (!competencyAssertionMap[as.competency] || competencyAssertionMap[as.competency] == null) { - competencyAssertionMap[as.competency] = []; - } - competencyAssertionMap[as.competency].push(as); - if (!profileAssertionsMap[as.getSubject().toPem()] || profileAssertionsMap[as.getSubject().toPem()] == null) { - profileAssertionsMap[as.getSubject().toPem()] = []; + var isNegativeAssr = as.getNegative(); + assertionNegativeMap[as.shortId()] = isNegativeAssr; + if (!isNegativeAssr) { //for right now, just ignore negative assertions + registerAssertionSourceName(as); + assertionMap[as.shortId()] = as; + if (!competencyAssertionMap[as.competency] || competencyAssertionMap[as.competency] == null) { + competencyAssertionMap[as.competency] = []; + } + competencyAssertionMap[as.competency].push(as); + if (!profileAssertionsMap[as.getSubject().toPem()] || profileAssertionsMap[as.getSubject().toPem()] == null) { + profileAssertionsMap[as.getSubject().toPem()] = []; + } + profileAssertionsMap[as.getSubject().toPem()].push(as); } - profileAssertionsMap[as.getSubject().toPem()].push(as); }); } @@ -1427,7 +1430,7 @@ function sortAssertionList() { function processRelevantAssertions() { if (assertionList.length > 0) { - showPageAsBusy("Processing assertions (step 1 of 3)..."); + showPageAsBusy("Processing assertions (step 1 of 2)..."); sortAssertionList(); debugMessage(assertionList); buildAssertionMaps(); diff --git a/js/cass-ui-ga/cui-ga-session-util.js b/js/cass-ui-ga/cui-ga-session-util.js index 0c95df0..aee6be1 100644 --- a/js/cass-ui-ga/cui-ga-session-util.js +++ b/js/cass-ui-ga/cui-ga-session-util.js @@ -103,18 +103,32 @@ function getPersonObjectPk(po) { return poPk; } +function buildPersonObjectName(po) { + var name = getStringVal(po.getName()); + if (!name || name.trim() == "") { + name = (po.givenName ? po.givenName + " " : ""); + name += (po.familyName ? po.familyName : ""); + } + return name.trim(); +} + function buildViewableProfileData(ecpa) { + var addedProfiles = []; viewableProfileList = []; viewableProfileByPkPemMap = {}; viewableProfileByPersonIdMap = {}; for (var i=0;i