Merge remote-tracking branch 'origin/master'

This commit is contained in:
gandhimathi 2018-01-19 19:47:05 +05:30
commit e7494f9f98
23 changed files with 844 additions and 86 deletions

0
Apollo/.htaccess Normal file
View File

View File

@ -202,7 +202,12 @@ $route['updateDayBookMasterDetails'] = 'DayBookMaster_Controller/updateDayBookMa
$route['sendStudentNotification'] = 'Fees_Status_Controller/sendStudentNotification';
/*
* SMS send
* */
$route['getUniveCourseBratchBroadCast'] = 'Broadcast_Controller/getUniveCourseBatch';
$route['getStuListForBroadcast'] = 'Broadcast_Controller/getStuListForBrodcast';
$route['sendSMSStudentApi'] = 'Broadcast_Controller/sendSMSStudentApi';

View File

@ -0,0 +1,112 @@
<?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 Broadcast_Controller extends REST_Controller {
/*
* broadcast, sms send functionality
* params:
* created by kdk
* */
function __construct()
{
// Construct the parent class
parent::__construct();
$this->methods['getUniversity_post']['limit'] = 100;
$this->methods['chkUnivIdExistDetail_post']['limit'] = 100;
// load the broadcast model
$this->load->model('Broadcast_model', 'broadcast_model');
}
// get University, Course, Branch Detailss
public function getUniveCourseBatch_post() {
$reqData = $this->post('data');
$loginUserId = $reqData['localUserID'];
$loginUserBranchId = $reqData['localBranchID'];
$loginUserType = $reqData['localType'];
$getUniversityListDetails = $this->broadcast_model->get_university_course_batch();// Check if the employee exist
if ($getUniversityListDetails)
{
$getUniversityListDetails['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($getUniversityListDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
// Set the response and exit
$this->response([
'message' => 'No list were found',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
}
}
// ger Result fot searched keyword details
public function getStuListForBrodcast_post() {
$reqSearchData = $this->post('data');
$reqData = $this->post('requestDetails');
// print_r($reqSearchData);exit();
$getSearchDetails = $this->broadcast_model->get_search_result($reqSearchData, $reqData);// Check if the employee exist
if ($getSearchDetails)
{
$getSearchDetails['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($getSearchDetails, 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 sendSMSStudentApi_post() {
$reqData = $this->post('data');
$reqDetails = $this->post('requestDetails');
$msg = $this->post('msg');
$time = date('Y-m-d H:i:s');
$dateTime = $time;
$count = count($reqData);
for($i=0; $i < $count; $i++) {
$data[] = array(
'StudentID' => $reqData[$i]['StudentID']
);
}
$sendMsgDetails = $this->broadcast_model->send_msg_students($data, $msg);// Check if the employee exist
if ($sendMsgDetails)
{
$sendMsgDetails['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($sendMsgDetails, 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
}
}
}

View File

@ -0,0 +1,164 @@
<?php
/**
* Date: 11/9/17
* Time: 5:28 PM
*/
defined('BASEPATH') OR exit('No direct script access allowed');
class Broadcast_model extends CI_Model
{
/*
* status updation details
* params:
* created by kdk
* */
// get serach result
public function get_search_result($reqData, $req) {
// print_r($reqData['University']);
// print_r($req);
// exit();
$University = $reqData['University'];
$Course = $reqData['Course'];
$Batch = $reqData['Batch'];
$subQuery = "SELECT S.* , SC.CourseID , C.CourseName , U.UniversityName
FROM ".STUDENTS." as S LEFT JOIN ".STUDENTCOURSE." as SC ON SC.StudentID = S.StudentID
LEFT JOIN ".UNIVERSITY." as U ON SC.UniversityID = U.UniversityID LEFT JOIN ".COURSE." as C ON
SC.CourseID = C.CourseID
WHERE
SC.UniversityID LIKE '%$University%'
AND SC.CourseID LIKE '%$Course%'
AND SC.BatchCode LIKE '%$Batch%'
AND S.IsActive = '1'
AND SC.IsActive = '1'";
$queryDetails = $this->db->query($subQuery);
$results['searchResult'] = true;
$results['search_result_details'] = $queryDetails->result();
return $results;
}
// get list of universities, course, batch
public function get_university_course_batch() {
$this->db->select('t1.UniversityID, t1.UniversityName');
$this->db->order_by('CreatedOn', 'DESC');
$this->db->from(''.UNIVERSITY. ' as t1');
$this->db->where('IsActive', 1);
// $this->db->join('' . COURSE . ' as t2', 't2.UniversityID = t1.UniversityID', 'LEFT');
$univDetails = $this->db->get();
$universityDetails = $univDetails->result();
$endResult = [];
foreach($universityDetails as $clip){
// University Details
$resultArr['UniversityID'] = $clip->UniversityID;
$resultArr['UniversityName'] = $clip->UniversityName;
// Course Details
$this->db->select('t2.CourseID, t2.CourseName');
$this->db->from(''.COURSE. ' as t2');
$this->db->where('t2.UniversityID', $clip->UniversityID);
$this->db->where('t2.IsActive', 1);
$courDetails = $this->db->get();
$courseDetails = $courDetails->result();
$resultArr['Course'] =$courseDetails;
// Batch Details
$this->db->select('t3.BatchName, t3.BatchCode');
$this->db->from(''.BATCH. ' as t3');
$this->db->where('t3.UniversityID', $clip->UniversityID);
$this->db->where('t3.IsActive', 1);
$batDetails = $this->db->get();
$batchDetails = $batDetails->result();
$resultArr['Batch'] =$batchDetails;
array_push($endResult, $resultArr);
}
$results['univList'] = true;
$results['university_details'] = $endResult;
return $results;
}
public function send_msg_students($arr, $msg) {
$msg_body = $msg['content'];
$mesg = "Status Update : check - check check.";
$resp = $this->smssend($arr, $mesg);
// $arrss = explode('<br>', $resp);
// $results['resp'] = $resp;
// for($i=0; $i<count($arrss); $i++){
// echo $arrss[$i];exit();
// $a = explode(':', $arrss[$i]);
// Array
// (
// [0] => MsgID
// [1] => 4fad03cf13734a869307b19fcc293570
// [2] => 919942080003
// [3] => 201801191700328088
// [4] => success
// )
// $msgId = $a[0];
// $msgNumb = $a[1];
// $msgStatus = $a[4];
// // print_r ($a);exit;
// // echo $a[1];exit();
// $data[] = array(
// 'MsgID' => $msgId,
// 'MsgNum' => $msgNumb,
// 'MsgDelvStatus' => $msgStatus
// );
// }
// $msgID = $arrss[1];
// $msgSendTime = $arrss[2];
// $msgDeleveredNum = $arrss[3];
// $msgSendStatus = $arrss[3];
// print_r($data);exit();
$result['msgStatus'] = true;
$result['message'] = "Successfully Messages Sended!!";
return $result;
}
// self function for getting registered mobile for sms
public function get_registered_mobile($num) {
$this->db->select('MobileNumber');
$this->db->from(STUDENTS);
$this->db->where('StudentID', $num);
$roleDetails = $this->db->get()->first_row();
return $roleDetails->MobileNumber;
}
// http://www.24x7sms.com/downloads/24X7SMS_http_API2.0.pdf
// API Key : xegCdYUIMf3
// Your new password for logging into Apollo student portal is (Password). Please change the password as soon as you login.
// This is the template to be used.
public function smssend($arr, $msg)
{
$number =array();
foreach($arr as $ar){
$mobi = $this->get_registered_mobile($ar['StudentID']);
array_push($number, "91$mobi");
}
$mobile = implode(',', $number);
// $message ="Your new password for logging into Apollo student portal is SAMPLE. Please change the password as soon as you login.";
// $mobile = "91$mobile";
$message = urlencode($msg);
// echo $mobile , $message;
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,"https://smsapi.24x7sms.com/api_2.0/SendSMS.aspx?APIKEY=xegCdYUIMf3&MobileNo=".$mobile."&SenderID=APOLLO&Message=".$message."&ServiceName=TEMPLATE_BASED");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$output =curl_exec($ch);
// print_r($output);exit();
curl_close($ch);
return $output;
}
}

View File

@ -51,6 +51,17 @@ class StatusUpdation_model extends CI_Model
$results['message'] = 'No record found';
}
return $results;
}
public function get_couser_name($cours) {
$this->db->select('t2.CourseName');
// $this->db->from('' . COURSE_FEES . ' as t1');
$this->db->from('' . COURSE . ' as t2');
$this->db->where('t2.CourseID', $cours);
$roleDetails = $this->db->get()->first_row();
return "$roleDetails->CourseName";
}
// update Application status
@ -61,7 +72,8 @@ class StatusUpdation_model extends CI_Model
$dateToMsg = $arr[0]['AppDate'];
$statuToMsg = $this->get_status_name_ListCode($arr[0]['ListCode']);
$cerNamtToMsg = $this->get_certificate_name($arr[0]['CertificationType']);
$mesg = "Status Update : $cerNamtToMsg - $statuToMsg $dateToMsg.";
$getCourseName = $this->get_couser_name($arr[0]['CourseID']);
$mesg = "Status Update : $cerNamtToMsg $getCourseName - $statuToMsg $dateToMsg.";
$this->smssend($arr, $mesg);
}
// $result['addStatus'] = true;
@ -88,8 +100,13 @@ class StatusUpdation_model extends CI_Model
$dateToMsg = $arr[0]['CDate'];
$statuToMsg = $this->get_status_name_ListCode($arr[0]['ListCode']);
// $cerNamtToMsg = $this->get_certificate_name($arr[0]['CertificationType']);
$cerNamtToMsg = 'MARK CARD';
$mesg = "Status Update : $cerNamtToMsg - $statuToMsg $dateToMsg.";
$cerNamtToMsg = 'MARK CARD';
$getSemYearMsg = $this->get_couser_sem_yr_msg($arr[0]['CourseID']);
$mesg = "Status Update : $cerNamtToMsg $getSemYearMsg - $statuToMsg $dateToMsg.";
// $mesg = "Status Update : $cerNamtToMsg - $statuToMsg $dateToMsg.";
$this->smssend($arr, $mesg);
}
$result['addStatus'] = true;
@ -270,8 +287,20 @@ class StatusUpdation_model extends CI_Model
return $result;
}
public function get_couser_sem_yr_msg($cours) {
$this->db->select('t1.Sem_Year, t2.CourseName');
$this->db->from('' . COURSE_FEES . ' as t1');
$this->db->join('' . COURSE . ' as t2', 't2.CourseID = t1.CourseID', 'LEFT');
$this->db->where('ID', $cours);
$roleDetails = $this->db->get()->first_row();
return "$roleDetails->Sem_Year $roleDetails->CourseName";
}
// update study material status
public function update_semyear($arr) {
// echo $cours;exit();
// $this->get_status_name_ListCode($arr[0]['ListCode']);
$this->db->insert_batch(STUDY_MATERIAL_STATUS, $arr);
if ($this->db->affected_rows() >= 1) {
@ -280,7 +309,8 @@ class StatusUpdation_model extends CI_Model
$dateToMsg = $arr[0]['SDate'];
$statuToMsg = $this->get_status_name_ListCode($arr[0]['ListCode']);
$cerNamtToMsg = 'Study Material';
$mesg = "Status Update : $cerNamtToMsg - $statuToMsg $dateToMsg.";
$getSemYearMsg = $this->get_couser_sem_yr_msg($arr[0]['CourseID']);
$mesg = "Status Update : $cerNamtToMsg $getSemYearMsg - $statuToMsg $dateToMsg.";
$this->smssend($arr, $mesg);
}
// $this->smssend($arr);
@ -320,7 +350,10 @@ class StatusUpdation_model extends CI_Model
$Course = $reqData['Course'];
$Batch = $reqData['Batch'];
$subQuery = "SELECT S.* , SC.CourseID , C.CourseName , U.UniversityName
$branch = $req['localBranchID'];
if( $branch == 'All' ) {
$subQuery = "SELECT S.* , SC.CourseID , C.CourseName , U.UniversityName
FROM ".STUDENTS." as S LEFT JOIN ".STUDENTCOURSE." as SC ON SC.StudentID = S.StudentID
LEFT JOIN ".UNIVERSITY." as U ON SC.UniversityID = U.UniversityID LEFT JOIN ".COURSE." as C ON
SC.CourseID = C.CourseID
@ -334,7 +367,23 @@ class StatusUpdation_model extends CI_Model
$queryDetails = $this->db->query($subQuery);
$results['searchResult'] = true;
$results['search_result_details'] = $queryDetails->result();
} else {
$subQuery = "SELECT S.* , SC.CourseID , C.CourseName , U.UniversityName
FROM ".STUDENTS." as S LEFT JOIN ".STUDENTCOURSE." as SC ON SC.StudentID = S.StudentID
LEFT JOIN ".UNIVERSITY." as U ON SC.UniversityID = U.UniversityID LEFT JOIN ".COURSE." as C ON
SC.CourseID = C.CourseID
WHERE
SC.UniversityID LIKE '%$University%'
AND SC.CourseID LIKE '%$Course%'
AND SC.BatchCode LIKE '%$Batch%'
AND S.IsActive = '1'
AND S.BranchCode = '$branch'
AND SC.IsActive = '1'";
$queryDetails = $this->db->query($subQuery);
$results['searchResult'] = true;
$results['search_result_details'] = $queryDetails->result();
}
return $results;
}

