Merge remote-tracking branch 'origin/master'

This commit is contained in:
gandhimathi 2017-11-30 09:44:58 +05:30
commit 29d1899d8c
17 changed files with 1300 additions and 141 deletions

View File

@ -103,6 +103,7 @@ 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');
defined('ANNOUNCEMENT') OR define('ANNOUNCEMENT','T_AnnouncementDetails');
//end of database table name

View File

@ -108,12 +108,21 @@ $route['chkUpdateStuExistDetail'] = 'Student_Controller/chkUpdateStuExistDetail'
$route['getStudentCourseList'] = 'Student_Controller/getStudentCourseList';
$route['getStudentCourseDetails'] = 'Student_Controller/getStudentCourseDetails';
$route['updateStudentCourseDetail'] = 'Student_Controller/updateStudentCourseDetail';
$route['insertStudentCourse'] = 'Student_Controller/insertStudentCourse';
//batch
$route['addBatchDetails'] = 'Batch_Controller/addBatchDetails';
$route['updateBatchDetails'] = 'Batch_Controller/updateBatchDetails';
$route['getBatchDetails'] = 'Batch_Controller/getBatchDetails';
/*Announcement*/
$route['addAnnouncementDetails'] = 'Announcement_Controller/addAnnouncementDetails';
$route['getAnnouncementDetails'] = 'Announcement_Controller/getAnnouncementDetails';
$route['updateAnnouncementDetails'] = 'Announcement_Controller/updateAnnouncementDetails';
// dash board
$route['getDashboardCallTrack'] = 'Call_Tracking_Controller/getDashboardCallTrack';

View File

