First 3 In Screen

This commit is contained in:
Sanjeev 2020-11-28 17:37:53 +05:30
parent 83ca018a9d
commit d8dadce072
8 changed files with 67 additions and 37 deletions

View File

@ -16,17 +16,19 @@ class Fees_status_model extends CI_Model
* */
public function getStudentList($search=null)
{
if($search['MobileNumber']!='' OR $search['Firstname']!='' OR $search['UniversityID']!='' OR $search['CourseID']!=''){
$this->db->select('ST.StudentID,ST.MobileNumber,ST.Firstname,ST.Lastname,ST.Fathername,ST.EmailID,STC.ID,US.UniversityID,US.UniversityName,CU.CourseID,CU.CourseName,ST.PermanentAddress,if(STC.EnrollmentID = "","",STC.EnrollmentID) as EnrollmentID,US.ProfilePicPath,US.MobileNumber as UnivMobileNumber,US.Address,US.EmailID,ST.MotherName,CU.Specilization1 as Specilization');
if($search['MobileNumber']!='' OR $search['Firstname']!='' OR $search['UniversityID']!='' OR $search['CourseID']!='' OR $search['BatchCode']!=''){
$this->db->select('ST.StudentID,ST.MobileNumber,ST.Firstname,ST.Lastname,ST.Fathername,ST.EmailID,STC.ID,US.UniversityID,US.UniversityName,CU.CourseID,CU.CourseName,ST.PermanentAddress,if(STC.EnrollmentID = "","",STC.EnrollmentID) as EnrollmentID,US.ProfilePicPath,US.MobileNumber as UnivMobileNumber,US.Address,US.EmailID,ST.MotherName,CU.Specilization1 as Specilization,BA.BatchCode,BA.BatchName');
$this->db->from(STUDENTS.' as ST');
$this->db->join(STUDENTCOURSE.' as STC', 'STC.StudentID = ST.StudentID');
$this->db->join(COURSE.' as CU', 'CU.CourseID = STC.CourseID');
// $this->db->join(SESSIONMASTER.' as SM', 'SM.SessionID = STC.SessionID');
$this->db->join(UNIVERSITY.' as US', 'US.UniversityID = CU.UniversityID');
$this->db->join(BATCH.' as BA', 'BA.UniversityID = US.UniversityID');
$this->db->where('ST.IsActive','1');
$this->db->where('STC.IsActive','1');
if($search['requestedBranch']!='All'){
$this->db->where('STC.BranchID',$search['requestedBranch']);
$this->db->where('STC.BranchID',$search['requestedBranch']);
$this->db->where('US.BranchCode',$search['requestedBranch']);
$this->db->where('CU.BranchCode',$search['requestedBranch']);
}
@ -43,6 +45,9 @@ class Fees_status_model extends CI_Model
if($search['CourseID']!=''){
$this->db->where('STC.CourseID',$search['CourseID']);
}
if($search['BatchCode']!=''){
$this->db->where('BA.BatchCode',$search['BatchCode']);
}
/* if($search['MobileNumber']!='' AND $search['Firstname']==''){
$this->db->where('ST.MobileNumber',$search['MobileNumber']);
}
@ -734,7 +739,7 @@ class Fees_status_model extends CI_Model
* */
public function getUniversityDetails($requestedBy=null,$requestedBranch=null)
{
$this->db->select('UniversityID,UniversityName');
$this ->db->select('UniversityID,UniversityName');
$this->db->where('IsActive','1');
$this->db->where('BranchCode',$requestedBranch);
$this->db->order_by('CreatedOn','DESC');
@ -749,6 +754,7 @@ class Fees_status_model extends CI_Model
$university_array['universityID'] = $row->UniversityID;
$university_array['universityName'] = $row->UniversityName;
$university_array['courseDetails']= $this->getCourseDetails($row->UniversityID,$requestedBranch);
$university_array['batchDetails']= $this->getBatch($row->UniversityID,$requestedBranch);
$result_array[]=$university_array;
}
$result_university['univerSityDetails']= $result_array;
@ -759,6 +765,7 @@ class Fees_status_model extends CI_Model
$result_university['universityID'] = "";
$result_university['universityName'] = "";
$result_university['courseDetails']= "";
$result_university['batchDetails']="";
}
@ -2373,4 +2380,15 @@ $REGID='';
}
}
public function getBatch($universityID=null,$br=null)
{
$this->db->select('BatchCode,BatchName,str_to_date(BatchDate, "%d-%m-%Y") BatchDate');
$this->db->where('UniversityID',$universityID);
//$this->db->where('IsActive','1');
$this->db->where('BranchCode',$br);
$this->db->order_by('BatchDate','DESC');
$batchDetails = $this->db->get(BATCH);
return $batchDetails->result();
}
}

View File

@ -55,6 +55,7 @@ class Fees_Status_Controller extends REST_Controller {
* */
public function getStudentList_post()
{
echo "i am here";die();
$search['requestedBy'] = $this->post('requestedtBy');
$search['Firstname'] = $this->post('studentName');
$search['MobileNumber'] = $this->post('mobileNumber');
@ -62,6 +63,7 @@ class Fees_Status_Controller extends REST_Controller {
$search['CourseID'] = $this->post('course');
$search['requestedDept'] = $this->post('requestedDept');
$search['requestedBranch'] = $this->post('branchId');
$search['BatchCode'] = $this->post('batch');
$getStudentDetails = $this->Fees_model->getStudentList($search);
if ($getStudentDetails)
{

View File

@ -8,6 +8,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
"studentName": "",
"mobileNumber": "",
"universityName":"",
"batch":"",
"courseName":""
};
// bill date restrict
@ -197,6 +198,7 @@ console.log($scope.paymentOptions);
mobileNumber: myModel.mobileNumber,
university: $scope.univId,
course:myModel.courseName,
batch:myModel.batch,
requestedtBy: JSON.parse(sessionStorage.getItem('localObj')).localUserID,
branchId: JSON.parse(sessionStorage.getItem('localObj')).localBranchID,
requestedDept: JSON.parse(sessionStorage.getItem('localObj')).localType,

View File

@ -135,8 +135,8 @@
<th ng-click="sort('Firstname')">First Name
<span class="glyphicon sort-icon" ng-show="sortKey=='Firstname'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th ng-click="sort('Lastname')">Last Name
<span class="glyphicon sort-icon" ng-show="sortKey=='Lastname'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
<th ng-click="sort('Fathername')">Father Name
<span class="glyphicon sort-icon" ng-show="sortKey=='Fathername'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th ng-click="sort('MobileNumber')">Mobile
<span class="glyphicon sort-icon" ng-show="sortKey=='MobileNumber'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
@ -160,7 +160,7 @@
</label>
</td>
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.Firstname}}</a></td>
<td>{{p.Lastname}}</td>
<td>{{p.Fathername}}</td>
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.MobileNumber}}</a></td>
<td>{{p.EmailID}}</td>
<td>{{p.CourseName}} (<strong>{{p.CourseCode}}</strong>)</td>

View File

@ -135,8 +135,8 @@
<th ng-click="sort('Firstname')">First Name
<span class="glyphicon sort-icon" ng-show="sortKey=='Firstname'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th ng-click="sort('Lastname')">Last Name
<span class="glyphicon sort-icon" ng-show="sortKey=='Lastname'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
<th ng-click="sort('Fathername')">Father Name
<span class="glyphicon sort-icon" ng-show="sortKey=='Fathername'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th ng-click="sort('MobileNumber')">MobileNumber
<span class="glyphicon sort-icon" ng-show="sortKey=='MobileNumber'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
@ -160,7 +160,7 @@
</label>
</td>
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.Firstname}}</a></td>
<td>{{p.Lastname}}</td>
<td>{{p.Fathername}}</td>
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.MobileNumber}}</a></td>
<td>{{p.EmailID}}</td>
<td>{{p.CourseName}}(<strong>{{p.CourseCode}}</strong>)</td>

View File

@ -135,8 +135,8 @@
<th ng-click="sort('Firstname')">First Name
<span class="glyphicon sort-icon" ng-show="sortKey=='Firstname'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th ng-click="sort('Lastname')">Last Name
<span class="glyphicon sort-icon" ng-show="sortKey=='Lastname'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
<th ng-click="sort('Fathername')">Father Name
<span class="glyphicon sort-icon" ng-show="sortKey=='Fathername'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th ng-click="sort('MobileNumber')">MobileNumber
<span class="glyphicon sort-icon" ng-show="sortKey=='MobileNumber'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
@ -160,7 +160,7 @@
</label>
</td>
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.Firstname}}</a></td>
<td>{{p.Lastname}}</td>
<td>{{p.Fathername}}</td>
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.MobileNumber}}</a></td>
<td>{{p.EmailID}}</td>
<td>{{p.CourseName}}(<strong>{{p.CourseCode}}</strong>)</td>

