Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
03d2d5c360
@ -209,7 +209,11 @@ $route['sendStudentNotification'] = 'Fees_Status_Controller/sendStudentNotificat
|
||||
* */
|
||||
$route['getUniveCourseBratchBroadCast'] = 'Broadcast_Controller/getUniveCourseBatch';
|
||||
$route['getStuListForBroadcast'] = 'Broadcast_Controller/getStuListForBrodcast';
|
||||
$route['sendSMSStudentApi'] = 'Broadcast_Controller/sendSMSStudentApi';
|
||||
$route['sendSMSStudentApi'] = 'Broadcast_Controller/sendSMSStudentApi';`
|
||||
|
||||
$route['getCronCall'] = 'Broadcast_Controller/getCronCall';
|
||||
$route['getSMSSendReportList'] = 'Broadcast_Controller/getSMSSendReportList';
|
||||
$route['getSMSGroupDetails'] = 'Broadcast_Controller/getSMSGroupDetails';
|
||||
|
||||
|
||||
|
||||
|
||||
@ -93,7 +93,7 @@ class Broadcast_Controller extends REST_Controller {
|
||||
);
|
||||
}
|
||||
|
||||
$sendMsgDetails = $this->broadcast_model->send_msg_students($data, $msg);// Check if the employee exist
|
||||
$sendMsgDetails = $this->broadcast_model->send_msg_students($data, $msg, $reqDetails);// Check if the employee exist
|
||||
if ($sendMsgDetails)
|
||||
{
|
||||
$sendMsgDetails['status'] = REST_Controller::HTTP_OK;
|
||||
@ -109,4 +109,75 @@ class Broadcast_Controller extends REST_Controller {
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
}
|
||||
|
||||
public function getSMSGroupDetails_post() {
|
||||
$reqData = $this->post('data');
|
||||
$reqDataBy = $this->post('localReqDetails');
|
||||
// print_r($reqData);exit();
|
||||
$getMegDetails = $this->broadcast_model->getSMSGroupDetails($reqData);// Check if the employee exist
|
||||
if ($getMegDetails)
|
||||
{
|
||||
$getMegDetails['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($getMegDetails, 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 getSMSSendReportList_post(){
|
||||
|
||||
$reqData = $this->post('data');
|
||||
$reqDataBy = $this->post('localReqDetails');
|
||||
// $time = date('Y-m-d H:i:s');
|
||||
// $dateTime = $time;
|
||||
// $date1 = $dateTime;
|
||||
// $date2 = $dateTime;
|
||||
|
||||
$getMegCronDetails = $this->broadcast_model->getSmsSendBetweenDate($reqData, $reqDataBy);// Check if the employee exist
|
||||
if ($getMegCronDetails)
|
||||
{
|
||||
$getMegCronDetails['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($getMegCronDetails, 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 getCronCall_get() {
|
||||
$getMegCronDetails = $this->broadcast_model->getCronUpdate();// Check if the employee exist
|
||||
// echo $getMegCronDetails;exit();
|
||||
if($getMegCronDetails){
|
||||
echo $getMegCronDetails;
|
||||
}else {
|
||||
|
||||
}
|
||||
// if ($getMegCronDetails)
|
||||
// {
|
||||
// $getMegCronDetails['status'] = REST_Controller::HTTP_OK;
|
||||
// // Set the response and exit
|
||||
// $this->response($getMegCronDetails, 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
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@ -81,44 +81,129 @@ class Broadcast_model extends CI_Model
|
||||
return $results;
|
||||
}
|
||||
|
||||
public function getSMSGroupDetails($reqData) {
|
||||
$querys = "SELECT t1.*, t2.DeliveredStatus, t2.DeliveredOn FROM T_BroadcastStatus as t1
|
||||
LEFT JOIN T_BroadcastDeliveryCron as t2 ON t2.MsgId = t1.MsgId
|
||||
WHERE t1.MsgGroup = '$reqData' ORDER BY t1.CreatedOn DESC";
|
||||
|
||||
public function send_msg_students($arr, $msg) {
|
||||
$smsSendGroupDetails = $this->db->query($querys);
|
||||
$smsSendGroupDetailsList = $smsSendGroupDetails->result();
|
||||
$results['smsSendGroupDetailsListStatus'] = true;
|
||||
$results['smsSendGroupDetailsList'] = $smsSendGroupDetailsList;
|
||||
return $results;
|
||||
}
|
||||
|
||||
public function getSmsSendBetweenDate($reqData, $reqDataBy) {
|
||||
|
||||
if($reqData['date'] != '' && $reqData['dateTo'] != '') {
|
||||
$d = new DateTime($reqData['date']);
|
||||
$dTo = new DateTime($reqData['dateTo']);
|
||||
$fromDate = $d->format('Y-m-d');
|
||||
$toDate = $dTo->format('Y-m-d');
|
||||
|
||||
// $querys = "SELECT t1.*, t2.* FROM T_BroadcastStatus as t1
|
||||
// LEFT JOIN T_BroadcastDeliveryCron as t2 ON t2.MsgId = t1.MsgId
|
||||
// WHERE STR_TO_DATE(t1.CreatedOn, '%Y-%m-%d') BETWEEN '$fromDate'
|
||||
// AND '$toDate' ORDER BY t1.CreatedOn DESC";
|
||||
|
||||
$querys = "SELECT t1.*, COUNT(t1.MsgGroup) as MSG_SEND_CNT FROM T_BroadcastStatus as t1
|
||||
LEFT JOIN T_BroadcastDeliveryCron as t2 ON t2.MsgId = t1.MsgId
|
||||
WHERE STR_TO_DATE(t1.CreatedOn, '%Y-%m-%d') BETWEEN '$fromDate'
|
||||
AND '$toDate' GROUP BY t1.MsgGroup ORDER BY t1.CreatedOn DESC";
|
||||
|
||||
$smsSendDetails = $this->db->query($querys);
|
||||
$smsSendDetailsList = $smsSendDetails->result();
|
||||
$results['smsSendDetailsListStatus'] = true;
|
||||
$results['smsSendDetailsList'] = $smsSendDetailsList;
|
||||
|
||||
} else {
|
||||
// $d = new DateTime($d1);
|
||||
// $dTo = new DateTime($d2);
|
||||
// $fromDate = $d->format('Y-m-d');
|
||||
// $toDate = $dTo->format('Y-m-d');
|
||||
|
||||
// $querys = "SELECT t1.*, t2.* FROM T_BroadcastStatus as t1
|
||||
// LEFT JOIN T_BroadcastDeliveryCron as t2 ON t2.MsgId = t1.MsgId
|
||||
// WHERE STR_TO_DATE(t1.CreatedOn, '%Y-%m-%d') BETWEEN '$fromDate'
|
||||
// AND '$toDate' ORDER BY t1.CreatedOn DESC";
|
||||
|
||||
$querys = "SELECT t1.*, COUNT(t1.MsgGroup) FROM T_BroadcastStatus as t1
|
||||
LEFT JOIN T_BroadcastDeliveryCron as t2 ON t2.MsgId = t1.MsgId
|
||||
GROUP BY t1.MsgGroup ORDER BY t1.CreatedOn DESC";
|
||||
|
||||
$smsSendDetails = $this->db->query($querys);
|
||||
$smsSendDetailsList = $smsSendDetails->result();
|
||||
$results['smsSendDetailsListStatus'] = true;
|
||||
$results['smsSendDetailsList'] = $smsSendDetailsList;
|
||||
$results['smsSendDetailsListStatus'] = true;
|
||||
$results['smsSendDetailsList'] = $smsSendDetailsList;
|
||||
|
||||
}
|
||||
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
|
||||
public function send_msg_students($arr, $msg, $reqDetails) {
|
||||
$msg_body = $msg['content'];
|
||||
$mesg = "Status Update : check - check check.";
|
||||
$sender = $reqDetails['localUserID'];
|
||||
$mesg = "$msg_body";
|
||||
// $mesg = "Status Update : check - check check.";
|
||||
// $mesg = "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
|
||||
// );
|
||||
// }
|
||||
|
||||
// echo $resp ;exit();
|
||||
$arrss = explode('<br>', $resp);
|
||||
// Array
|
||||
// (
|
||||
// [0] => MsgID
|
||||
// [1] => 4fad03cf13734a869307b19fcc293570
|
||||
// [2] => 919942080003
|
||||
// [3] => 201801191700328088
|
||||
// [4] => success
|
||||
// )
|
||||
$time = date('Y-m-d H:i:s');
|
||||
$dateTime = $time;
|
||||
$msgGroup = date('YmdHis');
|
||||
|
||||
for($i=0, $c = count($arrss) ; $i< $c; $i++){
|
||||
// echo $arrss[$i];exit();
|
||||
if( $arrss[$i] === '') {
|
||||
break;
|
||||
} else {
|
||||
$a = explode(':', $arrss[$i]);
|
||||
$msgIdState = $a[0];
|
||||
$msgId = $a[1];
|
||||
$msgNumb = $a[2];
|
||||
$msgStatus = $a[4];
|
||||
$data[] = array(
|
||||
'MsgId' => $msgId,
|
||||
'MobileNumber' => $msgNumb,
|
||||
'MsgBody' => $mesg,
|
||||
'Status' => $msgStatus,
|
||||
'CreatedOn' => $dateTime,
|
||||
'CreatedBy' => $sender,
|
||||
'MsgGroup' => $msgGroup
|
||||
);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
$this->db->insert_batch('T_BroadcastStatus', $data);
|
||||
if ($this->db->affected_rows() >= 1) {
|
||||
$result['msgStatus'] = true;
|
||||
$result['message'] = "Successfully Messages Sended!!";
|
||||
} else {
|
||||
$result['msgStatus'] = false;
|
||||
$result['message'] = "error!!";
|
||||
}
|
||||
// print_r($data);
|
||||
// exit();
|
||||
// $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;
|
||||
}
|
||||
|
||||
@ -151,7 +236,7 @@ class Broadcast_model extends CI_Model
|
||||
$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_URL,"https://smsapi.24x7sms.com/api_2.0/SendSMS.aspx?APIKEY=xegCdYUIMf3&MobileNo=".$mobile."&SenderID=APOLLO&Message=".$message."&ServiceName=PROMOTIONAL_HIGH");
|
||||
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
|
||||
$output =curl_exec($ch);
|
||||
@ -161,4 +246,64 @@ class Broadcast_model extends CI_Model
|
||||
return $output;
|
||||
}
|
||||
|
||||
public function getCronUpdate() {
|
||||
$date2 = date('Y-m-d');
|
||||
|
||||
$quw = "SELECT * FROM T_BroadcastDeliveryCron ORDER BY id DESC LIMIT 1";
|
||||
$myext = $this->db->query($quw)->first_row();
|
||||
// print_r($this->db->query($quw)->first_row());exit();
|
||||
if($myext){
|
||||
if($myext->CreatedOn){
|
||||
$arrsss = explode(' ', $myext->CreatedOn);
|
||||
}
|
||||
$date1 = $myext->CreatedOn != '' ? $arrsss[0] : $date2;
|
||||
} else {
|
||||
$date1 = $date2;
|
||||
}
|
||||
|
||||
$ch=curl_init();
|
||||
curl_setopt($ch,CURLOPT_URL,"https://smsapi.24x7sms.com/api_2.0/GetReports.aspx?APIKEY=xegCdYUIMf3&StartDate=".$date1."&EndDate=".$date2."");
|
||||
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
|
||||
$output =curl_exec($ch);
|
||||
|
||||
curl_close($ch);
|
||||
|
||||
$arrss = explode('<br>', $output);
|
||||
// Array
|
||||
// (
|
||||
// [0] => MsgID
|
||||
// [1] => 4fad03cf13734a869307b19fcc293570
|
||||
// [2] => 919942080003
|
||||
// [3] => 201801191700328088
|
||||
// [4] => success
|
||||
// )
|
||||
$time = date('Y-m-d H:i:s');
|
||||
$dateTime = $time;
|
||||
for($i=0, $c = count($arrss) ; $i< $c; $i++){
|
||||
// echo $arrss[$i];exit();
|
||||
if( $arrss[$i] === '') {
|
||||
break;
|
||||
} else {
|
||||
$a = explode('|', $arrss[$i]);
|
||||
$msgId = $a[0];
|
||||
$msgNumb = $a[1];
|
||||
$delvStatus = $a[2];
|
||||
$delvOn = $a[3];
|
||||
$qury1 = "SELECT * FROM T_BroadcastDeliveryCron WHERE MsgId = '$msgId'";
|
||||
$choe = $this->db->query($qury1)->first_row();
|
||||
if($this->db->query($qury1)->first_row()){
|
||||
$qury2 = "UPDATE T_BroadcastDeliveryCron SET DeliveredStatus = '$delvStatus', DeliveredOn = '$delvOn' WHERE MsgId = '$msgId'";
|
||||
$choe2 = $this->db->query($qury2);
|
||||
continue;
|
||||
} else {
|
||||
$qury3 = " INSERT INTO T_BroadcastDeliveryCron (MsgId, MobileNumber, DeliveredStatus, DeliveredOn, CreatedOn) VALUES('$msgId', '$msgNumb', '$delvStatus', '$delvOn', '$dateTime')";
|
||||
$choe3 = $this->db->query($qury3);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 'records updated!!';
|
||||
}
|
||||
|
||||
}
|
||||
@ -126,7 +126,9 @@
|
||||
"MAIN": "MY PROFILE"
|
||||
},
|
||||
"sendSMSPage": {
|
||||
"MAIN": "SMS SEND"
|
||||
"MAIN": "BROADCAST",
|
||||
"SENDSMS": "SMS SEND",
|
||||
"SENDSMSDETAILS": "SEND SMS DETAILS"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -158,6 +158,7 @@ app.constant('JS_REQUIRES', {
|
||||
// day book master
|
||||
'dayBookMasterCtrl':'assets/js/controllers/dayBookMasterCtrl.js',
|
||||
'sendSMSsuperadminCtrl':'assets/js/controllers/sendSMSsuperadminCtrl.js',
|
||||
'sendSMSDetailssuperadminCtrl': 'assets/js/controllers/sendSMSDetailssuperadminCtrl.js',
|
||||
'feesNotification':'assets/js/controllers/feesNotification.js',
|
||||
|
||||
|
||||
|
||||
@ -384,7 +384,14 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com
|
||||
ncyBreadcrumb: {
|
||||
label: 'daybook'
|
||||
}
|
||||
}).state('app.sendSMSPage', {
|
||||
}).state('app.broadCast', {
|
||||
url: '/broadcast',
|
||||
template: '<div ui-view class="fade-in-up"> <div style="margin: auto; width: 50%;padding: 10px;"> BROADCAST DETAILS </div> </div>',
|
||||
title: 'Broadcast',
|
||||
ncyBreadcrumb: {
|
||||
label: 'Broadcast'
|
||||
}
|
||||
}).state('app.broadCast.sendSMSPage', {
|
||||
url: '/sendSMS',
|
||||
templateUrl: "assets/views/sendSMS/sendSMSsuperadmin.html",
|
||||
title: 'send SMS',
|
||||
@ -392,6 +399,14 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com
|
||||
ncyBreadcrumb: {
|
||||
label: 'send SMS'
|
||||
}
|
||||
}).state('app.broadCast.sendSMSDetails', {
|
||||
url: '/sendSMSDetails',
|
||||
templateUrl: "assets/views/sendSMS/sendSMSDetailssuperadmin.html",
|
||||
title: 'Send SMS Details',
|
||||
resolve: loadSequence('spin', 'ladda', 'angular-ladda', 'sendSMSDetailssuperadminCtrl','ngTable'),
|
||||
ncyBreadcrumb: {
|
||||
label: 'Send SMS Details'
|
||||
}
|
||||
}).state('app.daybook.income', {
|
||||
url: '/income',
|
||||
templateUrl: "assets/views/utility_search_result.html",
|
||||
|
||||
115
Apollo/assets/js/controllers/sendSMSDetailssuperadminCtrl.js
Normal file
115
Apollo/assets/js/controllers/sendSMSDetailssuperadminCtrl.js
Normal file
@ -0,0 +1,115 @@
|
||||
'use strict';
|
||||
/*** controller for Wizard Form example***/
|
||||
app.controller('sendSMSDetailssuperadminCtrl', ["$scope", "$filter", "ngTableParams", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', function ($scope, $filter, ngTableParams, apiPoint, $http, SweetAlert, $state, md5, ipCookie) {
|
||||
|
||||
/**
|
||||
* Send SMS Details Functionality
|
||||
* by : kdk
|
||||
*/
|
||||
var localDetail = JSON.parse(localStorage.getItem('localObj'));
|
||||
var localDetails = ipCookie('cookiechk');
|
||||
$scope.searchLoading = false;
|
||||
$scope.searchData = {
|
||||
"date": "",
|
||||
"dateTo": ""
|
||||
}
|
||||
$scope.init = function () {
|
||||
if (localDetail != null) {
|
||||
$scope.currentDate = new Date();
|
||||
var formate = "dd-MM-yyyy";
|
||||
$scope.searchData.date = $filter('date')(new Date($scope.currentDate), formate);
|
||||
$scope.searchData.dateTo = $filter('date')(new Date($scope.currentDate), formate);
|
||||
$scope.getSmsReport();
|
||||
} else {
|
||||
}
|
||||
};
|
||||
|
||||
// change from date, update and call search functionality
|
||||
$scope.changeDate = function () {
|
||||
if ($scope.searchData.date !== undefined) {
|
||||
var formate = "dd-MM-yyyy";
|
||||
$scope.searchData.date = $filter('date')(new Date($scope.searchData.date), formate);
|
||||
$scope.getSmsReport();
|
||||
} else {
|
||||
$scope.searchData.date = '';
|
||||
$scope.getSmsReport();
|
||||
}
|
||||
}
|
||||
|
||||
// change to date, update and call search functionality
|
||||
$scope.changeToDate = function () {
|
||||
if ($scope.searchData.dateTo !== undefined) {
|
||||
var formate = "dd-MM-yyyy";
|
||||
$scope.searchData.dateTo = $filter('date')(new Date($scope.searchData.dateTo), formate);
|
||||
$scope.getSmsReport();
|
||||
} else {
|
||||
$scope.searchData.dateTo = '';
|
||||
$scope.getSmsReport();
|
||||
}
|
||||
}
|
||||
|
||||
$scope.resData = '';
|
||||
// get report for the smssended
|
||||
$scope.getSmsReport = function() {
|
||||
// console.log($scope.searchData);
|
||||
$scope.searchLoading = true;
|
||||
var getSearchDetails = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getSMSSendReportList/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
data: $scope.searchData,
|
||||
requestDetails: localDetails
|
||||
}
|
||||
};
|
||||
$http(getSearchDetails).then(function (response) {
|
||||
if (response.data.smsSendDetailsListStatus) {
|
||||
$scope.resData = response.data.smsSendDetailsList;
|
||||
$scope.searchLoading = false;
|
||||
} else {
|
||||
$scope.searchLoading = false;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$scope.setEditId = function (P) {
|
||||
// alert(P);
|
||||
$scope.editId = P;
|
||||
}
|
||||
|
||||
$scope.cancel = function () {
|
||||
$scope.editId = -1;
|
||||
}
|
||||
|
||||
$scope.resGroupSendData = '';
|
||||
$scope.getPartMesgDetailsLoading = false;
|
||||
$scope.prevNoRecordFound = false;
|
||||
$scope.getPartMesgDetails = function(p) {
|
||||
$scope.getPartMesgDetailsLoading = true;
|
||||
var getMsgDetails = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getSMSGroupDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
data: p.MsgGroup,
|
||||
requestDetails: localDetails
|
||||
}
|
||||
};
|
||||
$http(getMsgDetails).then(function (response) {
|
||||
if (response.data.smsSendGroupDetailsListStatus) {
|
||||
$scope.resGroupSendData = response.data.smsSendGroupDetailsList;
|
||||
$scope.prevNoRecordFound = true;
|
||||
$scope.getPartMesgDetailsLoading = false;
|
||||
} else {
|
||||
$scope.prevNoRecordFound = false;
|
||||
$scope.getPartMesgDetailsLoading = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}]);
|
||||
@ -175,7 +175,7 @@ app.controller('sendSMSsuperadminCtrl', ["$scope", "$filter", "ngTableParams", "
|
||||
|
||||
}
|
||||
|
||||
$scope.statusUpdate = {
|
||||
$scope.statusUpdate = {
|
||||
submit: function (form, msg_details) {
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
@ -242,4 +242,28 @@ app.controller('sendSMSsuperadminCtrl', ["$scope", "$filter", "ngTableParams", "
|
||||
}
|
||||
}
|
||||
|
||||
// get report for the smssended
|
||||
$scope.getSmsReport = function() {
|
||||
// console.log($scope.searchData);
|
||||
var getSearchDetails = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getSMSSendReportList/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
data: $scope.searchData,
|
||||
requestDetails: localDetails
|
||||
}
|
||||
};
|
||||
$http(getSearchDetails).then(function (response) {
|
||||
if (response.data.searchResult) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
}]);
|
||||
|
||||
@ -204,19 +204,32 @@
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<!--<li ng-class="{'active open':$state.includes('app.sendSMSPage')}">
|
||||
<a ui-sref="app.sendSMSPage">
|
||||
<li ng-class="{'active open':$state.includes('app.broadCast')}">
|
||||
<a href="javascript:void(0)">
|
||||
<div class="item-content">
|
||||
<div class="item-media">
|
||||
<i class="ti-id-badge"></i>
|
||||
</div>
|
||||
<div class="item-inner">
|
||||
<span class="title" translate="sidebar.nav.sendSMSPage.MAIN">SEND SMS</span>
|
||||
<span class="title" translate="sidebar.nav.sendSMSPage.MAIN">BROADCAST</span><i class="icon-arrow"></i>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
</li>-->
|
||||
<ul class="sub-menu">
|
||||
<li ui-sref-active="active">
|
||||
<a ui-sref="app.broadCast.sendSMSPage">
|
||||
<span class="title" translate="sidebar.nav.sendSMSPage.SENDSMS">SEND SMS</span>
|
||||
</a>
|
||||
</li>
|
||||
<li ui-sref-active="active">
|
||||
<a ui-sref="app.broadCast.sendSMSDetails">
|
||||
<span class="title" translate="sidebar.nav.sendSMSPage.SENDSMSDETAILS">SEND SMS</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
<li ng-class="{'active open':$state.includes('app.myprofile')}">
|
||||
<a ui-sref="app.myprofile">
|
||||
<div class="item-content">
|
||||
|
||||
40
Apollo/assets/views/sendSMS/listingViewOfSMSSendDetails.html
Normal file
40
Apollo/assets/views/sendSMS/listingViewOfSMSSendDetails.html
Normal file
@ -0,0 +1,40 @@
|
||||
<div >
|
||||
<div class="container" style="background-color: rgb(248, 248, 248);
|
||||
border-radius: 6px;padding: 22px;" ng-init="getPartMesgDetails(p)">
|
||||
<div ng-if="getPartMesgDetailsLoading" class="text-center">
|
||||
<h3>Fetching ...</h3>
|
||||
</div>
|
||||
<div ng-if="!getPartMesgDetailsLoading">
|
||||
<div ng-if="resGroupSendData.length > 0">
|
||||
<table class="table">
|
||||
<thead style="background-color: cadetblue">
|
||||
<th>Message Id</th>
|
||||
<th>Mobile Number</th>
|
||||
<th>Delivery Status</th>
|
||||
<th>Delivery On</th>
|
||||
</thead>
|
||||
<tbody dir-paginate="s in resGroupSendData |orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:3:">
|
||||
<th>{{s.MsgId}}</th>
|
||||
<td>{{s.MobileNumber}}</td>
|
||||
<td>{{s.DeliveredStatus}}</td>
|
||||
<td>{{s.DeliveredOn}}</td>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<dir-pagination-controls max-size="3" direction-links="true" boundary-links="true" pagination-id="{{p.MsgId}}">
|
||||
</dir-pagination-controls>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div ng-if="resGroupSendData.length === 0">
|
||||
<p style="color: red;" align="center"><strong><h4 class="text-center">No
|
||||
Status Details Exist ... </h4></strong></p>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<button type="reset" class="btn btn-warning btn-sm" tabindex="20" ng-click="cancel()">
|
||||
Cancel
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
158
Apollo/assets/views/sendSMS/sendSMSDetailssuperadmin.html
Normal file
158
Apollo/assets/views/sendSMS/sendSMSDetailssuperadmin.html
Normal file
@ -0,0 +1,158 @@
|
||||
<!-- start: PAGE TITLE -->
|
||||
<section id="page-title">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<h1 class="mainTitle" translate="sidebar.nav.sendSMSPage.MAIN">{{ mainTitle }}</h1>
|
||||
</div>
|
||||
<div ncy-breadcrumb></div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- end: PAGE TITLE -->
|
||||
<!-- start: SEND SMS -->
|
||||
<div class="container-fluid container-fullw bg-white">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- /// controller: 'UserCtrl' - localtion: assets/js/controllers/sendSMSsuperadminCtrl.js /// -->
|
||||
<div ng-controller="sendSMSDetailssuperadminCtrl" ng-init="init()">
|
||||
<!--<h1>D</h1>-->
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<!--<pre>{{searchData.date}}</pre>-->
|
||||
<div data-ng-controller="DatepickerDemoCtrl">
|
||||
<label>
|
||||
From Date
|
||||
</label>
|
||||
<input type="text" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="searchData.date"
|
||||
is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions"
|
||||
placeholder="Select Date" close-text="Close" required="required" ng-change="changeDate()" show-button-bar="true"
|
||||
/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<!--<pre>{{searchData.date}}</pre>-->
|
||||
<div data-ng-controller="DatepickerDemoCtrl">
|
||||
<label>
|
||||
To Date
|
||||
</label>
|
||||
<input type="text" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="searchData.dateTo"
|
||||
is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions"
|
||||
placeholder="Select Date" close-text="Close" required="required" ng-change="changeToDate()" show-button-bar="true"
|
||||
/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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">loading...</h4>
|
||||
</div>
|
||||
<!--search loading end-->
|
||||
</div>
|
||||
|
||||
<!--<pre>{{resData.length}}</pre>-->
|
||||
<div ng-if="resData.length === 0">
|
||||
<div class="center">
|
||||
<p style="color: red;" align="center"><strong><h3 class="text-center">No
|
||||
records found... </h3></strong></p>
|
||||
</div>
|
||||
</div>
|
||||
<!--<pre>{{resData.length}}</pre>-->
|
||||
<div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div ng-if="resData.length > 0">
|
||||
<div class="table-responsive">
|
||||
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Message
|
||||
</th>
|
||||
<th>Message Count
|
||||
</th>
|
||||
<th>Send On
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody dir-paginate="p in resData|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:3">
|
||||
<tr>
|
||||
<td>{{p.MsgBody}} {{$index}}</td>
|
||||
<td>{{p.MSG_SEND_CNT}}</td>
|
||||
<td>{{p.CreatedOn}}</td>
|
||||
<td class="center">
|
||||
<span> <i tooltip="VIEW DETAILS" class="glyphicon glyphicon-list-alt" ng-click="setEditId(p.MsgId)"></i> </span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr ng-show="editId ===p.MsgId" ng-if="editId === p.MsgId">
|
||||
<td colspan="4">
|
||||
<!--<td colspan="4" ng-include src="'assets/views/sendSMS/listingViewOfSMSSendDetails.html'"></td>-->
|
||||
|
||||
<div class="container" style="background-color: rgb(248, 248, 248);
|
||||
border-radius: 6px;padding: 22px;" ng-init="getPartMesgDetails(p)">
|
||||
<div ng-if="getPartMesgDetailsLoading" class="text-center">
|
||||
<h3>Fetching ...</h3>
|
||||
</div>
|
||||
<div ng-if="!getPartMesgDetailsLoading">
|
||||
<div ng-if="resGroupSendData.length > 0">
|
||||
<table class="table">
|
||||
<thead style="background-color: cadetblue">
|
||||
<th>Message Id</th>
|
||||
<th>Mobile Number</th>
|
||||
<th>Delivery Status</th>
|
||||
<th>Delivery On</th>
|
||||
</thead>
|
||||
<tbody dir-paginate="s in resGroupSendData |orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:3|12">
|
||||
<th>{{s.MsgId}}</th>
|
||||
<td>{{s.MobileNumber}}</td>
|
||||
<td>{{s.DeliveredStatus}}</td>
|
||||
<td>{{s.DeliveredOn}}</td>
|
||||
</tbody>
|
||||
</table>
|
||||
<dir-pagination-controls max-size="3" direction-links="true" boundary-links="true" pagination-id="12">
|
||||
</dir-pagination-controls>
|
||||
</div>
|
||||
<div ng-if="resGroupSendData.length === 0">
|
||||
<p style="color: red;" align="center"><strong><h4 class="text-center">No
|
||||
Status Details Exist ... </h4></strong></p>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<button type="reset" class="btn btn-warning btn-sm" tabindex="20" ng-click="cancel()">
|
||||
Cancel
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<dir-pagination-controls max-size="3" direction-links="true" boundary-links="true">
|
||||
</dir-pagination-controls>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--studen search result end-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end: SEND SMS -->
|
||||
<section id="page-title">
|
||||
<div class="row">
|
||||
<!--<div class="col-sm-8">
|
||||
<h1 class="mainTitle" translate="sidebar.nav.profile.MAIN">{{ mainTitle }}</h1>
|
||||
</div>
|
||||
<div ncy-breadcrumb></div>-->
|
||||
</div>
|
||||
</section>
|
||||
Loading…
Reference in New Issue
Block a user