@ -0,0 +1,135 @@
<?php
/**
* Created by Visual studio code.
* User: Surendiran
* Date: 11/27/17
* Time: 10:40 am
*/
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 Announcement_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['addAnnouncementDetails_get']['limit'] = 500; // 500 requests per hour per user/key
$this->methods['addAnnouncementDetails_post']['limit'] = 100; // 100 requests per hour per user/key
$this->methods['addAnnouncementDetails_delete']['limit'] = 50; // 50 requests per hour per user/key
$this->methods['getAnnouncementDetails_post']['limit'] = 500; // 50 requests per hour per user/key
$this->methods['updateAnnouncementDetails_post']['limit'] = 500;
// load the model
$this->load->model('Announcement_model', 'announcement_model');
}
/*
* This method used to add Announcement Details
* created by Surendiran
* */
public function addAnnouncementDetails_post()
{
$details['Heading'] = $this->post('Heading');
$details['Description'] = $this->post('description');
$details['CreatedBy'] = $this->post('createdBy');
$details['IsActive'] = $this->post('status');
$announcementDetails = $this->announcement_model->addAnnouncement($details);// Check if the users data store contains users (in case the database result returns NULL)
if ($announcementDetails)
{
$announcementDetails['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($announcementDetails, 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 Announcement Details
* created by Surendiran
* */
public function getAnnouncementDetails_post()
{
$requestedBy = $this->post('requestedBy');
$getAnnouncement = $this->announcement_model->getAnnouncement();
if ($getAnnouncement)
{
$getAnnouncement['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($getAnnouncement, 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 Announcement Details
* created by Surendiran
* */
public function updateAnnouncementDetails_post()
{
$updateID = $this->post('updateID');
// $details['ID'] = $this->post('ID');
$details['Heading'] = $this->post('Heading');
$details['Description'] = $this->post('description');
$details['IsActive'] = $this->post('status');
$details['UpdatedBy'] = $this->post('updatedBy');
$details['UpdatedOn'] = date("Y-m-d", time());
$announcementDetails = $this->announcement_model->updateAnnouncement($details,$updateID);// Check if the users data store contains users (in case the database result returns NULL)
if ($announcementDetails)
{
$announcementDetails['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($announcementDetails, 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
}
}
}

View File

@ -134,6 +134,7 @@ class Student_Controller extends REST_Controller {
$req['DOJ'] = $data['DOJ'];
$req['IsActive'] = $data['IsActive'];
$req['BranchID'] = $data['BranchID'];
$req['EnrollmentID'] = $data['EnrollmentID'];
$req['UpdatedBy'] = $updatedBy;
$date = date('Y-m-d H:i:s');
$req['UpdatedOn'] = $date;
@ -249,6 +250,45 @@ class Student_Controller extends REST_Controller {
}
}
// add new course for student
public function insertStudentCourse_post(){
$addStudent = $this->post('addStudent');
$coursedata = $this->post('coursedata');
$createdBy = $this->post('createdBy');
$createdBranch = $this->post('loginBranch');
$reqCourse['StudentID'] = $addStudent;
$reqCourse['UniversityID'] = $coursedata['university'];
$reqCourse['CourseID'] = $coursedata['course'];
$reqCourse['BatchCode'] = $coursedata['batch'];
$reqCourse['DOJ'] = $coursedata['dateofjoining'];
$reqCourse['EnrollmentID'] = $coursedata['enrollmentid'];
$reqCourse['BranchID'] = $createdBranch;
$reqCourse['IsActive'] = '1';
$reqCourse['CreatedBy'] = $createdBy;
$date = date('Y-m-d H:i:s');
$reqCourse['CreatedOn'] = $date;
// print_r($reqCourse);exit();
$studentAddCourse = $this->student_model->add_student_course( $addStudent , $reqCourse);// Check if the employee exist
if ($studentAddCourse)
{
$studentAddCourse['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($studentAddCourse, 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');
@ -291,22 +331,20 @@ class Student_Controller extends REST_Controller {
$reqCourse['CourseID'] = $coursedata['course'];
$reqCourse['BatchCode'] = $coursedata['batch'];
$reqCourse['DOJ'] = $coursedata['dateofjoining'];
$reqCourse['BranchID'] = $createdBranch;
$reqCourse['BranchID'] = $createdBranch;
$reqCourse['IsActive'] = $data['switchsetting'];
$reqCourse['EnrollmentID'] = $coursedata['enrollmentid'];
$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)
{
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
{
} else {
// Set the response and exit
$this->response([
'message' => 'No users were found',

View File

@ -0,0 +1,103 @@
<?php
/**
* Created by Visual studio code.
* User: Surendiran
* Date: 11/27/17
* Time: 3:40 pm
*/
defined('BASEPATH') OR exit('No direct script access allowed');
class Announcement_model extends CI_Model {
/*
* add announcement details
* params:heading,description,active
* created by Surendiran
* */
public function addAnnouncement($arrayDetails=null)
{
$this->db->select('Heading');
$this->db->where('Heading', $arrayDetails['Heading']);
if($this->db->get(ANNOUNCEMENT)->first_row()){
$result['AnnouncementStatus'] = false;
$result['message'] = "This Announcement is already exist!";
} else {
$this->db->select('Description');
$this->db->where('Description', $arrayDetails['Description']);
if($this->db->get(ANNOUNCEMENT)->first_row()){
$result['AnnouncementStatus'] = false;
$result['message'] = "This Announcement name is already exist!";
} else{
$this->db->insert(ANNOUNCEMENT, $arrayDetails);
if($this->db->affected_rows() == '1'){
$result['AnnouncementStatus'] = true;
$result['message'] = "Successfully Announcement details added";
}
else {
$result['AnnouncementStatus'] = false;
$result['message'] = "Something went wrong.please try again";
}
}
}
return $result;
}
public function getAnnouncement()
{
$this->db->select('Heading,description,CreatedOn,IsActive,ID');
$this->db->order_by('CreatedOn','DESC');
$announcementDetails = $this->db->get(ANNOUNCEMENT);
if($announcementDetails->result()){
$result['AnnouncementStatus'] = true;
$result['details'] = $announcementDetails->result();
}
else {
$result['AnnouncementStatus'] = false;
$result['message'] = "No records found!";
}
return $result;
}
/*
* update announcement details
* created by Surendiran
* */
public function updateAnnouncement($arrayDetails=null,$updateID=null)
{
$this->db->where('ID',$updateID);
$updateStatus=$this->db->update(ANNOUNCEMENT, $arrayDetails);
if($updateStatus){
$result['AnnouncementStatus'] = true;
$result['message'] = "Successfully Announcement details updated";
}
else {
$result['AnnouncementStatus'] = false;
$result['message'] = "Something went wrong.please try again";
}
return $result;
}
}

View File

@ -209,6 +209,29 @@ class Student_model extends CI_Model
return $result;
}
// add student course
public function add_student_course( $studID, $Arr) {
$this->db->select('*');
$this->db->from(STUDENTCOURSE);
$this->db->where('StudentID', $studID);
$this->db->where('CourseID', $Arr['CourseID']);
if($this->db->get()->first_row()) {
$result['addStuCourseStatus'] = false;
$result['message'] = "This Student Already exist for this course";
} else {
$this->db->insert(STUDENTCOURSE, $Arr);
if ($this->db->affected_rows() == '1') {
$result['addStuCourseStatus'] = true;
$result['message'] = "Successfully Student Course Details Updated";
} else {
$result['addStuCourseStatus'] = false;
$result['message'] = "Something went wrong.please try again";
}
}
return $result;
}
// add student
public function add_student($Arr, $courseArr)
{

View File

@ -64,7 +64,8 @@
"UNIVERSITY": "UNIVERSITY DETAILS",
"COURSE": "COURSE DETAILS",
"ACTIVITY": "ACTIVITY DETAILS",
"EMPLOYEE": "EMPLOYEE DETAILS"
"EMPLOYEE": "EMPLOYEE DETAILS",
"ANNOUNCEMENT": "ANNOUNCEMENT DETAILS"
},
"student": {
"MAIN": "STUDENTS DETAILS",

View File

@ -99,7 +99,10 @@ app.constant('JS_REQUIRES', {
* batch
* */
'batchCtrl': 'assets/js/controllers/batchCtrl.js',
/* *
announcementCtrl
* */
'announcementCtrl': 'assets/js/controllers/announcementCtrl.js',
/*
* call track

View File

@ -141,6 +141,14 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com
label: 'Activity'
},
// resolve: loadSequence('iconsCtrl')
}).state('app.master.announcement', {
url: '/announcement',
templateUrl: "assets/views/announcement/Announcement.html",
resolve: loadSequence('ckeditor-plugin', 'ckeditor', 'announcementCtrl','ladda', 'angular-ladda','ngTable'),
title: 'Announcement',
ncyBreadcrumb: {
label: 'Announcement'
},
}).state('app.student', {
url: '/student',
template: '<div ui-view class="fade-in-up"> <div style="margin: auto; width: 50%;padding: 10px;"> STUDENT DETAILS </div> </div>',

View File

@ -0,0 +1,230 @@
'use strict';
/**
* controller for angular-ckeditor
*/
app.controller("CkeditorCtrl", ["$scope", "toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state", function ($scope, toaster, ngTableParams, $filter, apiPoint, $localStorage, $http, $state) {
$scope.myModel = {
"Heading": "",
"description": "",
"switchsetting": true
};
/*
* edit announcement details
* created by Surendiran
* */
$scope.editId = -1;
$scope.setEditId = function (pid) {
$scope.editId = pid;
$scope.viewId = -1;
};
/*
* cancel edit div
* created by Surendiran
* */
$scope.cancel = function () {
$scope.init();
$scope.editId = -1;
};
// Editor options.
$scope.options = {
language: 'en',
allowedContent: true,
entities: false
};
// Called when the editor is completely ready.
$scope.onReady = function () {
// ...
// alert();
$scope.myModel.description
console.log($scope.myModel.description);
};
// $scope.submitForm = function() {
// alert(JSON.stringify($scope.myModel.description));
// }
$scope.announcementForm = {
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 addAnnouncement = {
method: 'POST',
url: apiPoint.url + 'addAnnouncementDetails/',
headers: {
'Content-Type': 'application/json'
},
data: {
Heading: myModel.Heading,
description: myModel.description,
status: myModel.switchsetting,
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID
}
};
$http(addAnnouncement).then(function (response) {
if (response.data.status == 200 && response.data.AnnouncementStatus) {
$scope.ldloading1[loading.replace('-', '_')] = false;
swal("Success!", response.data.message, "success");
$state.go($state.current, {}, { reload: true });
} else {
$scope.ldloading1[loading.replace('-', '_')] = false;
swal("Failed!", response.data.message, "error");
}
});
}
},
reset: function (form) {
$scope.myModel = angular.copy($scope.master);
form.$setPristine(true);
$scope.myModel = {
"Heading": "",
"description": "",
"switchsetting": true
};
}
};
/*
* update the announcement details
* created by Surendiran
* */
$scope.updateAnnouncement = 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 + 'updateAnnouncementDetails/',
headers: {
'Content-Type': 'application/json'
},
data: {
Heading: myModel.Heading,
description: myModel.description,
status: myModel.IsActive,
updateID: myModel.ID,
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID
}
};
$http(update).then(function (response) {
if (response.data.status == 200 && response.data.AnnouncementStatus) {
$scope.ldloading[loading.replace('-', '_')] = false;
swal("Success!", response.data.message, "success");
$scope.editId = -1;
$scope.init();
} else {
$scope.ldloading[loading.replace('-', '_')] = false;
swal("Failed!", response.data.message, "error");
}
});
}
};
/*
*get announcementForm details when page loading called from view file
*
* created by Surendiran
* */
$scope.loader = '';
$scope.announcementInfo = '';
$scope.emptyData = '';
$scope.init = function () {
var getAnnouncement = {
method: 'POST',
url: apiPoint.url + 'getAnnouncementDetails/',
headers: {
'Content-Type': 'application/json'
},
data: {
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
}
};
$http(getAnnouncement).then(function (response) {
if (response.data.status == 200 && response.data.AnnouncementStatus) {
$scope.emptyData = true;
$scope.loader = true;
$scope.data = response.data.details;
} else {
$scope.emptyData = false;
$scope.loader = true;
$scope.announcementInfo = '';
}
});
};
}]);

View File

@ -19,7 +19,7 @@ app.controller('sessionCtrl', ["$scope", "$localStorage", "$state", 'ipCookie',
if (localDetail.localType == 'R004') {
$scope.getLoginDash = 'superAdmin';
} else if (localDetail.localType == 'R003') {
$scope.getLoginDash = 'superAdmin';
$scope.getLoginDash = 'Admin';
} else if (localDetail.localType == 'R002') {
$scope.getLoginDash = 'staff';
}

View File

@ -45,6 +45,16 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
'enrollmentid': ''
};
$scope.addStudentView = function () {
$scope.myModelCourse = {
'university': '',
'course': '',
'batch': '',
'dateofjoining': '',
'enrollmentid': ''
};
}
// 2017-11-23T00:00:00+0530
@ -64,7 +74,6 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
$scope.currentDate = new Date();
$scope.getStudentList();
$scope.getUniversityList();
// $scope.currentPage = 1;
} else {
}
@ -103,9 +112,9 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
}
$scope.setEditCourseId = function (id) {
$scope.list = false;
$scope.getStudentCourseList(id);
$scope.currentStudentId = id;
// $scope.getStudentCourseDetails(id);
$scope.editCourseId = id;
$scope.editId = -1;
@ -118,9 +127,83 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
$scope.editCourseId = -1;
}
$scope.getStudentCourseList = function(studentId) {
$scope.cancelCourseDetails = function () {
$scope.getStudentCourseList($scope.currentStudentId);
// $scope.editId = -1;
// $scope.editCourseId = -1;
}
$scope.addStudentCourse = function () {
$scope.myModelCourse = {
'university': '',
'course': '',
'batch': '',
'dateofjoining': '',
'enrollmentid': ''
};
$scope.list = false;
$scope.courseEdit = false;
$scope.courseAdd = true;
}
// add student course
$scope.addCourseFORM = {
submit: function (form, myModelCourse, p) {
// alert();
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(JSON.stringify(p.StudentID));
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 + 'insertStudentCourse/',
headers: {
'Content-Type': 'application/json'
},
data: {
addStudent: p.StudentID,
coursedata: $scope.myModelCourse,
loginBranch: localDetails.localBranchID,
createdBy: localDetails.localUserID,
}
};
$http(req).then(function (response) {
if (response.data.addStuCourseStatus == true) {
swal("Success!", response.data.message, "success");
$scope.getStudentCourseList($scope.currentStudentId);
} else {
swal("Failed!", response.data.message, "error");
$scope.getStudentCourseList($scope.currentStudentId);
}
});
}
}
}
// get Student Course List
$scope.getStudentCourseList = function (studentId) {
$scope.courseEditLoading = true;
$scope.list = true;
$scope.courseEdit = false;
$scope.courseAdd = false;
var req = {
method: 'POST',
url: apiPoint.url + 'getStudentCourseList/',
@ -141,9 +224,12 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
});
}
// get student particular course details : params : studentCourseID
$scope.getStudentCourseDetails = function (studentcourseID) {
$scope.courseEditLoading = true;
$scope.stucour = '';
$scope.list = false;
$scope.courseAdd = false;
$scope.courseEdit = true;
var req = {
method: 'POST',
@ -159,15 +245,62 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
if (response.data.stuCourseDetails) {
$scope.courseEditLoading = false;
$scope.studentCourse = response.data.course_details;
$scope.stucour = $scope.studentCourse[0];
$scope.stucour = $scope.studentCourse[0];
} else {
}
});
}
// update sutdent course details
$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(datas.DOJ);
var formate = "dd-MM-yyyy";
var checkDOJ = $filter('date')(new Date(datas.DOJ), formate);
datas.IsActive = datas.IsActive === true ? 1 : 0;
datas.DOJ = checkDOJ == "NaN-NaN-0NaN" ? datas.DOJ : $filter('date')(new Date(datas.DOJ), formate);
alert(datas.DOJ);
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.updateStuCourseStatus) {
swal("Success!", response.data.message, "success");
$scope.getStudentCourseList($scope.currentStudentId);
// $scope.editCourseId = false;
} else {
// $scope.ldloading1[loading.replace('-', '_')] = false;
swal("Failed!", response.data.message, "error");
$scope.getStudentCourseList($scope.currentStudentId);
}
});
}
}
$scope.universityData = '';
$scope.getUniversityList = function () {
var empListreq = {
method: 'POST',
@ -187,11 +320,17 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
});
}
$scope.onSlecetUnivEdit = function(id) {
$scope.onSlecetUnivEdit = function (id) {
$scope.myModelCourse.university = id;
$scope.onSlecetUniv();
}
$scope.onChangeSlecetUnivEdit = function (id) {
$scope.myModelCourse.university = id;
$scope.onSlecetUniv();
$scope.stucour.CourseID = '';
$scope.stucour.BatchCode = '';
}
$scope.courseLoading = false;
$scope.onSlecetUniv = function () {
$scope.courseData = '';
@ -283,6 +422,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
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.disableButton = true;
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);
@ -303,8 +443,10 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
$http(req).then(function (response) {
if (response.data.addStudentStatus == true) {
swal("Success!", response.data.message, "success");
$scope.disableButton = false;
$state.go($state.current, {}, { reload: true });
} else {
$scope.disableButton = false;
swal("Failed!", response.data.message, "error");
}
});
@ -349,7 +491,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
}
// update check mobile exist
// update check mobile exist
$scope.updateCheckMobileExist = function (p) {
var checkReq = {
method: 'POST',
@ -394,11 +536,11 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
}
});
}
// update student details
$scope.updateStuDetails = function (form, p) {
var firstError = null;
if (form.$invalid) {
if (form.$invalid) {
var field = null, firstError = null;
for (field in form) {
if (field[0] != '$') {
@ -412,7 +554,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
}
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 {
} else {
// alert(p.DOB);
var formate = "dd-MM-yyyy";
var checkDOB = $filter('date')(new Date(p.DOB), formate);
@ -442,49 +584,6 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
}
}
$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 {
var formate = "dd-MM-yyyy";
var checkDOJ = $filter('date')(new Date(datas.DOJ), formate);
datas.IsActive = datas.IsActive === true ? 1 : 0;
datas.DOJ = checkDOJ == "NaN-NaN-0NaN" ? datas.DOJ : $filter('date')(new Date(datas.DOJ), 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.updateStuCourseStatus = true) {
swal("Success!", response.data.message, "success");
$scope.getStudentList();
$scope.editCourseId = -1;
} else {
// $scope.ldloading1[loading.replace('-', '_')] = false;
swal("Failed!", response.data.message, "error");
}
});
}
}
}]);

View File

@ -0,0 +1,184 @@
<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 Announcement Details">{{ mainTitle }}</h1>
</div>
<div ncy-breadcrumb></div>
</div>
</section>
<!-- end: PAGE TITLE -->
<!-- start: TEXT EDITOR -->
<div class="container-fluid container-fullw bg-white">
<div ng-controller="CkeditorCtrl" data-ng-init="init()">
<tabset class="tabbable">
<tab heading="View Announcement">
<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('Heading')">Heading
<span class="glyphicon sort-icon" ng-show="sortKey=='Heading'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<!--<th ng-click="sort('description')">Description
<span class="glyphicon sort-icon" ng-show="sortKey=='description'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th> -->
<th ng-click="sort('Active/De-Active')">Status
<span class="glyphicon sort-icon" ng-show="sortKey=='Active/De-Active'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th></th>
</tr>
</thead>
<tbody dir-paginate="p in data|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10">
<tr>
<td>{{p.Heading}}</td>
<!--<td>{{p.description}}</td>-->
<td><span ng-if="p.IsActive == 1"> Active </span><span ng-if="p.IsActive == 0">InActive</span></td>
<td>
<a href="#" class="text-azure" id="editRowBtn{{p.ID}}" ng-click="setEditId(p.ID);"><b class="fa fa-hover fa-pencil " aria-hidden="true"></b>
</a></td>
</tr>
<tr ng-show="editId === p.ID" ng-if="editId === p.ID" >
<td colspan="12" ng-include
src="'assets/views/announcement/editAnnouncementDetails.html'"></td>
</tr>
</tbody>
</table>
</fieldset>
<dir-pagination-controls max-size="10" direction-links="true" boundary-links="true">
</dir-pagination-controls>
</div>
</div>
</div>
</div>
</tab>
<tab heading="Add Announcement">
<form name="Form" id="form" novalidate ng-submit="announcementForm.submit(Form, myModel, 'zoom-in')" method="post">
<fieldset>
<legend>
Add New Announcement Details
</legend>
<div class="col-md-12 form-group">
<div class="col-md-2">
<label>
Heading <span class="symbol required"></span>
</label>
</div>
<div class="col-md-10" ng-class="{'has-error':Form.Heading.$dirty && Form.Heading.$invalid, 'has-success':Form.Heading.$valid}">
<input type="text" placeholder="Enter Heading Name"
tabindex="2" class="form-control" name="Heading"
ng-model="myModel.Heading" required/>
<span class="error text-small block"
ng-if="Form.Heading.$dirty && Form.Heading.$error.required">Heading is required</span>
</div>
</div>
<div class="col-md-12 form-group">
<div class="col-md-2">
<label>
Description <span class="symbol required"></span>
</label>
</div>
<div class="col-md-10">
<!-- /// controller: 'CkeditorCtrl' - localtion: assets/js/controllers/ckeditorCtrl.js /// -->
<div ckeditor="options" class="form-control" ng-change="onReady()" ng-model="myModel.description"></div>
</div>
</div>
<!--<pre> {{ myModel.description }}</pre>-->
<div class="col-md-12 form-group">
<div class="col-md-2">
<label>
Active/De-Active <span class="symbol required">
</label>
</div>
<div class="col-md-2">
<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 form-group">
<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="announcementForm.reset(Form)">
Reset
</button>
</div>
</div>
</fieldset>
</form>
</tab>
</tabset>
</div>
</div>
<!-- end: TEXT EDITOR -->

View File

@ -0,0 +1,99 @@
<form name="Form" id="form" novalidate>
<div class="row">
<div class="col-md-12">
<fieldset>
<legend>
Update Announcement Details
</legend>
<div class="row">
<form name="Form" id="form" novalidate ng-submit="announcementForm.submit(Form, myModel, 'zoom-in')" method="post">
<div class="col-md-12 form-group">
<div class="col-md-2">
<label>
Heading <span class="symbol required"></span>
</label>
</div>
<div class="col-md-10" ng-class="{'has-error':Form.Heading.$dirty && Form.Heading.$invalid, 'has-success':Form.Heading.$valid}">
<input type="text" placeholder="Enter Heading Name"
tabindex="1" class="form-control" name="Heading"
ng-model="p.Heading" required/>
<span class="error text-small block"
ng-if="Form.Heading.$dirty && Form.Heading.$error.required">Heading is required</span>
</div>
</div>
<div class="col-md-12 form-group">
<div class="col-md-2">
<label>
Description <span class="symbol required"></span>
</label>
</div>
<div class="col-md-10">
<!-- /// controller: 'CkeditorCtrl' - localtion: assets/js/controllers/ckeditorCtrl.js /// -->
<div ckeditor="options" class="form-control" ng-change="onReady()" ng-model="p.description"></div>
<!--<div class="well margin-top-20">
{{description}}
</div>-->
</div>
</div>
<!--<pre> {{ myModel.description }}</pre>-->
<div class="col-md-12 form-group">
<div class="col-md-2">
<label>
Active/De-Active
</label>
</div>
<div class="col-md-2">
<div class="col-md-4">
<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>
<div class="col-md-12 form-group">
<div class="pull-right">
<button type="submit" ladda="ldloading.zoom_in" tabindex="9" class="btn btn-wide btn-success" data-style="zoom-in" ng-click="updateAnnouncement(p,Form,'zoom-in')">
Save
</button>
<!-- <button type="submit" class="btn btn-success btn-o" tabindex="8">
Submit
</button>-->
<input type="button" class="btn btn-warning btn-wide" tabindex="10" value="Cancel"
ng-click="cancel();">
</div>
</div>
</form>
</div>
</fieldset>
<!-- class="editRowTd" -->

View File

@ -59,6 +59,114 @@
<span class="title" translate="sidebar.nav.master.EMPLOYEE"> EMPLOYEE DETAILS </span>
</a>
</li>
<li ui-sref-active="active" >
<a ui-sref="app.master.announcement">
<span class="title" translate="sidebar.nav.master.ANNOUNCEMENT"> Announcement DETAILS </span>
</a>
</li>
</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">
<div class="item-media">
<i class="ti-layers-alt"></i>
</div>
<div class="item-inner">
<span class="title" translate="sidebar.nav.tracking.MAIN">CALL TRACKING </span>
</div>
</div>
</a>
</li>
</ul>
<!-- end: Super Admin -->
<!-- start: Admin -->
<ul class="main-navigation-menu" ng-if="getLoginDash == 'Admin'">
<li ui-sref-active="active">
<a ui-sref="app.dashboard">
<div class="item-content">
<div class="item-media">
<i class="ti-home"></i>
</div>
<div class="item-inner">
<span class="title" translate="sidebar.nav.dashboard.MAIN"> Dashboard </span>
</div>
</div>
</a>
</li>
<li ng-class="{'active open':$state.includes('app.master')}">
<a href="javascript:void(0)">
<div class="item-content">
<div class="item-media">
<i class="ti-settings"></i>
</div>
<div class="item-inner">
<span class="title" translate="sidebar.nav.master.MAIN"> MASTER DETAILS </span><i class="icon-arrow"></i>
</div>
</div>
</a>
<ul class="sub-menu">
<li ui-sref-active="active">
<a ui-sref="app.master.university">
<span class="title" translate="sidebar.nav.master.UNIVERSITY"> UNIVERSITY DETAILS </span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="app.master.course">
<span class="title" translate="sidebar.nav.master.COURSE"> COURSE DETAILS </span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="app.master.activity">
<span class="title" translate="sidebar.nav.master.ACTIVITY"> ACTIVITY DETAILS </span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="app.master.batch">
<span class="title" translate="sidebar.nav.master.BATCH"> BATCH DETAILS </span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="app.master.branch">
<span class="title" translate="sidebar.nav.master.BRANCH"> BRANCH DETAILS </span>
</a>
</li>
<li ui-sref-active="active" >
<a ui-sref="app.master.employee">
<span class="title" translate="sidebar.nav.master.EMPLOYEE"> EMPLOYEE DETAILS </span>
</a>
</li>
<li ui-sref-active="active" >
<a ui-sref="app.master.announcement">
<span class="title" translate="sidebar.nav.master.ANNOUNCEMENT"> Announcement DETAILS </span>
</a>
</li>
</ul>
@ -97,6 +205,10 @@
</li>
</ul>
<!-- end: Admin -->
<!-- start: Staff -->
<ul class="main-navigation-menu" ng-if="getLoginDash == 'staff'">
<li ui-sref-active="active">
<a ui-sref="app.dashboard">
@ -110,35 +222,25 @@
</div>
</a>
</li>
<!--<li ng-class="{'active open':$state.includes('app.master')}">
<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-settings"></i>
<i class="ti-user"></i>
</div>
<div class="item-inner">
<span class="title" translate="sidebar.nav.master.MAIN"> MASTER DETAILS </span><i class="icon-arrow"></i>
<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.master.branch">
<span class="title" translate="sidebar.nav.master.BRANCH"> BRANCH DETAILS </span>
</a>
</li>
<li ui-sref-active="active" >
<a ui-sref="app.master.employee">
<span class="title" translate="sidebar.nav.master.EMPLOYEE"> EMPLOYEE DETAILS </span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="app.master.activity">
<span class="title" translate="sidebar.nav.master.ACTIVITY"> ACTIVITY DETAILS </span>
<a ui-sref="app.student.studentDetails">
<span class="title" translate="sidebar.nav.student.STUDENTDETAILS"> STUDENT DETAILS </span>
</a>
</li>
</ul>
</li>-->
</li>
<li ng-class="{'active open':$state.includes('app.tracking')}">
<a ui-sref="app.tracking">
<div class="item-content">
@ -153,6 +255,9 @@
</li>
</ul>
<!-- end: Staff -->
<!-- end: MAIN NAVIGATION MENU -->
<!-- start: CORE FEATURES -->

