enrollment pending document updation : kdk
This commit is contained in:
parent
67d09fafcc
commit
abff1cc1f7
@ -134,6 +134,7 @@ $route['getListofStuDocDetails'] = 'Student_Controller/getListofStuDocDetails';
|
|||||||
$route['deleteStuDocDetails'] = 'Student_Controller/deleteStuDocDetails';
|
$route['deleteStuDocDetails'] = 'Student_Controller/deleteStuDocDetails';
|
||||||
$route['getListofStuPendingDocDetails'] = 'Student_Controller/getListofStuPendingDocDetails';
|
$route['getListofStuPendingDocDetails'] = 'Student_Controller/getListofStuPendingDocDetails';
|
||||||
$route['addStudentEnrollPendingDocDetails'] = 'Student_Controller/addStudentEnrollPendingDocDetails';
|
$route['addStudentEnrollPendingDocDetails'] = 'Student_Controller/addStudentEnrollPendingDocDetails';
|
||||||
|
$route['deleteDocPendingDetails'] = 'Student_Controller/deleteDocPendingDetails';
|
||||||
|
|
||||||
//batch
|
//batch
|
||||||
$route['addBatchDetails'] = 'Batch_Controller/addBatchDetails';
|
$route['addBatchDetails'] = 'Batch_Controller/addBatchDetails';
|
||||||
|
|||||||
@ -366,6 +366,29 @@ class Student_Controller extends REST_Controller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// delete pending enrollment document details
|
||||||
|
public function deleteDocPendingDetails_post() {
|
||||||
|
$expID = $this->post('exceptId');
|
||||||
|
$localData = $this->post('localData');
|
||||||
|
// echo $expID;
|
||||||
|
// print_r($localData);exit();
|
||||||
|
$stuEnrollPendingDocDeleteDetails = $this->student_model->deleteStu_entrollPending_doc_details($expID);
|
||||||
|
if ($stuEnrollPendingDocDeleteDetails)
|
||||||
|
{
|
||||||
|
$stuEnrollPendingDocDeleteDetails['status'] = REST_Controller::HTTP_OK;
|
||||||
|
// Set the response and exit
|
||||||
|
$this->response($stuEnrollPendingDocDeleteDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Set the response and exit
|
||||||
|
$this->response([
|
||||||
|
'message' => 'No users were found',
|
||||||
|
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||||
|
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function updateStudentImgDetails_post() {
|
public function updateStudentImgDetails_post() {
|
||||||
|
|
||||||
$imagename = $_FILES['idStuUpProof']['name'];
|
$imagename = $_FILES['idStuUpProof']['name'];
|
||||||
@ -640,7 +663,7 @@ class Student_Controller extends REST_Controller {
|
|||||||
|
|
||||||
$reqCourse['UniversityID'] = $coursedata['university'];
|
$reqCourse['UniversityID'] = $coursedata['university'];
|
||||||
$reqCourse['CourseID'] = $coursedata['course'];
|
$reqCourse['CourseID'] = $coursedata['course'];
|
||||||
$reqCourse['BatchCode'] = $coursedata['batch'];
|
$reqCourse['SessionID'] = $coursedata['batch'];
|
||||||
$reqCourse['DOJ'] = $coursedata['dateofjoining'];
|
$reqCourse['DOJ'] = $coursedata['dateofjoining'];
|
||||||
$reqCourse['BranchID'] = $createdBranch;
|
$reqCourse['BranchID'] = $createdBranch;
|
||||||
$reqCourse['IsActive'] = $data['switchsetting'];
|
$reqCourse['IsActive'] = $data['switchsetting'];
|
||||||
@ -712,7 +735,7 @@ class Student_Controller extends REST_Controller {
|
|||||||
|
|
||||||
$reqCourse['UniversityID'] = $coursedata['university'];
|
$reqCourse['UniversityID'] = $coursedata['university'];
|
||||||
$reqCourse['CourseID'] = $coursedata['course'];
|
$reqCourse['CourseID'] = $coursedata['course'];
|
||||||
$reqCourse['BatchCode'] = $coursedata['batch'];
|
$reqCourse['SessionID'] = $coursedata['batch'];
|
||||||
$reqCourse['DOJ'] = $coursedata['dateofjoining'];
|
$reqCourse['DOJ'] = $coursedata['dateofjoining'];
|
||||||
$reqCourse['BranchID'] = $createdBranch;
|
$reqCourse['BranchID'] = $createdBranch;
|
||||||
$reqCourse['IsActive'] = $data['switchsetting'];
|
$reqCourse['IsActive'] = $data['switchsetting'];
|
||||||
|
|||||||
@ -1030,6 +1030,20 @@ class Student_model extends CI_Model
|
|||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function deleteStu_entrollPending_doc_details($id) {
|
||||||
|
// echo $id;exit();
|
||||||
|
$sql = "DELETE FROM ".STUDENTDOCUMENTTRACKDETAILS." WHERE ID = '" . $id . "'";
|
||||||
|
if ($this->db->query($sql)) {
|
||||||
|
$results['deleteStatus'] = true;
|
||||||
|
$results['message'] = 'Document pending track details deleted.';
|
||||||
|
} else {
|
||||||
|
$results['deleteStatus'] = false;
|
||||||
|
$results['message'] = 'Something went wrong.please try again';
|
||||||
|
}
|
||||||
|
return $results;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// update student personal details
|
// update student personal details
|
||||||
|
|
||||||
public function update_student($empArr, $updateFor, $imagename, $imageSource, $size)
|
public function update_student($empArr, $updateFor, $imagename, $imageSource, $size)
|
||||||
|
|||||||
@ -180,7 +180,7 @@ $scope.dayBookApprovalAccess = '';
|
|||||||
"description": "",
|
"description": "",
|
||||||
"paidTo": "",
|
"paidTo": "",
|
||||||
"description_paid": "",
|
"description_paid": "",
|
||||||
"voucherNumber": ""
|
"voucherNumber": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -709,9 +709,23 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
|||||||
}
|
}
|
||||||
|
|
||||||
$scope.getChangeDate = function () {
|
$scope.getChangeDate = function () {
|
||||||
var formate = "dd-MM-yyyy";
|
// alert();
|
||||||
$scope.myModel.dateofbirth = $filter('date')(new Date($scope.myModel.dateofbirth), formate);
|
try {
|
||||||
|
var formate = "dd-MM-yyyy";
|
||||||
|
$scope.myModel.dateofbirth = $filter('date')(new Date($scope.myModel.dateofbirth), formate);
|
||||||
|
// alert($scope.myModel.dateofbirth);
|
||||||
|
// var myDate = new Date($scope.myModel.dateofbirth);
|
||||||
|
// alert(myDate);
|
||||||
|
// if(typeof myDate === 'function') {
|
||||||
|
// alert("true")
|
||||||
|
// } else {
|
||||||
|
// alert("error")
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
catch(e) {
|
||||||
|
// alert('error');
|
||||||
|
// alert(err);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// add student
|
// add student
|
||||||
@ -736,10 +750,11 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
|||||||
} else {
|
} else {
|
||||||
$scope.disableButton = true;
|
$scope.disableButton = true;
|
||||||
var formate = "dd-MM-yyyy";
|
var formate = "dd-MM-yyyy";
|
||||||
|
// $scope.myModel.dateofbirth = $filter('date')(new Date($scope.myModel.dateofbirth), formate);
|
||||||
$scope.myModel.switchsetting = $scope.myModel.switchsetting === true ? 1 : 0;
|
$scope.myModel.switchsetting = $scope.myModel.switchsetting === true ? 1 : 0;
|
||||||
$scope.myModelCourseAdd.dateofjoining = $filter('date')(new Date($scope.myModelCourseAdd.dateofjoining), formate);
|
$scope.myModelCourseAdd.dateofjoining = $filter('date')(new Date($scope.myModelCourseAdd.dateofjoining), formate);
|
||||||
var idStuProof = $scope.files[0];
|
var idStuProof = $scope.files[0];
|
||||||
|
// alert(JSON.stringify($scope.myModel));
|
||||||
if (idStuProof !== undefined) {
|
if (idStuProof !== undefined) {
|
||||||
var formData = new FormData();
|
var formData = new FormData();
|
||||||
var idProof = $scope.files[0];
|
var idProof = $scope.files[0];
|
||||||
@ -1042,7 +1057,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.PendingDocNotFound = false;
|
// $scope.PendingDocNotFound = false;
|
||||||
// student pending document details
|
// student pending document details
|
||||||
$scope.getStudentPendingEntrolDocDetails = function(stuId) {
|
$scope.getStudentPendingEntrolDocDetails = function(stuId) {
|
||||||
// $scope.studentDocumentsList = '';
|
// $scope.studentDocumentsList = '';
|
||||||
@ -1060,10 +1075,10 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
|||||||
};
|
};
|
||||||
$http(getStudentPendingDocDetails).then(function (response) {
|
$http(getStudentPendingDocDetails).then(function (response) {
|
||||||
if (response.data.PendingDocListStatus == true) {
|
if (response.data.PendingDocListStatus == true) {
|
||||||
$scope.PendingDocNotFound = false;
|
// $scope.PendingDocNotFound = false;
|
||||||
$scope.studentPendingDocumentsDetails = response.data.student_pending_doc_details;
|
$scope.studentPendingDocumentsDetails = response.data.student_pending_doc_details;
|
||||||
} else {
|
} else {
|
||||||
$scope.PendingDocNotFound = true;
|
// $scope.PendingDocNotFound = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -1073,10 +1088,12 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
|||||||
"documentDetails": "",
|
"documentDetails": "",
|
||||||
"checkTracking": false
|
"checkTracking": false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$scope.documentTrackAddDetailsLoading = false;
|
||||||
|
|
||||||
$scope.studentEntrollPendingDocFORM = {
|
$scope.studentEntrollPendingDocFORM = {
|
||||||
submit: function (form, myModelAddPendingDocDetails, stuID) {
|
submit: function (form, myModelAddPendingDocDetails, stuID) {
|
||||||
|
$scope.documentTrackAddDetailsLoading = true;
|
||||||
var firstError = null;
|
var firstError = null;
|
||||||
if (form.$invalid) {
|
if (form.$invalid) {
|
||||||
var field = null, firstError = null;
|
var field = null, firstError = null;
|
||||||
@ -1112,12 +1129,14 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
|||||||
$http(updateStudentPendingDocDetails).then(function (response) {
|
$http(updateStudentPendingDocDetails).then(function (response) {
|
||||||
if (response.data.AddStuPendingDocStatus == true) {
|
if (response.data.AddStuPendingDocStatus == true) {
|
||||||
$scope.getStudentPendingEntrolDocDetails(stuID);
|
$scope.getStudentPendingEntrolDocDetails(stuID);
|
||||||
|
$scope.documentTrackAddDetailsLoading = false;
|
||||||
$scope.myModelAddPendingDocDetails = {
|
$scope.myModelAddPendingDocDetails = {
|
||||||
"documentDetails": "",
|
"documentDetails": "",
|
||||||
"checkTracking": false
|
"checkTracking": false
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
swal(" ", res.data.message, "error");
|
swal(" ", res.data.message, "error");
|
||||||
|
$scope.documentTrackAddDetailsLoading = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -1130,27 +1149,45 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$scope.deletePendingDocDetails = function(details, StuID, Url) {
|
||||||
|
// alert(JSON.stringify(details));
|
||||||
|
|
||||||
$scope.printPdf = function (file_Uid){
|
SweetAlert.swal({
|
||||||
alert(file_Uid);
|
title: "Warning!",
|
||||||
$http({
|
text: "Want to Delete this Entry ?",
|
||||||
url : 'http://localhost/apollo_New_Update_20_02_2018/apollodec/Apollo/images/'+ file_Uid,
|
type: "warning",
|
||||||
method : 'GET',
|
showCancelButton: true,
|
||||||
headers : {
|
confirmButtonColor: "#007aff",
|
||||||
'Content-type' : 'application/pdf'
|
confirmButtonText: "Yes!"
|
||||||
},
|
}, function (res) {
|
||||||
responseType : 'arraybuffer'
|
if (res === true) {
|
||||||
}).success(function(data, status, headers, config) {
|
$scope.documentTrackAddDetailsLoading = true;
|
||||||
var pdfFile = new Blob([ data ], {
|
var deleteDocEntry = {
|
||||||
type : 'application/pdf'
|
method: 'POST',
|
||||||
});
|
url: apiPoint.url + 'deleteDocPendingDetails/',
|
||||||
var pdfUrl = URL.createObjectURL(pdfFile);
|
headers: {
|
||||||
var printwWindow = $window.open(pdfUrl);
|
'Content-Type': 'application/json'
|
||||||
// printwWindow.print();
|
},
|
||||||
}).error(function(data, status, headers, config) {
|
data: {
|
||||||
alert('Sorry, something went wrong')
|
exceptId: details.ID,
|
||||||
|
localData: localDetail
|
||||||
|
}
|
||||||
|
};
|
||||||
|
$http(deleteDocEntry).then(function (response) {
|
||||||
|
if (response.data.deleteStatus == true) {
|
||||||
|
// swal("Success!", response.data.message, "success");
|
||||||
|
$scope.documentTrackAddDetailsLoading = false;
|
||||||
|
$scope.studentDocumentsList = '';
|
||||||
|
$scope.getStudentPendingEntrolDocDetails(StuID);
|
||||||
|
} else {
|
||||||
|
swal(" ", res.data.message, "error");
|
||||||
|
$scope.documentTrackAddDetailsLoading = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
// end : entrollment document upload ====================================
|
// end : entrollment document upload ====================================
|
||||||
|
|
||||||
|
|||||||
@ -147,7 +147,9 @@
|
|||||||
<td class="center" ng-if="p.Status != 'Pending' && p.ListName != 'Income' ">-</td>
|
<td class="center" ng-if="p.Status != 'Pending' && p.ListName != 'Income' ">-</td>
|
||||||
<td class="center" ng-if="p.ListName == 'Income' ">
|
<td class="center" ng-if="p.ListName == 'Income' ">
|
||||||
<span ng-if=" p.PaymentStatus == 1 "> <i tooltip="EDIT" class="glyphicon glyphicon-pencil" ng-click="setEditId(p.ID)"></i> </span>
|
<span ng-if=" p.PaymentStatus == 1 "> <i tooltip="EDIT" class="glyphicon glyphicon-pencil" ng-click="setEditId(p.ID)"></i> </span>
|
||||||
<span ng-if=" p.PaymentStatus == 0 "> <i tooltip="DELETE" class="glyphicon glyphicon-remove" ng-click="deleteFeePayableEntry(p.ID)"></i> </span>
|
<span ng-if=" p.PaymentStatus == 0 ">
|
||||||
|
<!--<i tooltip="DELETE" class="glyphicon glyphicon-remove" ng-click="deleteFeePayableEntry(p.ID)"></i> -->
|
||||||
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="center" ng-if="p.Status == 'Pending'">
|
<td class="center" ng-if="p.Status == 'Pending'">
|
||||||
<span> <i tooltip="EDIT" class="glyphicon glyphicon-pencil" ng-click="setEditId(p.ID)"></i> </span>
|
<span> <i tooltip="EDIT" class="glyphicon glyphicon-pencil" ng-click="setEditId(p.ID)"></i> </span>
|
||||||
|
|||||||
@ -481,7 +481,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</tab>
|
</tab>
|
||||||
<!--<tab heading="Pending Document Details">
|
<tab heading="Pending Document Details">
|
||||||
<fieldset style="background-color: #eaeaea;">
|
<fieldset style="background-color: #eaeaea;">
|
||||||
<legend>
|
<legend>
|
||||||
Pending Document Details
|
Pending Document Details
|
||||||
@ -492,13 +492,13 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6 form-group" ng-class="{'has-error':FormPendDoc.documentDetails.$dirty && FormPendDoc.documentDetails.$invalid, 'has-success':FormPendDoc.documentDetails.$valid}">
|
<div class="col-md-6 form-group" ng-class="{'has-error':FormPendDoc.documentDetails.$dirty && FormPendDoc.documentDetails.$invalid, 'has-success':FormPendDoc.documentDetails.$valid}">
|
||||||
<label>
|
<label>
|
||||||
Document Details <span
|
Pending Document Details <span
|
||||||
class="symbol required"></span>
|
class="symbol required"></span>
|
||||||
</label>
|
</label>
|
||||||
<textarea type="text" placeholder="Document Details" tabindex="1" class="form-control" name="documentDetails" ng-model="myModelAddPendingDocDetails.documentDetails"
|
<textarea type="text" placeholder="Document Details" tabindex="1" class="form-control" name="documentDetails" ng-model="myModelAddPendingDocDetails.documentDetails"
|
||||||
maxlength="100" required/>
|
maxlength="100" required/>
|
||||||
<span class="text-small block" style="color: rgba(128, 128, 128, 0.64)">Max 100 Characters.</span>
|
<span class="text-small block" style="color: rgba(128, 128, 128, 0.64)">Max 100 Characters.</span>
|
||||||
<span class="error text-small block" ng-if="FormPendDoc.documentDetails.$dirty && FormPendDoc.documentDetails.$invalid" ng-hide="FormPendDoc.documentDetails.$error.maxlength || FormPendDoc.documentDetails.$error.minlength || FormPendDoc.documentDetails.$error.pattern">Document Name is required.</span>
|
<span class="error text-small block" ng-if="FormPendDoc.documentDetails.$dirty && FormPendDoc.documentDetails.$invalid" ng-hide="FormPendDoc.documentDetails.$error.maxlength || FormPendDoc.documentDetails.$error.minlength || FormPendDoc.documentDetails.$error.pattern">Pending Document Details required.</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3 form-group">
|
<div class="col-md-3 form-group">
|
||||||
@ -535,7 +535,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="center">
|
<div class="center">
|
||||||
<h5 ng-show="documentAddDetailsLoading" style="color:#007AFF">Loading...</h5>
|
<h5 ng-show="documentTrackAddDetailsLoading" style="color:#007AFF">Loading...</h5>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -554,9 +554,12 @@
|
|||||||
<tbody ng-repeat="penddoc in studentPendingDocumentsDetails">
|
<tbody ng-repeat="penddoc in studentPendingDocumentsDetails">
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{penddoc.Details}}</td>
|
<td>{{penddoc.Details}}</td>
|
||||||
<td>{{penddoc.Status}}</td>
|
<td>
|
||||||
|
<span ng-if="penddoc.Status == 1">Open</span>
|
||||||
|
<span ng-if="penddoc.Status == 0">Close</span>
|
||||||
|
</td>
|
||||||
<td class="center">
|
<td class="center">
|
||||||
<button tooltip="Delete" class="btn btn-xs btn-danger" ng-click="deleteDocDetails(doc.ID, p.StudentID)">
|
<button tooltip="Delete" class="btn btn-xs btn-danger" ng-click="deletePendingDocDetails(penddoc, p.StudentID)">
|
||||||
<i class="ti-trash"></i></button>
|
<i class="ti-trash"></i></button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -567,7 +570,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</tab>-->
|
</tab>
|
||||||
</tabset>
|
</tabset>
|
||||||
</tab>
|
</tab>
|
||||||
</tabset>
|
</tabset>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user