Merge branch 'master' of https://bitbucket.org/venbainformationtechnology/apollodec
This commit is contained in:
commit
fb52629cd6
@ -128,6 +128,8 @@ defined('CERTIFICATION_MASTER') OR define('CERTIFICATION_MASTER','T_Certificatio
|
||||
defined('DAYBOOKMASTER') OR define('DAYBOOKMASTER','T_DayBookMaster');
|
||||
defined('INCOMEOUTCOMEMASTER') OR define('INCOMEOUTCOMEMASTER','T_Income_Outcome_Master');
|
||||
defined('FEES_INSTALLMENT') OR define('FEES_INSTALLMENT','T_Fees_Installments');
|
||||
defined('CENTER') OR define('CENTER','T_CenterMaster');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -218,5 +218,18 @@ $route['getCronCall'] = 'Broadcast_Controller/getCronCall';
|
||||
$route['getSMSSendReportList'] = 'Broadcast_Controller/getSMSSendReportList';
|
||||
$route['getSMSGroupDetails'] = 'Broadcast_Controller/getSMSGroupDetails';
|
||||
|
||||
//center
|
||||
|
||||
$route['addCenterDetails'] = 'Center_Controller/addCenterDetails';
|
||||
$route['updateCenterDetails'] = 'Center_Controller/updateCenterDetails';
|
||||
$route['getCenterDetails'] = 'Center_Controller/getCenterDetails';
|
||||
|
||||
//subject
|
||||
$route['getSubjectDetails'] = 'Subject_Controller/getSubjectDetails';
|
||||
$route['updateSubjectDetails'] = 'Subject_Controller/updateSubjectDetails';
|
||||
$route['getUniversity'] = 'Subject_Controller/getUniversity';
|
||||
$route['getCourseBatch'] = 'Subject_Controller/getCorsBatch';
|
||||
$route['addSubjectDetails'] = 'Subject_Controller/addSubjectDetails';
|
||||
|
||||
|
||||
|
||||
|
||||
133
Apollo/api/application/controllers/Center_Controller.php
Normal file
133
Apollo/api/application/controllers/Center_Controller.php
Normal file
@ -0,0 +1,133 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by VisualCodeStudio.
|
||||
* User: Subaram
|
||||
* Date: 15/1/18
|
||||
* Time: 12:55 PM
|
||||
*/
|
||||
class Center_Controller extends REST_Controller {
|
||||
|
||||
function __construct()
|
||||
{
|
||||
// Construct the parent class
|
||||
parent::__construct();
|
||||
|
||||
// Configure limits on our controller methods
|
||||
// Ensure you have created the 'limits' table and enabled 'limits' within application/config/rest.php
|
||||
$this->methods['addCenterDetails_get']['limit'] = 500; // 500 requests per hour per user/key
|
||||
$this->methods['addCenterDetails_post']['limit'] = 100; // 100 requests per hour per user/key
|
||||
$this->methods['addCenterDetails_delete']['limit'] = 50; // 50 requests per hour per user/key
|
||||
$this->methods['getCenterDetails_post']['limit'] = 500; // 50 requests per hour per user/key
|
||||
$this->methods['updateCenterDetails_post']['limit'] = 500;// 500 requests per hour per user/key
|
||||
|
||||
// load the model
|
||||
$this->load->model('Center_model', 'center_model');
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Add Center details
|
||||
* created by srk
|
||||
* */
|
||||
|
||||
public function addCenterDetails_post()
|
||||
{
|
||||
$now = new DateTime();
|
||||
$now->setTimezone(new DateTimezone('Asia/Kolkata'));
|
||||
$details['CenterCode'] = $this->post('CenterCode');
|
||||
$details['CenterName'] = $this->post('CenterName');
|
||||
$details['CenterAddress'] = $this->post('Address');
|
||||
$details['Comments'] = $this->post('Comments');
|
||||
$details['CreatedBy'] = $this->post('createdBy');
|
||||
$details['IsActive'] = $this->post('status');
|
||||
$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)
|
||||
if ($centerDetails)
|
||||
{
|
||||
$centerDetails['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($centerDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'Something went wrong.please try again!',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/*
|
||||
* get Batch details
|
||||
* created by srk
|
||||
*/
|
||||
public function getCenterDetails_post()
|
||||
{
|
||||
$requestedBy = $this->post('requestedBy');
|
||||
$getCenter = $this->center_model->getCenter($requestedBy);
|
||||
// print_r($getCenter);
|
||||
// die;
|
||||
if ($getCenter)
|
||||
{
|
||||
$getCenter['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($getCenter, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'No records found!',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/*
|
||||
* update Center details
|
||||
* created by srk
|
||||
*/
|
||||
public function updateCenterDetails_post()
|
||||
{
|
||||
|
||||
$now = new DateTime();
|
||||
$now->setTimezone(new DateTimezone('Asia/Kolkata'));
|
||||
$details['CenterCode'] = $this->post('CenterCode');
|
||||
$details['CenterName'] = $this->post('CenterName');
|
||||
$details['CenterAddress'] = $this->post('Address');
|
||||
$details['Comments'] = $this->post('Comments');
|
||||
$details['IsActive'] = $this->post('status');
|
||||
$details['UpdateBy'] = $this->post('updateBy');
|
||||
$details['UpdateOn'] = $now->format("Y-m-d H:i:s");
|
||||
|
||||
|
||||
$updateDetails = $this->center_model->updateCenter($details);// Check if the users data store contains users (in case the database result returns NULL)
|
||||
|
||||
if ($updateDetails)
|
||||
{
|
||||
$updateDetails['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($updateDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'Something went wrong.please try again!',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
182
Apollo/api/application/controllers/Subject_Controller.php
Normal file
182
Apollo/api/application/controllers/Subject_Controller.php
Normal file
@ -0,0 +1,182 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: subaram
|
||||
|
||||
*/
|
||||
class Subject_Controller extends REST_Controller {
|
||||
|
||||
function __construct()
|
||||
{
|
||||
// Construct the parent class
|
||||
parent::__construct();
|
||||
|
||||
// Configure limits on our controller methods
|
||||
// Ensure you have created the 'limits' table and enabled 'limits' within application/config/rest.php
|
||||
$this->methods['addSubjectDetails_get']['limit'] = 500; // 500 requests per hour per user/key
|
||||
$this->methods['addSubjectDetails_post']['limit'] = 100; // 100 requests per hour per user/key
|
||||
$this->methods['addSubjectDetails_delete']['limit'] = 50; // 50 requests per hour per user/key
|
||||
$this->methods['getSubjectDetails_post']['limit'] = 500; // 50 requests per hour per user/key
|
||||
$this->methods['updateSubjectDetails_post']['limit'] = 500;// 500 requests per hour per user/key
|
||||
|
||||
// load the model
|
||||
$this->load->model('Subject_model', 'subject_model');
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* This method used to add Subject details
|
||||
*
|
||||
* */
|
||||
|
||||
public function addSubjectDetails_post()
|
||||
{
|
||||
|
||||
$now = new DateTime();
|
||||
$save['UniversityName'] = $this->post('university');
|
||||
$save['Course'] = $this->post('course');
|
||||
|
||||
$save['Batch'] = $this->post('batch');
|
||||
$save['Comments'] = $this->post('Comment');
|
||||
$save['IsActive'] = 1;
|
||||
|
||||
$now->setTimezone(new DateTimezone('Asia/Kolkata'));
|
||||
|
||||
$save['CreatedBy'] = $this->post('createdBy');
|
||||
$save['CreatedOn'] = $now->format('Y-m-d H:i:s');
|
||||
//$details['IsActive'] = $this->post('status');
|
||||
|
||||
|
||||
$jsonSemFeesData=$this->post('semFeesAmounts');
|
||||
|
||||
$subjectDetails = $this->subject_model->addSubject($save,$jsonSemFeesData);// Check if the users data store contains users (in case the database result returns NULL)
|
||||
|
||||
if ($subjectDetails)
|
||||
{
|
||||
$subjectDetails['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($subjectDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'Something went wrong.please try again!',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/*
|
||||
* get Subject details
|
||||
*
|
||||
* */
|
||||
public function getSubjectDetails_post()
|
||||
{
|
||||
$requestedBy = $this->post('requestedBy');
|
||||
|
||||
$getSubject = $this->subject_model->getSubject($requestedBy);
|
||||
|
||||
|
||||
|
||||
if ($getSubject)
|
||||
{
|
||||
$getSubject['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($getSubject, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'No records found!',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/*
|
||||
* update the Subject details
|
||||
*
|
||||
* */
|
||||
public function updateSubjectDetails_post()
|
||||
{
|
||||
$now = new DateTime();
|
||||
$now->setTimezone(new DateTimezone('Asia/Kolkata'));
|
||||
$updateID = $this->post('updateID');
|
||||
$save['Comments'] = $this->post('Comments');
|
||||
$save['IsActive'] = 1;
|
||||
$save['UpdatedBy'] = $this->post('updatedBy');
|
||||
$save['UpdatedOn'] = $now->format('Y-m-d H:i:s');
|
||||
//$details['IsActive'] = $this->post('status');
|
||||
$jsonSemFeesData=$this->post('semFeesAmounts');
|
||||
|
||||
|
||||
$updateDetails = $this->subject_model->updateSubject($save,$jsonSemFeesData,$updateID);// Check if the users data store contains users (in case the database result returns NULL)
|
||||
|
||||
if ($updateDetails)
|
||||
|
||||
{
|
||||
$updateDetails['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($updateDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'Something went wrong.please try again!',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
//get university dropdown
|
||||
public function getUniversity_post() {
|
||||
$reqData = $this->post('data');
|
||||
$getUniversityListDetails = $this->subject_model->get_university_list();
|
||||
if ($getUniversityListDetails)
|
||||
{
|
||||
$getUniversityListDetails['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($getUniversityListDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'No list were found',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//get course & Batch dropdown
|
||||
public function getCorsBatch_post() {
|
||||
$data = $this->post('data');
|
||||
$getCourseBatchListDetails = $this->subject_model->get_courseBatch_list($data);// Check if the employee exist
|
||||
if ($getCourseBatchListDetails)
|
||||
{
|
||||
$getCourseBatchListDetails['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($getCourseBatchListDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'No list were found',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
97
Apollo/api/application/models/Center_model.php
Normal file
97
Apollo/api/application/models/Center_model.php
Normal file
@ -0,0 +1,97 @@
|
||||
<?php
|
||||
/*
|
||||
* Created by Visual Code studio
|
||||
* User: Subaram
|
||||
* Date: 15/1/18
|
||||
* Time: 10:05 AM
|
||||
*/
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Center_model extends CI_Model {
|
||||
|
||||
|
||||
/*
|
||||
* Add batch details
|
||||
* created by subaramkumar
|
||||
*/
|
||||
|
||||
public function addCenter($arrayDetails=null)
|
||||
{
|
||||
|
||||
$this->db->select('CenterCode');
|
||||
$this->db->where('CenterCode', $arrayDetails['CenterCode']);
|
||||
if($this->db->get(CENTER)->first_row()){
|
||||
$result['centerStatus'] = false;
|
||||
$result['message'] = "This center Code is already exist!";
|
||||
} else {
|
||||
$this->db->insert(CENTER, $arrayDetails);
|
||||
if ($this->db->affected_rows() == '1') {
|
||||
|
||||
$result['centerStatus'] = true;
|
||||
$result['message'] = "Successfully center details added";
|
||||
} else {
|
||||
$result['centerStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Get batch details
|
||||
* created by srk
|
||||
*/
|
||||
|
||||
|
||||
|
||||
public function getCenter()
|
||||
{
|
||||
$this->db->select('*');
|
||||
$this->db->order_by('CreatedOn','DESC');
|
||||
$centerDetails = $this->db->get(CENTER);
|
||||
// print_r($centerDetails);
|
||||
// die;
|
||||
|
||||
if($centerDetails->result()){
|
||||
|
||||
$result['centerStatus'] = true;
|
||||
$result['details'] = $centerDetails->result();
|
||||
}
|
||||
else {
|
||||
$result['centerStatus'] = false;
|
||||
$result['message'] = "No records found!";
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* update batch details
|
||||
* created by Srk
|
||||
*/
|
||||
public function updateCenter($arrayDetails=null)
|
||||
{
|
||||
$this->db->where('CenterCode',$arrayDetails['CenterCode']);
|
||||
$updateStatus=$this->db->update(CENTER, $arrayDetails);
|
||||
if($updateStatus){
|
||||
|
||||
$result['centerStatus'] = true;
|
||||
$result['message'] = "Successfully Center details updated";
|
||||
}
|
||||
|
||||
else {
|
||||
$result['centerStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
227
Apollo/api/application/models/Subject_model.php
Normal file
227
Apollo/api/application/models/Subject_model.php
Normal file
@ -0,0 +1,227 @@
|
||||
<?php
|
||||
/**
|
||||
* Date: 11/9/17
|
||||
* Time: 5:28 PM
|
||||
*/
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Subject_model extends CI_Model
|
||||
{
|
||||
|
||||
|
||||
public function addSubject($save=null,$jsonSemFeesData=null)
|
||||
{
|
||||
|
||||
|
||||
$this->db->insert('T_SubjectMaster', $save);
|
||||
$subject_id = $this->db->insert_id();
|
||||
if($this->db->affected_rows() == '1'){
|
||||
|
||||
if($jsonSemFeesData){
|
||||
foreach($jsonSemFeesData as $row)
|
||||
{
|
||||
|
||||
|
||||
$insertFeesArray['Subject_ID'] =$subject_id;
|
||||
$insertFeesArray['Semester'] =$row['Semester'];
|
||||
$insertFeesArray['SubjectCode'] =$row['SubjectCode'];
|
||||
$insertFeesArray['SubjectName'] =$row['SubjectName'];
|
||||
$insertFeesArray['CreatedOn'] =$save['CreatedOn'];
|
||||
$insertFeesArray['CreatedBy'] =$save['CreatedBy'];
|
||||
|
||||
|
||||
$this->db->insert('T_SubjectDetails', $insertFeesArray);
|
||||
|
||||
}
|
||||
|
||||
$result['SubjectStatus'] = true;
|
||||
$result['message'] = "Successfully Subject details added";
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
$result['SubjectStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
//update subject
|
||||
|
||||
public function updateSubject($save=null,$jsonSemFeesData=null,$updateID=null)
|
||||
{
|
||||
$this->db->where('ID',$updateID);
|
||||
$upateStatus=$this->db->update('T_SubjectMaster', $save);
|
||||
|
||||
|
||||
if($upateStatus) {
|
||||
|
||||
if ($jsonSemFeesData) {
|
||||
foreach ($jsonSemFeesData as $row)
|
||||
{
|
||||
$subID = $row['ID'];
|
||||
|
||||
$updateFeesArray['Subject_ID'] =$updateID;
|
||||
$updateFeesArray['Semester'] =$row['Semester'];
|
||||
$updateFeesArray['SubjectCode'] =$row['SubjectCode'];
|
||||
$updateFeesArray['SubjectName'] =$row['SubjectName'];
|
||||
$updateFeesArray['UpdatedOn'] = $save['UpdatedOn'];
|
||||
$updateFeesArray['UpdatedBy'] = $save['UpdatedBy'];
|
||||
|
||||
if($subID!='' OR $subID!=null){
|
||||
$this->db->where('ID', $subID);
|
||||
$this->db->update('T_SubjectDetails', $updateFeesArray);
|
||||
}
|
||||
else{
|
||||
$this->db->insert('T_SubjectDetails', $updateFeesArray);
|
||||
}
|
||||
|
||||
}
|
||||
$result['SubjectStatus'] = true;
|
||||
$result['message'] = "Successfully subject details updated";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
$result['SubjectStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//get subject details
|
||||
public function getSubject()
|
||||
{
|
||||
$this->db->select('BS.BatchName,CU.ID,CS.CourseName,CU.Comments ,CU.IsActive,US.UniversityName');
|
||||
$this->db->from('T_SubjectMaster'.' as CU');
|
||||
$this->db->join(UNIVERSITY.' as US', 'US.UniversityID = CU.UniversityName');
|
||||
$this->db->join(COURSE.' as CS', 'CS.CourseID = CU.Course');
|
||||
$this->db->join(BATCH.' as BS', 'BS.BatchCode = CU.Batch');
|
||||
|
||||
|
||||
$this->db->order_by('CU.CreatedOn','DESC');
|
||||
$subjectDetails = $this->db->get();
|
||||
|
||||
if($subjectDetails->result()){
|
||||
|
||||
$result['SubjectStatus'] = true;
|
||||
|
||||
foreach ($subjectDetails->result() as $row){
|
||||
$fetchData['ID']=$row->ID;
|
||||
$fetchData['CourseName']=$row->CourseName;
|
||||
$fetchData['BatchName']=$row->BatchName;
|
||||
|
||||
$fetchData['Comments']=$row->Comments;
|
||||
|
||||
$fetchData['IsActive']=$row->IsActive;
|
||||
|
||||
$fetchData['UniversityName']=$row->UniversityName;
|
||||
$fetchData['feesStructures'] = $this->getSubjectDetails($row->ID);
|
||||
|
||||
$storeSubjectArray[]=$fetchData;
|
||||
}
|
||||
$result['details'] = $storeSubjectArray;
|
||||
}
|
||||
else {
|
||||
$result['SubjectStatus'] = false;
|
||||
$result['message'] = "No records found!";
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// public function getUniversityDetails()
|
||||
// {
|
||||
// $this->db->select('UniversityID,UniversityName');
|
||||
// $this->db->order_by('UniversityID','ASC');
|
||||
// $this->db->where('IsActive','1');
|
||||
// $universityDetails = $this->db->get(UNIVERSITY);
|
||||
// return $universityDetails->result();
|
||||
// }
|
||||
|
||||
|
||||
|
||||
public function getSubjectDetails($ID=null)
|
||||
{
|
||||
|
||||
$this->db->select('ID,Subject_ID,Semester,SubjectCode,SubjectName');
|
||||
$this->db->order_by('ID','ASC');
|
||||
$this->db->where('Subject_ID',$ID);
|
||||
$this->db->from('T_SubjectDetails');
|
||||
$subjectDetails = $this->db->get();
|
||||
return $subjectDetails->result();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*** get university list******/
|
||||
public function get_university_list() {
|
||||
$this->db->select('*');
|
||||
$this->db->order_by('CreatedOn', 'DESC');
|
||||
$this->db->from(UNIVERSITY);
|
||||
$this->db->where('IsActive',1);
|
||||
$univDetails = $this->db->get();
|
||||
$universityDetails = $univDetails->result();
|
||||
if (count($universityDetails) > 0) {
|
||||
$results['univList'] = true;
|
||||
$results['university_details'] = $universityDetails;
|
||||
} else {
|
||||
$results['univList'] = false;
|
||||
$results['message'] = 'No record found';
|
||||
}
|
||||
return $results;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**********get course&Batch for university********/
|
||||
|
||||
public function get_courseBatch_list($univId) {
|
||||
$this->db->select('C.CourseID, C.CourseName');
|
||||
$this->db->from(COURSE.' as C');
|
||||
$this->db->where('UniversityID',$univId);
|
||||
$this->db->where('IsActive',1);
|
||||
$courseDetails = $this->db->get();
|
||||
if($courseDetails->result()){
|
||||
$this->db->select('B.BatchCode, B.BatchName');
|
||||
$this->db->from(BATCH.' as B');
|
||||
$this->db->where('UniversityID',$univId);
|
||||
$this->db->where('IsActive',1);
|
||||
$batchDetails = $this->db->get();
|
||||
if( $batchDetails->result()) {
|
||||
$result['courseStatus'] = true;
|
||||
$result['course_details'] = $courseDetails->result();
|
||||
$result['batch_details'] = $batchDetails->result();
|
||||
} else {
|
||||
$result['courseStatus'] = false;
|
||||
$result['message'] = "No records found!";
|
||||
}
|
||||
}
|
||||
else {
|
||||
$result['courseStatus'] = false;
|
||||
$result['message'] = "No records found!";
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -69,7 +69,9 @@
|
||||
"STATUS": "STATUS",
|
||||
"STUDENTSTATUS": "ACTIVITY STATUS",
|
||||
"CERTIFICATETYPE": "CERTIFICATE TYPE",
|
||||
"DAYBOOKMASTER":"INCOME/EXPENSE HEADS"
|
||||
"DAYBOOKMASTER":"INCOME/EXPENSE HEADS",
|
||||
"CENTERMASTER": "CENTER DETAILS",
|
||||
"SUBJECTMASTER":"SUBJECT MASTER"
|
||||
},
|
||||
"student": {
|
||||
"MAIN": "STUDENTS",
|
||||
|
||||
@ -161,6 +161,10 @@ app.constant('JS_REQUIRES', {
|
||||
'sendSMSsuperadminCtrl':'assets/js/controllers/sendSMSsuperadminCtrl.js',
|
||||
'sendSMSDetailssuperadminCtrl': 'assets/js/controllers/sendSMSDetailssuperadminCtrl.js',
|
||||
'feesNotification':'assets/js/controllers/feesNotification.js',
|
||||
//CENTET MASTER
|
||||
'centerCtrl':'assets/js/controllers/centerCtrl.js',
|
||||
//SUBJECT MASTER
|
||||
'subjectCtrl':'assets/js/controllers/subjectCtrl.js',
|
||||
|
||||
|
||||
//*** Filters
|
||||
|
||||
@ -204,7 +204,26 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com
|
||||
ncyBreadcrumb: {
|
||||
label: 'Announcement'
|
||||
},
|
||||
}).state('app.student', {
|
||||
}).state('app.master.centerMaster', {
|
||||
url: '/center master',
|
||||
templateUrl: "assets/views/centerMaster.html",
|
||||
resolve: loadSequence('centerCtrl','ngTable', 'ladda', 'angular-ladda'),
|
||||
title: 'Center Master',
|
||||
ncyBreadcrumb: {
|
||||
label: 'Center Master'
|
||||
},
|
||||
}).state('app.master.subjectMaster', {
|
||||
url: '/subject master',
|
||||
templateUrl: "assets/views/subjectMaster.html",
|
||||
resolve: loadSequence('subjectCtrl','ngTable', 'ladda', 'angular-ladda'),
|
||||
title: 'Subject Master',
|
||||
ncyBreadcrumb: {
|
||||
label: 'Subject Master'
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
.state('app.student', {
|
||||
url: '/student',
|
||||
template: '<div ui-view class="fade-in-up"> <div style="margin: auto; width: 50%;padding: 10px;"> STUDENT DETAILS </div> </div>',
|
||||
title: 'Student',
|
||||
|
||||
223
Apollo/assets/js/controllers/centerCtrl.js
Normal file
223
Apollo/assets/js/controllers/centerCtrl.js
Normal file
@ -0,0 +1,223 @@
|
||||
'use strict';
|
||||
/**
|
||||
* controllers for ng-table
|
||||
* Simple table with sorting and filtering on AngularJS
|
||||
*/
|
||||
|
||||
app.controller('centerCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state", function ($scope,$rootScope,toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state) {
|
||||
$scope.myModel = {
|
||||
"centerCode": "",
|
||||
"centerName": "",
|
||||
"Address":"",
|
||||
"Comment":"",
|
||||
"switchsetting": true
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* edit batch details
|
||||
* created by subaram
|
||||
* */
|
||||
$scope.editId = -1;
|
||||
$scope.setEditId = function (pid) {
|
||||
|
||||
$scope.editId = pid;
|
||||
$scope.viewId = -1;
|
||||
};
|
||||
|
||||
/*
|
||||
* cancel edit div
|
||||
* created by subaram
|
||||
* */
|
||||
$scope.cancel = function () {
|
||||
$scope.init();
|
||||
$scope.editId = -1;
|
||||
|
||||
};
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
/*
|
||||
* Submit,update and reset center details
|
||||
* @params myModel
|
||||
* created by subaram
|
||||
* */
|
||||
$scope.centerForm = {
|
||||
|
||||
submit: function (form, myModel,loading) {
|
||||
var firstError = null;
|
||||
if (form.$invalid) { //alert("suba")
|
||||
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 {
|
||||
|
||||
$scope.ldloading1 = {};
|
||||
|
||||
$scope.ldloading1[loading.replace('-', '_')] = true;
|
||||
|
||||
|
||||
var addCenter = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'addCenterDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
CenterCode: myModel.centerCode,
|
||||
CenterName: myModel.centerName,
|
||||
Address: myModel.Address,
|
||||
Comments:myModel.Comment,
|
||||
status: myModel.switchsetting,
|
||||
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID
|
||||
}
|
||||
};
|
||||
$http(addCenter).then(function (response) {
|
||||
if (response.data.status==200 && response.data.centerStatus) {
|
||||
$scope.ldloading1[loading.replace('-', '_')] = false;
|
||||
swal("Success!", response.data.message, "success");
|
||||
$state.go($state.current, {}, {reload: true});
|
||||
} else {
|
||||
$scope.ldloading1[loading.replace('-', '_')] = false;
|
||||
swal("Failed!", response.data.message, "error");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
reset: function (form) {
|
||||
|
||||
// $scope.myModel = angular.copy($scope.master);
|
||||
form.$setPristine(true);
|
||||
$scope.myModel = {
|
||||
"centerCode": "",
|
||||
"centerName": "",
|
||||
"Address":"",
|
||||
"Comment":"",
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* update the center details
|
||||
* created by subaram
|
||||
* */
|
||||
$scope.updateCenter = function (myModel, form, loading) {
|
||||
|
||||
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].$stop_name;
|
||||
}
|
||||
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||
} else {
|
||||
$scope.ldloading = {};
|
||||
|
||||
$scope.ldloading[loading.replace('-', '_')] = true;
|
||||
|
||||
|
||||
var update = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'updateCenterDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
CenterCode: myModel.CenterCode,
|
||||
CenterName: myModel.CenterName,
|
||||
Address: myModel.CenterAddress,
|
||||
Comments:myModel.Comments,
|
||||
status: myModel.IsActive,
|
||||
updateBy: JSON.parse(localStorage.getItem('localObj')).localUserID
|
||||
}
|
||||
};
|
||||
$http(update).then(function (response) {
|
||||
if (response.data.status==200 && response.data.centerStatus) {
|
||||
$scope.ldloading[loading.replace('-', '_')] = false;
|
||||
$scope.editId = -1;
|
||||
$scope.init();
|
||||
swal("Success!", response.data.message, "success");
|
||||
|
||||
|
||||
} else {
|
||||
$scope.ldloading[loading.replace('-', '_')] = false;
|
||||
swal("Failed!", response.data.message, "error");
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
/*
|
||||
*get center details when page loading called from view file
|
||||
*
|
||||
* created by Srk
|
||||
* */
|
||||
$scope.loader='';
|
||||
|
||||
$scope.emptyData='';
|
||||
|
||||
$rootScope.init = function () {
|
||||
|
||||
var getCenter = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getCenterDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
|
||||
}
|
||||
};
|
||||
|
||||
$http(getCenter).then(function (response) {
|
||||
if (response.data.status==200 && response.data.centerStatus) {
|
||||
|
||||
$scope.emptyData=true;
|
||||
$scope.loader=true;
|
||||
|
||||
$scope.data = response.data.details;
|
||||
|
||||
|
||||
} else {
|
||||
$scope.emptyData=false;
|
||||
$scope.loader=true;
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
}]);
|
||||
586
Apollo/assets/js/controllers/subjectCtrl.js
Normal file
586
Apollo/assets/js/controllers/subjectCtrl.js
Normal file
@ -0,0 +1,586 @@
|
||||
'use strict';
|
||||
/**
|
||||
* controllers for ng-table
|
||||
* Simple table with sorting and filtering on AngularJS
|
||||
*/
|
||||
|
||||
app.controller('subjectCtrl', ["$scope", "$rootScope","toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state",'ipCookie', function ($scope,$rootScope,toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state,ipCookie) {
|
||||
$scope.myModel = {
|
||||
|
||||
"university": "",
|
||||
"course": "",
|
||||
"batch": "",
|
||||
"comments":"",
|
||||
"switchsetting": true,
|
||||
|
||||
};
|
||||
|
||||
|
||||
$rootScope.updateMoreItems = [];
|
||||
$scope.editId = -1;
|
||||
$rootScope.setEditId = function (pid,p) {
|
||||
|
||||
|
||||
$rootScope.updateMoreItems=[];
|
||||
// find index for fees type drop down list
|
||||
|
||||
angular.forEach(p.feesStructures, function(value, key){
|
||||
$rootScope.updateMoreItems.push({
|
||||
"ID":value.ID,
|
||||
"Semester":value.Semester,
|
||||
"SubjectCode":value.SubjectCode,
|
||||
"SubjectName": value. SubjectName,
|
||||
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$scope.editId = pid;
|
||||
};
|
||||
|
||||
|
||||
$scope.viewId=-1;
|
||||
$scope.setEditI = function (pid,p) {
|
||||
$scope.editId=-1;
|
||||
$scope.init();
|
||||
$scope.viewId=p.ID;
|
||||
$scope.editId = pid;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* cancel edit div
|
||||
*
|
||||
* */
|
||||
$scope.cancel = function () {
|
||||
$scope.init();
|
||||
$scope.editId = -1;
|
||||
|
||||
};
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
/*
|
||||
* Submit,update and reset Subject details
|
||||
* @params myModel
|
||||
*
|
||||
* */
|
||||
$scope.subjectFORM = {
|
||||
submit: function (form, myModel,semYearModel,loading,addMoreItems) {
|
||||
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 {
|
||||
|
||||
// $scope.ldloading1 = {};
|
||||
|
||||
//$scope.ldloading1[loading.replace('-', '_')] = true;
|
||||
$rootScope.addMoreItems.push({
|
||||
|
||||
|
||||
Semester: semYearModel. Semester,
|
||||
SubjectCode:semYearModel.SubjectCode,
|
||||
SubjectName:semYearModel.SubjectName
|
||||
});
|
||||
|
||||
|
||||
var addSubject = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'addSubjectDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
university:myModel.university,
|
||||
course:myModel.course,
|
||||
batch:myModel.batch,
|
||||
semFeesAmounts:$rootScope.addMoreItems,
|
||||
Comment:myModel.Comment,
|
||||
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID
|
||||
}
|
||||
};
|
||||
|
||||
$http(addSubject).then(function (response) {
|
||||
if (response.data.status==200 && response.data.SubjectStatus) {
|
||||
|
||||
// $scope.ldloading1[loading.replace('-', '_')] = false;
|
||||
swal("Success!", response.data.message, "success");
|
||||
$state.go($state.current, {}, {reload: true});
|
||||
|
||||
} else {
|
||||
$rootScope.addMoreItems.splice($rootScope.addMoreItems.length-1);
|
||||
// $scope.ldloading1[loading.replace('-', '_')] = false;
|
||||
swal("Failed!", response.data.message, "error");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
reset: function (form) {
|
||||
$rootScope.addMoreItems = [];
|
||||
|
||||
$scope.myModel = angular.copy($scope.master);
|
||||
form.$setPristine(true);
|
||||
$scope.myModel = {
|
||||
|
||||
"university": "",
|
||||
"course": "",
|
||||
"batch": "",
|
||||
"comments":"",
|
||||
"switchsetting": true,
|
||||
|
||||
};
|
||||
$scope.myModelSemYear = {
|
||||
"Semester":"",
|
||||
"SubjectCode":"",
|
||||
"SubjectName":"",
|
||||
};
|
||||
|
||||
|
||||
$rootScope.myModelSemYear1 = {
|
||||
"Semester":"",
|
||||
"SubjectCode":"",
|
||||
"SubjectName":"",
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
$rootScope.addMoreItems = [];
|
||||
|
||||
|
||||
$scope.myModelSemYear = {
|
||||
"Semester":"",
|
||||
"SubjectCode":"",
|
||||
"SubjectName":"",
|
||||
};
|
||||
|
||||
$rootScope.addMoreFeesItems = function (model,form) {
|
||||
|
||||
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].$stop_name;
|
||||
}
|
||||
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
else {
|
||||
$rootScope.addMoreItems.push({
|
||||
|
||||
Semester: model.Semester,
|
||||
SubjectCode:model.SubjectCode,
|
||||
SubjectName:model.SubjectName
|
||||
});
|
||||
|
||||
|
||||
$scope.myModelSemYear.Semester="";
|
||||
$scope.myModelSemYear.SubjectCode="";
|
||||
$scope.myModelSemYear.SubjectName="";
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// //alert('Duplicate Semester: ' + checkDuplicateInObject('Semester', $rootScope.addMoreItems));
|
||||
// alert('Duplicate SubjectCode: ' + checkDuplicateInObject('SubjectCode', $rootScope.addMoreItems));
|
||||
// //alert('DuplicateSubjectName: ' + checkDuplicateInObject('SubjectName', $rootScope.addMoreItems));
|
||||
|
||||
|
||||
// //
|
||||
|
||||
|
||||
// if(checkDuplicateInObject('SubjectCode', $rootScope.addMoreItems) === false) {
|
||||
// $scope.myModelSemYear.SubjectCode="";
|
||||
|
||||
// }else{
|
||||
// $rootScope.addMoreItems.push({
|
||||
|
||||
// Semester: model.Semester,
|
||||
// SubjectCode:model.SubjectCode,
|
||||
// SubjectName:model.SubjectName
|
||||
// });
|
||||
|
||||
// }
|
||||
|
||||
// $scope.myModelSemYear.SubjectCode="";
|
||||
// $scope.myModelSemYear.Semester="";
|
||||
// $scope.myModelSemYear.SubjectName="";
|
||||
|
||||
// function checkDuplicateInObject(propertyName, inputArray) {
|
||||
// var seenDuplicate = true,
|
||||
// testObject = {};
|
||||
|
||||
// inputArray.map(function(item) {
|
||||
// var itemPropertyName = item[propertyName];
|
||||
// if (itemPropertyName in testObject) {
|
||||
// testObject[itemPropertyName].duplicate = true;
|
||||
// item.duplicate = true;
|
||||
// seenDuplicate = false;
|
||||
// }
|
||||
// else {
|
||||
// testObject[itemPropertyName] = item;
|
||||
// delete item.duplicate;
|
||||
// }
|
||||
// });
|
||||
|
||||
// return seenDuplicate;
|
||||
// }
|
||||
|
||||
|
||||
// function checkDuplicateInObject(propertyName, inputArray) {
|
||||
// // alert(JSON.stringify(inputArray));
|
||||
// var seenDuplicate = false;
|
||||
// $rootScope.testObject = {};
|
||||
|
||||
// // alert(propertyName);
|
||||
// // if(inputArray.length === 0) {
|
||||
// // return $rootScope.seenDuplicate = true;
|
||||
|
||||
// // } else{
|
||||
// inputArray.map(function(item) {
|
||||
// alert(JSON.stringify(item));
|
||||
// $rootScope.itemPropertyName = item[propertyName];
|
||||
// if ($rootScope.itemPropertyName in $rootScope.testObject) {
|
||||
// $rootScope.testObject[$rootScope.itemPropertyName].duplicate = true;
|
||||
// item.duplicate = true;
|
||||
// seenDuplicate = true;
|
||||
// alert('kd');
|
||||
// }
|
||||
// else {
|
||||
// $rootScope.testObject[$rootScope.itemPropertyName] = item;
|
||||
// delete item.duplicate;
|
||||
// }
|
||||
// // alert(JSON.stringify($rootScope.testObject));
|
||||
// });
|
||||
// // }
|
||||
|
||||
|
||||
// return seenDuplicate;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
///***updateupdateMoreItems */
|
||||
$rootScope.updateMoreItems = [];
|
||||
|
||||
$rootScope.myModelSemYear1 = {
|
||||
"Semester":"",
|
||||
"SubjectCode":"",
|
||||
"SubjectName":"",
|
||||
};
|
||||
$rootScope.updateMoreFeesItems = function (model,form) {
|
||||
|
||||
|
||||
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].$stop_name;
|
||||
}
|
||||
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
else {
|
||||
|
||||
$rootScope.updateMoreItems.push({
|
||||
|
||||
ID:"",
|
||||
Semester: model.Semester,
|
||||
SubjectCode:model.SubjectCode,
|
||||
SubjectName:model.SubjectName
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
$scope.myModelSemYear1.ID="";
|
||||
$scope.myModelSemYear1.Semester="";
|
||||
$scope.myModelSemYear1.SubjectCode="";
|
||||
$scope.myModelSemYear1.SubjectName="";
|
||||
}
|
||||
|
||||
////*****update subject details */
|
||||
$scope.updateSubject = function (myModel, form,semYear, loading) {
|
||||
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].$stop_name;
|
||||
}
|
||||
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||
} else {
|
||||
if(semYear. Semester!="" || semYear.SubjectCode!=""|| semYear. SubjectName!=""){
|
||||
$rootScope.updateMoreItems.push({
|
||||
ID:"",
|
||||
Semester:semYear. Semester,
|
||||
SubjectCode:semYear.SubjectCode,
|
||||
SubjectName: semYear. SubjectName,
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
$scope.ldloading = {};
|
||||
|
||||
$scope.ldloading[loading.replace('-', '_')] = true;
|
||||
|
||||
|
||||
var update = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'updateSubjectDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
|
||||
data: {
|
||||
|
||||
semFeesAmounts:$rootScope.updateMoreItems,
|
||||
Comments:myModel.Comments,
|
||||
updateID: myModel.ID,
|
||||
updatedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
|
||||
}
|
||||
};
|
||||
$http(update).then(function (response) {
|
||||
if (response.data.status==200 && response.data.SubjectStatus) {
|
||||
$scope.ldloading[loading.replace('-', '_')] = false;
|
||||
$rootScope.updateMoreItems=[];
|
||||
$rootScope.myModelSemYear1.ID="";
|
||||
$rootScope.myModelSemYear1.Semester="";
|
||||
$rootScope.myModelSemYear1.SubjectCode="";
|
||||
$rootScope.myModelSemYear1.SubjectName="";
|
||||
|
||||
|
||||
|
||||
$scope.init();
|
||||
$rootScope.updateMoreItems.splice( $rootScope.updateMoreItems.length-1);
|
||||
swal("Success!", response.data.message, "success");
|
||||
|
||||
$scope.editId = -1;
|
||||
|
||||
|
||||
} else {
|
||||
$scope.ldloading[loading.replace('-', '_')] = false;
|
||||
$scope.init();
|
||||
swal("Failed!", response.data.message, "error");
|
||||
$rootScope.updateMoreItems.splice( $rootScope.updateMoreItems.length-1);
|
||||
// $rootScope.addMoreItems.splice($rootScope.addMoreItems.length-1);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/////**********/// */
|
||||
var localDetail = JSON.parse(localStorage.getItem('localObj'));
|
||||
var localDetails = ipCookie('cookiechk');
|
||||
|
||||
$scope.init = function () {
|
||||
$scope.getUniversityList();
|
||||
}
|
||||
//GET UNIVERSITY dETAILS
|
||||
|
||||
$scope.universityData = '';
|
||||
$scope.getUniversityList = function () {
|
||||
var empListreq = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getUniversity/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
data: localDetails
|
||||
}
|
||||
};
|
||||
$http(empListreq).then(function (response) {
|
||||
if (response.data.univList) {
|
||||
$scope.universityData = response.data.university_details;
|
||||
} else {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$scope.getUniversityList();
|
||||
|
||||
|
||||
|
||||
|
||||
//GET COURSE&BATCH
|
||||
|
||||
$scope.courseLoading = false;
|
||||
$scope.onSlecetUnivAdd = function () {
|
||||
$scope.courseDataAdd = '';
|
||||
$scope.batchDataAdd = '';
|
||||
$scope.myModel.course = '';
|
||||
$scope.myModel.batch = '';
|
||||
$scope.courseLoading = true;
|
||||
var univListreq = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getCourseBatch/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
data: $scope.myModel.university
|
||||
}
|
||||
};
|
||||
$http(univListreq).then(function (response) {
|
||||
if (response.data.courseStatus) {
|
||||
$scope.courseLoading = false;
|
||||
$scope.courseDataAdd = response.data.course_details;
|
||||
$scope.batchDataAdd = response.data.batch_details;
|
||||
} else {
|
||||
$scope.courseLoading = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
$scope.loader='';
|
||||
|
||||
$rootScope.emptyData='';
|
||||
|
||||
|
||||
$scope.init = function () {
|
||||
|
||||
$scope.loader='';
|
||||
|
||||
var getsubject = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getSubjectDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
|
||||
}
|
||||
};
|
||||
|
||||
$http(getsubject).then(function (response) {
|
||||
if (response.data.status==200 && response.data.SubjectStatus) {
|
||||
|
||||
$scope.emptyData=true;
|
||||
$scope.loader=true;
|
||||
|
||||
$scope.data = response.data.details;
|
||||
//alert(JSON.stringify( $scope.data ));
|
||||
///
|
||||
// $scope.setModel = {
|
||||
// "feesType": $scope.data[0],
|
||||
|
||||
|
||||
// };
|
||||
// //alert(JSON.stringify( $scope.data[0] ));
|
||||
// // $scope.setTotalAmount=$scope.data[0].PayableFees;
|
||||
|
||||
|
||||
// $rootScope.updateMoreItems=[];
|
||||
|
||||
// if($scope.data[0].feesStructures != '')
|
||||
// // alert(JSON.stringify($scope.data[0].feesStructures))
|
||||
|
||||
// {
|
||||
// $scope.myModelSemYear1.ID=$scope.data[0].feesStructures[$scope.data[0].feesStructures.length-1].ID;
|
||||
// //alert(JSON.stringify( $scope.myModelSemYear1.ID ));
|
||||
// $rootScope.myModelSemYear1.Semester=$scope.data[0].feesStructures[$scope.data[0].feesStructures.length-1].Semester;
|
||||
// //alert(JSON.stringify( $scope.myModelSemYear1.Semester ));
|
||||
// $rootScope.myModelSemYear1.SubjectCode=$scope.data[0].feesStructures[$scope.data[0].feesStructures.length-1].SubjectCode;
|
||||
// //alert(JSON.stringify( $scope.myModelSemYear1.SubjectCode ));
|
||||
// $rootScope.myModelSemYear1.SubjectName=$scope.data[0].feesStructures[$scope.data[0].feesStructures.length-1].SubjectName;
|
||||
// //alert(JSON.stringify( $scope.myModelSemYear1.SubjectName ));
|
||||
|
||||
// for(var i=0; i < $scope.data[0].feesStructures.length-1; i++){
|
||||
// $rootScope.updateMoreItems.push($scope.data[0].feesStructures[i]);
|
||||
// }
|
||||
// }
|
||||
// // alert(JSON.stringify( $scope.data[0].feesStructures[i] ));
|
||||
|
||||
////////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
$scope.emptyData=false;
|
||||
$scope.loader=true;
|
||||
$scope.data = response.data.details;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
}]);
|
||||
235
Apollo/assets/views/centerMaster.html
Normal file
235
Apollo/assets/views/centerMaster.html
Normal file
@ -0,0 +1,235 @@
|
||||
<style>
|
||||
b.fa {
|
||||
display: inline-block;
|
||||
border-radius: 60px;
|
||||
box-shadow: 0px 0px 2px #007AFF;
|
||||
padding: 0.5em 0.6em;
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
<!-- start: PAGE TITLE -->
|
||||
<section id="page-title">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<h1 class="mainTitle" translate="Add/View Center Details"></h1>
|
||||
<!--
|
||||
<span class="mainDescription">Over a dozen reusable components built to provide popovers, media objects, navigation, tooltips and much more. </span>
|
||||
-->
|
||||
</div>
|
||||
<div ncy-breadcrumb></div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- end: PAGE TITLE -->
|
||||
<!-- start: LIST GROUP -->
|
||||
<div class="container-fluid container-fullw bg-white">
|
||||
<div class="row" ng-controller="centerCtrl" data-ng-init="init()">
|
||||
<tabset class="tabbable">
|
||||
<tab heading="View Center" id="viewcenter">
|
||||
<div class="container-fluid container-fullw">
|
||||
<div class="row">
|
||||
<div ng-if="loader == ''" class="col-md-12" align="center">
|
||||
<!--<img src="assets/images/ajax_loader_blue.gif" style="width: 5%; height: 30%">-->
|
||||
<spinner name="html5spinner"> <div class="overlay"></div> <div class="spinner"> <div class="double-bounce1"></div> <div class="double-bounce2"></div> </div> <div class="please-wait">Please Wait...</div>
|
||||
</spinner>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" ng-if="emptyData == false && loader != ''" style="min-height: 281px;">
|
||||
<p style="color: red;" align="center"><strong><h3 class="text-center">oops! No
|
||||
records found... </h3></strong></p>
|
||||
</div>
|
||||
<div class="col-md-12" ng-if="emptyData == true">
|
||||
<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">
|
||||
<fieldset>
|
||||
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th ng-click="sort('CenterCode')">Center Code
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='CenterCode'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th ng-click="sort('CenterName')">Center Name
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='CenterName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th ng-click="sort('CenterAddress')">Center Address
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='CenterAddress'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th>Comments</th>
|
||||
<th>Status</th>
|
||||
<th> Action</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody dir-paginate="p in data|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10">
|
||||
<!-- <pre>p|json</pre> -->
|
||||
<tr>
|
||||
<td>{{p.CenterCode}}</td>
|
||||
<td>{{p.CenterName}}</td>
|
||||
<td>{{p.CenterAddress}}</td>
|
||||
<td>{{p.Comments}}</td>
|
||||
<td><span ng-if="p.IsActive == 1"> Active </span><span ng-if="p.IsActive == 0">De-Active</span></td>
|
||||
<td>
|
||||
|
||||
<a class="text-azure" id="editRowBtn{{p.CenterCode}}" ng-click="setEditId(p.CenterCode);"><b class="fa fa-hover fa-pencil " aria-hidden="true"></b>
|
||||
</a>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr ng-show="editId === p.CenterCode" ng-if="editId === p.CenterCode" >
|
||||
<td colspan="6" ng-include src="'assets/views/editCenterDetails.html'"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
<dir-pagination-controls max-size="10" direction-links="true" boundary-links="true">
|
||||
</dir-pagination-controls>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
view tab end
|
||||
-->
|
||||
</tab>
|
||||
<script>
|
||||
$('#addcenter').click(function () {
|
||||
$('#center').focus();
|
||||
});
|
||||
</script>
|
||||
|
||||
<tab heading="Add Center" id="addcenter">
|
||||
<div>
|
||||
<form name="Form" id="form" novalidate ng-submit="centerForm.submit(Form, myModel, 'zoom-in')" method="post">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<fieldset>
|
||||
<legend>
|
||||
Add New Center Details
|
||||
</legend>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3 form-group"
|
||||
ng-class="{'has-error':Form.centerCode.$dirty && Form.centerCode.$invalid, 'has-success':Form.centerCode.$valid}">
|
||||
<label>
|
||||
Center Code <span class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Center Code"
|
||||
tabindex="1" class="form-control" name="centerCode"
|
||||
ng-model="myModel.centerCode" ng-pattern="/^[a-zA-Z0-9\s]*$/" required/>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.centerCode.$dirty && Form.centerCode.$error.required">Center code is required</span>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.centerCode.$dirty && Form.centerCode.$error.pattern">Invalid Center Code </span>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-3 form-group"
|
||||
ng-class="{'has-error':Form.centerName.$dirty && Form.centerName.$invalid, 'has-success':Form.centerName.$valid}">
|
||||
<label>
|
||||
Center Name <span class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Center Name"
|
||||
tabindex="2" class="form-control" name="centerName"
|
||||
ng-model="myModel.centerName" ng-pattern="" required/>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.centerName.$dirty && Form.centerName.$error.required">Center name is required</span>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.centerName.$dirty && Form.centerName.$error.pattern">Invalid Center name </span>
|
||||
|
||||
<!--ng-if="Form.stopname.$valid">Thank You!</span>-->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-3 form-group" ng-class="{'has-error':Form.Address.$dirty && Form.Address.$invalid, 'has-success':Form.Address.$valid}">
|
||||
<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>
|
||||
<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}">
|
||||
<label>
|
||||
Comments
|
||||
</label>
|
||||
<textarea placeholder="Enter Comment" tabindex="15" 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>
|
||||
<div class="col-md-3">
|
||||
<label>
|
||||
Active/De-Active
|
||||
</label>
|
||||
<div ng-switch="myModel.switchsetting">
|
||||
<div ng-switch-when="true">
|
||||
<switch ng-model="myModel.switchsetting" ng-init="myModel.switchsetting = true" class="green"></switch>
|
||||
|
||||
</div>
|
||||
<div ng-switch-when="false">
|
||||
<switch ng-model="myModel.switchsetting" ng-init="myModel.switchsetting = false" class="green"></switch>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-switch-default>
|
||||
<switch ng-model="myModel.switchsetting" ng-init="myModel.switchsetting = true" class="green"></switch>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<button type="submit" tabindex="9" class="btn btn-wide btn-success" data-style="zoom-in">
|
||||
Submit
|
||||
</button>
|
||||
|
||||
<button type="reset" class="btn btn-warning btn-wide" tabindex="10"
|
||||
ng-click="centerForm.reset(Form)">
|
||||
Reset
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</tab>
|
||||
</tabset>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end: LIST GROUP -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
102
Apollo/assets/views/editCenterDetails.html
Normal file
102
Apollo/assets/views/editCenterDetails.html
Normal file
@ -0,0 +1,102 @@
|
||||
<form name="Form" id="form" novalidate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12">
|
||||
<fieldset>
|
||||
<legend>
|
||||
Update Center Details
|
||||
</legend>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3 form-group"
|
||||
ng-class="{'has-error':Form.batchcode.$dirty && Form.batchcode.$invalid, 'has-success':Form.batchcode.$valid}">
|
||||
<label>
|
||||
Center Code<span class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Center Code"
|
||||
tabindex="1" class="form-control" name="centercode"
|
||||
ng-model="p.CenterCode" ng-pattern="/^[a-zA-Z0-9\s]*$/" readonly required/>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.centercode.$dirty && Form.centercode.$error.required">Center Code is required</span>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.centercode.$dirty && Form.centercode.$error.pattern">Invalid center Code </span>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-3 form-group"
|
||||
ng-class="{'has-error':Form.centerName.$dirty && Form.centerName.$invalid, 'has-success':Form.centercode.$valid}">
|
||||
<label>
|
||||
Center Name <span class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Batch Name"
|
||||
tabindex="1" 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 Code is required</span>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.centerName.$dirty && Form.centerName.$error.pattern">Invalid center Code </span>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 form-group" ng-class="{'has-error':Form.Address.$dirty && Form.Address.$invalid, 'has-success':Form.Address.$valid}">
|
||||
<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>
|
||||
<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}">
|
||||
<label>
|
||||
Comments
|
||||
</label>
|
||||
<textarea placeholder="Enter Comment" tabindex="15" class="form-control textdsc" name="Comment" ng-model="p.Comments"></textarea>
|
||||
<span class="error text-small block" ng-if="Form.Comments.$dirty && Form.Comments.$invalid">Comments is required</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>
|
||||
Active/De-Active
|
||||
</label>
|
||||
<div ng-if="p.IsActive==true">
|
||||
|
||||
<switch ng-model="p.IsActive" ng-init="p.IsActive = true" class="green"></switch>
|
||||
|
||||
</div>
|
||||
<div ng-if="p.IsActive==false">
|
||||
<switch ng-model="p.IsActive" ng-init="p.IsActive = false" class="green"></switch>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<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')">
|
||||
Save
|
||||
</button>
|
||||
|
||||
<input type="button" class="btn btn-warning btn-wide" tabindex="10" value="Cancel"
|
||||
ng-click="cancel();">
|
||||
|
||||
</input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- class="editRowTd" -->
|
||||
|
||||
|
||||
|
||||
277
Apollo/assets/views/editSubjectDetails.html
Normal file
277
Apollo/assets/views/editSubjectDetails.html
Normal file
@ -0,0 +1,277 @@
|
||||
<form name="Form" id="form" novalidate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12">
|
||||
<fieldset>
|
||||
<legend>
|
||||
Update Subject Details
|
||||
</legend>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-4 form-group"
|
||||
ng-class="{'has-error':Form.University.$dirty && Form.University.$invalid, 'has-success':Form.University.$valid}">
|
||||
<label>
|
||||
Course Name <span class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Course Name"
|
||||
tabindex="2" class="form-control" name="University"
|
||||
ng-model="p.UniversityName" ng-pattern="" disabled required/>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.University.$dirty && Form.University.$error.required">University name is required</span>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.University.$dirty && Form.University.$error.pattern">Invalid University name </span>
|
||||
<!--<span class="success text-small"-->
|
||||
<!--ng-if="Form.stopname.$valid">Thank You!</span>-->
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 form-group"
|
||||
ng-class="{'has-error':Form.coursename.$dirty && Form.coursename.$invalid, 'has-success':Form.coursename.$valid}">
|
||||
<label>
|
||||
Course Name <span class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Course Name"
|
||||
tabindex="2" class="form-control" name="coursename"
|
||||
ng-model="p.CourseName" ng-pattern="" disabled required/>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.coursename.$dirty && Form.coursename.$error.required">Course name is required</span>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.coursename.$dirty && Form.coursename.$error.pattern">Invalid course name </span>
|
||||
<!--<span class="success text-small"-->
|
||||
<!--ng-if="Form.stopname.$valid">Thank You!</span>-->
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 form-group"
|
||||
ng-class="{'has-error':Form.coursecode.$dirty && Form.coursecode.$invalid, 'has-success':Form.coursecode.$valid}">
|
||||
<label>
|
||||
Batch <span class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Course ID"
|
||||
tabindex="1" class="form-control" name="coursecode"
|
||||
ng-model="p.BatchName" ng-pattern="" disabled required/>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.coursecode.$dirty && Form.coursecode.$error.required">Course id is required</span>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.coursecode.$dirty && Form.coursecode.$error.pattern">Invalid course id </span>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.Comments.$dirty && Form.Comments.$invalid}">
|
||||
<label>
|
||||
Comments
|
||||
</label>
|
||||
<textarea placeholder="Enter Comment" tabindex="15" class="form-control textdsc" name="Comment" ng-model="p.Comments"></textarea>
|
||||
<span class="error text-small block" ng-if="Form.Comments.$dirty && Form.Comments.$invalid">Comments is required</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <div class="col-md-3">
|
||||
<label>
|
||||
Active/De-Active
|
||||
</label>
|
||||
<div ng-if="p.IsActive==true">
|
||||
|
||||
<switch ng-model="p.IsActive" ng-init="p.IsActive = true" class="green"></switch>
|
||||
|
||||
</div>
|
||||
<div ng-if="p.IsActive==false">
|
||||
<switch ng-model="p.IsActive" ng-init="p.IsActive = false" class="green"></switch>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<fieldset>
|
||||
<legend>Subject Add</legend>
|
||||
|
||||
<div class="panel-body" >
|
||||
|
||||
|
||||
|
||||
<div class="panel-scroll height-180" perfect-scrollbar wheel-propagation="false" suppress-scroll-x="true">
|
||||
|
||||
|
||||
<div class="col-md-3 form-group"
|
||||
ng-class="{'has-error':Form.Semester.$dirty && Form.Semester.$invalid,'has-success':Form.Semester.$valid}">
|
||||
<label>
|
||||
Sem/Year
|
||||
<span
|
||||
class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Sem/year"
|
||||
tabindex="4" class="form-control" name="Semester"
|
||||
ng-model="myModelSemYear1.Semester" ng-pattern="" required>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.Semester.$dirty && Form.Semester.$error.required">Sem/Year is required</span>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.Semester.$dirty && Form.Semester.$error.pattern">Invalid Sem/Year name </span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-3 form-group"
|
||||
ng-class="{'has-error':Form.SubjectCode.$dirty && Form.SubjectCode.$invalid,'has-success':Form.SubjectCode.$valid}">
|
||||
<label>
|
||||
Subject Code
|
||||
<span
|
||||
class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Subject Code"
|
||||
autofocus tabindex="7" class="form-control" name="SubjectCode"
|
||||
ng-model="myModelSemYear1.SubjectCode" ng-pattern="" required />
|
||||
<span class="error text-small block"
|
||||
|
||||
ng-if="Form.SubjectCode.$dirty && Form.SubjectCode.$error.required">SubjectCode is required</span>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.SubjectCode.$dirty && Form.SubjectCode.$error.pattern">Enter a valid SubjectCode</span>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3 form-group"
|
||||
ng-class="{'has-error':Form.SubjectName.$dirty && Form.SubjectName.$invalid,'has-success':Form.SubjectName.$valid}">
|
||||
<label>
|
||||
Subject Name
|
||||
<span
|
||||
class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter SubjectName"
|
||||
tabindex="6" class="form-control" name="SubjectName"
|
||||
ng-model="myModelSemYear1.SubjectName" ng-pattern="" required />
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.SubjectName.$dirty && Form.SubjectName.$error.required">Sem/Year is required</span>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.SubjectName.$dirty && Form.SubjectName.$error.pattern">Invalid SubjectName name </span>
|
||||
</div>
|
||||
<!-- <div class="col-md-3">
|
||||
<label>
|
||||
Active/De-Active
|
||||
</label>
|
||||
<div ng-switch="myModel.switchsetting">
|
||||
<div ng-switch-when="true">
|
||||
<switch ng-model="myModel.switchsetting" ng-init="myModel.switchsetting = true" class="green"></switch>
|
||||
|
||||
</div>
|
||||
<div ng-switch-when="false">
|
||||
<switch ng-model="myModel.switchsetting" ng-init="myModel.switchsetting = false" class="green"></switch>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-switch-default>
|
||||
<switch ng-model="myModel.switchsetting" ng-init="myModel.switchsetting = true" class="green"></switch>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<input type="button" class="btn btn-sm btn-info" title="Click to add one more subject items" value="Add More" ng-click="updateMoreFeesItems(myModelSemYear1,Form)"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" ng-repeat="n in updateMoreItems" >
|
||||
|
||||
|
||||
|
||||
<div class="col-md-3 form-group" ng-class="{'has-error':n.Semester==undefined, 'has-success':n.Semester!=undefined}">
|
||||
<label>
|
||||
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Semester"
|
||||
class="form-control" name="Semester{{$index}}"
|
||||
ng-model="n.Semester" required/>
|
||||
<span class="error text-small block" ng-if="n.Semester==undefined">Enter a valid name</span>
|
||||
</div>
|
||||
<div class="col-md-3 form-group" ng-class="{'has-error':n.SubjectCode==undefined, 'has-success':n.SubjectCode!=undefined}">
|
||||
<label>
|
||||
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Subject Name"
|
||||
autofocus class="form-control" name="SubjectCode{{$index}}"
|
||||
ng-model="n.SubjectCode" required/>
|
||||
<span class="error text-small block" ng-if="n.SubjectCode==undefined">Enter a valid amount</span>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3 form-group" ng-class="{'has-error':n.SubjectName==undefined, 'has-success':n.SubjectName!=undefined}">
|
||||
<label>
|
||||
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter SubjectName"
|
||||
class="form-control" name="subjectName{{$index}}"
|
||||
ng-model="n.SubjectName" required/>
|
||||
<span class="error text-small block" ng-if="n.SubjectName==undefined">Enter a subject valid name</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<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,myModelSemYear1,'zoom-in')">
|
||||
Save
|
||||
</button>
|
||||
|
||||
<input type="button" class="btn btn-warning btn-wide" tabindex="10" value="Cancel"
|
||||
ng-click="cancel();">
|
||||
|
||||
</input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- class="editRowTd" -->
|
||||
|
||||
|
||||
|
||||
@ -77,6 +77,16 @@
|
||||
<span class="title" translate="sidebar.nav.master.DAYBOOKMASTER"> DAY BOOK DETAILS </span>
|
||||
</a>
|
||||
</li>
|
||||
<li ui-sref-active="active" >
|
||||
<a ui-sref="app.master.centerMaster" >
|
||||
<span class="title" translate="sidebar.nav.master.CENTERMASTER"> CENTER DETAILS </span>
|
||||
</a>
|
||||
</li>
|
||||
<li ui-sref-active="active" >
|
||||
<a ui-sref="app.master.subjectMaster">
|
||||
<span class="title" translate="sidebar.nav.master.SUBJECTMASTER"> SUBJECT DETAILS </span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
387
Apollo/assets/views/subjectMaster.html
Normal file
387
Apollo/assets/views/subjectMaster.html
Normal file
@ -0,0 +1,387 @@
|
||||
<style>
|
||||
b.fa {
|
||||
display: inline-block;
|
||||
border-radius: 60px;
|
||||
box-shadow: 0px 0px 2px #007AFF;
|
||||
padding: 0.5em 0.6em;
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
<!-- start: PAGE TITLE -->
|
||||
<section id="page-title">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<h1 class="mainTitle" translate="Add/View Subject Details"></h1>
|
||||
<!--
|
||||
<span class="mainDescription">Over a dozen reusable components built to provide popovers, media objects, navigation, tooltips and much more. </span>
|
||||
-->
|
||||
</div>
|
||||
<div ncy-breadcrumb></div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- end: PAGE TITLE -->
|
||||
<!-- start: LIST GROUP -->
|
||||
<div class="container-fluid container-fullw bg-white">
|
||||
<div class="row" ng-controller="subjectCtrl" data-ng-init="init()">
|
||||
<tabset class="tabbable">
|
||||
<tab heading="View Subject">
|
||||
<div class="container-fluid container-fullw">
|
||||
<div class="row">
|
||||
<div ng-if="loader == ''" class="col-md-12" align="center">
|
||||
<!--<img src="assets/images/ajax_loader_blue.gif" style="width: 5%; height: 30%">-->
|
||||
<spinner name="html5spinner"> <div class="overlay"></div> <div class="spinner"> <div class="double-bounce1"></div> <div class="double-bounce2"></div> </div> <div class="please-wait">Please Wait...</div>
|
||||
</spinner>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" ng-if="emptyData == false && loader != ''" style="min-height: 281px;">
|
||||
<p style="color: red;" align="center"><strong><h3 class="text-center">oops! No
|
||||
records found... </h3></strong></p>
|
||||
</div>
|
||||
<div class="col-md-12" ng-if="emptyData == true">
|
||||
<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">
|
||||
<fieldset>
|
||||
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th ng-click="sort('UniversityName')">UniversityName
|
||||
<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(Course)">Course Name
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='Course'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th ng-click="sort('Batch')">Batch
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='Batch'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th>Status</th>
|
||||
<th></th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody dir-paginate="p in data|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10">
|
||||
<tr>
|
||||
<!-- <pre>{{data| json}}</pre> -->
|
||||
<td>{{p.UniversityName}}</td>
|
||||
<td>{{p.CourseName}}</td>
|
||||
<td>{{p.BatchName}}</td>
|
||||
<!-- <td>{{p.SubjectName}}</td> -->
|
||||
<td><span ng-if="p.IsActive == 1"> Active </span><span ng-if="p.IsActive == 0">De-Active</span></td>
|
||||
<td>
|
||||
<a class="text-azure" id="editRowBtn{{p.ID}}" ng-click="setEditId(p.ID,p);"><b class="fa fa-hover fa-pencil " aria-hidden="true"></b>
|
||||
</a>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
<tr ng-show="editId === p.ID" ng-if="editId === p.ID">
|
||||
<td colspan="12" ng-include
|
||||
src="'assets/views/editSubjectDetails.html'"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
<dir-pagination-controls max-size="10" direction-links="true" boundary-links="true">
|
||||
</dir-pagination-controls>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!--
|
||||
view tab end
|
||||
-->
|
||||
</tab>
|
||||
<script>
|
||||
$('#addbatch').click(function () {
|
||||
$('#batch').focus();
|
||||
});
|
||||
</script>
|
||||
|
||||
<tab heading="Add Subject" id="addbatch">
|
||||
<form name="Form" id="form" novalidate ng-submit="subjectFORM.submit(Form, myModel,myModelSemYear, 'zoom-in',addMoreItems)" method="post">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- -->
|
||||
<fieldset>
|
||||
<legend>
|
||||
Subject
|
||||
</legend>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.university.$dirty && Form.university.$invalid, 'has-success':Form.university.$valid}">
|
||||
<label for="form-field-select-2">
|
||||
University <span class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<select class="form-control" tabindex="25" class="cs-select cs-skin-elastic" name="university" ng-model="myModel.university"
|
||||
ng-change="onSlecetUnivAdd()" required>
|
||||
<option value="" disabled selected>Select University</option>
|
||||
<option ng-repeat="item in universityData" value="{{item.UniversityID}}">{{item.UniversityName}}</option>
|
||||
</select>
|
||||
<span class="error text-small block" ng-if="Form.university.$dirty && Form.university.$error.required">University is Required</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.course.$dirty && Form.course.$invalid, 'has-success':Form.course.$valid}">
|
||||
|
||||
<label>
|
||||
Course <span class="symbol required"></span>
|
||||
</label>
|
||||
<div ng-if="courseLoading == true">
|
||||
<span style="padding: auto 0; color: #007AFF; font-weight: bold;">fetching...</span>
|
||||
</div>
|
||||
<div ng-if="courseLoading == false">
|
||||
<select class="form-control" tabindex="26" name="course" ng-model="myModel.course" class="cs-select cs-skin-elastic"
|
||||
required>
|
||||
<option value="" disabled selected>Select Course</option>
|
||||
<option ng-repeat="item in courseDataAdd" value="{{item.CourseID}}">{{item.CourseName}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<span class="error text-small block" ng-if="Form.course.$dirty && Form.course.$error.required">Course is required</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.batch.$dirty && Form.batch.$invalid, 'has-success':Form.batch.$valid}">
|
||||
|
||||
<label>
|
||||
Batch <span class="symbol required"></span>
|
||||
</label>
|
||||
<div ng-if="courseLoading == true">
|
||||
<span style="padding: auto 0; color: #007AFF; font-weight: bold;">fetching...</span>
|
||||
</div>
|
||||
<div ng-if="courseLoading == false">
|
||||
<select class="form-control" tabindex="26" name="batch" ng-model="myModel.batch" class="cs-select cs-skin-elastic"
|
||||
required>
|
||||
<option value="" disabled selected>Select Batch</option>
|
||||
<option ng-repeat="item in batchDataAdd" value="{{item.BatchCode}}">{{item.BatchName}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<span class="error text-small block" ng-if="Form.batch.$dirty && Form.batch.$error.required">Batch is required</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.Comments.$dirty && Form.Comments.$invalid}">
|
||||
<label>
|
||||
Comments
|
||||
</label>
|
||||
<textarea placeholder="Enter Comment" tabindex="15" 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>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<fieldset>
|
||||
<legend>Subject Add</legend>
|
||||
|
||||
<div class="panel-body" >
|
||||
|
||||
|
||||
|
||||
<div class="panel-scroll height-180" perfect-scrollbar wheel-propagation="false" suppress-scroll-x="true">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-3 form-group"
|
||||
ng-class="{'has-error':Form.Semester.$dirty && Form.Semester.$invalid,'has-success':Form.Semester.$valid}">
|
||||
<label>
|
||||
Sem/Year
|
||||
<span
|
||||
class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Sem/year"
|
||||
tabindex="4" class="form-control" name="Semester"
|
||||
ng-model="myModelSemYear.Semester" ng-pattern="/^[a-zA-Z0-9-./\s]*$/" required>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.Semester.$dirty && Form.Semester.$error.required">Semester is required</span>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.Semester.$dirty && Form.Semester.$error.pattern">Invalid Semester name </span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-3 form-group"
|
||||
ng-class="{'has-error':Form.SubjectCode.$dirty && Form.SubjectCode.$invalid,'has-success':Form.SubjectCode.$valid}">
|
||||
<label>
|
||||
Subject Code
|
||||
<span
|
||||
class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Subject Code"
|
||||
autofocus tabindex="7" class="form-control" name="SubjectCode"
|
||||
ng-model="myModelSemYear.SubjectCode" ng-pattern="/^[a-zA-Z0-9-./\s]*$/" required />
|
||||
<span class="error text-small block"
|
||||
|
||||
ng-if="Form.SubjectCode.$dirty && Form.SubjectCode.$error.required">SubjectCode is required</span>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.SubjectCode.$dirty && Form.SubjectCode.$error.pattern">Enter a valid SubjectCode</span>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3 form-group"
|
||||
ng-class="{'has-error':Form.SubjectName.$dirty && Form.SubjectName.$invalid,'has-success':Form.SubjectName.$valid}">
|
||||
<label>
|
||||
Subject Name
|
||||
<span
|
||||
class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter SubjectName"
|
||||
tabindex="6" class="form-control" name="SubjectName"
|
||||
ng-model="myModelSemYear.SubjectName" ng-pattern="/^[a-zA-Z0-9-./\s]*$/" required />
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.SubjectName.$dirty && Form.SubjectName.$error.required">Sem/Year is required</span>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.SubjectName.$dirty && Form.SubjectName.$error.pattern">Invalid SubjectName name </span>
|
||||
</div>
|
||||
<!-- <div class="col-md-3">
|
||||
<label>
|
||||
Active/De-Active
|
||||
</label>
|
||||
<div ng-switch="myModel.switchsetting">
|
||||
<div ng-switch-when="true">
|
||||
<switch ng-model="myModel.switchsetting" ng-init="myModel.switchsetting = true" class="green"></switch>
|
||||
|
||||
</div>
|
||||
<div ng-switch-when="false">
|
||||
<switch ng-model="myModel.switchsetting" ng-init="myModel.switchsetting = false" class="green"></switch>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-switch-default>
|
||||
<switch ng-model="myModel.switchsetting" ng-init="myModel.switchsetting = true" class="green"></switch>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<input type="button" class="btn btn-sm btn-info" title="Click to add one more subject items" value="Add More" ng-click="addMoreFeesItems(myModelSemYear,Form)"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" ng-repeat="n in addMoreItems">
|
||||
|
||||
|
||||
|
||||
<div class="col-md-3 form-group" ng-class="{'has-error':n.Semester==undefined, 'has-success':n.Semester!=undefined}">
|
||||
<label>
|
||||
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Sem/year"
|
||||
class="form-control" name="Semester{{$index}}"
|
||||
ng-model="n.Semester" required/>
|
||||
<span class="error text-small block" ng-if="n.Semester==undefined">Enter a valid name</span>
|
||||
</div>
|
||||
<div class="col-md-3 form-group" ng-class="{'has-error':n.SubjectCode==undefined, 'has-success':n.SubjectCode!=undefined}">
|
||||
<label>
|
||||
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Subject Name"
|
||||
autofocus class="form-control" name="SubjectCode{{$index}}"
|
||||
ng-model="n.SubjectCode" required/>
|
||||
<span class="error text-small block" ng-if="n.SubjectCode==undefined">Enter a valid amount</span>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3 form-group" ng-class="{'has-error':n.SubjectName==undefined, 'has-success':n.SubjectName!=undefined}">
|
||||
<label>
|
||||
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter SubjectName"
|
||||
class="form-control" name="subjectName{{$index}}"
|
||||
ng-model="n.SubjectName" required/>
|
||||
<span class="error text-small block" ng-if="n.SubjectName==undefined">Enter a subject valid name</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<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"
|
||||
data-style="zoom-in">
|
||||
Submit
|
||||
</button>
|
||||
|
||||
<button type="reset" class="btn btn-warning btn-wide" tabindex="14" ng-click="subjectFORM.reset(Form);">
|
||||
|
||||
Reset
|
||||
</button>
|
||||
<!-- <button type="reset" tabindex="31" class="btn btn-warning btn-wide" tabindex="9" ng-click="studentFORM.resetCourse(Form)">
|
||||
Reset
|
||||
</button> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<!--<pre> {{ myModel | json }}</pre>
|
||||
<pre> {{ myModelCourse | json }}</pre>-->
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</tab>
|
||||
</tabset>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end: LIST GROUP -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user