-updates in progress
This commit is contained in:
parent
1ec0a41463
commit
1fa62cad31
5 changed files with 26 additions and 22 deletions
|
@ -318,7 +318,7 @@ def getAllFutureTasks(token):
|
|||
<br>
|
||||
"""
|
||||
|
||||
user = get_user_by_token
|
||||
user = get_user_by_token(token)
|
||||
if user is None:
|
||||
return bad_request("Bad User Token")
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ angular.module('SeHub')
|
|||
$scope.oldText = "";
|
||||
$scope.messages = [];
|
||||
$scope.userMessages = [];
|
||||
$scope.userTasks = [];
|
||||
$scope.messagesDisplay = [];
|
||||
$scope.courses = [];
|
||||
$scope.campuses = [];
|
||||
|
@ -32,7 +33,7 @@ angular.module('SeHub')
|
|||
{
|
||||
apiService.getAllUserMessages(token).success(function(data)
|
||||
{
|
||||
console.log(data);
|
||||
// console.log(data);
|
||||
$scope.userMessages = data;
|
||||
}).error(function(err)
|
||||
{
|
||||
|
@ -40,7 +41,7 @@ angular.module('SeHub')
|
|||
});
|
||||
}
|
||||
|
||||
$scope.displayMessages(); //
|
||||
// $scope.displayMessages(); //
|
||||
|
||||
$scope.addMessageClicked = function()
|
||||
{
|
||||
|
@ -64,10 +65,10 @@ angular.module('SeHub')
|
|||
}).error(function(err)
|
||||
{
|
||||
console.log("Error Below");
|
||||
console.log(err);
|
||||
console.log(err.message);
|
||||
});
|
||||
|
||||
$scope.messages.push({"text": $scope.msg.msgToAdd});
|
||||
$scope.userMessages.push({"text": $scope.msg.msgToAdd});
|
||||
$location.path('/home/');
|
||||
}
|
||||
else
|
||||
|
@ -80,13 +81,13 @@ angular.module('SeHub')
|
|||
|
||||
$scope.displayTasks = function()
|
||||
{
|
||||
apiService.getAllUserTasks(token).success(function(data) // Get all Tasks // TODO change to closest TASK
|
||||
apiService.getAllFutureTasks(token).success(function(data) // Get all Tasks // TODO change to closest TASK
|
||||
{
|
||||
$scope.tasks = data;
|
||||
$scope.userTasks = data;
|
||||
console.log(data);
|
||||
}).error(function(err)
|
||||
{
|
||||
|
||||
console.log(err.message);
|
||||
});
|
||||
|
||||
// apiService.getAllFutureTasks(token, courseId).success(function(data) // need to check courseId
|
||||
|
@ -111,7 +112,7 @@ angular.module('SeHub')
|
|||
}
|
||||
}).error(function(err)
|
||||
{
|
||||
console.log("Error: " + err.message);
|
||||
console.log(err.message);
|
||||
});
|
||||
|
||||
}
|
||||
|
@ -184,7 +185,7 @@ angular.module('SeHub')
|
|||
$scope.getCampuses(); // Get all the campuses info
|
||||
|
||||
// animation
|
||||
// $scope.displayMessages();
|
||||
$scope.displayMessages();
|
||||
$scope.displayTasks(); // Display all tasks in task feed and the latest one
|
||||
$scope.isEnterd = top.setIsEnterd;
|
||||
|
||||
|
|
|
@ -52,7 +52,6 @@ angular.module('SeHub')
|
|||
}];
|
||||
|
||||
dataService.initService($scope); //Start Data Sync Service (For User)
|
||||
console.log(data);
|
||||
if ($scope.user.isFirstLogin) {
|
||||
$scope.menuObj = {};
|
||||
$scope.isInRegisterMode = true;
|
||||
|
|
|
@ -197,8 +197,8 @@ service.factory('apiService', ['$http', function($http) {
|
|||
};
|
||||
return $http(req);
|
||||
},
|
||||
getAllFutureTasks: function(token, courseId){
|
||||
var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/tasks/getAllFutureCampusTasks/" + token + "/" + courseId;
|
||||
getAllFutureTasks: function(token){
|
||||
var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/tasks/getAllFutureTasks/" + token;
|
||||
req = {
|
||||
method: "GET",
|
||||
url: url
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
Closest Task-
|
||||
<md-card layout-margin layout-padding>
|
||||
<div>
|
||||
In Course: {{tasks[0].courseName}}
|
||||
In Course: {{userTasks[0].courseName}}
|
||||
</div>
|
||||
</md-card>
|
||||
</div>
|
||||
|
@ -101,7 +101,11 @@
|
|||
{{msg.message}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</md-card>
|
||||
</md-content>
|
||||
<!-- </div> -->
|
||||
</md-content>
|
||||
</md-tab>
|
||||
|
||||
<!-- <div flex layout="column">
|
||||
<div flex = 30 class="md-avatar" layout-padding layout-margin>
|
||||
|
@ -123,17 +127,17 @@
|
|||
</div> -->
|
||||
|
||||
|
||||
</md-card>
|
||||
</md-content>
|
||||
<!-- </div> -->
|
||||
</md-content>
|
||||
</md-tab>
|
||||
|
||||
<md-tab label="Tasks">
|
||||
<md-content class="md-padding">
|
||||
<h1 class="md-display-2">Tasks</h1>
|
||||
<md-card ng-repeat = "task in userTasks">
|
||||
<div>
|
||||
|
||||
{{task.courseName}}
|
||||
</div>
|
||||
</md-card>
|
||||
|
||||
|
||||
</md-content>
|
||||
</md-tab>
|
||||
<md-tab label="two">
|
||||
|
|
Loading…
Reference in a new issue