This commit is contained in:
dineshkumarkannan 2018-04-23 11:42:33 +05:30
commit 0192f7a596
23 changed files with 174 additions and 150 deletions

View File

@ -41,6 +41,7 @@ class Batch_Controller extends REST_Controller {
$details['UniversityID'] = $this->post('universityName');
$details['CreatedBy'] = $this->post('createdBy');
$details['IsActive'] = $this->post('status');
$details['BranchCode'] = $this->post('branchCode');
$details['CreatedOn'] = $now->format('Y-m-d H:i:s');
$batchDetails = $this->batch_model->addBatch($details);// Check if the users data store contains users (in case the database result returns NULL)
@ -68,7 +69,8 @@ class Batch_Controller extends REST_Controller {
public function getBatchDetails_post()
{
$requestedBy = $this->post('requestedBy');
$getBatch = $this->batch_model->getBatch($requestedBy);
$branchCode = $this->post('branchCode');
$getBatch = $this->batch_model->getBatch($requestedBy,$branchCode);
if ($getBatch)
{
$getBatch['status'] = REST_Controller::HTTP_OK;
@ -99,6 +101,7 @@ class Batch_Controller extends REST_Controller {
$details['BatchDate'] = $this->post('batchDate');
$details['IsActive'] = $this->post('status');
$details['UpdatedBy'] = $this->post('updatedBy');
$details['BranchCode'] = $this->post('branchCode');
$details['UpdatedOn'] = $now->format("Y-m-d H:i:s");
// print_r( $details['UpdatedOn'])
@ -134,6 +137,7 @@ class Batch_Controller extends REST_Controller {
$details['UniversityID'] = $this->post('universityID');
$details['IsDefault'] = $this->post('IsDefault');
$details['UpdatedBy'] = $this->post('updatedBy');
$details['BranchCode'] = $this->post('branchCode');
$details['UpdatedOn'] = $now->format("Y-m-d H:i:s");
$updateDetails = $this->batch_model->updateDefaultBatch($details);// Check if the users data store contains users (in case the database result returns NULL)

View File

@ -40,6 +40,7 @@ class Center_Controller extends REST_Controller {
$details['Comments'] = $this->post('Comments');
$details['CreatedBy'] = $this->post('createdBy');
$details['IsActive'] = $this->post('status');
$details['BranchCode'] = $this->post('branchCode');
$details['CreatedOn'] = $now->format('Y-m-d H:i:s');
$centerDetails = $this->center_model->addCenter($details);// Check if the users data store contains users (in case the database result returns NULL)
@ -67,7 +68,8 @@ class Center_Controller extends REST_Controller {
public function getCenterDetails_post()
{
$requestedBy = $this->post('requestedBy');
$getCenter = $this->center_model->getCenter($requestedBy);
$branchCode = $this->post('branchCode');
$getCenter = $this->center_model->getCenter($requestedBy,$branchCode);
// print_r($getCenter);
// die;
if ($getCenter)
@ -103,6 +105,7 @@ class Center_Controller extends REST_Controller {
$CenterID=$this->post('CenterID');
$details['IsActive'] = $this->post('status');
$details['UpdateBy'] = $this->post('updateBy');
$details['BranchCode'] = $this->post('branchCode');
$details['UpdateOn'] = $now->format("Y-m-d H:i:s");

View File

@ -38,6 +38,7 @@ class Course_Controller extends REST_Controller {
$details['UniversityID'] = $this->post('universityName');
$details['Specilization1'] = $this->post('specilization1');
$details['Specilization2'] = $this->post('specilization2');
$details['BranchCode'] = $this->post('branchCode');
//$details['FeesType'] = $this->post('feesType');
$details['PC'] = $this->post('provFess');
@ -59,9 +60,9 @@ class Course_Controller extends REST_Controller {
array_push($jsonSemFeesData,$jsonLateralFeesData);
}
// get subject details
$subjectDetails=$this->post('subjects');
//$subjectDetails=$this->post('subjects');
$courseDetails = $this->course_model->addCourse($details,$jsonSemFeesData,$subjectDetails);// Check if the users data store contains users (in case the database result returns NULL)
$courseDetails = $this->course_model->addCourse($details,$jsonSemFeesData);// $subjectDetails Check if the users data store contains users (in case the database result returns NULL)
if ($courseDetails)
{
$courseDetails['status'] = REST_Controller::HTTP_OK;
@ -86,7 +87,8 @@ class Course_Controller extends REST_Controller {
public function getCourseDetails_post()
{
$requestedBy = $this->post('requestedBy');
$getCourse = $this->course_model->getCourse($requestedBy);
$branchCode = $this->post('branchCode');
$getCourse = $this->course_model->getCourse($requestedBy,$branchCode);
if ($getCourse)
{
@ -108,7 +110,8 @@ class Course_Controller extends REST_Controller {
public function getCourseUnivFeesDetails_post() {
$requestedBy = $this->post('requestedBy');
$getCourseUnivFee = $this->course_model->getCourseUnivFeesTypes($requestedBy);
$branchCode = $this->post('branchCode');
$getCourseUnivFee = $this->course_model->getCourseUnivFeesTypes($requestedBy,$branchCode);
if ($getCourseUnivFee)
{
@ -148,6 +151,7 @@ class Course_Controller extends REST_Controller {
$details['OtherFees'] = $this->post('otherAmount');
$details['UpdatedBy'] = $this->post('updatedBy');
$details['UpdatedOn'] = $now->format('Y-m-d H:i:s');
$details['BranchCode'] = $this->post('branchCode');
$existCourseID = $this->post('existCourseID');
$jsonRegularFeesData=$this->post('regularFeesAmounts');
$jsonLateralFeesData=$this->post('lateralFeesAmounts');
@ -163,13 +167,14 @@ class Course_Controller extends REST_Controller {
}
// update course subject details
$subjectDetails['UniversityID'] = $this->post('universityID');
/* $subjectDetails['UniversityID'] = $this->post('universityID');
$subjectDetails['CourseID'] = $this->post('courseID');
$subjectDetails['Subjects'] = $this->post('subjects');
$subjectDetails['UpdatedBy'] = $this->post('updatedBy');
$subjectDetails['UpdatedOn'] = $now->format('Y-m-d H:i:s');
$subjectDetails['UpdatedOn'] = $now->format('Y-m-d H:i:s');*/
$updateDetails = $this->course_model->updateCourse($details,$jsonSemFeesData,$subjectDetails);// Check if the users data store contains users (in case the database result returns NULL)
$updateDetails = $this->course_model->updateCourse($details,$jsonSemFeesData);// $subjectDetails Check if the users data store contains users (in case the database result returns NULL)
if ($updateDetails)
{
$updateDetails['status'] = REST_Controller::HTTP_OK;

View File

@ -35,6 +35,7 @@ class SessionMater_Controller extends REST_Controller {
$details['SessionDate'] = $this->post('sessionDate');
$details['CreatedBy'] = $this->post('createdBy');
$details['IsActive'] = $this->post('status');
$details['BranchCode'] = $this->post('branchCode');
$details['CreatedOn'] = $now->format('Y-m-d H:i:s');
$university['UniversityID'] = $this->post('universityName');
@ -63,7 +64,8 @@ class SessionMater_Controller extends REST_Controller {
public function getSessionMaterDetails_post()
{
$requestedBy = $this->post('requestedBy');
$getSession = $this->sessionM_model->getSession($requestedBy);
$branchCode = $this->post('branchCode');
$getSession = $this->sessionM_model->getSession($requestedBy,$branchCode);
if ($getSession)
{
$getSession['status'] = REST_Controller::HTTP_OK;
@ -96,6 +98,7 @@ class SessionMater_Controller extends REST_Controller {
$universityDetails['University'] = $this->post('university');
$details['UpdatedBy'] = $this->post('updatedBy');
$details['UpdatedOn'] = $now->format("Y-m-d H:i:s");
$details['BranchCode'] = $this->post('branchCode');
$updateDetails = $this->sessionM_model->updateSession($details,$universityDetails);// Check if the users data store contains users (in case the database result returns NULL)
if ($updateDetails)

View File

@ -38,6 +38,7 @@ class Subject_Controller extends REST_Controller {
$details['SubjectName'] = $this->post('SubjectName');
$details['IsActive'] = $this->post('Status');
$details['CreatedBy'] = $this->post('createdBy');
$details['BranchCode'] = $this->post('branchCode');
$details['CreatedOn'] = $now->format('Y-m-d H:i:s');
$subjectDetails = $this->subject_model->addSubject($details);// Check if the users data store contains users (in case the database result returns NULL)
@ -66,8 +67,9 @@ class Subject_Controller extends REST_Controller {
public function getSubjectDetails_post()
{
$requestedBy = $this->post('requestedBy');
$branchCode = $this->post('branchCode');
$getSubject = $this->subject_model->getSubject($requestedBy);
$getSubject = $this->subject_model->getSubject($requestedBy,$branchCode);
@ -101,6 +103,7 @@ class Subject_Controller extends REST_Controller {
$SubjectID = $this->post('SubjectID');
$details['IsActive'] = $this->post('Status');
$details['UpdatedBy'] = $this->post('updatedBy');
$details['BranchCode'] = $this->post('branchCode');
$details['UpdatedOn'] = $now->format('Y-m-d H:i:s');
// print_r($SubjectID);die();

View File

@ -20,6 +20,7 @@ class Batch_model extends CI_Model {
$this->db->select('BatchCode');
$this->db->where('BatchCode', $arrayDetails['BatchCode']);
$this->db->where('BranchCode', $arrayDetails['BranchCode']);
if($this->db->get(BATCH)->first_row()){
$result['batchStatus'] = false;
$result['message'] = "This batch code is already exist.";
@ -45,11 +46,13 @@ class Batch_model extends CI_Model {
* created by srk
* */
public function getBatch()
public function getBatch($requestedBy=null,$branchCode=null)
{
$this->db->select('CU.BatchCode,CU.BatchName,CU.IsActive,CU.BatchDate,CU.IsDefault,US.UniversityID,US.UniversityName');
$this->db->from(BATCH.' as CU');
$this->db->join(UNIVERSITY.' as US', 'US.UniversityID = CU.UniversityID');
$this->db->where('CU.BranchCode',$branchCode);
$this->db->where('US.BranchCode',$branchCode);
$this->db->order_by('CU.CreatedOn','DESC');
$batchDetails = $this->db->get();
@ -63,7 +66,7 @@ class Batch_model extends CI_Model {
$result['message'] = "No records found!";
}
$result['universityDetails'] = $this->getUniversityDetails();
$result['universityDetails'] = $this->getUniversityDetails($requestedBy,$branchCode);
return $result;
@ -76,6 +79,7 @@ class Batch_model extends CI_Model {
public function updateBatch($arrayDetails=null)
{
$this->db->where('BatchCode',$arrayDetails['BatchCode']);
$this->db->where('BranchCode',$arrayDetails['BranchCode']);
$upateStatus=$this->db->update(BATCH, $arrayDetails);
if($upateStatus){
@ -97,11 +101,12 @@ class Batch_model extends CI_Model {
* Get university details
* created by Srk
* */
public function getUniversityDetails()//doubt
public function getUniversityDetails($requestedBy,$branchCode)
{
$this->db->select('UniversityID,UniversityName');
$this->db->order_by('UniversityID','ASC');
$this->db->where('IsActive','1');
$this->db->where('BranchCode',$branchCode);
// $this->db->where_not_in('ID', $id);
$universityDetails = $this->db->get(UNIVERSITY);
return $universityDetails->result();
@ -118,6 +123,7 @@ class Batch_model extends CI_Model {
$setDefaultBatch['UpdatedOn'] = $details['UpdatedOn'];
// $this->db->where('BatchCode',$details['BatchCode']);
$this->db->where('UniversityID',$details['UniversityID']);
$this->db->where('BranchCode',$details['BranchCode']);
$upateStatus=$this->db->update(BATCH, $setDefaultBatch);
if($upateStatus){
$this->db->where('BatchCode',$details['BatchCode']);

View File

@ -20,6 +20,7 @@ class Center_model extends CI_Model {
$this->db->select('CenterCode');
$this->db->where('CenterCode', $arrayDetails['CenterCode']);
$this->db->where('BranchCode', $arrayDetails['BranchCode']);
if($this->db->get(CENTER)->first_row()){
$result['centerStatus'] = false;
$result['message'] = "This center Code is already exist!";
@ -46,10 +47,11 @@ class Center_model extends CI_Model {
public function getCenter()
public function getCenter($requestedBy=null,$branchCode=null)
{
$this->db->select('*');
$this->db->order_by('CreatedOn','DESC');
$this->db->select('*');
$this->db->where('BranchCode',$branchCode);
$this->db->order_by('CenterID','DESC');
$centerDetails = $this->db->get(CENTER);
// print_r($centerDetails);
// die;
@ -77,14 +79,15 @@ class Center_model extends CI_Model {
$this->db->select('CenterCode');
$this->db->where('CenterCode',$arrayDetails['CenterCode']);
//$this->db->where('SubjectCode !=', $arrayDetails['SubjectCode']);
$this->db->where('CenterCode !=',$arrayDetails['CenterCode']);
$this->db->where('BranchCode',$arrayDetails['BranchCode']);
$this->db->where('CenterID !=',$CenterID);
if($this->db->get(CENTER)->first_row()){
$result['centerStatus']=false;
$result['message']= " This Center code already exist";
}
else{
$this->db->where('CenterID',$CenterID);
$this->db->where('BranchCode',$arrayDetails['BranchCode']);
$updateStatus=$this->db->update(CENTER, $arrayDetails);
if($updateStatus){

View File

@ -15,11 +15,12 @@ class Course_model extends CI_Model {
* created by kms
* */
public function addCourse($arrayDetails=null,$jsonSemFeesData=null,$subjectDetails=null)
public function addCourse($arrayDetails=null,$jsonSemFeesData=null) //$subjectDetails=null
{
$this->db->select('CourseCode');
$this->db->where('CourseCode', $arrayDetails['CourseCode']);
$this->db->where('UniversityID', $arrayDetails['UniversityID']);
$this->db->where('BranchCode', $arrayDetails['BranchCode']);
if($this->db->get(COURSE)->first_row()){
$result['courseStatus'] = false;
$result['message'] = "This course id is already exist in same university";
@ -40,9 +41,11 @@ class Course_model extends CI_Model {
$this->db->insert(COURSE_FEES, $insertFeesArray);
}
if($subjectDetails){
/*
// hide subject insert query
if($subjectDetails){
$this->insertCourseSubjects($arrayDetails,$insert_id,$subjectDetails);
}
}*/
$result['courseStatus'] = true;
$result['message'] = "Successfully course details added";
@ -71,12 +74,14 @@ class Course_model extends CI_Model {
* created by kms
* */
public function getCourse()
public function getCourse($requestedBy,$branchCode)
{
$this->db->select('CU.CourseID,CU.CourseCode,CU.CourseName,CU.FeesType,CU.Specilization1,CU.Specilization2,CU.PC,CU.DC,CU.TC,CU.MC,CU.OtherFees,CU.IsActive,US.UniversityID,US.UniversityName');
$this->db->from(COURSE.' as CU');
$this->db->join(UNIVERSITY.' as US', 'US.UniversityID = CU.UniversityID');
$this->db->order_by('CU.CreatedOn','DESC');
$this->db->where('CU.BranchCode',$branchCode);
$this->db->where('US.BranchCode',$branchCode);
$this->db->order_by('CU.CourseID','DESC');
$courseDetails = $this->db->get();
if($courseDetails->result()){
@ -99,27 +104,24 @@ class Course_model extends CI_Model {
$fetchData['UniversityID']=$row->UniversityID;
$fetchData['UniversityName']=$row->UniversityName;
$fetchData['feesStructures'] = $this->getCourseFeesDetails($row->CourseID);
$fetchData['existSubjects'] = $this->getExistCourseSubjectDetails($row->CourseID);
// print_r($fetchData);exit();
// $fetchData['existSubjects'] = $this->getExistCourseSubjectDetails($row->CourseID);
$storeCourseArray[]=$fetchData;
}
$result['details'] = $storeCourseArray;
// print_r($storeCourseArray);exit();
}
else {
$result['courseStatus'] = false;
$result['message'] = "No records found!";
}
// print_r($result);exit();
return $result;
}
public function getCourseUnivFeesTypes() {
$result['universityDetails'] = $this->getUniversityDetails();
public function getCourseUnivFeesTypes($requestedBy=null,$requestedBranch=null) {
$result['universityDetails'] = $this->getUniversityDetails($requestedBy,$requestedBranch);
$result['feesDetails'] = $this->getFeesDetails();
$result['subjectetails'] = $this->getSubjectDetails();
// $result['subjectetails'] = $this->getSubjectDetails($requestedBy,$requestedBranch);
$result['courseStatus'] = true;
return $result;
}
@ -128,11 +130,12 @@ class Course_model extends CI_Model {
* update course details
* created by kms
* */
public function updateCourse($arrayDetails=null,$jsonData=null,$subjectDetails=null)
public function updateCourse($arrayDetails=null,$jsonData=null) //$subjectDetails=null
{
$this->db->select('CourseCode');
$this->db->where('CourseCode', $arrayDetails['CourseCode']);
$this->db->where('UniversityID', $arrayDetails['UniversityID']);
$this->db->where('BranchCode', $arrayDetails['BranchCode']);
$this->db->where('CourseID !=', $arrayDetails['CourseID']);
if($this->db->get(COURSE)->first_row()){
$result['courseStatus'] = false;
@ -140,6 +143,7 @@ class Course_model extends CI_Model {
}
else{
$this->db->where('CourseID',$arrayDetails['CourseID']);
$this->db->where('BranchCode', $arrayDetails['BranchCode']);
$upateStatus=$this->db->update(COURSE, $arrayDetails);
if($upateStatus) {
@ -165,7 +169,7 @@ class Course_model extends CI_Model {
}
// update course subject details
$this->updateCourseSubjcetDetails($subjectDetails);
// $this->updateCourseSubjcetDetails($subjectDetails);
$result['courseStatus'] = true;
@ -189,11 +193,12 @@ class Course_model extends CI_Model {
* get university details
* created by kms
* */
public function getUniversityDetails()
public function getUniversityDetails($requestedBy,$requestedBranch)
{
$this->db->select('UniversityID,UniversityName');
$this->db->order_by('UniversityID','ASC');
$this->db->where('IsActive','1');
$this->db->where('BranchCode',$requestedBranch);
$universityDetails = $this->db->get(UNIVERSITY);
return $universityDetails->result();
}
@ -269,10 +274,11 @@ class Course_model extends CI_Model {
* get subject details
* created by kms
* */
public function getSubjectDetails(){
public function getSubjectDetails($requestedBy,$requestedBranch){
$this->db->select('SubjectID,SubjectCode,SubjectName');
$this->db->order_by('SubjectID','DESC');
$this->db->where('IsActive','1');
$this->db->where('BranchCode',$requestedBranch);
$subjectDetails = $this->db->get(SUBJECTMASTER);
return $subjectDetails->result();
}

View File

@ -20,6 +20,7 @@ class SeesionMaster_model extends CI_Model {
$this->db->select('SessionName');
$this->db->where('SessionName', $arrayDetails['SessionName']);
$this->db->where('BranchCode', $arrayDetails['BranchCode']);
if($this->db->get(SESSIONMASTER)->first_row()){
$result['sessionStatus'] = false;
$result['message'] ="This sessions is already exist.";
@ -30,6 +31,7 @@ class SeesionMaster_model extends CI_Model {
$insertMaster['CreatedBy']=$arrayDetails['CreatedBy'];
$insertMaster['IsActive']=$arrayDetails['IsActive'];
$insertMaster['CreatedOn']=$arrayDetails['CreatedOn'];
$insertMaster['BranchCode']=$arrayDetails['BranchCode'];
$this->db->insert(SESSIONMASTER, $insertMaster);
@ -66,13 +68,15 @@ class SeesionMaster_model extends CI_Model {
* created by kms
* */
public function getSession()
public function getSession($requestedBy=null,$branchCode=null)
{
$this->db->select('SM.SessionID,SM.SessionDate,SM.SessionName,GROUP_CONCAT(SD.UniversityID) as UniversityID,GROUP_CONCAT(SM.SessionID) as GrpID,SM.IsActive,GROUP_CONCAT(US.UniversityName) as UniversityName');
$this->db->from(SESSIONMASTER.' as SM');
$this->db->join(SESSIONDETAILS.' as SD', 'SM.SessionID = SD.SessionID');
$this->db->join(UNIVERSITY.' as US', 'US.UniversityID = SD.UniversityID');
$this->db->where('SD.IsActive','1');
$this->db->where('SM.BranchCode',$branchCode);
$this->db->where('US.BranchCode',$branchCode);
$this->db->order_by('SM.SessionID','DESC');
$this->db->group_by('SM.SessionID','DESC');
$sessionDetails = $this->db->get();
@ -87,7 +91,7 @@ class SeesionMaster_model extends CI_Model {
}
// load batch model for get university details
$this->load->model('Batch_model', 'batch');
$result['universityDetails'] = $this->batch->getUniversityDetails();
$result['universityDetails'] = $this->batch->getUniversityDetails($requestedBy,$branchCode);
return $result;
@ -102,6 +106,7 @@ class SeesionMaster_model extends CI_Model {
{
$this->db->select('SessionName');
$this->db->where('SessionName', $arrayDetails['SessionName']);
$this->db->where('BranchCode', $arrayDetails['BranchCode']);
$this->db->where('SessionID !=', $arrayDetails['SessionID']);
if($this->db->get(SESSIONMASTER)->first_row()){
$result['sessionStatus'] = false;
@ -109,6 +114,7 @@ class SeesionMaster_model extends CI_Model {
}
else{
$this->db->where('SessionID', $arrayDetails['SessionID']);
$this->db->where('BranchCode', $arrayDetails['BranchCode']);
$upateStatus=$this->db->update(SESSIONMASTER, $arrayDetails);
if($upateStatus){
@ -174,11 +180,12 @@ class SeesionMaster_model extends CI_Model {
* Get university details
* created by kms
* */
public function getUniversityDetails()//doubt
public function getUniversityDetails($requestedBy,$branchCode)
{
$this->db->select('UniversityID,UniversityName');
$this->db->order_by('UniversityID','ASC');
$this->db->where('IsActive','1');
$this->db->where('BranchCode',$branchCode);
// $this->db->where_not_in('ID', $id);
$universityDetails = $this->db->get(UNIVERSITY);
return $universityDetails->result();

View File

@ -15,6 +15,7 @@ class Subject_model extends CI_Model
$this->db->select('SubjectCode');
$this->db->where('SubjectCode',$arrayDetails['SubjectCode']);
$this->db->where('BranchCode',$arrayDetails['BranchCode']);
if($this->db->get(SUBJECTMASTER)->first_row()){
$result['SubjectStatus']=false;
$result['message']="This subject code already exists";
@ -44,12 +45,14 @@ public function updateSubject($arrayDetails=null,$SubjectID=null)
{
$this->db->select('SubjectCode');
$this->db->where('SubjectCode',$arrayDetails['SubjectCode']);
$this->db->where('SubjectCode !=', $arrayDetails['SubjectCode']);
$this->db->where('SubjectID !=', $SubjectID);
$this->db->where('BranchCode', $arrayDetails['BranchCode']);
if($this->db->get(SUBJECTMASTER)->first_row()){
$result['SubjectStatus']=false;
$result['message']="This subject code is already exists";
}else{
$this->db->where('SubjectID',$SubjectID);
$this->db->where('BranchCode', $arrayDetails['BranchCode']);
$upateStatus=$this->db->update(SUBJECTMASTER, $arrayDetails);
@ -78,10 +81,11 @@ public function updateSubject($arrayDetails=null,$SubjectID=null)
public function getSubject()
public function getSubject($requestedBy=null,$branchCode=null)
{
$this->db->select('*');
$this->db->order_by('CreatedOn','DESC');
$this->db->select('*');
$this->db->where('BranchCode',$branchCode);
$this->db->order_by('SubjectID','DESC');
$subjectDetails = $this->db->get(SUBJECTMASTER);

View File

@ -104,7 +104,8 @@ app.controller('batchCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTabl
batcheDate: $filter('date')(new Date(myModel.date), 'dd-MM-yyyy'),
universityName: myModel.universityName,
status: myModel.switchsetting,
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};
$http(addBatch).then(function (response) {
@ -170,7 +171,8 @@ app.controller('batchCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTabl
batchName: editModel.editBatchName,
batchDate: editModel.editDate,
status: myModel.IsActive,
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};
$http(update).then(function (response) {
@ -210,7 +212,8 @@ app.controller('batchCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTabl
batchCode: details.BatchCode,
IsDefault: $scope.defaultBatch,
universityID: details.UniversityID,
updatedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
updatedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};
$http(changeDefault).then(function (response) {
@ -246,7 +249,8 @@ app.controller('batchCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTabl
'Content-Type': 'application/json'
},
data: {
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};

View File

@ -83,7 +83,8 @@ app.controller('centerCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
Address: myModel.Address,
Comments:myModel.Comment,
status: myModel.switchsetting,
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};
$http(addCenter).then(function (response) {
@ -160,7 +161,8 @@ app.controller('centerCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
Comments:myModel.Comments,
status: myModel.IsActive,
CenterID:myModel.CenterID,
updateBy: JSON.parse(localStorage.getItem('localObj')).localUserID
updateBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};
$http(update).then(function (response) {
@ -196,7 +198,8 @@ app.controller('centerCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
'Content-Type': 'application/json'
},
data: {
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};

View File

@ -34,8 +34,8 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
$rootScope.updateMoreItems = [];
$scope.editId = -1;
$scope.setEditId = function (pid,p) {
$scope.localSubjectDetails="";
$scope.localSubjectDetails = JSON.parse(localStorage.getItem('localSubjectDetails'));
// $scope.localSubjectDetails="";
// $scope.localSubjectDetails = JSON.parse(localStorage.getItem('localSubjectDetails'));
$scope.localUniversityDetails="";
$scope.localUniversityDetails = JSON.parse(localStorage.getItem('localUniversityDetails'));
@ -106,7 +106,7 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
// get exist subject details
$scope.editSubject = [];
/* $scope.editSubject = [];
angular.forEach(p.existSubjects, function (values, keys) {
$scope.getDeactiveSub = {
@ -123,7 +123,7 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
$scope.viewSubject = {
list: $scope.editSubject,
}
}*/
$scope.editId = pid;
};
@ -214,7 +214,8 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
specilization1:myModel.specilization1,
specilization2:myModel.specilization2,
subjects:myModel.subject
// subjects:myModel.subject,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};
$http(addCourse).then(function (response) {
@ -304,7 +305,9 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
specilization1:myModel.Specilization1,
specilization2:myModel.Specilization2,
existCourseID:myModel.CourseID,
subjects:subjects.list
// subjects:subjects.list,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};
$http(update).then(function (response) {
@ -344,7 +347,9 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
'Content-Type': 'application/json'
},
data: {
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};
$http(getCourse).then(function (response) {
@ -354,70 +359,17 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
$scope.data = response.data.details;
// $scope.university=response.data.universityDetails;
// $scope.feesDetails=response.data.feesDetails;
// $scope.myModel.ListName=$scope.feesDetails[0];
// $scope.myModel.programListName=$scope.myModel.ListName.programType[0].ListCode;
// // single sitting regular course details in model
// $scope.myModelRegular = {
// "FeesType":$scope.feesDetails[0].ListCode,
// "FeesName":$scope.feesDetails[0].ListName,
// "program":$scope.feesDetails[0].programType[0].ListCode,
// "programName":$scope.feesDetails[0].programType[0].ListName,
// "FeesAmount":"",
// };
// // single sitting lateral course details in model
// $scope.myModelLateral = {
// "FeesType":$scope.feesDetails[0].ListCode,
// "FeesName":$scope.feesDetails[0].ListName,
// "program":$scope.feesDetails[0].programType[1].ListCode,
// "programName":$scope.feesDetails[0].programType[1].ListName,
// "FeesAmount":"",
// };
// // single sitting Sem_Year course details in model
// $scope.myModelSemYear = {
// "FeesType":$scope.feesDetails[1].ListCode,
// "FeesName":$scope.feesDetails[1].ListName,
// "program":$scope.feesDetails[1].programType[0].ListCode,
// "programName":"",
// "FeesAmount":"",
// };
// $rootScope.myModelSemYear1 = {
// "FeesType":$scope.feesDetails[1].ListCode,
// "FeesName":$scope.feesDetails[1].ListName,
// "program":$scope.feesDetails[1].programType[0].ListCode,
// "programName":"",
// "FeesAmount":"",
// };
} else {
$scope.emptyData=false;
$scope.loader=true;
// getUniversity_FeesDetails();
// $scope.university=response.data.universityDetails;
// $scope.feesDetails=response.data.feesDetails;
// $scope.myModel.ListName=$scope.feesDetails[0];
// $scope.myModel.programListName=$scope.myModel.ListName.programType[0].ListCode;
}
});
};
function getUniversity_FeesDetails() {
localStorage.setItem('localSubjectDetails', '');
// localStorage.setItem('localSubjectDetails', '');
localStorage.setItem('localUniversityDetails', '');
$scope.subjectDetails=[];
@ -428,26 +380,29 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
'Content-Type': 'application/json'
},
data: {
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};
$http(getCourseUnivFee).then(function (response) {
if (response.data.status==200 && response.data.courseStatus) {
$scope.university=response.data.universityDetails;
$scope.subjectDetails=[];
// $scope.subjectDetails=[];
$scope.feesDetails=response.data.feesDetails;
$scope.myModel.ListName=$scope.feesDetails[0];
$scope.myModel.programListName=$scope.myModel.ListName.programType[0].ListCode;
//hide subject details
angular.forEach(response.data.subjectetails, function (values, keys) {
/* angular.forEach(response.data.subjectetails, function (values, keys) {
$scope.subData = {
SubjectID: values.SubjectID,
SubjectName: values.SubjectCode +'-'+values.SubjectName
};
$scope.subjectDetails.push($scope.subData);
});
});*/
// single sitting regular course details in model
@ -501,7 +456,7 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
}
localStorage.setItem('localUniversityDetails', JSON.stringify($scope.university));
localStorage.setItem('localSubjectDetails', JSON.stringify($scope.subjectDetails));
// localStorage.setItem('localSubjectDetails', JSON.stringify($scope.subjectDetails));
});

View File

@ -98,7 +98,9 @@ app.controller('sessionMasterCtrl', ["$scope","$rootScope","toaster", "$filter",
sessionDate: $filter('date')(new Date(myModel.date), 'dd-MM-yyyy'),
universityName: myModel.universityName,
status: myModel.switchsetting,
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};
$http(addSession).then(function (response) {
@ -162,7 +164,9 @@ app.controller('sessionMasterCtrl', ["$scope","$rootScope","toaster", "$filter",
sessionName: editModel.editSessionName,
status: myModel.IsActive,
university: university.list,
updatedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
updatedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};
$http(update).then(function (response) {
@ -198,7 +202,9 @@ app.controller('sessionMasterCtrl', ["$scope","$rootScope","toaster", "$filter",
'Content-Type': 'application/json'
},
data: {
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};

View File

@ -81,7 +81,9 @@ app.controller('subjectCtrl', ["$scope", "$rootScope","toaster", "$filter", "ngT
SubjectCode:myModel.SubjectCode,
SubjectName:myModel.SubjectName,
Status: myModel.switchsetting,
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};
@ -159,8 +161,10 @@ app.controller('subjectCtrl', ["$scope", "$rootScope","toaster", "$filter", "ngT
SubjectName:myModel.SubjectName,
Status:myModel.IsActive,
SubjectID: myModel. SubjectID, //auto id
updatedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
}
updatedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};
$http(update).then(function (response) {
if (response.data.status==200 && response.data.SubjectStatus) {
@ -201,7 +205,9 @@ app.controller('subjectCtrl', ["$scope", "$rootScope","toaster", "$filter", "ngT
'Content-Type': 'application/json'
},
data: {
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};

View File

@ -153,12 +153,12 @@
</label>
<input type="text" placeholder="Enter Batch Code"
tabindex="1" class="form-control" name="batchCode"
tabindex="1" class="form-control" name="batchCode" disallow-spaces
ng-model="myModel.batchCode" ng-pattern="/^[a-zA-Z0-9-\s]*$/" required/>
<span class="error text-small block"
ng-if="Form.batchCode.$dirty && Form.batchCode.$error.required">Batch code is required</span>
<span class="error text-small block"
ng-if="Form.batchCode.$dirty && Form.batchCode.$error.pattern">Invalid course id </span>
ng-if="Form.batchCode.$dirty && Form.batchCode.$error.pattern">Invalid batch code </span>
</div>
<div data-ng-controller="DatepickerDemoCtrl">

View File

@ -138,7 +138,7 @@
</label>
<input type="text" placeholder="Enter Center Code"
tabindex="1" class="form-control" name="centerCode"
tabindex="1" disallow-spaces="" class="form-control" name="centerCode"
ng-model="myModel.centerCode" ng-pattern="" required/>
<span class="error text-small block"
ng-if="Form.centerCode.$dirty && Form.centerCode.$error.required">Center code is required</span>
@ -171,7 +171,7 @@
<label>
Address <span class="symbol required"></span>
</label>
<textarea placeholder="Enter Address" tabindex="6" class="form-control textdsc" name="Address" ng-model="myModel.Address" required></textarea>
<textarea placeholder="Enter Address" tabindex="3" class="form-control textdsc" name="Address" ng-model="myModel.Address" required></textarea>
<span class="error text-small block" ng-if="Form.Address.$dirty && Form.Address.$invalid">Address is required</span>
</div>
@ -179,7 +179,7 @@
<label>
Comments
</label>
<textarea placeholder="Enter Comment" tabindex="15" class="form-control textdsc" name="Comment" ng-model="myModel.Comment"></textarea>
<textarea placeholder="Enter Comment" tabindex="4" class="form-control textdsc" name="Comment" ng-model="myModel.Comment"></textarea>
<span class="error text-small block" ng-if="Form.Comments.$dirty && Form.Comments.$invalid">Comments is required</span>
</div>
</div>
@ -208,11 +208,11 @@
<div class="col-md-12">
<div class="pull-right">
<button type="submit" tabindex="9" class="btn btn-wide btn-success" data-style="zoom-in">
<button type="submit" tabindex="5" class="btn btn-wide btn-success" data-style="zoom-in">
Submit
</button>
<button type="reset" class="btn btn-warning btn-wide" tabindex="10"
<button type="reset" class="btn btn-warning btn-wide" tabindex="6"
ng-click="centerForm.reset(Form)">
Reset
</button>

View File

@ -261,6 +261,8 @@
<!-- hide subject details start
<div class="row">
<div class="col-md-12 form-group">
<label>
@ -280,14 +282,15 @@
<input class="ng-hide" type="text" name="subject"
ng-model="myModel.subject"
>
<!--<span class="error text-small block"
ng-if="Form.subject.$dirty && Form.subject.$error.required && myModel.subject.length==0">Subject is required.</span>-->
<!--<span class="success text-small block"-->
&lt;!&ndash;<span class="error text-small block"
ng-if="Form.subject.$dirty && Form.subject.$error.required && myModel.subject.length==0">Subject is required.</span>&ndash;&gt;
&lt;!&ndash;<span class="success text-small block"&ndash;&gt;
</div>
</div>
hide subject details end-->
<div class="row">

View File

@ -15,7 +15,7 @@
</label>
<input type="text" placeholder="Enter Batch Code"
tabindex="1" class="form-control" name="batchcode"
tabindex="1" disallow-spaces class="form-control" name="batchcode"
ng-model="p.BatchCode" ng-pattern="/^[a-zA-Z0-9-\s]*$/" readonly required/>
<span class="error text-small block"
ng-if="Form.batchcode.$dirty && Form.batchcode.$error.required">Batch Code is required</span>

View File

@ -15,7 +15,7 @@
</label>
<input type="text" placeholder="Enter Center Code"
tabindex="1" class="form-control" name="centercode"
tabindex="1" disallow-spaces="" class="form-control" name="centercode"
ng-model="p.CenterCode" ng-pattern="" required/>
<span class="error text-small block"
ng-if="Form.centercode.$dirty && Form.centercode.$error.required">Center code is required</span>
@ -32,7 +32,7 @@
</label>
<input type="text" placeholder="Enter center name"
tabindex="1" class="form-control" name="centerName"
tabindex="2" class="form-control" name="centerName"
ng-model="p.CenterName" required/>
<span class="error text-small block"
ng-if="Form.centerName.$dirty && Form.centerName.$error.required">Center name is required</span>
@ -45,7 +45,7 @@
<label>
Address <span class="symbol required"></span>
</label>
<textarea placeholder="Enter Address" tabindex="6" class="form-control textdsc" name="Address" ng-model="p.CenterAddress" required></textarea>
<textarea placeholder="Enter Address" tabindex="3" class="form-control textdsc" name="Address" ng-model="p.CenterAddress" required></textarea>
<span class="error text-small block" ng-if="Form.Address.$dirty && Form.Address.$invalid">Address is required</span>
</div>
<div class="col-md-3 form-group" ng-class="{'has-error':Form.Comments.$dirty && Form.Comments.$invalid}">
@ -79,11 +79,11 @@
<div class="row">
<div class="col-md-12">
<div class="pull-right">
<button type="submit" tabindex="9" class="btn btn-wide btn-success" data-style="zoom-in" ng-click="updateCenter(p,Form,'zoom-in')">
<button type="submit" tabindex="4" class="btn btn-wide btn-success" data-style="zoom-in" ng-click="updateCenter(p,Form,'zoom-in')">
Save
</button>
<input type="button" class="btn btn-warning btn-wide" tabindex="10" value="Cancel"
<input type="button" class="btn btn-warning btn-wide" tabindex="5" value="Cancel"
ng-click="cancel();">
</input>

View File

@ -124,6 +124,7 @@
<!--ng-if="Form.specilization1.$valid">Thank You!</span>-->
</div>
</div>
<!--hide course subject details start
<div class="row">
<div class="col-md-12 form-group">
<label>
@ -142,15 +143,17 @@
<input class="ng-hide" type="text" name="subject"
ng-model="viewSubject.list"
>
<!--<span class="error text-small block"
ng-if="Form.subject.$dirty && Form.subject.$error.required && myModel.subject.length==0">Subject is required.</span>-->
<!--<span class="success text-small block"-->
&lt;!&ndash;<span class="error text-small block"
ng-if="Form.subject.$dirty && Form.subject.$error.required && myModel.subject.length==0">Subject is required.</span>&ndash;&gt;
&lt;!&ndash;<span class="success text-small block"&ndash;&gt;
</div>
</div>
hide course subject details end-->
<div class="row">
<div class="col-md-6">

View File

@ -18,7 +18,7 @@
</label>
<input type="text" placeholder="Enter Subject Code"
autofocus tabindex="7" class="form-control" name="SubjectCode"
autofocus tabindex="1" disallow-spaces="" class="form-control" name="SubjectCode"
ng-model="p.SubjectCode" ng-pattern="" required />
<span class="error text-small block"
@ -36,7 +36,7 @@
</label>
<input type="text" placeholder="Enter SubjectName"
tabindex="6" class="form-control" name="SubjectName"
tabindex="2" class="form-control" name="SubjectName"
ng-model="p.SubjectName" ng-pattern="" required />
<span class="error text-small block"
ng-if="Form.SubjectName.$dirty && Form.SubjectName.$error.required">Subject name is required</span>
@ -64,11 +64,11 @@
<div class="row">
<div class="col-md-12">
<div class="pull-right">
<button type="submit" tabindex="9" class="btn btn-wide btn-success" data-style="zoom-in" ng-click="updateSubject(p,Form,'zoom-in')">
<button type="submit" tabindex="3" class="btn btn-wide btn-success" data-style="zoom-in" ng-click="updateSubject(p,Form,'zoom-in')">
Save
</button>
<input type="button" class="btn btn-warning btn-wide" tabindex="10" value="Cancel"
<input type="button" class="btn btn-warning btn-wide" tabindex="4" value="Cancel"
ng-click="cancel();">
</input>

View File

@ -137,7 +137,7 @@
</label>
<input type="text" placeholder="Enter Subject Code"
autofocus tabindex="7" class="form-control" name="SubjectCode"
autofocus tabindex="1" disallow-spaces="" class="form-control" name="SubjectCode"
ng-model="myModel.SubjectCode" ng-pattern="" required />
<span class="error text-small block"
@ -155,7 +155,7 @@
</label>
<input type="text" placeholder="Enter SubjectName"
tabindex="6" class="form-control" name="SubjectName"
tabindex="2" class="form-control" name="SubjectName"
ng-model="myModel.SubjectName" ng-pattern="" required />
<span class="error text-small block"
ng-if="Form.SubjectName.$dirty && Form.SubjectName.$error.required"> Subject name is required</span>
@ -191,10 +191,10 @@
<div class="row">
<div class="col-md-12">
<div class="pull-right">
<button type="submit" ng-disabled="disableButton" tabindex="30" class="btn btn-wide btn-success"
<button type="submit" ng-disabled="disableButton" tabindex="3" class="btn btn-wide btn-success"
data-style="zoom-in"> Submit </button>
<button type="reset" class="btn btn-warning btn-wide" tabindex="14" ng-click="subjectFORM.reset(Form);">
<button type="reset" class="btn btn-warning btn-wide" tabindex="4" ng-click="subjectFORM.reset(Form);">
Reset
</button>