Skip to content

Commit

Permalink
#5 #8 #9 Corrected Issues
Browse files Browse the repository at this point in the history
  • Loading branch information
whistlinjoe committed Dec 27, 2018
1 parent 6a25c3c commit e834bc9
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 18 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ <h2 id="gapHeader"><i class="fa fa-users" aria-hidden="true"></i> Gap Analysis</
<li>
<a href="#">Tools</a>
<ul class="menu vertical">
<li><a title="View and Adjust Gap Analysis Rules" onclick="openAdjustGapRulesModal();"><i class="fa fa-cogs" aria-hidden="true"></i> View/Adjust Rules</a></li>
<!--<li><a title="View and Adjust Gap Analysis Rules" onclick="openAdjustGapRulesModal();"><i class="fa fa-cogs" aria-hidden="true"></i> View/Adjust Rules</a></li>-->
<li><a title="Edit Profile Groups" onclick="openEditGroupModal('menu');"><i class="fa fa-users" aria-hidden="true"></i> Edit Groups</a></li>
<li><a title="Print Analysis"><i class="fa fa-print" aria-hidden="true"></i> Print</a></li>
<!--<li><a title="Print Analysis"><i class="fa fa-print" aria-hidden="true"></i> Print</a></li>-->
</ul>
</li>
</ul>
Expand Down
25 changes: 14 additions & 11 deletions js/cass-ui-ga/cui-ga-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
}

Expand All @@ -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();
Expand Down
24 changes: 19 additions & 5 deletions js/cass-ui-ga/cui-ga-session-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<ecpa.length;i++) {
var po = ecpa[i];
var poPk = getPersonObjectPk(po);
if (poPk) {
var vpo = new viewableProfObj(getStringVal(po.getName()),poPk,po);
viewableProfileList.push(vpo);
viewableProfileByPkPemMap[vpo.pkPem] = vpo;
viewableProfileByPersonIdMap[po.shortId()] = vpo;
if (poPk && !addedProfiles.includes(po.getFingerprint())) {
var poName = buildPersonObjectName(po);
if (poName && poName != "") {
var vpo = new viewableProfObj(poName,poPk,po);
viewableProfileList.push(vpo);
viewableProfileByPkPemMap[vpo.pkPem] = vpo;
viewableProfileByPersonIdMap[po.shortId()] = vpo;
addedProfiles.push(po.getFingerprint());
}
}
}
viewableProfileList.sort(function (a, b) {return a.displayName.localeCompare(b.displayName);});
Expand Down

0 comments on commit e834bc9

Please sign in to comment.