Tasks Page In The Making
This commit is contained in:
parent
54360f3782
commit
87b19b2255
2 changed files with 36 additions and 38 deletions
|
@ -6,24 +6,13 @@ angular.module('SeHub')
|
||||||
$rootScope.seToken = $cookies['com.sehub.www'];
|
$rootScope.seToken = $cookies['com.sehub.www'];
|
||||||
var token = $rootScope.seToken;
|
var token = $rootScope.seToken;
|
||||||
|
|
||||||
$scope.createTaskClicked = function() {
|
$scope.user = $scope.$parent.user;
|
||||||
$location.path("/tasks/new"); // Reference to 'newTask' page
|
apiService.getAllUserTasks(token).success(function(data) {
|
||||||
}
|
$scope.tasks = data;
|
||||||
|
|
||||||
$scope.displayTasks = function() {
|
|
||||||
apiService.getAllFutureTasks(token).success(function(data) // Get all Tasks // TODO change to closest TASK
|
|
||||||
{
|
|
||||||
$scope.lecturerTasks = data;
|
|
||||||
console.log(data);
|
console.log(data);
|
||||||
}).error(function(err) {
|
}).error(function(err) {
|
||||||
console.log(err.message);
|
console.log(err.message);
|
||||||
});
|
});
|
||||||
}
|
|
||||||
$scope.gotoTask = function(taskId) {
|
|
||||||
$location.path('/tasks/fill/' + taskId);
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.displayTasks(); // Calling tasks with task id
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,9 +9,9 @@
|
||||||
<div ng-if='!loading'>
|
<div ng-if='!loading'>
|
||||||
<md-content layout-padding>
|
<md-content layout-padding>
|
||||||
<md-tabs md-dynamic-height md-border-bottom>
|
<md-tabs md-dynamic-height md-border-bottom>
|
||||||
<md-tab label="Class Name">
|
<md-tab label="{{class.courseName}}" ng-repeat="class in tasks">
|
||||||
<md-content class="md-padding">
|
<md-content class="md-padding">
|
||||||
<h1 class="md-display-2">Class Name Tasks</h1>
|
<h1 class="md-display-2">{{class.courseName}} Tasks</h1>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div layout='row' layout-align="center center">
|
<div layout='row' layout-align="center center">
|
||||||
|
@ -61,30 +61,39 @@
|
||||||
<div layout='row' style='width:100%'>
|
<div layout='row' style='width:100%'>
|
||||||
<div layout='row' style='width:100%'>
|
<div layout='row' style='width:100%'>
|
||||||
<div class="Personal" style='width:100%' >
|
<div class="Personal" style='width:100%' >
|
||||||
|
<div layout='column' ng-repeat="personalTask in class.PersonalTasks">
|
||||||
|
<div>
|
||||||
<md-button style='width: 100%' layout='row'>
|
<md-button style='width: 100%' layout='row'>
|
||||||
<div>
|
<div>
|
||||||
Personal Task name
|
{{personalTask.title}}
|
||||||
</div>
|
</div>
|
||||||
<div class='spacer'></div>
|
<div class='spacer'></div>
|
||||||
<div> 3 / 70 </div>
|
<div ng-if='user.id === class.master_id'> {{personalTask.submitted.done}} / {{personalTask.submitted.total}} </div>
|
||||||
|
<div ng-if='user.id !== class.master_id'> {{personalTask.grade.grade || "Not Yet Reviewed"}} </div>
|
||||||
</div>
|
</div>
|
||||||
</md-button>
|
</md-button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style='padding: 0px 5px 0px 5px; margin-top: auto; margin-bottom: auto'>
|
<div style='padding: 0px 5px 0px 5px; margin-top: auto; margin-bottom: auto'>
|
||||||
|
|
|
||||||
</div>
|
</div>
|
||||||
<div class="Project" style='width:100%'>
|
<div class="Project" style='width:100%'>
|
||||||
|
<div layout='column' ng-repeat="projectTask in class.projectTasks">
|
||||||
|
|
||||||
<md-button style='width: 100%' layout='row'>
|
<md-button style='width: 100%' layout='row'>
|
||||||
<div>
|
<div>
|
||||||
Project Task name
|
{{projectTask.title}}
|
||||||
</div>
|
</div>
|
||||||
<div class='spacer'></div>
|
<div class='spacer'></div>
|
||||||
<div> 3 / 70 </div>
|
<div ng-if='user.id === class.master_id'> {{projectTask.submitted.done}} / {{projectTask.submitted.total}} </div>
|
||||||
|
<div ng-if='user.id !== class.master_id'> {{projectTask.grade.grade || "Not Yet Reviewed"}} </div>
|
||||||
</div>
|
</div>
|
||||||
</md-button>
|
</md-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue