From e728c4967205f977538a628942286f55715ab172 Mon Sep 17 00:00:00 2001 From: shehan peruma Date: Mon, 24 Apr 2017 13:27:13 -0400 Subject: [PATCH] show interjections based on role --- client/js/group-chat-controller.js | 79 ++++++++++++++++++------------ 1 file changed, 48 insertions(+), 31 deletions(-) diff --git a/client/js/group-chat-controller.js b/client/js/group-chat-controller.js index 06d7bdc..7c20837 100644 --- a/client/js/group-chat-controller.js +++ b/client/js/group-chat-controller.js @@ -28,8 +28,10 @@ $scope.messages = []; $scope.currentCard = ''; $scope.currentCommunicating = ''; + $scope.roleInterpreter=''; + $scope.roleCaptionist=''; - + console.log('User Role:'+AuthService.authenticatedUser().roleID); document.getElementById("overlayScreen").style.width = "100%"; document.getElementById("overlayScreen").style.height = "100%"; @@ -38,42 +40,57 @@ $scope.groupMembers = response.data.users; $scope.groupMembers.sort(compare); - $http.get('services/card/get-cards-for-group', {params: {GroupId: $scope.groupID}}) + $http.get('services/role/get-all-roles', {params: {GroupId: $scope.groupID}}) .then(function (response) { - $scope.groupCards = response.data.cards; - - $http.get('services/group/get-group-by-id', {params: {GroupId: $scope.groupID}}) + for(var r=0; r