Advertisement
Guest User

Untitled

a guest
Feb 12th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. <div class="panel-heading">
  2. <div style="display: inline-block; margin-right: 10px;">Career Development <a style="margin-left: 10px;" href="" ng-click="showHome();"><span class="glyphicon glyphicon-home"></span></a></div>
  3. {{isManagerViewingTasks()}}
  4. <div class="dropdown" style="display: inline-block;" ng-show="isManagerViewingTasks()">
  5. <button class="btn btn-default btn-sm dropdown-toggle" type="button">
  6. <span class="caret"></span>
  7. </button>
  8. <ul class="dropdown-menu">
  9. <li ng-repeat="task in managerTasks" ng-click="selectCurrentManagerTask(task)"><a href="">{{task.Name + "'s " + programLevels[task.ApplicationLevel].levelText + " Application"}}</a></li>
  10. </ul>
  11. </div>
  12. </div>
  13.  
  14. $scope.isManagerViewingTasks() {
  15. if (this.scope.newApplication) {
  16. console.log("isManagerViewingTasks");
  17. console.log(this.scope.newApplication.EmpNo);
  18. console.log(this.rootScope.currentUser.EmployeeID);
  19. console.log(this.scope.newApplication.EmpNo !== this.rootScope.currentUser.EmployeeID);
  20. console.log("hasDirectReports");
  21. console.log(this.scope.hasDirectReports);
  22. console.log("selectedEmployee is currentUser");
  23. console.log(this.rootScope.currentUser.EmployeeID === this.rootScope.selectedEmployee.EmployeeID);
  24. console.log("final result");
  25. console.log(typeof ((this.scope.newApplication.EmpNo !== this.rootScope.currentUser.EmployeeID) && this.scope.hasDirectReports && (this.rootScope.currentUser.EmployeeID === this.rootScope.selectedEmployee.EmployeeID)));
  26. console.log(((this.scope.newApplication.EmpNo !== this.rootScope.currentUser.EmployeeID) && this.scope.hasDirectReports && (this.rootScope.currentUser.EmployeeID === this.rootScope.selectedEmployee.EmployeeID)));
  27. return ((this.scope.newApplication.EmpNo !== this.rootScope.currentUser.EmployeeID) && this.scope.hasDirectReports && (this.rootScope.currentUser.EmployeeID === this.rootScope.selectedEmployee.EmployeeID));
  28. } else {
  29. return false;
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement