HALLTICKET MODULE

This commit is contained in:
velz 2018-05-19 15:49:44 +05:30
parent 3b85d9c0c7
commit bcb31ecac8
11 changed files with 2913 additions and 80 deletions

View File

@ -251,8 +251,15 @@ $route['addSessionScheduleDetails'] = 'SessionSchedule_Controller/addSessionSche
$route['getSessionScheduleDetails'] = 'SessionSchedule_Controller/getSessionScheduleDetails';
$route['updateSessionScheduleDetails'] = 'SessionSchedule_Controller/updateSessionScheduleDetails';
// halltickets
$route['getCourseSubjectDetails'] = 'HallTickets_Controller/getCourseSubjectDetails';
/// halltickets
$route['getUniversityCourseDetails'] = 'HallTickets_Controller/getUniversityCourseDetails';
$route['getSemesterSubjectDetails'] = 'HallTickets_Controller/getSemesterSubjectDetails';
$route['saveAllSemSubMapping'] = 'HallTickets_Controller/saveAllSemesterSubjectMapping';
$route['getAllSemSubjects'] = 'HallTickets_Controller/getAllSemesterSubjects';
$route['getIndividualCourseSemMappingDetails'] = 'HallTickets_Controller/getIndividualCourseSemMappingDetails';
$route['updateAllSemSubMapping'] = 'HallTickets_Controller/updateAllSemesterSubjectMapping';
$route['getStudentListForHallTicket'] = 'HallTickets_Controller/getStudentListForHallTicket';
$route['getHallTicket'] = 'HallTickets_Controller/getHallTicket';
//Reports
$route['report_status'] = 'Report/status';

View File

@ -11,17 +11,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
/** @noinspection PhpIncludeInspection */
require_once APPPATH . '/libraries/REST_Controller.php';
/**
* This is an example of a few basic user interaction methods you could use
* all done with a hardcoded array
*
* @package CodeIgniter
* @subpackage Rest Server
* @category Controller
* @author
* @license MIT
* @link
*/
class HallTickets_Controller extends REST_Controller {
function __construct()
@ -37,28 +27,23 @@ class HallTickets_Controller extends REST_Controller {
$this->load->model('Hallticket_model', 'Hallticket_model');
}
/*
* get student list for fees update
* created by kms
* get university and course details for semester course mappinig
* created by velz
* */
public function getStudentList_post()
public function getUniversityCourseDetails_post()
{
$search['requestedBy'] = $this->post('requestedtBy');
$search['Firstname'] = $this->post('studentName');
$search['MobileNumber'] = $this->post('mobileNumber');
$search['UniversityID'] = $this->post('university');
$search['CourseID'] = $this->post('course');
$search['requestedDept'] = $this->post('requestedDept');
$search['requestedBranch'] = $this->post('branchId');
$getStudentDetails = $this->Fees_model->getStudentList($search);
if ($getStudentDetails)
$branchId = $this->post('branchId');
$getUnivDetails = $this->Hallticket_model->getUniversityDetails($branchId);
$getCenterDetails = $this->Hallticket_model->getCenterDetails($branchId);
if ($getUnivDetails)
{
$getStudentDetails['status'] = REST_Controller::HTTP_OK;
$getUnivDetails['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($getStudentDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
$this->response($getUnivDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
@ -71,6 +56,215 @@ class HallTickets_Controller extends REST_Controller {
}
/*
* get semester and subjects list for sem course mapping
* created by velz
* */
public function getSemesterSubjectDetails_post()
{
$universityID = $this->post('universityID');
$courseIDS = $this->post('courseID');
$requestedBy = $this->post('requestedBy');
$branchId = $this->post('branchId');
$tempCourseArray = array();
foreach($courseIDS as $val)
{
foreach($val as $v){
$tempCourseArray[] = $v;
}
//print_r($value);
}
$data['subjectDetails'] = $this->Hallticket_model->getSubjectDetails($universityID,$tempCourseArray,$branchId);
//$data['semesterDetails'] = $this->Hallticket_model->getSemesterDetails($universityID,$tempCourseArray);
if($data['subjectDetails'])
{
$data['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($data, REST_Controller::HTTP_OK);
}
else{
$this->response([
'message' => 'No records found!',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND);
}
}
public function saveAllSemesterSubjectMapping_post()
{
$UID = $this->post('universityID');
$courseIDS = $this->post('courseID');
$requestedBy = $this->post('requestedBy');
$branchId = $this->post('branchId');
$semArray = $this->post('Semesters');
$res = $this->Hallticket_model->saveAllSemesterSubjectMappingmodel($UID,$courseIDS,$requestedBy,$branchId,$semArray,$requestedBy);
if($res['insert'] == true and $res['exist'] == false)
{
$data['status'] = REST_Controller::HTTP_OK;
$data['txtStatus'] = '1';
$this->response($data, REST_Controller::HTTP_OK);
}
else if($res['insert'] == false and $res['exist'] == true)
{
$data['status'] = REST_Controller::HTTP_OK;
$data['txtStatus'] = '2';
$this->response($data, REST_Controller::HTTP_OK);
}
else if($res['insert'] == false and $res['exist'] == false)
{
$this->response([
'message' => 'Something Went Wrong!',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND);
}
}
public function getAllSemesterSubjects_get()
{
$branchId = $this->post('branchId');
$res = $this->Hallticket_model->getAllSemesterSubjectsmodel($branchId);
//$result_array = array();
if(count($res) > 0 )
{
$data['semsubstatus'] = true;
$data['status'] = REST_Controller::HTTP_OK;;
$data['semsubjects'] = $res;
$this->response($data, REST_Controller::HTTP_OK);
}
else
{
$this->response([
'message' => 'Something Went Wrong!',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND);
}
}
public function getIndividualCourseSemMappingDetails_post()
{
$universityID = $this->post('universityID');
$courseID = $this->post('courseID');
$branchId = $this->post('branchId');
$res = $this->Hallticket_model->getIndividualCourseSemMappingDetailsmodel($universityID,$courseID,$branchId);
//print_r($res);
if(count($res['mappedSubjects']) == 0)
{
$data['subjectStatus'] = false;
$data['status'] = REST_Controller::HTTP_OK;
$data['subjects'] = "";
$this->response($data, REST_Controller::HTTP_OK);
}
else
{
$data['subjectStatus'] = true;
$data['status'] = REST_Controller::HTTP_OK;
$data['subjects'] = $res['mappedSubjects'];
$data['overAllSubjects'] = $res['overAllSubjects'];
$this->response($data, REST_Controller::HTTP_OK);
}
}
public function updateAllSemesterSubjectMapping_post()
{
$UID = $this->post('universityID');
$courseIDS = $this->post('courseID');
$requestedBy = $this->post('requestedBy');
$branchId = $this->post('branchId');
$semArray = $this->post('Semesters');
$res = $this->Hallticket_model->updateAllSemesterSubjectMappingmodel($UID,$courseIDS,$requestedBy,$branchId,$semArray,$requestedBy);
if($res)
{
$data['status'] = REST_Controller::HTTP_OK;
$data['txtStatus'] = true;
$this->response($data, REST_Controller::HTTP_OK);
}
else
{
$this->response([
'message' => 'Something Went Wrong!',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND);
}
}
public function getStudentListForHallTicket_post()
{
$UID = $this->post('university');
$courseID = $this->post('course');
$batch = $this->post('batch');
$requestedBy = $this->post('requestedBy');
$branchId = $this->post('branchId');
$res = $this->Hallticket_model->getStudentListForHallTicketmodel($UID,$courseID,$batch,$requestedBy,$branchId);
if(count($res) > 0)
{
$data['status'] = REST_Controller::HTTP_OK;
$data['studentStatus'] = true;
$data['studentDetails'] = $res;
$this->response($data, REST_Controller::HTTP_OK);
}
else
{
$this->response([
'message' => 'Something Went Wrong!',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND);
}
}
public function getHallTicket_post()
{
$UID = $this->post('universityID');
$courseID = $this->post('courseID');
$batch = $this->post('batchName');
$requestedBy = $this->post('requestedBy');
$branchId = $this->post('branchId');
$studentIDs = $this->post('StudentIDs');
$centerName = $this->post('centerName');
$res['UniversityDetails'] = $this->Hallticket_model->getUniversityDetials($UID,$branchId);
$res['studentDetails'] = $this->Hallticket_model->getStudentDetails($UID,$courseID,$branchId,$studentIDs);
if(count($res['UniversityDetails']) != 0 || count($res['studentDetails']) != 0 )
{
$data['status'] = REST_Controller::HTTP_OK;
$data['hallTicketStatus'] = true;
$data['hallTicketData'] = $res;
$data['semDataType'] = $res['studentDetails']['NUMTYPE'];
$this->response($data, REST_Controller::HTTP_OK);
}
else
{
$this->response([
'message' => 'Something Went Wrong!',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND);
}
}
}

View File

@ -1,7 +1,820 @@
<?php
/**
* Created by PhpStorm.
* User: karthi
* Date: 2/14/18
* Time: 5:26 PM
*/
* Created by Notepad++.
* User: velz
* Date: 3/19/18
* Time: 7:48 PM
*/
defined('BASEPATH') OR exit('No direct script access allowed');
class Hallticket_model extends CI_Model
{
/*
* get university details
* created by velz
* */
public function getUniversityDetails($branchId)
{
$this->db->select('UniversityID,UniversityName');
$this->db->where('IsActive','1');
$this->db->where('BranchCode',$branchId);
$this->db->order_by('UniversityID','ASC');
$unviversityDetails = $this->db->get(UNIVERSITY);
if($unviversityDetails->result()){
$result_university = array();
$result_university['universityStatus'] = true;
foreach ($unviversityDetails->result() as $row)
{
$university_array['universityID'] = $row->UniversityID;
$university_array['universityName'] = $row->UniversityName;
$university_array['courseDetails']= $this->getCourseDetails($row->UniversityID,$branchId);
$university_array['batchDetails']= $this->getBatchDetails($row->UniversityID,$branchId);
$result_array[]=$university_array;
}
$result_university['univerSityDetails']= $result_array;
$result_university['centerDetails'] = $this->getCenterDetails($branchId);
}
else {
$result_university['universityStatus'] = false;
$result_university['message'] = "No records found!";
$result_university['universityID'] = "";
$result_university['universityName'] = "";
$result_university['courseDetails']= "";
}
return $result_university;
}
public function getCenterDetails($branchId)
{
$this->db->select('CenterID,CenterCode,CenterName,CenterAddress');
$this->db->from('T_CenterMaster');
$this->db->where('IsActive',1);
$this->db->where('BranchCode',$branchId);
$res = $this->db->get();
return $res->result();
}
/*
* get course details
* @params university id
* created by velz
* */
public function getCourseDetails($universityID=null,$branchId)
{
$this->db->select('CourseID,CONCAT(CourseName, "(",CourseCode,")") AS CourseName');
$this->db->where('UniversityID',$universityID);
$this->db->where('BranchCode',$branchId);
$this->db->where('IsActive','1');
$this->db->order_by('CourseID','ASC');
$courseDetails = $this->db->get(COURSE);
return $courseDetails->result();
}
/*
* get subject details
* @params university id and CourseID
* created by velz
* */
public function getSubjectDetails($universityID,$courseIDS,$branchId)
{
$this->db->distinct();
$this->db->select('SubjectID,SubjectCode,SubjectName');
$this->db->from('T_SubjectMaster');
//$this->db->join('T_SubjectMaster','T_CourseSubject_Details.SubjectID=T_SubjectMaster.SubjectID');
$this->db->where('T_SubjectMaster.IsActive','1');
$this->db->where('T_SubjectMaster.BranchCode',$branchId);
//$this->db->where('T_CourseSubject_Details.UniversityID',$universityID);
//$this->db->where_in('T_CourseSubject_Details.CourseID',$courseIDS);
$result = $this->db->get();
//echo $this->db->last_query();
return $result->result();
}
/*
* get semester details
* @params university id and CourseID
* created by velz
* */
public function getSemesterDetails($universityID,$courseIDS)
{
$this->db->distinct();
$this->db->select('CourseID,Sem_Year');
$this->db->from('T_Course_Fees_Details');
$this->db->where('IsActive','1');
$this->db->where_in('T_Course_Fees_Details.CourseID',$courseIDS);
$result = $this->db->get();
return $result->result();
}
/*
* save All Semester Subject Mapping Info
* @params university id,CourseID,requestedBy,branchId,semArray
* created by velz
* */
public function saveAllSemesterSubjectMappingmodel($UID,$courseIDS,$requestedBy,$branchId,$semArray)
{
$sem1 = 0;$sem2=0;$sem3=0;$sem4=0;$sem5=0;$sem6=0;$sem7=0;$sem8 = 0;
foreach($semArray as $key => $s)
{
if($key == 0)
{
$sem1 = $s;
}
if($key == 1)
{
$sem2 = $s;
}if($key == 2)
{
$sem3 = $s;
}if($key == 3)
{
$sem4 = $s;
}if($key == 4)
{
$sem5 = $s;
}if($key == 5)
{
$sem6 = $s;
}
if($key == 6)
{
$sem7 = $s;
}
if($key == 7)
{
$sem8 = $s;
}
}
//Check If Exist or Not for UniversityID and CourseID's
$this->db->select('count(*) as counts');
$this->db->from('T_SemSubMap_Master');
$this->db->where('BranchCode',$branchId);
$this->db->where('UniversityID',$UID);
$this->db->where_in('CourseID',$courseIDS);
$isExist = $this->db->get();
$isExist = $isExist->result();
$result_array = array('insert'=>'','exist'=>'');
if($isExist[0]->counts == 0 )
{
$ids = array();
foreach($courseIDS as $course)
{
for($i=1;$i<=8;$i++)
{
$dataArray = array('UniversityID'=>$UID,'CourseID'=>$course,'SemesterID'=>$i,'BranchCode'=>$branchId,'CreatedBy'=>$requestedBy);
$this->db->trans_start();
$this->db->insert('T_SemSubMap_Master',$dataArray);
$last_id = $this->db->insert_id();
$this->db->trans_complete();
//echo $last_id;
//$current = '$sem'.$i;
//echo $current;die();
$ids[] = $last_id;
if($i == 1)
{
if(count($sem1) != 0){
foreach($sem1 as $s)
{
$childArray = array('MapID'=>$last_id,'SubjectID'=>$s['SubjectID']);
$this->db->trans_start();
$this->db->insert('T_SemSubMap_Child',$childArray);
$this->db->trans_complete();
}
}
}
if($i == 2)
{
if(count($sem2) != 0){
foreach($sem2 as $s)
{
$childArray = array('MapID'=>$last_id,'SubjectID'=>$s['SubjectID']);
$this->db->trans_start();
$this->db->insert('T_SemSubMap_Child',$childArray);
$this->db->trans_complete();
}
}
}
if($i == 3)
{
if(count($sem3) != 0){
foreach($sem3 as $s)
{
$childArray = array('MapID'=>$last_id,'SubjectID'=>$s['SubjectID']);
$this->db->trans_start();
$this->db->insert('T_SemSubMap_Child',$childArray);
$this->db->trans_complete();
}
}
}
if($i == 4)
{
if(count($sem4) != 0){
foreach($sem4 as $s)
{
$childArray = array('MapID'=>$last_id,'SubjectID'=>$s['SubjectID']);
$this->db->trans_start();
$this->db->insert('T_SemSubMap_Child',$childArray);
$this->db->trans_complete();
}
}
}
if($i == 5)
{
if(count($sem5) != 0){
foreach($sem5 as $s)
{
$childArray = array('MapID'=>$last_id,'SubjectID'=>$s['SubjectID']);
$this->db->trans_start();
$this->db->insert('T_SemSubMap_Child',$childArray);
$this->db->trans_complete();
}
}
}
if($i == 6)
{
if(count($sem6) != 0){
foreach($sem6 as $s)
{
$childArray = array('MapID'=>$last_id,'SubjectID'=>$s['SubjectID']);
$this->db->trans_start();
$this->db->insert('T_SemSubMap_Child',$childArray);
$this->db->trans_complete();
}
}
}
if($i == 7)
{
if(count($sem7) != 0){
foreach($sem7 as $s)
{
$childArray = array('MapID'=>$last_id,'SubjectID'=>$s['SubjectID']);
$this->db->trans_start();
$this->db->insert('T_SemSubMap_Child',$childArray);
$this->db->trans_complete();
}
}
}
if($i == 8)
{
if(count($sem8) != 0){
foreach($sem8 as $s)
{
$childArray = array('MapID'=>$last_id,'SubjectID'=>$s['SubjectID']);
$this->db->trans_start();
$this->db->insert('T_SemSubMap_Child',$childArray);
$this->db->trans_complete();
}
}
}
}
}
if(count($ids) > 0)
{
$result_array['insert'] = true;
$result_array['exist'] = false;
return $result_array;
}
else
{
$result_array['insert'] = false;
$result_array['exist'] = false;
return $result_array;
}
}
else
{
$result_array['insert'] = false;
$result_array['exist'] = true;
return $result_array;
}
}
/*
* get All Semester Subject Mapping Info
* @params branchId
* created by velz
* */
public function getAllSemesterSubjectsmodel($branchId)
{
$this->db->select('T_SemSubMap_Master.UniversityID,T_UniversityMaster.UniversityName,T_CourseMaster.CourseID,T_CourseMaster.CourseCode,T_CourseMaster.CourseName');
$this->db->from('T_SemSubMap_Master');
$this->db->join('T_UniversityMaster','T_SemSubMap_Master.UniversityID=T_UniversityMaster.UniversityID and T_SemSubMap_Master.BranchCode=T_UniversityMaster.BranchCode') ;
$this->db->join('T_CourseMaster','T_SemSubMap_Master.CourseID=T_CourseMaster.CourseID and T_SemSubMap_Master.BranchCode=T_CourseMaster.BranchCode');
$this->db->group_by('T_SemSubMap_Master.UniversityID,T_SemSubMap_Master.CourseID');
$res = $this->db->get();
return $res->result();
}
public function getIndividualCourseSemMappingDetailsmodel($universityID,$courseID,$branchId)
{
//FOR GET MAPPED SUBJECTS FOR $universityID,$courseID,$branchId
$this->db->select('T_SemSubMap_Master.UniversityID,T_SemSubMap_Master.SemesterID,T_UniversityMaster.UniversityName,T_CourseMaster.CourseID,T_CourseMaster.CourseCode,T_CourseMaster.CourseName,T_SubjectMaster.SubjectID,T_SubjectMaster.SubjectCode,T_SubjectMaster.SubjectName');
$this->db->from('T_SemSubMap_Master');
$this->db->join('T_UniversityMaster','T_SemSubMap_Master.UniversityID=T_UniversityMaster.UniversityID and T_SemSubMap_Master.BranchCode=T_UniversityMaster.BranchCode','left') ;
$this->db->join('T_CourseMaster','T_SemSubMap_Master.CourseID=T_CourseMaster.CourseID and T_SemSubMap_Master.BranchCode=T_CourseMaster.BranchCode','left');
$this->db->join('T_SemSubMap_Child','T_SemSubMap_Master.MapID=T_SemSubMap_Child.MapID and T_SemSubMap_Child.isActive = 1','left');
$this->db->join('T_SubjectMaster','T_SemSubMap_Child.SubjectID=T_SubjectMaster.SubjectID','left');
$this->db->where('T_SemSubMap_Master.UniversityID',$universityID);
$this->db->where('T_SemSubMap_Master.CourseID',$courseID);
$this->db->where('T_SemSubMap_Master.BranchCode',$branchId);
//$this->db->group_by('T_SemSubMap_Master.UniversityID,T_SemSubMap_Master.CourseID');
$res1 = $this->db->get();
$res['mappedSubjects'] = $res1->result();
//FOR GET OVERALL SUBJECTS FOR $universityID,$courseID,$branchId
$this->db->distinct();
$this->db->select('T_SubjectMaster.SubjectID,T_SubjectMaster.SubjectCode,T_SubjectMaster.SubjectName');
$this->db->from('T_SubjectMaster');
$this->db->where('T_SubjectMaster.IsActive','1');
$this->db->where('T_SubjectMaster.BranchCode',$branchId);
$result = $this->db->get();
$res['overAllSubjects'] = $result->result();
return $res;
}
/*
* update All Semester Subject Mapping Info
* @params university id,CourseID,requestedBy,branchId,semArray
* created by velz
* */
public function updateAllSemesterSubjectMappingmodel($UID,$courseIDS,$requestedBy,$branchId,$semArray)
{
$sem1 = 0;$sem2=0;$sem3=0;$sem4=0;$sem5=0;$sem6=0;$sem7=0;$sem8 = 0;
foreach($semArray as $key => $s)
{
if($key == 0)
{
$sem1 = $s;
}
if($key == 1)
{
$sem2 = $s;
}if($key == 2)
{
$sem3 = $s;
}if($key == 3)
{
$sem4 = $s;
}if($key == 4)
{
$sem5 = $s;
}if($key == 5)
{
$sem6 = $s;
}
if($key == 6)
{
$sem7 = $s;
}
if($key == 7)
{
$sem8 = $s;
}
}
//Check If Exist or Not for UniversityID and CourseID's
// echo 'FROM MODEL-'.$UID.'-'.$courseIDS.'-'.$branchId.'-'.$requestedBy;
// print_r(array($sem1,$sem2,$sem3,$sem4,$sem5,$sem6,$sem7,$sem8));
// die();
for($i=1;$i<=8;$i++)
{
$this->db->trans_start();
$this->db->select('MapID');
$this->db->from('T_SemSubMap_Master');
$this->db->where('BranchCode',$branchId);
$this->db->where('UniversityID',$UID);
$this->db->where('CourseID',$courseIDS);
$this->db->where('SemesterID',$i);
$isExist = $this->db->get();
$this->db->trans_complete();
$isExist = $isExist->result();
if(!empty($isExist[0]->MapID))
{
$MapID = $isExist[0]->MapID;
$this->db->trans_start();
$this->db->set('UpdatedBy',$requestedBy);
$this->db->where('MapID',$MapID);
$this->db->update('T_SemSubMap_Master');
$this->db->trans_complete();
$this->db->trans_start();
$this->db->set('isActive',0);
$this->db->where('MapID',$MapID);
$this->db->update('T_SemSubMap_Child');
$this->db->trans_complete();
if($i == 1)
{
if(count($sem1) != 0){
foreach($sem1 as $s)
{
$childArray = array('MapID'=>$MapID,'SubjectID'=>$s['SubjectID']);
$this->db->trans_start();
$this->db->insert('T_SemSubMap_Child',$childArray);
$this->db->trans_complete();
}
}
}
if($i == 2)
{
if(count($sem2) != 0){
foreach($sem2 as $s)
{
$childArray = array('MapID'=>$MapID,'SubjectID'=>$s['SubjectID']);
$this->db->trans_start();
$this->db->insert('T_SemSubMap_Child',$childArray);
$this->db->trans_complete();
}
}
}
if($i == 3)
{
if(count($sem3) != 0){
foreach($sem3 as $s)
{
$childArray = array('MapID'=>$MapID,'SubjectID'=>$s['SubjectID']);
$this->db->trans_start();
$this->db->insert('T_SemSubMap_Child',$childArray);
$this->db->trans_complete();
}
}
}
if($i == 4)
{
if(count($sem4) != 0){
foreach($sem4 as $s)
{
$childArray = array('MapID'=>$MapID,'SubjectID'=>$s['SubjectID']);
$this->db->trans_start();
$this->db->insert('T_SemSubMap_Child',$childArray);
$this->db->trans_complete();
}
}
}
if($i == 5)
{
if(count($sem5) != 0){
foreach($sem5 as $s)
{
$childArray = array('MapID'=>$MapID,'SubjectID'=>$s['SubjectID']);
$this->db->trans_start();
$this->db->insert('T_SemSubMap_Child',$childArray);
$this->db->trans_complete();
}
}
}
if($i == 6)
{
if(count($sem6) != 0){
foreach($sem6 as $s)
{
$childArray = array('MapID'=>$MapID,'SubjectID'=>$s['SubjectID']);
$this->db->trans_start();
$this->db->insert('T_SemSubMap_Child',$childArray);
$this->db->trans_complete();
}
}
}
if($i == 7)
{
if(count($sem7) != 0){
foreach($sem7 as $s)
{
$childArray = array('MapID'=>$MapID,'SubjectID'=>$s['SubjectID']);
$this->db->trans_start();
$this->db->insert('T_SemSubMap_Child',$childArray);
$this->db->trans_complete();
}
}
}
if($i == 8)
{
if(count($sem8) != 0){
foreach($sem8 as $s)
{
$childArray = array('MapID'=>$MapID,'SubjectID'=>$s['SubjectID']);
$this->db->trans_start();
$this->db->insert('T_SemSubMap_Child',$childArray);
$this->db->trans_complete();
}
}
}
}
}
return true;
}
public function getBatchDetails($UniversityID,$branchId)
{
$this->db->select('BatchID,BatchCode,BatchName');
$this->db->from('T_BatchMaster');
$this->db->where('UniversityID',$UniversityID);
$this->db->where('IsActive',1);
$this->db->where('BranchCode',$branchId);
$res = $this->db->get();
return $res->result();
}
public function getStudentListForHallTicketmodel($UID,$courseID,$batch,$requestedBy,$branchId)
{
$this->db->select('T_StudentDetails.StudentID,T_StudentDetails.MobileNumber,T_StudentDetails.Firstname,T_StudentDetails.Lastname,T_StudentDetails.EmailID,T_StudentDetails.ProfilePicPath,T_Student_CourseDetails.EnrollmentID');
$this->db->from('T_Students_Fees_Status');
$this->db->join('T_StudentDetails','T_Students_Fees_Status.StudentID=T_StudentDetails.StudentID and T_StudentDetails.IsActive = 1');
$this->db->join('T_Student_CourseDetails','T_StudentDetails.StudentID = T_Student_CourseDetails.StudentID');
$this->db->where('T_Students_Fees_Status.BatchCode',$batch['BatchCode']);
$this->db->where('T_Students_Fees_Status.BranchCode',$branchId);
$this->db->where('T_Students_Fees_Status.CourseID',$courseID['CourseID']);
$res = $this->db->get();
$data = $res->result();
$result_array = array();
if(count($data) > 0)
{
$result_array = array();
$prestu = "";
foreach($data as $r)
{
if($prestu != $r->StudentID)
{
$studetdetails['StudentID'] = $r->StudentID;
$studetdetails['MobileNumber'] = $r->MobileNumber;
$studetdetails['Firstname'] = $r->Firstname;
$studetdetails['Lastname'] = $r->Lastname;
$studetdetails['EmailID'] = $r->EmailID;
$studetdetails['ProfilePicPath'] = $r->ProfilePicPath;
$studetdetails['EnrollmentID'] = $r->EnrollmentID;
$studetdetails['FeeDetails'] = $this->getFeeSemesterDetails($r->StudentID,$batch['BatchCode'],$branchId,$courseID);
$result_array[] = $studetdetails;
$prestu = $r->StudentID;
}
}
}
return $result_array;
// $this->db->distinct();
// $this->db->select("T_StudentDetails.StudentID,T_StudentDetails.MobileNumber,T_StudentDetails.Firstname,T_StudentDetails.Lastname,T_StudentDetails.EmailID,T_Course_Fees_Details.ID as FeesID,if(substr(substr(T_Course_Fees_Details.sem_Year,-4),1,3) = 'sem',substr(sem_Year,-1),if(substr(substr(T_Course_Fees_Details.sem_Year,-5),1,4) = 'year',substr(T_Course_Fees_Details.sem_Year,-1),false)) as SemID,if(substr(substr(T_Course_Fees_Details.sem_Year,-4),1,3) = 'sem','SEM',if(substr(substr(T_Course_Fees_Details.sem_Year,-5),1,4) = 'year','YEAR',false)) as SubType,T_Course_Fees_Details.Sem_Year,if(T_Course_Fees_Details.ProgramType = 'Y001','SEM',if(ProgramType = 'P001','REG',if(ProgramType = 'P002','LAT','FALSE'))) as Type");
// $this->db->from('T_Students_Fees_Status');
// $this->db->join('T_StudentDetails','T_Students_Fees_Status.StudentID=T_StudentDetails.StudentID');
// $this->db->join('T_Course_Fees_Details','T_Students_Fees_Status.FeesType=T_Course_Fees_Details.ID');
// $this->db->where('T_Students_Fees_Status.BatchCode',$batch['BatchCode']);
// $this->db->where('T_Students_Fees_Status.BranchCode',$branchId);
// $this->db->where('T_Students_Fees_Status.CourseID',$courseID);
// $res = $this->db->get();
// return $res->result();
}
function getFeeSemesterDetails($stuid,$bcode,$branchId,$courseID)
{
$this->db->select("T_Course_Fees_Details.ID as FeesID,if(substr(substr(T_Course_Fees_Details.sem_Year,-4),1,3) = 'sem',substr(sem_Year,-1),if(substr(substr(T_Course_Fees_Details.sem_Year,-5),1,4) = 'year',substr(T_Course_Fees_Details.sem_Year,-1),false)) as SemID,if(substr(substr(T_Course_Fees_Details.sem_Year,-4),1,3) = 'sem','SEM',if(substr(substr(T_Course_Fees_Details.sem_Year,-5),1,4) = 'year','YEAR',false)) as SubType,T_Course_Fees_Details.Sem_Year,if(T_Course_Fees_Details.ProgramType = 'Y001','SEM',if(ProgramType = 'P001','REG',if(ProgramType = 'P002','LAT','FALSE'))) as Type");
$this->db->from('T_Students_Fees_Status');
//$this->db->join('T_StudentDetails','T_Students_Fees_Status.StudentID=T_StudentDetails.StudentID');
$this->db->join('T_Course_Fees_Details','T_Students_Fees_Status.FeesType=T_Course_Fees_Details.ID');
$this->db->where('T_Students_Fees_Status.BatchCode',$bcode);
$this->db->where('T_Students_Fees_Status.BranchCode',$branchId);
$this->db->where('T_Students_Fees_Status.CourseID',$courseID['CourseID']);
$this->db->where('T_Students_Fees_Status.StudentID',$stuid);
$res = $this->db->get();
return $res->result();
}
public function getUniversityDetials($UID,$branchId)
{
$this->db->select('UniversityID,UniversityName,MobileNumber,EmailID,Address');
$this->db->from('T_UniversityMaster');
$this->db->where('T_UniversityMaster.BranchCode',$branchId);
$this->db->where('T_UniversityMaster.IsActive',1);
$this->db->where('T_UniversityMaster.UniversityID',$UID['universityID']);
$res = $this->db->get();
return $res->result();
}
//Student Details with All Corresponding Semesters and Subjects
public function getStudentDetails($UID,$courseID,$branchId,$studentIDs)
{
foreach($studentIDs as $key1 => $id)
{
foreach($id['FeeDetails'] as $key2 => $ind)
{
// Get Normel Semester
if(strcasecmp($ind['Type'],'sem') == 0 && strcasecmp($ind['SubType'],'sem') == 0 )
{
$sql = "SELECT T_SemSubMap_Child.SubjectID,T_SubjectMaster.SubjectCode,T_SubjectMaster.SubjectName,T_SemSubMap_Master.SemesterID,T_Batch_Schedule_Child.ScheduleDate,T_Batch_Schedule_Child.FromTime,T_Batch_Schedule_Child.ToTime FROM T_SemSubMap_Child
JOIN T_SubjectMaster on T_SemSubMap_Child.SubjectID = T_SubjectMaster.SubjectID
JOIN T_SemSubMap_Master on T_SemSubMap_Child.MapID = T_SemSubMap_Master.MapID and T_SemSubMap_Master.UniversityID = ? and T_SemSubMap_Master.CourseID = ? and T_SemSubMap_Master.SemesterID = ? and T_SemSubMap_Master.BranchCode = ? and T_SemSubMap_Child.IsActive = 1
LEFT JOIN T_Batch_Schedule_Master on T_Batch_Schedule_Master.UniversityID = ? and T_Batch_Schedule_Master.CourseID = ? and T_Batch_Schedule_Master.BranchCode = ?
LEFT JOIN T_Batch_Schedule_Child on T_Batch_Schedule_Master.SchId = T_Batch_Schedule_Child.SchId and T_SemSubMap_Child.SubjectID = T_Batch_Schedule_Child.SubjectID and T_Batch_Schedule_Child.IsActive = 1
order by T_SemSubMap_Master.SemesterID";
$res = $this->db->query($sql,array($UID['universityID'],$courseID['CourseID'],$ind['SemID'],$branchId,$UID['universityID'],$courseID['CourseID'],$branchId));
//$id['FeeDetails'][$key2] = $res->result();
$in = $res->result();
//array_push($id['FeeDetails'][$key2],$ind);
array_splice($id['FeeDetails'][$key2],0,6,$in);
$studentIDs['NUMTYPE'] = 'SEM';
//return $ind;
}
else if(strcasecmp($ind['Type'],'sem') == 0 && strcasecmp($ind['SubType'],'year') == 0)
{
//GET Year Based Semester
if($ind['SemID'] == 1)//First Year
{
for($i = 1;$i <= 2; $i++)
{
$sql = "SELECT T_SemSubMap_Child.SubjectID,T_SubjectMaster.SubjectCode,T_SubjectMaster.SubjectName,T_SemSubMap_Master.SemesterID,T_Batch_Schedule_Child.ScheduleDate,T_Batch_Schedule_Child.FromTime,T_Batch_Schedule_Child.ToTime FROM T_SemSubMap_Child
JOIN T_SubjectMaster on T_SemSubMap_Child.SubjectID = T_SubjectMaster.SubjectID
JOIN T_SemSubMap_Master on T_SemSubMap_Child.MapID = T_SemSubMap_Master.MapID and T_SemSubMap_Master.UniversityID = ? and T_SemSubMap_Master.CourseID = ? and T_SemSubMap_Master.SemesterID = ? and T_SemSubMap_Master.BranchCode = ? and T_SemSubMap_Child.IsActive = 1
LEFT JOIN T_Batch_Schedule_Master on T_Batch_Schedule_Master.UniversityID = ? and T_Batch_Schedule_Master.CourseID = ? and T_Batch_Schedule_Master.BranchCode = ?
LEFT JOIN T_Batch_Schedule_Child on T_Batch_Schedule_Master.SchId = T_Batch_Schedule_Child.SchId and T_SemSubMap_Child.SubjectID = T_Batch_Schedule_Child.SubjectID and T_Batch_Schedule_Child.IsActive = 1
order by T_SemSubMap_Master.SemesterID";
$res = $this->db->query($sql,array($UID['universityID'],$courseID['CourseID'],$i,$branchId,$UID['universityID'],$courseID['CourseID'],$branchId));
//$id['FeeDetails'][$key2] = $res->result();
$in[] = $res->result();
//array_push($id['FeeDetails'][$key2],$ind);
}
array_splice($id['FeeDetails'][$key2],0,6,$in);
}
else if($ind['SemID'] == 2)//Sec Year
{
for($j = 3;$j <= 4; $j++)
{
$sql = "SELECT T_SemSubMap_Child.SubjectID,T_SubjectMaster.SubjectCode,T_SubjectMaster.SubjectName,T_SemSubMap_Master.SemesterID,T_Batch_Schedule_Child.ScheduleDate,T_Batch_Schedule_Child.FromTime,T_Batch_Schedule_Child.ToTime FROM T_SemSubMap_Child
JOIN T_SubjectMaster on T_SemSubMap_Child.SubjectID = T_SubjectMaster.SubjectID
JOIN T_SemSubMap_Master on T_SemSubMap_Child.MapID = T_SemSubMap_Master.MapID and T_SemSubMap_Master.UniversityID = ? and T_SemSubMap_Master.CourseID = ? and T_SemSubMap_Master.SemesterID = ? and T_SemSubMap_Master.BranchCode = ? and T_SemSubMap_Child.IsActive = 1
LEFT JOIN T_Batch_Schedule_Master on T_Batch_Schedule_Master.UniversityID = ? and T_Batch_Schedule_Master.CourseID = ? and T_Batch_Schedule_Master.BranchCode = ?
LEFT JOIN T_Batch_Schedule_Child on T_Batch_Schedule_Master.SchId = T_Batch_Schedule_Child.SchId and T_SemSubMap_Child.SubjectID = T_Batch_Schedule_Child.SubjectID and T_Batch_Schedule_Child.IsActive = 1
order by T_SemSubMap_Master.SemesterID";
$res = $this->db->query($sql,array($UID['universityID'],$courseID['CourseID'],$j,$branchId,$UID['universityID'],$courseID['CourseID'],$branchId));
//$id['FeeDetails'][$key2] = $res->result();
$in[] = $res->result();
//array_push($id['FeeDetails'][$key2],$ind);
}
array_splice($id['FeeDetails'][$key2],0,6,$in);
}
else if($ind['SemID'] == 3)
{
for($k = 5;$k <= 6; $k++)
{
$sql = "SELECT T_SemSubMap_Child.SubjectID,T_SubjectMaster.SubjectCode,T_SubjectMaster.SubjectName,T_SemSubMap_Master.SemesterID,T_Batch_Schedule_Child.ScheduleDate,T_Batch_Schedule_Child.FromTime,T_Batch_Schedule_Child.ToTime FROM T_SemSubMap_Child
JOIN T_SubjectMaster on T_SemSubMap_Child.SubjectID = T_SubjectMaster.SubjectID
JOIN T_SemSubMap_Master on T_SemSubMap_Child.MapID = T_SemSubMap_Master.MapID and T_SemSubMap_Master.UniversityID = ? and T_SemSubMap_Master.CourseID = ? and T_SemSubMap_Master.SemesterID = ? and T_SemSubMap_Master.BranchCode = ? and T_SemSubMap_Child.IsActive = 1
LEFT JOIN T_Batch_Schedule_Master on T_Batch_Schedule_Master.UniversityID = ? and T_Batch_Schedule_Master.CourseID = ? and T_Batch_Schedule_Master.BranchCode = ?
LEFT JOIN T_Batch_Schedule_Child on T_Batch_Schedule_Master.SchId = T_Batch_Schedule_Child.SchId and T_SemSubMap_Child.SubjectID = T_Batch_Schedule_Child.SubjectID and T_Batch_Schedule_Child.IsActive = 1
order by T_SemSubMap_Master.SemesterID";
$res = $this->db->query($sql,array($UID['universityID'],$courseID['CourseID'],$k,$branchId,$UID['universityID'],$courseID['CourseID'],$branchId));
//$id['FeeDetails'][$key2] = $res->result();
$in[] = $res->result();
//array_push($id['FeeDetails'][$key2],$ind);
}
array_splice($id['FeeDetails'][$key2],0,6,$in);
}
else if($ind['SemID'] == 4)
{
for($l = 7;$l <= 8; $l++)
{
$sql = "SELECT T_SemSubMap_Child.SubjectID,T_SubjectMaster.SubjectCode,T_SubjectMaster.SubjectName,T_SemSubMap_Master.SemesterID,T_Batch_Schedule_Child.ScheduleDate,T_Batch_Schedule_Child.FromTime,T_Batch_Schedule_Child.ToTime FROM T_SemSubMap_Child
JOIN T_SubjectMaster on T_SemSubMap_Child.SubjectID = T_SubjectMaster.SubjectID
JOIN T_SemSubMap_Master on T_SemSubMap_Child.MapID = T_SemSubMap_Master.MapID and T_SemSubMap_Master.UniversityID = ? and T_SemSubMap_Master.CourseID = ? and T_SemSubMap_Master.SemesterID = ? and T_SemSubMap_Master.BranchCode = ? and T_SemSubMap_Child.IsActive = 1
LEFT JOIN T_Batch_Schedule_Master on T_Batch_Schedule_Master.UniversityID = ? and T_Batch_Schedule_Master.CourseID = ? and T_Batch_Schedule_Master.BranchCode = ?
LEFT JOIN T_Batch_Schedule_Child on T_Batch_Schedule_Master.SchId = T_Batch_Schedule_Child.SchId and T_SemSubMap_Child.SubjectID = T_Batch_Schedule_Child.SubjectID and T_Batch_Schedule_Child.IsActive = 1
order by T_SemSubMap_Master.SemesterID";
$res = $this->db->query($sql,array($UID['universityID'],$courseID['CourseID'],$l,$branchId,$UID['universityID'],$courseID['CourseID'],$branchId));
//$id['FeeDetails'][$key2] = $res->result();
$in[] = $res->result();
//array_push($id['FeeDetails'][$key2],$ind);
}
array_splice($id['FeeDetails'][$key2],0,6,$in);
}
$studentIDs['NUMTYPE'] = 'YEAR';
}
else if(strcasecmp($ind['Type'],'REG') == 0)
{
//Get Regular(All Semester)
for($m = 1;$m <= 8; $m++)
{
$sql = "SELECT T_SemSubMap_Child.SubjectID,T_SubjectMaster.SubjectCode,T_SubjectMaster.SubjectName,T_SemSubMap_Master.SemesterID,T_Batch_Schedule_Child.ScheduleDate,T_Batch_Schedule_Child.FromTime,T_Batch_Schedule_Child.ToTime FROM T_SemSubMap_Child
JOIN T_SubjectMaster on T_SemSubMap_Child.SubjectID = T_SubjectMaster.SubjectID
JOIN T_SemSubMap_Master on T_SemSubMap_Child.MapID = T_SemSubMap_Master.MapID and T_SemSubMap_Master.UniversityID = ? and T_SemSubMap_Master.CourseID = ? and T_SemSubMap_Master.SemesterID = ? and T_SemSubMap_Master.BranchCode = ? and T_SemSubMap_Child.IsActive = 1
LEFT JOIN T_Batch_Schedule_Master on T_Batch_Schedule_Master.UniversityID = ? and T_Batch_Schedule_Master.CourseID = ? and T_Batch_Schedule_Master.BranchCode = ?
LEFT JOIN T_Batch_Schedule_Child on T_Batch_Schedule_Master.SchId = T_Batch_Schedule_Child.SchId and T_SemSubMap_Child.SubjectID = T_Batch_Schedule_Child.SubjectID and T_Batch_Schedule_Child.IsActive = 1
order by T_SemSubMap_Master.SemesterID";
$res = $this->db->query($sql,array($UID['universityID'],$courseID['CourseID'],$m,$branchId,$UID['universityID'],$courseID['CourseID'],$branchId));
//$id['FeeDetails'][$key2] = $res->result();
$in[] = $res->result();
//array_push($id['FeeDetails'][$key2],$ind);
}
array_splice($id['FeeDetails'][$key2],0,6,$in);
$studentIDs['NUMTYPE'] = 'REG';
}
else if(strcasecmp($ind['Type'],'LAT') == 0)
{
//Get Later Entry all semester except 1 and 2
for($i = 3;$i <= 8; $i++)
{
$sql = "SELECT T_SemSubMap_Child.SubjectID,T_SubjectMaster.SubjectCode,T_SubjectMaster.SubjectName,T_SemSubMap_Master.SemesterID,T_Batch_Schedule_Child.ScheduleDate,T_Batch_Schedule_Child.FromTime,T_Batch_Schedule_Child.ToTime FROM T_SemSubMap_Child
JOIN T_SubjectMaster on T_SemSubMap_Child.SubjectID = T_SubjectMaster.SubjectID
JOIN T_SemSubMap_Master on T_SemSubMap_Child.MapID = T_SemSubMap_Master.MapID and T_SemSubMap_Master.UniversityID = ? and T_SemSubMap_Master.CourseID = ? and T_SemSubMap_Master.SemesterID = ? and T_SemSubMap_Master.BranchCode = ? and T_SemSubMap_Child.IsActive = 1
LEFT JOIN T_Batch_Schedule_Master on T_Batch_Schedule_Master.UniversityID = ? and T_Batch_Schedule_Master.CourseID = ? and T_Batch_Schedule_Master.BranchCode = ?
LEFT JOIN T_Batch_Schedule_Child on T_Batch_Schedule_Master.SchId = T_Batch_Schedule_Child.SchId and T_SemSubMap_Child.SubjectID = T_Batch_Schedule_Child.SubjectID and T_Batch_Schedule_Child.IsActive = 1
order by T_SemSubMap_Master.SemesterID";
$res = $this->db->query($sql,array($UID['universityID'],$courseID['CourseID'],$i,$branchId,$UID['universityID'],$courseID['CourseID'],$branchId));
//$id['FeeDetails'][$key2] = $res->result();
$in[] = $res->result();
//array_push($id['FeeDetails'][$key2],$ind);
}
array_splice($id['FeeDetails'][$key2],0,6,$in);
$studentIDs['NUMTYPE'] = 'LAT';
}
}
array_splice($studentIDs[$key1]['FeeDetails'],0,10,$id['FeeDetails']) ;
}
//print_r($studentIDs);//die();
return $studentIDs;
}
}

View File

@ -173,6 +173,8 @@ app.constant('JS_REQUIRES', {
'sessionScheduleCtrl':'assets/js/controllers/sessionScheduleCtrl.js',
// generate hall ticket
'generateHallTicketCtrl':'assets/js/controllers/generateHallTicketCtrl.js',
// generate hall ticket
'semcoursemapCtrl':'assets/js/controllers/semcoursemapCtrl.js',
//*** Filters

View File

@ -643,6 +643,37 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com
resolve: loadSequence('ui.select','report_balfeeCtrl','ngTable', 'ladda', 'angular-ladda'),
title: 'Balance Fee Report',
}).state('app.hallTicket', {
url: '/hallticket',
template: '<div ui-view class="fade-in-up"> <div style="margin: auto; width: 50%;padding: 10px;"> HALLTICKET</div> </div>',
title: 'HallTicket',
ncyBreadcrumb: {
label: 'HallTicket'
}
}).state('app.hallTicket.semCourseMap', {
url: '/semcoursemap',
templateUrl: "assets/views/hallticket/semcoursemap.html",
title: ' Course Semester Mapping',
resolve: loadSequence('ladda', 'angular-ladda', 'semcoursemapCtrl','ngTable','ui.select','spin', 'ui.mask'),
ncyBreadcrumb: {
label: ' Course Semester Mapping'
}
}).state('app.hallTicket.batchSchedule', {
url: '/batchchedule',
templateUrl: "assets/views/hallticket/batchchedule.html",
title: 'Batch Schedule',
resolve: loadSequence('ladda', 'angular-ladda', 'semcoursemapCtrl','ngTable','ui.select','spin', 'ui.mask'),
ncyBreadcrumb: {
label: ' Batch Schedule'
}
}).state('app.hallTicket.generateHallTicket', {
url: '/generatehallticket',
templateUrl: "assets/views/hallticket/generatehallticket.html",
title: 'Generate HallTicket',
resolve: loadSequence('ladda', 'angular-ladda', 'generateHallTicketCtrl','ngTable','ui.select','spin', 'ui.mask'),
ncyBreadcrumb: {
label: 'Generate HallTicket'
}
});
// $locationProvider.html5Mode(true);

View File

@ -3,17 +3,29 @@
* controllers for ng-table
* Simple table with sorting and filtering on AngularJS
*/
app.controller('generateHallTicketCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state", function ($scope,$rootScope,toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state) {
app.controller('generateHallTicketCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state","$modal","$log", function ($scope,$rootScope,toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state,$modal,$log) {
$scope.myModel = {
"studentName": "",
"mobileNumber": "",
"universityName":"",
"courseName":""
"courseName":"",
"batchName":""
};
$scope.pdfModel = {
"universityDetails":"",
"studentDetails":"",
"batchDetails":"",
"courseDetails":"",
"centerDetails":"",
"semDataType":""
};
$rootScope.userType = JSON.parse(localStorage.getItem('localObj')).localType;
$scope.existSemesterSubjectMapDetails = [{"UniversityID":"2","UniversityName":"TWO","CourseName":"CNAME"},{"UniversityID":"3","UniversityName":"TWO","CourseName":"CNAME"},{"UniversityID":"4","UniversityName":"TWO","CourseName":"CNAME"}];
$scope.isTblShow = false;
$scope.isLoader = false;
$scope.isLoaderShow = false;
$scope.isLoaderTxt = "Loading...";
// sorting function for table params
$scope.sort = function(keyname){
@ -26,23 +38,26 @@ app.controller('generateHallTicketCtrl', ["$scope","$rootScope","toaster", "$fil
* created by kms
* */
$scope.init = function () {
var getUniv = {
method: 'POST',
url: apiPoint.url + 'getUniversityCourseForFees/',
url: apiPoint.url + 'getUniversityCourseDetails/',
headers: {
'Content-Type': 'application/json'
},
data: {
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchId:JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};
$http(getUniv).then(function (response) {
if (response.data.status==200 && response.data.universityStatus) {
$scope.university=response.data.univerSityDetails;
$scope.university = response.data.univerSityDetails;
$scope.centers = response.data.centerDetails;
//console.log( $scope.university);
} else {
$scope.university="";
$scope.university = "";
}
});
@ -54,12 +69,23 @@ app.controller('generateHallTicketCtrl', ["$scope","$rootScope","toaster", "$fil
* */
$scope.studentInfo="";
$scope.getStudentDetails = function (form,myModel) {
if(myModel.universityName == null || myModel.universityName == '' || myModel.universityName == undefined){
$scope.univId = "";
}
else{
$scope.univId = myModel.universityName.universityID;
}
swal('Select University','','warning');
return false;
}
if(myModel.courseName == '' || myModel.courseName == null || myModel.courseName == undefined){
swal('Select Course','','warning');
return false;
}
if(myModel.batchName == null || myModel.batchName == '' || myModel.batchName == undefined){
swal('Select Batch','','warning');
return false;
}
var firstError = null;
if (form.$invalid) {
@ -77,63 +103,250 @@ app.controller('generateHallTicketCtrl', ["$scope","$rootScope","toaster", "$fil
angular.element('.ng-invalid[name=' + firstError + ']').focus();
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
} else {
var getStudent = {
$scope.selectedStudentsID = [];
$scope.isLoaderShow = true;
$scope.myModel.all = false;
$scope.isTblShow = false;
var university = myModel.universityName;
var course = myModel.courseName;
var batch = myModel.batchName;
var getStudents = {
method: 'POST',
url: apiPoint.url + 'getStudentListFees/',
url: apiPoint.url + 'getStudentListForHallTicket/',
headers: {
'Content-Type': 'application/json'
},
data: {
studentName: myModel.studentName,
mobileNumber: myModel.mobileNumber,
university: $scope.univId,
course:myModel.courseName,
university: university,
course:course,
batch:batch,
requestedtBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID,
requestedDept: JSON.parse(localStorage.getItem('localObj')).localType,
}
};
$http(getStudent).then(function (response) {
if (response.data.status==200 && response.data.studentStatus) {
$scope.studentInfo=response.data.details;
$http(getStudents).then(function (response) {
if (response.data.status == 200 && response.data.studentStatus) {
$scope.studentInfo = response.data.studentDetails;
$scope.isLoaderShow = false;
$scope.isTblShow = true;
// console.log('API');
//console.log($scope.studentInfo);
} else {
}
else
{
$scope.studentInfo="";
}
});
$scope.isLoaderShow = true;
$scope.isTblShow = false;
$scope.isLoaderTxt = "No Records Found";
}
},function(error){
$scope.isLoaderShow = true;
$scope.isTblShow = false;
$scope.isLoaderTxt = "No Records Found";
});
}
}
/*
* get course subjects details
* created by kms
* */
$scope.getSubjectDetails = function (universityID,courseID) {
var getsubject = {
$scope.selectedStudentsID = [];
$scope.isClick = function(e)
{
//console.log(e.target.id);
var ide = e.target;
var val = (ide.checked ? true : false);
var sid = e.target.id;
angular.forEach($scope.studentInfo,function(value,key){
if(sid == value.StudentID)
{
sid = value;
}
});
var pos = $scope.selectedStudentsID.indexOf(sid);
//alert(val);
if(val)
{
if( pos == -1)
{
//console.log("PUSH");
$scope.selectedStudentsID.push(sid);
}
}
else
{
//console.log("POP");
$scope.selectedStudentsID.splice(pos,1);
}
//console.log($scope.selectedStudentsID);
}
$scope.isCheckAll = function(e)
{
var val = (e.target.checked ? true : false);
//$scope.selectedStudentsID = [];
if(val)
{
var len = $scope.studentInfo.length;
var i = 0;
for(i=0;i<len;i++)
{
if($scope.selectedStudentsID.indexOf($scope.studentInfo[i]) === -1)
{
$scope.selectedStudentsID.push($scope.studentInfo[i]);
}
}
}
else
{
$scope.selectedStudentsID = [];
}
//console.log($scope.selectedStudentsID);
}
$scope.generateHallTicket = function()
{
if($scope.studentInfo.length == 0)
{
swal('No Students Found','','warning');return false;
}
if($scope.myModel.centerName == "" || $scope.myModel.centerName == undefined || $scope.myModel.centerName == null)
{
swal('Select Center Name','','warning');return false;
}
if($scope.selectedStudentsID.length == 0)
{
swal('Select Student(s)','','warning');return false;
}
//console.log($scope.selectedStudentsID);
var university = $scope.myModel.universityName;
var course = $scope.myModel.courseName;
var batch = $scope.myModel.batchName;
var dataForHallTicket = {
method: 'POST',
url: apiPoint.url + 'getCourseSubjectDetails/',
url: apiPoint.url + 'getHallTicket/',
headers: {
'Content-Type': 'application/json'
},
data: {
universityID : universityID,
courseID : courseID,
universityID : university,
courseID :course,
batchName:batch,
StudentIDs:$scope.selectedStudentsID,
centerName:$scope.myModel.centerName,
branchId:JSON.parse(localStorage.getItem('localObj')).localBranchID,
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
}
};
$http(getsubject).then(function (response) {
if (response.data.status==200 && response.data.universityStatus) {
$scope.university=response.data.univerSityDetails;
$http(dataForHallTicket).then(function (response) {
if (response.data.status==200 && response.data.hallTicketStatus) {
// console.log(response.data);
$scope.pdfModel.universityDetails = response.data.hallTicketData.UniversityDetails;
$scope.pdfModel.studentDetails = response.data.hallTicketData.studentDetails;
//console.log('API');
//console.log($scope.pdfModel.studentDetails.length);
//console.log(response.data.hallTicketData.studentDetails.length);
$scope.pdfModel.batchDetails = $scope.myModel.batchName;
$scope.pdfModel.courseDetails = $scope.myModel.courseName;
$scope.pdfModel.centerDetails = $scope.myModel.centerName;
$scope.pdfModel.semDataType =response.data.semDataType;
$scope.open($scope.pdfModel);
}
},function(error){ swal('No Records Found','',error); });
}
//Below Functions defined for Hall Ticket generation
$scope.FeesName="" ;
$scope.open = function (PDFdata) {
var modalInstance = $modal.open({
templateUrl: 'assets/views/hallticket/hallTicketPDF.html',
controller: 'HallTicketPDFCtrl',
// size: size,
resolve: {
pdfitems: function () {
//return $scope.FeesName;
return PDFdata;
}
}
});
modalInstance.result.then(function (selectedItem) {
$scope.selected = selectedItem;
}, function () {
$log.info('Modal dismissed at: ' + new Date());
});
};
// }
// generate pdf for student view
}]);
} else {
$scope.university="";
// Controller for Hallticket Modal PDF
app.controller('HallTicketPDFCtrl', ["$scope", "$modalInstance", "pdfitems", function ($scope, $modalInstance, pdfitems) {
}
});
// console.log(pdfitems);
$scope.localPdfUniverityDetails = pdfitems.universityDetails;
$scope.universityNamePDF = $scope.localPdfUniverityDetails[0].UniversityName;
$scope.universityAddressPDF = $scope.localPdfUniverityDetails[0].Address;
$scope.universityEmailPDF = $scope.localPdfUniverityDetails[0].EmailID;
$scope.batchNamePDF = pdfitems.batchDetails.BatchName;
$scope.courseNamePDF = pdfitems.courseDetails.CourseName;
$scope.centerNamePDF = pdfitems.centerDetails.CenterName+''+ pdfitems.centerDetails.CenterAddress;
$scope.semDataTypePDF = pdfitems.semDataType;
//console.log($scope.universityNamePDF+'-'+$scope.localPdfUniverityDetails.UniversityName);
$scope.localPdfStudentDetails = pdfitems.studentDetails;
$scope.printStudentDetails = function() {
angular.forEach($scope.localPdfStudentDetails,function(value,key){
var tempID = '#export'+value.StudentID;
var PDFName = value.Firstname+'-'+value.Lastname;
kendo.drawing.drawDOM( $(tempID),{paperSize: "A4",margin: { top: "1cm", bottom: "1cm" ,left: "3cm",right:"3cm"},scale: 0.8,height: 500} ).then(function(group) {
kendo.drawing.pdf.saveAs(group, PDFName+".pdf");
});
});
}
$scope.ok = function () {
$modalInstance.close($scope.selected.item);
};
$scope.cancel = function () {
$modalInstance.dismiss('cancel');
};
}]);

View File

@ -0,0 +1,603 @@
'use strict';
/**
* controllers for ng-table
* Simple table with sorting and filtering on AngularJS
*/
app.controller('semcoursemapCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state", function ($scope,$rootScope,toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state) {
$scope.myModel = {
"studentName": "",
"mobileNumber": "",
"universityName":"",
"semsterName":""
};
$scope.viewPage = {
"SubjectDetails":[]
};
$scope.editUniversityId = '';//for View Page
$scope.editCourseId = '';//for View Page
$scope.viewPageSemDropDownShowLoading = true;//for View Page
$scope.viewPageSemDropDownShow = false;//for View Page
$scope.viewPageSemDropDownShowLoadingTxt = 'Loading...';//for View Page
$scope.updateButtonTxt = 'UPDATE';//for View Page
$scope.overAllMappedSubjects = [];//for View Page
$scope.semDropDownShow = false;
$scope.semDropDownShowLoading = false;
$scope.saveButtonDisabled = false;
$scope.saveButtonTxt = "SAVE";
$rootScope.userType = JSON.parse(localStorage.getItem('localObj')).localType;
$scope.semDetailsLoadingStatus = false;
$scope.semDetailsLoadingTxt = "";
$scope.selectedCourseName = [];
$scope.selectedUniversityCourseName = '';
$scope.selectedSemSubjetcsSem1 = [];
$scope.selectedSemSubjetcsSem2 = [];
$scope.selectedSemSubjetcsSem3 = [];
$scope.selectedSemSubjetcsSem4 = [];
$scope.selectedSemSubjetcsSem5 = [];
$scope.selectedSemSubjetcsSem6 = [];
$scope.selectedSemSubjetcsSem7 = [];
$scope.selectedSemSubjetcsSem8 = [];
$scope.overallSelectedSubjetcs = [];
// sorting function for table params
$scope.sort = function(keyname){
$scope.sortKey = keyname; //set the sortKey to the param passed
$scope.reverse = !$scope.reverse; //if true make it false and vice versa
}
/*
* init function
* created by kms
* */
$scope.init = function () {
$scope.semDetailsLoadingStatus = true;
$scope.semDetailsLoadingTxt = "Loading...";
var getUniv = {
method: 'POST',
url: apiPoint.url + 'getUniversityCourseDetails/',
headers: {
'Content-Type': 'application/json'
},
data: {
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchId:JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};
$http(getUniv).then(function (response) {
if (response.data.status==200 && response.data.universityStatus) {
$scope.university=response.data.univerSityDetails;
//console.log(response.data.universityStatus);
} else {
$scope.university="";
}
});
$scope.selectedCourseNameC = {
list: $scope.selectedCourseName,
}
//For Get All Semesters and Subjetcs Info for View and Edit
var getAllSemSubjects = {
method: 'GET',
url: apiPoint.url + 'getAllSemSubjects/',
headers: {
'Content-Type': 'application/json'
},
data: {
BranchID: JSON.parse(localStorage.getItem('localObj')).localUserID,
}
};
$http(getAllSemSubjects).then(function (response) {
//console.log(response.data.semsubstatus);
if (response.data.status==200 && response.data.semsubstatus) {
$scope.semDetailsLoadingStatus = false;
$scope.existSemesterSubjectMapDetails = response.data.semsubjects;
//console.log($scope.existSemesterSubjectMapDetails);
//$scope.processDataforViewPage();
}
},function(error) {
$scope.semDetailsLoadingStatus = true;
$scope.semDetailsLoadingTxt = "No Records Found";
});
}
//Assign Courses to Course array for Multiple select
$scope.testFun = function(){
$scope.selectedUniversityCourseName = $scope.myModel.universityName.courseDetails;
if($scope.selectedUniversityCourseName.length == 0){ swal('No Courses Available','','info'); }
$scope.selectedCourseNameC = {
list: $scope.selectedCourseName,
}
}
/*
* get course semester,subjects details
* created by velz
* */
$scope.getSemSubDetails = function(UID,COURSES){
var firstError = null;
if (form.$invalid) {
var field = null, firstError = null;
for (field in form) {
if (field[0] != '$') {
if (firstError === null && !form[field].$valid) {
firstError = form[field].$name;
}
if (form[field].$pristine) {
form[field].$dirty = true;
}
}
}
angular.element('.ng-invalid[name=' + firstError + ']').focus();
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
}
else
{
//console.log(UID+'-'+COURSES.list);
if(UID == undefined || UID == '')
{
swal("Select University");
return false;
}
if(COURSES.list == '')
{
swal("Select Course");
return false;
}
//console.log(JSON.parse(localStorage.getItem('localObj')));
//return false;
$scope.semDropDownShowLoading = false;
$scope.semDropDownShow = false;
$scope.semDropDownShowLoading = true;
var getsubject = {
method: 'POST',
url: apiPoint.url + 'getSemesterSubjectDetails/',
headers: {
'Content-Type': 'application/json'
},
data: {
universityID : UID,
courseID : COURSES,
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchId:JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};
$http(getsubject).then(function (response) {
if(response.data.status == 200)
{
$scope.semDropDownShowLoading = false;
$scope.semDropDownShow = true;
$scope.subjects = [];// For Main Dropdown
$scope.subjectsFromDBtoComapare = [];
//$scope.semesters = response.data.semesterDetails;
$scope.subjectsFromDB = response.data.subjectDetails; //Store Response Data to subjectsFromDB
angular.forEach($scope.subjectsFromDB,function(value,key){
$scope.subjects.push(value);// For Main Dropdown
});
$scope.selectedSubjetcsSem1C = {list: $scope.selectedSemSubjetcsSem1};
$scope.selectedSubjetcsSem2C = {list: $scope.selectedSemSubjetcsSem2};
$scope.selectedSubjetcsSem3C = {list: $scope.selectedSemSubjetcsSem3};
$scope.selectedSubjetcsSem4C = {list: $scope.selectedSemSubjetcsSem4};
$scope.selectedSubjetcsSem5C = {list: $scope.selectedSemSubjetcsSem5};
$scope.selectedSubjetcsSem6C = {list: $scope.selectedSemSubjetcsSem6};
$scope.selectedSubjetcsSem7C = {list: $scope.selectedSemSubjetcsSem7};
$scope.selectedSubjetcsSem8C = {list: $scope.selectedSemSubjetcsSem8};
}
},function(error){
$scope.semDropDownShowLoading = false;
swal('No Subjetcs Found','','error');
} );
}
}
/*
* Remove Subjects from Master Subjects Arry
* after selecting subjects for each semester
* created by velz
* */
$scope.removeSelectedSubjetcs = function(newsublist){
//Every time copy all subjetcs from subjectsFromDB to ompare
angular.forEach($scope.subjectsFromDB,function(value,key){
$scope.subjectsFromDBtoComapare.push(value);
});
//For Compare Single Semesters Array and Master Subjetcs Array and remove selected subjects from Master Subjetcs Array
angular.forEach(newsublist,function(value,key){
angular.forEach($scope.subjects,function(value2,key2){
if(value.SubjectID == value2.SubjectID)
{
$scope.subjects.splice(key2,1);
}
});
});
//For Concat all subjetcs from all semsters.
$scope.overallSelectedSubjetcs=[].concat($scope.selectedSubjetcsSem1C.list,$scope.selectedSubjetcsSem2C.list,$scope.selectedSubjetcsSem3C.list,$scope.selectedSubjetcsSem4C.list,$scope.selectedSubjetcsSem5C.list,$scope.selectedSubjetcsSem6C.list,$scope.selectedSubjetcsSem7C.list,$scope.selectedSubjetcsSem8C.list);
//For Compare Over all selected subjects And Master Subjetcs to avoid duplicate.
angular.forEach($scope.overallSelectedSubjetcs,function(value,key){
angular.forEach($scope.subjectsFromDBtoComapare,function(value2,key2){
if(value.SubjectID != value2.SubjectID)
{
if ($scope.overallSelectedSubjetcs.indexOf(value2) == -1 && $scope.subjects.indexOf(value2) == -1)
{
$scope.subjects.push(value2);
$scope.subjectsFromDBtoComapare.splice(key2,1);
}
}
});
});
$scope.subjectsFromDBtoComapare = [];
}
$scope.saveAll = function()
{
//swal('SAVEALL',$scope.myModel.universityName.universityID,'warning');
var universityID = $scope.myModel.universityName.universityID;
var courseIDs = $scope.selectedCourseNameC.list;
var sem1 = $scope.selectedSubjetcsSem1C.list;
var sem2 = $scope.selectedSubjetcsSem2C.list;
var sem3 = $scope.selectedSubjetcsSem3C.list;
var sem4 = $scope.selectedSubjetcsSem4C.list;
var sem5 = $scope.selectedSubjetcsSem5C.list;
var sem6 = $scope.selectedSubjetcsSem6C.list;
var sem7 = $scope.selectedSubjetcsSem7C.list;
var sem8 = $scope.selectedSubjetcsSem8C.list;
// console.log(universityID+'-'+courseIDs);
// console.log(courseIDs);
// console.log(sem1);
// console.log(sem2);
// console.log(sem3);
// console.log(sem4);
// console.log(sem5);
// console.log(sem6);
// console.log(sem7);
// console.log(sem8);
var semestersArray = [];
for(var i = 1; i<= 8 ;i++)
{
var s = 'sem'+i;
semestersArray.push(eval(s));
}
if(universityID == null|| universityID == undefined){ swal("Select University"); return false; }
if(courseIDs == '' || courseIDs.length == 0){ swal("Select Course"); return false; }
if(sem1.length == 0 && sem2.length == 0 && sem3.length == 0 && sem4.length == 0 && sem5.length == 0 && sem6.length == 0 && sem7.length == 0 && sem8.length == 0){
swal("Select Subjetcs"); return false;
}
$scope.saveButtonDisabled = true;
$scope.saveButtonTxt = "SAVEING...";
swal('This one takes a while..!',' Wait until confirming message.','info');
//console.log(semestersArray);
//return false;
var saveAllInfo = {
method: 'POST',
url: apiPoint.url + 'saveAllSemSubMapping/',
headers: {
'Content-Type': 'application/json'
},
data: {
universityID : universityID,
courseID : courseIDs,
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchId:JSON.parse(localStorage.getItem('localObj')).localBranchID,
Semesters:semestersArray
}
};
$http(saveAllInfo).then(function(response) {
if(response.data.status == 200 && response.data.txtStatus == 1)
{
//console.log(response);
$scope.saveButtonTxt = "SAVED";
swal('Saved!','Good Job','success')
$state.go($state.current, {}, {reload: true});
}
else if(response.data.status == 200 && response.data.txtStatus == 2){
//console.log(response);
$scope.saveButtonTxt = "EXIST";
swal('Record Exists!','Try Edit','warning')
$state.go($state.current, {}, {reload: true});
}
},function(error){
swal('Some Thing Went Wrong!','Try Later','error')
$state.go($state.current, {}, {reload: true});
});
}
$scope.processDataforViewPage = function()
{
//console.log('PROCESS FUNCTION');
var tArry = [];
angular.forEach($scope.existSubjectDetails,function(value,key){
//concat all mapped subjects into one single arry for future comparisan purpose.
$scope.overAllMappedSubjects.push({'SubjectID':value.SubjectID,'SubjectCode':value.SubjectCode,'SubjectName':value.SubjectName});
if(tArry.indexOf(value.SemesterID) == -1)
{
tArry.push(value.SemesterID);
if(value.SubjectID != null){
$scope.viewPage.SubjectDetails[value.SemesterID]=new Array({'SubjectID':value.SubjectID,'SubjectCode':value.SubjectCode,'SubjectName':value.SubjectName});
}
}
else
{
if(value.SubjectID != null){
$scope.viewPage.SubjectDetails[value.SemesterID].push({'SubjectID':value.SubjectID,'SubjectCode':value.SubjectCode,'SubjectName':value.SubjectName});
}
}
});
// console.log($scope.viewPage.SubjectDetails);
//console.log($scope.overAllMappedSubjects);
// return false;
$scope.selectedSubjetcsSem1ViewPage = {list: $scope.viewPage.SubjectDetails[1]};
$scope.selectedSubjetcsSem2ViewPage = {list: $scope.viewPage.SubjectDetails[2]};
$scope.selectedSubjetcsSem3ViewPage = {list: $scope.viewPage.SubjectDetails[3]};
$scope.selectedSubjetcsSem4ViewPage = {list: $scope.viewPage.SubjectDetails[4]};
$scope.selectedSubjetcsSem5ViewPage = {list: $scope.viewPage.SubjectDetails[5]};
$scope.selectedSubjetcsSem6ViewPage = {list: $scope.viewPage.SubjectDetails[6]};
$scope.selectedSubjetcsSem7ViewPage = {list: $scope.viewPage.SubjectDetails[7]};
$scope.selectedSubjetcsSem8ViewPage = {list: $scope.viewPage.SubjectDetails[8]};
$scope.viewPageSemDropDownShowLoading = false;
$scope.viewPageSemDropDownShow = true;
angular.forEach($scope.overAllMappedSubjects,function(value,key){
angular.forEach($scope.overAllSubjects,function(value2,key2){
if(value.SubjectID == value2.SubjectID)
{
$scope.overAllSubjects.splice(key2,1);
}
});
});
}
$scope.setEditId = function (uid,cid)
{
//alert(uid+'-'+cid);
$scope.editUniversityId = uid;
$scope.editCourseId = cid;
$scope.getIndividualCourseSemMappingDetails(uid,cid);
}
$scope.cancel = function()
{
$scope.editUniversityId = '';
$scope.editCourseId = '';
$scope.viewPageSemDropDownShow = false;
$scope.viewPageSemDropDownShowLoading = true;
$scope.viewPage.SubjectDetails[1] = "";
$scope.viewPage.SubjectDetails[2] = "";
$scope.viewPage.SubjectDetails[3] = "";
$scope.viewPage.SubjectDetails[4] = "";
$scope.viewPage.SubjectDetails[5] = "";
$scope.viewPage.SubjectDetails[6] = "";
$scope.viewPage.SubjectDetails[7] = "";
$scope.viewPage.SubjectDetails[8] = "";
}
//Get Individual Course Sem Mapping Details for edit page
$scope.getIndividualCourseSemMappingDetails = function(uid,cid)
{
var getIndCourseSemDetails = {
method: 'POST',
url: apiPoint.url + 'getIndividualCourseSemMappingDetails/',
headers: {
'Content-Type': 'application/json'
},
data: {
universityID : uid,
courseID : cid,
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchId:JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};
$http(getIndCourseSemDetails).then(function(response) {
if(response.data.status == 200 && response.data.subjectStatus)
{
//console.log(response.data);
$scope.existSubjectDetails = response.data.subjects;
$scope.overAllSubjectsFromDB= response.data.overAllSubjects;
$scope.overAllSubjects = [];
//$scope.overAllSubjectsFromDBtoCompare = []; //Just Empty array for $scope.modifySelectedSubjetcs funciton comparison use
angular.forEach($scope.overAllSubjectsFromDB,function(value,key){
$scope.overAllSubjects.push(value);
});
$scope.processDataforViewPage();
}
else {
// $scope.saveButtonTxt = "EXIST";
swal('Record Not Found!','','error')
$state.go($state.current, {}, {reload: true});
}
});
}
/*
* Remove Subjects from Master Subjects Arry for view Page
* after selecting/removing subjects for each semester
* created by velz
* */
$scope.modifySelectedSubjetcs = function(newsublist){
angular.forEach(newsublist,function(value,key){
angular.forEach($scope.overAllSubjects,function(value2,key2){
if(value.SubjectID == value2.SubjectID)
{
$scope.overAllSubjects.splice(key2,1);
}
});
});
}
/*
* After Remove Subject from Individual Semester
* get removed item and push it to overAllSubjects array for other semster
* created by velz
* */
$scope.itemRemove = function(item)
{
$scope.overAllSubjects.push(item);
}
/*
* Update semster and Subjects Info
* created by velz
* */
$scope.updateAll = function(UniversityID,CourseID)
{
var universityID = UniversityID;
var courseID = CourseID;
var sem1 = $scope.selectedSubjetcsSem1ViewPage.list;
var sem2 = $scope.selectedSubjetcsSem2ViewPage.list;
var sem3 = $scope.selectedSubjetcsSem3ViewPage.list;
var sem4 = $scope.selectedSubjetcsSem4ViewPage.list;
var sem5 = $scope.selectedSubjetcsSem5ViewPage.list;
var sem6 = $scope.selectedSubjetcsSem6ViewPage.list;
var sem7 = $scope.selectedSubjetcsSem7ViewPage.list;
var sem8 = $scope.selectedSubjetcsSem8ViewPage.list;
var semestersArray = [];
for(var i = 1; i<= 8 ;i++)
{
var s = 'sem'+i;
semestersArray.push(eval(s));
}
if(universityID == null|| universityID == undefined){ swal("Select University"); return false; }
if(courseID == ''){ swal("Select Course"); return false; }
if(sem1.length == 0 && sem2.length == 0 && sem3.length == 0 && sem4.length == 0 && sem5.length == 0 && sem6.length == 0 && sem7.length == 0 && sem8.length == 0){
swal("Select Subjetcs"); return false;
}
//$scope.updateButtonDisabled = true;
$scope.updateButtonTxt = "UPDATING...";
swal('This one takes a while..!',' Wait until confirming message.','info');
//console.log(semestersArray);
//return false;
var updateAllInfo = {
method: 'POST',
url: apiPoint.url + 'updateAllSemSubMapping/',
headers: {
'Content-Type': 'application/json'
},
data: {
universityID : universityID,
courseID : courseID,
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchId:JSON.parse(localStorage.getItem('localObj')).localBranchID,
Semesters:semestersArray
}
};
$http(updateAllInfo).then(function(response) {
if(response.data.status == 200 && response.data.txtStatus)
{
//console.log(response);
$scope.updateButtonTxt = "SAVED";
swal('Saved!','Good Job','success')
$state.go($state.current, {}, {reload: true});
}
},function(error){
swal('Some Thing Went Wrong!','Try Later','error')
$state.go($state.current, {}, {reload: true});
});
}
}]);

View File

@ -0,0 +1,182 @@
<style>
b.fa {
display: inline-block;
border-radius: 60px;
box-shadow: 0px 0px 2px #FF6600;
padding: 0.5em 0.6em;
}
b.fa1 {
display: inline-block;
border-radius: 60px;
box-shadow: 0px 0px 2px green;
padding: 0.5em 0.6em;
}
a {
color: #007AFF;
}
</style>
<!-- start: PAGE TITLE -->
<section id="page-title">
<div class="row">
<div class="col-sm-8">
<h1 class="mainTitle" translate="Generate Hallticket">{{ mainTitle }}</h1>
<span class="mainDescription">Generate Halltickets for Student </span>
</div>
<div ncy-breadcrumb></div>
</div>
</section>
<!-- end: PAGE TITLE -->
<!-- start: LIST GROUP -->
<div class="container-fluid container-fullw bg-white" ng-controller="generateHallTicketCtrl" data-ng-init="init()">
<div class="row">
<form name="Form" id="form" novalidate method="post">
<fieldset>
<legend>Search</legend>
<div class="row">
<div class="col-md-3 form-group">
<label>
University
</label>
<select class="form-control" name="university" tabindex="1" id="university"
ng-model="myModel.universityName"
ng-options="i.universityName for i in university" ng-change="">
<option value=""> Select University</option>
</select>
<!-- <pre>{{myModel.universityName | json}}</pre> -->
</div>
<div class="col-md-4 form-group">
<label>
Course
</label>
<select class="form-control" name="course" tabindex="4" id="course"
ng-model="myModel.courseName"
ng-options="courseDetails.CourseName for courseDetails in myModel.universityName.courseDetails" ng-change="">
<option value=""> Select Course</option>
</select>
<!-- <pre>{{myModel.courseName|json}}</pre> -->
</div>
<div class="col-md-2 form-group">
<label>
Batch Name
</label>
<select class="form-control" name="batch" tabindex="4" id="batch"
ng-model="myModel.batchName"
ng-options="batchDetails.BatchName for batchDetails in myModel.universityName.batchDetails" ng-change="">
<option value=""> Select Batch</option>
</select>
<!-- <pre>{{myModel.batchName | json}}</pre> -->
</div>
<div class="col-md-3 form-group">
<br>
<button type="button" ladda="ldloading1.zoom_in" tabindex="5" class="btn btn-wide btn-info" data-style="zoom-in" ng-click="getStudentDetails(Form,myModel);">GET STUDENTS</button>
</div>
</div>
<div class="row">
<div class="col-md-5 form-group">
<label>
Center Name
</label>
<select class="form-control" name="center" tabindex="4" id="center"
ng-model="myModel.centerName"
ng-options="centerDetails.CenterName for centerDetails in centers" ng-change="">
<option value=""> Center Name</option>
</select>
<!-- <pre>{{myModel.centerName | json}}</pre> -->
</div>
<div class="col-md-3 form-group">
<!-- <div class="pull-right"> -->
<br>
<button type="button" ladda="ldloading1.zoom_in" tabindex="6" class="btn btn-wide btn-success" data-style="zoom-in" ng-click="generateHallTicket();">GENERATE</button>
<!-- </div> -->
</div>
</div>
</fieldset>
<div class="row">
<div class="col-md-12" ng-if="isLoaderShow">
<center> <h1>{{isLoaderTxt}}</h1> </center>
</div>
</div>
<div class="row">
<div class="col-md-12" ng-if="isTblShow">
<div class="table-responsive">
<table class="table table-hover">
<thead>
<tr>
<th><input type="checkbox" ng-model="myModel.all" id="all" name="all" ng-click="isCheckAll($event);" class="form-control"></th>
<th ng-click="sort('Firstname')">Student 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('UniversityShortName')">University Short Name -->
<!-- <span class="glyphicon sort-icon" ng-show="sortKey=='UniversityShortName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span> -->
<!-- </th> -->
<th ng-click="sort('MobileNumber')">Mobile No
<span class="glyphicon sort-icon" ng-show="sortKey=='MobileNumber'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th ng-click="sort('EmailID')">EmailID
<span class="glyphicon sort-icon" ng-show="sortKey=='EmailID'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<!-- <th>Status</th> -->
<!-- <th style="text-align: center;"> Action -->
<!-- </th> -->
</tr>
</thead>
<tbody dir-paginate="p in studentInfo|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10">
<tr>
<td><input type="checkbox" ng-checked="myModel.all" id="{{p.StudentID}}" name="{{p.StudentID}}" class="form-control" ng-click="isClick($event);"></td>
<td>{{p.Firstname}}{{p.Lastname}}</td>
<!-- <td>{{p.UniversityShortName}}</td> -->
<td>{{p.MobileNumber}}</td>
<td>{{p.EmailID}}</td>
</tr>
</tbody>
</table>
<dir-pagination-controls max-size="10" direction-links="true" boundary-links="true">
</dir-pagination-controls>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- end: LIST GROUP -->

View File

@ -0,0 +1,163 @@
<style>
<!-- table.a { -->
<!-- border-collapse: collapse; -->
<!-- } -->
<!-- th.a, td.a { -->
<!-- padding: 5px; -->
<!-- text-align: left; -->
<!-- border-bottom: 1px solid #ddd; -->
<!-- text-align:center; -->
<!-- } -->
</style>
<!-- start: UI BOOTSTRAP MODALS -->
<div class="container-fluid container-fullw bg-white">
<!-- /// controller: 'ModalDemoCtrl' - localtion: assets/js/controllers/bootstrapCtrl.js /// -->
<div ng-controller="generateHallTicketCtrl">
<div class="row">
<div align="right">
<button class="btn btn-success btn-sm" ng-click="printStudentDetails();">Print</button>
</div>
</div>
<div class ="row" ng-repeat="studentObj in localPdfStudentDetails" and ng-if="studentObj.Firstname">
<div class="row" id="export{{studentObj.StudentID}}">
<div class="col-md-12">
<center>
<table >
<tbody>
<tr><td>
<div class="col-md-12" id="university" style="font-family:Arial, Helvetica, sans-serif;font-size:10px;">
<table width="100%">
<tbody>
<tr><td rowspan="3" width="20%" style="text-align:center;">
<img src="http://1.bp.blogspot.com/-npXerPJ9HFc/VGv__7L_VRI/AAAAAAAADQI/nBjI6T6Vhzo/s1600/SSSIHL%2Blogo.jpg" alt="Not Available" width="50" height="50">
</td><td style="text-align:center;">
<h4>{{universityNamePDF}}</h4></td></tr>
<tr><td style="text-align:center;">{{universityAddressPDF}}</td></tr>
<tr><center><td style="text-align:center;">{{universityEmailPDF}}</td></center></tr>
</tbody></table>
</div>
</div>
<div class="col-md-12" id="student">
<table class = "table" border="1" style="font-family:Arial, Helvetica, sans-serif;font-size:6px;">
<tbody>
<tr><td colspan="2"><b><center>ADMIT CARD&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;&nbsp;{{courseNamePDF}}&nbsp;&nbsp;&nbsp; EXAMINATION&nbsp;&nbsp;&nbsp;{{batchNamePDF}}</center></b></td><td rowspan="3" style="width: 1px;"><img src="images/{{studentObj.ProfilePicPath}}" alt="Not Available" width="50" height="50"></td></tr>
<tr><td style="border"><b><center>Reg No :</b>{{studentObj.EnrollmentID}}<center></td><td><b><center>Name :</b> {{studentObj.Firstname}}&nbsp;{{studentObj.Lastname}}<center></td></tr>
<tr><td colspan="2"><center><b>Centre:</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{centerNamePDF}}</center></td></tr>
</tbody>
</table>
</div>
<div class="col-md-12" id="subjects" >
<table border="1" width = "100%" style="font-family:Arial, Helvetica, sans-serif;font-size:7px;">
<thead><tr><th width="5%"><center>Sem/</br>Year</center></th><th width="12%"><center>Subject Code</center></th><th><center>Subject Name</center></th><th width="12%"><center>Date</center></th><th width="12%"><center>From Time</center></th><th width="12%"><center>To Time</center></th><th width="5%"><center>Invigi.</br>Sign</center></th></tr></thead>
<!-- this first tbody for subjets from semester type -->
<tbody ng-repeat ="subjects in studentObj.FeeDetails" and ng-if="semDataTypePDF == 'SEM' ">
<tr ng-repeat="sub in subjects"><td >0{{sub.SemesterID}}</td><td style="padding-left:3px;">{{sub.SubjectCode}}</td><td style="padding-left:3px;">{{sub.SubjectName}}</td><td >{{sub.ScheduleDate | date: "dd-MM-y" }}</td><td>{{sub.FromTime}}</td><td >{{sub.ToTime}}</td><td >&nbsp;</td></tr>
</tbody>
<!-- the next four tbody for subjets from Year type -->
<tbody ng-repeat ="subjects in studentObj.FeeDetails[0]" and ng-if="semDataTypePDF == 'YEAR' ">
<tr ng-repeat="sub in subjects"><td>0{{sub.SemesterID}}</td><td style="padding-left:3px;">{{sub.SubjectCode}}</td><td style="padding-left:3px;">{{sub.SubjectName}}</td><td>{{sub.ScheduleDate | date: "dd-MM-y" }}</td><td>{{sub.FromTime}}</td><td>{{sub.ToTime}}</td><td>&nbsp;</td></tr>
</tbody>
<tbody ng-repeat ="subjects in studentObj.FeeDetails[1]" and ng-if="semDataTypePDF == 'YEAR' ">
<tr ng-repeat="sub in subjects"><td>0{{sub.SemesterID}}</td><td style="padding-left:3px;">{{sub.SubjectCode}}</td><td style="padding-left:3px;">{{sub.SubjectName}}</td><td>{{sub.ScheduleDate | date: "dd-MM-y" }}</td><td>{{sub.FromTime}}</td><td>{{sub.ToTime}}</td><td>&nbsp;</td></tr>
</tbody>
<tbody ng-repeat ="subjects in studentObj.FeeDetails[2]" and ng-if="semDataTypePDF == 'YEAR' ">
<tr ng-repeat="sub in subjects"><td>0{{sub.SemesterID}}</td><td style="padding-left:3px;">{{sub.SubjectCode}}</td><td style="padding-left:3px;">{{sub.SubjectName}}</td><td>{{sub.ScheduleDate | date: "dd-MM-y" }}</td><td>{{sub.FromTime}}</td><td>{{sub.ToTime}}</td><td>&nbsp;</td></tr>
</tbody>
<tbody ng-repeat ="subjects in studentObj.FeeDetails[3]" and ng-if="semDataTypePDF == 'YEAR' ">
<tr ng-repeat="sub in subjects"><td>0{{sub.SemesterID}}</td><td style="padding-left:3px;">{{sub.SubjectCode}}</td><td style="padding-left:3px;">{{sub.SubjectName}}</td><td>{{sub.ScheduleDate | date: "dd-MM-y" }}</td><td>{{sub.FromTime}}</td><td>{{sub.ToTime}}</td><td>&nbsp;</td></tr>
</tbody>
<!-- the next four tbody for subjets from Regular and Lateral type -->
<tbody ng-repeat ="subjects in studentObj.FeeDetails[0]" and ng-if="semDataTypePDF == 'REG' || semDataTypePDF == 'LAT' ">
<tr ng-repeat="sub in subjects"><td>0{{sub.SemesterID}}</td><td style="padding-left:3px;">{{sub.SubjectCode}}</td><td style="padding-left:3px;">{{sub.SubjectName}}</td><td>{{sub.ScheduleDate | date: "dd-MM-y" }}</td><td>{{sub.FromTime}}</td><td>{{sub.ToTime}}</td><td>&nbsp;</td></tr>
</tbody>
<tbody ng-repeat ="subjects in studentObj.FeeDetails[1]" and ng-if="semDataTypePDF == 'REG' || semDataTypePDF == 'LAT' ">
<tr ng-repeat="sub in subjects"><td>0{{sub.SemesterID}}</td><td style="padding-left:3px;">{{sub.SubjectCode}}</td><td style="padding-left:3px;">{{sub.SubjectName}}</td><td>{{sub.ScheduleDate | date: "dd-MM-y" }}</td><td>{{sub.FromTime}}</td><td>{{sub.ToTime}}</td><td>&nbsp;</td></tr>
</tbody>
<tbody ng-repeat ="subjects in studentObj.FeeDetails[2]" and ng-if="semDataTypePDF == 'REG' || semDataTypePDF == 'LAT' ">
<tr ng-repeat="sub in subjects"><td>0{{sub.SemesterID}}</td><td style="padding-left:3px;">{{sub.SubjectCode}}</td><td style="padding-left:3px;">{{sub.SubjectName}}</td><td>{{sub.ScheduleDate | date: "dd-MM-y" }}</td><td>{{sub.FromTime}}</td><td>{{sub.ToTime}}</td><td>&nbsp;</td></tr>
</tbody>
<tbody ng-repeat ="subjects in studentObj.FeeDetails[3]" and ng-if="semDataTypePDF == 'REG' || semDataTypePDF == 'LAT' ">
<tr ng-repeat="sub in subjects"><td>0{{sub.SemesterID}}</td><td style="padding-left:3px;">{{sub.SubjectCode}}</td><td style="padding-left:3px;">{{sub.SubjectName}}</td><td>{{sub.ScheduleDate | date: "dd-MM-y" }}</td><td>{{sub.FromTime}}</td><td>{{sub.ToTime}}</td><td>&nbsp;</td></tr>
</tbody>
<tbody ng-repeat ="subjects in studentObj.FeeDetails[4]" and ng-if="semDataTypePDF == 'REG' || semDataTypePDF == 'LAT' ">
<tr ng-repeat="sub in subjects"><td>0{{sub.SemesterID}}</td><td style="padding-left:3px;">{{sub.SubjectCode}}</td><td style="padding-left:3px;">{{sub.SubjectName}}</td><td>{{sub.ScheduleDate | date: "dd-MM-y" }}</td><td>{{sub.FromTime}}</td><td>{{sub.ToTime}}</td><td>&nbsp;</td></tr>
</tbody>
<tbody ng-repeat ="subjects in studentObj.FeeDetails[5]" and ng-if="semDataTypePDF == 'REG' || semDataTypePDF == 'LAT' ">
<tr ng-repeat="sub in subjects"><td>0{{sub.SemesterID}}</td><td style="padding-left:3px;">{{sub.SubjectCode}}</td><td style="padding-left:3px;">{{sub.SubjectName}}</td><td>{{sub.ScheduleDate | date: "dd-MM-y" }}</td><td>{{sub.FromTime}}</td><td>{{sub.ToTime}}</td><td>&nbsp;</td></tr>
</tbody>
<tbody ng-repeat ="subjects in studentObj.FeeDetails[6]" and ng-if="semDataTypePDF == 'REG' || semDataTypePDF == 'LAT' ">
<tr ng-repeat="sub in subjects"><td>0{{sub.SemesterID}}</td><td style="padding-left:3px;">{{sub.SubjectCode}}</td><td style="padding-left:3px;">{{sub.SubjectName}}</td><td>{{sub.ScheduleDate | date: "dd-MM-y" }}</td><td>{{sub.FromTime}}</td><td>{{sub.ToTime}}</td><td>&nbsp;</td></tr>
</tbody>
<tbody ng-repeat ="subjects in studentObj.FeeDetails[7]" and ng-if="semDataTypePDF == 'REG' || semDataTypePDF == 'LAT' ">
<tr ng-repeat="sub in subjects"><td>0{{sub.SemesterID}}</td><td style="padding-left:3px;">{{sub.SubjectCode}}</td><td style="padding-left:3px;">{{sub.SubjectName}}</td><td>{{sub.ScheduleDate | date: "dd-MM-y" }}</td><td>{{sub.FromTime}}</td><td>{{sub.ToTime}}</td><td>&nbsp;</td></tr>
</tbody>
</table>
<div class="col-md-12" style="font-family:Arial, Helvetica, sans-serif;font-size:6px;">
<div class="pullright">
<label>Note:</label>
<p>
<ul>
<li>Without Identification Card Candidates shallnot be Allowed to write examintaion.</li>
<li>For further instructions refer to the faceing sheet of the Answer book before writing examintaion.</li>
<li>Carrying Mobile Phone into the examintaion hall is strictly prohibited.</li>
<li>Attend the examintaion as per mentioned above.</li>
</ul>
</p>
<p>&nbsp;</p>
<div class = "col-md-12">
<div class="col-md-3">
Signature of Student
</div>
<div class="col-md-3 col-md-offset-6">Controller of Examintaion</div>
</div>
</div>
</div>
</div>
</td></tr>
</tbody>
</table>
<center>
<!-- </div> -->
</div>
</div>
</div>
</div>
<!-- end: UI BOOTSTRAP MODALS -->

View File

@ -0,0 +1,561 @@
<style>
b.fa {
display: inline-block;
border-radius: 60px;
box-shadow: 0px 0px 2px #FF6600;
padding: 0.5em 0.6em;
}
b.fa1 {
display: inline-block;
border-radius: 60px;
box-shadow: 0px 0px 2px green;
padding: 0.5em 0.6em;
}
a {
color: #007AFF;
}
</style>
<!-- start: PAGE TITLE -->
<section id="page-title">
<div class="row">
<div class="col-sm-8">
<h1 class="mainTitle" translate="Course Semester Mapping">{{ mainTitle }}</h1>
<span class="mainDescription">Allocate Courses to Corresponding Semesters </span>
</div>
<div ncy-breadcrumb></div>
</div>
</section>
<!-- end: PAGE TITLE -->
<!-- start: LIST GROUP -->
<div class="container-fluid container-fullw bg-white" ng-controller="semcoursemapCtrl" data-ng-init="init()">
<tabset class="tabbable">
<tab heading="View Semesters" id="semDetails">
<fieldset>
<div class="row" ng-if="semDetailsLoadingStatus">
<div class="col-md-12">
<center><h1>{{semDetailsLoadingTxt}}</h1></center>
</div>
</div>
<div class="col-md-12" ng-if="!semDetailsLoadingStatus">
<div class="row">
<div class="col-md-3">
<script>
$(function () {
$("#search").focus();
});
</script>
<input class="form-control" type="text" ng-model="search" id="search" autofocus tabindex="1" placeholder="Search" /><br><br>
</div>
</div>
<div class="table-responsive">
<table class="table table-hover">
<thead>
<tr>
<th ng-click="sort('UniversityID')">University ID
<span class="glyphicon sort-icon" ng-show="sortKey=='UniversityID'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th ng-click="sort('UniversityName')">University Name
<span class="glyphicon sort-icon" ng-show="sortKey=='UniversityName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th ng-click="sort('CourseName')">Course Name
<span class="glyphicon sort-icon" ng-show="sortKey=='CourseName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<!-- <th>Status</th> -->
<th style="text-align: center;"> Action
</th>
</tr>
</thead>
<tbody dir-paginate="p in existSemesterSubjectMapDetails|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10">
<tr>
<td>{{p.UniversityID}}</td>
<td>{{p.UniversityName}}</td>
<td>{{p.CourseName}}({{p.CourseCode}})</td>
<td style="text-align: center;">
<input type=button class="btn btn-info btn-xs" ladda="ldloading1.zoom_in" id="editRowBtn{{p.UniversityID}}" value="Edit"
ng-click="setEditId(p.UniversityID,p.CourseID);">
</td>
</tr>
<tr ng-show="editUniversityId === p.UniversityID && editCourseId === p.CourseID" ng-if="editUniversityId === p.UniversityID && editCourseId === p.CourseID">
<td colspan="6">
<div class="col-md-12">
<fieldset>
<legend>
Semester Details
</legend>
<div class="row" ng-if="viewPageSemDropDownShowLoading">
<div class="col-md-12 form-group">
<center><h1>{{viewPageSemDropDownShowLoadingTxt}}</h1></center>
</div>
</div>
<div class="row" ng-if="viewPageSemDropDownShow">
<label><b>Year 1-Subjetcs</b></label>
<div class="col-md-12">
<div class="col-md-6 form-group">
<label>
<b>Semester 1 </b>
</label>
<ui-select multiple ng-model="selectedSubjetcsSem1ViewPage.list" tabindex="4" id="sem1" ng-change="modifySelectedSubjetcs(selectedSubjetcsSem1ViewPage.list);" on-remove="itemRemove($item);">
<ui-select-match placeholder="Select Subjetcs" >
{{$item.SubjectName}}
</ui-select-match>
<ui-select-choices
repeat="x in overAllSubjects | filter:$select.search">
{{x.SubjectName}}
</ui-select-choices>
</ui-select>
</div>
<div class="col-md-6 form-group">
<label>
<b>Semester 2</b>
</label>
<ui-select multiple ng-model="selectedSubjetcsSem2ViewPage.list" tabindex="5" ng-change="modifySelectedSubjetcs(selectedSubjetcsSem2ViewPage.list);" on-remove="itemRemove($item);">
<ui-select-match placeholder="Select Subjetcs" >
{{$item.SubjectName}}
</ui-select-match>
<ui-select-choices
repeat="x in overAllSubjects | filter:$select.search">
{{x.SubjectName}}
</ui-select-choices>
</ui-select>
<!-- <pre>{{selectedSubjetcsSem2C.list | json}}</pre> -->
</div>
</div>
</div>
<hr>
<div class="row" ng-if="viewPageSemDropDownShow">
<label><b>Year 2-Subjetcs</b></label>
<div class="col-md-12 ">
<div class="col-md-6 form-group">
<label>
<b>Semester 3</b>
</label>
<ui-select multiple ng-model="selectedSubjetcsSem3ViewPage.list" tabindex="6" ng-change="modifySelectedSubjetcs(selectedSubjetcsSem3ViewPage.list);" on-remove="itemRemove($item);">
<ui-select-match placeholder="Select Subjetcs" >
{{$item.SubjectName}}
</ui-select-match>
<ui-select-choices
repeat="x in overAllSubjects | filter:$select.search">
{{x.SubjectName}}
</ui-select-choices>
</ui-select>
<!-- <pre>{{selectedSubjetcsSem3C.list | json}}</pre> -->
</div>
<div class="col-md-6 form-group">
<label>
<b>Semester 4</b>
</label>
<ui-select multiple ng-model="selectedSubjetcsSem4ViewPage.list" tabindex="7" ng-change="modifySelectedSubjetcs(selectedSubjetcsSem4ViewPage.list);" on-remove="itemRemove($item);">
<ui-select-match placeholder="Select Subjetcs" >
{{$item.SubjectName}}
</ui-select-match>
<ui-select-choices
repeat="x in overAllSubjects | filter:$select.search">
{{x.SubjectName}}
</ui-select-choices>
</ui-select>
<!-- <pre>{{selectedSubjetcsSem4C.list | json}}</pre> -->
</div>
</div>
</div>
<hr>
<div class="row" ng-if="viewPageSemDropDownShow">
<label><b>Year 3-Subjetcs</b></label>
<div class="col-md-12 ">
<div class="col-md-6 form-group">
<label>
<b>Semester 5</b>
</label>
<ui-select multiple ng-model="selectedSubjetcsSem5ViewPage.list" tabindex="8" ng-change="modifySelectedSubjetcs(selectedSubjetcsSem5ViewPage.list);" on-remove="itemRemove($item);">
<ui-select-match placeholder="Select Subjetcs" >
{{$item.SubjectName}}
</ui-select-match>
<ui-select-choices
repeat="x in overAllSubjects | filter:$select.search">
{{x.SubjectName}}
</ui-select-choices>
</ui-select>
<!-- <pre>{{selectedSubjetcsSem5C.list | json}}</pre> -->
</div>
<div class="col-md-6 form-group">
<label>
<b>Semester 6</b>
</label>
<ui-select multiple ng-model="selectedSubjetcsSem6ViewPage.list" tabindex="9" ng-change="modifySelectedSubjetcs(selectedSubjetcsSem6ViewPage.list);" on-remove="itemRemove($item);">
<ui-select-match placeholder="Select Subjetcs" >
{{$item.SubjectName}}
</ui-select-match>
<ui-select-choices
repeat="x in overAllSubjects | filter:$select.search">
{{x.SubjectName}}
</ui-select-choices>
</ui-select>
<!-- <pre>{{selectedSubjetcsSem6C.list | json}}</pre> -->
</div>
</div>
</div>
<hr>
<div class="row" ng-if="viewPageSemDropDownShow">
<label><b>Year 4-Subjetcs</b></label>
<div class="col-md-12 ">
<div class="col-md-6 form-group">
<label>
<b>Semester 7</b>
</label>
<ui-select multiple ng-model="selectedSubjetcsSem7ViewPage.list" tabindex="10" ng-change="modifySelectedSubjetcs(selectedSubjetcsSem7ViewPage.list);" on-remove="itemRemove($item);">
<ui-select-match placeholder="Select Subjetcs" >
{{$item.SubjectName}}
</ui-select-match>
<ui-select-choices
repeat="x in overAllSubjects | filter:$select.search">
{{x.SubjectName}}
</ui-select-choices>
</ui-select>
<!-- <pre>{{viewPage.SubjectDetails[7] | json}}</pre> -->
</div>
<div class="col-md-6 form-group">
<label>
<b>Semester 8</b>
</label>
<ui-select multiple ng-model="selectedSubjetcsSem8ViewPage.list" tabindex="11" ng-change="modifySelectedSubjetcs(selectedSubjetcsSem8ViewPage.list);" on-remove="itemRemove($item);">
<ui-select-match placeholder="Select Subjetcs" >
{{$item.SubjectName}}
</ui-select-match>
<ui-select-choices
repeat="x in overAllSubjects | filter:$select.search">
{{x.SubjectName}}
</ui-select-choices>
</ui-select>
<!-- <pre>{{selectedSubjetcsSem8C.list | json}}</pre> -->
</div>
</div>
</div>
<div class="col-md-12 form-group" ng-if="viewPageSemDropDownShow">
<div class="pull-right">
<br>
<button type="button" ladda="ldloading1.zoom_in" tabindex="3" class="btn btn-wide btn-primary btn-sm" data-style="zoom-in" ng-disabled="updateButtonDisabled" ng-click="updateAll(p.UniversityID,p.CourseID);">{{updateButtonTxt}}</button>
<button type="button" ladda="ldloading1.zoom_in" tabindex="3" class="btn btn-wide btn-warning btn-sm" data-style="zoom-in" ng-click="cancel();">CANCEL</button>
</div>
</div>
</fieldset><!-- internal fieldset end -->
</div>
</td>
</tr>
</tbody>
</table>
<dir-pagination-controls max-size="10" direction-links="true" boundary-links="true">
</dir-pagination-controls>
</div>
</div>
</fieldset>
</tab>
<tab heading="Add Semesters" id="addSem">
<div class="row">
<form name="Form" id="form" novalidate method="post">
<fieldset>
<legend>Search</legend>
<div class="row">
<div class="col-md-3 form-group">
<label>
University
</label>
<select class="form-control" name="university" tabindex="1" id="university"
ng-model="myModel.universityName"
ng-options="i.universityName for i in university" ng-change="testFun();">
<option value="-1"> Select University</option>
</select>
<!-- <pre>{{myModel.universityName | json}}</pre> -->
</div>
<div class="col-md-5 form-group">
<label>
Course
</label>
<ui-select multiple ng-model="selectedCourseNameC.list" tabindex="2" >
<ui-select-match placeholder="Select Courses" >
{{$item.CourseName}}
</ui-select-match>
<ui-select-choices
repeat="x.CourseID as x in selectedUniversityCourseName | filter:$select.search">
{{x.CourseName}}
</ui-select-choices>
</ui-select>
<!-- <pre>{{selectedCourseNameC.list | json}}</pre> -->
</div>
<div class="col-md-3 form-group">
<br>
<button type="button" ladda="ldloading1.zoom_in" tabindex="3" class="btn btn-wide btn-success" data-style="zoom-in" ng-click="getSemSubDetails(myModel.universityName.universityID,selectedCourseNameC);">GET SUBJECTS</button>
</div>
</div>
<hr>
<div class="row" ng-if="semDropDownShowLoading">
<div class="col-md-12 form-group">
<center><h1>Loading...</h1></center>
</div>
</div>
<div class="row" ng-if="semDropDownShow">
<label><b>Year 1-Subjetcs</b></label>
<div class="col-md-12">
<div class="col-md-6">
<label>
Semester 1
</label>
<ui-select multiple ng-model="selectedSubjetcsSem1C.list" tabindex="4" id="sem1" ng-change="removeSelectedSubjetcs(selectedSubjetcsSem1C.list);">
<ui-select-match placeholder="Select Subjetcs" >
{{$item.SubjectName}}
</ui-select-match>
<ui-select-choices
repeat="x in subjects | filter:$select.search">
{{x.SubjectName}}
</ui-select-choices>
</ui-select>
<!-- <pre>{{selectedSubjetcsSem1C.list | json}}</pre> -->
</div>
<div class="col-md-6 form-group">
<label>
Semester 2
</label>
<ui-select multiple ng-model="selectedSubjetcsSem2C.list" tabindex="5" ng-change="removeSelectedSubjetcs(selectedSubjetcsSem2C.list);">
<ui-select-match placeholder="Select Subjetcs" >
{{$item.SubjectName}}
</ui-select-match>
<ui-select-choices
repeat="x in subjects | filter:$select.search">
{{x.SubjectName}}
</ui-select-choices>
</ui-select>
<!-- <pre>{{selectedSubjetcsSem2C.list | json}}</pre> -->
</div>
</div>
</div>
<div class="row" ng-if="semDropDownShow">
<hr>
<label><b>Year 2-Subjetcs</b></label>
<div class="col-md-12">
<div class="col-md-6 form-group">
<label>
Semester 3
</label>
<ui-select multiple ng-model="selectedSubjetcsSem3C.list" tabindex="6" ng-change="removeSelectedSubjetcs(selectedSubjetcsSem3C.list);">
<ui-select-match placeholder="Select Subjetcs" >
{{$item.SubjectName}}
</ui-select-match>
<ui-select-choices
repeat="x in subjects | filter:$select.search">
{{x.SubjectName}}
</ui-select-choices>
</ui-select>
<!-- <pre>{{selectedSubjetcsSem3C.list | json}}</pre> -->
</div>
<div class="col-md-6 form-group">
<label>
Semester 4
</label>
<ui-select multiple ng-model="selectedSubjetcsSem4C.list" tabindex="7" ng-change="removeSelectedSubjetcs(selectedSubjetcsSem4C.list);">
<ui-select-match placeholder="Select Subjetcs" >
{{$item.SubjectName}}
</ui-select-match>
<ui-select-choices
repeat="x in subjects | filter:$select.search">
{{x.SubjectName}}
</ui-select-choices>
</ui-select>
<!-- <pre>{{selectedSubjetcsSem4C.list | json}}</pre> -->
</div>
</div>
</div>
<div class="row" ng-if="semDropDownShow">
<hr>
<label><b>Year 3-Subjetcs</b></label>
<div class="col-md-12">
<div class="col-md-6 form-group">
<label>
Semester 5
</label>
<ui-select multiple ng-model="selectedSubjetcsSem5C.list" tabindex="8" ng-change="removeSelectedSubjetcs(selectedSubjetcsSem5C.list);">
<ui-select-match placeholder="Select Subjetcs" >
{{$item.SubjectName}}
</ui-select-match>
<ui-select-choices
repeat="x in subjects | filter:$select.search">
{{x.SubjectName}}
</ui-select-choices>
</ui-select>
<!-- <pre>{{selectedSubjetcsSem5C.list | json}}</pre> -->
</div>
<div class="col-md-6 form-group">
<label>
Semester 6
</label>
<ui-select multiple ng-model="selectedSubjetcsSem6C.list" tabindex="9" ng-change="removeSelectedSubjetcs(selectedSubjetcsSem6C.list);">
<ui-select-match placeholder="Select Subjetcs" >
{{$item.SubjectName}}
</ui-select-match>
<ui-select-choices
repeat="x in subjects | filter:$select.search">
{{x.SubjectName}}
</ui-select-choices>
</ui-select>
<!-- <pre>{{selectedSubjetcsSem6C.list | json}}</pre> -->
</div>
</div>
</div>
<div class="row" ng-if="semDropDownShow">
<hr>
<label><b>Year 4-Subjetcs</b></label>
<div class="col-md-12">
<div class="col-md-6 form-group">
<label>
Semester 7
</label>
<ui-select multiple ng-model="selectedSubjetcsSem7C.list" tabindex="10" ng-change="removeSelectedSubjetcs(selectedSubjetcsSem7C.list);">
<ui-select-match placeholder="Select Subjetcs" >
{{$item.SubjectName}}
</ui-select-match>
<ui-select-choices
repeat="x in subjects | filter:$select.search">
{{x.SubjectName}}
</ui-select-choices>
</ui-select>
<!-- <pre>{{selectedSubjetcsSem7C.list | json}}</pre> -->
</div>
<div class="col-md-6 form-group">
<label>
Semester 8
</label>
<ui-select multiple ng-model="selectedSubjetcsSem8C.list" tabindex="11" ng-change="removeSelectedSubjetcs(selectedSubjetcsSem8C.list);">
<ui-select-match placeholder="Select Subjetcs" >
{{$item.SubjectName}}
</ui-select-match>
<ui-select-choices
repeat="x in subjects | filter:$select.search">
{{x.SubjectName}}
</ui-select-choices>
</ui-select>
<!-- <pre>{{selectedSubjetcsSem8C.list | json}}</pre> -->
</div>
</div>
</div>
<div class="col-md-12 form-group" ng-if="semDropDownShow">
<div class="pull-right">
<br>
<button type="button" ladda="ldloading1.zoom_in" tabindex="3" class="btn btn-wide btn-primary" data-style="zoom-in" ng-disabled="saveButtonDisabled" ng-click="saveAll();">{{saveButtonTxt}}</button>
</div>
</div>
</div>
</fieldset>
</form>
</div>
</tab>
</tabset>
</div>
<!-- end: LIST GROUP -->

View File

@ -672,6 +672,38 @@
</li>
</ul>
</li>
<li ng-class="{'active open':$state.includes('app.hallTicket')}" ng-if="is_active_DayBookAprlAccess == '1'">
<a href="javascript:void(0)">
<div class="item-content">
<div class="item-media">
<i class="ti-write"></i>
</div>
<div class="item-inner">
<span class="title" translate="sidebar.nav.hallTicket.MAIN">HALLTICKET</span><i class="icon-arrow"></i>
</div>
</div>
</a>
<ul class="sub-menu">
<li ui-sref-active="active">
<a ui-sref="app.hallTicket.semCourseMap" ng-click="checkAdmin()">
<span class="title" translate="sidebar.nav.hallTicket.COURSESEMESTERMAPPING">COURSE SEMESTER MAPPING</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="app.hallTicket.batchSchedule" ng-click="checkAdmin()">
<span class="title" translate="sidebar.nav.hallTicket.BATCHSCHEDULE">BATCHSCHEDULE</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="app.hallTicket.generateHallTicket" ng-click="checkAdmin()">
<span class="title" translate="sidebar.nav.hallTicket.GENERATEHALLTICKET">GENERATE HALLTICKET</span>
</a>
</li>
</ul>
</li>
<li ng-class="{'active open':$state.includes('app.broadCast')}">
<a href="javascript:void(0)">
<div class="item-content">
@ -832,6 +864,38 @@
</li>
</ul>
</li>
<li ng-class="{'active open':$state.includes('app.hallTicket')}" ng-if="is_active_DayBookAprlAccess == '1'">
<a href="javascript:void(0)">
<div class="item-content">
<div class="item-media">
<i class="ti-write"></i>
</div>
<div class="item-inner">
<span class="title" translate="sidebar.nav.hallTicket.MAIN">HALLTICKET</span><i class="icon-arrow"></i>
</div>
</div>
</a>
<ul class="sub-menu">
<li ui-sref-active="active">
<a ui-sref="app.hallTicket.semCourseMap" ng-click="checkStaff()">
<span class="title" translate="sidebar.nav.hallTicket.COURSESEMESTERMAPPING">COURSE SEMESTER MAPPING</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="app.hallTicket.batchSchedule" ng-click="checkStaff()">
<span class="title" translate="sidebar.nav.hallTicket.BATCHSCHEDULE">BATCHSCHEDULE</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="app.hallTicket.generateHallTicket" ng-click="checkStaff()">
<span class="title" translate="sidebar.nav.hallTicket.GENERATEHALLTICKET">GENERATE HALLTICKET</span>
</a>
</li>
</ul>
</li>
<li ng-class="{'active open':$state.includes('app.myprofile')}">
<a ui-sref="app.myprofile" ng-click="checkStaff()">