From 5c41e85c94096f486317f276f4757f73120caef1 Mon Sep 17 00:00:00 2001 From: sriramv Date: Sat, 19 Jan 2019 12:09:58 +0530 Subject: [PATCH] 0001596: Student View --- .../api/application/models/Dashboard_model.php | 3 +++ .../application/models/Studentview_model.php | 17 ++++++++++++++--- Apollo/assets/css/themes/theme-5.css | 4 ++-- .../views/student/studentDetailsModal.html | 8 ++++++++ Apollo/assets/views/student/studentView.html | 11 ++++++++++- 5 files changed, 37 insertions(+), 6 deletions(-) diff --git a/Apollo/api/application/models/Dashboard_model.php b/Apollo/api/application/models/Dashboard_model.php index 1fdabbaa..d1d94d27 100755 --- a/Apollo/api/application/models/Dashboard_model.php +++ b/Apollo/api/application/models/Dashboard_model.php @@ -798,6 +798,9 @@ $sql="select sum(TotalBalance) as total FROM (select (sum(totalpayable) - sum(to $sql.=" ORDER BY BDate DESC"; + + //print_r($sql); die(); + $ltd=$this->db->query($sql); $tlead = $ltd->result(); if (count($tlead) > 0) { diff --git a/Apollo/api/application/models/Studentview_model.php b/Apollo/api/application/models/Studentview_model.php index 3bc3e112..aac174d4 100755 --- a/Apollo/api/application/models/Studentview_model.php +++ b/Apollo/api/application/models/Studentview_model.php @@ -18,12 +18,19 @@ class Studentview_model extends CI_Model // get student list based on login user public function getStudentInfo($requestedBy=null,$requestFrom=null,$requestedBranch=null, $accessFrom=null) { + + if($requestFrom =='2'){ - $this->db->select('ST.*'); + //echo '2'; + //$this->db->select('ST.*'); + $this->db->select('LO.ID,ST.*,concat(SF.Firstname," ",SF.Lastname) as fname,STC.DOJ'); $this->db->from( LOGIN . ' as LO'); $this->db->join( STUDENTS . ' as ST', 'LO.StaffID = ST.StudentID'); + $this->db->join (STAFF .' as SF', 'SF.StaffID = ST.AdmittedBy','left'); + $this->db->join( STUDENTCOURSE . ' as STC', 'STC.StudentID = ST.StudentID'); $this->db->where('LO.ID', $requestedBy); $studentDetails = $this->db->get()->first_row(); + if($studentDetails){ $result['studentStatus'] = true; $result['studentDetails'] = $studentDetails; @@ -36,9 +43,11 @@ class Studentview_model extends CI_Model } } else if($requestFrom =='1'){ - $this->db->select('ST.*'); + //echo '1';die(); + $this->db->select('ST.*,concat(SF.Firstname," ",SF.Lastname) as fname,STC.DOJ'); $this->db->from( LOGIN . ' as LO'); - $this->db->join( STUDENTS . ' as ST', 'LO.StaffID = ST.StudentID'); + $this->db->join( STUDENTS .' as ST', 'LO.StaffID = ST.StudentID'); + $this->db->join (STAFF .' as SF', 'SF.StaffID = ST.AdmittedBy'); $this->db->join( STUDENTCOURSE . ' as STC', 'STC.StudentID = ST.StudentID'); $this->db->where('ST.StudentID', $requestedBy); $this->db->where('STC.BranchID', $requestedBranch); @@ -55,6 +64,7 @@ class Studentview_model extends CI_Model } } else if ($requestFrom =='3'){ + // echo '3'; $this->db->select('ST.*'); $this->db->from( LOGIN . ' as LO'); $this->db->join( STUDENTS . ' as ST', 'LO.StaffID = ST.StudentID'); @@ -75,6 +85,7 @@ class Studentview_model extends CI_Model } // requestedFrom 4 for based on form get student details else if ($requestFrom =='4'){ + //echo '4'; $this->db->select('ST.*'); $this->db->from( LOGIN . ' as LO'); $this->db->join( STUDENTS . ' as ST', 'LO.StaffID = ST.StudentID'); diff --git a/Apollo/assets/css/themes/theme-5.css b/Apollo/assets/css/themes/theme-5.css index 8333971e..8eea5522 100755 --- a/Apollo/assets/css/themes/theme-5.css +++ b/Apollo/assets/css/themes/theme-5.css @@ -144,7 +144,7 @@ header .dropdown-off-sidebar { color: #81B441 !important; } #sidebar nav > ul > li > a .item-inner { - color: rgba(255, 255, 255, 0.5) !important; + color: rgba(255, 255, 255, 1) !important; border-bottom-color: #394557; } #sidebar nav > ul > li.hover { @@ -192,7 +192,7 @@ header .dropdown-off-sidebar { background: #222932 !important; } #sidebar nav > ul .sub-menu > li a { - color: rgba(255, 255, 255, 0.5); + color: rgba(255, 255, 255, 1); } #sidebar nav > ul .sub-menu > li.active a { background: #13171d !important; diff --git a/Apollo/assets/views/student/studentDetailsModal.html b/Apollo/assets/views/student/studentDetailsModal.html index b4a28de3..0673b25f 100755 --- a/Apollo/assets/views/student/studentDetailsModal.html +++ b/Apollo/assets/views/student/studentDetailsModal.html @@ -102,6 +102,14 @@ {{items.studentDetails.PermanentAddress}} + + Admitted BY + {{items.studentDetails.fname}} + + + Admission Date + {{items.studentDetails.DOJ}} + diff --git a/Apollo/assets/views/student/studentView.html b/Apollo/assets/views/student/studentView.html index b816eb9a..b44b1940 100755 --- a/Apollo/assets/views/student/studentView.html +++ b/Apollo/assets/views/student/studentView.html @@ -86,7 +86,7 @@ - + @@ -125,6 +125,11 @@ {{studentDetails.PermanentAddress}} + + + + +
Contact Information Contact Information
Admitted BY{{studentDetails.fname}}
@@ -166,6 +171,10 @@ Designation {{studentDetails.Designation}} + + Admission Date + {{studentDetails.DOJ}} +