Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
a3348b9790
@ -100,6 +100,9 @@ defined('LEAD_DETAILS') OR define('LEAD_DETAILS','T_Lead_Details');
|
||||
defined('LEAD_TRACKING') OR define('LEAD_TRACKING','T_Lead_Tracking');
|
||||
defined('LEAD_TRACKING_FOLLOWUP') OR define('LEAD_TRACKING_FOLLOWUP','T_Lead_Tracking_Followup');
|
||||
defined('PICK_LIST_DETAILS') OR define('PICK_LIST_DETAILS','T_PickListDetails');
|
||||
defined('BATCH') OR define('BATCH','T_BatchMaster');
|
||||
defined('STUDENTCOURSE') OR define('STUDENTCOURSE','T_Student_CourseDetails');
|
||||
defined('STUDENTS') OR define('STUDENTS','T_StudentDetails');
|
||||
|
||||
//end of database table name
|
||||
|
||||
|
||||
@ -93,8 +93,14 @@ $route['updateActivityStatus'] = 'University_Controller/updateActivityStatus';
|
||||
|
||||
$route['changePassword'] = 'Login_Controller/changePassword';
|
||||
|
||||
|
||||
|
||||
// student
|
||||
$route['insertStudent'] = 'Student_Controller/addStudent';
|
||||
$route['getCourseBatchForUniv'] = 'Student_Controller/getCourseBatch';
|
||||
$route['chkStudentExistDetail'] = 'Student_Controller/chkStudentExistDetail';
|
||||
$route['getStudentList'] = 'Student_Controller/getStudentList';
|
||||
$route['updateStudentExistDetail'] = 'Student_Controller/updateStudentExistDetail';
|
||||
$route['chkUpdateStuExistDetail'] = 'Student_Controller/chkUpdateStuExistDetail';
|
||||
$route['getStudentCourseDetails'] = 'Student_Controller/getStudentCourseDetails';
|
||||
|
||||
|
||||
|
||||
|
||||
115
Apollo/api/application/controllers/Batch_Controller.php
Normal file
115
Apollo/api/application/controllers/Batch_Controller.php
Normal file
@ -0,0 +1,115 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by VisualCodeStudio.
|
||||
* User: Subaram
|
||||
* Date: 11/27/17
|
||||
* Time: 12:55 PM
|
||||
*/
|
||||
class Batch_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['addBatchDetails_get']['limit'] = 500; // 500 requests per hour per user/key
|
||||
$this->methods['addBatchDetails_post']['limit'] = 100; // 100 requests per hour per user/key
|
||||
$this->methods['addBatchDetails_delete']['limit'] = 50; // 50 requests per hour per user/key
|
||||
$this->methods['getBatchDetails_post']['limit'] = 500; // 50 requests per hour per user/key
|
||||
$this->methods['updateBatchDetails_post']['limit'] = 500;// 500 requests per hour per user/key
|
||||
// load the model
|
||||
$this->load->model('Batch_model', 'batch_model');
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* This method used to add batch details
|
||||
* created by srk
|
||||
* */
|
||||
|
||||
public function addBatchDetails_post()
|
||||
{
|
||||
|
||||
$details['BatchCode'] = $this->post('batchcode');
|
||||
$details['BatchName'] = $this->post('batcheName');
|
||||
$details['UniversityID'] = $this->post('universityName');
|
||||
$details['CreatedBy'] = $this->post('createdBy');
|
||||
$details['IsActive'] = $this->post('status');
|
||||
$batchDetails = $this->batch_model->addBatch($details);// Check if the users data store contains users (in case the database result returns NULL)
|
||||
if ($batchDetails)
|
||||
{
|
||||
$batchDetails['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($batchDetails, 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 getBatchDetails_post()
|
||||
{
|
||||
$requestedBy = $this->post('requestedBy');
|
||||
$getBatch = $this->batch_model->getBatch($requestedBy);
|
||||
if ($getBatch)
|
||||
{
|
||||
$getBatch['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($getBatch, 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 batch details
|
||||
* created by srk
|
||||
* */
|
||||
public function updateBatchDetails_post()
|
||||
{
|
||||
$details['BatchCode'] = $this->post('batchCode');
|
||||
$details['BatchName'] = $this->post('batchName');
|
||||
$details['IsActive'] = $this->post('status');
|
||||
$details['UpdatedBy'] = $this->post('updatedBy');
|
||||
$details['UpdatedOn'] = date("Y-m-d", time());
|
||||
$updateDetails = $this->batch_model->updateBatch($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
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
82
Apollo/api/application/controllers/Forget_Controller.php
Normal file
82
Apollo/api/application/controllers/Forget_Controller.php
Normal file
@ -0,0 +1,82 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
// This can be removed if you use __autoload() in config.php OR use Modular Extensions
|
||||
/** @noinspection PhpIncludeInspection */
|
||||
require_once APPPATH . '/libraries/REST_Controller.php';
|
||||
|
||||
/**
|
||||
* This is an example of a few basic user interaction methods you could use
|
||||
* all done with a hardcoded array
|
||||
*
|
||||
* @package CodeIgniter
|
||||
* @subpackage Rest Server
|
||||
* @category Controller
|
||||
* @author
|
||||
* @license MIT
|
||||
* @link
|
||||
*/
|
||||
class Forget_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['forgetlogin_get']['limit'] = 500; // 500 requests per hour per user/key
|
||||
$this->methods['forgetlogin_post']['limit'] = 500; // 500 requests per hour per user/key
|
||||
|
||||
$this->methods['forgetlogin_delete']['limit'] = 50; // 50 requests per hour per user/key
|
||||
|
||||
$this->load->model('Forgot_model', 'forgot_model');
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function forgetlogin_post()
|
||||
{
|
||||
//$userMobile = $this->post('userMobile');
|
||||
$details['MobileNumber'] = $this->post('userMobile');
|
||||
// $details['Password'] = $this->post('password');
|
||||
|
||||
|
||||
function generateRandomString($length = 8) {
|
||||
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
$charactersLength = strlen($characters);
|
||||
$randomString = '';
|
||||
for ($i = 0; $i < $length; $i++) {
|
||||
$randomString .= $characters[rand(0, $charactersLength - 1)];
|
||||
}
|
||||
return $randomString;
|
||||
}
|
||||
$password= generateRandomString();
|
||||
$details['Password'] = md5($password);
|
||||
|
||||
$loginDetails = $this->forgot_model->forget($details, $password);// Check if the users data store contains users (in case the database result returns NULL)
|
||||
if ($loginDetails)
|
||||
{
|
||||
$loginDetails['status'] = REST_Controller::HTTP_OK;
|
||||
//Set the response and exit
|
||||
$this->response($loginDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
{
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'No users were found',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
266
Apollo/api/application/controllers/Student_Controller.php
Normal file
266
Apollo/api/application/controllers/Student_Controller.php
Normal file
@ -0,0 +1,266 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
// This can be removed if you use __autoload() in config.php OR use Modular Extensions
|
||||
/** @noinspection PhpIncludeInspection */
|
||||
require_once APPPATH . '/libraries/REST_Controller.php';
|
||||
|
||||
/**
|
||||
* This is an example of a few basic user interaction methods you could use
|
||||
* all done with a hardcoded array
|
||||
*
|
||||
* @package CodeIgniter
|
||||
* @subpackage Rest Server
|
||||
* @category Controller
|
||||
* @author
|
||||
* @license MIT
|
||||
* @link
|
||||
*/
|
||||
class Student_Controller extends REST_Controller {
|
||||
|
||||
/*
|
||||
* get student details
|
||||
* params:
|
||||
* created by kdk
|
||||
* */
|
||||
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['addStudent_post']['limit'] = 100;
|
||||
// load the employee model
|
||||
$this->load->model('Student_model', 'student_model');
|
||||
|
||||
}
|
||||
|
||||
public function getStudentList_post() {
|
||||
$reqData = $this->post('data');
|
||||
$loginUserId = $reqData['localUserID'];
|
||||
$loginUserBranchId = $reqData['localBranchID'];
|
||||
$loginUserType = $reqData['localType'];
|
||||
|
||||
$studentListDetails = $this->student_model->get_student_list( $loginUserId, $loginUserBranchId, $loginUserType );// Check if the employee exist
|
||||
if ($studentListDetails)
|
||||
{
|
||||
$studentListDetails['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($studentListDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'No users were found',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getStudentCourseDetails_post() {
|
||||
$studentID = $this->post('studentID');
|
||||
$studentCourse = $this->student_model->get_student_course( $studentID );// Check if the employee exist
|
||||
if ($studentCourse)
|
||||
{
|
||||
$studentCourse['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($studentCourse, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'No users were found',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
}
|
||||
|
||||
public function chkUpdateStuExistDetail_post() {
|
||||
$exceptId = $this->post('exceptId');
|
||||
$datas = $this->post('datas');
|
||||
$checkFor = $this->post('check');
|
||||
|
||||
$checkRes = $this->student_model->check_update_exist( $exceptId, $datas, $checkFor );// Check if the employee exist
|
||||
if ($checkRes)
|
||||
{
|
||||
$checkRes['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($checkRes, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'No users were found',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
}
|
||||
|
||||
public function updateStudentExistDetail_post(){
|
||||
$data = $this->post('data');
|
||||
$updatedBy = $this->post('updatedBy');
|
||||
$updateStudent = $data['StudentID'];
|
||||
|
||||
$req['MobileNumber'] = $data['MobileNumber'];
|
||||
$req['Firstname'] = $data['Firstname'];
|
||||
$req['Lastname'] = $data['Lastname'];
|
||||
$req['Fathername'] = $data['Fathername'];
|
||||
$req['EmailID'] = $data['EmailID'];
|
||||
$req['MotherName'] = $data['MotherName'];
|
||||
|
||||
$req['AlternateNumber'] = $data['AlternateNumber'];
|
||||
$req['Gender'] = $data['Gender'];
|
||||
$req['DOB'] = $data['DOB'];
|
||||
$req['PresentAddress'] = $data['PresentAddress'];
|
||||
$req['PermanentAddress'] = $data['PermanentAddress'];
|
||||
$req['AadharNumber'] = $data['AadharNumber'];
|
||||
$req['OtherID'] = $data['OtherID'];
|
||||
$req['OtherIDDetails'] = $data['OtherIDDetails'];
|
||||
$req['Qualification'] = $data['Qualification'];
|
||||
|
||||
$req['PreQualification'] = $data['PreQualification'];
|
||||
$req['Caste'] = $data['Caste'];
|
||||
$req['Category'] = $data['Category'];
|
||||
$req['Religion'] = $data['Religion'];
|
||||
$req['Nationality'] = $data['Nationality'];
|
||||
$req['Occupation'] = $data['Occupation'];
|
||||
$req['Designation'] = $data['Designation'];
|
||||
$req['Companyname'] = $data['Companyname'];
|
||||
$req['ReferredBy'] = $data['ReferredBy'];
|
||||
$req['ReferersMobileNumber'] = $data['ReferersMobileNumber'];
|
||||
|
||||
$req['IsActive'] = $data['IsActive'];
|
||||
|
||||
$req['UpdatedBy'] = $updatedBy;
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$req['UpdatedOn'] = $date;
|
||||
$studentUpdate = $this->student_model->update_student( $req, $updateStudent );// Check if the employee exist
|
||||
if ($studentUpdate)
|
||||
{
|
||||
$studentUpdate['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($studentUpdate, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'No users were found',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
}
|
||||
|
||||
public function getCourseBatch_post() {
|
||||
$data = $this->post('data');
|
||||
$getCourseBatchListDetails = $this->student_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
|
||||
}
|
||||
}
|
||||
|
||||
public function chkStudentExistDetail_post() {
|
||||
$data = $this->post('data');
|
||||
$checkData = $this->post('check');
|
||||
$checkRes = $this->student_model->check_exist( $data, $checkData );// Check if the employee exist
|
||||
if ($checkRes)
|
||||
{
|
||||
$checkRes['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($checkRes, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'No users were found',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
|
||||
}
|
||||
// add student
|
||||
public function addStudent_post() {
|
||||
$data = $this->post('data');
|
||||
$coursedata = $this->post('coursedata');
|
||||
$createdBy = $this->post('createdBy');
|
||||
$createdBranch = $this->post('loginBranch');
|
||||
|
||||
$req['Firstname'] = $data['firstname'];
|
||||
$req['Lastname'] = $data['lastname'];
|
||||
$req['Fathername'] = $data['fathername'];
|
||||
$req['EmailID'] = $data['emailId'];
|
||||
$req['MotherName'] = $data['mothername'];
|
||||
$req['MobileNumber'] = $data['primaryPhone'];
|
||||
$req['AlternateNumber'] = $data['secondaryPhone'];
|
||||
$req['Gender'] = $data['gender'];
|
||||
$req['DOB'] = $data['dateofbirth'];
|
||||
$req['PresentAddress'] = $data['address2'];
|
||||
$req['PermanentAddress'] = $data['address1'];
|
||||
$req['AadharNumber'] = $data['aadharNumber'];
|
||||
$req['OtherID'] = $data['otherId'];
|
||||
$req['OtherIDDetails'] = $data['otherIdDetails'];
|
||||
$req['Caste'] = $data['caste'];
|
||||
$req['Category'] = $data['category'];
|
||||
$req['Religion'] = $data['religion'];
|
||||
$req['Nationality'] = $data['nationality'];
|
||||
$req['Occupation'] = $data['occupation'];
|
||||
$req['Designation'] = $data['designation'];
|
||||
$req['Companyname'] = $data['companyname'];
|
||||
$req['ReferredBy'] = $data['referredby'];
|
||||
$req['ReferersMobileNumber'] = $data['referredmobilenumber'];
|
||||
$req['PreQualification'] = $data['prequalification'];
|
||||
$req['IsActive'] = $data['switchsetting'];
|
||||
$req['CreatedBranch'] = $createdBranch;
|
||||
|
||||
$req['CreatedBy'] = $createdBy;
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$req['CreatedOn'] = $date;
|
||||
|
||||
$reqCourse['UniversityID'] = $coursedata['university'];
|
||||
$reqCourse['CourseID'] = $coursedata['course'];
|
||||
$reqCourse['BatchCode'] = $coursedata['batch'];
|
||||
$reqCourse['DOJ'] = $coursedata['dateofjoining'];
|
||||
$reqCourse['BranchID'] = $createdBranch;
|
||||
$reqCourse['IsActive'] = $data['switchsetting'];
|
||||
$reqCourse['CreatedBy'] = $createdBy;
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$reqCourse['CreatedOn'] = $date;
|
||||
|
||||
|
||||
$studentAdd = $this->student_model->add_student( $req , $reqCourse);// Check if the employee exist
|
||||
if ($studentAdd)
|
||||
{
|
||||
$studentAdd['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($studentAdd, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'No users were found',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
111
Apollo/api/application/models/Batch_model.php
Normal file
111
Apollo/api/application/models/Batch_model.php
Normal file
@ -0,0 +1,111 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by Visual Code studio
|
||||
* User: Subaram
|
||||
* Date: 11/26/17
|
||||
* Time: 10:05 PM
|
||||
*/
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Batch_model extends CI_Model {
|
||||
|
||||
|
||||
/*
|
||||
* Add batch details
|
||||
* created by subaram
|
||||
* */
|
||||
|
||||
public function addBatch($arrayDetails=null)
|
||||
{
|
||||
|
||||
$this->db->select('BatchCode');
|
||||
$this->db->where('BatchCode', $arrayDetails['BatchCode']);
|
||||
if($this->db->get(T_BATCHMASTER)->first_row()){
|
||||
$result['batchStatus'] = false;
|
||||
$result['message'] = "This batch Code is already exist!";
|
||||
} else {
|
||||
$this->db->insert(T_BATCHMASTER, $arrayDetails);
|
||||
if ($this->db->affected_rows() == '1') {
|
||||
|
||||
$result['batchStatus'] = true;
|
||||
$result['message'] = "Successfully Batch details added";
|
||||
} else {
|
||||
$result['batchStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Get batch details
|
||||
* parama id
|
||||
* created by srk
|
||||
* */
|
||||
|
||||
public function getBatch()
|
||||
{
|
||||
$this->db->select('CU.BatchCode,CU.BatchName,CU.IsActive,US.UniversityID,US.UniversityName');
|
||||
$this->db->from(T_BATCHMASTER.' as CU');
|
||||
$this->db->join(UNIVERSITY.' as US', 'US.UniversityID = CU.UniversityID');
|
||||
$this->db->order_by('CU.CreatedOn','DESC');
|
||||
$batchDetails = $this->db->get();
|
||||
|
||||
if($batchDetails->result()){
|
||||
|
||||
$result['batchStatus'] = true;
|
||||
$result['details'] = $batchDetails->result();
|
||||
}
|
||||
else {
|
||||
$result['batchStatus'] = false;
|
||||
$result['message'] = "No records found!";
|
||||
}
|
||||
|
||||
$result['universityDetails'] = $this->getUniversityDetails();
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* update batch details
|
||||
* created by Srk
|
||||
* */
|
||||
public function updateBatch($arrayDetails=null)
|
||||
{
|
||||
$this->db->where('BatchCode',$arrayDetails['BatchCode']);
|
||||
$upateStatus=$this->db->update(T_BATCHMASTER, $arrayDetails);
|
||||
if($upateStatus){
|
||||
|
||||
$result['batchStatus'] = true;
|
||||
$result['message'] = "Successfully Batch details updated";
|
||||
}
|
||||
|
||||
else {
|
||||
$result['batchStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
/*
|
||||
* Get university details
|
||||
* created by Srk
|
||||
* */
|
||||
public function getUniversityDetails()//doubt
|
||||
{
|
||||
$this->db->select('UniversityID,UniversityName');
|
||||
$this->db->order_by('UniversityID','ASC');
|
||||
$this->db->order_by('IsActive','1');
|
||||
$universityDetails = $this->db->get(UNIVERSITY);
|
||||
return $universityDetails->result();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -195,14 +195,14 @@ class Employee_model extends CI_Model
|
||||
$results['branch_details'] = $mBranchDetails->result();
|
||||
} else {
|
||||
// res for Admin
|
||||
$staffId = $this->selfGetEmpId($reqUserID);
|
||||
$subQuery = "SELECT t1.BranchCode, t1.BranchName
|
||||
FROM T_BranchMaster as t1
|
||||
LEFT JOIN T_Staff_BranchAccess as t2 ON t2.StaffID = '$staffId'
|
||||
WHERE t2.BranchCode = t1.BranchCode
|
||||
AND t1.IsActive = 1
|
||||
AND t2.IsActive = 1";
|
||||
$mBranchDetails = $this->db->query($subQuery);
|
||||
$staffId = $this->selfGetEmpId($reqUserID);
|
||||
$subQuery = "SELECT t1.BranchCode, t1.BranchName
|
||||
FROM T_BranchMaster as t1
|
||||
LEFT JOIN T_Staff_BranchAccess as t2 ON t2.StaffID = '$staffId'
|
||||
WHERE t2.BranchCode = t1.BranchCode
|
||||
AND t1.IsActive = 1
|
||||
AND t2.IsActive = 1";
|
||||
$mBranchDetails = $this->db->query($subQuery);
|
||||
$results['MeasterBranchDetailStatus'] = true;
|
||||
$results['branch_details'] = $mBranchDetails->result();
|
||||
}
|
||||
@ -360,23 +360,30 @@ class Employee_model extends CI_Model
|
||||
// get employee branch details
|
||||
public function get_employee_branch($staffId)
|
||||
{
|
||||
$this->db->select('t1.BranchCode, t1.BranchName');
|
||||
$this->db->from('' . BRANCH . ' as t1');
|
||||
$this->db->join('' . STAFF_BRANCH . ' as t2', 't2.BranchCode = t1.BranchCode', 'LEFT');
|
||||
$this->db->where('t2.StaffID', $staffId);
|
||||
$this->db->where('t2.IsActive', 1);
|
||||
$this->db->where('t1.IsActive', 1);
|
||||
$branchDetails = $this->db->get();
|
||||
$checkArr = $branchDetails->result();
|
||||
$this->db->select('t3.ListCode, t3.ListName');
|
||||
$this->db->from('' . PICK_LIST_DETAILS . ' as t3');
|
||||
$this->db->join('' . STAFF . ' as t4', 't4.ListCode = t3.ListCode', 'LEFT');
|
||||
$this->db->where('t4.StaffID', $staffId);
|
||||
$roleDetails = $this->db->get();
|
||||
$checkArr = $roleDetails->result();
|
||||
if (count($checkArr) > 0) {
|
||||
$this->db->select('t3.ListCode, t3.ListName');
|
||||
$this->db->from('' . PICK_LIST_DETAILS . ' as t3');
|
||||
$this->db->join('' . STAFF . ' as t4', 't4.ListCode = t3.ListCode', 'LEFT');
|
||||
$this->db->where('t4.StaffID', $staffId);
|
||||
$roleDetails = $this->db->get();
|
||||
$result['empBranchDetails'] = true;
|
||||
$result['role_details'] = $roleDetails->result();
|
||||
$result['branch_details'] = $branchDetails->result();
|
||||
$this->db->select('t1.BranchCode, t1.BranchName');
|
||||
$this->db->from('' . BRANCH . ' as t1');
|
||||
$this->db->join('' . STAFF_BRANCH . ' as t2', 't2.BranchCode = t1.BranchCode', 'LEFT');
|
||||
$this->db->where('t2.StaffID', $staffId);
|
||||
$this->db->where('t2.IsActive', 1);
|
||||
$this->db->where('t1.IsActive', 1);
|
||||
$branchDetails = $this->db->get();
|
||||
$branchArr = $branchDetails->result();
|
||||
if( count($branchArr) > 0 ) {
|
||||
$result['empBranchDetails'] = true;
|
||||
$result['role_details'] = $roleDetails->result();
|
||||
$result['branch_details'] = $branchDetails->result();
|
||||
} else {
|
||||
$result['empBranchDetails'] = true;
|
||||
$result['role_details'] = $roleDetails->result();
|
||||
$result['branch_details'] = $branchDetails->result();
|
||||
}
|
||||
} else {
|
||||
$result['empBranchDetails'] = false;
|
||||
}
|
||||
|
||||
138
Apollo/api/application/models/Forgot_model.php
Normal file
138
Apollo/api/application/models/Forgot_model.php
Normal file
@ -0,0 +1,138 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: karthi
|
||||
* Date: 11/9/17
|
||||
* Time: 5:28 PM
|
||||
*/
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Forgot_model extends CI_Model {
|
||||
|
||||
|
||||
/*
|
||||
* get user login details
|
||||
* params:email,password
|
||||
* created by karthi
|
||||
* */
|
||||
|
||||
/*
|
||||
* Default login venba@123 -> 7594aacdb21d8a9b29f71ea9163a5730
|
||||
*/
|
||||
//
|
||||
function forget($user=null, $password)
|
||||
{
|
||||
$this->db->select('ID,Emailid,MobileNumber,Password');
|
||||
$this->db->where('MobileNumber', $user['MobileNumber']);
|
||||
|
||||
|
||||
|
||||
$forgotDetails = $this->db->get('T_Login')->first_row();
|
||||
//print_r ($forgotDetails) ;
|
||||
//exit();
|
||||
|
||||
// $result = $query->result_array();
|
||||
if($forgotDetails){
|
||||
|
||||
$existUserID=$forgotDetails->ID;
|
||||
$this->db->where('ID', $existUserID);
|
||||
$upatePassword=$this->db->update('T_Login', $user);
|
||||
// print_r ($upatePassword) ;
|
||||
//exit();
|
||||
if($upatePassword) {
|
||||
$result['forgotstatus'] = true;
|
||||
$result['resPass'] = $password;
|
||||
$result['message'] = "Password updated successfully";
|
||||
}
|
||||
else{
|
||||
$result['forgotstatus'] = false;
|
||||
$result['message'] = "Something went wrong!";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
$result['forgotstatus'] = false;
|
||||
$result['message'] = "User is not exist!";
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
// public function change_Password( $userId, $newPassword, $oldPassword, $updateOn) {
|
||||
// $this->db->select('Password');
|
||||
// $this->db->from(LOGIN);
|
||||
// $this->db->where('ID', $userId);
|
||||
// $loginDetails = $this->db->get()->first_row();
|
||||
// if ($loginDetails->Password == $oldPassword) {
|
||||
// $sql = "UPDATE ".LOGIN." SET Password='$newPassword', UpdatedBy='$userId', UpdatedOn='$updateOn' WHERE ID='$userId'";
|
||||
// if($this->db->query($sql) == '1'){
|
||||
// $result['changePassStatus'] = true;
|
||||
// $result['message'] = "Your Password Successfully changed !!";
|
||||
// } else {
|
||||
// $result['changePassStatus'] = false;
|
||||
// $result['message'] = "Please try Again !!";
|
||||
// }
|
||||
// } else {
|
||||
// $result['changePassStatus'] = false;
|
||||
// $result['message'] = "Your Current Password miss match, Please try Again !!";
|
||||
// }
|
||||
// return $result;
|
||||
// }
|
||||
|
||||
//
|
||||
|
||||
//
|
||||
//public function login($mobile = null)
|
||||
//{
|
||||
// $this->db->select('MobileNumber');
|
||||
//$this->db->where('MobileNumber', $mobile);
|
||||
//$this->db->where('IsActive', 1);
|
||||
//$//loginDetails = $this->db->get(LOGIN)->first_row();
|
||||
//if($loginDetails){
|
||||
//if($mobile == $loginDetails->MobileNumber){
|
||||
|
||||
//if($password == $loginDetails->Password){
|
||||
//print_r($loginDetails);exit();
|
||||
//$this->db->select('t1.MobileNumber, t1.ListCode, t1.ID, t2.BranchCode');
|
||||
//$this->db->from(''.LOGIN.' as t1');
|
||||
//$this->db->where('t1.MobileNumber', $mobile);
|
||||
//$this->db->join(''.STAFF.' as t2', 't1.StaffID = t2.StaffID', 'LEFT');
|
||||
//$responseDetails = $this->db->get()->first_row();
|
||||
//$result['loginStatus'] = true;
|
||||
|
||||
//$result['details'] = $responseDetails;
|
||||
|
||||
//}
|
||||
//else {
|
||||
//$result['loginStatus'] = false;
|
||||
/* $result['message'] = "Please Enter Valid Password !!";
|
||||
}
|
||||
}
|
||||
else{
|
||||
$result['loginStatus'] = false;
|
||||
$result['message'] = "Please Enter Register Mobile Number !!";
|
||||
}
|
||||
}
|
||||
else {
|
||||
$result['loginStatus'] = false;
|
||||
$result['message'] = "Something Went Wrong, Please try Again !!";
|
||||
}
|
||||
|
||||
/*$this->db->join('areas a', 'a.id = e.id_area', 'inner');
|
||||
$this->db->join('horario h', 'h.id = e.id_horario', 'inner');
|
||||
$this->db->join('dia d', 'd.id = e.id_data', 'inner');
|
||||
$this->db->join('tipo_evento t', 't.id = e.id_tipo', 'inner');
|
||||
$this->db->join('campus c', 'c.id = e.id_unidade', 'inner');
|
||||
if ( $id != null ){
|
||||
$this->db->where('e.id', $id);
|
||||
return $this->db->get('eventos')->first_row();
|
||||
} else {
|
||||
return $this->db->get('eventos')->result();
|
||||
}*/
|
||||
|
||||
//return $result;
|
||||
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
317
Apollo/api/application/models/Student_model.php
Normal file
317
Apollo/api/application/models/Student_model.php
Normal file
@ -0,0 +1,317 @@
|
||||
<?php
|
||||
/**
|
||||
* Date: 11/9/17
|
||||
* Time: 5:28 PM
|
||||
*/
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Student_model extends CI_Model
|
||||
{
|
||||
|
||||
/*
|
||||
* student details
|
||||
*
|
||||
* created by kdk
|
||||
* */
|
||||
|
||||
// get student list based on login user
|
||||
public function get_student_list($loginUserId, $loginUserBranchId, $loginUserType)
|
||||
{
|
||||
// echo $loginUserId, $loginUserBranchId, $loginUserType; exit();
|
||||
if ($loginUserType == SUPER_ADMIN) {
|
||||
// list for super admin
|
||||
// if ($loginUserBranchId == 'All') {
|
||||
// // for getting all branch details
|
||||
// $staffId = $this->selfGetEmpId($loginUserId);
|
||||
// $this->db->select('*');
|
||||
// $this->db->order_by('CreatedOn', 'DESC');
|
||||
// $this->db->from(STAFF);
|
||||
// // not for SuperAdmin and Student Role code
|
||||
// $this->db->where_not_in('StaffID', $staffId);
|
||||
// // $this->db->where('BranchCode', $loginUserBranchId);
|
||||
// $empDetails = $this->db->get();
|
||||
// $checkArr = $empDetails->result();
|
||||
// if (count($checkArr) > 0) {
|
||||
// $results['employeeList'] = true;
|
||||
// $results['employees_details'] = $empDetails->result();
|
||||
// } else {
|
||||
// $results['employeeList'] = false;
|
||||
// $results['message'] = 'No record found';
|
||||
// }
|
||||
// } else {
|
||||
// $staffId = $this->selfGetEmpId($loginUserId);
|
||||
// $this->db->select('*');
|
||||
// $this->db->order_by('CreatedOn', 'DESC');
|
||||
// $this->db->from(STAFF);
|
||||
// // not for SuperAdmin and Student Role code
|
||||
// $this->db->where_not_in('StaffID', $staffId);
|
||||
// $this->db->where('BranchCode', $loginUserBranchId);
|
||||
// $empDetails = $this->db->get();
|
||||
// $checkArr = $empDetails->result();
|
||||
// if (count($checkArr) > 0) {
|
||||
// $results['employeeList'] = true;
|
||||
// $results['employees_details'] = $empDetails->result();
|
||||
// } else {
|
||||
// $results['employeeList'] = false;
|
||||
// $results['message'] = 'No record found';
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
} else if ($loginUserType == ADMIN) {
|
||||
// list for admin
|
||||
$this->db->select('*');
|
||||
$this->db->from(STUDENTS);
|
||||
$this->db->order_by('CreatedOn', 'DESC');
|
||||
$this->db->where('CreatedBranch', $loginUserBranchId);
|
||||
$stuDetails = $this->db->get();
|
||||
$checkArr = $stuDetails->result();
|
||||
if (count($checkArr) > 0) {
|
||||
$results['studentList'] = true;
|
||||
$results['student_details'] = $stuDetails->result();
|
||||
} else {
|
||||
$results['studentList'] = false;
|
||||
}
|
||||
} else if ($loginUserType == STAFF) {
|
||||
// list for staff
|
||||
$this->db->select('*');
|
||||
$this->db->from(STUDENTS);
|
||||
$this->db->order_by('CreatedOn', 'DESC');
|
||||
$this->db->where('CreatedBranch', $loginUserBranchId);
|
||||
$stuDetails = $this->db->get();
|
||||
$checkArr = $stuDetails->result();
|
||||
if (count($checkArr) > 0) {
|
||||
$results['studentList'] = true;
|
||||
$results['student_details'] = $stuDetails->result();
|
||||
} else {
|
||||
$results['studentList'] = false;
|
||||
}
|
||||
} else {
|
||||
$results['studentList'] = false;
|
||||
}
|
||||
return $results;
|
||||
}
|
||||
|
||||
// get student course details
|
||||
public function get_student_course($studentId) {
|
||||
$this->db->select('*');
|
||||
$this->db->from(STUDENTCOURSE);
|
||||
$this->db->where('StudentID', $studentId);
|
||||
$courseDetails = $this->db->get();
|
||||
$checkArr = $courseDetails->result();
|
||||
if (count($checkArr) > 0) {
|
||||
$result['stuCourseDetails'] = true;
|
||||
$result['course_details'] = $courseDetails->result();
|
||||
} else {
|
||||
$result['stuCourseDetails'] = false;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//get course 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;
|
||||
}
|
||||
|
||||
// check exist
|
||||
public function check_exist($data, $checkData)
|
||||
{
|
||||
if ($checkData == 'studentId') {
|
||||
// check for student id
|
||||
// $this->db->select('*');
|
||||
// $this->db->from(STAFF);
|
||||
// $this->db->where('StaffID', $data);
|
||||
// if ($this->db->get()->first_row()) {
|
||||
// $result['existEmpId'] = true;
|
||||
// $result['message'] = "This Employee ID is already exist!";
|
||||
// } else {
|
||||
// $result['existEmpId'] = false;
|
||||
// }
|
||||
|
||||
} else if ($checkData == 'mobileNumber') {
|
||||
// check for mobile number
|
||||
$this->db->select('*');
|
||||
$this->db->from(STUDENTS);
|
||||
$this->db->where('MobileNumber', $data);
|
||||
if ($this->db->get()->first_row()) {
|
||||
$result['existMobile'] = true;
|
||||
$result['message'] = "This Mobile Number is already exist!";
|
||||
} else {
|
||||
$this->db->select('*');
|
||||
$this->db->from(LOGIN);
|
||||
$this->db->where('MobileNumber', $data);
|
||||
if ($this->db->get()->first_row()) {
|
||||
$result['existMobile'] = true;
|
||||
$result['message'] = "This Mobile Number is already exist!";
|
||||
} else {
|
||||
$result['existMobile'] = false;
|
||||
}
|
||||
}
|
||||
|
||||
} else if ($checkData == 'emailId') {
|
||||
// check for email id
|
||||
$this->db->select('*');
|
||||
$this->db->from(STUDENTS);
|
||||
$this->db->where('EmailID', $data);
|
||||
if ($this->db->get()->first_row()) {
|
||||
$result['existEmailId'] = true;
|
||||
$result['message'] = "This EmailId is already exist!";
|
||||
} else {
|
||||
$result['existEmailId'] = false;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
// add student
|
||||
public function add_student($Arr, $courseArr)
|
||||
{
|
||||
// print_r($Arr);
|
||||
// print_r($courseArr);exit();
|
||||
$this->db->insert(STUDENTS, $Arr);
|
||||
$insert_id = $this->db->insert_id('StudentID');
|
||||
$courseArr['StudentID'] = $insert_id;
|
||||
if ($this->db->affected_rows() == '1') {
|
||||
$this->db->insert(STUDENTCOURSE, $courseArr);
|
||||
if ($this->db->affected_rows() == '1') {
|
||||
$loginArr['StaffID'] = $courseArr['StudentID'];
|
||||
$loginArr['ListCode'] = STUDENT;
|
||||
$loginArr['MobileNumber'] = $Arr['MobileNumber'];
|
||||
$loginArr['EmailId'] = $Arr['EmailID'];
|
||||
$loginArr['IsActive'] = $Arr['IsActive'];
|
||||
$loginArr['CreatedBy'] = $Arr['CreatedBy'];
|
||||
$loginArr['CreatedOn'] = $Arr['CreatedOn'];
|
||||
$loginArr['Password'] = ENCR_PASSWORD;
|
||||
$this->db->insert(LOGIN, $loginArr);
|
||||
if ($this->db->affected_rows() == '1') {
|
||||
$result['addStudentStatus'] = true;
|
||||
$result['message'] = "Successfully student details added";
|
||||
} else {
|
||||
$result['addStudentStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
} else {
|
||||
$result['addStudentStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
} else {
|
||||
$result['addStudentStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
// check existing data while update
|
||||
public function check_update_exist($exceptId, $datas, $checkFor)
|
||||
{
|
||||
if ($checkFor == 'mobileNumber') {
|
||||
// check update for mobile number
|
||||
$this->db->select('*');
|
||||
$this->db->from(STUDENTS);
|
||||
$this->db->where('MobileNumber', $datas);
|
||||
$this->db->where_not_in('StudentID', $exceptId);
|
||||
if ($this->db->get()->first_row()) {
|
||||
$result['existMobile'] = true;
|
||||
$this->db->select('MobileNumber');
|
||||
$this->db->from(STUDENTS);
|
||||
$this->db->where('StudentID', $exceptId);
|
||||
$result['resetValue'] = $this->db->get()->first_row();
|
||||
$result['message'] = "This Mobile Number is already exist!";
|
||||
} else {
|
||||
// check login
|
||||
$this->db->select('*');
|
||||
$this->db->from(LOGIN);
|
||||
$this->db->where('MobileNumber', $datas);
|
||||
$this->db->where_not_in('StaffID', $exceptId);
|
||||
if($this->db->get()->first_row()) {
|
||||
$result['existMobile'] = true;
|
||||
$this->db->select('MobileNumber');
|
||||
$this->db->from(STUDENTS);
|
||||
$this->db->where('StudentID', $exceptId);
|
||||
$result['resetValue'] = $this->db->get()->first_row();
|
||||
$result['message'] = "This Mobile Number is already exist!";
|
||||
} else {
|
||||
$result['existMobile'] = false;
|
||||
}
|
||||
}
|
||||
|
||||
} else if ($checkFor == 'emailId') {
|
||||
// check update for email
|
||||
$this->db->select('*');
|
||||
$this->db->from(STUDENTS);
|
||||
$this->db->where('EmailID', $datas);
|
||||
$this->db->where_not_in('StudentID', $exceptId);
|
||||
if ($this->db->get()->first_row()) {
|
||||
$result['existEmailId'] = true;
|
||||
$this->db->select('EmailID');
|
||||
$this->db->from(STUDENTS);
|
||||
$this->db->where('StudentID', $exceptId);
|
||||
$result['resetValue'] = $this->db->get()->first_row();
|
||||
$result['message'] = "This EmailId is already exist!";
|
||||
} else {
|
||||
$result['existEmailId'] = false;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
// update student personal details
|
||||
public function update_student($empArr, $updateFor)
|
||||
{
|
||||
// print_r($empArr);
|
||||
// print_r($updateFor);
|
||||
// exit();
|
||||
$this->db->where('StudentID', $updateFor);
|
||||
$this->db->update(STUDENTS, $empArr);
|
||||
if ($this->db->affected_rows() == '1') {
|
||||
$mobile = $empArr['MobileNumber'];
|
||||
$email = $empArr['EmailID'];
|
||||
$active = $empArr['IsActive'];
|
||||
$updatedBy = $empArr['UpdatedBy'];
|
||||
$updatedOn = $empArr['UpdatedOn'];
|
||||
$sql = "UPDATE ".LOGIN." SET MobileNumber='$mobile', EmailId='$email', IsActive='$active', UpdatedBy='$updatedBy', UpdatedOn='$updatedOn' WHERE StaffID='$updateFor'";
|
||||
if($this->db->query($sql) == '1'){
|
||||
$result['updateStuStatus'] = true;
|
||||
$result['message'] = "Successfully student details Updated";
|
||||
} else {
|
||||
$result['updateStuStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
} else {
|
||||
$result['updateStuStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -69,7 +69,8 @@
|
||||
"student": {
|
||||
"MAIN": "STUDENTS DETAILS",
|
||||
"LISTING": "STUDENTS LISTING",
|
||||
"ENROLLMENT": "STUDENT ENROLLMENT"
|
||||
"ENROLLMENT": "STUDENT ENROLLMENT",
|
||||
"STUDENTDETAILS": "STUDENT DETAILS"
|
||||
},
|
||||
"status": {
|
||||
"MAIN": "STATUS",
|
||||
|
||||
@ -91,6 +91,10 @@ app.constant('JS_REQUIRES', {
|
||||
Activity
|
||||
* */
|
||||
'activityCtrl': 'assets/js/controllers/activityCtrl.js',
|
||||
/* *
|
||||
Student
|
||||
* */
|
||||
'studentCtrl': 'assets/js/controllers/studentCtrl.js',
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -142,10 +142,10 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com
|
||||
// resolve: loadSequence('iconsCtrl')
|
||||
}).state('app.student', {
|
||||
url: '/student',
|
||||
template: '<div ui-view class="fade-in-up"></div>',
|
||||
title: 'Tables',
|
||||
template: '<div ui-view class="fade-in-up"> <div style="margin: auto; width: 50%;padding: 10px;"> STUDENT DETAILS </div> </div>',
|
||||
title: 'Student',
|
||||
ncyBreadcrumb: {
|
||||
label: 'Tables'
|
||||
label: 'Student'
|
||||
}
|
||||
}).state('app.student.listing', {
|
||||
url: '/basic',
|
||||
@ -154,12 +154,13 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com
|
||||
ncyBreadcrumb: {
|
||||
label: 'Basic'
|
||||
}
|
||||
}).state('app.student.enrollment', {
|
||||
url: '/responsive',
|
||||
templateUrl: "assets/views/table_responsive.html",
|
||||
title: 'Responsive Tables',
|
||||
}).state('app.student.studentDetails', {
|
||||
url: '/studentDetails',
|
||||
templateUrl: "assets/views/student/student_details.html",
|
||||
resolve: loadSequence('ui.select','spin', 'ui.mask', 'ladda', 'angular-ladda', 'studentCtrl', 'ngTable'),
|
||||
title: 'Student Details',
|
||||
ncyBreadcrumb: {
|
||||
label: 'Responsive'
|
||||
label: 'Student Details'
|
||||
}
|
||||
}).state('app.status', {
|
||||
url: '/status',
|
||||
|
||||
208
Apollo/assets/js/controllers/batchCtrl.js
Normal file
208
Apollo/assets/js/controllers/batchCtrl.js
Normal file
@ -0,0 +1,208 @@
|
||||
'use strict';
|
||||
/**
|
||||
* controllers for ng-table
|
||||
* Simple table with sorting and filtering on AngularJS
|
||||
*/
|
||||
|
||||
app.controller('batchCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state", function ($scope,$rootScope,toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state) {
|
||||
$scope.myModel = {
|
||||
"batchCode": "",
|
||||
"batchName": "",
|
||||
"universityName":"",
|
||||
"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 batch details
|
||||
* @params myModel
|
||||
* created by subaram
|
||||
* */
|
||||
$scope.batchForm = {
|
||||
|
||||
submit: function (form, myModel,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].$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 addBatch = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'addBatchDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
batchcode: myModel.batchCode,
|
||||
batcheName: myModel.batchName,
|
||||
universityName: myModel.universityName,
|
||||
status: myModel.switchsetting,
|
||||
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID
|
||||
}
|
||||
};
|
||||
$http(addBatch).then(function (response) {
|
||||
if (response.data.status==200 && response.data.batchStatus) {
|
||||
$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);
|
||||
}
|
||||
};
|
||||
/*
|
||||
* update the batch details
|
||||
* created by subaram
|
||||
* */
|
||||
$scope.updateBatch = 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 + 'updateBatchDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
batchCode: myModel.BatchCode,
|
||||
batchName: myModel.BatchName,
|
||||
status: myModel.IsActive,
|
||||
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID
|
||||
}
|
||||
};
|
||||
$http(update).then(function (response) {
|
||||
if (response.data.status==200 && response.data.batchStatus) {
|
||||
$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 Batch details when page loading called from view file
|
||||
*
|
||||
* created by Srk
|
||||
* */
|
||||
$scope.loader='';
|
||||
|
||||
$scope.emptyData='';
|
||||
|
||||
$rootScope.init = function () {
|
||||
|
||||
var getBranch = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getBatchDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
|
||||
}
|
||||
};
|
||||
|
||||
$http(getBranch).then(function (response) {
|
||||
if (response.data.status==200 && response.data.batchStatus) {
|
||||
|
||||
$scope.emptyData=true;
|
||||
$scope.loader=true;
|
||||
|
||||
$scope.data = response.data.details;
|
||||
|
||||
$scope.university=response.data.universityDetails;
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
$scope.emptyData=false;
|
||||
$scope.loader=false;
|
||||
$scope.university=response.data.universityDetails;
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
}]);
|
||||
91
Apollo/assets/js/controllers/forgetCtrl.js
Normal file
91
Apollo/assets/js/controllers/forgetCtrl.js
Normal file
@ -0,0 +1,91 @@
|
||||
'use strict';
|
||||
/**
|
||||
* controllers for ng-table
|
||||
* Simple table with sorting and filtering on AngularJS
|
||||
*/
|
||||
|
||||
app.controller('forgotCtrl', ["$scope", "$http", "API_POINTS", "$state", '$rootScope', '$cookies', 'md5','ipCookie', 'SweetAlert', function ($scope, $http, apiPoint, $state, $rootScope, $cookies, md5, ipCookie, SweetAlert) {
|
||||
|
||||
/**
|
||||
* login details capture
|
||||
* by : srk
|
||||
*/
|
||||
//
|
||||
|
||||
$scope.myModel = {
|
||||
'userMobile': '',
|
||||
|
||||
};
|
||||
|
||||
|
||||
$scope.show = false;
|
||||
|
||||
$scope.responseData = '';
|
||||
|
||||
$scope.forgotForm = {
|
||||
submit: function (form) {
|
||||
//alert("hi");
|
||||
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();
|
||||
} else {
|
||||
$scope.spin = '';
|
||||
var req = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'forgetlogin/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
userMobile: $scope.myModel.userMobile,
|
||||
// password: md5.createHash($scope.myModel.password || '')
|
||||
}
|
||||
};
|
||||
$http(req).then(function (response) {
|
||||
if (response.data.forgotstatus == true) {
|
||||
// $scope.responseData = response.data.forgotstatus;
|
||||
//alert(response.data.message);
|
||||
swal("Success!",response.data.resPass, "success");
|
||||
$state.go('login.signin');
|
||||
} else {
|
||||
//alert(response.data.message);
|
||||
swal("Failed!", response.data.message, "error");
|
||||
|
||||
// $scope.show = true;
|
||||
// $(".alert").delay(200).addClass("in").fadeOut(3500);
|
||||
}
|
||||
});
|
||||
|
||||
//
|
||||
|
||||
//
|
||||
|
||||
}
|
||||
},
|
||||
reset: function (form) {
|
||||
$scope.myModel = angular.copy($scope.master);
|
||||
form.$setPristine(true);
|
||||
}
|
||||
}
|
||||
}]);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// forgetLogin -> Number(9876543210) -> (is he/she exist) yes---> genetate(md5(venba@123)) --> response(true check your mail, venba@123)
|
||||
// no --> response(not exist)
|
||||
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
/**
|
||||
* controllers for ng-table
|
||||
* controllers for ng-table//commentgit
|
||||
* Simple table with sorting and filtering on AngularJS
|
||||
*/
|
||||
|
||||
|
||||
476
Apollo/assets/js/controllers/studentCtrl.js
Normal file
476
Apollo/assets/js/controllers/studentCtrl.js
Normal file
@ -0,0 +1,476 @@
|
||||
'use strict';
|
||||
/**
|
||||
* controllers for ng-table
|
||||
* Simple table with sorting and filtering on AngularJS
|
||||
*/
|
||||
|
||||
app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "$http", "API_POINTS", "$state", '$rootScope', '$cookies', 'md5', 'ipCookie', '$timeout', '$window', function ($scope, toaster, $filter, ngTableParams, $http, apiPoint, $state, $rootScope, $cookies, md5, ipCookie, $timeout, $window) {
|
||||
/**
|
||||
* student details capture
|
||||
* by : kdk
|
||||
*/
|
||||
$scope.myModel = {
|
||||
'primaryPhone': '',
|
||||
'firstname': '',
|
||||
'lastname': '',
|
||||
'fathername': '',
|
||||
'mothername': '',
|
||||
'emailId': '',
|
||||
'secondaryPhone': '',
|
||||
'dateofbirth': '',
|
||||
'gender': '',
|
||||
'aadharNumber': '',
|
||||
'otherId': '',
|
||||
'otherIdDetails': '',
|
||||
'address1': '',
|
||||
'address2': '',
|
||||
'caste': '',
|
||||
'category': '',
|
||||
'religion': '',
|
||||
'nationality': '',
|
||||
'prequalification': '',
|
||||
'occupation': '',
|
||||
'designation': '',
|
||||
'companyname': '',
|
||||
'referredby': '',
|
||||
'referredmobilenumber': '',
|
||||
'switchsetting': true,
|
||||
};
|
||||
|
||||
$scope.myModelCourse = {
|
||||
'university': '',
|
||||
'course': '',
|
||||
'batch': '',
|
||||
'dateofjoining': '',
|
||||
'enrollmentid': ''
|
||||
};
|
||||
|
||||
|
||||
|
||||
// 2017-11-23T00:00:00+0530
|
||||
// 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
|
||||
}
|
||||
|
||||
// get local cliend details
|
||||
var localDetail = JSON.parse(localStorage.getItem('localObj'));
|
||||
var localDetails = ipCookie('cookiechk');
|
||||
|
||||
// load when html page load
|
||||
$scope.init = function () {
|
||||
if (localDetail != null) {
|
||||
$scope.currentDate = new Date();
|
||||
$scope.getStudentList();
|
||||
$scope.getUniversityList();
|
||||
|
||||
// $scope.currentPage = 1;
|
||||
} else {
|
||||
}
|
||||
}
|
||||
|
||||
$scope.getStudentList = function () {
|
||||
$scope.loader = true;
|
||||
var empListreq = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getStudentList/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
data: localDetails
|
||||
}
|
||||
};
|
||||
$http(empListreq).then(function (response) {
|
||||
if (response.data.studentList) {
|
||||
$scope.loader = false;
|
||||
$scope.studentData = true;
|
||||
$scope.data = response.data.student_details;
|
||||
} else {
|
||||
$scope.loader = false;
|
||||
$scope.studentData = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$scope.editId = -1;
|
||||
$scope.editCourseId = -1;
|
||||
$scope.setEditId = function (id) {
|
||||
$scope.editId = id;
|
||||
$scope.editCourseId = -1;
|
||||
}
|
||||
|
||||
$scope.setEditCourseId = function (id) {
|
||||
$scope.getStudentCourseDetails(id);
|
||||
$scope.editCourseId = id;
|
||||
$scope.editId = -1;
|
||||
$scope.courseEditLoading = true;
|
||||
}
|
||||
|
||||
$scope.cancel = function () {
|
||||
$scope.getStudentList();
|
||||
$scope.editId = -1;
|
||||
$scope.editCourseId = -1;
|
||||
}
|
||||
|
||||
$scope.getStudentCourseDetails = function (studentId) {
|
||||
var req = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getStudentCourseDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
studentID: studentId
|
||||
}
|
||||
};
|
||||
$http(req).then(function (response) {
|
||||
if (response.data.stuCourseDetails) {
|
||||
$scope.courseEditLoading = false;
|
||||
$scope.studentCourse = response.data.course_details;
|
||||
// $scope.branchArr = [];
|
||||
// angular.forEach($scope.empBranchs, function (item, index) {
|
||||
// // alert(item.BranchName);
|
||||
// $scope.branchArr.push(item.BranchName);
|
||||
// });
|
||||
// $scope.empBranchDetails = {
|
||||
// arr: $scope.branchArr,
|
||||
// }
|
||||
// $scope.empRoleDetail = response.data.role_details[0];
|
||||
} else {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$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.onSlecetUnivEdit = function(id) {
|
||||
// $scope.stucour.CourseID = '';
|
||||
// $scope.stucour.UniversityID = '';
|
||||
$scope.myModelCourse.university = id;
|
||||
$scope.onSlecetUniv();
|
||||
}
|
||||
|
||||
$scope.courseData = '';
|
||||
$scope.batchData = '';
|
||||
$scope.courseLoading = false;
|
||||
$scope.onSlecetUniv = function () {
|
||||
$scope.myModelCourse.course = '';
|
||||
$scope.myModelCourse.batch = '';
|
||||
$scope.courseLoading = true;
|
||||
var univListreq = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getCourseBatchForUniv/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
data: $scope.myModelCourse.university
|
||||
}
|
||||
};
|
||||
$http(univListreq).then(function (response) {
|
||||
if (response.data.courseStatus) {
|
||||
$scope.courseLoading = false;
|
||||
$scope.courseData = response.data.course_details;
|
||||
$scope.batchData = response.data.batch_details;
|
||||
} else {
|
||||
$scope.courseLoading = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// check mobile number existing
|
||||
$scope.checkMobileExist = function () {
|
||||
var checkReq = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'chkStudentExistDetail/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
data: $scope.myModel.primaryPhone,
|
||||
check: 'mobileNumber'
|
||||
}
|
||||
};
|
||||
$http(checkReq).then(function (response) {
|
||||
if (response.data.existMobile == true) {
|
||||
swal("Warning!", response.data.message, "warning");
|
||||
$scope.myModel.primaryPhone = '';
|
||||
} else {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// check emailId existing
|
||||
$scope.checkEmailExist = function () {
|
||||
var checkReq = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'chkStudentExistDetail/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
data: $scope.myModel.emailId,
|
||||
check: 'emailId'
|
||||
}
|
||||
};
|
||||
$http(checkReq).then(function (response) {
|
||||
if (response.data.existEmailId == true) {
|
||||
swal("Warning!", response.data.message, "warning");
|
||||
$scope.myModel.emailId = '';
|
||||
} else {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// add student
|
||||
$scope.studentFORM = {
|
||||
|
||||
submit: function (form, myModel, myModelCourse) {
|
||||
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 {
|
||||
var formate = "dd-MM-yyyy";
|
||||
$scope.myModel.switchsetting = $scope.myModel.switchsetting === true ? 1 : 0;
|
||||
$scope.myModel.dateofbirth = $filter('date')(new Date($scope.myModel.dateofbirth), formate);
|
||||
$scope.myModelCourse.dateofjoining = $filter('date')(new Date($scope.myModelCourse.dateofjoining), formate);
|
||||
var req = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'insertStudent/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
data: $scope.myModel,
|
||||
coursedata: $scope.myModelCourse,
|
||||
loginBranch: localDetails.localBranchID,
|
||||
createdBy: localDetails.localUserID,
|
||||
}
|
||||
};
|
||||
$http(req).then(function (response) {
|
||||
if (response.data.addStudentStatus == true) {
|
||||
swal("Success!", response.data.message, "success");
|
||||
$state.go($state.current, {}, { reload: true });
|
||||
} else {
|
||||
swal("Failed!", response.data.message, "error");
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
reset: function (form) {
|
||||
|
||||
// $scope.myModel = angular.copy($scope.master);
|
||||
form.$setPristine(true);
|
||||
$scope.myModel = {
|
||||
'employeeId': '',
|
||||
'firstname': '',
|
||||
'lastname': '',
|
||||
'fathername': '',
|
||||
'mothername': '',
|
||||
'emailId': '',
|
||||
'primaryPhone': '',
|
||||
'secondaryPhone': '',
|
||||
'dateofbirth': '',
|
||||
'gender': '',
|
||||
'qualificaion': '',
|
||||
'aadharNumber': '',
|
||||
'otherId': '',
|
||||
'otherIdDetails': '',
|
||||
'address1': '',
|
||||
'address2': '',
|
||||
'homeBranch': '',
|
||||
'dateofjoining': '',
|
||||
'dateofjoining': '',
|
||||
'role': '',
|
||||
'switchsetting': true,
|
||||
};
|
||||
}, resetCourse: function (form) {
|
||||
form.$setPristine(true);
|
||||
$scope.myModelCourse = {
|
||||
'university': '',
|
||||
'course': '',
|
||||
'batch': '',
|
||||
'dateofjoining': '',
|
||||
'enrollmentid': ''
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// update check mobile exist
|
||||
$scope.updateCheckMobileExist = function (p) {
|
||||
|
||||
var checkReq = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'chkUpdateStuExistDetail/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
exceptId: p.StudentID,
|
||||
datas: p.MobileNumber,
|
||||
check: 'mobileNumber'
|
||||
}
|
||||
};
|
||||
$http(checkReq).then(function (response) {
|
||||
if (response.data.existMobile == true) {
|
||||
swal("Warning!", response.data.message, "warning");
|
||||
p.MobileNumber = response.data.resetValue.MobileNumber;
|
||||
} else {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// update check email id exist
|
||||
$scope.updateCheckEmailExist = function (p) {
|
||||
var checkReq = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'chkUpdateStuExistDetail/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
exceptId: p.StudentID,
|
||||
datas: p.EmailID,
|
||||
check: 'emailId'
|
||||
}
|
||||
};
|
||||
$http(checkReq).then(function (response) {
|
||||
if (response.data.existEmailId == true) {
|
||||
swal("Warning!", response.data.message, "warning");
|
||||
p.EmailID = response.data.resetValue.EmailID;
|
||||
} else {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// update student details
|
||||
$scope.updateStuDetails = function (form, p) {
|
||||
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 {
|
||||
// alert(p.DOB);
|
||||
var formate = "dd-MM-yyyy";
|
||||
var checkDOB = $filter('date')(new Date(p.DOB), formate);
|
||||
p.IsActive = p.IsActive === true ? 1 : 0;
|
||||
p.DOB = checkDOB == "NaN-NaN-0NaN" ? p.DOB : $filter('date')(new Date(p.DOB), formate);
|
||||
var req = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'updateStudentExistDetail/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
data: p,
|
||||
updatedBy: localDetails.localUserID,
|
||||
}
|
||||
};
|
||||
$http(req).then(function (response) {
|
||||
if (response.data.updateStuStatus = true) {
|
||||
swal("Success!", response.data.message, "success");
|
||||
$scope.getStudentList();
|
||||
$scope.editId = -1;
|
||||
} else {
|
||||
// $scope.ldloading1[loading.replace('-', '_')] = false;
|
||||
swal("Failed!", response.data.message, "error");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$scope.updateStudentCourseDetails = function (form, datas) {
|
||||
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 {
|
||||
// alert(p.DOB);
|
||||
var formate = "dd-MM-yyyy";
|
||||
var checkDOB = $filter('date')(new Date(p.DOB), formate);
|
||||
p.IsActive = p.IsActive === true ? 1 : 0;
|
||||
p.DOB = checkDOB == "NaN-NaN-0NaN" ? p.DOB : $filter('date')(new Date(p.DOB), formate);
|
||||
var req = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'updateStudentCourseDetail/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
data: datas,
|
||||
updatedBy: localDetails.localUserID,
|
||||
}
|
||||
};
|
||||
$http(req).then(function (response) {
|
||||
if (response.data.updateStuStatus = true) {
|
||||
swal("Success!", response.data.message, "success");
|
||||
$scope.getStudentList();
|
||||
$scope.editId = -1;
|
||||
} else {
|
||||
// $scope.ldloading1[loading.replace('-', '_')] = false;
|
||||
swal("Failed!", response.data.message, "error");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}]);
|
||||
@ -67,9 +67,9 @@ function (cfpLoadingBarProvider) {
|
||||
cfpLoadingBarProvider.includeSpinner = false;
|
||||
}]);
|
||||
|
||||
app.controller('sessionCtrl', ["$scope", "$localStorage", "$state", function ($scope, $localStorage, $state) {
|
||||
/**
|
||||
* checking the session settings and logout for the function
|
||||
*/
|
||||
// app.controller('sessionCtrl', ["$scope", "$localStorage", "$state", function ($scope, $localStorage, $state) {
|
||||
// /**
|
||||
// * checking the session settings and logout for the function
|
||||
// */
|
||||
|
||||
}]);
|
||||
// }]);
|
||||
|
||||
229
Apollo/assets/views/batch.html
Normal file
229
Apollo/assets/views/batch.html
Normal file
@ -0,0 +1,229 @@
|
||||
<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 Batch 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="batchCtrl" data-ng-init="init()">
|
||||
<tabset class="tabbable">
|
||||
<tab heading="View Batch" id="viewbatch">
|
||||
<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('BatchCode')">Batch Code
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='BatchCode'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th ng-click="sort('BatchName')">Batch Name
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='BatchName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th ng-click="sort('UniversityName')">University Name
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='UniversityName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th> 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.BatchCode}}</td>
|
||||
<td>{{p.BatchName}}</td>
|
||||
<td>{{p.UniversityName}}</td>
|
||||
|
||||
<td>
|
||||
|
||||
<a href="#" class="text-azure" id="editRowBtn{{p.BatchCode}}" ng-click="setEditId(p.BatchCode);"><b class="fa fa-hover fa-pencil " aria-hidden="true"></b>
|
||||
</a>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr ng-show="editId === p.BatchCode" ng-if="editId === p.BatchCode" >
|
||||
<td colspan="6" ng-include src="'assets/views/editBatchDetails.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 Batch" id="addbatch">
|
||||
<div>
|
||||
<form name="Form" id="form" novalidate ng-submit="batchForm.submit(Form, myModel, 'zoom-in')" method="post">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<fieldset>
|
||||
<legend>
|
||||
Add New Batch 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>
|
||||
Batch Code <span class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Batch Code"
|
||||
tabindex="1" class="form-control" name="batchCode"
|
||||
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>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-3 form-group"
|
||||
ng-class="{'has-error':Form.batchName.$dirty && Form.batchName.$invalid, 'has-success':Form.batchName.$valid}">
|
||||
<label>
|
||||
Batch Name <span class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Batch Name"
|
||||
tabindex="2" class="form-control" name="batchName"
|
||||
ng-model="myModel.batchName" ng-pattern="" required/>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.batchName.$dirty && Form.batchName.$error.required">Batch name is required</span>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.batchName.$dirty && Form.batchName.$error.pattern">Invalid batch name </span>
|
||||
<!--<span class="success text-small"-->
|
||||
<!--ng-if="Form.stopname.$valid">Thank You!</span>-->
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 form-group"
|
||||
ng-class="{'has-error':Form.university.$dirty && Form.university.$invalid, 'has-success':Form.university.$valid}">
|
||||
<label>
|
||||
University <span class="symbol required"></span>
|
||||
</label>
|
||||
<select class="form-control" name="university" tabindex="3" id="university"
|
||||
ng-model="myModel.universityName"
|
||||
ng-options="details.UniversityID as details.UniversityName for details in university"
|
||||
required>
|
||||
<option value=""> Select University</option>
|
||||
</select>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.university.$dirty && Form.university.$invalid">University is required</span>
|
||||
<!--<span class="success text-small" ng-if="Form.university.$valid">Thank You!</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>
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<button type="submit" ladda="ldloading1.zoom_in" 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="batchForm.reset(Form)">
|
||||
Reset
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</tab>
|
||||
</tabset>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end: LIST GROUP -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -5,25 +5,32 @@
|
||||
<img ng-src="{{app.layout.logo}}" alt="{{app.name}}"/>
|
||||
</div>
|
||||
<!-- start: FORGOT BOX -->
|
||||
<div class="box-forgot">
|
||||
<form class="form-forgot">
|
||||
<div class="box-forget" ng-controller="forgotCtrl">
|
||||
<!--<form name="myForm" class="form-forgot" novalidate class="form-inline" ng-submit="form.submit(Form)" method="post">-->
|
||||
|
||||
<form class="form-forrgot" ng-submit="forgotForm.submit(form)" name="form" id= "form" novalidate method="POST">
|
||||
<fieldset>
|
||||
<legend>
|
||||
Forget Password?
|
||||
</legend>
|
||||
<p>
|
||||
Enter your e-mail address below to reset your password.
|
||||
<p style="color: sandybrown;">
|
||||
Enter your Registered Mobile Number below to reset your password.
|
||||
</p>
|
||||
<div class="form-group">
|
||||
<span class="input-icon">
|
||||
<input type="email" class="form-control" name="email" placeholder="Email">
|
||||
<i class="fa fa-envelope-o"></i> </span>
|
||||
</div>
|
||||
<div class="form-group" ng-class="{'has-error':form.mobilenumber.$dirty && form.mobilenumber.$invalid, 'has-success':form.mobilenumber.$valid}">
|
||||
<span class="input-icon">
|
||||
<input type="text" class="form-control" ng-model="myModel.userMobile" name="mobilenumber" placeholder="MobileNumber"
|
||||
required>
|
||||
|
||||
<i class="fa fa-mobile"></i>
|
||||
</span>
|
||||
<span class="error text-small block" ng-if="form.mobilenumber.$dirty && form.mobilenumber.$error.required"> mobile number is required. </span>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<a class="btn btn-primary btn-o" ui-sref="login.signin">
|
||||
<i class="fa fa-chevron-circle-left"></i> Log-In
|
||||
</a>
|
||||
<button type="submit" class="btn btn-primary pull-right">
|
||||
<button type="submit" class="btn btn-primary pull-right">
|
||||
Submit <i class="fa fa-arrow-circle-right"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@ -57,6 +57,25 @@
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<li ng-class="{'active open':$state.includes('app.student')}">
|
||||
<a href="javascript:void(0)">
|
||||
<div class="item-content">
|
||||
<div class="item-media">
|
||||
<i class="ti-user"></i>
|
||||
</div>
|
||||
<div class="item-inner">
|
||||
<span class="title" translate="sidebar.nav.student.MAIN"> STUDENT </span><i class="icon-arrow"></i>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
<li ui-sref-active="active">
|
||||
<a ui-sref="app.student.studentDetails">
|
||||
<span class="title" translate="sidebar.nav.student.STUDENTDETAILS"> STUDENT DETAILS </span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li ng-class="{'active open':$state.includes('app.tracking')}">
|
||||
<a ui-sref="app.tracking">
|
||||
<div class="item-content">
|
||||
|
||||
94
Apollo/assets/views/student/editStudentCourseDetails.html
Normal file
94
Apollo/assets/views/student/editStudentCourseDetails.html
Normal file
@ -0,0 +1,94 @@
|
||||
<form name="Form" id="form" novalidate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div ng-if="courseEditLoading == true" class="text-center">
|
||||
<!--<img src="assets/images/ajax_loader_blue.gif" style="width: 5%; height: 30%">-->
|
||||
<h3>Fetching ...</h3>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
|
||||
<fieldset ng-if="courseEditLoading == false">
|
||||
<legend>
|
||||
Course Details
|
||||
</legend>
|
||||
<pre> {{studentCourse | json }} </pre>
|
||||
<!--Edit course details : Start-->
|
||||
<div>
|
||||
<div class="row" ng-repeat="stucour in studentCourse">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.univ.$dirty && Form.univ.$invalid, 'has-success':Form.univ.$valid}">
|
||||
<label>
|
||||
University <span class="symbol required"></span>
|
||||
</label>
|
||||
<select ng-init="onSlecetUnivEdit(stucour.UniversityID)" class="form-control" name="univ" ng-model="stucour.UniversityID"
|
||||
class="cs-select cs-skin-elastic" ng-change="onSlecetUnivEdit(stucour.UniversityID)" required>
|
||||
|
||||
<option value="" disabled selected>Select University</option>
|
||||
<option ng-repeat="items in universityData" value="{{items.UniversityID}}" ng-selected="stucour.UniversityID == items.UniversityID">{{items.UniversityName}}</option>
|
||||
</select>
|
||||
<span class="error text-small block" ng-if="Form.univ.$dirty && Form.univ.$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>
|
||||
<select class="form-control" name="role" ng-model="stucour.CourseID" name="course" class="cs-select cs-skin-elastic" required>
|
||||
|
||||
<option value="" disabled selected>Select Course</option>
|
||||
<option ng-repeat="items in courseData" value="{{items.CourseID}}" ng-selected="stucour.CourseID == items.CourseID">{{items.CourseName}}</option>
|
||||
</select>
|
||||
<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>
|
||||
<select class="form-control" name="batch" ng-model="stucour.BatchCode" class="cs-select cs-skin-elastic" required>
|
||||
|
||||
<option value="" disabled selected>Select Batch</option>
|
||||
<option ng-repeat="items in batchData" value="{{items.BatchCode}}" ng-selected="stucour.BatchCode == items.BatchCode">{{items.BatchName}}</option>
|
||||
</select>
|
||||
<span class="error text-small block" ng-if="Form.batch.$dirty && Form.batch.$error.required">Batch is required</span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.enrollId.$dirty && Form.enrollId.$invalid}">
|
||||
<label>
|
||||
Entrollment ID
|
||||
</label> {{ stucour.ID}}
|
||||
|
||||
<input type="text" placeholder="Enter Entrollment ID" tabindex="15" class="form-control" name="enrollId" ng-model="stucour.ID"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" />
|
||||
<span class="error text-small block" ng-if="Form.enrollId.$dirty && Form.enrollId.$error.pattern">Invalid Entrollment ID </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.dateofjoining.$dirty && Form.dateofjoining.$invalid, 'has-success':Form.dateofjoining.$valid}">
|
||||
<label>
|
||||
Date of Joining <span class="symbol required"></span>
|
||||
</label>
|
||||
<!--{{ stucour.DOJ}}-->
|
||||
<input type="text" tabindex="8" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="stucour.DOJ"
|
||||
is-open="startOpen" ng-init="startOpen = false" name="dateofjoining" datepicker-options="dateOptions"
|
||||
placeholder="Select Date of Joining" close-text="Close" required="required" max-date="currentDate"
|
||||
/>
|
||||
|
||||
<span class="error text-small block" ng-if="Form.dateofjoining.$dirty && Form.dateofjoining.$error.required">Date of Joining is required</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<button type="button" ladda="ldloading1.zoom_in" class="btn btn-wide btn-success" data-style="zoom-in" ng-click="updateStudentCourseDetails(Form, studentCourse)">
|
||||
Update
|
||||
</button>
|
||||
<button type="reset" class="btn btn-warning btn-wide" tabindex="9" ng-click="cancel()">
|
||||
Cancel
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--Edit course details : Start-->
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- class="editRowTd" -->
|
||||
385
Apollo/assets/views/student/editStudentDetails.html
Normal file
385
Apollo/assets/views/student/editStudentDetails.html
Normal file
@ -0,0 +1,385 @@
|
||||
<form name="Form" id="form" novalidate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12">
|
||||
<fieldset>
|
||||
<legend>
|
||||
Personal Details
|
||||
</legend>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.primaryPhone.$dirty && Form.primaryPhone.$invalid, 'has-success':Form.primaryPhone.$valid}">
|
||||
<label>
|
||||
Mobile Number <span
|
||||
class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" name="primaryPhone" tabindex="1" placeholder="Enter Mobile Number" class="form-control" ng-model="p.MobileNumber"
|
||||
ng-minlength="10" ng-maxlength="12" ng-pattern="/^[0-9]*$/" ng-blur='updateCheckMobileExist(p)'
|
||||
required/>
|
||||
<span class="error text-small block" ng-if="Form.primaryPhone.$dirty && Form.primaryPhone.$invalid" ng-hide="Form.primaryPhone.$error.maxlength || Form.primaryPhone.$error.minlength || Form.primaryPhone.$error.pattern">Mobile Number is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.primaryPhone.$error.maxlength || Form.primaryPhone.$error.minlength || Form.primaryPhone.$error.pattern">Enter a Valid Phone Number</span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.firstname.$dirty && Form.firstname.$invalid, 'has-success':Form.firstname.$valid}">
|
||||
<label>
|
||||
First Name <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" placeholder="Enter First Name" tabindex="2" class="form-control" name="firstname" ng-model="p.Firstname"
|
||||
ng-pattern="/^[a-zA-Z0-9.\s]*$/" required/>
|
||||
<span class="error text-small block" ng-if="Form.firstname.$dirty && Form.firstname.$error.required">First Name required</span>
|
||||
<span class="error text-small block" ng-if="Form.firstname.$dirty && Form.firstname.$error.pattern">Invalid First Name </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.lastname.$dirty && Form.lastname.$invalid, 'has-success':Form.lastname.$valid}">
|
||||
<label>
|
||||
Last Name <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" placeholder="Enter Last Name" tabindex="3" class="form-control" name="lastname" ng-model="p.Lastname"
|
||||
ng-pattern="/^[a-zA-Z0-9.\s]*$/" required/>
|
||||
<span class="error text-small block" ng-if="Form.lastname.$dirty && Form.lastname.$error.required">Last Name required</span>
|
||||
<span class="error text-small block" ng-if="Form.lastname.$dirty && Form.lastname.$error.pattern">Invalid Last Name </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.fathername.$dirty && Form.fathername.$invalid, 'has-success':Form.fathername.$valid}">
|
||||
<label>
|
||||
Father Name <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" placeholder="Enter Father Name" tabindex="4" class="form-control" name="fathername" ng-model="p.Fathername"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" required/>
|
||||
<span class="error text-small block" ng-if="Form.fathername.$dirty && Form.fathername.$error.required">Father Name required</span>
|
||||
<span class="error text-small block" ng-if="Form.fathername.$dirty && Form.fathername.$error.pattern">Invalid Father Name </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.mothername.$dirty && Form.mothername.$invalid, 'has-success':Form.mothername.$valid}">
|
||||
<label>
|
||||
Mother Name <span class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Mother Name" tabindex="5" class="form-control" name="mothername" ng-model="p.MotherName"
|
||||
ng-pattern="/^[a-zA-Z0-9.\s]*$/" required/>
|
||||
<span class="error text-small block" ng-if="Form.mothername.$dirty && Form.mothername.$error.required">Mother Name required</span>
|
||||
<span class="error text-small block" ng-if="Form.mothername.$dirty && Form.mothername.$error.pattern">Invalid Last Name </span>
|
||||
</div>
|
||||
<div class=" col-md-4 form-group" ng-class="{'has-error':Form.emailId.$dirty && Form.emailId.$invalid, 'has-success':Form.emailId.$valid}">
|
||||
<label>
|
||||
Email ID <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="email" tabindex="6" placeholder="Enter Email ID" class="form-control" name="emailId" ng-pattern="/^[-a-z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9_][-a-z0-9_]*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z][a-z])|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,5})?$/i"
|
||||
ng-model="p.EmailID" ng-blur='updateCheckEmailExist(p)' required>
|
||||
<span class="error text-small block" ng-if="Form.emailId.$dirty && Form.primaryEmail.$invalid" ng-hide="Form.emailId.$error.email">Email is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.emailId.$error.email">Please, enter a valid email address.</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.secondaryPhone.$dirty && Form.secondaryPhone.$invalid, 'has-success':Form.secondaryPhone.$valid}">
|
||||
<label class="control-label">
|
||||
Alternate Mobile Number <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" name="secondaryPhone" tabindex="7" placeholder="Enter Alternate Mobile Number" class="form-control" ng-model="p.AlternateNumber"
|
||||
ng-minlength="10" ng-maxlength="12" ng-pattern="/^[0-9]*$/" required/>
|
||||
<span class="error text-small block" ng-if="Form.secondaryPhone.$dirty && Form.secondaryPhone.$invalid" ng-hide="Form.secondaryPhone.$error.maxlength || Form.secondaryPhone.$error.minlength || Form.secondaryPhone.$error.pattern">Alternate Mobile Number is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.secondaryPhone.$error.maxlength || Form.secondaryPhone.$error.minlength || Form.secondaryPhone.$error.pattern">Enter a Valid Phone Number</span>
|
||||
</div>
|
||||
|
||||
<div data-ng-controller="DatepickerDemoCtrl">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.dateofbirth.$dirty && Form.dateofbirth.$invalid, 'has-success':Form.dateofbirth.$valid}">
|
||||
<label>
|
||||
Date Of Birth <span
|
||||
class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" tabindex="8" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="p.DOB"
|
||||
is-open="startOpen" ng-init="startOpen = false" name="dateofbirth" datepicker-options="dateOptions"
|
||||
placeholder="Select Date of Birth" close-text="Close" required="required"
|
||||
ng-change="getMaxEndDate(myModel.startDate)" max-date="currentDate" />
|
||||
|
||||
|
||||
<span class="error text-small block" ng-if="Form.dateofbirth.$dirty && Form.dateofbirth.$invalid" ng-hide="Form.dateofbirth.$error.maxlength">Date of Birth is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.dateofbirth.$error.maxlength">Enter a Valid Date of Birth</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.gender.$dirty && Form.gender.$invalid , 'has-success':Form.gender.$valid}">
|
||||
<label class="block">
|
||||
Gender <span class="symbol required"></span>
|
||||
</label>
|
||||
<div class="clip-radio radio-primary">
|
||||
<input type="radio" tabindex="9" id="female" name="gender" value="female" ng-model="p.Gender" required>
|
||||
<label for="female">
|
||||
Female
|
||||
</label>
|
||||
<input type="radio" id="male" name="gender" value="male" ng-model="p.Gender" required>
|
||||
<label for="male">
|
||||
Male
|
||||
</label>
|
||||
<span class="error text-small block" ng-if="Form.gender.$dirty && Form.gender.$invalid">Gender is required.</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.address1.$dirty && Form.address1.$invalid}">
|
||||
<label>
|
||||
Permanent Address
|
||||
</label>
|
||||
<textarea placeholder="Enter Permanent Address" tabindex="10" class="form-control textdsc" name="address1" ng-model="p.PermanentAddress"></textarea>
|
||||
<span class="error text-small block" ng-if="Form.address1.$dirty && Form.address1.$invalid">Permanent Address is required</span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.address2.$dirty && Form.address2.$invalid}">
|
||||
<label>
|
||||
Current Address
|
||||
</label>
|
||||
<textarea placeholder="Enter Current Address" tabindex="11" class="form-control textdsc" name="address2" ng-model="p.PresentAddress"></textarea>
|
||||
<span class="error text-small block" ng-if="Form.address2.$dirty && Form.address2.$invalid">Current Address is required</span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.aadharNumber.$dirty && Form.aadharNumber.$invalid, 'has-success':Form.aadharNumber.$valid}">
|
||||
<label>
|
||||
Aadhar Number <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" name="aadharNumber" tabindex="12" placeholder="____-____-____" ui-mask="9999-9999-9999" class="form-control"
|
||||
ng-model="p.AadharNumber" ng-minlength="10" ng-maxlength="15" ng-pattern="/^[0-9]*$/"
|
||||
required>
|
||||
<span class="error text-small block" ng-if="Form.aadharNumber.$dirty && Form.aadharNumber.$invalid" ng-hide="Form.aadharNumber.$error.maxlength || Form.aadharNumber.$error.minlength || Form.aadharNumber.$error.pattern">Aadhar Number is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.aadharNumber.$error.maxlength || Form.aadharNumber.$error.minlength || Form.aadharNumber.$error.pattern">Enter a Valid Aadhar Number</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4 form-group">
|
||||
<div class="row">
|
||||
<div class="col-md-6 form-group" ng-class="{'has-error':Form.otherId.$dirty && Form.otherId.$invalid}">
|
||||
<label>
|
||||
Other ID
|
||||
</label>
|
||||
<input type="text" name="otherId" tabindex="13" placeholder="Other Id" class="form-control" ng-model="p.OtherID" ng-minlength="1"
|
||||
ng-maxlength="20" ng-pattern="/^[a-zA-Z0-9 ._-]+$/">
|
||||
<span class="error text-small block" ng-if="Form.otherId.$dirty && Form.otherId.$invalid" ng-hide="Form.otherId.$error.maxlength || Form.otherId.$error.minlength || Form.otherId.$error.pattern">Aadhar Number is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.otherId.$error.maxlength || Form.otherId.$error.minlength || Form.otherId.$error.pattern">Enter a Valid Details</span>
|
||||
</div>
|
||||
<div class="col-md-6 form-group" ng-class="{'has-error':Form.otherIdDetails.$dirty && Form.otherIdDetails.$invalid}">
|
||||
<label>
|
||||
Other ID Details
|
||||
</label>
|
||||
<input type="text" name="otherIdDetails" tabindex="14" placeholder="Other Id Details" class="form-control" ng-model="p.OtherIDDetails"
|
||||
ng-minlength="1" ng-maxlength="20" ng-pattern="/^[a-zA-Z0-9 ._-]+$/">
|
||||
<span class="error text-small block" ng-if="Form.otherIdDetails.$dirty && Form.otherIdDetails.$invalid" ng-hide="Form.otherIdDetails.$error.maxlength || Form.otherIdDetails.$error.minlength || Form.otherIdDetails.$error.pattern">Aadhar Number is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.otherIdDetails.$error.maxlength || Form.otherIdDetails.$error.minlength || Form.otherIdDetails.$error.pattern">Enter a Valid Details</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.caste.$dirty && Form.caste.$invalid}">
|
||||
<label>
|
||||
Caste
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Caste" tabindex="15" class="form-control" name="caste" ng-model="p.Caste" ng-pattern="/^[a-zA-Z.\s]*$/"
|
||||
/>
|
||||
<span class="error text-small block" ng-if="Form.caste.$dirty && Form.caste.$error.pattern">Invalid Caste Name </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.category.$dirty && Form.category.$invalid}">
|
||||
<label>
|
||||
Category
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Category" tabindex="16" class="form-control" name="category" ng-model="p.Category"
|
||||
/>
|
||||
<span class="error text-small block" ng-if="Form.category.$dirty && Form.category.$error.pattern">Invalid Category Name </span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.religion.$dirty && Form.religion.$invalid}">
|
||||
<label>
|
||||
Religion
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Religion" tabindex="17" class="form-control" name="religion" ng-model="p.Religion"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" />
|
||||
<span class="error text-small block" ng-if="Form.religion.$dirty && Form.religion.$error.pattern">Invalid Religion Name </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.nationality.$dirty && Form.nationality.$invalid}">
|
||||
<label>
|
||||
Nationality
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Nationality" tabindex="18" class="form-control" name="nationality" ng-model="p.Nationality"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" />
|
||||
<span class="error text-small block" ng-if="Form.nationality.$dirty && Form.nationality.$error.pattern">Invalid Nationality Name </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.qualificaion.$dirty && Form.qualificaion.$invalid}">
|
||||
<label>
|
||||
Pre Qualification
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Qualification" tabindex="19" class="form-control" name="qualificaion" ng-model="p.PreQualification"
|
||||
/>
|
||||
<span class="error text-small block" ng-if="Form.qualificaion.$dirty && Form.qualificaion.$error.pattern">Enter a Valid Qualification</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.occupation.$dirty && Form.occupation.$invalid}">
|
||||
<label>
|
||||
Occupation
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Occupation" tabindex="20" class="form-control" name="occupation" ng-model="p.Occupation"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" />
|
||||
<span class="error text-small block" ng-if="Form.occupation.$dirty && Form.occupation.$error.pattern">Invalid Occupation </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.designation.$dirty && Form.designation.$invalid}">
|
||||
<label>
|
||||
Designation
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Designation" tabindex="21" class="form-control" name="designation" ng-model="p.Designation"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" />
|
||||
<span class="error text-small block" ng-if="Form.designation.$dirty && Form.designation.$error.pattern">Invalid Designation </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.companyname.$dirty && Form.companyname.$invalid}">
|
||||
<label>
|
||||
Company Name
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Company Name" tabindex="22" class="form-control" name="companyname" ng-model="p.Companyname"
|
||||
/>
|
||||
<span class="error text-small block" ng-if="Form.companyname.$dirty && Form.companyname.$error.pattern">Invalid Company </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.referredby.$dirty && Form.referredby.$invalid}">
|
||||
<label>
|
||||
Referred By
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Refer's Name" tabindex="23" class="form-control" name="referredby" ng-model="p.ReferredBy"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" />
|
||||
<span class="error text-small block" ng-if="Form.referredby.$dirty && Form.referredby.$error.pattern">Invalid Referred By </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.referredmobilenumber.$dirty && Form.referredmobilenumber.$invalid}">
|
||||
<label>
|
||||
Refer's Mobile Number
|
||||
</label>
|
||||
<input type="text" name="referredmobilenumber" tabindex="24" placeholder="Enter Refer's Mobile Number" class="form-control"
|
||||
ng-model="p.ReferersMobileNumber" ng-minlength="10" ng-maxlength="12" ng-pattern="/^[0-9]*$/"
|
||||
/>
|
||||
<span class="error text-small block" ng-if="Form.referredmobilenumber.$dirty && Form.referredmobilenumber.$invalid" ng-hide="Form.referredmobilenumber.$error.maxlength || Form.referredmobilenumber.$error.minlength || Form.referredmobilenumber.$error.pattern">Refer's Mobile Number is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.referredmobilenumber.$error.maxlength || Form.referredmobilenumber.$error.minlength || Form.referredmobilenumber.$error.pattern">Enter a Valid Phone Number</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<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>
|
||||
<!--<pre>{{ p | json}}</pre>-->
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<button type="button" ladda="ldloading1.zoom_in" tabindex="19" class="btn btn-wide btn-success" data-style="zoom-in" ng-click="updateStuDetails(Form, p)">
|
||||
Save
|
||||
</button>
|
||||
<button type="reset" class="btn btn-warning btn-wide" tabindex="20" ng-click="cancel()">
|
||||
Cancel
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<!--<fieldset>
|
||||
<legend>
|
||||
Branch Details
|
||||
</legend>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.homeBranch.$dirty && Form.homeBranch.$invalid, 'has-success':Form.homeBranch.$valid}">
|
||||
<label for="form-field-select-2">
|
||||
Home Branch <span class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<select class="form-control" class="cs-select cs-skin-elastic" name="homeBranch" ng-model="p.BranchCode" required>
|
||||
<option value="" disabled selected>Select Home Branch</option>
|
||||
<option ng-repeat="item in branchDetails" value="{{item.BranchCode}}" ng-selected="p.BranchCode == item.BranchCode">{{item.BranchName}}</option>
|
||||
</select>
|
||||
<span class="error text-small block" ng-if="Form.homeBranch.$dirty && Form.homeBranch.$error.required">Home Branch is Required</span>
|
||||
</div>
|
||||
|
||||
<div data-ng-controller="DatepickerDemoCtrl">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.dateofjoining.$dirty && Form.dateofjoining.$invalid, 'has-success':Form.dateofjoining.$valid}">
|
||||
<label>
|
||||
Date Of Joining <span class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<input type="text" tabindex="6" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="yyyy-MM-dd" ng-model="p.DOJ"
|
||||
is-open="startOpen" ng-init="startOpen = false" name="dateofbirth" datepicker-options="dateOptions"
|
||||
placeholder="Select Date of Joining" close-text="Close" required="required"
|
||||
/>
|
||||
<span class="error text-small block" ng-if="Form.dateofjoining.$dirty && Form.dateofjoining.$error.required">Date of Joining required</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.role.$dirty && Form.role.$invalid, 'has-success':Form.role.$valid}">
|
||||
<label>
|
||||
Role <span class="symbol required"></span>
|
||||
</label>
|
||||
<select class="form-control" name="role" ng-model="p.ListCode" class="cs-select cs-skin-elastic" required>
|
||||
|
||||
<option value="" disabled selected>Select Role</option>
|
||||
<option ng-repeat="item in roleDetails" value="{{item.ListCode}}" ng-selected="p.ListCode == item.ListCode">{{item.ListName}}</option>
|
||||
</select>
|
||||
<span class="error text-small block" ng-if="Form.role.$dirty && Form.role.$error.required">Role is required</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<label>
|
||||
Active/De-Active
|
||||
</label>
|
||||
|
||||
<div ng-switch="p.IsActive">
|
||||
<div ng-switch-when="true">
|
||||
<switch ng-model="p.IsActive" ng-init="p.IsActive = true" class="green"></switch>
|
||||
</div>
|
||||
<div ng-switch-when="false">
|
||||
<switch ng-model="p.IsActive" ng-init="p.IsActive = false" class="green"></switch>
|
||||
</div>
|
||||
<div ng-switch-default>
|
||||
<switch ng-model="p.IsActive" ng-init="p.IsActive = true" class="green"></switch>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<pre>{{ p | json}}</pre>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<button type="button" ladda="ldloading1.zoom_in" class="btn btn-wide btn-success" data-style="zoom-in" ng-click="updateEmpDetails(Form, p)">
|
||||
Submit
|
||||
</button>
|
||||
<button type="reset" class="btn btn-warning btn-wide" tabindex="9" ng-click="branchForm.reset(Form)">
|
||||
Reset
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<input type="button" class="btn btn-warning btn-wide" tabindex="9" value="Cancel"
|
||||
ng-click="cancel();">
|
||||
</input>
|
||||
</div>
|
||||
</div>-->
|
||||
<!--</fieldset>-->
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- class="editRowTd" -->
|
||||
505
Apollo/assets/views/student/student_details.html
Normal file
505
Apollo/assets/views/student/student_details.html
Normal file
@ -0,0 +1,505 @@
|
||||
<!-- start: STUDENT TITLE -->
|
||||
<section id="page-title">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<h1 class="mainTitle" translate="View/Add Student Details">{{ mainTitle }}</h1>
|
||||
</div>
|
||||
<div ncy-breadcrumb></div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- end: STUDENT TITLE -->
|
||||
<!-- start: LIST GROUP -->
|
||||
<div class="container-fluid container-fullw bg-white">
|
||||
<div class="row" ng-controller="studentCtrl" data-ng-init="init()">
|
||||
<tabset class="tabbable">
|
||||
<tab heading="View Student" id="studentbranch">
|
||||
<div class="container-fluid container-fullw">
|
||||
<div class="row">
|
||||
<div ng-if="loader == true" class="col-md-12" align="center">
|
||||
<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="studentData == false" style="min-height: 281px;">
|
||||
<p style="color: red;" align="center"><strong><h3 class="text-center">No
|
||||
records found... </h3></strong></p>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" ng-if="studentData == 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">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th ng-click="sort('Firstname')">First Name
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='Firstname'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th ng-click="sort('Lastname')">Last Name
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='Lastname'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th ng-click="sort('MobileNumber')">MobileNumber
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='MobileNumber'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th ng-click="sort('EmailID')">Email ID
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='EmailID'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th style="text-align: center;"> Details
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody dir-paginate="p in data|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10">
|
||||
<tr>
|
||||
<td>{{p.Firstname}}</td>
|
||||
<td>{{p.Lastname}}</td>
|
||||
<td>{{p.MobileNumber}}</td>
|
||||
<td>{{p.EmailID}}</td>
|
||||
<td style="text-align: center;">
|
||||
<input type=button class="btn btn-info btn-xs" ladda="ldloading1.zoom_in" id="editRowBtn{{p.StudentID}}" value="Personal Details"
|
||||
ng-click="setEditId(p.StudentID);">
|
||||
<!--<input type=button class="btn btn-blue btn-xs" id="editCourseRowBtn{{p.StaffID}}" value="Course Details" ng-click="setEditCourseId(p.StudentID);">-->
|
||||
</td>
|
||||
</tr>
|
||||
<tr ng-show="editId === p.StudentID" ng-if="editId === p.StudentID">
|
||||
<td colspan="6" ng-include src="'assets/views/student/editStudentDetails.html'"></td>
|
||||
</tr>
|
||||
<tr ng-show="editCourseId === p.StudentID" ng-if="editCourseId === p.StudentID">
|
||||
<td colspan="6" ng-include src="'assets/views/student/editStudentCourseDetails.html'"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<dir-pagination-controls max-size="10" direction-links="true" boundary-links="true">
|
||||
</dir-pagination-controls>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</tab>
|
||||
<script>
|
||||
$('#addbranch').click(function () {
|
||||
$('#branchcode').focus();
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.sort-icon {
|
||||
font-size: 9px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
th {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<tab heading="Add Student" id="addstudent">
|
||||
<div>
|
||||
<form name="Form" id="form" novalidate ng-submit="studentFORM.submit(Form, myModel)" method="post">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<fieldset>
|
||||
<legend>
|
||||
Personal Details
|
||||
</legend>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.primaryPhone.$dirty && Form.primaryPhone.$invalid, 'has-success':Form.primaryPhone.$valid}">
|
||||
<label>
|
||||
Mobile Number <span
|
||||
class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" name="primaryPhone" tabindex="1" placeholder="Enter Mobile Number" class="form-control" ng-model="myModel.primaryPhone"
|
||||
ng-minlength="10" ng-maxlength="12" ng-pattern="/^[0-9]*$/" ng-blur='checkMobileExist()'
|
||||
required/>
|
||||
<span class="error text-small block" ng-if="Form.primaryPhone.$dirty && Form.primaryPhone.$invalid" ng-hide="Form.primaryPhone.$error.maxlength || Form.primaryPhone.$error.minlength || Form.primaryPhone.$error.pattern">Mobile Number is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.primaryPhone.$error.maxlength || Form.primaryPhone.$error.minlength || Form.primaryPhone.$error.pattern">Enter a Valid Phone Number</span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.firstname.$dirty && Form.firstname.$invalid, 'has-success':Form.firstname.$valid}">
|
||||
<label>
|
||||
First Name <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" placeholder="Enter First Name" tabindex="2" class="form-control" name="firstname" ng-model="myModel.firstname"
|
||||
ng-pattern="/^[a-zA-Z0-9.\s]*$/" required/>
|
||||
<span class="error text-small block" ng-if="Form.firstname.$dirty && Form.firstname.$error.required">First Name required</span>
|
||||
<span class="error text-small block" ng-if="Form.firstname.$dirty && Form.firstname.$error.pattern">Invalid First Name </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.lastname.$dirty && Form.lastname.$invalid, 'has-success':Form.lastname.$valid}">
|
||||
<label>
|
||||
Last Name <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" placeholder="Enter Last Name" tabindex="3" class="form-control" name="lastname" ng-model="myModel.lastname"
|
||||
ng-pattern="/^[a-zA-Z0-9.\s]*$/" required/>
|
||||
<span class="error text-small block" ng-if="Form.lastname.$dirty && Form.lastname.$error.required">Last Name required</span>
|
||||
<span class="error text-small block" ng-if="Form.lastname.$dirty && Form.lastname.$error.pattern">Invalid Last Name </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.fathername.$dirty && Form.fathername.$invalid, 'has-success':Form.fathername.$valid}">
|
||||
<label>
|
||||
Father Name <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" placeholder="Enter Father Name" tabindex="4" class="form-control" name="fathername" ng-model="myModel.fathername"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" required/>
|
||||
<span class="error text-small block" ng-if="Form.fathername.$dirty && Form.fathername.$error.required">Father Name required</span>
|
||||
<span class="error text-small block" ng-if="Form.fathername.$dirty && Form.fathername.$error.pattern">Invalid Father Name </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.mothername.$dirty && Form.mothername.$invalid, 'has-success':Form.mothername.$valid}">
|
||||
<label>
|
||||
Mother Name <span class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Mother Name" tabindex="5" class="form-control" name="mothername" ng-model="myModel.mothername"
|
||||
ng-pattern="/^[a-zA-Z0-9.\s]*$/" required/>
|
||||
<span class="error text-small block" ng-if="Form.mothername.$dirty && Form.mothername.$error.required">Mother Name required</span>
|
||||
<span class="error text-small block" ng-if="Form.mothername.$dirty && Form.mothername.$error.pattern">Invalid Last Name </span>
|
||||
</div>
|
||||
<div class=" col-md-4 form-group" ng-class="{'has-error':Form.emailId.$dirty && Form.emailId.$invalid, 'has-success':Form.emailId.$valid}">
|
||||
<label>
|
||||
Email ID <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="email" tabindex="6" placeholder="Enter Email ID" class="form-control" name="emailId" ng-pattern="/^[-a-z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9_][-a-z0-9_]*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z][a-z])|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,5})?$/i"
|
||||
ng-model="myModel.emailId" ng-blur='checkEmailExist()' required>
|
||||
<span class="error text-small block" ng-if="Form.emailId.$dirty && Form.primaryEmail.$invalid" ng-hide="Form.emailId.$error.email">Email is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.emailId.$error.email">Please, enter a valid email address.</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.secondaryPhone.$dirty && Form.secondaryPhone.$invalid, 'has-success':Form.secondaryPhone.$valid}">
|
||||
<label class="control-label">
|
||||
Alternate Mobile Number <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" name="secondaryPhone" tabindex="7" placeholder="Enter Alternate Mobile Number" class="form-control" ng-model="myModel.secondaryPhone"
|
||||
ng-minlength="10" ng-maxlength="12" ng-pattern="/^[0-9]*$/" required/>
|
||||
<span class="error text-small block" ng-if="Form.secondaryPhone.$dirty && Form.secondaryPhone.$invalid" ng-hide="Form.secondaryPhone.$error.maxlength || Form.secondaryPhone.$error.minlength || Form.secondaryPhone.$error.pattern">Alternate Mobile Number is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.secondaryPhone.$error.maxlength || Form.secondaryPhone.$error.minlength || Form.secondaryPhone.$error.pattern">Enter a Valid Phone Number</span>
|
||||
</div>
|
||||
|
||||
<div data-ng-controller="DatepickerDemoCtrl">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.dateofbirth.$dirty && Form.dateofbirth.$invalid, 'has-success':Form.dateofbirth.$valid}">
|
||||
<label>
|
||||
Date Of Birth <span
|
||||
class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" tabindex="8" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="myModel.dateofbirth"
|
||||
is-open="startOpen" ng-init="startOpen = false" name="dateofbirth" datepicker-options="dateOptions"
|
||||
placeholder="Select Date of Birth" close-text="Close" required="required"
|
||||
ng-change="getMaxEndDate(myModel.startDate)" max-date="currentDate" />
|
||||
|
||||
|
||||
<span class="error text-small block" ng-if="Form.dateofbirth.$dirty && Form.dateofbirth.$invalid" ng-hide="Form.dateofbirth.$error.maxlength">Date of Birth is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.dateofbirth.$error.maxlength">Enter a Valid Date of Birth</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.gender.$dirty && Form.gender.$invalid , 'has-success':Form.gender.$valid}">
|
||||
<label class="block">
|
||||
Gender <span class="symbol required"></span>
|
||||
</label>
|
||||
<div class="clip-radio radio-primary">
|
||||
<input type="radio" tabindex="9" id="female" name="gender" value="female" ng-model="myModel.gender" required>
|
||||
<label for="female">
|
||||
Female
|
||||
</label>
|
||||
<input type="radio" id="male" name="gender" value="male" ng-model="myModel.gender" required>
|
||||
<label for="male">
|
||||
Male
|
||||
</label>
|
||||
<span class="error text-small block" ng-if="Form.gender.$dirty && Form.gender.$invalid">Gender is required.</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.address1.$dirty && Form.address1.$invalid}">
|
||||
<label>
|
||||
Permanent Address
|
||||
</label>
|
||||
<textarea placeholder="Enter Permanent Address" tabindex="10" class="form-control textdsc" name="address1" ng-model="myModel.address1"></textarea>
|
||||
<span class="error text-small block" ng-if="Form.address1.$dirty && Form.address1.$invalid">Permanent Address is required</span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.address2.$dirty && Form.address2.$invalid}">
|
||||
<label>
|
||||
Current Address
|
||||
</label>
|
||||
<textarea placeholder="Enter Current Address" tabindex="11" class="form-control textdsc" name="address2" ng-model="myModel.address2"></textarea>
|
||||
<span class="error text-small block" ng-if="Form.address2.$dirty && Form.address2.$invalid">Current Address is required</span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.aadharNumber.$dirty && Form.aadharNumber.$invalid, 'has-success':Form.aadharNumber.$valid}">
|
||||
<label>
|
||||
Aadhar Number <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" name="aadharNumber" tabindex="12" placeholder="____-____-____" ui-mask="9999-9999-9999" class="form-control"
|
||||
ng-model="myModel.aadharNumber" ng-minlength="10" ng-maxlength="15" ng-pattern="/^[0-9]*$/"
|
||||
required>
|
||||
<span class="error text-small block" ng-if="Form.aadharNumber.$dirty && Form.aadharNumber.$invalid" ng-hide="Form.aadharNumber.$error.maxlength || Form.aadharNumber.$error.minlength || Form.aadharNumber.$error.pattern">Aadhar Number is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.aadharNumber.$error.maxlength || Form.aadharNumber.$error.minlength || Form.aadharNumber.$error.pattern">Enter a Valid Aadhar Number</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4 form-group">
|
||||
<div class="row">
|
||||
<div class="col-md-6 form-group" ng-class="{'has-error':Form.otherId.$dirty && Form.otherId.$invalid}">
|
||||
<label>
|
||||
Other ID
|
||||
</label>
|
||||
<input type="text" name="otherId" tabindex="13" placeholder="Other Id" class="form-control" ng-model="myModel.otherId" ng-minlength="1"
|
||||
ng-maxlength="20" ng-pattern="/^[a-zA-Z0-9 ._-]+$/">
|
||||
<span class="error text-small block" ng-if="Form.otherId.$dirty && Form.otherId.$invalid" ng-hide="Form.otherId.$error.maxlength || Form.otherId.$error.minlength || Form.otherId.$error.pattern">Aadhar Number is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.otherId.$error.maxlength || Form.otherId.$error.minlength || Form.otherId.$error.pattern">Enter a Valid Details</span>
|
||||
</div>
|
||||
<div class="col-md-6 form-group" ng-class="{'has-error':Form.otherIdDetails.$dirty && Form.otherIdDetails.$invalid}">
|
||||
<label>
|
||||
Other ID Details
|
||||
</label>
|
||||
<input type="text" name="otherIdDetails" tabindex="14" placeholder="Other Id Details" class="form-control" ng-model="myModel.otherIdDetails"
|
||||
ng-minlength="1" ng-maxlength="20" ng-pattern="/^[a-zA-Z0-9 ._-]+$/">
|
||||
<span class="error text-small block" ng-if="Form.otherIdDetails.$dirty && Form.otherIdDetails.$invalid" ng-hide="Form.otherIdDetails.$error.maxlength || Form.otherIdDetails.$error.minlength || Form.otherIdDetails.$error.pattern">Aadhar Number is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.otherIdDetails.$error.maxlength || Form.otherIdDetails.$error.minlength || Form.otherIdDetails.$error.pattern">Enter a Valid Details</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.caste.$dirty && Form.caste.$invalid}">
|
||||
<label>
|
||||
Caste
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Caste" tabindex="15" class="form-control" name="caste" ng-model="myModel.caste" ng-pattern="/^[a-zA-Z.\s]*$/"
|
||||
/>
|
||||
<span class="error text-small block" ng-if="Form.caste.$dirty && Form.caste.$error.pattern">Invalid Caste Name </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.category.$dirty && Form.category.$invalid}">
|
||||
<label>
|
||||
Category
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Category" tabindex="16" class="form-control" name="category" ng-model="myModel.category"
|
||||
/>
|
||||
<span class="error text-small block" ng-if="Form.category.$dirty && Form.category.$error.pattern">Invalid Category Name </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.religion.$dirty && Form.religion.$invalid}">
|
||||
<label>
|
||||
Religion
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Religion" tabindex="17" class="form-control" name="religion" ng-model="myModel.religion"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" />
|
||||
<span class="error text-small block" ng-if="Form.religion.$dirty && Form.religion.$error.pattern">Invalid Religion Name </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.nationality.$dirty && Form.nationality.$invalid}">
|
||||
<label>
|
||||
Nationality
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Nationality" tabindex="18" class="form-control" name="nationality" ng-model="myModel.nationality"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" />
|
||||
<span class="error text-small block" ng-if="Form.nationality.$dirty && Form.nationality.$error.pattern">Invalid Nationality Name </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.qualificaion.$dirty && Form.qualificaion.$invalid}">
|
||||
<label>
|
||||
Pre Qualification
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Qualification" tabindex="19" class="form-control" name="qualificaion" ng-model="myModel.prequalification"
|
||||
/>
|
||||
<span class="error text-small block" ng-if="Form.qualificaion.$dirty && Form.qualificaion.$error.pattern">Enter a Valid Qualification</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.occupation.$dirty && Form.occupation.$invalid}">
|
||||
<label>
|
||||
Occupation
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Occupation" tabindex="20" class="form-control" name="occupation" ng-model="myModel.occupation"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" />
|
||||
<span class="error text-small block" ng-if="Form.occupation.$dirty && Form.occupation.$error.pattern">Invalid Occupation </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.designation.$dirty && Form.designation.$invalid}">
|
||||
<label>
|
||||
Designation
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Designation" tabindex="21" class="form-control" name="designation" ng-model="myModel.designation"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" />
|
||||
<span class="error text-small block" ng-if="Form.designation.$dirty && Form.designation.$error.pattern">Invalid Designation </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.companyname.$dirty && Form.companyname.$invalid}">
|
||||
<label>
|
||||
Company Name
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Company Name" tabindex="22" class="form-control" name="companyname" ng-model="myModel.companyname"
|
||||
/>
|
||||
<span class="error text-small block" ng-if="Form.companyname.$dirty && Form.companyname.$error.pattern">Invalid Company </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.referredby.$dirty && Form.referredby.$invalid}">
|
||||
<label>
|
||||
Referred By
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Refer's Name" tabindex="23" class="form-control" name="referredby" ng-model="myModel.referredby"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" />
|
||||
<span class="error text-small block" ng-if="Form.referredby.$dirty && Form.referredby.$error.pattern">Invalid Referred By </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.referredmobilenumber.$dirty && Form.referredmobilenumber.$invalid}">
|
||||
<label>
|
||||
Refer's Mobile Number
|
||||
</label>
|
||||
<input type="text" name="referredmobilenumber" tabindex="24" placeholder="Enter Refer's Mobile Number" class="form-control"
|
||||
ng-model="myModel.referredmobilenumber" ng-minlength="10" ng-maxlength="12" ng-pattern="/^[0-9]*$/"
|
||||
/>
|
||||
<span class="error text-small block" ng-if="Form.referredmobilenumber.$dirty && Form.referredmobilenumber.$invalid" ng-hide="Form.referredmobilenumber.$error.maxlength || Form.referredmobilenumber.$error.minlength || Form.referredmobilenumber.$error.pattern">Refer's Mobile Number is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.referredmobilenumber.$error.maxlength || Form.referredmobilenumber.$error.minlength || Form.referredmobilenumber.$error.pattern">Enter a Valid Phone Number</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<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>
|
||||
<!--<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
|
||||
<button type="reset" tabindex="31" class="btn btn-warning btn-wide" tabindex="9" ng-click="employeeForm.reset(Form)">
|
||||
Reset
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>
|
||||
Course Details
|
||||
</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="myModelCourse.university"
|
||||
ng-change="onSlecetUniv()" 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="myModelCourse.course" class="cs-select cs-skin-elastic"
|
||||
required>
|
||||
<option value="" disabled selected>Select Course</option>
|
||||
<option ng-repeat="item in courseData" 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="myModelCourse.batch" class="cs-select cs-skin-elastic"
|
||||
required>
|
||||
<option value="" disabled selected>Select Batch</option>
|
||||
<option ng-repeat="item in batchData" 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.enrollmentid.$dirty && Form.enrollmentid.$invalid}">
|
||||
<label>
|
||||
Enrollment ID
|
||||
</label>
|
||||
<input type="text" name="enrollmentid" tabindex="27" placeholder="Enter Entollment ID" class="form-control"
|
||||
ng-model="myModelCourse.enrollmentid"
|
||||
/>
|
||||
<span class="error text-small block" ng-if="Form.enrollmentid.$dirty && Form.enrollmentid.$error.required">Enrollment ID required</span>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.dateofjoining.$dirty && Form.dateofjoining.$invalid, 'has-success':Form.dateofjoining.$valid}">
|
||||
<label>
|
||||
Date of Joining <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" tabindex="28" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="myModelCourse.dateofjoining"
|
||||
is-open="startOpen" ng-init="startOpen = false" name="dateofjoining" datepicker-options="dateOptions"
|
||||
placeholder="Select Date of Joining" close-text="Close" required="required" />
|
||||
<span class="error text-small block" ng-if="Form.dateofjoining.$dirty && Form.dateofjoining.$error.required">Date of Joining required</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<button type="submit" tabindex="30" ladda="ldloading1.zoom_in" class="btn btn-wide btn-success" data-style="zoom-in">
|
||||
Submit
|
||||
</button>
|
||||
<button type="reset" tabindex="31" class="btn btn-warning btn-wide" tabindex="9" ng-click="employeeForm.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