View File

@ -1,64 +1,67 @@
<form name="Form" id="form" novalidate>
<div class="row">
<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">
<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>
<!--list of course details : start-->
<div ng-if='list === true'>
<table class="table">
<thead>
<tr>
<th>University
</th>
<th>Course
</th>
<th>Batch
</th>
<th>Date of Join
</th>
</tr>
</thead>
<tbody ng-repeat="s in studentCourseList">
<tr>
<td>{{s.UniversityName}}</td>
<td>{{s.CourseName}}</td>
<td>{{s.BatchName}}</td>
<td>{{s.DOJ}}</td>
<td ng-click="getStudentCourseDetails(s.ID)">Edit</td>
</tr>
</tbody>
</table>
<div class="row">
<div class="col-md-12">
<div class="pull-right">
<button type="reset" class="btn btn-warning btn-wide" tabindex="9" ng-click="cancel()">
<fieldset ng-if="courseEditLoading == false">
<legend>
Course Details
</legend>
<!--list of course details : start-->
<div ng-if='list === true'>
<table class="table">
<thead>
<tr>
<th>University
</th>
<th>Course
</th>
<th>Batch
</th>
<th>Date of Joining
</th>
<th>
</th>
</tr>
</thead>
<tbody ng-repeat="s in studentCourseList">
<tr>
<td>{{s.UniversityName}}</td>
<td>{{s.CourseName}}</td>
<td>{{s.BatchName}}</td>
<td>{{s.DOJ}}</td>
<td ng-click="getStudentCourseDetails(s.ID)"><i class="fa fa-edit"></i></td>
</tr>
</tbody>
</table>
<div class="row">
<div class="col-md-12">
<div class="pull-right">
<button type="reset" class="btn btn-into btn-wide" tabindex="9" ng-click="addStudentCourse()">
Add Course
</button>
<button type="reset" class="btn btn-warning btn-wide" tabindex="9" ng-click="cancel()">
Cancel
</button>
</div>
</div>
</div>
</div>
<!--list of course details : end-->
<!--<pre> {{studentCourse | json }} </pre>-->
<!--Edit course details : Start-->
<div ng-if='courseEdit === true'>
</div>
<!--list of course details : end-->
<!--<pre> {{studentCourse | json }} </pre>-->
<!--Edit course details : Start-->
<div ng-if='courseEdit === true'>
<form name="Form" id="form" novalidate>
<div class="row">
<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>
class="cs-select cs-skin-elastic" ng-change="onChangeSlecetUnivEdit(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>
@ -114,6 +117,16 @@
<span class="error text-small block" ng-if="Form.dateofjoining.$dirty && Form.dateofjoining.$error.required">Date of Joining is required</span>
</div>
<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="stucour.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">
<label>
Active/De-Active
@ -134,18 +147,119 @@
<button type="button" ladda="ldloading1.zoom_in" class="btn btn-wide btn-success" data-style="zoom-in" ng-click="updateStudentCourseDetails(Form, stucour)">
Update
</button>
<button type="reset" class="btn btn-warning btn-wide" tabindex="9" ng-click="cancel()">
<button type="reset" class="btn btn-warning btn-wide" tabindex="9" ng-click="cancelCourseDetails()">
Cancel
</button>
</div>
</div>
</div>
</div>
</form>
</div>
<!--Edit course details : Start-->
</fieldset>
</div>
<!--Edit course details : Start-->
<div ng-if='courseAdd === true'>
<!--Add course details : Start -->
<form name="FormAdd" id="formAdd" novalidate ng-submit="addCourseFORM.submit(FormAdd, myModelCourse, p)" method="post">
<div class="row">
<div class="col-md-4 form-group" ng-class="{'has-error':FormAdd.university.$dirty && FormAdd.university.$invalid, 'has-success':FormAdd.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="FormAdd.university.$dirty && FormAdd.university.$error.required">University is Required</span>
</div>
<div class="col-md-4 form-group" ng-class="{'has-error':FormAdd.course.$dirty && FormAdd.course.$invalid, 'has-success':FormAdd.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="FormAdd.course.$dirty && FormAdd.course.$error.required">Course is required</span>
</div>
<div class="col-md-4 form-group" ng-class="{'has-error':FormAdd.batch.$dirty && FormAdd.batch.$invalid, 'has-success':FormAdd.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="FormAdd.batch.$dirty && FormAdd.batch.$error.required">Batch is required</span>
</div>
</div>
<div class="row">
<div class="col-md-4 form-group" ng-class="{'has-error':FormAdd.enrollmentid.$dirty && FormAdd.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="FormAdd.enrollmentid.$dirty && FormAdd.enrollmentid.$error.required">Enrollment ID required</span>
</div>
<div class="col-md-4 form-group" ng-class="{'has-error':FormAdd.dateofjoining.$dirty && FormAdd.dateofjoining.$invalid, 'has-success':FormAdd.dateofjoining.$valid}">
<label>
Date of Joining <span class="symbol required"></span>
</label>
<style>
.dropdown-menu {
position: relative;
/*top: -225px !important;*/
}
</style>
<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" datepicker-position="top"
/>
<span class="error text-small block" ng-if="FormAdd.dateofjoining.$dirty && FormAdd.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="cancelCourseDetails()">
Cancel
</button>
</div>
</div>
</div>
</form>
<!--Add course details : End -->
</div>
</fieldset>
</div>
</div>
</form>
</div>
<!-- class="editRowTd" -->

View File

@ -65,7 +65,7 @@
<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);">-->
<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">
@ -102,7 +102,7 @@
</style>
<tab heading="Add Student" id="addstudent">
<tab heading="Add Student" id="addstudent" ng-click="addStudentView()">
<div>
<form name="Form" id="form" novalidate ng-submit="studentFORM.submit(Form, myModel)" method="post">
<div class="row">
@ -468,21 +468,28 @@
/>
<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"
<style>
.dropdown-menu {
position: relative;
/*top: -225px !important;*/
}
</style>
<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" />
placeholder="Select Date of Joining" close-text="Close" required="required" datepicker-position="top"/>
<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">
<button type="submit" ng-disabled="disableButton" 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)">
@ -492,8 +499,8 @@
</div>
</div>
</fieldset>
<pre> {{ myModel | json }}</pre>
<pre> {{ myModelCourse | json }}</pre>
<!--<pre> {{ myModel | json }}</pre>
<pre> {{ myModelCourse | json }}</pre>-->
</div>
</div>
</form>