Skip to content

Commit

Permalink
show restricted label on sample requests
Browse files Browse the repository at this point in the history
  • Loading branch information
hplahar committed Mar 16, 2018
1 parent e8c8af4 commit 2c1c39d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/main/webapp/scripts/admin/adminController.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,20 @@ angular.module('ice.admin.controller', [])
}
};

$scope.getBSLLabel = function (bslValue) {
switch (bslValue) {
default:
return "";

case 1:
case 2:
return "BSL " + bslValue;

case -1:
return "RESTRICTED";
}
};

$scope.requestSamples = function () {
$scope.loadingPage = true;
var params = angular.copy($scope.params);
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/scripts/admin/sample-requests.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
ng-click="selectRequest(request)"></i>
</td>
<td class="entry-type">{{request.partData.type}}<br>
<span class="font-weight: normal">BSL {{request.partData.bioSafetyLevel}}</span></td>
<span class="font-weight: normal">{{getBSLLabel(request.partData.bioSafetyLevel)}}</span></td>
<td>
<a ng-href="entry/{{request.partData.id}}">{{request.partData.name}}</a>
<br>
Expand Down

0 comments on commit 2c1c39d

Please sign in to comment.