Skip to content

Commit

Permalink
Merge pull request #1024 from alphagov/add-office-region-organogram
Browse files Browse the repository at this point in the history
Update organogram js files to handle office region
  • Loading branch information
kentsanggds authored Dec 20, 2021
2 parents 289d21d + 7d2a386 commit dcab41f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/assets/javascripts/organograms/org-data-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ var OrgDataLoader = {
'profession' : post['Professional/Occupational Group'],
'email' : post['Contact E-mail'],
'phone' : post['Contact Phone'],
'notes' : post['Notes']
'notes' : post['Notes'],
'office_region': post['Office Region']
}
}

Expand Down Expand Up @@ -150,7 +151,8 @@ var OrgDataLoader = {
'profession_group': post['Professional/Occupational Group'],
'junior': true,
'nodeType': 'jp_child',
'type': 'junior_posts'
'type': 'junior_posts',
'office_region': post['Office Region']
}
};
}
Expand Down
4 changes: 4 additions & 0 deletions app/assets/javascripts/organograms/orgvis.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,9 @@ var Orgvis = {
if(typeof nd.phone != 'undefined'){
html += '<p class="phone"><span>Phone</span><span class="value">' + nd.phone + '</span></p>';
}
if(typeof nd.office_region != 'undefined'){
html += '<p class="office_region"><span>Office Region</span><span class="value">' + nd.office_region + '</span></p>';
}
if(typeof nd.notes != 'undefined'){
html += '<p class="notes"><span>Notes</span><span class="value">' + nd.notes + '</span></p>';
}
Expand Down Expand Up @@ -400,6 +403,7 @@ var Orgvis = {
html += '<p class="paybandRange"><span>Payband Salary Range</span><span class="value">'+nd.salaryrange+'</span></p>';
html += '<p class="reportsTo"><span>Reports To</span><span class="value">'+nd.reportsto+'</span></p>';
html += '<p class="unit"><span>Unit</span><span class="value">'+nd.unit+'</span></p>';
html += '<p class="officeRegion"><span>Office Region</span><span class="value">'+nd.office_region+'</span></p>';
html += '</div>'; // end content
html += '</div>'; // end panel
html += '<a class="close">x</a>';
Expand Down

0 comments on commit dcab41f

Please sign in to comment.