View File

@ -124,6 +124,9 @@
},
"profile": {
"MAIN": "MY PROFILE"
},
"sendSMSPage": {
"MAIN": "SMS SEND"
}
}
},

View File

@ -304,15 +304,15 @@ app.controller('answerBookletStatusCtrl', ["$scope", "toaster", "$filter", "ngTa
$scope.myStatusModel.dateOn = $filter('date')(new Date($scope.myStatusModel.dateOn), formate);
var ItemsSelected = $scope.searchResultDetails.filter(function (item) {
if (item.Selected === true) {
let getStudentID = new getStudentForUpdateDetails(item.StudentID);
let getStudentID = new getStudentForUpdateDetails(item.StudentID, item.BranchCode);
studentForUpdate.push(getStudentID);
return true;
}
});
function getStudentForUpdateDetails(id) {
function getStudentForUpdateDetails(id, bCode) {
this.StudentID = id;
this.CourseID = $scope.myStatusModel.semYear;
this.BranchCode = localDetails.localBranchID;
this.BranchCode = bCode;
this.ListCode = $scope.myStatusModel.staus;
this.SDate = $scope.myStatusModel.dateOn;
this.Coursedetail = id;

View File

@ -337,15 +337,15 @@ app.controller('applicationStatusCtrl', ["$scope", "toaster", "$filter", "ngTabl
$scope.myStatusModel.dateOn = $filter('date')(new Date($scope.myStatusModel.dateOn), formate);
var ItemsSelected = $scope.searchResultDetails.filter(function (item) {
if (item.Selected === true) {
let getStudentID = new getStudentForUpdateDetails(item.StudentID, item.CourseID);
let getStudentID = new getStudentForUpdateDetails(item.StudentID, item.CourseID, item.BranchCode);
studentForUpdate.push(getStudentID);
return true;
}
});
function getStudentForUpdateDetails(id, courseId) {
function getStudentForUpdateDetails(id, courseId, dCode) {
this.StudentID = id;
this.CourseID = courseId;
this.BranchCode = localDetails.localBranchID;
this.BranchCode = dCode;
this.ListCode = $scope.myStatusModel.staus;
this.SDate = $scope.myStatusModel.dateOn;
this.Coursedetail = id;

View File

@ -339,15 +339,15 @@ app.controller('certificationStatusCtrl', ["$scope", "toaster", "$filter", "ngTa
$scope.myStatusModel.dateOn = $filter('date')(new Date($scope.myStatusModel.dateOn), formate);
var ItemsSelected = $scope.searchResultDetails.filter(function (item) {
if (item.Selected === true) {
let getStudentID = new getStudentForUpdateDetails(item.StudentID);
let getStudentID = new getStudentForUpdateDetails(item.StudentID, item.BranchCode);
studentForUpdate.push(getStudentID);
return true;
}
});
function getStudentForUpdateDetails(id) {
function getStudentForUpdateDetails(id, bCode) {
this.StudentID = id;
this.CourseID = $scope.myStatusModel.semYear;
this.BranchCode = localDetails.localBranchID;
this.BranchCode = bCode;
this.ListCode = $scope.myStatusModel.staus;
this.SDate = $scope.myStatusModel.dateOn;
this.Coursedetail = id;

View File

@ -274,6 +274,21 @@ app.controller('daybookCtrl', ["$scope", "$rootScope", "toaster", "$filter", "ng
}
});
}
},
reset: function (form) {
form.$setPristine(true);
$scope.myModelAdd = {
"id": "",
"date": "",
"name": "",
"type": "",
"amount": "",
"status": "",
"description": "",
"paidTo": "",
"description_paid": "",
"voucherNumber": ""
}
}
}

View File

@ -11,60 +11,235 @@ app.controller('sendSMSsuperadminCtrl', ["$scope", "$filter", "ngTableParams", "
$scope.init = function () {
if (localDetail != null) {
$scope.getProfile();
// $scope.getBranchList();
$scope.getUniversityList();
} else {
}
}
$scope.loginUser = {
'staffID': '',
'fName': '',
'lName': '',
'mobileNumber': '',
'gender': '',
'branchCode': '',
'branchList': '',
};
$scope.searchData = {
'University': '',
'Course': '',
'Batch': ''
};
// client side logined details
$scope.getProfile = function () {
var req = {
$scope.branchList_data = '';
// get Branch List
$scope.getBranchList = function () {
var empListreq = {
method: 'POST',
url: apiPoint.url + 'employeeGetProf/',
url: apiPoint.url + 'getBranchListDetails/',
headers: {
'Content-Type': 'application/json'
},
data: {
employeeLoginID: localDetails.localUserID
data: localDetails
}
};
$http(req).then(function (response) {
if (response.data.empStatus == true) {
/*
* Get Top Nav user details
*/
$scope.userInfo = response.data.details;
$scope.userStatusInfo = response.data.work_State;
$scope.userBranchInfo = response.data.branch_details;
// alert(JSON.stringify($scope.userInfo));
// alert(JSON.stringify($scope.userStatusInfo));
// alert(JSON.stringify($scope.userBranchInfo));
// $scope.loginImage = $scope.resultData.ProfilePicPath;
// $scope.loginUser = {
// 'staffID': $scope.resultData.StaffID,
// 'fName': $scope.resultData.Firstname,
// 'lName': $scope.resultData.Lastname,
// 'mobileNumber': $scope.resultData.MobileNumber,
// 'gender': $scope.resultData.Gender,
// 'branchCode': $scope.resultData.BranchCode,
// 'branchList': response.data.branch_details,
// };
// var currArr = response.data.branch_details;
// $scope.getCurrentBran = currArr.find(item => item.BranchCode === localDetails.localBranchID);
$http(empListreq).then(function (response) {
if (response.data.branDetailstatus) {
$scope.branchList_data = response.data.branch_details;
} else {
}
});
};
$scope.universityData = '';
// get university list while the page is load
$scope.getUniversityList = function () {
var empListreq = {
method: 'POST',
url: apiPoint.url + 'getUniveCourseBratchBroadCast/',
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.getUniveId = function (univ) {
let name = JSON.parse(univ);
$scope.searchData.University = name.UniversityID;
$scope.searchData.Course = '';
$scope.searchData.Batch = '';
$scope.courseData = name.Course;
$scope.batchData = name.Batch;
$scope.OpenWindowStatus = false;
$scope.getSearch();
};
$scope.getValueChange = function() {
$scope.getSearch();
};
$scope.OpenWindowStatus = false;
$scope.searchLoading = false;
$scope.getSearch = function() {
console.log($scope.searchData);
$scope.OpenWindowStatus = false;
$scope.searchLoading = true;
var getSearchDetails = {
method: 'POST',
url: apiPoint.url + 'getStuListForBroadcast/',
headers: {
'Content-Type': 'application/json'
},
data: {
data: $scope.searchData,
requestDetails: localDetails
}
};
$http(getSearchDetails).then(function (response) {
if (response.data.searchResult) {
$scope.studentListDetails = response.data.search_result_details;
let studentListDetails = response.data.search_result_details;
const filterAddSelect = studentListDetails.filter(val => {
val['Selected'] = false;
return val;
});
$scope.searchResultDetails = filterAddSelect;
$scope.searchResultLength = Object.keys($scope.searchResultDetails).length;
$scope.searchResultStatus = response.data.searchResult;
$scope.searchLoading = false;
} else {
$scope.searchLoading = false;
}
});
};
// select all or individual functionality
var getAllSelected = function () {
var selectedItems = $scope.searchResultDetails.filter(function (item) {
return item.Selected;
});
return selectedItems.length === $scope.searchResultDetails.length;
}
var setAllSelected = function (value) {
angular.forEach($scope.searchResultDetails, function (item) {
item.Selected = value;
});
}
$scope.allSelected = function (value) {
if (value !== undefined) {
return setAllSelected(value);
} else {
return getAllSelected();
}
}
$scope.OpenWindowStatus = false;
$scope.openScreenSen = function() {
var ItemsSelected = $scope.searchResultDetails.filter(function (item) {
if (item.Selected === true) { return true; }
});
if(ItemsSelected.length > 0) {
$scope.OpenWindowStatus = true;
$scope.openUpdateWind();
} else {
$scope.OpenWindowStatus = false;
$scope.openUpdateWind();
}
}
$scope.msg_details = {
"content": ""
}
// Select one row in a table once
// $scope.setOneSelect = function (value) {
// angular.forEach($scope.searchResultDetails, function (item) {
// item.Selected = value;
// });
// value.Selected = true;
// $scope.OpenWindowStatus = true;
// $scope.openUpdateWind();
// }
// End: select all or individual functionality
$scope.openUpdateWind = function() {
}
$scope.statusUpdate = {
submit: function (form, msg_details) {
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.disableButton = true;
var studentForUpdate = [];
var ItemsSelected = $scope.searchResultDetails.filter(function (item) {
if (item.Selected === true) {
let getStudentID = new getStudentForUpdateDetails(item.StudentID);
studentForUpdate.push(getStudentID);
return true;
}
});
function getStudentForUpdateDetails(id) {
this.StudentID = id;
}
var sendMSGApi = {
method: 'POST',
url: apiPoint.url + 'sendSMSStudentApi/',
headers: {
'Content-Type': 'application/json'
},
data: {
data: studentForUpdate,
msg: msg_details,
requestDetails: localDetails
}
};
$http(sendMSGApi).then(function (response) {
if (response.data.msgStatus) {
swal("Success!", response.data.message, "success");
$scope.disableButton = false;
angular.forEach($scope.searchResultDetails, function (item) {
item.Selected = false;
});
$scope.OpenWindowStatus = false;
} else {
swal("Failed!", response.data.message, "error");
$scope.disableButton = false;
}
});
}
},
reset: function (form) {
form.$setPristine(false);
$scope.msg_details = {
"content": ""
}
// $scope.msg_details.content = "";
}
}
}]);

View File

@ -659,6 +659,13 @@ $scope.studentListLength = 0;
'DeactiveComments': '',
'Comments': ''
};
$scope.myModelCourseAdd = {
'university': '',
'course': '',
'batch': '',
'dateofjoining': '',
'enrollmentid': ''
};
}, resetCourse: function (form) {
form.$setPristine(true);
$scope.myModelCourse = {
@ -1479,7 +1486,7 @@ $scope.myUnivSearch = "";
// add student
$scope.studentFORM = {
submit: function (form, myModel, myModelCourseAdd) {
alert(JSON.stringify(myModelCourseAdd));
// alert(JSON.stringify(myModelCourseAdd));
var firstError = null;
if (form.$invalid) {
var field = null, firstError = null;
@ -1595,6 +1602,13 @@ $scope.myUnivSearch = "";
'DeactiveComments': '',
'Comments': ''
};
$scope.myModelCourseAdd = {
'university': '',
'course': '',
'batch': '',
'dateofjoining': '',
'enrollmentid': ''
};
}, resetCourse: function (form) {
form.$setPristine(true);
$scope.myModelCourse = {

View File

@ -315,15 +315,15 @@ app.controller('studyMaterialStatusCtrl', ["$scope", "toaster", "$filter", "ngTa
$scope.myStatusModel.dateOn = $filter('date')(new Date($scope.myStatusModel.dateOn), formate);
var ItemsSelected = $scope.searchResultDetails.filter(function (item) {
if (item.Selected === true) {
let getStudentID = new getStudentForUpdateDetails(item.StudentID);
let getStudentID = new getStudentForUpdateDetails(item.StudentID, item.BranchCode);
studentForUpdate.push(getStudentID);
return true;
}
});
function getStudentForUpdateDetails(id) {
function getStudentForUpdateDetails(id, bCode) {
this.StudentID = id;
this.CourseID = $scope.myStatusModel.semYear;
this.BranchCode = localDetails.localBranchID;
this.BranchCode = bCode;
this.ListCode = $scope.myStatusModel.staus;
this.SDate = $scope.myStatusModel.dateOn;
this.Coursedetail = id;

View File

@ -337,7 +337,7 @@
<input type="text" ng-pattern="/^[0-9]*$/" name="addAmount" tabindex="2" placeholder="Enter Amount" class="form-control"
ng-model="myModelAdd.amount" required/>
<span class="error text-small block" ng-if="Form.addAmount.$dirty && Form.addAmount.$error.required">Amount is Required </span>
<!--<span class="error text-small block" ng-if="Form.addAmount.$dirty">Amount is Required </span>-->
</div>
<div class="col-md-4">
<label>
@ -359,8 +359,8 @@
data-style="zoom-in">
Submit
</button>
<button type="cancel" ng-click="editClose()" tabindex="5" class="btn btn-warning btn-sm" ng-click="employeeForm.resetCourse(Form)">
Cancel
<button type="cancel" ng-click="daybookAdd.reset(Form)" tabindex="5" class="btn btn-warning btn-sm" ng-click="employeeForm.resetCourse(Form)">
Reset
</button>
</div>
</div>

View File

@ -13,10 +13,231 @@
<div class="row">
<div class="col-md-12">
<!-- /// controller: 'UserCtrl' - localtion: assets/js/controllers/sendSMSsuperadminCtrl.js /// -->
<div ng-controller="sendSMSsuperadminCtrl">
<h1>D</h1>
<div ng-controller="sendSMSsuperadminCtrl" ng-init="init()">
<!--<h1>D</h1>-->
<div class="row">
<!--<div class="col-md-3">
<label for="form-field-select-2">
Select Branch
</label>
<select class="form-control" tabindex="1" class="cs-select cs-skin-elastic" name="branch" required>
<option value="" disabled selected>Select Branch</option>
<option ng-repeat="bdata in branchList_data" value="{{bdata.BranchCode}}">{{bdata.BranchName}}</option>
</select>
</div>-->
<div class="col-md-3">
<label for="form-field-select-2">
University
</label>
<select class="form-control" tabindex="1" class="cs-select cs-skin-elastic" name="university" ng-model="myUniv" ng-change="getUniveId(myUniv)">
<option value="" disabled selected>Select University</option>
<option ng-repeat="item in universityData" value="{{item}}">{{item.UniversityName}}</option>
</select>
</div>
<div class="col-md-3">
<label for="form-field-select-2">
Course
</label>
<select class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="course" ng-model="searchData.Course" ng-change="getValueChange()">
<option value="" selected>Select Course</option>
<option ng-repeat="itemCourse in courseData" value="{{itemCourse.CourseID}}">{{itemCourse.CourseName}}</option>
</select>
</div>
<div class="col-md-3">
<label for="form-field-select-2">
Batch
</label>
<select class="form-control" tabindex="3" class="cs-select cs-skin-elastic" name="batch" ng-model="searchData.Batch" ng-change="getValueChange()">
<option value="" selected>Select Batch</option>
<option ng-repeat="itemBatch in batchData" value="{{itemBatch.BatchCode}}">{{itemBatch.BatchName}}</option>
</select>
</div>
</div>
<!--<pre>{{ branchList_data }}</pre>-->
<!--<pre>{{ studentListDetails | json }}</pre>-->
<!--<pre>{{ searchResultLength }}</pre>-->
<div>
<!--// student search result-->
<div ng-if="searchLoading === true">
<!--search loading start-->
<div style="padding: auto 0; color: #007AFF; font-weight: bold; text-align:center;
margin-top: 25px;">
<h4 style="color: inherit">fetching...</h4>
</div>
<!--search loading end-->
</div>
<div ng-if="searchLoading === false">
<div class="col-md-12" ng-if="searchResultStatus == false" style="min-height: 281px;">
<p style="color: red;" align="center"><strong><h4 class="text-center">No
records found... </h4></strong></p>
</div>
<div class="col-md-12" ng-if="searchResultStatus == true">
<div class="col-md-12" ng-if="searchResultLength === 0" style="min-height: 281px;">
<p style="color: red;" align="center"><strong><h4 class="text-center">No
records found... </h4></strong></p>
</div>
<div class="table-responsive" ng-if="searchResultLength > 0">
<!--// search-->
<div class="container">
<div class="row">
<div class="col-md-3">
<label for="form-field-select-2">
Mobile Number
</label>
<script>
$(function () {
$("#search").focus();
});
</script>
<style>
.sort-icon {
font-size: 9px;
margin-left: 5px;
}
th {
cursor: pointer;
}
</style>
<input class="form-control" type="text" ng-change="mySearchChangeFunc(search.MobileNumber)" ng-model="search.MobileNumber"
id="search" autofocus tabindex="1" placeholder="Search Mobile" /><br><br>
</div>
</div>
</div>
<table class="table table-hover">
<thead>
<tr>
<th>
<input type="checkbox" ng-hide="allSelectedHide" ng-model="allSelected" ng-change="openUpdateWind()" ng-model-options="{getterSetter: true}"
ng-click="openScreenSen()"/>
</th>
<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 ng-click="sort('CourseName')">Course
<span class="glyphicon sort-icon" ng-show="sortKey=='CourseName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
</tr>
</thead>
<tbody dir-paginate="p in searchResultDetails|filter:search:strict|orderBy:sortKey:reverse|itemsPerPage:10">
<tr>
<td>
<label>
<input type="checkbox" ng-model="p.Selected" ng-bind="values = p.StudentID" ng-change="setOneSelect(p)"
ng-click="openScreenSen()" />
</label>
</td>
<td>{{p.Firstname}}</td>
<td>{{p.Lastname}}</td>
<td>{{p.MobileNumber}}</td>
<td>{{p.EmailID}}</td>
<td>{{p.CourseName}}</td>
</tr>
</tbody>
</table>
<dir-pagination-controls max-size="10" direction-links="true" boundary-links="true">
</dir-pagination-controls>
</div>
</div>
<div ng-if="OpenWindowStatus">
<style>
#cancel_button {
/*line-height: 12px;
width: 18px;
font-size: 8pt;
font-family: tahoma;*/
margin-top: 1px;
margin-right: 2px;
position: absolute;
top: 0;
right: 0;
}
.target>div:target {
display: block;
}
</style>
<div>
<form name="Form" id="form" novalidate ng-submit="statusUpdate.submit(Form, msg_details)" method="post">
<div id="bottom1" class="container">
<div class="row">
<div class="col-md-3">
</div>
<div class="col-md-6">
<fieldset style="background-color: #eaeaea;">
<legend>
SMS Details
</legend>
<!--<div>
<a id="cancel_button" ng-click="unSelect()" tooltip="Close">
<span class="glyphicon glyphicon-remove-circle"></span>
</a>
</div>-->
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8 form-group" ng-class="{'has-error':Form.Messagebody.$dirty && Form.Messagebody.$invalid, 'has-success':Form.Messagebody.$valid}">
<label>
Message body <span class="symbol required"></span>
</label>
<textarea type="text" placeholder="Enter Message body" tabindex="7" class="form-control" name="Messagebody" ng-model="msg_details.content"
required/>
<span class="error text-small block" ng-if="Form.Messagebody.$dirty && Form.Messagebody.$error.pattern">Invalid Message body</span>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-12">
<div class="pull-right">
<button type="submit" ng-disabled="disableButton" tabindex="8" ladda="ldloading1.zoom_in" class="btn btn-sm btn-success"
data-style="zoom-in">
<i class="fa fa-circle-o-notch fa-spin" ng-if="disableButton" style="font-size:14px"></i>
Submit
</button>
<button type="reset" tabindex="9" class="btn btn-warning btn-sm" tabindex="9" ng-click="statusUpdate.reset(Form)">
Reset
</button>
</div>
</div>
</div>
</fieldset>
</div>
<div class="col-md-3">
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!--studen search result end-->
</div>
</div>
</div>
</div>

View File

@ -312,7 +312,7 @@
<button type="submit" ng-disabled="disableButton" tabindex="8" ladda="ldloading1.zoom_in" class="btn btn-wide btn-success" data-style="zoom-in">
<i class="fa fa-circle-o-notch fa-spin" ng-if="disableButton" style="font-size:14px"></i> Submit
</button>
<button type="reset" tabindex="9" class="btn btn-warning btn-wide" tabindex="9" ng-click="employeeForm.resetCourse(Form)">
<button type="reset" tabindex="9" class="btn btn-warning btn-wide" tabindex="9" ng-click="statusUpdate.reset(Form)">
Reset
</button>
</div>
@ -408,7 +408,7 @@
/>
<span class="error text-small block" ng-if="Form.description.$dirty && Form.description.$error.pattern">Invalid Comments</span>
</div>
<div class="col-md-6 form-group" ng-class="{'has-error':Form.branch.$dirty && Form.branch.$invalid, 'has-success':Form.branch.$valid}" >
<!--<div class="col-md-6 form-group" ng-class="{'has-error':Form.branch.$dirty && Form.branch.$invalid, 'has-success':Form.branch.$valid}" >
<label for="form-field-select-2">
Select Branch <span
class="symbol required"></span>
@ -420,7 +420,7 @@
<option ng-repeat="bdata in branchList_data" value="{{bdata.BranchCode}}">{{bdata.BranchName}}</option>
</select>
<span class="error text-small block" ng-if="Form.branch.$dirty && Form.branch.$invalid" ng-hide="Form.branch.$error.maxlength">Branch is required.</span>
</div>
</div>-->
</div>
<div class="row">
<div class="col-md-12">
@ -428,7 +428,7 @@
<button type="submit" ng-disabled="disableButton" tabindex="8" ladda="ldloading1.zoom_in" class="btn btn-wide btn-success" data-style="zoom-in">
<i class="fa fa-circle-o-notch fa-spin" ng-if="disableButton" style="font-size:14px"></i> Submit
</button>
<button type="reset" tabindex="9" class="btn btn-warning btn-wide" tabindex="9" ng-click="employeeForm.resetCourse(Form)">
<button type="reset" tabindex="9" class="btn btn-warning btn-wide" tabindex="9" ng-click="statusUpdate.reset(Form)">
Reset
</button>
</div>

View File

@ -343,7 +343,7 @@
data-style="zoom-in">
<i class="fa fa-circle-o-notch fa-spin" ng-if="disableButton" style="font-size:14px"></i> Submit
</button>
<button type="reset" tabindex="9" class="btn btn-warning btn-wide" tabindex="9" ng-click="employeeForm.resetCourse(Form)">
<button type="reset" tabindex="9" class="btn btn-warning btn-wide" tabindex="9" ng-click="statusUpdate.reset(Form)">
Reset
</button>
</div>
@ -480,7 +480,7 @@
/>
<span class="error text-small block" ng-if="Form.description.$dirty && Form.description.$error.pattern">Invalid Comments</span>
</div>
<div class="col-md-6 form-group" ng-class="{'has-error':Form.branch.$dirty && Form.branch.$invalid, 'has-success':Form.branch.$valid}"
<!--<div class="col-md-6 form-group" ng-class="{'has-error':Form.branch.$dirty && Form.branch.$invalid, 'has-success':Form.branch.$valid}"
>
<label for="form-field-select-2">
Select Branch <span
@ -493,7 +493,7 @@
<option ng-repeat="bdata in branchList_data" value="{{bdata.BranchCode}}">{{bdata.BranchName}}</option>
</select>
<span class="error text-small block" ng-if="Form.branch.$dirty && Form.branch.$invalid" ng-hide="Form.branch.$error.maxlength">Branch is required.</span>
</div>
</div>-->
</div>
<div class="row">
<div class="col-md-12">
@ -502,7 +502,7 @@
data-style="zoom-in">
<i class="fa fa-circle-o-notch fa-spin" ng-if="disableButton" style="font-size:14px"></i> Submit
</button>
<button type="reset" tabindex="9" class="btn btn-warning btn-wide" tabindex="9" ng-click="employeeForm.resetCourse(Form)">
<button type="reset" tabindex="9" class="btn btn-warning btn-wide" tabindex="9" ng-click="statusUpdate.reset(Form)">
Reset
</button>
</div>

View File

@ -341,7 +341,7 @@
<button type="submit" ng-disabled="disableButton" tabindex="8" ladda="ldloading1.zoom_in" class="btn btn-wide btn-success" data-style="zoom-in">
<i class="fa fa-circle-o-notch fa-spin" ng-if="disableButton" style="font-size:14px"></i> Submit
</button>
<button type="reset" tabindex="9" class="btn btn-warning btn-wide" tabindex="9" ng-click="employeeForm.resetCourse(Form)">
<button type="reset" tabindex="9" class="btn btn-warning btn-wide" tabindex="9" ng-click="statusUpdate.reset(Form)">
Reset
</button>
</div>
@ -463,7 +463,7 @@
/>
<span class="error text-small block" ng-if="Form.description.$dirty && Form.description.$error.pattern">Invalid Comments</span>
</div>
<div class="col-md-6 form-group" ng-class="{'has-error':Form.branch.$dirty && Form.branch.$invalid, 'has-success':Form.branch.$valid}"
<!--<div class="col-md-6 form-group" ng-class="{'has-error':Form.branch.$dirty && Form.branch.$invalid, 'has-success':Form.branch.$valid}"
>
<label for="form-field-select-2">
Select Branch <span
@ -476,7 +476,7 @@
<option ng-repeat="bdata in branchList_data" value="{{bdata.BranchCode}}">{{bdata.BranchName}}</option>
</select>
<span class="error text-small block" ng-if="Form.branch.$dirty && Form.branch.$invalid" ng-hide="Form.branch.$error.maxlength">Branch is required.</span>
</div>
</div>-->
</div>
<div class="row">
<div class="col-md-12">
@ -484,7 +484,7 @@
<button type="submit" ng-disabled="disableButton" tabindex="8" ladda="ldloading1.zoom_in" class="btn btn-wide btn-success" data-style="zoom-in">
<i class="fa fa-circle-o-notch fa-spin" ng-if="disableButton" style="font-size:14px"></i> Submit
</button>
<button type="reset" tabindex="9" class="btn btn-warning btn-wide" tabindex="9" ng-click="employeeForm.resetCourse(Form)">
<button type="reset" tabindex="9" class="btn btn-warning btn-wide" tabindex="9" ng-click="statusUpdate.reset(Form)">
Reset
</button>
</div>

View File

@ -329,7 +329,7 @@
<i class="fa fa-circle-o-notch fa-spin" ng-if="disableButton" style="font-size:14px"></i>
Submit
</button>
<button type="reset" tabindex="9" class="btn btn-warning btn-wide" tabindex="9" ng-click="employeeForm.resetCourse(Form)">
<button type="reset" tabindex="9" class="btn btn-warning btn-wide" tabindex="9" ng-click="statusUpdate.reset(Form)">
Reset
</button>
</div>
@ -433,7 +433,7 @@
/>
<span class="error text-small block" ng-if="Form.description.$dirty && Form.description.$error.pattern">Invalid Comments</span>
</div>
<div class="col-md-6 form-group" ng-class="{'has-error':Form.branch.$dirty && Form.branch.$invalid, 'has-success':Form.branch.$valid}">
<!--<div class="col-md-6 form-group" ng-class="{'has-error':Form.branch.$dirty && Form.branch.$invalid, 'has-success':Form.branch.$valid}">
<label for="form-field-select-2">
Select Branch <span
class="symbol required"></span>
@ -444,7 +444,7 @@
<option ng-repeat="bdata in branchList_data" value="{{bdata.BranchCode}}">{{bdata.BranchName}}</option>
</select>
<span class="error text-small block" ng-if="Form.branch.$dirty && Form.branch.$invalid" ng-hide="Form.branch.$error.maxlength">Branch is required.</span>
</div>
</div>-->
</div>
<!--<pre>{{localBranchDetails}}</pre>
@ -457,7 +457,7 @@
<i class="fa fa-circle-o-notch fa-spin" ng-if="disableButton" style="font-size:14px"></i>
Submit
</button>
<button type="reset" tabindex="9" class="btn btn-warning btn-wide" tabindex="9" ng-click="employeeForm.resetCourse(Form)">
<button type="reset" tabindex="9" class="btn btn-warning btn-wide" tabindex="9" ng-click="statusUpdate.reset(Form)">
Reset
</button>
</div>

View File

@ -136,7 +136,7 @@
<input type="text" placeholder="Enter Mother Name" tabindex="5" class="form-control" name="mothername" ng-model="p.MotherName"
ng-pattern="/^[a-zA-Z.\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>
<span class="error text-small block" ng-if="Form.mothername.$dirty && Form.mothername.$error.pattern">Invalid Mother 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>

View File

@ -327,7 +327,7 @@
<input type="text" placeholder="Enter Mother Name" tabindex="5" class="form-control" name="mothername" ng-model="myModel.mothername"
ng-pattern="/^[a-zA-Z.\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>
<span class="error text-small block" ng-if="Form.mothername.$dirty && Form.mothername.$error.pattern">Invalid Mother 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>
@ -678,7 +678,7 @@
data-style="zoom-in">
Submit
</button>
<button type="reset" tabindex="31" class="btn btn-warning btn-wide" tabindex="9" ng-click="employeeForm.resetCourse(Form)">
<button type="reset" tabindex="31" class="btn btn-warning btn-wide" tabindex="9" ng-click="studentFORM.reset(Form)">
Reset
</button>
</div>

View File

@ -354,7 +354,7 @@
<input type="text" placeholder="Enter Mother Name" tabindex="5" class="form-control" name="mothername" ng-model="myModel.mothername"
ng-pattern="/^[a-zA-Z.\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>
<span class="error text-small block" ng-if="Form.mothername.$dirty && Form.mothername.$error.pattern">Invalid Mother 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>
@ -706,7 +706,7 @@
data-style="zoom-in">
Submit
</button>
<button type="reset" tabindex="31" class="btn btn-warning btn-wide" tabindex="9" ng-click="employeeForm.resetCourse(Form)">
<button type="reset" tabindex="31" class="btn btn-warning btn-wide" tabindex="9" ng-click="studentFORM.reset(Form)">
Reset
</button>
</div>

View File

@ -2,7 +2,7 @@
<html lang="en" data-ng-app="clipApp">
<head>
<!--<base href="http://localhost/apollo_New_Update_03-01/apollodec/Apollo/" />-->
<!--<base href="/apollo_New_Update_03-01/apollodec/Apollo/" />-->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="{{app.description}}">