View File

@ -39,7 +39,33 @@
<fieldset>
<legend>Search</legend>
<div class="row">
<div class="col-md-3 form-group" ng-class="{'has-error':Form.mobilenumber.$dirty && Form.mobilenumber.$invalid}">
<div class="col-md-4 form-group">
<label>
University
</label>
<select class="form-control" name="university" tabindex="3" id="university" ng-model="myModel.universityName" ng-options="details.universityName for details in university" ng-change="getStudentDetails(Form,myModel);">
<option value=""> Select University</option>
</select>
</div>
<div class="col-md-4 form-group">
<label>Batch</label>
<select ui-select2 class="form-control" tabindex="3" class="cs-select cs-skin-elastic" name="batch" ng-model="myModel.batch" ng-change="getStudentDetails(Form,myModel);">
<option value="" selected>Select Batch</option>
<option ng-repeat="batchDetails in myModel.universityName.batchDetails" value="{{batchDetails.BatchCode}}">{{batchDetails.BatchName}}</option>
</select>
</div>
<div class="col-md-4 form-group">
<label>Course</label>
<select ui-select2 class="form-control" tabindex="4" class="cs-select cs-skin-elastic" name="course" ng-model="myModel.courseName" ng-change="getStudentDetails(Form,myModel);">
<option value="" selected>Select Course</option>
<option ng-repeat="courseDetails in myModel.universityName.courseDetails" value="{{courseDetails.CourseID}}">{{courseDetails.CourseName}}</option>
</select>
</div>
</div>
<div class="row">
<div class="col-md-4 form-group" ng-class="{'has-error':Form.mobilenumber.$dirty && Form.mobilenumber.$invalid}">
<label>
Mobile Number
</label>
@ -51,7 +77,7 @@
</div>
<div class="col-md-3 form-group">
<div class="col-md-4 form-group">
<label>
Student First Name
</label>
@ -59,25 +85,7 @@
<input type="text" placeholder="Search Student Name" tabindex="2" class="form-control" name="studentname" ng-model="myModel.studentName" ng-pattern="/^[a-zA-Z.\s]*$/" ng-change="getStudentDetails(Form,myModel);" />
<span class="error text-small block" ng-if="Form.studentname.$dirty && Form.studentname.$error.pattern">Invalid student name </span>
</div>
<div class="col-md-3 form-group">
<label>
University
</label>
<select class="form-control" name="university" tabindex="3" id="university" ng-model="myModel.universityName" ng-options="details.universityName for details in university" ng-change="getStudentDetails(Form,myModel);">
<option value=""> Select University</option>
</select>
</div>
<div class="col-md-3 form-group">
<label>
Course
</label>
<select ui-select2 class="form-control" tabindex="4" class="cs-select cs-skin-elastic" name="course" ng-model="myModel.courseName" ng-change="getStudentDetails(Form,myModel);">
<option value="" selected>Select Course</option>
<option ng-repeat="courseDetails in myModel.universityName.courseDetails" value="{{courseDetails.CourseID}}">{{courseDetails.CourseName}}</option>
</select>
</div>
</div>
</fieldset>

View File

@ -132,8 +132,8 @@
<th ng-click="sort('Firstname')">First Name
<span class="glyphicon sort-icon" ng-show="sortKey=='Firstname'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th ng-click="sort('Lastname')">Last Name
<span class="glyphicon sort-icon" ng-show="sortKey=='Lastname'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
<th ng-click="sort('Fathername')">Father Name
<span class="glyphicon sort-icon" ng-show="sortKey=='Fathername'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th ng-click="sort('MobileNumber')">MobileNumber
<span class="glyphicon sort-icon" ng-show="sortKey=='MobileNumber'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
@ -157,7 +157,7 @@
</label>
</td>
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.Firstname}}</a></td>
<td>{{p.Lastname}}</td>
<td>{{p.Fathername}}</td>
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.MobileNumber}}</a></td>
<td>{{p.EmailID}}</td>
<td>{{p.CourseName}}(<strong>{{p.CourseCode}}</strong>)</td>