f1d28282 by Prashant Jadhav

requirement changes

1 parent 7e12ab23
...@@ -90,7 +90,7 @@ class DialerController extends Controller { ...@@ -90,7 +90,7 @@ class DialerController extends Controller {
90 if(!empty($roclientstr))$roclientstr="and client in (".implode(",",$roclientstr).")";else $roclientstr=""; 90 if(!empty($roclientstr))$roclientstr="and client in (".implode(",",$roclientstr).")";else $roclientstr="";
91 91
92 $users=array();$callnumber=$kstychCall['callnumber']; 92 $users=array();$callnumber=$kstychCall['callnumber'];
93 //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-------- 93 //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--------
94 if($kstychCall['crmid']) 94 if($kstychCall['crmid'])
95 { 95 {
96 $crmid=$kstychCall['previewcrmid']; 96 $crmid=$kstychCall['previewcrmid'];
...@@ -471,6 +471,7 @@ if($action=="closecall") ...@@ -471,6 +471,7 @@ if($action=="closecall")
471 $crmcall->userstatus =$kstychCall["userstatus"]; 471 $crmcall->userstatus =$kstychCall["userstatus"];
472 $crmcall->usersubstatus =$kstychCall["usersubstatus"]; 472 $crmcall->usersubstatus =$kstychCall["usersubstatus"];
473 $crmcall->usercallback =$kstychCall["usercallback"]; 473 $crmcall->usercallback =$kstychCall["usercallback"];
474 $crmcall->attempt =$kstychCall["attempt"];//attempt dropdown value insert.
474 475
475 //preg_replace("/[^ \w]+/", "", $kstychCall["userremarks"]); 476 //preg_replace("/[^ \w]+/", "", $kstychCall["userremarks"]);
476 $crmcall->userremarks =preg_replace("/[^ \w]+/","", $kstychCall["userremarks"]); 477 $crmcall->userremarks =preg_replace("/[^ \w]+/","", $kstychCall["userremarks"]);
...@@ -757,10 +758,10 @@ if($action=="recarchive") ...@@ -757,10 +758,10 @@ if($action=="recarchive")
757 } 758 }
758 public function show($id) 759 public function show($id)
759 { 760 {
760 if(time()>strtotime('14:30:00') || time()<strtotime('03:30:00')) 761 /*if(time()>strtotime('14:30:00') || time()<strtotime('03:30:00'))
761 { 762 {
762 Session::flush(); 763 Session::flush();
763 } 764 }*/
764 765
765 if($id=="bucketdata") 766 if($id=="bucketdata")
766 { 767 {
...@@ -840,14 +841,14 @@ public function show($id) ...@@ -840,14 +841,14 @@ public function show($id)
840 else if($bucket=="Called")$dbres=$wakka->getPersons("status='Called' $owclientstr limit $bs,$bl"); 841 else if($bucket=="Called")$dbres=$wakka->getPersons("status='Called' $owclientstr limit $bs,$bl");
841 else if($bucket=="Priority")$dbres=$wakka->getPersons("status='Priority' $owclientstr limit $bs,$bl"); 842 else if($bucket=="Priority")$dbres=$wakka->getPersons("status='Priority' $owclientstr limit $bs,$bl");
842 else if($bucket=="Flagged-Called")$dbres=$wakka->getPersons("dialer_flag='VIP' and currentstatus='$currentstatus' and legalstatus='$legalstatus' $owclientstr limit $bs,$bl"); 843 else if($bucket=="Flagged-Called")$dbres=$wakka->getPersons("dialer_flag='VIP' and currentstatus='$currentstatus' and legalstatus='$legalstatus' $owclientstr limit $bs,$bl");
843 else if($bucket=="Flagged-Notcalled")$dbres=$wakka->getPersons("mf_isa='VIP' and currentstatus='$currentstatus' and legalstatus='$legalstatus' and status='New' $owclientstr limit $bs,$bl"); 844 else if($bucket=="Flagged-Notcalled")$dbres=$wakka->getPersons("mf_isa='VIP' and currentstatus='$currentstatus' and legalstatus='$legalstatus' $owclientstr limit $bs,$bl");
844 845
845 else if($bucket=="MissedCalls") 846 else if($bucket=="MissedCalls")
846 { 847 {
847 $udidlinesstr = array(); 848 $udidlinesstr = array();
848 foreach($didlinesstr as $didlinestr){ 849 foreach($didlinesstr as $didlinestr){
849 $didlinestrArr=explode(":",$didlinestr); 850 $didlinestrArr=explode(":",$didlinestr);
850 $udidlinesstr[] = substr($didlinestrArr[0], -8); 851 $udidlinesstr[] = substr($didlinestrArr[0], env('didnumber'));
851 } 852 }
852 853
853 $mc=CRMCall::where('userstatus','=','InboundDROP')->where('created_at','>',date('Y-m-d H:i:s',time()-(7*24*60*60))); 854 $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) ...@@ -957,14 +958,38 @@ public function show($id)
957 if($bucket=="MissedCalls"){ 958 if($bucket=="MissedCalls"){
958 $type="Inbound"; 959 $type="Inbound";
959 } 960 }
960 $rows.="<td><a href=# class='' onclick='dialerQuickOpen(\"$dbrow[id]\",\"$dbrow[mobile]\",\"Manual\",\"\",0);return false;'><i class='fa fa-phone'></i></a></td> 961
961 <td>$k</td> 962 //onclick call disable for the manual mode is not assign to user code by prashant Jadhav
963 $userdialmode=Auth::user()->dialmode_assign;
964 $userdialmode=explode(",",$userdialmode);
965
966 if(in_array('Manual',$userdialmode))
967 {
968 $rows.="<td><a href=# class='' onclick='dialerQuickOpen(\"$dbrow[id]\",\"$dbrow[mobile]\",\"Manual\",\"\",0);return false;'><i class='fa fa-phone'></i></a></td>";
969 }
970 else
971 {
972 $rows.="<td><a href=# class='' return false;'><i class='fa fa-phone'></i></a></td>";
973 }
974
975
976 $rows.="<td>$k</td>
962 <td title='$dbrow[id]'>$dbrow[client]</td> 977 <td title='$dbrow[id]'>$dbrow[client]</td>
963 <td title=''>$dbrow[clientinternalid]</td> 978 <td title=''>$dbrow[clientinternalid]</td>
964 <td title=''>$dbrow[clientcode]</td> 979 <td title=''>$dbrow[clientcode]</td>
965 <td>$dbrow[firstname]</td> 980 <td>$dbrow[firstname]</td>";
966 <td><a href=# class='' onclick='dialerQuickOpen(\"$dbrow[id]\",\"$dbrow[mobile]\",\"Manual\",\"\",0);return false;'>$dbrow[mobile]</a></td> 981
967 <td>$type</td> 982 if(in_array('Manual',$userdialmode))
983 {
984 $rows.="<td><a href=# class='' onclick='dialerQuickOpen(\"$dbrow[id]\",\"$dbrow[mobile]\",\"Manual\",\"\",0);return false;'>$dbrow[mobile]</a></td>";
985 }
986 else
987 {
988 $rows.="<td><a href=# class='' return false;'>$dbrow[mobile]</a></td>";
989 }
990
991
992 $rows.="<td>$type</td>
968 <td>$lasttime</td> 993 <td>$lasttime</td>
969 <td title='$subdispo :: $remarks'>$dispo</td> 994 <td title='$subdispo :: $remarks'>$dispo</td>
970 <td>$followup</td> 995 <td>$followup</td>
...@@ -1120,14 +1145,14 @@ public function show($id) ...@@ -1120,14 +1145,14 @@ public function show($id)
1120 if($type != "" && $id != ""){ 1145 if($type != "" && $id != ""){
1121 if($type == "category"){ 1146 if($type == "category"){
1122 $output = "<option value=''>Select Category</option>"; 1147 $output = "<option value=''>Select Category</option>";
1123 $category = DB::table("relationship_category")->where("service_id",$id)->where("title","!=","")->get(); 1148 $category = DB::table("relationship_category")->where("service_id",$id)->where("title","!=","")->where("status","=","Active")->get();
1124 foreach($category as $cat){ 1149 foreach($category as $cat){
1125 $output .= "<option value='".$cat->id."'>".$cat->title."</option>"; 1150 $output .= "<option value='".$cat->id."'>".$cat->title."</option>";
1126 } 1151 }
1127 return $output; 1152 return $output;
1128 }else if($type == "subCategory"){ 1153 }else if($type == "subCategory"){
1129 $output = "<option value=''>Select Sub Category</option>"; 1154 $output = "<option value=''>Select Sub Category</option>";
1130 $subCategory = DB::table("relationship_sub_category")->where("category_id",$id)->where("title","!=","")->get(); 1155 $subCategory = DB::table("relationship_sub_category")->where("category_id",$id)->where("title","!=","")->where("status","=","Active")->get();
1131 foreach($subCategory as $cat){ 1156 foreach($subCategory as $cat){
1132 $output .= "<option value='".$cat->title."'>".$cat->title."</option>"; 1157 $output .= "<option value='".$cat->title."'>".$cat->title."</option>";
1133 } 1158 }
...@@ -1185,11 +1210,11 @@ public function show($id) ...@@ -1185,11 +1210,11 @@ public function show($id)
1185 $udidlinesstr = array(); 1210 $udidlinesstr = array();
1186 foreach($didlinesstr as $didlinestr){ 1211 foreach($didlinesstr as $didlinestr){
1187 $didlinestrArr=explode(":",$didlinestr); 1212 $didlinestrArr=explode(":",$didlinestr);
1188 $udidlinesstr[] = substr($didlinestrArr[0], -8); 1213 $udidlinesstr[] = substr($didlinestrArr[0], env('didnumber'));
1189 } 1214 }
1190 1215
1191 /*$mc=CRMCall::where('userstatus','=','InboundDROP')->where('created_at','>=',date('Y-m-d H:i:s',time()-15*60));*/ 1216 /*$mc=CRMCall::where('userstatus','=','InboundDROP')->where('created_at','>=',date('Y-m-d H:i:s',time()-15*60));*/
1192 $mc=CRMCall::where('userstatus','=','InboundDROP')->where('created_at','<',date('Y-m-d H:i:s',time()-(15*60))); 1217 $mc=CRMCall::where('userstatus','=','InboundDROP')->where('created_at','>',date('Y-m-d H:i:s',time()-(7*24*60*60)));
1193 $mc=$mc->where(function ($query) use($roclientlst,$udidlinesstr){ 1218 $mc=$mc->where(function ($query) use($roclientlst,$udidlinesstr){
1194 $query->orWhereIn('client',$roclientlst)->orWhereIn('did',$udidlinesstr); 1219 $query->orWhereIn('client',$roclientlst)->orWhereIn('did',$udidlinesstr);
1195 }); 1220 });
...@@ -1227,7 +1252,7 @@ public function show($id) ...@@ -1227,7 +1252,7 @@ public function show($id)
1227 $reccrm_ids[] = "'".$recordValue[0]->id."'"; 1252 $reccrm_ids[] = "'".$recordValue[0]->id."'";
1228 } 1253 }
1229 else{ 1254 else{
1230 $dbres[]=array('client'=>$lcall->client,'mobile'=>substr($lcall->number,-10),'callid'=>$lcall->id); 1255 $dbres[]=array('client'=>$lcall->client,'mobile'=>substr($lcall->number,-10),'callid'=>$lcall->id,'datetime'=>$lcall->updated_at);
1231 } 1256 }
1232 } 1257 }
1233 } 1258 }
...@@ -1243,9 +1268,9 @@ public function show($id) ...@@ -1243,9 +1268,9 @@ public function show($id)
1243 foreach ($dbres as $dbrow) 1268 foreach ($dbres as $dbrow)
1244 { 1269 {
1245 1270
1246 $mobile.= $dbrow['mobile']."-".$dbrow['client'].","; 1271 $mobile.= $dbrow['mobile']."-".$dbrow['client']."-".$dbrow['datetime'].",";
1247 } 1272 }
1248 return "<script>simpleNotification('error','topRight','Missed call is pending for ".$mobile." !')</script>"; 1273 return "<script>alert('Missed call is pending for :-----".$mobile." !')</script>";
1249 //echo "<pre>".print_r($dbres)."</pre>"; 1274 //echo "<pre>".print_r($dbres)."</pre>";
1250 } 1275 }
1251 else 1276 else
......
...@@ -208,5 +208,15 @@ class RecordController extends Controller { ...@@ -208,5 +208,15 @@ class RecordController extends Controller {
208 208
209 return view('layout.module.record.commentsUpload',$data); 209 return view('layout.module.record.commentsUpload',$data);
210 } 210 }
211 public function rlpPbwise()
212 {
213 $data = array();
214
215 $pbcode=Input::get('pbcode');
211 216
217 $data['pbcode']=$pbcode;
218 return view('layout.module.record.rlppbwise',$data);
219
220 }
212 } 221 }
222
......
...@@ -91,5 +91,7 @@ Route::group(['middleware' => ['web']], function () { ...@@ -91,5 +91,7 @@ Route::group(['middleware' => ['web']], function () {
91 Route::post('racingcustupdate',array('uses'=> 'RacingCustomerController@updateracingcust', 'as'=>'upload.updateraccust')); 91 Route::post('racingcustupdate',array('uses'=> 'RacingCustomerController@updateracingcust', 'as'=>'upload.updateraccust'));
92 Route::get('dialmode', array('uses'=> 'DialModeController@dialmodeview', 'as'=>'view.module')); 92 Route::get('dialmode', array('uses'=> 'DialModeController@dialmodeview', 'as'=>'view.module'));
93 Route::post('dialmodeassign', array('uses'=> 'DialModeController@dialmodeassign', 'as'=>'assign.dialmodes')); 93 Route::post('dialmodeassign', array('uses'=> 'DialModeController@dialmodeassign', 'as'=>'assign.dialmodes'));
94 //for the rlp pbwise
95 Route::get('rlp', array('uses'=> 'RecordController@rlpPbwise', 'as'=>'rlppb.comments'));
94 96
95 }); 97 });
......
...@@ -584,6 +584,19 @@ $data.="</div><div style='width:49%;float:left'> ...@@ -584,6 +584,19 @@ $data.="</div><div style='width:49%;float:left'>
584 <label class=label-small_new style='width:25%;' title=''>Call Remarks:</label> 584 <label class=label-small_new style='width:25%;' title=''>Call Remarks:</label>
585 <textarea id='dialer_fullremarks' name='fullremarks' style='width:70%' maxlength=4000></textarea> 585 <textarea id='dialer_fullremarks' name='fullremarks' style='width:70%' maxlength=4000></textarea>
586 </p>"; 586 </p>";
587 $attemptsval="";
588
589 for($i=1;$i<=50;$i++)
590 {
591 $attemptsval.="<option value='".$i."'>".$i."</option>";
592 }
593
594 $data.="<p style='clear:both'>
595 <label class=label-small_new style='width:25%;' title=''>Attempts: </label>
596 <select class='form_hrm_select' id='attempt' name='attempt' style='width:50%'>'".$attemptsval."'
597 </select>
598 </p>";
599
587 600
588 //Supervisor Comments - By Manish on 16/02/17 601 //Supervisor Comments - By Manish on 16/02/17
589 /*if($dataarr['clientcode']) 602 /*if($dataarr['clientcode'])
......
1 // variable comes from env file: envCallback
2
3 var loggedin=0; 1 var loggedin=0;
4 2
5 var sTransferNumber; 3 var sTransferNumber;
...@@ -56,6 +54,7 @@ kstychCall['userstatus']=''; ...@@ -56,6 +54,7 @@ kstychCall['userstatus']='';
56 kstychCall['usersubstatus']=''; 54 kstychCall['usersubstatus']='';
57 kstychCall['usercallback']=''; 55 kstychCall['usercallback']='';
58 kstychCall['userremarks']=''; 56 kstychCall['userremarks']='';
57 kstychCall["attempt"]='';
59 kstychCall['fullremark']=''; 58 kstychCall['fullremark']='';
60 kstychCall['agentcomments']=''; 59 kstychCall['agentcomments']='';
61 kstychCall['supcomntid']=''; 60 kstychCall['supcomntid']='';
...@@ -280,9 +279,11 @@ function kCallAction(num,action) ...@@ -280,9 +279,11 @@ function kCallAction(num,action)
280 function dialerDispNumberClick() 279 function dialerDispNumberClick()
281 { 280 {
282 var lastnumber=$("#spandialer_num").html(); 281 var lastnumber=$("#spandialer_num").html();
282 kstychCall['callWrapupTime']=300;
283 283
284 if(kstychCall['mCallState']=="Dispo") 284 if(kstychCall['mCallState']=="Dispo")
285 { 285 {
286
286 saveCloseDialerCall("REDIAL"); 287 saveCloseDialerCall("REDIAL");
287 } 288 }
288 } 289 }
...@@ -425,7 +426,7 @@ function incomingPopupAlert(var1,var2,var3) ...@@ -425,7 +426,7 @@ function incomingPopupAlert(var1,var2,var3)
425 duration:1500, 426 duration:1500,
426 interval:500 427 interval:500
427 }); 428 });
428 incomingbeepstart(); 429 //incomingbeepstart();
429 kDesktopNotification("",var1,var2,1500); 430 kDesktopNotification("",var1,var2,1500);
430 } 431 }
431 432
...@@ -550,7 +551,7 @@ function saveCloseDialerCall(flag) ...@@ -550,7 +551,7 @@ function saveCloseDialerCall(flag)
550 kstychCall['userstatus']=$('#dialer_userstatus').val(); 551 kstychCall['userstatus']=$('#dialer_userstatus').val();
551 kstychCall['usersubstatus']=$('#dialer_usersubstatus').val(); 552 kstychCall['usersubstatus']=$('#dialer_usersubstatus').val();
552 kstychCall['usercallback']=$('#dialer_usercallback').val(); 553 kstychCall['usercallback']=$('#dialer_usercallback').val();
553 554 kstychCall["attempt"]=$('#attempt').val();//attempt dropdown value insert
554 555
555 //kstychCall['userremarks']=$('#dialer_userremarks').val(); 556 //kstychCall['userremarks']=$('#dialer_userremarks').val();
556 //4000 character limit remark By PrashanT Jadhav 557 //4000 character limit remark By PrashanT Jadhav
...@@ -601,6 +602,7 @@ function saveCloseDialerCall(flag) ...@@ -601,6 +602,7 @@ function saveCloseDialerCall(flag)
601 kstychCall['usercallback']=""; 602 kstychCall['usercallback']="";
602 kstychCall['userremarks']=""; 603 kstychCall['userremarks']="";
603 kstychCall['userflag']=""; 604 kstychCall['userflag']="";
605 kstychCall["attempt"]="";
604 606
605 $('#dialer_usercallback').val(""); 607 $('#dialer_usercallback').val("");
606 } 608 }
...@@ -1226,6 +1228,7 @@ function dialerTimersUpdate() ...@@ -1226,6 +1228,7 @@ function dialerTimersUpdate()
1226 } 1228 }
1227 else if(kstychCall['ts_Talk']>1) 1229 else if(kstychCall['ts_Talk']>1)
1228 { 1230 {
1231 kstychCall['callWrapupTime']=300;
1229 dispT="Talk : "+Math.ceil(((getNowTS()-kstychCall['ts_Talk'])/1000)); 1232 dispT="Talk : "+Math.ceil(((getNowTS()-kstychCall['ts_Talk'])/1000));
1230 $("#spandialer_ts").html(dispT); 1233 $("#spandialer_ts").html(dispT);
1231 $("#dialertimes1").removeClass("btn-primary").addClass("btn-default"); 1234 $("#dialertimes1").removeClass("btn-primary").addClass("btn-default");
......
...@@ -221,7 +221,10 @@ function waitKeyUpRun(varid,fncall,wttime) ...@@ -221,7 +221,10 @@ function waitKeyUpRun(varid,fncall,wttime)
221 function menuAction(menu) 221 function menuAction(menu)
222 { 222 {
223 $(".homemenu").removeClass("active"); 223 $(".homemenu").removeClass("active");
224 doAjax(menu,'','content','ajax_'+menu,'singlethis','GET'); 224 if(menu=='rlp'){
225 pbcode=$('#tcampaign_select').val();
226 doAjax(menu+'?pbcode='+pbcode,'','content','ajax_'+menu,'singlethis','GET');
227 }else doAjax(menu,'','content','ajax_'+menu,'singlethis','GET');
225 228
226 var menuparts=menu.split("?"); 229 var menuparts=menu.split("?");
227 if(menuparts[0]=='dashboard'){$("#mainmenuhome").addClass("active");$("#mmainmenuhome").addClass("active");} 230 if(menuparts[0]=='dashboard'){$("#mainmenuhome").addClass("active");$("#mmainmenuhome").addClass("active");}
......
...@@ -355,9 +355,9 @@ if($user->usertype=="Supervisor"||$user->usertype=="Admin") ...@@ -355,9 +355,9 @@ if($user->usertype=="Supervisor"||$user->usertype=="Admin")
355 <script> 355 <script>
356 function doSomething() { 356 function doSomething() {
357 357
358 doAjax("dialer/missedcallalert","","missedcalalertid","","","GET"); 358 doAjax("dialer/missedcallalert","","missedcalalertid","","","GET");// //doAjax("dialer/relationship?type=category&id="+id,"","relationshipCategory","","","GET");
359 //doAjax("dialer/relationship?type=category&id="+id,"","relationshipCategory","","","GET");
360 } 359 }
361 setInterval(doSomething, 60000); 360 setInterval(doSomething, 900000);
361 //setInterval(doSomething, 60000);
362 </script> 362 </script>
363 <?php } ?> 363 <?php } ?>
......
...@@ -54,6 +54,8 @@ kstychCall['userstatus']=''; ...@@ -54,6 +54,8 @@ kstychCall['userstatus']='';
54 kstychCall['usersubstatus']=''; 54 kstychCall['usersubstatus']='';
55 kstychCall['usercallback']=''; 55 kstychCall['usercallback']='';
56 kstychCall['userremarks']=''; 56 kstychCall['userremarks']='';
57 kstychCall["attempt"]='';
58 kstychCall['fullremark']='';
57 kstychCall['agentcomments']=''; 59 kstychCall['agentcomments']='';
58 kstychCall['supcomntid']=''; 60 kstychCall['supcomntid']='';
59 kstychCall['userdata']={}; 61 kstychCall['userdata']={};
...@@ -183,6 +185,8 @@ function dialerQuickOpen(varid,num,state,substate,autorun) ...@@ -183,6 +185,8 @@ function dialerQuickOpen(varid,num,state,substate,autorun)
183 { 185 {
184 simpleNotification('error','topRight',"Already on call!"); 186 simpleNotification('error','topRight',"Already on call!");
185 } 187 }
188
189 $("#dialerstate_btn").parent().attr("disabled",true);
186 } 190 }
187 function dialerAddAlt(i,varid) 191 function dialerAddAlt(i,varid)
188 { 192 {
...@@ -275,9 +279,11 @@ function kCallAction(num,action) ...@@ -275,9 +279,11 @@ function kCallAction(num,action)
275 function dialerDispNumberClick() 279 function dialerDispNumberClick()
276 { 280 {
277 var lastnumber=$("#spandialer_num").html(); 281 var lastnumber=$("#spandialer_num").html();
282 kstychCall['callWrapupTime']=300;
278 283
279 if(kstychCall['mCallState']=="Dispo") 284 if(kstychCall['mCallState']=="Dispo")
280 { 285 {
286
281 saveCloseDialerCall("REDIAL"); 287 saveCloseDialerCall("REDIAL");
282 } 288 }
283 } 289 }
...@@ -420,7 +426,7 @@ function incomingPopupAlert(var1,var2,var3) ...@@ -420,7 +426,7 @@ function incomingPopupAlert(var1,var2,var3)
420 duration:1500, 426 duration:1500,
421 interval:500 427 interval:500
422 }); 428 });
423 429 //incomingbeepstart();
424 kDesktopNotification("",var1,var2,1500); 430 kDesktopNotification("",var1,var2,1500);
425 } 431 }
426 432
...@@ -428,15 +434,17 @@ function outgoingCall() ...@@ -428,15 +434,17 @@ function outgoingCall()
428 { 434 {
429 $("#dialersearchresults").html(""); 435 $("#dialersearchresults").html("");
430 kSetDData('C','callnumber',$("#manualdialnumber_txt").val()); 436 kSetDData('C','callnumber',$("#manualdialnumber_txt").val());
431 437 //console.log("kstychcall--"+JSON.stringify(kstychCall));
432 var datastr="kstychCall="+JSON.stringify(kstychCall); 438 var datastr="kstychCall="+JSON.stringify(kstychCall);
433 datastr+="&kstychDialer="+JSON.stringify(kstychDialer); 439 datastr+="&kstychDialer="+JSON.stringify(kstychDialer);
434 440
441 var client = $('#tcampaign_select').val();
442
435 if(kstychDialer['mDialerState']=="Manual") 443 if(kstychDialer['mDialerState']=="Manual")
436 { 444 {
437 if(kstychCall['callnumber']!="") 445 if(kstychCall['callnumber']!="")
438 { 446 {
439 doAjax('dialer?action=newcall',datastr,'dialersearchresults', 'ajax_manualdial','singlefail','POST', function(retstr){ 447 doAjax('dialer?action=newcall&client='+client,datastr,'dialersearchresults', 'ajax_manualdial','singlefail','POST', function(retstr){
440 if(kstychCall['crmid']!="") 448 if(kstychCall['crmid']!="")
441 { 449 {
442 kSetDData('C','mCallState','Call'); 450 kSetDData('C','mCallState','Call');
...@@ -462,7 +470,7 @@ function outgoingCall() ...@@ -462,7 +470,7 @@ function outgoingCall()
462 } 470 }
463 if(kstychDialer['mDialerState']=="DialNext") 471 if(kstychDialer['mDialerState']=="DialNext")
464 { 472 {
465 doAjax('dialer?action=newcall',datastr,'dialersearchresults', 'ajax_manualdial','singlefail','POST', function(retstr){ 473 doAjax('dialer?action=newcall&client='+client,datastr,'dialersearchresults', 'ajax_manualdial','singlefail','POST', function(retstr){
466 if(kstychCall['crmid']!="") 474 if(kstychCall['crmid']!="")
467 { 475 {
468 kSetDData('C','mCallState','Call'); 476 kSetDData('C','mCallState','Call');
...@@ -481,7 +489,7 @@ function outgoingCall() ...@@ -481,7 +489,7 @@ function outgoingCall()
481 } 489 }
482 if(kstychDialer['mDialerState']=="Progressive") 490 if(kstychDialer['mDialerState']=="Progressive")
483 { 491 {
484 doAjax('dialer?action=newcall',datastr,'dialersearchresults', 'ajax_manualdial','singlefail','POST', function(retstr){ 492 doAjax('dialer?action=newcall&client='+client,datastr,'dialersearchresults', 'ajax_manualdial','singlefail','POST', function(retstr){
485 if(kstychCall['crmid']!="") 493 if(kstychCall['crmid']!="")
486 { 494 {
487 kSetDData('C','mCallState','Call'); 495 kSetDData('C','mCallState','Call');
...@@ -543,10 +551,16 @@ function saveCloseDialerCall(flag) ...@@ -543,10 +551,16 @@ function saveCloseDialerCall(flag)
543 kstychCall['userstatus']=$('#dialer_userstatus').val(); 551 kstychCall['userstatus']=$('#dialer_userstatus').val();
544 kstychCall['usersubstatus']=$('#dialer_usersubstatus').val(); 552 kstychCall['usersubstatus']=$('#dialer_usersubstatus').val();
545 kstychCall['usercallback']=$('#dialer_usercallback').val(); 553 kstychCall['usercallback']=$('#dialer_usercallback').val();
546 kstychCall['userremarks']=$('#dialer_userremarks').val(); 554 kstychCall["attempt"]=$('#attempt').val();//attempt dropdown value insert
555
556 //kstychCall['userremarks']=$('#dialer_userremarks').val();
557 //4000 character limit remark By PrashanT Jadhav
558 kstychCall['fullremark']=$('#dialer_fullremarks').val();
559
547 kstychCall['userflag']=$('#dialer_flag').val(); 560 kstychCall['userflag']=$('#dialer_flag').val();
548 kstychCall['priority']=$('#priority').val(); 561 kstychCall['priority']=$('#priority').val();
549 562
563
550 kstychCall['bttc_day']=$('#bttc_day').val(); 564 kstychCall['bttc_day']=$('#bttc_day').val();
551 kstychCall['bttc_hrs']=$('#bttc_hrs').val(); 565 kstychCall['bttc_hrs']=$('#bttc_hrs').val();
552 kstychCall['serv_vs_prod']=$('#serv_vs_prod').val(); 566 kstychCall['serv_vs_prod']=$('#serv_vs_prod').val();
...@@ -557,6 +571,7 @@ function saveCloseDialerCall(flag) ...@@ -557,6 +571,7 @@ function saveCloseDialerCall(flag)
557 //Supervisor Call Management Value - By Manish on 16-02-17 571 //Supervisor Call Management Value - By Manish on 16-02-17
558 kstychCall['agentcomments']=$('#agent_comment').val(); 572 kstychCall['agentcomments']=$('#agent_comment').val();
559 kstychCall['supcomntid']=$('#sup_comnt_id').val(); 573 kstychCall['supcomntid']=$('#sup_comnt_id').val();
574 var client = $('#tcampaign_select').val();
560 575
561 if(typeof customerDispofields != 'undefined')kstychCall['userdata']=customerDispofields; 576 if(typeof customerDispofields != 'undefined')kstychCall['userdata']=customerDispofields;
562 577
...@@ -651,6 +666,7 @@ function saveCloseDialerCall(flag) ...@@ -651,6 +666,7 @@ function saveCloseDialerCall(flag)
651 666
652 var datastr="kstychCall="+JSON.stringify(kstychCall); 667 var datastr="kstychCall="+JSON.stringify(kstychCall);
653 datastr+="&kstychDialer="+JSON.stringify(kstychDialer); 668 datastr+="&kstychDialer="+JSON.stringify(kstychDialer);
669 //console.log("datastr----"+datastr);
654 doAjax('dialer?action=closecall',datastr,'', 'ajax_manualdial','singlefail','POST', 670 doAjax('dialer?action=closecall',datastr,'', 'ajax_manualdial','singlefail','POST',
655 function(retstr){ 671 function(retstr){
656 kSetDData('C','mCallState',"Close"); 672 kSetDData('C','mCallState',"Close");
...@@ -778,8 +794,8 @@ function resetDialer() ...@@ -778,8 +794,8 @@ function resetDialer()
778 var dialerResetForceState=kstychDialer['mDialerState']; 794 var dialerResetForceState=kstychDialer['mDialerState'];
779 var dialerResetForceSubState=kstychDialer['mDialerSubState']; 795 var dialerResetForceSubState=kstychDialer['mDialerSubState'];
780 796
781 //dialerResetForceState="Progressive";//Hardcoded TODO change to config 797 dialerResetForceState="Progressive";//Hardcoded TODO change to config
782 //dialerResetForceSubState=""; 798 dialerResetForceSubState="";
783 799
784 if(kstychCall['userstatus']=="AUTOWRAPUP") 800 if(kstychCall['userstatus']=="AUTOWRAPUP")
785 { 801 {
...@@ -871,7 +887,9 @@ function updateDialerState(objstr,key,val,key2,val2) ...@@ -871,7 +887,9 @@ function updateDialerState(objstr,key,val,key2,val2)
871 887
872 var datastr="kstychCall="+JSON.stringify(kstychCall); 888 var datastr="kstychCall="+JSON.stringify(kstychCall);
873 datastr+="&kstychDialer="+JSON.stringify(kstychDialer); 889 datastr+="&kstychDialer="+JSON.stringify(kstychDialer);
874 doAjax('dialer?action=dialerstate',datastr,'', 'ajax_manualdial','singlefail','POST', 890 var client = $('#tcampaign_select').val();
891
892 doAjax('dialer?action=dialerstate&client='+client,datastr,'', 'ajax_manualdial','singlefail','POST',
875 function(retstr){ 893 function(retstr){
876 894
877 // if(val=="Progressive"||(kstychCall['previewcrmid']!=""&&kstychCall['previewcrmid']>0)) 895 // if(val=="Progressive"||(kstychCall['previewcrmid']!=""&&kstychCall['previewcrmid']>0))
...@@ -911,7 +929,7 @@ function updateDialerState(objstr,key,val,key2,val2) ...@@ -911,7 +929,7 @@ function updateDialerState(objstr,key,val,key2,val2)
911 929
912 if(val=="Progressive"||(kstychCall['previewcrmid']!=""&&kstychCall['previewcrmid']>0)) 930 if(val=="Progressive"||(kstychCall['previewcrmid']!=""&&kstychCall['previewcrmid']>0))
913 { 931 {
914 doAjax('dialer?action=previewnext',datastr,'dialersearchresults', 'ajax_manualdial2','singlefail','POST', 932 doAjax('dialer?action=previewnext&client='+client,datastr,'dialersearchresults', 'ajax_manualdial2','singlefail','POST',
915 function(retstr){ 933 function(retstr){
916 if(kstychCall['previewcrmid']!="") 934 if(kstychCall['previewcrmid']!="")
917 { 935 {
...@@ -1124,7 +1142,7 @@ function updateDialerUI() ...@@ -1124,7 +1142,7 @@ function updateDialerUI()
1124 ////////////////////////////////////////////////////////////// 1142 //////////////////////////////////////////////////////////////
1125 if(kstychCall['mCallState']=="Wait") 1143 if(kstychCall['mCallState']=="Wait")
1126 { 1144 {
1127 $("#dialerstate_btn").parent().attr("disabled",false); 1145 if(kstychDialer['mDialerState']!="Manual"){$("#dialerstate_btn").parent().attr("disabled",false)};
1128 if(kstychDialer['mmanualallow']=='Yes')$("#manualdialnumber_txt").attr("disabled",false); 1146 if(kstychDialer['mmanualallow']=='Yes')$("#manualdialnumber_txt").attr("disabled",false);
1129 else $("#manualdialnumber_txt").attr("disabled",true); 1147 else $("#manualdialnumber_txt").attr("disabled",true);
1130 1148
...@@ -1209,6 +1227,7 @@ function dialerTimersUpdate() ...@@ -1209,6 +1227,7 @@ function dialerTimersUpdate()
1209 } 1227 }
1210 else if(kstychCall['ts_Talk']>1) 1228 else if(kstychCall['ts_Talk']>1)
1211 { 1229 {
1230 kstychCall['callWrapupTime']=300;
1212 dispT="Talk : "+Math.ceil(((getNowTS()-kstychCall['ts_Talk'])/1000)); 1231 dispT="Talk : "+Math.ceil(((getNowTS()-kstychCall['ts_Talk'])/1000));
1213 $("#spandialer_ts").html(dispT); 1232 $("#spandialer_ts").html(dispT);
1214 $("#dialertimes1").removeClass("btn-primary").addClass("btn-default"); 1233 $("#dialertimes1").removeClass("btn-primary").addClass("btn-default");
...@@ -1640,7 +1659,14 @@ function stopRingbackTone() { ...@@ -1640,7 +1659,14 @@ function stopRingbackTone() {
1640 try { ringbacktone.pause(); } 1659 try { ringbacktone.pause(); }
1641 catch (e) { } 1660 catch (e) { }
1642 } 1661 }
1643 1662 function incomingbeepstart() {
1663 try { incomingbeep.play(); }
1664 catch (e) { }
1665 }
1666 function incomingbeepstop() {
1667 try { incomingbeep.pause(); }
1668 catch (e) { }
1669 }
1644 function toggleFullScreen() { 1670 function toggleFullScreen() {
1645 if (videoRemote.webkitSupportsFullscreen) { 1671 if (videoRemote.webkitSupportsFullscreen) {
1646 fullScreen(!videoRemote.webkitDisplayingFullscreen); 1672 fullScreen(!videoRemote.webkitDisplayingFullscreen);
......
...@@ -7,40 +7,49 @@ use App\Models\SupervisonComments; ...@@ -7,40 +7,49 @@ use App\Models\SupervisonComments;
7 $wakka = new KHRMSLib(); 7 $wakka = new KHRMSLib();
8 $dashboarduser=Auth::user(); 8 $dashboarduser=Auth::user();
9 9
10 $agents=array(); 10 //$agents=array();
11 $sup_status="";
11 if(isset($_GET['logdate']))$logdate=strtotime($_GET['logdate']." 00:00:00"); 12 if(isset($_GET['logdate']))$logdate=strtotime($_GET['logdate']." 00:00:00");
12 else $logdate=strtotime(date('Y-m-d')." 00:00:00"); 13 else $logdate=strtotime(date('Y-m-d')." 00:00:00");
13 14
14 if(isset($_GET['logtodate']))$logtodate=strtotime($_GET['logtodate']." 23:59:59"); 15 if(isset($_GET['logtodate']))$logtodate=strtotime($_GET['logtodate']." 23:59:59");
15 else $logtodate=strtotime(date('Y-m-d')." 23:59:59"); 16 else $logtodate=strtotime(date('Y-m-d')." 23:59:59");
16 17
18 if(isset($_GET['agents'])) $agents=$_GET['agents'];
19 else $agents="";
17 20
21 if(isset($_GET['sup_status'])) $sup_status=$_GET['sup_status'];
22 else $sup_status="";
18 23
19 if(isset($_GET['agents']))
20 {
21 $agents[]=$_GET['agents'];
22 24
25 /*$pb_code=implode(",",$agents);
26 echo "-----".$$pb_code;*/
23 27
24 } 28 $userarr=array();$i=1;
25 else $agents=""; 29 $reportarray=array();
30 $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");
26 31
32 if($agents=="" && $sup_status=="")
33 {
27 34
35 $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();
28 36
37 }else if($agents!="" && $sup_status==""){
29 38
30 /*$pb_code=implode(",",$agents); 39 $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();
31 echo "-----".$$pb_code;*/
32 40
33 $userarr=array();$i=1; 41 }else if($agents=="" && $sup_status!="")
34 $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"); 42 {
35 43
36 if(isset($_GET['agents'])){ 44 /* $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();*/
37 print_r($agents); 45
38 $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(); 46 $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."' "));
39 47
40 }else{
41 48
42 $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(); 49 }else{
50 /*$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();*/
43 51
52 $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."' "));
44 } 53 }
45 54
46 //echo $reportarray;die(); 55 //echo $reportarray;die();
...@@ -103,6 +112,7 @@ if(Input::has("dllogxls")) ...@@ -103,6 +112,7 @@ if(Input::has("dllogxls"))
103 } 112 }
104 //echo "<pre><br>".print_r($reportarray)."</pre>"; 113 //echo "<pre><br>".print_r($reportarray)."</pre>";
105 $highestColumn = sizeof($reporthead); 114 $highestColumn = sizeof($reporthead);
115 $supervisorstatus="";
106 //echo $highestColumn; 116 //echo $highestColumn;
107 if(count($reportarray)) { 117 if(count($reportarray)) {
108 $outhead="<tr>";$outstr="";$id=""; 118 $outhead="<tr>";$outstr="";$id="";
...@@ -115,6 +125,7 @@ if(count($reportarray)) { ...@@ -115,6 +125,7 @@ if(count($reportarray)) {
115 foreach($reportarray as $uid=>$uarr) 125 foreach($reportarray as $uid=>$uarr)
116 { 126 {
117 127
128
118 $outstr.="<tr>"; 129 $outstr.="<tr>";
119 for ($head = 0; $head < $highestColumn; $head++){ 130 for ($head = 0; $head < $highestColumn; $head++){
120 if($reporthead[$head]=="date"){ 131 if($reporthead[$head]=="date"){
...@@ -123,8 +134,11 @@ if(count($reportarray)) { ...@@ -123,8 +134,11 @@ if(count($reportarray)) {
123 if($reporthead[$head]=="id"){ 134 if($reporthead[$head]=="id"){
124 $id=$uarr->$reporthead[$head]; 135 $id=$uarr->$reporthead[$head];
125 } 136 }
137
138
126 if($reporthead[$head]=="supervisor_status"){ 139 if($reporthead[$head]=="supervisor_status"){
127 $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>"; 140 $supervisorstatus=$uarr->$reporthead[$head];
141 $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>";
128 }else if($reporthead[$head]=="Submit"){ 142 }else if($reporthead[$head]=="Submit"){
129 $outstr.="<td><input type='button' id='".$id."_save' value='Save' onclick='updatesupervisorfeedback($id);'></td>"; 143 $outstr.="<td><input type='button' id='".$id."_save' value='Save' onclick='updatesupervisorfeedback($id);'></td>";
130 }else { 144 }else {
...@@ -180,21 +194,28 @@ $(document).ready(function() ...@@ -180,21 +194,28 @@ $(document).ready(function()
180 194
181 Date:From <input size=10 id='modfrom' name='modfrom' type='text' value='<?php echo date("Y-m-d",$logdate); ?>' onchange='statusLogReloadFun("");'/> 195 Date:From <input size=10 id='modfrom' name='modfrom' type='text' value='<?php echo date("Y-m-d",$logdate); ?>' onchange='statusLogReloadFun("");'/>
182 &nbsp;&nbsp;To<input size=10 id='modto' name='modto' type='text' value='<?php echo date("Y-m-d",$logtodate); ?>' onchange='statusLogReloadFun("");'/>&nbsp;&nbsp; 196 &nbsp;&nbsp;To<input size=10 id='modto' name='modto' type='text' value='<?php echo date("Y-m-d",$logtodate); ?>' onchange='statusLogReloadFun("");'/>&nbsp;&nbsp;
183 <!--PB Code: 197 PB Code:
184 <select id='usrname' class=select2multi multiple="" style="width: 30%;" > --> 198 <select id='usrname' class=select2multi style="width: 20%;" >
185 <?php 199 <?php
186 /*$companyarr=$wakka->LoadAll("select * from hrms_masters where mtype='company'"); 200 $companyarr=$wakka->LoadAll("select * from hrms_masters where mtype='company'");
187 foreach($companyarr as $tcompany) 201 foreach($companyarr as $tcompany)
188 { 202 {
189 $seltxt=''; 203 $seltxt='';
190 if(strstr(",".$clientslist.",",",$tcompany[mkey],"))$seltxt='selected="selected"'; 204 if(strstr(",".$clientslist.",",",$tcompany[mkey],"))$seltxt='selected="selected"';
191 echo "<option value='$tcompany[mkey]' $seltxt>$tcompany[mkey]</option>"; 205 echo "<option value='$agents'>$agents</option> <option value='$tcompany[mkey]' $seltxt>$tcompany[mkey]</option>";
192 }*/ 206 }
193 ?> 207 ?>
194 208
195 <!-- </select> 209 </select>
210 Supervisor Status:<select class=select2multi id='sup_status' style="width: 20%;">
211 <option value=''></option>
212 <option value='Pending'>Pending</option>
213 <option value='Action Taken'>Action Taken</option>
214 <option value='Rejected'>Rejected</option>
215 </select>
216
196 217
197 <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> --> 218 <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>
198 219
199 </div> 220 </div>
200 221
...@@ -209,28 +230,43 @@ Date:From <input size=10 id='modfrom' name='modfrom' type='text' value='<?php ec ...@@ -209,28 +230,43 @@ Date:From <input size=10 id='modfrom' name='modfrom' type='text' value='<?php ec
209 <div id=dialoglog></div> 230 <div id=dialoglog></div>
210 </div> 231 </div>
211 <script> 232 <script>
233
212 function dlAgentlogXls() 234 function dlAgentlogXls()
213 { 235 {
236 var agents=$('#usrname').val();
237 var sup_status=$('#sup_status').val();
238 if(agents=="" && sup_status=="" ){
214 window.open('dialer/raicingcustomerreport?dllogxls=1&logdate='+$("#modfrom").val()+'&logtodate='+$("#modto").val());return false; 239 window.open('dialer/raicingcustomerreport?dllogxls=1&logdate='+$("#modfrom").val()+'&logtodate='+$("#modto").val());return false;
240 }else if(sup_status=="" && agents!=""){
241 window.open('dialer/raicingcustomerreport?dllogxls=1&logdate='+$("#modfrom").val()+'&logtodate='+$("#modto").val()+'&agents='+agents);return false;
242 }else if(sup_status!="" && agents==""){
243 window.open('dialer/raicingcustomerreport?dllogxls=1&logdate='+$("#modfrom").val()+'&logtodate='+$("#modto").val()+'&sup_status='+sup_status);return false;
244 }else{
245 window.open('dialer/raicingcustomerreport?dllogxls=1&logdate='+$("#modfrom").val()+'&logtodate='+$("#modto").val()+'&agents='+agents+'&sup_status='+sup_status);return false;
246 }
247
215 } 248 }
216 function dataString() 249 function dataString()
217 { 250 {
218 /*var agents=$('#usrname').val();
219 var agentsval=[];
220 251
221 if(agents=="" || agents==null){ 252 var agents=$('#usrname').val();
253 var sup_status=$('#sup_status').val();
222 254
223 }else 255 if(agents=="" && sup_status=="" )
256 {
257 return 'logdate='+$("#modfrom").val()+'&logtodate='+$("#modto").val()
258 }
259 else if(sup_status=="" && agents!="")
224 { 260 {
225 for(i=0;i<agents.length;i++) 261 return 'logdate='+$("#modfrom").val()+'&logtodate='+$("#modto").val()+'&agents='+agents;
262 }else if(sup_status!="" && agents==""){
263 return 'logdate='+$("#modfrom").val()+'&logtodate='+$("#modto").val()+'&sup_status='+sup_status;
264 }
265 else
226 { 266 {
227 agentsval[i] = "'" + String(agents[i]) + "'"; 267 return 'logdate='+$("#modfrom").val()+'&logtodate='+$("#modto").val()+'&agents='+agents+'&sup_status='+sup_status;
228 } 268 }
229 agentsval=agentsval.join(",");
230 269
231 return 'logdate='+$("#modfrom").val()+'&logdateto='+$("#modto").val()+'&agents='+agentsval;
232 }*/
233 return 'logdate='+$("#modfrom").val()+'&logdateto='+$("#modto").val();
234 } 270 }
235 function statusLogReloadFun(sortby) 271 function statusLogReloadFun(sortby)
236 { 272 {
......
...@@ -10,11 +10,11 @@ if($dashboarduser->usertype != 'Admin'){ ...@@ -10,11 +10,11 @@ if($dashboarduser->usertype != 'Admin'){
10 ->orWhere('lteam2','=',$dashboarduser->username) 10 ->orWhere('lteam2','=',$dashboarduser->username)
11 ->orWhere('lteam','=',$dashboarduser->username); 11 ->orWhere('lteam','=',$dashboarduser->username);
12 })->get(); 12 })->get();
13 } 13 }
14 else 14 else
15 { 15 {
16 $allusers=DB::table('users')->select('*')->get(); 16 $allusers=DB::table('users')->select('*')->get();
17 } 17 }
18 18
19 foreach($allusers as $user){ 19 foreach($allusers as $user){
20 20
...@@ -25,7 +25,7 @@ foreach($allusers as $user){ ...@@ -25,7 +25,7 @@ foreach($allusers as $user){
25 <td>".$user->fullname."</td> 25 <td>".$user->fullname."</td>
26 <td>".$user->dialmode_assign."</td> 26 <td>".$user->dialmode_assign."</td>
27 27
28 </tr>"; 28 </tr>";
29 } 29 }
30 ?> 30 ?>
31 31
...@@ -70,9 +70,9 @@ foreach($allusers as $user){ ...@@ -70,9 +70,9 @@ foreach($allusers as $user){
70 70
71 </tr> 71 </tr>
72 </thead> 72 </thead>
73 <?php echo $outstr; ?> 73 <?php echo $outstr; ?>
74 </table> 74 </table>
75 </div> 75 </div>
76 </div> 76 </div>
77 </div> 77 </div>
78 </div> 78 </div>
......
1 <?php
2 use App\Jobs\KHRMSLib;
3 use App\Models\CRMCall;
4
5 $wakka=new KHRMSLib();
6 $roclientlst=$wakka->clientsReadAccess();
7 if(isset($_GET['pbcode']))$pbcode=$_GET['pbcode'];
8 else $pbcode='';
9
10 $alist=DB::table('p11086_cop_rlp_pb_base_uat')
11 ->select(DB::Raw("*"))
12 ->where('pbcode','=',$pbcode)
13 ->get();
14 //print_r($alist);
15
16 ?>
17 <style>#logtable.td{vertical-align:top;}#logtable.tr{height:28px;overflow-y:hidden;}</style>
18
19 <div class="layout-app"><!-- row-app -->
20 <div class="row row-app">
21
22 <div class="col-md-12">
23
24 <div class="col-separator col-separator-first col-unscrollable box">
25 <div style='clear:both;margin:2% 0 0 1%;border: 2px solid #F5F5F5;padding:2%;border-radius: 5px;'>
26 <center><h4>RLP PB WISE</center>
27
28 <br>
29 <div class='container'>
30
31 PB CODE:<select id='pb_code' class=select2multi style="width:20%;" onclick="pbcodeSelect();">
32 <?php foreach($roclientlst as $c){$s="";if($c==$pbcode)$s='selected';echo "<option value='$c' $s>$c</option>";} ?>
33 </select>
34 </div>
35 </div>
36 </div>
37 <div style='overflow:auto;margin-top: 10px;'>
38 <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;>
39 <thead>
40 <tr>
41 <th>Product</th>
42 <th>Opportunity</th>
43 <th>Contacted</th>
44 <th>Pitched</th>
45 <th>LG</th>
46 </tr>
47 </thead>
48 <tr>
49 <td>AL</td>
50 <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>
51 <td><?php echo $alist[0]->al_called_opp ?></td>
52 <td><?php echo $alist[0]->al_pitch ?></td>
53 <td><?php echo $alist[0]->al_lg ?></td>
54 </tr>
55 <tr>
56 <td>PL/BL</td>
57 <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>
58 <td><?php echo $alist[0]->pl_called_opp ?></td>
59 <td><?php echo $alist[0]->pl_pitch ?></td>
60 <td><?php echo $alist[0]->pl_lg ?></td>
61 </tr>
62 <tr>
63 <td>Retail Assets</td>
64 <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>
65 <td><?php echo $alist[0]->twl_called_opp+$alist[0]->hl_called_opp+$alist[0]->las_called_opp+$alist[0]->lap_called_opp ?></td>
66 <td><?php echo $alist[0]->twl_pitch+$alist[0]->hl_pitch+$alist[0]->gl_pitch+$alist[0]->las_pitch ?></td>
67 <td><?php echo $alist[0]->twl_lg+$alist[0]->hl_lg+$alist[0]->gl_lg+$alist[0]->las_lg+$alist[0]->lap_lg ?></td>
68 </tr>
69 <tr>
70 <td>HSL</td>
71 <td><?php echo $alist[0]->hsl_opp ?></td>
72 <td><?php echo $alist[0]->hsl_called_opp ?></td>
73 <td><?php echo $alist[0]->hsl_pitch ?></td>
74 <td></td>
75 </tr>
76 <tr>
77 <td>Credit Card- New Sourcing</td>
78 <td><?php echo $alist[0]->cc_eli_new_opp ?></td>
79 <td><?php echo $alist[0]->cc_activation_opp ?></td>
80 <td><?php echo $alist[0]->cc_pitch ?></td>
81 <td><?php echo $alist[0]->cc_lg ?></td>
82 </tr>
83 <tr>
84 <td>Credit Card- LTD Activation on Carded</td>
85 <td><?php echo $alist[0]->cc_activation_opp ?></td>
86 <td><?php echo $alist[0]->cc_activation_called_opp ?></td>
87 <td></td>
88 <td</td>
89 </tr>
90 <tr>
91 <td>Insurance LI</td>
92 <td><?php echo $alist[0]->li_opp ?></td>
93 <td><?php echo $alist[0]->li_called_opp ?></td>
94 <td></td>
95 <td></td>
96 </tr>
97 <tr>
98 <td>FD</td>
99 <td><?php echo $alist[0]->fd_opp ?></td>
100 <td><?php echo $alist[0]->fd_called_opp ?></td>
101 <td><?php echo $alist[0]->fd_pitch ?></td>
102 <td></td>
103 </tr>
104 <tr>
105 <td>LTD Activation-Savings Account</td>
106 <td><?php echo $alist[0]->ltd_act_saving_opp ?></td>
107 <td><?php echo $alist[0]->ltd_act_saving_opp ?></td>
108 <td></td>
109 <td></td>
110 </tr>
111 <tr>
112 <td>NB/MB Activations</td>
113 <td><?php echo $alist[0]->mb_opp ?></td>
114 <td><?php echo $alist[0]->mb_called_opp ?></td>
115 <td><?php echo $alist[0]->mb_pitch ?></td>
116 <td><?php echo $alist[0]->nb_mb_lg ?></td>
117 </tr>
118 <tr>
119 <td>Aadhar Seeding</td>
120 <td><?php echo $alist[0]->aadhaar_opp ?></td>
121 <td><?php echo $alist[0]->aadhaar_called_opp ?></td>
122 <td><?php echo $alist[0]->aadhaar_pitch ?></td>
123 <td><?php echo $alist[0]->aadhaar_activation ?></td>
124 </tr>
125 <tr>
126 <td>Digital Activation</td>
127 <td><?php echo $alist[0]->digi2_score_opp ?></td>
128 <td><?php echo $alist[0]->digi2_score_called_opp ?></td>
129 <td></td>
130 <td></td>
131 </tr>
132 <tr>
133 <td>BillPayments</td>
134 <td><?php echo $alist[0]->digi_billpay_opp ?></td>
135 <td><?php echo $alist[0]->digi_billpay_called_opp ?></td>
136 <td><?php echo $alist[0]->bill_pay_pitch ?></td>
137 <td></td>
138 </tr>
139 <tr>
140 <td>Financial Transactions</td>
141 <td><?php echo $alist[0]->digi_basic_banking_opp ?></td>
142 <td><?php echo $alist[0]->digi_basic_banking_called_opp ?></td>
143 <td></td>
144 <td></td>
145 </tr>
146 <tr>
147 <td>Digital 2.0 Score(Ecom Shopping Inactive)</td>
148 <td><?php echo $alist[0]->digi_ecom_shopping_opp ?></td>
149 <td><?php echo $alist[0]->digi_ecom_shopping_called_opp ?></td>
150 <td></td>
151 <td> </td>
152 </tr>
153 <tr>
154 <td>Digital 2.0 Score(Investment Inactive)</td>
155 <td><?php echo $alist[0]->digi_investment_opp ?></td>
156 <td><?php echo $alist[0]->digi_investment_called_opp ?></td>
157 <td><?php echo $alist[0]->invest_pitch ?></td>
158 <td></td>
159 </tr>
160 <tr>
161 <td>Reduction in Physical Transactions</td>
162 <td><?php echo $alist[0]->invest_pitch ?></td>
163 <td><?php echo $alist[0]->invest_pitch ?></td>
164 <td></td>
165 <td></td>
166 </tr>
167 <tr>
168 <td>% of Groups Contacted</td>
169 <td> </td>
170 <td> </td>
171 <td> </td>
172 <td> </td>
173 </tr>
174 <tr>
175 <td>Movement of Groups to higher engagement</td>
176 <td> </td>
177 <td> </td>
178 <td> </td>
179 <td></td>
180 </tr>
181 <tr>
182 <td>CASA Growth</td>
183 <td> </td>
184 <td> </td>
185 <td> </td>
186 <td> </td>
187 </tr>
188 <tr>
189 <td>Mutual Fund</td>
190 <td> </td>
191 <td> </td>
192 <td> </td>
193 <td> </td>
194 </tr>
195 </table>
196 </div>
197 <div id=dialoglog></div>
198 </div>
199 </div>
200 </div>
201 <style>#logtable.td{vertical-align:top;}#logtable.tr{height:28px;overflow-y:hidden;}</style>
202 <script>
203 $(document).ready(function()
204 {
205 if(!$('#dialoglog').hasClass('ui-dialog-content'))
206 {
207 $('#dialoglog').dialog({
208 autoOpen: false,
209 width: '70%',
210 buttons: {
211 "Ok": function() {
212 $(this).dialog("close");
213 },
214 "Cancel": function() {
215 $(this).dialog("close");
216 }
217 }
218 });
219 }
220
221 waitKeyUpRun("filter",function() { filter2(document.getElementById('filter'), 'logtable') },"2000");
222
223 });
224 function pbcodeSelect()
225 {
226 var pbcode=$('#pb_code').val();
227 doAjax('rlp?pbcode='+pbcode,'','content','ajax_rlp','singlethis','GET');
228 }
229 </script>
...\ No newline at end of file ...\ 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!