course details changes done
This commit is contained in:
parent
8cea382f20
commit
6ff0427b2e
@ -1119,11 +1119,9 @@ $scope.myUnivSearch = "";
|
||||
|
||||
$scope.editId = -1;
|
||||
$scope.editCourseId = -1;
|
||||
$scope.studentViewPage=-1;
|
||||
$scope.setEditId = function (id) {
|
||||
$scope.editId = id;
|
||||
$scope.editCourseId = -1;
|
||||
$scope.studentViewPage=-1;
|
||||
}
|
||||
|
||||
$scope.setEditCourseId = function (id) {
|
||||
@ -1133,28 +1131,15 @@ $scope.myUnivSearch = "";
|
||||
// $scope.getStudentCourseDetails(id);
|
||||
$scope.editCourseId = id;
|
||||
$scope.editId = -1;
|
||||
$scope.studentViewPage=-1;
|
||||
$scope.courseEditLoading = true;
|
||||
}
|
||||
/*
|
||||
* view student page
|
||||
* created by kms
|
||||
* */
|
||||
$scope.viewStudentPage = function (id) {
|
||||
$scope.list = false;
|
||||
$scope.getStudentPageDetails(id);
|
||||
$scope.currentStudentId = id;
|
||||
$scope.studentViewPage = id;
|
||||
$scope.editId = -1;
|
||||
$scope.editCourseId = -1;
|
||||
$scope.courseEditLoading = true;
|
||||
}
|
||||
|
||||
|
||||
$scope.cancel = function () {
|
||||
$scope.getStudentList();
|
||||
$scope.editId = -1;
|
||||
$scope.editCourseId = -1;
|
||||
$scope.studentViewPage = -1;
|
||||
|
||||
}
|
||||
|
||||
$scope.cancelCourseDetails = function () {
|
||||
@ -1858,40 +1843,7 @@ $scope.myUnivSearch = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
* get student view details in management
|
||||
* created by kms
|
||||
*
|
||||
* */
|
||||
$scope.getStudentPageDetails = function (id) {
|
||||
var getcourse = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getStudentBasicInfo/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
requestedBy :id,
|
||||
requestedFrom: 1
|
||||
}
|
||||
};
|
||||
$http(getcourse).then(function (response) {
|
||||
|
||||
if (response.data.status == 200 && response.data.studentStatus== true) {
|
||||
$scope.courseEditLoading = false;
|
||||
$scope.studentDetails = response.data.studentDetails;
|
||||
$scope.courseDetails = response.data.courseDetails;
|
||||
|
||||
|
||||
} else {
|
||||
$scope.courseEditLoading = false;
|
||||
$scope.studentDetails = "";
|
||||
$scope.courseDetails = "";
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
}]);
|
||||
|
||||
@ -1932,38 +1884,106 @@ app.directive('fileUploadEdit', function () {
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
app.filter('unique', function() {
|
||||
return function(collection, primaryKey, secondaryKey) { //optional secondary key
|
||||
var output = [],
|
||||
keys = [];
|
||||
|
||||
angular.forEach(collection, function(item) {
|
||||
var key;
|
||||
secondaryKey === undefined ? key = item[primaryKey] : key = item[primaryKey][secondaryKey];
|
||||
|
||||
if(keys.indexOf(key) === -1) {
|
||||
keys.push(key);
|
||||
output.push(item);
|
||||
}
|
||||
});
|
||||
|
||||
return output;
|
||||
};
|
||||
});
|
||||
/*modal controller
|
||||
* */
|
||||
app.controller('FeesModalDemoCtrl', ["$scope", "$modal", "$log", function ($scope, $modal, $log) {
|
||||
* */
|
||||
app.controller('studentModalDemoCtrl', ["$scope", "$modal", "$log", "API_POINTS", "$http", function ($scope, $modal, $log,apiPoint,$http) {
|
||||
//Tooltip for print button
|
||||
$scope.dynamicTooltip = 'Click to View Bill Details';
|
||||
$scope.dynamicTooltip = 'Student View';
|
||||
|
||||
|
||||
|
||||
// $scope.items = ['item1', 'item2', 'item3'];
|
||||
// $scope.items = ['item1', 'item2', 'item3'];
|
||||
|
||||
$scope.FeesName="" ;
|
||||
$scope.open = function (values) {
|
||||
$scope.open = function (studentDetails) {
|
||||
|
||||
$scope.FeesName = values;
|
||||
|
||||
var modalInstance = $modal.open({
|
||||
templateUrl: 'myModalContent.html',
|
||||
controller: 'ModalInstanceCtrl',
|
||||
// size: size,
|
||||
// get student view details
|
||||
var getcourse = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getStudentBasicInfo/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
requestedBy :studentDetails.StudentID,
|
||||
requestedFrom: 1
|
||||
}
|
||||
};
|
||||
$http(getcourse).then(function (response) {
|
||||
|
||||
if (response.data.status == 200 && response.data.studentStatus== true) {
|
||||
$scope.courseEditLoading = false;
|
||||
// $scope.studentDetails = response.data.studentDetails;
|
||||
$scope.studentDetails = response.data;
|
||||
// $scope.courseDetails = response.data.courseDetails;
|
||||
var modalInstance = $modal.open({
|
||||
templateUrl: 'assets/views/student/studentDetailsModal.html',
|
||||
controller: 'ModalInstanceCtrl',
|
||||
// size: size,
|
||||
resolve: {
|
||||
items: function () {
|
||||
return $scope.studentDetails;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
modalInstance.result.then(function (selectedItem) {
|
||||
$scope.selected = selectedItem;
|
||||
}, function () {
|
||||
$log.info('Modal dismissed at: ' + new Date());
|
||||
});
|
||||
|
||||
} else {
|
||||
swal("Failed!", "This student is not registerd", "warning");
|
||||
$scope.courseEditLoading = false;
|
||||
$scope.studentDetails = "";
|
||||
$scope.courseDetails = "";
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
};
|
||||
$scope.open1 = function (values) {
|
||||
|
||||
var modalInstance1 = $modal.open({
|
||||
templateUrl: 'assets/views/student/studentPaymentModal.html',
|
||||
controller: 'ModalInstanceCtrl1',
|
||||
// size: size,
|
||||
resolve: {
|
||||
items: function () {
|
||||
return $scope.FeesName;
|
||||
items1: function () {
|
||||
return values;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
modalInstance.result.then(function (selectedItem) {
|
||||
modalInstance1.result.then(function (selectedItem) {
|
||||
$scope.selected = selectedItem;
|
||||
}, function () {
|
||||
$log.info('Modal dismissed at: ' + new Date());
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
}]);
|
||||
|
||||
// Please note that $modalInstance represents a modal window (instance) dependency.
|
||||
@ -1986,21 +2006,17 @@ app.controller('ModalInstanceCtrl', ["$scope", "$modalInstance", "items","WordsS
|
||||
|
||||
|
||||
}]);
|
||||
app.filter('unique', function() {
|
||||
return function(collection, primaryKey, secondaryKey) { //optional secondary key
|
||||
var output = [],
|
||||
keys = [];
|
||||
app.controller('ModalInstanceCtrl1', ["$scope", "$modalInstance", "items1","WordsService", function ($scope, $modalInstance, items1,WordsService) {
|
||||
|
||||
angular.forEach(collection, function(item) {
|
||||
var key;
|
||||
secondaryKey === undefined ? key = item[primaryKey] : key = item[primaryKey][secondaryKey];
|
||||
$scope.items1 = items1;
|
||||
|
||||
if(keys.indexOf(key) === -1) {
|
||||
keys.push(key);
|
||||
output.push(item);
|
||||
}
|
||||
});
|
||||
|
||||
return output;
|
||||
$scope.ok = function () {
|
||||
$modalInstance.close($scope.selected.item);
|
||||
};
|
||||
});
|
||||
|
||||
$scope.cancel = function () {
|
||||
$modalInstance.dismiss('cancel');
|
||||
};
|
||||
|
||||
|
||||
}]);
|
||||
Loading…
Reference in New Issue
Block a user