course details changes done
This commit is contained in:
parent
2b90e903bd
commit
076b2d4dfe
@ -24,11 +24,24 @@ app.controller("activityCtrl", ["$scope", "toaster", "$filter", "API_POINTS", "$
|
|||||||
|
|
||||||
$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,
|
||||||
@ -127,6 +140,7 @@ swal("Warning!", "Status are required", "warning");
|
|||||||
$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',
|
||||||
@ -165,6 +179,8 @@ swal("Warning!", "Status are required", "warning");
|
|||||||
$scope.statusList.push($scope.statusData);
|
$scope.statusList.push($scope.statusData);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
localStorage.setItem('localStatusDetails', JSON.stringify($scope.statusList));
|
||||||
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user