course details changes done
This commit is contained in:
parent
52f7f93092
commit
6ba2d82599
@ -32,6 +32,7 @@ app.controller("studentStatusUpdateCtrl", ["$scope", "toaster", "$filter", "API_
|
|||||||
$scope.loader = '';
|
$scope.loader = '';
|
||||||
$scope.emptyData = '';
|
$scope.emptyData = '';
|
||||||
$scope.init = function () {
|
$scope.init = function () {
|
||||||
|
localStorage.setItem('localStatusDetails', '');
|
||||||
var getActivity = {
|
var getActivity = {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: apiPoint.url + 'getDefaultActivityDetails/',
|
url: apiPoint.url + 'getDefaultActivityDetails/',
|
||||||
@ -70,6 +71,8 @@ app.controller("studentStatusUpdateCtrl", ["$scope", "toaster", "$filter", "API_
|
|||||||
$scope.statusList.push($scope.statusData);
|
$scope.statusList.push($scope.statusData);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
localStorage.setItem('localStatusDetails', JSON.stringify($scope.statusList));
|
||||||
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -82,11 +85,23 @@ app.controller("studentStatusUpdateCtrl", ["$scope", "toaster", "$filter", "API_
|
|||||||
|
|
||||||
$scope.editId = -1;
|
$scope.editId = -1;
|
||||||
$scope.setEditId = function (p) {
|
$scope.setEditId = function (p) {
|
||||||
|
$scope.localStatusDetails="";
|
||||||
|
$scope.localStatusDetails = JSON.parse(localStorage.getItem('localStatusDetails'));
|
||||||
|
|
||||||
$scope.editId = p.ActivityID;
|
$scope.editId = p.ActivityID;
|
||||||
$scope.editStatusList = [];
|
$scope.editStatusList = [];
|
||||||
angular.forEach(p.statusDetails, function (values, keys) {
|
angular.forEach(p.statusDetails, function (values, keys) {
|
||||||
|
|
||||||
$scope.editStatusList.push(values.ListCode);
|
$scope.editStatusList.push(values.ListCode);
|
||||||
|
$scope.editData = {
|
||||||
|
name: values.ListName,
|
||||||
|
id: values.ListCode
|
||||||
|
};
|
||||||
|
var subresult = $filter('filter')($scope.localStatusDetails, $scope.editData);
|
||||||
|
if(subresult.length==0){
|
||||||
|
|
||||||
|
$scope.localStatusDetails.push($scope.editData);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
$scope.viewEditStatus = {
|
$scope.viewEditStatus = {
|
||||||
list: $scope.editStatusList,
|
list: $scope.editStatusList,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user