f1d28282 by Prashant Jadhav

requirement changes

1 parent 7e12ab23
......@@ -90,7 +90,7 @@ class DialerController extends Controller {
if(!empty($roclientstr))$roclientstr="and client in (".implode(",",$roclientstr).")";else $roclientstr="";
$users=array();$callnumber=$kstychCall['callnumber'];
//code by prashant Jadhav for manual calls on alternate number and same mobile number assign to different records then it shows another customer info while dialing--------
//code by prashant Jadhav for manual calls on alternate number and same mobile number assign to different records then it shows another customer info while dialing--------
if($kstychCall['crmid'])
{
$crmid=$kstychCall['previewcrmid'];
......@@ -471,6 +471,7 @@ if($action=="closecall")
$crmcall->userstatus =$kstychCall["userstatus"];
$crmcall->usersubstatus =$kstychCall["usersubstatus"];
$crmcall->usercallback =$kstychCall["usercallback"];
$crmcall->attempt =$kstychCall["attempt"];//attempt dropdown value insert.
//preg_replace("/[^ \w]+/", "", $kstychCall["userremarks"]);
$crmcall->userremarks =preg_replace("/[^ \w]+/","", $kstychCall["userremarks"]);
......@@ -757,10 +758,10 @@ if($action=="recarchive")
}
public function show($id)
{
if(time()>strtotime('14:30:00') || time()<strtotime('03:30:00'))
/*if(time()>strtotime('14:30:00') || time()<strtotime('03:30:00'))
{
Session::flush();
}
}*/
if($id=="bucketdata")
{
......@@ -840,14 +841,14 @@ public function show($id)
else if($bucket=="Called")$dbres=$wakka->getPersons("status='Called' $owclientstr limit $bs,$bl");
else if($bucket=="Priority")$dbres=$wakka->getPersons("status='Priority' $owclientstr limit $bs,$bl");
else if($bucket=="Flagged-Called")$dbres=$wakka->getPersons("dialer_flag='VIP' and currentstatus='$currentstatus' and legalstatus='$legalstatus' $owclientstr limit $bs,$bl");
else if($bucket=="Flagged-Notcalled")$dbres=$wakka->getPersons("mf_isa='VIP' and currentstatus='$currentstatus' and legalstatus='$legalstatus' and status='New' $owclientstr limit $bs,$bl");
else if($bucket=="Flagged-Notcalled")$dbres=$wakka->getPersons("mf_isa='VIP' and currentstatus='$currentstatus' and legalstatus='$legalstatus' $owclientstr limit $bs,$bl");
else if($bucket=="MissedCalls")
{
$udidlinesstr = array();
foreach($didlinesstr as $didlinestr){
$didlinestrArr=explode(":",$didlinestr);
$udidlinesstr[] = substr($didlinestrArr[0], -8);
$udidlinesstr[] = substr($didlinestrArr[0], env('didnumber'));
}
$mc=CRMCall::where('userstatus','=','InboundDROP')->where('created_at','>',date('Y-m-d H:i:s',time()-(7*24*60*60)));
......@@ -957,14 +958,38 @@ public function show($id)
if($bucket=="MissedCalls"){
$type="Inbound";
}
$rows.="<td><a href=# class='' onclick='dialerQuickOpen(\"$dbrow[id]\",\"$dbrow[mobile]\",\"Manual\",\"\",0);return false;'><i class='fa fa-phone'></i></a></td>
<td>$k</td>
//onclick call disable for the manual mode is not assign to user code by prashant Jadhav
$userdialmode=Auth::user()->dialmode_assign;
$userdialmode=explode(",",$userdialmode);
if(in_array('Manual',$userdialmode))
{
$rows.="<td><a href=# class='' onclick='dialerQuickOpen(\"$dbrow[id]\",\"$dbrow[mobile]\",\"Manual\",\"\",0);return false;'><i class='fa fa-phone'></i></a></td>";
}
else
{
$rows.="<td><a href=# class='' return false;'><i class='fa fa-phone'></i></a></td>";
}
$rows.="<td>$k</td>
<td title='$dbrow[id]'>$dbrow[client]</td>
<td title=''>$dbrow[clientinternalid]</td>
<td title=''>$dbrow[clientcode]</td>
<td>$dbrow[firstname]</td>
<td><a href=# class='' onclick='dialerQuickOpen(\"$dbrow[id]\",\"$dbrow[mobile]\",\"Manual\",\"\",0);return false;'>$dbrow[mobile]</a></td>
<td>$type</td>
<td>$dbrow[firstname]</td>";
if(in_array('Manual',$userdialmode))
{
$rows.="<td><a href=# class='' onclick='dialerQuickOpen(\"$dbrow[id]\",\"$dbrow[mobile]\",\"Manual\",\"\",0);return false;'>$dbrow[mobile]</a></td>";
}
else
{
$rows.="<td><a href=# class='' return false;'>$dbrow[mobile]</a></td>";
}
$rows.="<td>$type</td>
<td>$lasttime</td>
<td title='$subdispo :: $remarks'>$dispo</td>
<td>$followup</td>
......@@ -1120,14 +1145,14 @@ public function show($id)
if($type != "" && $id != ""){
if($type == "category"){
$output = "<option value=''>Select Category</option>";
$category = DB::table("relationship_category")->where("service_id",$id)->where("title","!=","")->get();
$category = DB::table("relationship_category")->where("service_id",$id)->where("title","!=","")->where("status","=","Active")->get();
foreach($category as $cat){
$output .= "<option value='".$cat->id."'>".$cat->title."</option>";
}
return $output;
}else if($type == "subCategory"){
$output = "<option value=''>Select Sub Category</option>";
$subCategory = DB::table("relationship_sub_category")->where("category_id",$id)->where("title","!=","")->get();
$subCategory = DB::table("relationship_sub_category")->where("category_id",$id)->where("title","!=","")->where("status","=","Active")->get();
foreach($subCategory as $cat){
$output .= "<option value='".$cat->title."'>".$cat->title."</option>";
}
......@@ -1185,11 +1210,11 @@ public function show($id)
$udidlinesstr = array();
foreach($didlinesstr as $didlinestr){
$didlinestrArr=explode(":",$didlinestr);
$udidlinesstr[] = substr($didlinestrArr[0], -8);
$udidlinesstr[] = substr($didlinestrArr[0], env('didnumber'));
}
/*$mc=CRMCall::where('userstatus','=','InboundDROP')->where('created_at','>=',date('Y-m-d H:i:s',time()-15*60));*/
$mc=CRMCall::where('userstatus','=','InboundDROP')->where('created_at','<',date('Y-m-d H:i:s',time()-(15*60)));
$mc=CRMCall::where('userstatus','=','InboundDROP')->where('created_at','>',date('Y-m-d H:i:s',time()-(7*24*60*60)));
$mc=$mc->where(function ($query) use($roclientlst,$udidlinesstr){
$query->orWhereIn('client',$roclientlst)->orWhereIn('did',$udidlinesstr);
});
......@@ -1227,7 +1252,7 @@ public function show($id)
$reccrm_ids[] = "'".$recordValue[0]->id."'";
}
else{
$dbres[]=array('client'=>$lcall->client,'mobile'=>substr($lcall->number,-10),'callid'=>$lcall->id);
$dbres[]=array('client'=>$lcall->client,'mobile'=>substr($lcall->number,-10),'callid'=>$lcall->id,'datetime'=>$lcall->updated_at);
}
}
}
......@@ -1243,9 +1268,9 @@ public function show($id)
foreach ($dbres as $dbrow)
{
$mobile.= $dbrow['mobile']."-".$dbrow['client'].",";
$mobile.= $dbrow['mobile']."-".$dbrow['client']."-".$dbrow['datetime'].",";
}
return "<script>simpleNotification('error','topRight','Missed call is pending for ".$mobile." !')</script>";
return "<script>alert('Missed call is pending for :-----".$mobile." !')</script>";
//echo "<pre>".print_r($dbres)."</pre>";
}
else
......
......@@ -208,5 +208,15 @@ class RecordController extends Controller {
return view('layout.module.record.commentsUpload',$data);
}
public function rlpPbwise()
{
$data = array();
$pbcode=Input::get('pbcode');
$data['pbcode']=$pbcode;
return view('layout.module.record.rlppbwise',$data);
}
}
......
......@@ -91,5 +91,7 @@ Route::group(['middleware' => ['web']], function () {
Route::post('racingcustupdate',array('uses'=> 'RacingCustomerController@updateracingcust', 'as'=>'upload.updateraccust'));
Route::get('dialmode', array('uses'=> 'DialModeController@dialmodeview', 'as'=>'view.module'));
Route::post('dialmodeassign', array('uses'=> 'DialModeController@dialmodeassign', 'as'=>'assign.dialmodes'));
//for the rlp pbwise
Route::get('rlp', array('uses'=> 'RecordController@rlpPbwise', 'as'=>'rlppb.comments'));
});
......
......@@ -584,6 +584,19 @@ $data.="</div><div style='width:49%;float:left'>
<label class=label-small_new style='width:25%;' title=''>Call Remarks:</label>
<textarea id='dialer_fullremarks' name='fullremarks' style='width:70%' maxlength=4000></textarea>
</p>";
$attemptsval="";
for($i=1;$i<=50;$i++)
{
$attemptsval.="<option value='".$i."'>".$i."</option>";
}
$data.="<p style='clear:both'>
<label class=label-small_new style='width:25%;' title=''>Attempts: </label>
<select class='form_hrm_select' id='attempt' name='attempt' style='width:50%'>'".$attemptsval."'
</select>
</p>";
//Supervisor Comments - By Manish on 16/02/17
/*if($dataarr['clientcode'])
......
// variable comes from env file: envCallback
var loggedin=0;
var sTransferNumber;
......@@ -56,6 +54,7 @@ kstychCall['userstatus']='';
kstychCall['usersubstatus']='';
kstychCall['usercallback']='';
kstychCall['userremarks']='';
kstychCall["attempt"]='';
kstychCall['fullremark']='';
kstychCall['agentcomments']='';
kstychCall['supcomntid']='';
......@@ -280,9 +279,11 @@ function kCallAction(num,action)
function dialerDispNumberClick()
{
var lastnumber=$("#spandialer_num").html();
kstychCall['callWrapupTime']=300;
if(kstychCall['mCallState']=="Dispo")
{
saveCloseDialerCall("REDIAL");
}
}
......@@ -425,7 +426,7 @@ function incomingPopupAlert(var1,var2,var3)
duration:1500,
interval:500
});
incomingbeepstart();
//incomingbeepstart();
kDesktopNotification("",var1,var2,1500);
}
......@@ -550,7 +551,7 @@ function saveCloseDialerCall(flag)
kstychCall['userstatus']=$('#dialer_userstatus').val();
kstychCall['usersubstatus']=$('#dialer_usersubstatus').val();
kstychCall['usercallback']=$('#dialer_usercallback').val();
kstychCall["attempt"]=$('#attempt').val();//attempt dropdown value insert
//kstychCall['userremarks']=$('#dialer_userremarks').val();
//4000 character limit remark By PrashanT Jadhav
......@@ -601,6 +602,7 @@ function saveCloseDialerCall(flag)
kstychCall['usercallback']="";
kstychCall['userremarks']="";
kstychCall['userflag']="";
kstychCall["attempt"]="";
$('#dialer_usercallback').val("");
}
......@@ -1226,6 +1228,7 @@ function dialerTimersUpdate()
}
else if(kstychCall['ts_Talk']>1)
{
kstychCall['callWrapupTime']=300;
dispT="Talk : "+Math.ceil(((getNowTS()-kstychCall['ts_Talk'])/1000));
$("#spandialer_ts").html(dispT);
$("#dialertimes1").removeClass("btn-primary").addClass("btn-default");
......
......@@ -221,7 +221,10 @@ function waitKeyUpRun(varid,fncall,wttime)
function menuAction(menu)
{
$(".homemenu").removeClass("active");
doAjax(menu,'','content','ajax_'+menu,'singlethis','GET');
if(menu=='rlp'){
pbcode=$('#tcampaign_select').val();
doAjax(menu+'?pbcode='+pbcode,'','content','ajax_'+menu,'singlethis','GET');
}else doAjax(menu,'','content','ajax_'+menu,'singlethis','GET');
var menuparts=menu.split("?");
if(menuparts[0]=='dashboard'){$("#mainmenuhome").addClass("active");$("#mmainmenuhome").addClass("active");}
......
......@@ -355,9 +355,9 @@ if($user->usertype=="Supervisor"||$user->usertype=="Admin")
<script>
function doSomething() {
doAjax("dialer/missedcallalert","","missedcalalertid","","","GET");
//doAjax("dialer/relationship?type=category&id="+id,"","relationshipCategory","","","GET");
doAjax("dialer/missedcallalert","","missedcalalertid","","","GET");// //doAjax("dialer/relationship?type=category&id="+id,"","relationshipCategory","","","GET");
}
setInterval(doSomething, 60000);
setInterval(doSomething, 900000);
//setInterval(doSomething, 60000);
</script>
<?php } ?>
......
......@@ -54,6 +54,8 @@ kstychCall['userstatus']='';
kstychCall['usersubstatus']='';
kstychCall['usercallback']='';
kstychCall['userremarks']='';
kstychCall["attempt"]='';
kstychCall['fullremark']='';
kstychCall['agentcomments']='';
kstychCall['supcomntid']='';
kstychCall['userdata']={};
......@@ -183,6 +185,8 @@ function dialerQuickOpen(varid,num,state,substate,autorun)
{
simpleNotification('error','topRight',"Already on call!");
}
$("#dialerstate_btn").parent().attr("disabled",true);
}
function dialerAddAlt(i,varid)
{
......@@ -275,9 +279,11 @@ function kCallAction(num,action)
function dialerDispNumberClick()
{
var lastnumber=$("#spandialer_num").html();
kstychCall['callWrapupTime']=300;
if(kstychCall['mCallState']=="Dispo")
{
saveCloseDialerCall("REDIAL");
}
}
......@@ -420,7 +426,7 @@ function incomingPopupAlert(var1,var2,var3)
duration:1500,
interval:500
});
//incomingbeepstart();
kDesktopNotification("",var1,var2,1500);
}
......@@ -428,15 +434,17 @@ function outgoingCall()
{
$("#dialersearchresults").html("");
kSetDData('C','callnumber',$("#manualdialnumber_txt").val());
//console.log("kstychcall--"+JSON.stringify(kstychCall));
var datastr="kstychCall="+JSON.stringify(kstychCall);
datastr+="&kstychDialer="+JSON.stringify(kstychDialer);
var client = $('#tcampaign_select').val();
if(kstychDialer['mDialerState']=="Manual")
{
if(kstychCall['callnumber']!="")
{
doAjax('dialer?action=newcall',datastr,'dialersearchresults', 'ajax_manualdial','singlefail','POST', function(retstr){
doAjax('dialer?action=newcall&client='+client,datastr,'dialersearchresults', 'ajax_manualdial','singlefail','POST', function(retstr){
if(kstychCall['crmid']!="")
{
kSetDData('C','mCallState','Call');
......@@ -462,7 +470,7 @@ function outgoingCall()
}
if(kstychDialer['mDialerState']=="DialNext")
{
doAjax('dialer?action=newcall',datastr,'dialersearchresults', 'ajax_manualdial','singlefail','POST', function(retstr){
doAjax('dialer?action=newcall&client='+client,datastr,'dialersearchresults', 'ajax_manualdial','singlefail','POST', function(retstr){
if(kstychCall['crmid']!="")
{
kSetDData('C','mCallState','Call');
......@@ -481,7 +489,7 @@ function outgoingCall()
}
if(kstychDialer['mDialerState']=="Progressive")
{
doAjax('dialer?action=newcall',datastr,'dialersearchresults', 'ajax_manualdial','singlefail','POST', function(retstr){
doAjax('dialer?action=newcall&client='+client,datastr,'dialersearchresults', 'ajax_manualdial','singlefail','POST', function(retstr){
if(kstychCall['crmid']!="")
{
kSetDData('C','mCallState','Call');
......@@ -543,10 +551,16 @@ function saveCloseDialerCall(flag)
kstychCall['userstatus']=$('#dialer_userstatus').val();
kstychCall['usersubstatus']=$('#dialer_usersubstatus').val();
kstychCall['usercallback']=$('#dialer_usercallback').val();
kstychCall['userremarks']=$('#dialer_userremarks').val();
kstychCall["attempt"]=$('#attempt').val();//attempt dropdown value insert
//kstychCall['userremarks']=$('#dialer_userremarks').val();
//4000 character limit remark By PrashanT Jadhav
kstychCall['fullremark']=$('#dialer_fullremarks').val();
kstychCall['userflag']=$('#dialer_flag').val();
kstychCall['priority']=$('#priority').val();
kstychCall['bttc_day']=$('#bttc_day').val();
kstychCall['bttc_hrs']=$('#bttc_hrs').val();
kstychCall['serv_vs_prod']=$('#serv_vs_prod').val();
......@@ -557,6 +571,7 @@ function saveCloseDialerCall(flag)
//Supervisor Call Management Value - By Manish on 16-02-17
kstychCall['agentcomments']=$('#agent_comment').val();
kstychCall['supcomntid']=$('#sup_comnt_id').val();
var client = $('#tcampaign_select').val();
if(typeof customerDispofields != 'undefined')kstychCall['userdata']=customerDispofields;
......@@ -651,6 +666,7 @@ function saveCloseDialerCall(flag)
var datastr="kstychCall="+JSON.stringify(kstychCall);
datastr+="&kstychDialer="+JSON.stringify(kstychDialer);
//console.log("datastr----"+datastr);
doAjax('dialer?action=closecall',datastr,'', 'ajax_manualdial','singlefail','POST',
function(retstr){
kSetDData('C','mCallState',"Close");
......@@ -778,8 +794,8 @@ function resetDialer()
var dialerResetForceState=kstychDialer['mDialerState'];
var dialerResetForceSubState=kstychDialer['mDialerSubState'];
//dialerResetForceState="Progressive";//Hardcoded TODO change to config
//dialerResetForceSubState="";
dialerResetForceState="Progressive";//Hardcoded TODO change to config
dialerResetForceSubState="";
if(kstychCall['userstatus']=="AUTOWRAPUP")
{
......@@ -871,7 +887,9 @@ function updateDialerState(objstr,key,val,key2,val2)
var datastr="kstychCall="+JSON.stringify(kstychCall);
datastr+="&kstychDialer="+JSON.stringify(kstychDialer);
doAjax('dialer?action=dialerstate',datastr,'', 'ajax_manualdial','singlefail','POST',
var client = $('#tcampaign_select').val();
doAjax('dialer?action=dialerstate&client='+client,datastr,'', 'ajax_manualdial','singlefail','POST',
function(retstr){
// if(val=="Progressive"||(kstychCall['previewcrmid']!=""&&kstychCall['previewcrmid']>0))
......@@ -911,7 +929,7 @@ function updateDialerState(objstr,key,val,key2,val2)
if(val=="Progressive"||(kstychCall['previewcrmid']!=""&&kstychCall['previewcrmid']>0))
{
doAjax('dialer?action=previewnext',datastr,'dialersearchresults', 'ajax_manualdial2','singlefail','POST',
doAjax('dialer?action=previewnext&client='+client,datastr,'dialersearchresults', 'ajax_manualdial2','singlefail','POST',
function(retstr){
if(kstychCall['previewcrmid']!="")
{
......@@ -1124,7 +1142,7 @@ function updateDialerUI()
//////////////////////////////////////////////////////////////
if(kstychCall['mCallState']=="Wait")
{
$("#dialerstate_btn").parent().attr("disabled",false);
if(kstychDialer['mDialerState']!="Manual"){$("#dialerstate_btn").parent().attr("disabled",false)};
if(kstychDialer['mmanualallow']=='Yes')$("#manualdialnumber_txt").attr("disabled",false);
else $("#manualdialnumber_txt").attr("disabled",true);
......@@ -1209,6 +1227,7 @@ function dialerTimersUpdate()
}
else if(kstychCall['ts_Talk']>1)
{
kstychCall['callWrapupTime']=300;
dispT="Talk : "+Math.ceil(((getNowTS()-kstychCall['ts_Talk'])/1000));
$("#spandialer_ts").html(dispT);
$("#dialertimes1").removeClass("btn-primary").addClass("btn-default");
......@@ -1640,7 +1659,14 @@ function stopRingbackTone() {
try { ringbacktone.pause(); }
catch (e) { }
}
function incomingbeepstart() {
try { incomingbeep.play(); }
catch (e) { }
}
function incomingbeepstop() {
try { incomingbeep.pause(); }
catch (e) { }
}
function toggleFullScreen() {
if (videoRemote.webkitSupportsFullscreen) {
fullScreen(!videoRemote.webkitDisplayingFullscreen);
......
......@@ -7,40 +7,49 @@ use App\Models\SupervisonComments;
$wakka = new KHRMSLib();
$dashboarduser=Auth::user();
$agents=array();
//$agents=array();
$sup_status="";
if(isset($_GET['logdate']))$logdate=strtotime($_GET['logdate']." 00:00:00");
else $logdate=strtotime(date('Y-m-d')." 00:00:00");
if(isset($_GET['logtodate']))$logtodate=strtotime($_GET['logtodate']." 23:59:59");
else $logtodate=strtotime(date('Y-m-d')." 23:59:59");
if(isset($_GET['agents'])) $agents=$_GET['agents'];
else $agents="";
if(isset($_GET['sup_status'])) $sup_status=$_GET['sup_status'];
else $sup_status="";
if(isset($_GET['agents']))
{
$agents[]=$_GET['agents'];
/*$pb_code=implode(",",$agents);
echo "-----".$$pb_code;*/
}
else $agents="";
$userarr=array();$i=1;
$reportarray=array();
$reporthead=array("id","date","pb_name","pb_code","pb_code","pb_landline_contact_no","supervisor_mail_id","group_id","group_id_name","cust_id","cust_name","relationship_with_group_id","cust_id_next","cust_name_next","relationship_with_group_id_next","new_group_addition_to_group","racing_from","supervisor_status","supervisor_update","Submit");
if($agents=="" && $sup_status=="")
{
$reportarray=DB::table('potentialcustomer_details')->select('*')->where('date','>=',date("Y-m-d H:i:s",$logdate))->where('date','<=',date("Y-m-d H:i:s",$logtodate))->get();
}else if($agents!="" && $sup_status==""){
/*$pb_code=implode(",",$agents);
echo "-----".$$pb_code;*/
$reportarray=DB::table('potentialcustomer_details')->select('*')->where('date','>=',date("Y-m-d H:i:s",$logdate))->where('date','<=',date("Y-m-d H:i:s",$logtodate))->where('pb_code','=',$agents)->get();
$userarr=array();$i=1;
$reporthead=array("id","date","pb_name","pb_code","pb_code","pb_landline_contact_no","supervisor_mail_id","group_id","group_id_name","cust_id","cust_name","relationship_with_group_id","cust_id_next","cust_name_next","relationship_with_group_id_next","new_group_addition_to_group","racing_from","supervisor_status","Submit");
}else if($agents=="" && $sup_status!="")
{
if(isset($_GET['agents'])){
print_r($agents);
$reportarray=DB::table('potentialcustomer_details')->select('*')->where('date','>=',date("Y-m-d H:i:s",$logdate))->where('date','<=',date("Y-m-d H:i:s",$logtodate))->whereIn('pb_code',$agents)->get();
/* $reportarray=DB::table('potentialcustomer_details')->select('*')->where('date','>=','"'.date("Y-m-d H:i:s",$logdate).'"')->where('date','<=','"'.date("Y-m-d H:i:s",$logtodate).'"')->where('supervisor_statu','=','"'.$sup_status.'"')->get();*/
$reportarray = DB::select(DB::raw("SELECT * FROM potentialcustomer_details where date >='".date("Y-m-d H:i:s",$logdate)."' and date <= '".date("Y-m-d H:i:s",$logtodate)."' and supervisor_status='".$sup_status."' "));
}else{
$reportarray=DB::table('potentialcustomer_details')->select('*')->where('date','>=',date("Y-m-d H:i:s",$logdate))->where('date','<=',date("Y-m-d H:i:s",$logtodate))->get();
}else{
/*$reportarray=DB::table('potentialcustomer_details')->select('*')->where('date','>=',date("Y-m-d H:i:s",$logdate))->where('date','<=',date("Y-m-d H:i:s",$logtodate))->where('pb_code','=',$agents)->where('supervisor_status','=','"'.$sup_status.'"')->get();*/
$reportarray = DB::select(DB::raw("SELECT * FROM potentialcustomer_details where date >='".date("Y-m-d H:i:s",$logdate)."' and date <= '".date("Y-m-d H:i:s",$logtodate)."' and pb_code = '".$agents."' and supervisor_status='".$sup_status."' "));
}
//echo $reportarray;die();
......@@ -103,6 +112,7 @@ if(Input::has("dllogxls"))
}
//echo "<pre><br>".print_r($reportarray)."</pre>";
$highestColumn = sizeof($reporthead);
$supervisorstatus="";
//echo $highestColumn;
if(count($reportarray)) {
$outhead="<tr>";$outstr="";$id="";
......@@ -115,6 +125,7 @@ if(count($reportarray)) {
foreach($reportarray as $uid=>$uarr)
{
$outstr.="<tr>";
for ($head = 0; $head < $highestColumn; $head++){
if($reporthead[$head]=="date"){
......@@ -123,8 +134,11 @@ if(count($reportarray)) {
if($reporthead[$head]=="id"){
$id=$uarr->$reporthead[$head];
}
if($reporthead[$head]=="supervisor_status"){
$outstr.="<td><select id='".$id."_action_taken'><option value='Pending'>Pending</option><option value='Action Taken'>Action Taken</option><option value='Rejected'>Rejected</option></select></td>";
$supervisorstatus=$uarr->$reporthead[$head];
$outstr.="<td><select id='".$id."_action_taken'><option value=".$supervisorstatus.">".$supervisorstatus."</option><option value='Pending'>Pending</option><option value='Action Taken'>Action Taken</option><option value='Rejected'>Rejected</option></select></td>";
}else if($reporthead[$head]=="Submit"){
$outstr.="<td><input type='button' id='".$id."_save' value='Save' onclick='updatesupervisorfeedback($id);'></td>";
}else {
......@@ -180,21 +194,28 @@ $(document).ready(function()
Date:From <input size=10 id='modfrom' name='modfrom' type='text' value='<?php echo date("Y-m-d",$logdate); ?>' onchange='statusLogReloadFun("");'/>
&nbsp;&nbsp;To<input size=10 id='modto' name='modto' type='text' value='<?php echo date("Y-m-d",$logtodate); ?>' onchange='statusLogReloadFun("");'/>&nbsp;&nbsp;
<!--PB Code:
<select id='usrname' class=select2multi multiple="" style="width: 30%;" > -->
PB Code:
<select id='usrname' class=select2multi style="width: 20%;" >
<?php
/*$companyarr=$wakka->LoadAll("select * from hrms_masters where mtype='company'");
$companyarr=$wakka->LoadAll("select * from hrms_masters where mtype='company'");
foreach($companyarr as $tcompany)
{
$seltxt='';
if(strstr(",".$clientslist.",",",$tcompany[mkey],"))$seltxt='selected="selected"';
echo "<option value='$tcompany[mkey]' $seltxt>$tcompany[mkey]</option>";
}*/
echo "<option value='$agents'>$agents</option> <option value='$tcompany[mkey]' $seltxt>$tcompany[mkey]</option>";
}
?>
<!-- </select>
</select>
Supervisor Status:<select class=select2multi id='sup_status' style="width: 20%;">
<option value=''></option>
<option value='Pending'>Pending</option>
<option value='Action Taken'>Action Taken</option>
<option value='Rejected'>Rejected</option>
</select>
<button class="pull-right btn btn-sm btn-default" onclick='statusLogReloadFun("");return false;' title='Search' style='margin-top:-1px'><i class='fa fa-search'></i>Search</button> -->
<button class="pull-right btn btn-sm btn-default" onclick='statusLogReloadFun("");return false;' title='Search' style='margin-top:-1px'><i class='fa fa-search'></i>Search</button>
</div>
......@@ -209,28 +230,43 @@ Date:From <input size=10 id='modfrom' name='modfrom' type='text' value='<?php ec
<div id=dialoglog></div>
</div>
<script>
function dlAgentlogXls()
{
var agents=$('#usrname').val();
var sup_status=$('#sup_status').val();
if(agents=="" && sup_status=="" ){
window.open('dialer/raicingcustomerreport?dllogxls=1&logdate='+$("#modfrom").val()+'&logtodate='+$("#modto").val());return false;
}else if(sup_status=="" && agents!=""){
window.open('dialer/raicingcustomerreport?dllogxls=1&logdate='+$("#modfrom").val()+'&logtodate='+$("#modto").val()+'&agents='+agents);return false;
}else if(sup_status!="" && agents==""){
window.open('dialer/raicingcustomerreport?dllogxls=1&logdate='+$("#modfrom").val()+'&logtodate='+$("#modto").val()+'&sup_status='+sup_status);return false;
}else{
window.open('dialer/raicingcustomerreport?dllogxls=1&logdate='+$("#modfrom").val()+'&logtodate='+$("#modto").val()+'&agents='+agents+'&sup_status='+sup_status);return false;
}
}
function dataString()
{
/*var agents=$('#usrname').val();
var agentsval=[];
if(agents=="" || agents==null){
var agents=$('#usrname').val();
var sup_status=$('#sup_status').val();
}else
if(agents=="" && sup_status=="" )
{
return 'logdate='+$("#modfrom").val()+'&logtodate='+$("#modto").val()
}
else if(sup_status=="" && agents!="")
{
for(i=0;i<agents.length;i++)
return 'logdate='+$("#modfrom").val()+'&logtodate='+$("#modto").val()+'&agents='+agents;
}else if(sup_status!="" && agents==""){
return 'logdate='+$("#modfrom").val()+'&logtodate='+$("#modto").val()+'&sup_status='+sup_status;
}
else
{
agentsval[i] = "'" + String(agents[i]) + "'";
return 'logdate='+$("#modfrom").val()+'&logtodate='+$("#modto").val()+'&agents='+agents+'&sup_status='+sup_status;
}
agentsval=agentsval.join(",");
return 'logdate='+$("#modfrom").val()+'&logdateto='+$("#modto").val()+'&agents='+agentsval;
}*/
return 'logdate='+$("#modfrom").val()+'&logdateto='+$("#modto").val();
}
function statusLogReloadFun(sortby)
{
......
......@@ -10,11 +10,11 @@ if($dashboarduser->usertype != 'Admin'){
->orWhere('lteam2','=',$dashboarduser->username)
->orWhere('lteam','=',$dashboarduser->username);
})->get();
}
else
{
}
else
{
$allusers=DB::table('users')->select('*')->get();
}
}
foreach($allusers as $user){
......@@ -25,7 +25,7 @@ foreach($allusers as $user){
<td>".$user->fullname."</td>
<td>".$user->dialmode_assign."</td>
</tr>";
</tr>";
}
?>
......@@ -70,9 +70,9 @@ foreach($allusers as $user){
</tr>
</thead>
<?php echo $outstr; ?>
</table>
</div>
<?php echo $outstr; ?>
</table>
</div>
</div>
</div>
</div>
......
<?php
use App\Jobs\KHRMSLib;
use App\Models\CRMCall;
$wakka=new KHRMSLib();
$roclientlst=$wakka->clientsReadAccess();
if(isset($_GET['pbcode']))$pbcode=$_GET['pbcode'];
else $pbcode='';
$alist=DB::table('p11086_cop_rlp_pb_base_uat')
->select(DB::Raw("*"))
->where('pbcode','=',$pbcode)
->get();
//print_r($alist);
?>
<style>#logtable.td{vertical-align:top;}#logtable.tr{height:28px;overflow-y:hidden;}</style>
<div class="layout-app"><!-- row-app -->
<div class="row row-app">
<div class="col-md-12">
<div class="col-separator col-separator-first col-unscrollable box">
<div style='clear:both;margin:2% 0 0 1%;border: 2px solid #F5F5F5;padding:2%;border-radius: 5px;'>
<center><h4>RLP PB WISE</center>
<br>
<div class='container'>
PB CODE:<select id='pb_code' class=select2multi style="width:20%;" onclick="pbcodeSelect();">
<?php foreach($roclientlst as $c){$s="";if($c==$pbcode)$s='selected';echo "<option value='$c' $s>$c</option>";} ?>
</select>
</div>
</div>
</div>
<div style='overflow:auto;margin-top: 10px;'>
<table id='logtable' class='footable table table-striped table-bordered table-white table-primary footable-loaded' style='font-size:12px';margin:0; border:1px solid #BBB;>
<thead>
<tr>
<th>Product</th>
<th>Opportunity</th>
<th>Contacted</th>
<th>Pitched</th>
<th>LG</th>
</tr>
</thead>
<tr>
<td>AL</td>
<td><?php echo $alist[0]->al_qm_opp + $alist[0]->al_upg_opp + $alist[0]->al_al_cnc_opp + $alist[0]->al_pa_opp + $alist[0]->al_zip_opp ?></td>
<td><?php echo $alist[0]->al_called_opp ?></td>
<td><?php echo $alist[0]->al_pitch ?></td>
<td><?php echo $alist[0]->al_lg ?></td>
</tr>
<tr>
<td>PL/BL</td>
<td><?php echo $alist[0]->pl_10sec_opp+$alist[0]->pl_pa_opp+$alist[0]->pl_pq_opp+$alist[0]->bl_10sec_opp+$alist[0]->bl_pq_opp ?></td>
<td><?php echo $alist[0]->pl_called_opp ?></td>
<td><?php echo $alist[0]->pl_pitch ?></td>
<td><?php echo $alist[0]->pl_lg ?></td>
</tr>
<tr>
<td>Retail Assets</td>
<td><?php echo $alist[0]->twl_pa_opp+$alist[0]->hl_pq_opp+$alist[0]->hl_bt_opp+$alist[0]->gl_pitch+$alist[0]->las_opp+$alist[0]->lap_opp ?></td>
<td><?php echo $alist[0]->twl_called_opp+$alist[0]->hl_called_opp+$alist[0]->las_called_opp+$alist[0]->lap_called_opp ?></td>
<td><?php echo $alist[0]->twl_pitch+$alist[0]->hl_pitch+$alist[0]->gl_pitch+$alist[0]->las_pitch ?></td>
<td><?php echo $alist[0]->twl_lg+$alist[0]->hl_lg+$alist[0]->gl_lg+$alist[0]->las_lg+$alist[0]->lap_lg ?></td>
</tr>
<tr>
<td>HSL</td>
<td><?php echo $alist[0]->hsl_opp ?></td>
<td><?php echo $alist[0]->hsl_called_opp ?></td>
<td><?php echo $alist[0]->hsl_pitch ?></td>
<td></td>
</tr>
<tr>
<td>Credit Card- New Sourcing</td>
<td><?php echo $alist[0]->cc_eli_new_opp ?></td>
<td><?php echo $alist[0]->cc_activation_opp ?></td>
<td><?php echo $alist[0]->cc_pitch ?></td>
<td><?php echo $alist[0]->cc_lg ?></td>
</tr>
<tr>
<td>Credit Card- LTD Activation on Carded</td>
<td><?php echo $alist[0]->cc_activation_opp ?></td>
<td><?php echo $alist[0]->cc_activation_called_opp ?></td>
<td></td>
<td</td>
</tr>
<tr>
<td>Insurance LI</td>
<td><?php echo $alist[0]->li_opp ?></td>
<td><?php echo $alist[0]->li_called_opp ?></td>
<td></td>
<td></td>
</tr>
<tr>
<td>FD</td>
<td><?php echo $alist[0]->fd_opp ?></td>
<td><?php echo $alist[0]->fd_called_opp ?></td>
<td><?php echo $alist[0]->fd_pitch ?></td>
<td></td>
</tr>
<tr>
<td>LTD Activation-Savings Account</td>
<td><?php echo $alist[0]->ltd_act_saving_opp ?></td>
<td><?php echo $alist[0]->ltd_act_saving_opp ?></td>
<td></td>
<td></td>
</tr>
<tr>
<td>NB/MB Activations</td>
<td><?php echo $alist[0]->mb_opp ?></td>
<td><?php echo $alist[0]->mb_called_opp ?></td>
<td><?php echo $alist[0]->mb_pitch ?></td>
<td><?php echo $alist[0]->nb_mb_lg ?></td>
</tr>
<tr>
<td>Aadhar Seeding</td>
<td><?php echo $alist[0]->aadhaar_opp ?></td>
<td><?php echo $alist[0]->aadhaar_called_opp ?></td>
<td><?php echo $alist[0]->aadhaar_pitch ?></td>
<td><?php echo $alist[0]->aadhaar_activation ?></td>
</tr>
<tr>
<td>Digital Activation</td>
<td><?php echo $alist[0]->digi2_score_opp ?></td>
<td><?php echo $alist[0]->digi2_score_called_opp ?></td>
<td></td>
<td></td>
</tr>
<tr>
<td>BillPayments</td>
<td><?php echo $alist[0]->digi_billpay_opp ?></td>
<td><?php echo $alist[0]->digi_billpay_called_opp ?></td>
<td><?php echo $alist[0]->bill_pay_pitch ?></td>
<td></td>
</tr>
<tr>
<td>Financial Transactions</td>
<td><?php echo $alist[0]->digi_basic_banking_opp ?></td>
<td><?php echo $alist[0]->digi_basic_banking_called_opp ?></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Digital 2.0 Score(Ecom Shopping Inactive)</td>
<td><?php echo $alist[0]->digi_ecom_shopping_opp ?></td>
<td><?php echo $alist[0]->digi_ecom_shopping_called_opp ?></td>
<td></td>
<td> </td>
</tr>
<tr>
<td>Digital 2.0 Score(Investment Inactive)</td>
<td><?php echo $alist[0]->digi_investment_opp ?></td>
<td><?php echo $alist[0]->digi_investment_called_opp ?></td>
<td><?php echo $alist[0]->invest_pitch ?></td>
<td></td>
</tr>
<tr>
<td>Reduction in Physical Transactions</td>
<td><?php echo $alist[0]->invest_pitch ?></td>
<td><?php echo $alist[0]->invest_pitch ?></td>
<td></td>
<td></td>
</tr>
<tr>
<td>% of Groups Contacted</td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Movement of Groups to higher engagement</td>
<td> </td>
<td> </td>
<td> </td>
<td></td>
</tr>
<tr>
<td>CASA Growth</td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Mutual Fund</td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</div>
<div id=dialoglog></div>
</div>
</div>
</div>
<style>#logtable.td{vertical-align:top;}#logtable.tr{height:28px;overflow-y:hidden;}</style>
<script>
$(document).ready(function()
{
if(!$('#dialoglog').hasClass('ui-dialog-content'))
{
$('#dialoglog').dialog({
autoOpen: false,
width: '70%',
buttons: {
"Ok": function() {
$(this).dialog("close");
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
}
waitKeyUpRun("filter",function() { filter2(document.getElementById('filter'), 'logtable') },"2000");
});
function pbcodeSelect()
{
var pbcode=$('#pb_code').val();
doAjax('rlp?pbcode='+pbcode,'','content','ajax_rlp','singlethis','GET');
}
</script>
\ No newline at end of file
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!