Merge branch 'dev-beu-phase-1' of http://54.197.18.130/flexydial/hdfc-vrm-v2 into dev-beu-phase-1
Showing
51 changed files
with
2594 additions
and
1624 deletions
| ... | @@ -21,7 +21,7 @@ class CampaignController extends Controller { | ... | @@ -21,7 +21,7 @@ class CampaignController extends Controller { |
| 21 | 21 | ||
| 22 | public function index() | 22 | public function index() |
| 23 | { | 23 | { |
| 24 | $data['campaignList'] = Campaign::where('mtype',"=","company")->orderBy('mkey')->get(); | 24 | $data['campaignList'] = Campaign::where('mtype',"=","company")->where('status','=','active')->orderBy('mkey')->get(); |
| 25 | $dashboarduser=Auth::user(); | 25 | $dashboarduser=Auth::user(); |
| 26 | if($dashboarduser->usertype != 'Admin'){ | 26 | if($dashboarduser->usertype != 'Admin'){ |
| 27 | $allusers=User::where(function ($query) use($dashboarduser) { | 27 | $allusers=User::where(function ($query) use($dashboarduser) { |
| ... | @@ -301,8 +301,45 @@ class CampaignController extends Controller { | ... | @@ -301,8 +301,45 @@ class CampaignController extends Controller { |
| 301 | return "<script>simpleNotification('error','topRight','Campaign name should not be blank.');</script><br/><p class='text-danger text-center'>Campaign name should not be blank.</p>"; | 301 | return "<script>simpleNotification('error','topRight','Campaign name should not be blank.');</script><br/><p class='text-danger text-center'>Campaign name should not be blank.</p>"; |
| 302 | } | 302 | } |
| 303 | } | 303 | } |
| 304 | if($id=="runquery") | ||
| 305 | { | ||
| 306 | $campaign = Input::get("campaign"); | ||
| 307 | $querySelect = Input::get("allvalues"); | ||
| 308 | $queryConditions = Input::get("queryConditions"); | ||
| 309 | if($queryConditions){ | ||
| 310 | $queryConditions = str_replace('"', "'", $queryConditions); | ||
| 311 | $queryConditions = str_replace(''', "'", $queryConditions); | ||
| 312 | }else{ | ||
| 313 | $queryConditions = '1'; | ||
| 314 | } | ||
| 315 | $fields = explode(",", $querySelect); | ||
| 316 | |||
| 317 | $i = 1; $output = ''; | ||
| 318 | try { | ||
| 319 | |||
| 304 | 320 | ||
| 305 | if($id=="query") | 321 | if($campaign=="All") |
| 322 | { | ||
| 323 | // $selQuery = "SELECT $querySelect FROM records WHERE $queryConditions LIMIT $queryLimit OFFSET $queryOffset"; | ||
| 324 | $selQuery = "SELECT $querySelect FROM records WHERE $queryConditions"; | ||
| 325 | $sqlQuery = DB::select($selQuery); | ||
| 326 | }else | ||
| 327 | { | ||
| 328 | //$selQuery = "SELECT $querySelect FROM records WHERE client = '$campaign' AND $queryConditions LIMIT $queryLimit OFFSET $queryOffset"; | ||
| 329 | $selQuery = "SELECT $querySelect FROM records WHERE client = '$campaign' AND $queryConditions"; | ||
| 330 | $sqlQuery = DB::select($selQuery); | ||
| 331 | } | ||
| 332 | } catch(\Illuminate\Database\QueryException $ex){ | ||
| 333 | $output .= "<p class='text-danger'>".$ex->getMessage()."</p>"; | ||
| 334 | return $output; | ||
| 335 | } | ||
| 336 | |||
| 337 | if(count($sqlQuery)){ | ||
| 338 | $output .='<div><label>'.count($sqlQuery).'</label></div>'; | ||
| 339 | } | ||
| 340 | return $output; | ||
| 341 | } | ||
| 342 | if($id=="savequery") | ||
| 306 | { | 343 | { |
| 307 | $campaign = Input::get("campaign"); | 344 | $campaign = Input::get("campaign"); |
| 308 | $querySelect = Input::get("allvalues"); | 345 | $querySelect = Input::get("allvalues"); |
| ... | @@ -385,6 +422,23 @@ class CampaignController extends Controller { | ... | @@ -385,6 +422,23 @@ class CampaignController extends Controller { |
| 385 | $output .= '</tbody></table></div>';*/ | 422 | $output .= '</tbody></table></div>';*/ |
| 386 | return $output; | 423 | return $output; |
| 387 | } | 424 | } |
| 425 | /*if($id="runcount"){ | ||
| 426 | $output = ''; | ||
| 427 | $i = 1; | ||
| 428 | $campaign = Input::get("campaign"); | ||
| 429 | |||
| 430 | $id = Input::get("id"); | ||
| 431 | $queryTxt = DB::table('campaign_query')->where('id','=', $id)->select('query','select_col')->first(); | ||
| 432 | $fields = explode(",", $queryTxt->select_col); | ||
| 433 | |||
| 434 | $sqlQuery = DB::select($queryTxt->query); | ||
| 435 | if(count($sqlQuery)){ | ||
| 436 | $output .= '<div style="overflow-x:auto;"><h5>'.count($sqlQuery).'</h5>'; | ||
| 437 | }else{ | ||
| 438 | $output .= '<h5 class="text-danger"><i class="fa fa-exclamation-circle"></i> No Result!</h5>'; | ||
| 439 | } | ||
| 440 | return $output; | ||
| 441 | }*/ | ||
| 388 | 442 | ||
| 389 | if($id=="fquery") | 443 | if($id=="fquery") |
| 390 | { | 444 | { |
| ... | @@ -481,11 +535,17 @@ class CampaignController extends Controller { | ... | @@ -481,11 +535,17 @@ class CampaignController extends Controller { |
| 481 | if($id=="addCurrQueue") | 535 | if($id=="addCurrQueue") |
| 482 | { | 536 | { |
| 483 | $campQryId = Input::get("radioValue"); | 537 | $campQryId = Input::get("radioValue"); |
| 538 | $campaign = Input::get("campaign"); | ||
| 484 | 539 | ||
| 485 | DB::table('campaign_query')->where('id','!=', $campQryId)->update(['current_queue'=>'']); | 540 | DB::table('campaign_query')->where('id','!=', $campQryId)->where('campaign','=',$campaign)->update(['current_queue'=>'']); |
| 486 | DB::table('campaign_query')->where('id','=', $campQryId)->update(['current_queue'=>'selected']); | 541 | DB::table('campaign_query')->where('id','=', $campQryId)->where('campaign','=',$campaign)->update(['current_queue'=>'selected']); |
| 487 | 542 | $queryCond=DB::table('campaign_query')->where('id','=',$campQryId)->where('campaign','=',$campaign)->select('where_cond'); | |
| 488 | //return "<script>simpleNotification('success','topRight','Query Logic Successfully Updated');</script>"; | 543 | if($queryCond->count() > 0){ |
| 544 | $queryCond = $queryCond->first(); | ||
| 545 | DB::update(DB::raw("UPDATE records set filter_condition='1' where $queryCond->where_cond")); | ||
| 546 | } | ||
| 547 | return; | ||
| 548 | //return "<script>simpleNotification('success','topRight','Query Logic Successfully Applied');</script>"; | ||
| 489 | } | 549 | } |
| 490 | if($id=="assigncampaign") | 550 | if($id=="assigncampaign") |
| 491 | { | 551 | { | ... | ... |
| ... | @@ -147,6 +147,7 @@ class DialerController extends Controller { | ... | @@ -147,6 +147,7 @@ class DialerController extends Controller { |
| 147 | 147 | ||
| 148 | $roclientstr=array(); | 148 | $roclientstr=array(); |
| 149 | $oclientlst=$wakka->clientsReadAccess(); | 149 | $oclientlst=$wakka->clientsReadAccess(); |
| 150 | //print_r($oclientlst); | ||
| 150 | if(!empty($oclientlst))foreach($oclientlst as $tclnt)if($tclnt!=""){$roclientstr[]="'$tclnt'";} | 151 | if(!empty($oclientlst))foreach($oclientlst as $tclnt)if($tclnt!=""){$roclientstr[]="'$tclnt'";} |
| 151 | 152 | ||
| 152 | if(!empty($roclientstr))$roclientstr="and client in (".implode(",",$roclientstr).")";else $roclientstr=""; | 153 | if(!empty($roclientstr))$roclientstr="and client in (".implode(",",$roclientstr).")";else $roclientstr=""; |
| ... | @@ -154,7 +155,11 @@ class DialerController extends Controller { | ... | @@ -154,7 +155,11 @@ class DialerController extends Controller { |
| 154 | $users=array();$searchresult=""; | 155 | $users=array();$searchresult=""; |
| 155 | if(!empty($kstychCall["previewcrmid"]))$users=$wakka->getPersons("id='".$kstychCall["previewcrmid"]."' $roclientstr limit 1"); | 156 | if(!empty($kstychCall["previewcrmid"]))$users=$wakka->getPersons("id='".$kstychCall["previewcrmid"]."' $roclientstr limit 1"); |
| 156 | else $users=$this->getCallSequencing(1); | 157 | else $users=$this->getCallSequencing(1); |
| 157 | 158 | //$wakka->setPersonKey($users[0]['id'],"status","Incall"); | |
| 159 | if($users[0]['id']>0){ | ||
| 160 | Log::info("1----".$users[0]['id']); | ||
| 161 | DB::table('records')->where('id',$users[0]['id'])->update(['filter_condition'=>'2','modified'=>date("Y-m-d H:i:s")]); | ||
| 162 | } | ||
| 158 | if(!empty($users)) | 163 | if(!empty($users)) |
| 159 | { | 164 | { |
| 160 | $searchresult.="<div id=divworking></div><div style='clear:both'></div><script>kSetDData('C','previewcrmid','".$users[0]['id']."');showRecruit(\"".$users[0]['id']."\");</script>"; | 165 | $searchresult.="<div id=divworking></div><div style='clear:both'></div><script>kSetDData('C','previewcrmid','".$users[0]['id']."');showRecruit(\"".$users[0]['id']."\");</script>"; |
| ... | @@ -184,15 +189,6 @@ class DialerController extends Controller { | ... | @@ -184,15 +189,6 @@ class DialerController extends Controller { |
| 184 | if(!empty($roclientstr))$roclientstr="and client in (".implode(",",$roclientstr).")";else $roclientstr=""; | 189 | if(!empty($roclientstr))$roclientstr="and client in (".implode(",",$roclientstr).")";else $roclientstr=""; |
| 185 | 190 | ||
| 186 | $users=array();$callnumber=$kstychCall['callnumber']; | 191 | $users=array();$callnumber=$kstychCall['callnumber']; |
| 187 | |||
| 188 | $callnumber = trim($callnumber); | ||
| 189 | |||
| 190 | if($kstychDialer['mDialerState']=="Manual"){ | ||
| 191 | if((!preg_match('/^[0-9]*$/',$callnumber)) || strlen($callnumber)<6){ | ||
| 192 | return Response::make("<script>simpleNotification('error','topRight','Please enter a valid phone number');</script>"); | ||
| 193 | } | ||
| 194 | } | ||
| 195 | |||
| 196 | if($kstychCall['crmid']) | 192 | if($kstychCall['crmid']) |
| 197 | { | 193 | { |
| 198 | $crmid=$kstychCall['crmid']; | 194 | $crmid=$kstychCall['crmid']; |
| ... | @@ -204,13 +200,7 @@ class DialerController extends Controller { | ... | @@ -204,13 +200,7 @@ class DialerController extends Controller { |
| 204 | } | 200 | } |
| 205 | if($kstychDialer['mDialerState']=="Manual") | 201 | if($kstychDialer['mDialerState']=="Manual") |
| 206 | { | 202 | { |
| 207 | $callnumber=trim($callnumber); | 203 | |
| 208 | if(!preg_match('/^[1-9][0-9]*$/',$callnumber)){ | ||
| 209 | return Response::make("<script>simpleNotification('error','topRight','Only Digits are allowed');</script>"); | ||
| 210 | } | ||
| 211 | if(strlen($callnumber)<6){ | ||
| 212 | return Response::make("<script>simpleNotification('error','topRight','Enter a valid Number');</script>"); | ||
| 213 | } | ||
| 214 | if($crmid!="") | 204 | if($crmid!="") |
| 215 | { | 205 | { |
| 216 | $tusers=$wakka->getPersonIDs("(mobile like '%".substr($callnumber,-10)."' OR | 206 | $tusers=$wakka->getPersonIDs("(mobile like '%".substr($callnumber,-10)."' OR |
| ... | @@ -283,21 +273,21 @@ class DialerController extends Controller { | ... | @@ -283,21 +273,21 @@ class DialerController extends Controller { |
| 283 | if($callnumber==""||intval($callnumber)<=0)$callnumber=$ppldata['mobile']; | 273 | if($callnumber==""||intval($callnumber)<=0)$callnumber=$ppldata['mobile']; |
| 284 | $callnumber = trim($callnumber); | 274 | $callnumber = trim($callnumber); |
| 285 | 275 | ||
| 286 | if($kstychDialer['mDialerState']=="Manual"){ | 276 | if($kstychDialer['mDialerState']=="Manual"){ |
| 287 | if(!is_numeric($callnumber) || strlen($callnumber)<6){ | 277 | if(!is_numeric($callnumber) || strlen($callnumber)<6){ |
| 288 | return Response::make("<script>simpleNotification('error','topRight','Please enter a valid phone number');</script>"); | 278 | return Response::make("<script>simpleNotification('error','topRight','Please enter a valid phone number');</script>"); |
| 289 | } | 279 | } |
| 290 | } | 280 | } |
| 291 | 281 | ||
| 292 | if($kstychDialer['mDialerState']=="Progressive"){ | 282 | if($kstychDialer['mDialerState']=="Progressive"){ |
| 293 | if(!is_numeric($callnumber) || strlen($callnumber)<6){ | 283 | if(!is_numeric($callnumber) || strlen($callnumber)<6){ |
| 294 | Log::useFiles(storage_path().'/logs/Dialline_block_progressive.log'); | 284 | Log::useFiles(storage_path().'/logs/Dialline_block_progressive.log'); |
| 295 | Log::info('Number='.$callnumber.' Campaign='.$ppldata['client']); | 285 | Log::info('Number='.$callnumber.' Campaign='.$ppldata['client']); |
| 296 | Log::info('PregMatch='.(!is_numeric($callnumber)).' StringLength='.strlen($callnumber)); | 286 | Log::info('PregMatch='.(!is_numeric($callnumber)).' StringLength='.strlen($callnumber)); |
| 297 | 287 | ||
| 298 | } | 288 | } |
| 299 | } | 289 | } |
| 300 | //end | 290 | |
| 301 | if($callnumber!=""&&intval($callnumber)>0) | 291 | if($callnumber!=""&&intval($callnumber)>0) |
| 302 | { | 292 | { |
| 303 | $mastersdata=$wakka->getCompanyMaster($ppldata['client']); | 293 | $mastersdata=$wakka->getCompanyMaster($ppldata['client']); |
| ... | @@ -312,16 +302,14 @@ class DialerController extends Controller { | ... | @@ -312,16 +302,14 @@ class DialerController extends Controller { |
| 312 | if($sipid&&$sipid->user==Auth::user()->id&&$sipid->status==1) | 302 | if($sipid&&$sipid->user==Auth::user()->id&&$sipid->status==1) |
| 313 | { | 303 | { |
| 314 | 304 | ||
| 315 | $dialline=Dialline::where("status","=","Free")->where("enabled","=","1"); | 305 | $dialline=Dialline::where("status","=","Free")->where("enabled","=","1")->where("server","=",env("app_ip")); |
| 316 | if($dspan!="")$dialline=$dialline->where('dspan','=',$dspan); | 306 | if($dspan!="")$dialline=$dialline->where('dspan','=',$dspan); |
| 317 | $dialline=$dialline->orderBy('updated_at','ASC')->first(); | 307 | $dialline=$dialline->orderBy('updated_at','ASC')->first(); |
| 318 | 308 | ||
| 319 | if($dialline) | 309 | if($dialline) |
| 320 | { | 310 | { |
| 321 | //Log::info("before callconnected".$dialline->status." ^ ".$dialline->dchannel." ^ ".$dialline->dspan." ^ ".$callnumber." ^ ".$dialline->channel); | ||
| 322 | $dialline->status="Blocked"; | 311 | $dialline->status="Blocked"; |
| 323 | $dialline->save(); | 312 | $dialline->save(); |
| 324 | //Log::info("After diallineset".$dialline->status); | ||
| 325 | $nowts=microtime(true)*1000; | 313 | $nowts=microtime(true)*1000; |
| 326 | 314 | ||
| 327 | //get ts_Wait | 315 | //get ts_Wait |
| ... | @@ -350,7 +338,9 @@ class DialerController extends Controller { | ... | @@ -350,7 +338,9 @@ class DialerController extends Controller { |
| 350 | $tdata=array(); | 338 | $tdata=array(); |
| 351 | $crmcall->data=json_encode($tdata); | 339 | $crmcall->data=json_encode($tdata); |
| 352 | $crmcall->save(); | 340 | $crmcall->save(); |
| 353 | 341 | if($users[0]['id']>0){ | |
| 342 | DB::table('records')->where('id',$users[0]['id'])->update(['filter_condition'=>'3','usr_id'=>Auth::user()->id]); | ||
| 343 | } | ||
| 354 | //start actual calls | 344 | //start actual calls |
| 355 | $ppldata['dialer_lastcall']=date("Y-m-d H:i:s"); | 345 | $ppldata['dialer_lastcall']=date("Y-m-d H:i:s"); |
| 356 | $preppldata['peopledata'] = serialize($ppldata); | 346 | $preppldata['peopledata'] = serialize($ppldata); |
| ... | @@ -415,7 +405,7 @@ if($action=="addconfcall") | ... | @@ -415,7 +405,7 @@ if($action=="addconfcall") |
| 415 | $olddialline=Dialline::find($oldcrmcall->dialline_id); | 405 | $olddialline=Dialline::find($oldcrmcall->dialline_id); |
| 416 | $dspan="1";if($olddialline)$dspan=$olddialline->dspan; | 406 | $dspan="1";if($olddialline)$dspan=$olddialline->dspan; |
| 417 | 407 | ||
| 418 | $dialline=Dialline::where("status","=","Free")->where("enabled","=","1"); | 408 | $dialline=Dialline::where("status","=","Free")->where("enabled","=","1")->where("server","=",env("app_ip")); |
| 419 | if($dspan!="")$dialline=$dialline->where('dspan','=',$dspan); | 409 | if($dspan!="")$dialline=$dialline->where('dspan','=',$dspan); |
| 420 | $dialline=$dialline->orderBy('updated_at','ASC')->first(); | 410 | $dialline=$dialline->orderBy('updated_at','ASC')->first(); |
| 421 | 411 | ||
| ... | @@ -544,6 +534,7 @@ if($action=="hangupall") | ... | @@ -544,6 +534,7 @@ if($action=="hangupall") |
| 544 | 534 | ||
| 545 | if($action=="closecall") | 535 | if($action=="closecall") |
| 546 | { | 536 | { |
| 537 | //echo "Manoj"; | ||
| 547 | $callid=intval($kstychCall['callid'])+0; | 538 | $callid=intval($kstychCall['callid'])+0; |
| 548 | $crmcall=CRMCall::find($callid); | 539 | $crmcall=CRMCall::find($callid); |
| 549 | if($crmcall&&$crmcall->user_id==Auth::user()->id) | 540 | if($crmcall&&$crmcall->user_id==Auth::user()->id) |
| ... | @@ -584,6 +575,7 @@ if($action=="closecall") | ... | @@ -584,6 +575,7 @@ if($action=="closecall") |
| 584 | 575 | ||
| 585 | if($crmcall->crm_id>0) | 576 | if($crmcall->crm_id>0) |
| 586 | { | 577 | { |
| 578 | //print_r("manoj1"); | ||
| 587 | if(is_array($kstychCall["userdata"])) | 579 | if(is_array($kstychCall["userdata"])) |
| 588 | { | 580 | { |
| 589 | foreach($kstychCall["userdata"] as $tcrmid=>$tuserdata) | 581 | foreach($kstychCall["userdata"] as $tcrmid=>$tuserdata) |
| ... | @@ -626,6 +618,7 @@ if($action=="closecall") | ... | @@ -626,6 +618,7 @@ if($action=="closecall") |
| 626 | $tcrmcall->save(); | 618 | $tcrmcall->save(); |
| 627 | 619 | ||
| 628 | 620 | ||
| 621 | DB::table('records')->where('id',$crmcall->crm_id)->update(['filter_condition'=>'4']); | ||
| 629 | 622 | ||
| 630 | $tuser=$wakka->getPerson($tcrmid); | 623 | $tuser=$wakka->getPerson($tcrmid); |
| 631 | $tuser['peopledata']["dialer_status"]=$kstychCall["userstatus"]; | 624 | $tuser['peopledata']["dialer_status"]=$kstychCall["userstatus"]; |
| ... | @@ -639,10 +632,12 @@ if($action=="closecall") | ... | @@ -639,10 +632,12 @@ if($action=="closecall") |
| 639 | $tuser["resolution"]=$kstychCall["resolution"]; | 632 | $tuser["resolution"]=$kstychCall["resolution"]; |
| 640 | $tuser["satisfy"]=$kstychCall["satisfy"]; | 633 | $tuser["satisfy"]=$kstychCall["satisfy"]; |
| 641 | $tuser["final_call_assess"]=$kstychCall["final_call_assess"]; | 634 | $tuser["final_call_assess"]=$kstychCall["final_call_assess"]; |
| 642 | 635 | //print_r($tuser['peopledata']["status"]); | |
| 643 | $tuser['peopledata']["dialer_userdata"]=$kstychCall["userdata"][$tcrmid]; | 636 | $tuser['peopledata']["dialer_userdata"]=$kstychCall["userdata"][$tcrmid]; |
| 644 | if($tuser['peopledata']["status"]=='New' || $tuser['peopledata']["status"]=='NEW')$tuser['peopledata']["status"]="Called"; | 637 | if($tuser['peopledata']["status"]=='New' || $tuser['peopledata']["status"]=='NEW' || $tuser['peopledata']["status"]=='Incall')$tuser['peopledata']["status"]="Called"; |
| 645 | 638 | ||
| 639 | //Log::info("Manoj ".$tuser['peopledata']["status"]); | ||
| 640 | //print_r($tuser['peopledata']["status"]); | ||
| 646 | //for Supervisor Comments - By Manish | 641 | //for Supervisor Comments - By Manish |
| 647 | $tuser['agentcomments']=$kstychCall["agentcomments"]; | 642 | $tuser['agentcomments']=$kstychCall["agentcomments"]; |
| 648 | $tuser['supcomntid']=$kstychCall["supcomntid"]; | 643 | $tuser['supcomntid']=$kstychCall["supcomntid"]; |
| ... | @@ -658,6 +653,9 @@ if($action=="closecall") | ... | @@ -658,6 +653,9 @@ if($action=="closecall") |
| 658 | $user=$wakka->getPerson($crmcall->crm_id); | 653 | $user=$wakka->getPerson($crmcall->crm_id); |
| 659 | if($user['peopledata']['id']==$crmcall->crm_id) | 654 | if($user['peopledata']['id']==$crmcall->crm_id) |
| 660 | { | 655 | { |
| 656 | if($crmcall->crm_id>0){ | ||
| 657 | DB::table('records')->where('id',$crmcall->crm_id)->update(['filter_condition'=>'4']); | ||
| 658 | } | ||
| 661 | $user['peopledata']["dialer_status"]=$kstychCall["userstatus"]; | 659 | $user['peopledata']["dialer_status"]=$kstychCall["userstatus"]; |
| 662 | $user['peopledata']["dialer_substatus"]=$kstychCall["usersubstatus"]; | 660 | $user['peopledata']["dialer_substatus"]=$kstychCall["usersubstatus"]; |
| 663 | $user['peopledata']["dialer_callback"]=$kstychCall["usercallback"]; | 661 | $user['peopledata']["dialer_callback"]=$kstychCall["usercallback"]; |
| ... | @@ -685,7 +683,7 @@ if($action=="closecall") | ... | @@ -685,7 +683,7 @@ if($action=="closecall") |
| 685 | 683 | ||
| 686 | $user['peopledata']["dialer_userdata"]=$kstychCall["userdata"][$crmcall->crm_id]; | 684 | $user['peopledata']["dialer_userdata"]=$kstychCall["userdata"][$crmcall->crm_id]; |
| 687 | $user['peopledata']["dialer_lastcall"]=date("Y-m-d H:i:s"); | 685 | $user['peopledata']["dialer_lastcall"]=date("Y-m-d H:i:s"); |
| 688 | if($user['peopledata']["status"]=='New' || $user['peopledata']["status"]=='NEW')$user['peopledata']["status"]="Called"; | 686 | if($user['peopledata']["status"]=='New' || $user['peopledata']["status"]=='NEW' || $user['peopledata']["status"]=='Incall')$user['peopledata']["status"]="Called"; |
| 689 | //for Supervisor Comments - By Manish | 687 | //for Supervisor Comments - By Manish |
| 690 | $user['agentcomments']=$kstychCall["agentcomments"]; | 688 | $user['agentcomments']=$kstychCall["agentcomments"]; |
| 691 | $user['supcomntid']=$kstychCall["supcomntid"]; | 689 | $user['supcomntid']=$kstychCall["supcomntid"]; |
| ... | @@ -700,7 +698,11 @@ if($action=="closecall") | ... | @@ -700,7 +698,11 @@ if($action=="closecall") |
| 700 | if(!empty($tusers)) | 698 | if(!empty($tusers)) |
| 701 | { | 699 | { |
| 702 | $tppldata=unserialize($tusers[0]['peopledata']); | 700 | $tppldata=unserialize($tusers[0]['peopledata']); |
| 703 | if($tppldata['status']=='New')$wakka->setPersonKey($tusers[0]['id'],'status','Called'); | 701 | if($tppldata['status']=='New' || $tppldata['status']=='Incall')$wakka->setPersonKey($tusers[0]['id'],'status','Called'); |
| 702 | |||
| 703 | |||
| 704 | //print_r($tppldata['status']); | ||
| 705 | //Log::info($tppldata['status']); | ||
| 704 | //if($tppldata['dialer_status']=='') //TODO Config | 706 | //if($tppldata['dialer_status']=='') //TODO Config |
| 705 | { | 707 | { |
| 706 | $wakka->setPersonKey($tusers[0]['id'],'dialer_status',$user['peopledata']["dialer_status"]); | 708 | $wakka->setPersonKey($tusers[0]['id'],'dialer_status',$user['peopledata']["dialer_status"]); |
| ... | @@ -721,14 +723,6 @@ if($action=="closecall") | ... | @@ -721,14 +723,6 @@ if($action=="closecall") |
| 721 | $userlog=UserLog::where('user_id','=',Auth::user()->id)->orderBy("id","DESC")->first(); | 723 | $userlog=UserLog::where('user_id','=',Auth::user()->id)->orderBy("id","DESC")->first(); |
| 722 | $userlog->getLastTs($crmcall->sipid_id,$nowts); | 724 | $userlog->getLastTs($crmcall->sipid_id,$nowts); |
| 723 | $userlog->save(); | 725 | $userlog->save(); |
| 724 | if(Auth::user()->username=='S32732' && $kstychCall['callnumber']=='9324046534'){ | ||
| 725 | try{ | ||
| 726 | $smscontroller = new SmsController(); | ||
| 727 | $smscontroller->sendSmsBasedOnSubDisposition($kstychCall); | ||
| 728 | } catch(Exception $e) { | ||
| 729 | Log::info($e->getMessage()); | ||
| 730 | } | ||
| 731 | } | ||
| 732 | } | 726 | } |
| 733 | 727 | ||
| 734 | return Response::make(""); | 728 | return Response::make(""); |
| ... | @@ -965,7 +959,6 @@ public function show($id) | ... | @@ -965,7 +959,6 @@ public function show($id) |
| 965 | $number_list=array(); | 959 | $number_list=array(); |
| 966 | 960 | ||
| 967 | foreach($mc as $key=>$tcall){ | 961 | foreach($mc as $key=>$tcall){ |
| 968 | //Log::info($tcall); | ||
| 969 | $tccal=substr($tcall->number,-10); | 962 | $tccal=substr($tcall->number,-10); |
| 970 | $mc_number=CRMCall::where('userstatus','!=','InboundDROP')->where ('created_at','>',$tcall->created_at)->where('number','like',"%".$tccal."%")->orderBy("id","DESC")->first(); | 963 | $mc_number=CRMCall::where('userstatus','!=','InboundDROP')->where ('created_at','>',$tcall->created_at)->where('number','like',"%".$tccal."%")->orderBy("id","DESC")->first(); |
| 971 | 964 | ||
| ... | @@ -981,10 +974,8 @@ public function show($id) | ... | @@ -981,10 +974,8 @@ public function show($id) |
| 981 | $lcalls=DB::select("SELECT * FROM crmcalls where id in (SELECT max(id) FROM crmcalls WHERE number IN ('" . implode("','", $number_list). "') GROUP BY number) ORDER BY id DESC"); | 974 | $lcalls=DB::select("SELECT * FROM crmcalls where id in (SELECT max(id) FROM crmcalls WHERE number IN ('" . implode("','", $number_list). "') GROUP BY number) ORDER BY id DESC"); |
| 982 | //$lcalls=DB::select("SELECT * FROM crmcalls where id in (SELECT max(id) FROM crmcalls WHERE number IN ('" . implode("','", $number_list). "') GROUP BY number)"); | 975 | //$lcalls=DB::select("SELECT * FROM crmcalls where id in (SELECT max(id) FROM crmcalls WHERE number IN ('" . implode("','", $number_list). "') GROUP BY number)"); |
| 983 | //$lcalls=$lcalls->orderBy("id","DESC"); | 976 | //$lcalls=$lcalls->orderBy("id","DESC"); |
| 984 | // Log::info($lcalls->id); | ||
| 985 | foreach($lcalls as $lcall) | 977 | foreach($lcalls as $lcall) |
| 986 | { | 978 | { |
| 987 | //Log::info($lcall); | ||
| 988 | if($lcall->userstatus=="InboundDROP") | 979 | if($lcall->userstatus=="InboundDROP") |
| 989 | { | 980 | { |
| 990 | if($lcall->crm_id>0) | 981 | if($lcall->crm_id>0) |
| ... | @@ -1006,13 +997,10 @@ public function show($id) | ... | @@ -1006,13 +997,10 @@ public function show($id) |
| 1006 | 997 | ||
| 1007 | if(!empty($reccrm_ids)) | 998 | if(!empty($reccrm_ids)) |
| 1008 | { | 999 | { |
| 1009 | //Log::info($dbres); | ||
| 1010 | $recids_str = implode(",", $reccrm_ids); | 1000 | $recids_str = implode(",", $reccrm_ids); |
| 1011 | $rec=$wakka->getPersonsMissedcall("id in ($recids_str)"); | 1001 | $rec=$wakka->getPersonsMissedcall("id in ($recids_str)"); |
| 1012 | 1002 | ||
| 1013 | //Log::info($dbres); | ||
| 1014 | $dbres = array_merge($dbres,$rec); | 1003 | $dbres = array_merge($dbres,$rec); |
| 1015 | //Log::info($dbres); | ||
| 1016 | } | 1004 | } |
| 1017 | } | 1005 | } |
| 1018 | 1006 | ||
| ... | @@ -1029,12 +1017,11 @@ public function show($id) | ... | @@ -1029,12 +1017,11 @@ public function show($id) |
| 1029 | $dbres=$wakka->getPersons("dialer_status='$bucket' $currentstatus2 $legalstatus2 $owclientstr limit $bs,$bl"); | 1017 | $dbres=$wakka->getPersons("dialer_status='$bucket' $currentstatus2 $legalstatus2 $owclientstr limit $bs,$bl"); |
| 1030 | } | 1018 | } |
| 1031 | 1019 | ||
| 1032 | $ccountsummary=array();$k=1;//Log::info(count($dbres)); | 1020 | $ccountsummary=array();$k=1; |
| 1033 | foreach($dbres as $dbrow) | 1021 | foreach($dbres as $dbrow) |
| 1034 | { | 1022 | { |
| 1035 | if(isset($dbrow['callid'])) | 1023 | if(isset($dbrow['callid'])) |
| 1036 | { | 1024 | { |
| 1037 | //Log::info($dbrow['callid']); | ||
| 1038 | $lastcall=CRMCall::find($dbrow['callid']); | 1025 | $lastcall=CRMCall::find($dbrow['callid']); |
| 1039 | $callcntmonth=CRMCall::where("number","=",$dbrow['mobile'])->where("created_at",">=",date("Y-m-01 H:i:s",time()+((Auth::user()->timezone)*60)))->count(); | 1026 | $callcntmonth=CRMCall::where("number","=",$dbrow['mobile'])->where("created_at",">=",date("Y-m-01 H:i:s",time()+((Auth::user()->timezone)*60)))->count(); |
| 1040 | } | 1027 | } |
| ... | @@ -1055,12 +1042,11 @@ public function show($id) | ... | @@ -1055,12 +1042,11 @@ public function show($id) |
| 1055 | $lasttime=$lastcall->created_at;if($lasttime=="0000-00-00 00:00:00")$lasttime="";else $lasttime=date("d-M-y H:i:s",strtotime($lasttime)-((Auth::user()->timezone)*60)); | 1042 | $lasttime=$lastcall->created_at;if($lasttime=="0000-00-00 00:00:00")$lasttime="";else $lasttime=date("d-M-y H:i:s",strtotime($lasttime)-((Auth::user()->timezone)*60)); |
| 1056 | $dispo=$lastcall->userstatus; | 1043 | $dispo=$lastcall->userstatus; |
| 1057 | $subdispo=$lastcall->usersubstatus; | 1044 | $subdispo=$lastcall->usersubstatus; |
| 1058 | $followup=$dbrow[dialer_callback];if($followup=="0000-00-00 00:00:00")$followup="";else $followup=date("d-M-y H:i:s",strtotime($followup)-(Auth::user()->timezone*60)); | 1045 | $followup=$dbrow['dialer_callback'];if($followup=="0000-00-00 00:00:00")$followup="";else $followup=date("d-M-y H:i:s",strtotime($followup)-(Auth::user()->timezone*60)); |
| 1059 | $remarks=$lastcall->userremarks; | 1046 | $remarks=$lastcall->userremarks; |
| 1060 | $did=$lastcall->did; | 1047 | $did=$lastcall->did; |
| 1061 | } | 1048 | } |
| 1062 | //Log::info($dbrow[firstname]); | 1049 | if(stristr($dbrow['firstname'], "_ETHNIC_CODE14") != "") |
| 1063 | if(stristr($dbrow[firstname], "_ETHNIC_CODE14") != "") | ||
| 1064 | { | 1050 | { |
| 1065 | $rows.="<tr style='background-color: #59ee7c;color:#ffffff;font-weight: bolder;font-size:115%'>"; | 1051 | $rows.="<tr style='background-color: #59ee7c;color:#ffffff;font-weight: bolder;font-size:115%'>"; |
| 1066 | } | 1052 | } |
| ... | @@ -1147,7 +1133,7 @@ public function show($id) | ... | @@ -1147,7 +1133,7 @@ public function show($id) |
| 1147 | $data.=" | 1133 | $data.=" |
| 1148 | <div style='clear:both'></div> | 1134 | <div style='clear:both'></div> |
| 1149 | 1135 | ||
| 1150 | <table class='table '> | 1136 | <table class='table' style='display:none'> |
| 1151 | <thead> | 1137 | <thead> |
| 1152 | <tr> | 1138 | <tr> |
| 1153 | <th></th> | 1139 | <th></th> |
| ... | @@ -1172,6 +1158,69 @@ public function show($id) | ... | @@ -1172,6 +1158,69 @@ public function show($id) |
| 1172 | </table>"; | 1158 | </table>"; |
| 1173 | return Response::make($data); | 1159 | return Response::make($data); |
| 1174 | } | 1160 | } |
| 1161 | if($id=="loadFollowupData") | ||
| 1162 | { | ||
| 1163 | $wakka = new KHRMSLib(); | ||
| 1164 | $user=Auth::user()->id; | ||
| 1165 | $role = Auth::user()->usertype; | ||
| 1166 | $client = Input::get("client"); | ||
| 1167 | $selection = Input::get("selection"); | ||
| 1168 | $setClient = ''; | ||
| 1169 | $count = 0; | ||
| 1170 | |||
| 1171 | /*$calllog = DB::table('records') | ||
| 1172 | ->join('crmcalls', 'records.dialer_callback', '=', 'crmcalls.usercallback') | ||
| 1173 | ->select('records.firstname', 'records.cust_id', 'records.mobile', 'records.dialer_callback', 'records.status','records.dialer_lastcall','records.id','records.dialer_status','records.client') | ||
| 1174 | ->where("crmcalls.user_id",$user) | ||
| 1175 | //->where("records.dialer_substatus","Follow Up") | ||
| 1176 | ->where("records.dialer_callback", "!=","0000-00-00 00:00:00") | ||
| 1177 | //->where("crmcalls.usercallback", "!=","0000-00-00 00:00:00") | ||
| 1178 | //->where("crmcalls.created_at", ">",date("Y-m-d 08:00:00")) | ||
| 1179 | //->where("crmcalls_archive.usercallback", "=","records.dialer_callback") | ||
| 1180 | //->where("records.dialer_lastcall", "<=","crmcalls_archive.usercallback") | ||
| 1181 | ->get();*/ | ||
| 1182 | |||
| 1183 | $calllog = DB::table('records') | ||
| 1184 | //->join('crmcalls', 'records.dialer_callback', '=', 'crmcalls.usercallback') | ||
| 1185 | ->select('records.customer_name', 'records.cust_id', 'records.mobile', 'records.dialer_callback', 'records.status','records.dialer_lastcall','records.id','records.dialer_status','records.client') | ||
| 1186 | ->where("records.dialer_callback", "!=","0000-00-00 00:00:00"); | ||
| 1187 | |||
| 1188 | if($role == 'Supervisor'){ | ||
| 1189 | $userName = Auth::user()->username; | ||
| 1190 | $supervisorUsers=$wakka->LoadAll("select id from users where supervisor='$userName';"); | ||
| 1191 | $supervisorUsers = implode(",",$supervisorUsers); | ||
| 1192 | if(!empty($supervisorUsers)){ | ||
| 1193 | |||
| 1194 | if($selection == 'all'){ | ||
| 1195 | $setClient =''; | ||
| 1196 | }else{ | ||
| 1197 | $setClient = $client; | ||
| 1198 | $calllog = $calllog->where('records.client', '=', $client); | ||
| 1199 | } | ||
| 1200 | |||
| 1201 | $calllog = $calllog->whereIn("records.usr_id",[$supervisorUsers]) | ||
| 1202 | ->get(); | ||
| 1203 | |||
| 1204 | $count = count($calllog); | ||
| 1205 | } | ||
| 1206 | |||
| 1207 | }else if($role == 'User'){ | ||
| 1208 | if($selection == 'all'){ | ||
| 1209 | $setClient =''; | ||
| 1210 | }else{ | ||
| 1211 | $setClient = $client; | ||
| 1212 | $calllog = $calllog->where('records.client', '=', $client); | ||
| 1213 | } | ||
| 1214 | $calllog = $calllog->where("records.usr_id",$user)->get(); | ||
| 1215 | |||
| 1216 | $count = count($calllog); | ||
| 1217 | } | ||
| 1218 | |||
| 1219 | $data['calllog'] = $calllog; | ||
| 1220 | $data['client'] = $setClient; | ||
| 1221 | $data['count'] = $count; | ||
| 1222 | return view("layout.module.dialer.followUp",$data); | ||
| 1223 | } | ||
| 1175 | if($id=="reports") | 1224 | if($id=="reports") |
| 1176 | { | 1225 | { |
| 1177 | return view("layout.module.dialer.reports",array()); | 1226 | return view("layout.module.dialer.reports",array()); |
| ... | @@ -1436,16 +1485,96 @@ public function show($id) | ... | @@ -1436,16 +1485,96 @@ public function show($id) |
| 1436 | $mroclientstr = $roclientstr; | 1485 | $mroclientstr = $roclientstr; |
| 1437 | 1486 | ||
| 1438 | $client=Input::get("client"); | 1487 | $client=Input::get("client"); |
| 1488 | //print_r($client); | ||
| 1439 | 1489 | ||
| 1440 | if(!empty($roclientstr))$roclientstr="client='$client'";else $roclientstr=""; | 1490 | if(!empty($roclientstr))$roclientstr="client='$client'";else $roclientstr=""; |
| 1441 | 1491 | // echo $roclientstr."Abc"; | |
| 1442 | $users=array(); | 1492 | $users=array(); |
| 1443 | 1493 | ||
| 1444 | if(Auth::user()->usertype!="User"){$tusers=array();return $tusers;} | 1494 | if(Auth::user()->usertype!="User"){$tusers=array();return $tusers;} |
| 1445 | $clientDetails=$wakka->getPersonshome("$roclientstr order by dialer_lastcall asc"); | 1495 | |
| 1496 | DB::table('records')->where('filter_condition','=','2')->where('modified','<',date('Y-m-d H:i:s',time()-(2*60)))->update(['filter_condition'=>'1']); | ||
| 1446 | 1497 | ||
| 1498 | |||
| 1499 | // $clientDetails=$wakka->getPersonshome("$roclientstr order by dialer_lastcall asc"); | ||
| 1500 | //$campaign=DB::table("campaign_query")->where('campaign', '=', $client)->where('current_queue','=','selected')->first(); | ||
| 1447 | 1501 | ||
| 1448 | if($limit>0) | 1502 | $tusers=$wakka->getPersonshome("filter_condition IN('0','1','4') and $roclientstr and dialer_callback <'".date('Y-m-d H:i:s',time()+(15*60))."' and usr_id='".Auth::user()->id."' and dialer_substatus='Follow Up' limit 1;"); |
| 1503 | if(count($tusers)>0){ | ||
| 1504 | if($limit>0){ | ||
| 1505 | $l=1; | ||
| 1506 | foreach($tusers as $tuser){ | ||
| 1507 | if(!isset($users[$tuser['id']])){ | ||
| 1508 | $users[$tuser['id']]=$tuser; | ||
| 1509 | $l++; | ||
| 1510 | |||
| 1511 | if($l>$limit) | ||
| 1512 | break; | ||
| 1513 | } | ||
| 1514 | } | ||
| 1515 | |||
| 1516 | $limit=$limit-sizeof($tusers); | ||
| 1517 | } | ||
| 1518 | } | ||
| 1519 | $campaign=DB::table("campaign_query")->where('campaign', '=', $client)->where('current_queue','=','selected')->first(); | ||
| 1520 | if($campaign) | ||
| 1521 | { | ||
| 1522 | if(stripos($campaign->where_cond,"order by")===false){ | ||
| 1523 | $orderby="order by dialer_lastcall asc"; | ||
| 1524 | }else{ | ||
| 1525 | $orderby =""; | ||
| 1526 | } | ||
| 1527 | // echo "campaign1"; | ||
| 1528 | //print_r($campaign); | ||
| 1529 | $tusers=$wakka->getPersonshome("filter_condition = '1' and $campaign->where_cond $orderby limit 1;"); | ||
| 1530 | //print_r($tusers); | ||
| 1531 | if(count($tusers)>0){ | ||
| 1532 | if($limit>0){ | ||
| 1533 | $l=1; | ||
| 1534 | foreach($tusers as $tuser){ | ||
| 1535 | //Log::info($tuser); | ||
| 1536 | if(!isset($users[$tuser['id']])){ | ||
| 1537 | //Log::info("2-".$users[$tuser['id']]); | ||
| 1538 | $users[$tuser['id']]=$tuser; | ||
| 1539 | $l++; | ||
| 1540 | |||
| 1541 | if($l>$limit) | ||
| 1542 | break; | ||
| 1543 | } | ||
| 1544 | } | ||
| 1545 | |||
| 1546 | $limit=$limit-sizeof($tusers); | ||
| 1547 | } | ||
| 1548 | }else{ | ||
| 1549 | // echo "campaign 2"; | ||
| 1550 | $condition=$campaign->where_cond; | ||
| 1551 | if(stripos($condition,"order by")!==false){ | ||
| 1552 | // $orderby="order by dialer_lastcall asc"; | ||
| 1553 | $condition = substr($condition,0,stripos($condition, 'order by')); | ||
| 1554 | } | ||
| 1555 | //$condition = substr($campaign->where_cond,0,stripos($campaign->where_cond, 'order by')); | ||
| 1556 | $tusers=$wakka->getPersonshome("filter_condition=4 and $condition order by dialer_lastcall asc limit 1;"); | ||
| 1557 | if($limit>0){ | ||
| 1558 | $l=1; | ||
| 1559 | foreach($tusers as $tuser){ | ||
| 1560 | if(!isset($users[$tuser['id']])){ | ||
| 1561 | $users[$tuser['id']]=$tuser; | ||
| 1562 | $l++; | ||
| 1563 | |||
| 1564 | if($l>$limit) | ||
| 1565 | break; | ||
| 1566 | } | ||
| 1567 | } | ||
| 1568 | |||
| 1569 | $limit=$limit-sizeof($tusers); | ||
| 1570 | } | ||
| 1571 | } | ||
| 1572 | }else{ | ||
| 1573 | $clientDetails=$wakka->getPersonshome("$roclientstr and filter_condition NOT IN ('2','3') order by dialer_lastcall asc limit 1;"); | ||
| 1574 | //print_r($clientDetails); | ||
| 1575 | //print_r($clientDetails); | ||
| 1576 | |||
| 1577 | /*if($limit>0) | ||
| 1449 | { | 1578 | { |
| 1450 | $tusers = array_filter($clientDetails, function($var){ | 1579 | $tusers = array_filter($clientDetails, function($var){ |
| 1451 | return ($var['dialer_status']=='InboundDROP' && $var['dialer_lastcall']>'2018-09-11 00:00:00' && $var['dialer_lastcall']>date('Y-m-d H:i:s',time()-(7*24*60*60))); | 1580 | return ($var['dialer_status']=='InboundDROP' && $var['dialer_lastcall']>'2018-09-11 00:00:00' && $var['dialer_lastcall']>date('Y-m-d H:i:s',time()-(7*24*60*60))); |
| ... | @@ -1463,9 +1592,9 @@ public function show($id) | ... | @@ -1463,9 +1592,9 @@ public function show($id) |
| 1463 | } | 1592 | } |
| 1464 | 1593 | ||
| 1465 | $limit=$limit-sizeof($tusers); | 1594 | $limit=$limit-sizeof($tusers); |
| 1466 | } | 1595 | }*/ |
| 1467 | 1596 | ||
| 1468 | if($limit>0) | 1597 | /*if($limit>0) |
| 1469 | { | 1598 | { |
| 1470 | if(!empty($didlinesstr)) | 1599 | if(!empty($didlinesstr)) |
| 1471 | { | 1600 | { |
| ... | @@ -1505,7 +1634,7 @@ public function show($id) | ... | @@ -1505,7 +1634,7 @@ public function show($id) |
| 1505 | 1634 | ||
| 1506 | /* Changes For Missed Call - 14/02/17 */ | 1635 | /* Changes For Missed Call - 14/02/17 */ |
| 1507 | 1636 | ||
| 1508 | foreach($othermissedcalls as $othermissedcall) | 1637 | /*foreach($othermissedcalls as $othermissedcall) |
| 1509 | { | 1638 | { |
| 1510 | $crmnumber = substr($othermissedcall->number, -10); | 1639 | $crmnumber = substr($othermissedcall->number, -10); |
| 1511 | 1640 | ||
| ... | @@ -1528,11 +1657,11 @@ public function show($id) | ... | @@ -1528,11 +1657,11 @@ public function show($id) |
| 1528 | 1657 | ||
| 1529 | /* Changes For Missed Call - 14/02/17 */ | 1658 | /* Changes For Missed Call - 14/02/17 */ |
| 1530 | 1659 | ||
| 1531 | foreach($tusers as $tuser)if(!isset($users[$tuser['id']]))$users[$tuser['id']]=$tuser; | 1660 | /*foreach($tusers as $tuser)if(!isset($users[$tuser['id']]))$users[$tuser['id']]=$tuser; |
| 1532 | 1661 | ||
| 1533 | $limit=$limit-sizeof($tusers); | 1662 | $limit=$limit-sizeof($tusers); |
| 1534 | } | 1663 | } |
| 1535 | } | 1664 | }*/ |
| 1536 | 1665 | ||
| 1537 | 1666 | ||
| 1538 | if($limit>0) | 1667 | if($limit>0) |
| ... | @@ -1540,7 +1669,7 @@ public function show($id) | ... | @@ -1540,7 +1669,7 @@ public function show($id) |
| 1540 | $tusers = array_filter($clientDetails, function($var){ | 1669 | $tusers = array_filter($clientDetails, function($var){ |
| 1541 | return ($var['dialer_callback']>'2018-09-11 00:00:00'&&strtotime($var['dialer_callback'])<strtotime(date('Y-m-d H:i:s',time()+(15*60)))&&($var['dialer_status']=='Contacted - FollowUp - Specific' || $var['dialer_substatus']=='Followup Call' || $var['dialer_status']=='Service Call - Inbound Follow up' || $var['dialer_status'])=='Productive Call - Sales Follow Up'); | 1670 | return ($var['dialer_callback']>'2018-09-11 00:00:00'&&strtotime($var['dialer_callback'])<strtotime(date('Y-m-d H:i:s',time()+(15*60)))&&($var['dialer_status']=='Contacted - FollowUp - Specific' || $var['dialer_substatus']=='Followup Call' || $var['dialer_status']=='Service Call - Inbound Follow up' || $var['dialer_status'])=='Productive Call - Sales Follow Up'); |
| 1542 | }); | 1671 | }); |
| 1543 | 1672 | // echo "1"; | |
| 1544 | $l=1; | 1673 | $l=1; |
| 1545 | foreach($tusers as $tuser){ | 1674 | foreach($tusers as $tuser){ |
| 1546 | if(!isset($users[$tuser['id']])){ | 1675 | if(!isset($users[$tuser['id']])){ |
| ... | @@ -1556,6 +1685,7 @@ public function show($id) | ... | @@ -1556,6 +1685,7 @@ public function show($id) |
| 1556 | } | 1685 | } |
| 1557 | for($p=15;$p>0;$p--) | 1686 | for($p=15;$p>0;$p--) |
| 1558 | { | 1687 | { |
| 1688 | // echo "2"; | ||
| 1559 | if($limit>0) | 1689 | if($limit>0) |
| 1560 | { | 1690 | { |
| 1561 | $tusers = array_filter($clientDetails, function($var) use ($p){ | 1691 | $tusers = array_filter($clientDetails, function($var) use ($p){ |
| ... | @@ -1584,7 +1714,7 @@ public function show($id) | ... | @@ -1584,7 +1714,7 @@ public function show($id) |
| 1584 | $tusers = array_filter($clientDetails, function($var){ | 1714 | $tusers = array_filter($clientDetails, function($var){ |
| 1585 | return ($var['status']=='New'&&$var['mobile']!=''); | 1715 | return ($var['status']=='New'&&$var['mobile']!=''); |
| 1586 | }); | 1716 | }); |
| 1587 | 1717 | // echo "3"; | |
| 1588 | $l=1; | 1718 | $l=1; |
| 1589 | foreach($tusers as $tuser){ | 1719 | foreach($tusers as $tuser){ |
| 1590 | if(!isset($users[$tuser['id']])){ | 1720 | if(!isset($users[$tuser['id']])){ |
| ... | @@ -1602,10 +1732,10 @@ public function show($id) | ... | @@ -1602,10 +1732,10 @@ public function show($id) |
| 1602 | if($limit>0) | 1732 | if($limit>0) |
| 1603 | { | 1733 | { |
| 1604 | $tusers = array_filter($clientDetails, function($var){ | 1734 | $tusers = array_filter($clientDetails, function($var){ |
| 1735 | //return ($var['status']=='Called'&&($var['dialer_substatus']=='NC - Customer in Meeting' || $var['dialer_substatus']=='NC - Ringing / No response' || $var['dialer_substatus']=='NC - Not Reachable' || $var['dialer_substatus']=='NC - Switched off' || $var['dialer_substatus']=='NC - Third Party' || $var['dialer_status'=='Not Contacted'])); | ||
| 1605 | return ($var['status']=='Called'&&$var['dialer_status']=='Not Contacted'); | 1736 | return ($var['status']=='Called'&&$var['dialer_status']=='Not Contacted'); |
| 1606 | //return ($var['status']=='Called'&&$var['dialer_status']=='Not Contacted'); | ||
| 1607 | }); | 1737 | }); |
| 1608 | 1738 | // echo "4"; | |
| 1609 | $l=1; | 1739 | $l=1; |
| 1610 | foreach($tusers as $tuser){ | 1740 | foreach($tusers as $tuser){ |
| 1611 | if(!isset($users[$tuser['id']])){ | 1741 | if(!isset($users[$tuser['id']])){ |
| ... | @@ -1620,7 +1750,7 @@ public function show($id) | ... | @@ -1620,7 +1750,7 @@ public function show($id) |
| 1620 | $limit=$limit-sizeof($tusers); | 1750 | $limit=$limit-sizeof($tusers); |
| 1621 | } | 1751 | } |
| 1622 | 1752 | ||
| 1623 | if($limit>0) | 1753 | /*if($limit>0) |
| 1624 | { | 1754 | { |
| 1625 | $tusers = array_filter($clientDetails, function($var){ | 1755 | $tusers = array_filter($clientDetails, function($var){ |
| 1626 | return ($var['status']=='Called'&&$var['dialer_status']=='Contacted - Follow-Up - Generic'); | 1756 | return ($var['status']=='Called'&&$var['dialer_status']=='Contacted - Follow-Up - Generic'); |
| ... | @@ -1637,10 +1767,11 @@ public function show($id) | ... | @@ -1637,10 +1767,11 @@ public function show($id) |
| 1637 | } | 1767 | } |
| 1638 | 1768 | ||
| 1639 | $limit=$limit-sizeof($tusers); | 1769 | $limit=$limit-sizeof($tusers); |
| 1640 | } | 1770 | }*/ |
| 1641 | 1771 | ||
| 1642 | if($limit>0) | 1772 | if($limit>0) |
| 1643 | { | 1773 | { |
| 1774 | // echo "5"; | ||
| 1644 | $tusers = array_filter($clientDetails, function($var){ | 1775 | $tusers = array_filter($clientDetails, function($var){ |
| 1645 | return ($var['status']=='Called'&&$var['dialer_status']=='AUTOWRAPUP'); | 1776 | return ($var['status']=='Called'&&$var['dialer_status']=='AUTOWRAPUP'); |
| 1646 | }); | 1777 | }); |
| ... | @@ -1657,7 +1788,7 @@ public function show($id) | ... | @@ -1657,7 +1788,7 @@ public function show($id) |
| 1657 | 1788 | ||
| 1658 | $limit=$limit-sizeof($tusers); | 1789 | $limit=$limit-sizeof($tusers); |
| 1659 | } | 1790 | } |
| 1660 | 1791 | } | |
| 1661 | $tusers=array();foreach($users as $tuser)$tusers[]=$tuser; | 1792 | $tusers=array();foreach($users as $tuser)$tusers[]=$tuser; |
| 1662 | return $tusers; | 1793 | return $tusers; |
| 1663 | } | 1794 | } | ... | ... |
| ... | @@ -103,9 +103,11 @@ class HomeController extends Controller { | ... | @@ -103,9 +103,11 @@ class HomeController extends Controller { |
| 103 | $cliarr['keepconf']=Config::get("app.kDialer_keeplocalconf"); | 103 | $cliarr['keepconf']=Config::get("app.kDialer_keeplocalconf"); |
| 104 | //get a free sip id | 104 | //get a free sip id |
| 105 | $server=explode(":",$user->exten); | 105 | $server=explode(":",$user->exten); |
| 106 | $sipid=Sipid::where("status","=","0")->where('updated_at','<=',date("Y-m-d H:i:s",time()-600))->orderBy('updated_at','asc')->where('server','!=',''); | 106 | //$sipid=Sipid::where("status","=","0")->where('updated_at','<=',date("Y-m-d H:i:s",time()-600))->orderBy('updated_at','asc')->where('server','!=',''); |
| 107 | if(isset($server[2]))$sipid=$sipid->where('server','=',$server[2]); | 107 | $sipid=Sipid::where("status","=","0")->where('updated_at','<=',date("Y-m-d H:i:s",time()-600))->orderBy('updated_at','asc')->where('server','=',env('app_ip'))->first(); |
| 108 | $sipid=$sipid->first(); | 108 | //if(isset($server[2]))$sipid=$sipid->where('server','=',$server[2]); |
| 109 | |||
| 110 | //$sipid=$sipid->first(); | ||
| 109 | if(!$sipid)return Response::make("Error : Cant Allocate Data Channel. Giving Up."); | 111 | if(!$sipid)return Response::make("Error : Cant Allocate Data Channel. Giving Up."); |
| 110 | $sipid->clients=json_encode($cliarr); | 112 | $sipid->clients=json_encode($cliarr); |
| 111 | $sipid->user=$user->id; | 113 | $sipid->user=$user->id; | ... | ... |
| ... | @@ -148,41 +148,6 @@ class RecordController extends Controller { | ... | @@ -148,41 +148,6 @@ class RecordController extends Controller { |
| 148 | return "<script>simpleNotification('error','topRight','Please Get on call first');</script>"; | 148 | return "<script>simpleNotification('error','topRight','Please Get on call first');</script>"; |
| 149 | } | 149 | } |
| 150 | } | 150 | } |
| 151 | if($action=="sendsms") | ||
| 152 | { | ||
| 153 | $wakka = new KHRMSLib(); | ||
| 154 | |||
| 155 | $mobile=Input::get("mobile"); | ||
| 156 | $message=Input::get("message"); | ||
| 157 | $url = 'https://10.2.55.165:443/servlet/com.aclwireless.pushconnectivity.listeners.TextListener?'; | ||
| 158 | $inputArray = ['userId'=>'hdfcbalrt',"pass"=>'hdfcbalrt25',"appid"=>"hdfcbalrt","subappid"=>"hdfcbalrt","contenttype"=>"1","to"=>$mobile,"from"=>"HDFCBK","text"=>$message,"selfid"=>"true","alert"=>"1","dlrreq"=>"true","intflag"=>"false"]; | ||
| 159 | $query = http_build_query($inputArray); | ||
| 160 | $url .= $query; | ||
| 161 | |||
| 162 | //echo $url; | ||
| 163 | // exit; | ||
| 164 | |||
| 165 | try{ | ||
| 166 | $ch = curl_init(); | ||
| 167 | curl_setopt($ch, CURLOPT_URL, $url); | ||
| 168 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); | ||
| 169 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | ||
| 170 | // curl_setopt($ch,CURLOPT_CONNECTTIMEOUT, 5); | ||
| 171 | // curl_setopt($ch,CURLOPT_TIMEOUT, 15); | ||
| 172 | $response = curl_exec($ch); | ||
| 173 | //echo "Kumar"; | ||
| 174 | // var_dump($response); | ||
| 175 | //return "<script>simpleNotification('success','topRight',$response);</script>"; | ||
| 176 | curl_close($ch); | ||
| 177 | return "<script>simpleNotification('success','topRight','Success');</script>"; | ||
| 178 | } catch(Exception $e) { | ||
| 179 | //echo "Manoj"; | ||
| 180 | $errormessage=$e->getMessage(); | ||
| 181 | return "<script>simpleNotification('error','topRight','Failed to Send Message');</script>"; | ||
| 182 | //var_dump($e->getMessage()); | ||
| 183 | } | ||
| 184 | //return "<script>simpleNotification('success','topRight','Message is $mobile');</script>"; | ||
| 185 | } | ||
| 186 | 151 | ||
| 187 | } | 152 | } |
| 188 | public function show($id) | 153 | public function show($id) | ... | ... |
| ... | @@ -591,11 +591,11 @@ $data.="</div><div style='width:49%;float:left'> | ... | @@ -591,11 +591,11 @@ $data.="</div><div style='width:49%;float:left'> |
| 591 | $attemptsval.="<option value='".$i."'>".$i."</option>"; | 591 | $attemptsval.="<option value='".$i."'>".$i."</option>"; |
| 592 | } | 592 | } |
| 593 | 593 | ||
| 594 | $data.="<p style='clear:both'> | 594 | /*$data.="<p style='clear:both'> |
| 595 | <label class=label-small_new style='width:25%;' title=''>Attempts: </label> | 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."' | 596 | <select class='form_hrm_select' id='attempt' name='attempt' style='width:50%'>'".$attemptsval."' |
| 597 | </select> | 597 | </select> |
| 598 | </p>"; | 598 | </p>";*/ |
| 599 | 599 | ||
| 600 | 600 | ||
| 601 | //Supervisor Comments - By Manish on 16/02/17 | 601 | //Supervisor Comments - By Manish on 16/02/17 |
| ... | @@ -617,14 +617,14 @@ $data.="</div><div style='width:49%;float:left'> | ... | @@ -617,14 +617,14 @@ $data.="</div><div style='width:49%;float:left'> |
| 617 | $data.="<input type='hidden' id='sup_comnt_id' value='".$supComnt['id']."'> | 617 | $data.="<input type='hidden' id='sup_comnt_id' value='".$supComnt['id']."'> |
| 618 | </p>";*/ | 618 | </p>";*/ |
| 619 | 619 | ||
| 620 | $data.="<p style='clear:both'> | 620 | /*$data.="<p style='clear:both'> |
| 621 | <label class=label-small_new style='width:25%;' title=''>Flag as: </label> | 621 | <label class=label-small_new style='width:25%;' title=''>Flag as: </label> |
| 622 | <select class='form_hrm_select' id='dialer_flag' name='dialer_flag'> | 622 | <select class='form_hrm_select' id='dialer_flag' name='dialer_flag'> |
| 623 | <option value=''>Normal</option> | 623 | <option value=''>Normal</option> |
| 624 | <option value='VIP'>VIP</option> | 624 | <option value='VIP'>VIP</option> |
| 625 | </select> | 625 | </select> |
| 626 | <input type='hidden' id='priority' value=''> | 626 | <input type='hidden' id='priority' value=''> |
| 627 | </p>"; | 627 | </p>";*/ |
| 628 | $data.="</fieldset></div> | 628 | $data.="</fieldset></div> |
| 629 | <div style='width:49%;float:left'> | 629 | <div style='width:49%;float:left'> |
| 630 | <fieldset> | 630 | <fieldset> |
| ... | @@ -714,7 +714,7 @@ $data.="</fieldset></div> | ... | @@ -714,7 +714,7 @@ $data.="</fieldset></div> |
| 714 | </p> | 714 | </p> |
| 715 | </fieldset></div> | 715 | </fieldset></div> |
| 716 | 716 | ||
| 717 | <div style='clear:both;width:100%;'> | 717 | <!--<div style='clear:both;width:100%;'> |
| 718 | <div style='width:49%;float:left'> | 718 | <div style='width:49%;float:left'> |
| 719 | <select class='form_hrm_select' id='serv_vs_prod' name='serv_vs_prod' style='width:49%;background: #f4f4f4;background-image: none;' disabled> | 719 | <select class='form_hrm_select' id='serv_vs_prod' name='serv_vs_prod' style='width:49%;background: #f4f4f4;background-image: none;' disabled> |
| 720 | <option value=''>Service vs Product</option> | 720 | <option value=''>Service vs Product</option> |
| ... | @@ -749,7 +749,7 @@ $data.="</fieldset></div> | ... | @@ -749,7 +749,7 @@ $data.="</fieldset></div> |
| 749 | <option value='Angry'>Angry</option> | 749 | <option value='Angry'>Angry</option> |
| 750 | </select> | 750 | </select> |
| 751 | </div> | 751 | </div> |
| 752 | </div><br><br><br> | 752 | </div><br><br><br>---> |
| 753 | 753 | ||
| 754 | <div style='display:none'> | 754 | <div style='display:none'> |
| 755 | <style> | 755 | <style> |
| ... | @@ -1022,10 +1022,10 @@ $data.="</fieldset></div> | ... | @@ -1022,10 +1022,10 @@ $data.="</fieldset></div> |
| 1022 | <td class='table_hrm_heading_green'>Remarks</td> | 1022 | <td class='table_hrm_heading_green'>Remarks</td> |
| 1023 | <td class='table_hrm_heading_green'>Custom</td> | 1023 | <td class='table_hrm_heading_green'>Custom</td> |
| 1024 | <td class='table_hrm_heading_green'>BTTC</td> | 1024 | <td class='table_hrm_heading_green'>BTTC</td> |
| 1025 | <td class='table_hrm_heading_green'>Service vs Product</td> | 1025 | <!--<td class='table_hrm_heading_green'>Service vs Product</td> |
| 1026 | <td class='table_hrm_heading_green'>Resolution</td> | 1026 | <td class='table_hrm_heading_green'>Resolution</td> |
| 1027 | <td class='table_hrm_heading_green'>Satisfaction</td> | 1027 | <td class='table_hrm_heading_green'>Satisfaction</td> |
| 1028 | <td class='table_hrm_heading_green'>Final Call Assessment</td> | 1028 | <td class='table_hrm_heading_green'>Final Call Assessment</td>--> |
| 1029 | </tr></thead>"; | 1029 | </tr></thead>"; |
| 1030 | //Log::info($this->varid); | 1030 | //Log::info($this->varid); |
| 1031 | $k=1; | 1031 | $k=1; |
| ... | @@ -1085,10 +1085,10 @@ $data.="</fieldset></div> | ... | @@ -1085,10 +1085,10 @@ $data.="</fieldset></div> |
| 1085 | <td class=''>".$fullremarkvalue."</td> | 1085 | <td class=''>".$fullremarkvalue."</td> |
| 1086 | <td class=''>".$userdata."</td> | 1086 | <td class=''>".$userdata."</td> |
| 1087 | <td class=''>".$records[0]->bttc."</td> | 1087 | <td class=''>".$records[0]->bttc."</td> |
| 1088 | <td class=''>".$records[0]->service_vs_product."</td> | 1088 | <!-- <td class='' >".$records[0]->service_vs_product."</td> |
| 1089 | <td class=''>".$records[0]->resolution."</td> | 1089 | <td class='' >".$records[0]->resolution."</td> |
| 1090 | <td class=''>".$records[0]->satisfaction."</td> | 1090 | <td class='' >".$records[0]->satisfaction."</td> |
| 1091 | <td class=''>".$records[0]->final_call_assessment."</td> | 1091 | <td class='' >".$records[0]->final_call_assessment."</td>--> |
| 1092 | </tr>"; | 1092 | </tr>"; |
| 1093 | $k++; | 1093 | $k++; |
| 1094 | } | 1094 | } |
| ... | @@ -3531,18 +3531,18 @@ function CreateForm(&$frm) | ... | @@ -3531,18 +3531,18 @@ function CreateForm(&$frm) |
| 3531 | $frm['QuestionAireHist']["{{id}} {{firstname}}"][]=array();}*/ | 3531 | $frm['QuestionAireHist']["{{id}} {{firstname}}"][]=array();}*/ |
| 3532 | 3532 | ||
| 3533 | //$frm['QuestionnAire']["{{id}} {{firstname}}"][]=array(); | 3533 | //$frm['QuestionnAire']["{{id}} {{firstname}}"][]=array(); |
| 3534 | $frm['CLP']["{{id}} {{firstname}}"][]=array(); | 3534 | //$frm['CLP']["{{id}} {{firstname}}"][]=array(); |
| 3535 | $frm['CLP History']["{{id}} {{firstname}}"][]=array(); | 3535 | //$frm['CLP History']["{{id}} {{firstname}}"][]=array(); |
| 3536 | $frm['ComplaintManagement']["{{id}} {{firstname}}"][]=array(); | 3536 | //$frm['ComplaintManagement']["{{id}} {{firstname}}"][]=array(); |
| 3537 | //$frm['ChildCase']["{{id}} {{firstname}}"][]=array(); | 3537 | //$frm['ChildCase']["{{id}} {{firstname}}"][]=array(); |
| 3538 | $frm['Racing Format']["{{id}} {{firstname}}"][]=array(); | 3538 | //$frm['Racing Format']["{{id}} {{firstname}}"][]=array(); |
| 3539 | //if(Auth::user()->username =="B654321" || Auth::user()->username =="B12345") | 3539 | //if(Auth::user()->username =="B654321" || Auth::user()->username =="B12345") |
| 3540 | //{ | 3540 | //{ |
| 3541 | $frm['Lead Entry Form']["{{id}} {{firstname}}"][]=array(); | 3541 | //$frm['Lead Entry Form']["{{id}} {{firstname}}"][]=array(); |
| 3542 | $frm['RLP']["{{id}} {{firstname}}"][]=array(); | 3542 | //$frm['RLP']["{{id}} {{firstname}}"][]=array(); |
| 3543 | if(Auth::user()->username =="B654321" || Auth::user()->username =="B12345") | 3543 | if(Auth::user()->username =="B654321" || Auth::user()->username =="B12345") |
| 3544 | { | 3544 | { |
| 3545 | $frm['One Assist']["{{id}} {{firstname}}"][]=array(); | 3545 | //$frm['One Assist']["{{id}} {{firstname}}"][]=array(); |
| 3546 | } | 3546 | } |
| 3547 | } | 3547 | } |
| 3548 | } | 3548 | } |
| ... | @@ -3604,15 +3604,15 @@ function CreateForm(&$frm) | ... | @@ -3604,15 +3604,15 @@ function CreateForm(&$frm) |
| 3604 | if($tbname=='Tasks'&&$edituser)$tabsdata.=$this->createTasksTab(); | 3604 | if($tbname=='Tasks'&&$edituser)$tabsdata.=$this->createTasksTab(); |
| 3605 | if($tbname=='Feedback')$tabsdata.=$this->createDispoTab(); | 3605 | if($tbname=='Feedback')$tabsdata.=$this->createDispoTab(); |
| 3606 | if($tbname=='CallHistory')$tabsdata.=$this->createCallsTab(); | 3606 | if($tbname=='CallHistory')$tabsdata.=$this->createCallsTab(); |
| 3607 | if($tbname=='CLP')$tabsdata.=$this->createQaireTab(); | 3607 | //if($tbname=='CLP')$tabsdata.=$this->createQaireTab(); |
| 3608 | if($tbname=='CLP History')$tabsdata.=$this->createQaireHistTab(); | 3608 | //if($tbname=='CLP History')$tabsdata.=$this->createQaireHistTab(); |
| 3609 | if($tbname=='ComplaintManagement')$tabsdata.=$this->createCompManage(); | 3609 | //if($tbname=='ComplaintManagement')$tabsdata.=$this->createCompManage(); |
| 3610 | if($tbname=='ChildCase')$tabsdata.=$this->createChildCase(); | 3610 | //if($tbname=='ChildCase')$tabsdata.=$this->createChildCase(); |
| 3611 | //if($tbname=='RacingCustomer')$tabsdata.=$this->createRacingCust(); | 3611 | //if($tbname=='RacingCustomer')$tabsdata.=$this->createRacingCust(); |
| 3612 | if($tbname=='Racing Format')$tabsdata.=$this->createRacingCust(); | 3612 | //if($tbname=='Racing Format')$tabsdata.=$this->createRacingCust(); |
| 3613 | if($tbname=='Lead Entry Form')$tabsdata.=$this->createLeadEntryForm(); | 3613 | //if($tbname=='Lead Entry Form')$tabsdata.=$this->createLeadEntryForm(); |
| 3614 | if($tbname=='RLP')$tabsdata.=$this->createRLP(); | 3614 | //if($tbname=='RLP')$tabsdata.=$this->createRLP(); |
| 3615 | if($tbname=='One Assist')$tabsdata.=$this->createOneAssistForm(); | 3615 | //if($tbname=='One Assist')$tabsdata.=$this->createOneAssistForm(); |
| 3616 | $tabsdata.="</div>"; | 3616 | $tabsdata.="</div>"; |
| 3617 | $i++; | 3617 | $i++; |
| 3618 | } | 3618 | } | ... | ... |
| ... | @@ -13,7 +13,7 @@ class KHRMSLib | ... | @@ -13,7 +13,7 @@ class KHRMSLib |
| 13 | public $dblink; | 13 | public $dblink; |
| 14 | public $user=NULL; | 14 | public $user=NULL; |
| 15 | 15 | ||
| 16 | public $EMPCacheCols="currentstatus,legalstatus,firstname,lastname,mobile,emailid,altphone1,altphone2,altphone3,altphone4,altphone5,altphone6,altphone7,altphone8,altphone9,altphone10,candidatecategory,nextfollowupdate,passportno,joiningdate,client,designation,supervisor,contracttype,saltotal,ibannumber,servicestoppeddate,employeeexitstatus,exittype,dateofexit,abscondtype,abscondeddate,workflowstatus,status,clientinternalid,department,passportstatus,clientcode,laborcardpersonalid,dialer_status,dialer_substatus,dialer_callback,dialer_remarks,dialer_flag,dialer_lastcall,priority,crmlist_id,group,bttc,service_vs_product,resolution,satisfaction,final_call_assessment,question,mf_isa,DOB,other_information"; | 16 | public $EMPCacheCols="currentstatus,legalstatus,firstname,lastname,mobile,emailid,altphone1,altphone2,altphone3,altphone4,altphone5,altphone6,altphone7,altphone8,altphone9,altphone10,candidatecategory,nextfollowupdate,passportno,joiningdate,client,designation,supervisor,contracttype,saltotal,ibannumber,servicestoppeddate,employeeexitstatus,exittype,dateofexit,abscondtype,abscondeddate,workflowstatus,status,clientinternalid,department,passportstatus,clientcode,laborcardpersonalid,dialer_status,dialer_substatus,dialer_callback,dialer_remarks,dialer_flag,dialer_lastcall,priority,crmlist_id,group,bttc,service_vs_product,resolution,satisfaction,final_call_assessment,question,mf_isa,DOB,other_information,agreementid,applied_amount,city,comp_code,company,completeddate,cust_id,cust_name,customer_name,disb_date,emi_hl,eqty_amt,foir,ins_amt,int_rate,irr,loan_amount,location,mf_amt,nth,offer_amt,outstanding,pf,ph_mob,ph_off,ph_res,pl_offer,proc_fee,product_flag,profile_new,rank,segment,tenure,tu_application_id,ucic_id,filler1,filler2,filler3,filler4,filler5,filler6,filler7,filler8,filler9,filler10,filler11,filler12,filler13,filler14,filler15"; |
| 17 | 17 | ||
| 18 | public $USRCacheCols="id,username,password,fullname,email,status,organization,group,data,presence,timezone,invisible,usertype,diskuse,source,meta,lteam,lteam2,supervisor,created_at,updated_at,remember_token,passwordreset,number1,number2,exten,extencontext,manager"; | 18 | public $USRCacheCols="id,username,password,fullname,email,status,organization,group,data,presence,timezone,invisible,usertype,diskuse,source,meta,lteam,lteam2,supervisor,created_at,updated_at,remember_token,passwordreset,number1,number2,exten,extencontext,manager"; |
| 19 | 19 | ... | ... |
| ... | @@ -469,8 +469,8 @@ class KPAMIListen implements IEventListener | ... | @@ -469,8 +469,8 @@ class KPAMIListen implements IEventListener |
| 469 | 469 | ||
| 470 | $tsip=Sipid::find($crmcall->sipid_id); | 470 | $tsip=Sipid::find($crmcall->sipid_id); |
| 471 | 471 | ||
| 472 | $newqueue=new Kqueue(); | 472 | //$newqueue=new Kqueue(); |
| 473 | $newqueue->playhangupfile($dialline->channel,$dialline->server); | 473 | //$newqueue->playhangupfile($dialline->channel,$dialline->server); |
| 474 | 474 | ||
| 475 | $newqueue=new Kqueue(); | 475 | $newqueue=new Kqueue(); |
| 476 | $newqueue->sipNotify($tsip,"dialerUI","hangup","c",$crmcall->id."~".$crmcall->number."~".base64_encode($channel)); | 476 | $newqueue->sipNotify($tsip,"dialerUI","hangup","c",$crmcall->id."~".$crmcall->number."~".base64_encode($channel)); |
| ... | @@ -497,7 +497,7 @@ class KPAMIListen implements IEventListener | ... | @@ -497,7 +497,7 @@ class KPAMIListen implements IEventListener |
| 497 | 497 | ||
| 498 | if($crmcall->type=="Inbound"&&$crmcall->user_id==0)//InboundDROP | 498 | if($crmcall->type=="Inbound"&&$crmcall->user_id==0)//InboundDROP |
| 499 | { | 499 | { |
| 500 | $userslist=User::where('exten','like' ,'%'.$crmcall->did.'%')->where('status','=','Active')->get(); | 500 | $userslist=User::where('exten','like' ,'%'.$crmcall->did.'%')->get(); |
| 501 | foreach ($userslist as $ulist) { | 501 | foreach ($userslist as $ulist) { |
| 502 | $crmcall->user_id=$ulist->id; | 502 | $crmcall->user_id=$ulist->id; |
| 503 | } | 503 | } |
| ... | @@ -996,14 +996,10 @@ class KPAMIListen implements IEventListener | ... | @@ -996,14 +996,10 @@ class KPAMIListen implements IEventListener |
| 996 | $tdata=array(); | 996 | $tdata=array(); |
| 997 | $tdata['uniqueid']=$uniqueid; | 997 | $tdata['uniqueid']=$uniqueid; |
| 998 | $tdata['inboundchannel']=$channel; | 998 | $tdata['inboundchannel']=$channel; |
| 999 | //Log::useFiles(storage_path().'inbound_log_'.date("Y-m-d").'.log'); | 999 | |
| 1000 | // Log::info("inboundNumber ".$crmcall->number); | ||
| 1001 | $crmcall->data=json_encode($tdata); | 1000 | $crmcall->data=json_encode($tdata); |
| 1002 | $crmcall->save(); | 1001 | $crmcall->save(); |
| 1003 | if($crmcall->did=='46130234'){ | 1002 | |
| 1004 | // Log::useFiles(storage_path().'inbound_log_'.date("Y-m-d").'.log'); | ||
| 1005 | Log::info("inboundNumber ".$crmcall->number); | ||
| 1006 | } | ||
| 1007 | $userStatus=User::where("updated_at",">",date("Y-m-d"))->where("exten","like","%".substr($exten,-4)."%")->where("usertype","!=","Admin")->where('presence', '=', '1')->select('*')->get(); | 1003 | $userStatus=User::where("updated_at",">",date("Y-m-d"))->where("exten","like","%".substr($exten,-4)."%")->where("usertype","!=","Admin")->where('presence', '=', '1')->select('*')->get(); |
| 1008 | 1004 | ||
| 1009 | if($userStatus=="[]") | 1005 | if($userStatus=="[]") |
| ... | @@ -1060,7 +1056,8 @@ if($crmcall->did=='46130234'){ | ... | @@ -1060,7 +1056,8 @@ if($crmcall->did=='46130234'){ |
| 1060 | $users=$wakka->searchPhone("mobile",$crmcall->number); | 1056 | $users=$wakka->searchPhone("mobile",$crmcall->number); |
| 1061 | if(!empty($users)) | 1057 | if(!empty($users)) |
| 1062 | { | 1058 | { |
| 1063 | $ppldata=unserialize($users[0]['peopledata']); | 1059 | $ppldata=unserialize($users[0]['peopledata']); |
| 1060 | |||
| 1064 | $crmcall->crm_id=$users[0]['id']; | 1061 | $crmcall->crm_id=$users[0]['id']; |
| 1065 | $crmcall->number=$users[0]['mobile']; | 1062 | $crmcall->number=$users[0]['mobile']; |
| 1066 | $crmcall->client=($ppldata['client']?$ppldata['client']:""); | 1063 | $crmcall->client=($ppldata['client']?$ppldata['client']:""); |
| ... | @@ -1078,15 +1075,8 @@ if($crmcall->did=='46130234'){ | ... | @@ -1078,15 +1075,8 @@ if($crmcall->did=='46130234'){ |
| 1078 | echo "User Not Found!!\n"; | 1075 | echo "User Not Found!!\n"; |
| 1079 | } | 1076 | } |
| 1080 | $crmcall->save(); | 1077 | $crmcall->save(); |
| 1081 | // Log::useFiles(storage_path().'inbound_log_'.date("Y-m-d").'.log'); | ||
| 1082 | //if($crmcall->did=='46130234'){ | ||
| 1083 | // Log::info("inbound 1".$crmcall->crm_id." ~ ".$crmcall->number." ~ ".$crmcall->did); | ||
| 1084 | //} | ||
| 1085 | } | 1078 | } |
| 1086 | // Log::useFiles(storage_path().'inbound_log_'.date("Y-m-d").'.log'); | 1079 | |
| 1087 | if($crmcall->did=='46130234'){ | ||
| 1088 | Log::info("inbound ".$crmcall->crm_id." ~ ".$crmcall->number." ~ ".$crmcall->did); | ||
| 1089 | } | ||
| 1090 | $sipids=array(); | 1080 | $sipids=array(); |
| 1091 | if($crmcall->client!="") | 1081 | if($crmcall->client!="") |
| 1092 | { | 1082 | { |
| ... | @@ -1206,7 +1196,7 @@ if($crmcall->did=='46130234'){ | ... | @@ -1206,7 +1196,7 @@ if($crmcall->did=='46130234'){ |
| 1206 | foreach($allsipids as $tsip) | 1196 | foreach($allsipids as $tsip) |
| 1207 | { | 1197 | { |
| 1208 | $newqueue=new Kqueue(); | 1198 | $newqueue=new Kqueue(); |
| 1209 | $newqueue->sipNotify($tsip,"popupalert"," Incoming Calls",$crmcall->number."|".$crmcall->client,$crmcall->did); | 1199 | $newqueue->sipNotify($tsip,"popupalert"," Incoming Calls",$crmcall->number."|".$crmcall->client,""); |
| 1210 | } | 1200 | } |
| 1211 | } | 1201 | } |
| 1212 | else | 1202 | else | ... | ... |
| ... | @@ -109,15 +109,15 @@ return [ | ... | @@ -109,15 +109,15 @@ return [ |
| 109 | "RecordingQC"=>["menuAction('dialer/recqc');","A"], | 109 | "RecordingQC"=>["menuAction('dialer/recqc');","A"], |
| 110 | "RecordingArchive"=>["menuAction('dialer/recarchive');","A"], | 110 | "RecordingArchive"=>["menuAction('dialer/recarchive');","A"], |
| 111 | ]], | 111 | ]], |
| 112 | "Campaign" => ["disp"=>"FCM","icon"=>"file","dash"=>"", | 112 | "Campaign" => ["disp"=>"Campaign Management","icon"=>"file","dash"=>"", |
| 113 | "submenu"=>["FCM"=>["menuAction('campaign');"], | 113 | "submenu"=>["Campaign Management"=>["menuAction('campaign');"], |
| 114 | "Bulk Upload"=>["menuAction('campaign/bulkupload');"], | 114 | "Bulk Upload"=>["menuAction('campaign/bulkupload');"], |
| 115 | ]], | 115 | ]], |
| 116 | "Admin" => ["disp"=>"Admin","icon"=>"gear","dash"=>"", | 116 | "Admin" => ["disp"=>"Admin","icon"=>"gear","dash"=>"", |
| 117 | "submenu"=>["Masters"=>["showBlock('Masters');"], | 117 | "submenu"=>["Masters"=>["showBlock('Masters');"], |
| 118 | "Delete Record"=>["showBlock('DeletePerson');"], | 118 | "Delete Record"=>["showBlock('DeletePerson');"], |
| 119 | "Access Log"=>["menuAction('admin/accesslog');"], | 119 | "Access Log"=>["menuAction('admin/accesslog');"], |
| 120 | "DialerReports"=>["menuAction('dialer/areports');"], | 120 | //"DialerReports"=>["menuAction('dialer/areports');"], |
| 121 | ]], | 121 | ]], |
| 122 | "Notification"=> ["disp"=>"Notification","icon"=>"home","dash"=>"","onclick"=>""], | 122 | "Notification"=> ["disp"=>"Notification","icon"=>"home","dash"=>"","onclick"=>""], |
| 123 | "Message" => ["disp"=>"Message","icon"=>"home","dash"=>"","onclick"=>""], | 123 | "Message" => ["disp"=>"Message","icon"=>"home","dash"=>"","onclick"=>""], | ... | ... |
| ... | @@ -60,8 +60,8 @@ kstychCall['agentcomments']=''; | ... | @@ -60,8 +60,8 @@ kstychCall['agentcomments']=''; |
| 60 | kstychCall['supcomntid']=''; | 60 | kstychCall['supcomntid']=''; |
| 61 | kstychCall['userdata']={}; | 61 | kstychCall['userdata']={}; |
| 62 | kstychCall['previewcrmid']=''; | 62 | kstychCall['previewcrmid']=''; |
| 63 | kstychCall['callWrapupTime']=300; | 63 | kstychCall['callWrapupTime']=180; |
| 64 | kstychCall['prograssiveDelay']=120; | 64 | kstychCall['prograssiveDelay']=10; |
| 65 | kstychCall['ts_now']=0; | 65 | kstychCall['ts_now']=0; |
| 66 | 66 | ||
| 67 | kstychCall['bttc_day']=''; | 67 | kstychCall['bttc_day']=''; |
| ... | @@ -143,8 +143,6 @@ function kcallHasConnection(number) | ... | @@ -143,8 +143,6 @@ function kcallHasConnection(number) |
| 143 | 143 | ||
| 144 | function dialerQuickOpen(varid,num,state,substate,autorun) | 144 | function dialerQuickOpen(varid,num,state,substate,autorun) |
| 145 | { | 145 | { |
| 146 | resetCallArray(); | ||
| 147 | console.log("Manojquick"); | ||
| 148 | if(kstychCall['mCallState']=="Wait") | 146 | if(kstychCall['mCallState']=="Wait") |
| 149 | { | 147 | { |
| 150 | var oldpreviewid=kstychCall['previewcrmid']; | 148 | var oldpreviewid=kstychCall['previewcrmid']; |
| ... | @@ -282,8 +280,7 @@ function kCallAction(num,action) | ... | @@ -282,8 +280,7 @@ function kCallAction(num,action) |
| 282 | function dialerDispNumberClick() | 280 | function dialerDispNumberClick() |
| 283 | { | 281 | { |
| 284 | var lastnumber=$("#spandialer_num").html(); | 282 | var lastnumber=$("#spandialer_num").html(); |
| 285 | console.log(lastnumber); | 283 | kstychCall['callWrapupTime']=180; |
| 286 | kstychCall['callWrapupTime']=300; | ||
| 287 | 284 | ||
| 288 | if(kstychCall['mCallState']=="Dispo") | 285 | if(kstychCall['mCallState']=="Dispo") |
| 289 | { | 286 | { |
| ... | @@ -328,9 +325,6 @@ function dialerAddConfCall() | ... | @@ -328,9 +325,6 @@ function dialerAddConfCall() |
| 328 | function incomingCall(calllog,crmid,numnchn) | 325 | function incomingCall(calllog,crmid,numnchn) |
| 329 | { | 326 | { |
| 330 | //document.getElementById("hangup").play(); | 327 | //document.getElementById("hangup").play(); |
| 331 | //stopRingTone(); | ||
| 332 | console.log("incoming 1"); | ||
| 333 | resetCallArray(); | ||
| 334 | $("#dialersearchresults").html('<div id=divworking></div><div style="clear:both"></div>'); | 328 | $("#dialersearchresults").html('<div id=divworking></div><div style="clear:both"></div>'); |
| 335 | 329 | ||
| 336 | var number = numnchn.substring(0, numnchn.indexOf('@')); | 330 | var number = numnchn.substring(0, numnchn.indexOf('@')); |
| ... | @@ -342,11 +336,10 @@ function incomingCall(calllog,crmid,numnchn) | ... | @@ -342,11 +336,10 @@ function incomingCall(calllog,crmid,numnchn) |
| 342 | 336 | ||
| 343 | kSetDData('C','callid',calllog); | 337 | kSetDData('C','callid',calllog); |
| 344 | kSetDData('C','crmid',crmid); | 338 | kSetDData('C','crmid',crmid); |
| 345 | console.log(crmid); | 339 | |
| 346 | if(crmid>0)showRecruit(crmid); | 340 | if(crmid>0)showRecruit(crmid); |
| 347 | else | 341 | else |
| 348 | { | 342 | { |
| 349 | console.log("incoming else"); | ||
| 350 | createSearchRecordDiv('dialersearchresults'); | 343 | createSearchRecordDiv('dialersearchresults'); |
| 351 | } | 344 | } |
| 352 | 345 | ||
| ... | @@ -362,7 +355,6 @@ function incomingCall(calllog,crmid,numnchn) | ... | @@ -362,7 +355,6 @@ function incomingCall(calllog,crmid,numnchn) |
| 362 | 355 | ||
| 363 | function dialerUIUpdate(var1,var2,var3) | 356 | function dialerUIUpdate(var1,var2,var3) |
| 364 | { | 357 | { |
| 365 | console.log("UIupdate"); | ||
| 366 | var3parts=var3.split("~"); | 358 | var3parts=var3.split("~"); |
| 367 | var3parts[2]=atob(var3parts[2]); | 359 | var3parts[2]=atob(var3parts[2]); |
| 368 | if(var1=="dialstart") | 360 | if(var1=="dialstart") |
| ... | @@ -431,17 +423,9 @@ function dialerUIUpdate(var1,var2,var3) | ... | @@ -431,17 +423,9 @@ function dialerUIUpdate(var1,var2,var3) |
| 431 | 423 | ||
| 432 | function incomingPopupAlert(var1,var2,var3) | 424 | function incomingPopupAlert(var1,var2,var3) |
| 433 | { | 425 | { |
| 434 | var loginRoleArray=["R14306"]; | ||
| 435 | var fullexten = $('#userExtension').val(); | ||
| 436 | console.log(fullexten); | ||
| 437 | var exten =fullexten.split(':')[0]; | ||
| 438 | console.log("exten1 "+exten); | ||
| 439 | //var incomingnotify=growlSNotify(var1,var2,"top-right"); | 426 | //var incomingnotify=growlSNotify(var1,var2,"top-right"); |
| 440 | //setTimeout(function(){$.gritter.remove(incomingnotify, {fade: true,speed: 'slow'});incomingnotify=0;},1500); | 427 | //setTimeout(function(){$.gritter.remove(incomingnotify, {fade: true,speed: 'slow'});incomingnotify=0;},1500); |
| 441 | if((kstychCall['ts_Talk']===0 && kstychCall['ts_Call']===0)){ | 428 | //document.getElementById("hangup").play(); |
| 442 | if($.inArray($('#userLoginRole').val(), loginRoleArray)>-1 && (var3===exten))startRingTone(); | ||
| 443 | } | ||
| 444 | console.log(var1+"Var 1"+"Var 2"+var2+"Var 3"+var3); | ||
| 445 | $.titleAlert(var1+" "+var2, { | 429 | $.titleAlert(var1+" "+var2, { |
| 446 | requireBlur:true, | 430 | requireBlur:true, |
| 447 | stopOnFocus:true, | 431 | stopOnFocus:true, |
| ... | @@ -451,7 +435,6 @@ console.log(var1+"Var 1"+"Var 2"+var2+"Var 3"+var3); | ... | @@ -451,7 +435,6 @@ console.log(var1+"Var 1"+"Var 2"+var2+"Var 3"+var3); |
| 451 | 435 | ||
| 452 | //incomingbeepstart(); | 436 | //incomingbeepstart(); |
| 453 | kDesktopNotification("",var1,var2,1500); | 437 | kDesktopNotification("",var1,var2,1500); |
| 454 | setTimeout(stopRingTone, 3000); | ||
| 455 | } | 438 | } |
| 456 | 439 | ||
| 457 | function outgoingCall() | 440 | function outgoingCall() |
| ... | @@ -659,11 +642,11 @@ console.log(fullRem); | ... | @@ -659,11 +642,11 @@ console.log(fullRem); |
| 659 | } | 642 | } |
| 660 | }*/ | 643 | }*/ |
| 661 | 644 | ||
| 662 | if(kstychCall['userstatus'].toLowerCase().indexOf("follow")>-1||kstychCall['userstatus'].toLowerCase().indexOf("callback")>-1) | 645 | if(kstychCall['usersubstatus'].toLowerCase().indexOf("follow up")>-1||kstychCall['userstatus'].toLowerCase().indexOf("callback")>-1) |
| 663 | { | 646 | { |
| 664 | if($('#dialer_usercallback').val()=="") | 647 | if($('#dialer_usercallback').val()=="") |
| 665 | { | 648 | { |
| 666 | console.log("followup"); | 649 | //console.log("followup"); |
| 667 | simpleNotification('error','topRight',"Please select Callback date within one month in future"); | 650 | simpleNotification('error','topRight',"Please select Callback date within one month in future"); |
| 668 | return; | 651 | return; |
| 669 | } | 652 | } |
| ... | @@ -792,7 +775,6 @@ console.log(fullRem); | ... | @@ -792,7 +775,6 @@ console.log(fullRem); |
| 792 | 775 | ||
| 793 | function showWrapUp() | 776 | function showWrapUp() |
| 794 | { | 777 | { |
| 795 | incomingbeepstart(); | ||
| 796 | //document.getElementById("hangup").play(); | 778 | //document.getElementById("hangup").play(); |
| 797 | kstychCall['userstatus']="Paused"; | 779 | kstychCall['userstatus']="Paused"; |
| 798 | kstychCall['usersubstatus']="WRAPUP"; | 780 | kstychCall['usersubstatus']="WRAPUP"; |
| ... | @@ -893,8 +875,8 @@ function resetCallArray() | ... | @@ -893,8 +875,8 @@ function resetCallArray() |
| 893 | if(typeof customerDispofields != 'undefined')customerDispofields={}; | 875 | if(typeof customerDispofields != 'undefined')customerDispofields={}; |
| 894 | 876 | ||
| 895 | kSetDData('C','previewcrmid',""); | 877 | kSetDData('C','previewcrmid',""); |
| 896 | kSetDData('C','callWrapupTime',300); | 878 | kSetDData('C','callWrapupTime',180); |
| 897 | kSetDData('C','prograssiveDelay',120); | 879 | kSetDData('C','prograssiveDelay',10); |
| 898 | } | 880 | } |
| 899 | 881 | ||
| 900 | function updateDialerState(objstr,key,val,key2,val2) | 882 | function updateDialerState(objstr,key,val,key2,val2) |
| ... | @@ -916,16 +898,7 @@ function updateDialerState(objstr,key,val,key2,val2) | ... | @@ -916,16 +898,7 @@ function updateDialerState(objstr,key,val,key2,val2) |
| 916 | { | 898 | { |
| 917 | resetCallArray(); | 899 | resetCallArray(); |
| 918 | } | 900 | } |
| 919 | console.log("manojstatechanged"); | 901 | |
| 920 | if(val=="Manual"){ | ||
| 921 | console.log("Manoj"); | ||
| 922 | resetCallArray(); | ||
| 923 | |||
| 924 | } | ||
| 925 | if(val2=="Incoming"){ | ||
| 926 | console.log("Manoj Incoming"); | ||
| 927 | resetCallArray(); | ||
| 928 | } | ||
| 929 | 902 | ||
| 930 | 903 | ||
| 931 | $("#dialersearchresults").html(""); | 904 | $("#dialersearchresults").html(""); |
| ... | @@ -944,8 +917,7 @@ function updateDialerState(objstr,key,val,key2,val2) | ... | @@ -944,8 +917,7 @@ function updateDialerState(objstr,key,val,key2,val2) |
| 944 | function(retstr){ | 917 | function(retstr){ |
| 945 | if(kstychCall['previewcrmid']!="") | 918 | if(kstychCall['previewcrmid']!="") |
| 946 | { | 919 | { |
| 947 | console.log("manojpreview"); | 920 | kSetDData('C','previewcrmid',""); |
| 948 | //kSetDData('C','previewcrmid',""); | ||
| 949 | updateDialerState(); | 921 | updateDialerState(); |
| 950 | } | 922 | } |
| 951 | else | 923 | else |
| ... | @@ -1216,7 +1188,7 @@ function dialerTimersUpdate() | ... | @@ -1216,7 +1188,7 @@ function dialerTimersUpdate() |
| 1216 | { | 1188 | { |
| 1217 | if(Math.ceil(((kstychCall['ts_Dispo']-kstychCall['ts_Talk'])/1000))<3) | 1189 | if(Math.ceil(((kstychCall['ts_Dispo']-kstychCall['ts_Talk'])/1000))<3) |
| 1218 | { | 1190 | { |
| 1219 | kstychCall['callWrapupTime']=90; | 1191 | kstychCall['callWrapupTime']=60; |
| 1220 | if(typeof dispoClassArray!='undefined' && typeof dispoClassArray['NA'] != 'undefined') | 1192 | if(typeof dispoClassArray!='undefined' && typeof dispoClassArray['NA'] != 'undefined') |
| 1221 | { | 1193 | { |
| 1222 | if($('#dialer_userstatus').val()=="") | 1194 | if($('#dialer_userstatus').val()=="") |
| ... | @@ -1234,7 +1206,7 @@ function dialerTimersUpdate() | ... | @@ -1234,7 +1206,7 @@ function dialerTimersUpdate() |
| 1234 | saveCloseDialerCall('AUTOWRAPUP'); | 1206 | saveCloseDialerCall('AUTOWRAPUP'); |
| 1235 | } | 1207 | } |
| 1236 | 1208 | ||
| 1237 | if(thiswraptime==90 || thiswraptime==300) | 1209 | if(thiswraptime==60 || thiswraptime==180) |
| 1238 | { | 1210 | { |
| 1239 | showWrapUp(); | 1211 | showWrapUp(); |
| 1240 | } | 1212 | } |
| ... | @@ -1245,7 +1217,7 @@ function dialerTimersUpdate() | ... | @@ -1245,7 +1217,7 @@ function dialerTimersUpdate() |
| 1245 | } | 1217 | } |
| 1246 | else if(kstychCall['ts_Talk']>1) | 1218 | else if(kstychCall['ts_Talk']>1) |
| 1247 | { | 1219 | { |
| 1248 | kstychCall['callWrapupTime']=300; | 1220 | kstychCall['callWrapupTime']=180; |
| 1249 | dispT="Talk : "+Math.ceil(((getNowTS()-kstychCall['ts_Talk'])/1000)); | 1221 | dispT="Talk : "+Math.ceil(((getNowTS()-kstychCall['ts_Talk'])/1000)); |
| 1250 | $("#spandialer_ts").html(dispT); | 1222 | $("#spandialer_ts").html(dispT); |
| 1251 | $("#dialertimes1").removeClass("btn-primary").addClass("btn-default"); | 1223 | $("#dialertimes1").removeClass("btn-primary").addClass("btn-default"); | ... | ... |
| 1 | @include("layout/module/campaign/formBuilder") | 1 | @include("layout/module/campaign/formBuilder") |
| 2 | 2 | <?php | |
| 3 | $queryFields = explode(",", 'id,created,modified,currentstatus,legalstatus,firstname,lastname,mobile,emailid,client,status,clientinternalid,clientcode,priority,dialer_status,dialer_substatus,dialer_callback,dialer_remarks,dialer_flag,dialer_lastcall,crmlist_id,group,dbc_activation,digital_initiative,original_created_file,original_uploaded_date,partial_uploaded_date,dialer_last_user_id,dialer_lastcall_did,dialer_lastcall_number,bttc,service_vs_product,resolution,satisfaction,final_call_assessment,old_status,old_dialer_status,old_dialer_substatus,question,trigger_details,mf_isa,DOB,other_information,filter_condition,agreementid,applied_amount,city,comp_code,company,completeddate,cust_id,cust_name,customer_name,disb_date,emi_hl,eqty_amt,foir,ins_amt,int_rate,irr,loan_amount,location,mf_amt,nth,offer_amt,outstanding,pf,ph_mob,ph_off,ph_res,pl_offer,proc_fee,product_flag,profile_new,rank,segment,tenure,tu_application_id,ucic_id,filler1,filler2,filler3,filler4,filler5,filler6,filler7,filler8,filler9,filler10,filler11,filler12,filler13,filler14,filler15'); | ||
| 4 | ?> | ||
| 3 | @if($campaignDetails) | 5 | @if($campaignDetails) |
| 4 | <hr style="margin-top: 10px;margin-bottom: 10px;" /> | 6 | <hr style="margin-top: 10px;margin-bottom: 10px;" /> |
| 5 | <div class="row"> | 7 | <div class="row"> |
| ... | @@ -32,6 +34,17 @@ | ... | @@ -32,6 +34,17 @@ |
| 32 | <strong>Total</strong> <span class="badge"><strong>{{ isset($totalRecordsByDisposition) ? $totalRecordsByDisposition : '0' }}</strong></span> | 34 | <strong>Total</strong> <span class="badge"><strong>{{ isset($totalRecordsByDisposition) ? $totalRecordsByDisposition : '0' }}</strong></span> |
| 33 | </li> | 35 | </li> |
| 34 | </ul> | 36 | </ul> |
| 37 | |||
| 38 | <ul class="list-group"> | ||
| 39 | <li class="list-group-item active">Filter Column</li> | ||
| 40 | @foreach($queryFields as $fields) | ||
| 41 | <li class="list-group-item"> | ||
| 42 | {{$fields}} | ||
| 43 | </li> | ||
| 44 | @endforeach | ||
| 45 | |||
| 46 | </ul> | ||
| 47 | |||
| 35 | </div> | 48 | </div> |
| 36 | <div class="col-sm-10"> | 49 | <div class="col-sm-10"> |
| 37 | <div id="tabs"> | 50 | <div id="tabs"> |
| ... | @@ -55,7 +68,7 @@ | ... | @@ -55,7 +68,7 @@ |
| 55 | <a href="#ctSql" aria-controls="sql" role="tab" data-toggle="tab">Filter Condition</a> | 68 | <a href="#ctSql" aria-controls="sql" role="tab" data-toggle="tab">Filter Condition</a> |
| 56 | </li> | 69 | </li> |
| 57 | <li role="presentation"> | 70 | <li role="presentation"> |
| 58 | <a href="#ctSql1" aria-controls="sql" role="tab" data-toggle="tab">Filter Apply</a> | 71 | <a href="#ctSql1" aria-controls="sql" role="tab" data-toggle="tab">Data Selection Strategy</a> |
| 59 | </li> | 72 | </li> |
| 60 | <li role="presentation"> | 73 | <li role="presentation"> |
| 61 | <a href="#assign" aria-controls="sql" role="tab" data-toggle="tab">User Assign</a> | 74 | <a href="#assign" aria-controls="sql" role="tab" data-toggle="tab">User Assign</a> |
| ... | @@ -81,7 +94,7 @@ | ... | @@ -81,7 +94,7 @@ |
| 81 | <div role="tabpanel" class="tab-pane active" id="ctSql"> | 94 | <div role="tabpanel" class="tab-pane active" id="ctSql"> |
| 82 | @include("layout/module/campaign/campaignTabSql") | 95 | @include("layout/module/campaign/campaignTabSql") |
| 83 | </div> | 96 | </div> |
| 84 | <div role="tabpanel" class="tab-pane" id="ctSql1"> | 97 | <div role="tabpanel" class="tab-pane " id="ctSql1"> |
| 85 | @include("layout/module/campaign/campaignTabSqlCond") | 98 | @include("layout/module/campaign/campaignTabSqlCond") |
| 86 | </div> | 99 | </div> |
| 87 | <div role="tabpanel" class="tab-pane" id="assign"> | 100 | <div role="tabpanel" class="tab-pane" id="assign"> | ... | ... |
| 1 | <div class="container-fluid"> | ||
| 2 | <div class="layout-app"> | ||
| 3 | <div class="row"> | ||
| 4 | <div class="col-md-12"> | ||
| 5 | <div class="col-separator col-separator-first col-unscrollable box"> | ||
| 6 | <div class="innerAll"> | ||
| 7 | <h4>Bulk Upload</h4> | ||
| 8 | <hr style="margin-bottom: 10px;" /> | ||
| 9 | |||
| 10 | <div class="row"> | ||
| 11 | <div class="col-lg-6"> | ||
| 12 | <div class="form-inline"> | ||
| 13 | <form method="post" id="bulkUpload" enctype="multipart/form-data"> | ||
| 14 | <input type=hidden name=uploadSet value='1'> | ||
| 15 | {{ csrf_field() }} | ||
| 16 | <div class="col-md-2"> | ||
| 17 | <label>Upload Users:</label> | ||
| 18 | </div> | ||
| 19 | <div class="col-md-4"> | ||
| 20 | <input type="file" name="file" id="file" required /> | ||
| 21 | </div> | ||
| 22 | <div class="col-md-2"> | ||
| 23 | <input type="submit" name="upload" id="upload" class="btn btn-primary" value="Upload"> | ||
| 24 | |||
| 25 | </div> | ||
| 26 | <div class="col-md-2"> | ||
| 27 | <!--- <span><a href="javascript:void(0)" id="downloadExcel">Sample excel format</a></span>---> | ||
| 28 | </div> | ||
| 29 | </form> | ||
| 30 | </div> | ||
| 31 | </div> | ||
| 32 | <div class="col-lg-6"> | ||
| 33 | |||
| 34 | </div> | ||
| 35 | </div> | ||
| 36 | |||
| 37 | </div> | ||
| 38 | </div> | ||
| 39 | </div> | ||
| 40 | </div> | ||
| 41 | |||
| 42 | </div> | ||
| 43 | </div> | ||
| 44 | |||
| 45 | <script> | ||
| 46 | $(document).ready(function(){ | ||
| 47 | $('#bulkUpload').on('submit', function(event){ | ||
| 48 | event.preventDefault(); | ||
| 49 | var formData = new FormData(this); | ||
| 50 | $.ajax({ | ||
| 51 | url:"campaign?action=bulkupload", | ||
| 52 | method:"POST", | ||
| 53 | data:formData, | ||
| 54 | dataType:'JSON', | ||
| 55 | contentType: false, | ||
| 56 | cache: false, | ||
| 57 | processData: false, | ||
| 58 | success:function(data) | ||
| 59 | { | ||
| 60 | simpleNotification('Success','topRight',"Campaign assign suceesfully!"); | ||
| 61 | $('#bulkUpload').trigger("reset"); | ||
| 62 | $("#file").val(null); | ||
| 63 | }, | ||
| 64 | error: function(error) | ||
| 65 | { | ||
| 66 | simpleNotification('Success','topRight',"Something went wrong!"); | ||
| 67 | }, | ||
| 68 | }); | ||
| 69 | }); | ||
| 70 | |||
| 71 | $('#downloadExcel').click(function(){ | ||
| 72 | event.preventDefault(); | ||
| 73 | doAjax("campaign/sampleDataExcel","","","","","GET"); | ||
| 74 | return false; | ||
| 75 | }); | ||
| 76 | }); | ||
| 77 | </script> |
| 1 | @include("layout/module/campaign/formBuilder") | ||
| 2 | |||
| 3 | @if($campaignDetails) | ||
| 4 | <hr style="margin-top: 10px;margin-bottom: 10px;" /> | ||
| 5 | <div class="row"> | ||
| 6 | <div class="col-sm-2"> | ||
| 7 | <h4 class="text-center"><span class="text-info"> {{ is_array($campaignDetails)?$campaignDetails['mkey']:$campaignDetails->mkey}}</span> <small>campaign</small></h4> | ||
| 8 | <ul class="list-group"> | ||
| 9 | <li class="list-group-item active">By Call Status</li> | ||
| 10 | <?php $totalRecordsByStatus = 0; ?> | ||
| 11 | @foreach($dataCountByStatus as $data) | ||
| 12 | <li class="list-group-item"> | ||
| 13 | {{ $data->status ? $data->status : '- Blank -' }} <span class="badge">{{$data->recordCount}}</span> | ||
| 14 | </li> | ||
| 15 | <?php $totalRecordsByStatus += $data->recordCount; ?> | ||
| 16 | @endforeach | ||
| 17 | <li class="list-group-item" style="background-color:#f6f7fb;"> | ||
| 18 | <strong>Total</strong> <span class="badge"><strong>{{ isset($totalRecordsByStatus) ? $totalRecordsByStatus : '0' }}</strong></span> | ||
| 19 | </li> | ||
| 20 | </ul> | ||
| 21 | |||
| 22 | <ul class="list-group"> | ||
| 23 | <li class="list-group-item active">By Disposition</li> | ||
| 24 | <?php $totalRecordsByDisposition = 0; ?> | ||
| 25 | @foreach($dataCountByDisposition as $data) | ||
| 26 | <li class="list-group-item"> | ||
| 27 | {{ $data->dialer_status ? $data->dialer_status : '- Blank -' }} <span class="badge">{{$data->recordCount}}</span> | ||
| 28 | </li> | ||
| 29 | <?php $totalRecordsByDisposition += $data->recordCount; ?> | ||
| 30 | @endforeach | ||
| 31 | <li class="list-group-item" style="background-color:#f6f7fb;"> | ||
| 32 | <strong>Total</strong> <span class="badge"><strong>{{ isset($totalRecordsByDisposition) ? $totalRecordsByDisposition : '0' }}</strong></span> | ||
| 33 | </li> | ||
| 34 | </ul> | ||
| 35 | </div> | ||
| 36 | <div class="col-sm-10"> | ||
| 37 | <div id="tabs"> | ||
| 38 | <ul class="nav nav-tabs" role="tablist"> | ||
| 39 | <!-- <li role="presentation"> | ||
| 40 | <a href="#ctCrm" aria-controls="home" role="tab" data-toggle="tab">CRM</a> | ||
| 41 | </li> | ||
| 42 | <li role="presentation"> | ||
| 43 | <a href="#ctScript" aria-controls="profile" role="tab" data-toggle="tab">Script</a> | ||
| 44 | </li> | ||
| 45 | <li role="presentation"> | ||
| 46 | <a href="#ctFeedback" aria-controls="messages" role="tab" data-toggle="tab">Feedback</a> | ||
| 47 | </li> | ||
| 48 | <li role="presentation"> | ||
| 49 | <a href="#ctSettings" aria-controls="settings" role="tab" data-toggle="tab">Settings</a> | ||
| 50 | </li> | ||
| 51 | <li role="presentation"> | ||
| 52 | <a href="#ctData" aria-controls="data" role="tab" data-toggle="tab">Data</a> | ||
| 53 | </li> --> | ||
| 54 | <li role="presentation" class="active"> | ||
| 55 | <a href="#ctSql" aria-controls="sql" role="tab" data-toggle="tab">Filter Condition</a> | ||
| 56 | </li> | ||
| 57 | <li role="presentation"> | ||
| 58 | <a href="#ctSql1" aria-controls="sql" role="tab" data-toggle="tab">Filter Apply</a> | ||
| 59 | </li> | ||
| 60 | <li role="presentation"> | ||
| 61 | <a href="#assign" aria-controls="sql" role="tab" data-toggle="tab">User Assign</a> | ||
| 62 | </li> | ||
| 63 | <li role="presentation"> | ||
| 64 | <a href="#schedule" aria-controls="sql" role="tab" data-toggle="tab">Scheduler</a> | ||
| 65 | </li> | ||
| 66 | <li role="presentation"> | ||
| 67 | <a href="#disposition" aria-controls="sql" role="tab" data-toggle="tab">Disposition</a> | ||
| 68 | </li> | ||
| 69 | </ul> | ||
| 70 | <div class="tab-content"> | ||
| 71 | <!-- <div role="tabpanel" class="tab-pane" id="ctCrm"> | ||
| 72 | </div> | ||
| 73 | <div role="tabpanel" class="tab-pane" id="ctScript"> | ||
| 74 | </div> | ||
| 75 | <div role="tabpanel" class="tab-pane" id="ctFeedback"> | ||
| 76 | </div> | ||
| 77 | <div role="tabpanel" class="tab-pane" id="ctSettings"> | ||
| 78 | </div> | ||
| 79 | <div role="tabpanel" class="tab-pane" id="ctData"> | ||
| 80 | </div> --> | ||
| 81 | <div role="tabpanel" class="tab-pane active" id="ctSql"> | ||
| 82 | @include("layout/module/campaign/campaignTabSql") | ||
| 83 | </div> | ||
| 84 | <div role="tabpanel" class="tab-pane" id="ctSql1"> | ||
| 85 | @include("layout/module/campaign/campaignTabSqlCond") | ||
| 86 | </div> | ||
| 87 | <div role="tabpanel" class="tab-pane" id="assign"> | ||
| 88 | @include("layout/module/campaign/campaignAssignToAgents") | ||
| 89 | </div> | ||
| 90 | <div role="tabpanel" class="tab-pane" id="schedule"> | ||
| 91 | @include("layout/module/campaign/campaignScheduler") | ||
| 92 | </div> | ||
| 93 | <div role="tabpanel" class="tab-pane" id="disposition"> | ||
| 94 | @include("layout/module/campaign/campaignAssignToDisposition") | ||
| 95 | </div> | ||
| 96 | </div> | ||
| 97 | </div> | ||
| 98 | </div> | ||
| 99 | </div> | ||
| 100 | @else | ||
| 101 | <br/> | ||
| 102 | <p class="text-danger text-center">Campaign not found.</p> | ||
| 103 | @endif | ||
| 104 | |||
| 105 | <style> | ||
| 106 | .tab-pane{padding: 10px;border: 1px solid #ed5564;border-top: none;} | ||
| 107 | .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus{border: 1px solid #ed5564;border-bottom-color: transparent;} | ||
| 108 | </style> |
application/resources/views/layout/module/campaign/campaign/campaignAssignToAgents.blade.php
deleted
100755 → 0
| 1 | <?php | ||
| 2 | $dashboarduser=Auth::user(); | ||
| 3 | if($dashboarduser->usertype != 'Admin'){ | ||
| 4 | $allusers=User::where(function ($query) use($dashboarduser) { | ||
| 5 | $query->where('supervisor','=',$dashboarduser->username) | ||
| 6 | ->orWhere('lteam2','=',$dashboarduser->username) | ||
| 7 | ->orWhere('lteam','=',$dashboarduser->username); | ||
| 8 | })->get(); | ||
| 9 | } | ||
| 10 | else | ||
| 11 | { | ||
| 12 | $allusers=DB::table('users')->select('*')->where('status','=','Active')->get(); | ||
| 13 | } | ||
| 14 | |||
| 15 | foreach($userassignedcampign as $userassigned) | ||
| 16 | { | ||
| 17 | $userassignedcamp[] = $userassigned->username; | ||
| 18 | } | ||
| 19 | |||
| 20 | foreach($allusers as $alluser) | ||
| 21 | { | ||
| 22 | if (isset($userassignedcamp)) { | ||
| 23 | if (!in_array($alluser->username, $userassignedcamp)) | ||
| 24 | { | ||
| 25 | $username[] = $alluser->username; | ||
| 26 | } | ||
| 27 | } | ||
| 28 | else{ | ||
| 29 | $username[] = $alluser->username; | ||
| 30 | } | ||
| 31 | |||
| 32 | } | ||
| 33 | foreach($allusers as $user) | ||
| 34 | { | ||
| 35 | $campaigns=$user->clients; | ||
| 36 | if(isset($data->hrmsdata)) | ||
| 37 | {print_r('man');echo "<br><br>"; | ||
| 38 | $hrmsdata=unserialize($data['hrmsdata']); | ||
| 39 | // $campaignList = $hrmsdata['clientsownerlist'];print_r($campaignList); | ||
| 40 | } | ||
| 41 | //$username[] = $alluser->username; | ||
| 42 | } | ||
| 43 | |||
| 44 | //$data['client'] = $client; | ||
| 45 | // if(isset($username))$data->username = $username; | ||
| 46 | ?> | ||
| 47 | <div class="row"> | ||
| 48 | <div class="col-md-12"> | ||
| 49 | <div class="panel panel-info"> | ||
| 50 | <div class="panel-body"> | ||
| 51 | <div class="col-md-2"> | ||
| 52 | <label>Select User:</label> | ||
| 53 | </div> | ||
| 54 | <div class="col-md-6"> | ||
| 55 | <select id="username" class="select2multi" style='width:100%' multiple=""> | ||
| 56 | <option value></option> | ||
| 57 | <?php if(isset($username))foreach($username as $user){;echo "<option value='$user'>$user</option>";} ?> | ||
| 58 | </select> | ||
| 59 | </div> | ||
| 60 | <div class="col-md-2"> | ||
| 61 | <button id="assigncampaign" class="btn btn-xs btn-info">Assign Campaign | ||
| 62 | </button> | ||
| 63 | </div> | ||
| 64 | </div> | ||
| 65 | </div> | ||
| 66 | <div class="panel panel-info"> | ||
| 67 | <div class="panel-body"> | ||
| 68 | <form method="post" id="upload_form" enctype="multipart/form-data"> | ||
| 69 | <input type=hidden name=uploadSet value='1'> | ||
| 70 | {{ csrf_field() }} | ||
| 71 | <div class="col-md-2"> | ||
| 72 | <label>Upload Users:</label> | ||
| 73 | </div> | ||
| 74 | <div class="col-md-6"> | ||
| 75 | <input type="file" name="file" id="file" required /> | ||
| 76 | </div> | ||
| 77 | <div class="col-md-2"> | ||
| 78 | <input type="submit" name="upload" id="upload" class="btn btn-primary" value="Upload"> | ||
| 79 | </div> | ||
| 80 | </form> | ||
| 81 | </div> | ||
| 82 | </div> | ||
| 83 | <!--<div class="panel panel-info"> | ||
| 84 | <div class="panel-body"> | ||
| 85 | <div class="col-md-2"> | ||
| 86 | <label>Upload Users:</label> | ||
| 87 | </div> | ||
| 88 | <div class="col-md-6"> | ||
| 89 | <input type="file" name="user"> | ||
| 90 | <input type="file" name="file" id="file" required /> | ||
| 91 | </div> | ||
| 92 | <div class="col-md-2"> | ||
| 93 | <button id="upload" class="btn btn-xs btn-info">Upload | ||
| 94 | </button> | ||
| 95 | </div> | ||
| 96 | </div> | ||
| 97 | </div> --> | ||
| 98 | |||
| 99 | <div class="panel panel-info"> | ||
| 100 | <div class="panel-heading "><strong>Assigned Users List</strong><div style="float:right;"> | ||
| 101 | <button id="removeuser" class="btn btn-xs btn-info">Edit User | ||
| 102 | </button> | ||
| 103 | </div></div> | ||
| 104 | <div class="panel-body"> | ||
| 105 | |||
| 106 | <div class="col-md-12" id="dbs"> | ||
| 107 | @foreach ($userassignedcampign as $row) | ||
| 108 | |||
| 109 | <div class="col-md-1">{{$row->username}}</div> | ||
| 110 | |||
| 111 | @endforeach | ||
| 112 | </div> | ||
| 113 | <div class="col-md-12" id="abs" style="display:none"> | ||
| 114 | <div class="col-md-6"> | ||
| 115 | <select id="username1" class="select2multi" style='width:100%' multiple=""> | ||
| 116 | <option value></option> | ||
| 117 | <?php if(isset($userassignedcamp))foreach($userassignedcamp as $userassigned){;echo "<option value='$userassigned' selected>$userassigned</option>";} ?> | ||
| 118 | </select> | ||
| 119 | </div> | ||
| 120 | <div class="col-md-2"> | ||
| 121 | <button id="removecampaign" class="btn btn-xs btn-info">Save | ||
| 122 | </button> | ||
| 123 | </div> | ||
| 124 | </div> | ||
| 125 | |||
| 126 | |||
| 127 | </div> | ||
| 128 | </div> | ||
| 129 | </div> | ||
| 130 | </div> | ||
| 131 | <script> | ||
| 132 | $(document).ready(function(){ | ||
| 133 | $('#upload_form').on('submit', function(event){ | ||
| 134 | var selectCampaignField = $('#selectCampaignField').val(); | ||
| 135 | var formData = new FormData(this); | ||
| 136 | formData.append('selectCampaignField', selectCampaignField); | ||
| 137 | event.preventDefault(); | ||
| 138 | $.ajax({ | ||
| 139 | url:"campaign?action=upload", | ||
| 140 | method:"POST", | ||
| 141 | data:formData, | ||
| 142 | dataType:'JSON', | ||
| 143 | contentType: false, | ||
| 144 | cache: false, | ||
| 145 | processData: false, | ||
| 146 | success:function(data) | ||
| 147 | { | ||
| 148 | doAjax("campaign/show","campaign="+selectCampaignField,"campaignDetailsArea","","","GET",function(retrstr){ | ||
| 149 | simpleNotification('Success','topRight',"Campaign assign suceesfully!"); | ||
| 150 | $('.nav-tabs a[href="#assign"]').tab('show'); | ||
| 151 | }); | ||
| 152 | |||
| 153 | } | ||
| 154 | }); | ||
| 155 | }); | ||
| 156 | }); | ||
| 157 | </script> | ||
| 158 | <script> | ||
| 159 | function addInQueue(){ | ||
| 160 | var data = 'radioValue='+$("input[name='query']:checked").val(); | ||
| 161 | |||
| 162 | doAjax("campaign/addCurrQueue",data,"","","","GET"); | ||
| 163 | } | ||
| 164 | |||
| 165 | $('#assigncampaign').click(function() | ||
| 166 | { | ||
| 167 | var agents = $('#username').val(); | ||
| 168 | var selectCampaignField = $('#selectCampaignField').val(); | ||
| 169 | |||
| 170 | |||
| 171 | if(agents&&selectCampaignField) | ||
| 172 | { | ||
| 173 | var postdata='agents='+agents; | ||
| 174 | postdata+='&selectCampaignField='+selectCampaignField; | ||
| 175 | doAjax("campaign/assigncampaign",postdata,"campaignDetailsArea","","","GET",function(retrstr){ | ||
| 176 | doAjax("campaign/show","campaign="+selectCampaignField,"campaignDetailsArea","","","GET",function(retrstr){ | ||
| 177 | |||
| 178 | simpleNotification('Success','topRight',"Campaign assign suceesfully!"); | ||
| 179 | $("#usrname").select2("val", "Select User..."); | ||
| 180 | $("#selectCampaignField").select("val", "Select Dial Mode..."); | ||
| 181 | $('.nav-tabs a[href="#assign"]').tab('show'); | ||
| 182 | }); | ||
| 183 | |||
| 184 | }); | ||
| 185 | } | ||
| 186 | else | ||
| 187 | { | ||
| 188 | $("#campaignDetailsArea").html('<br/><p class="text-danger text-center">Please select the campaign and user.</p>'); | ||
| 189 | } | ||
| 190 | |||
| 191 | }); | ||
| 192 | |||
| 193 | $("#removeuser").click(function(){ | ||
| 194 | $("#dbs").hide(); | ||
| 195 | $("#abs").toggle(); | ||
| 196 | }); | ||
| 197 | $('#removecampaign').click(function() | ||
| 198 | { | ||
| 199 | var agents = $('#username1').val(); | ||
| 200 | var selectCampaignField = $('#selectCampaignField').val(); | ||
| 201 | |||
| 202 | |||
| 203 | if(selectCampaignField) | ||
| 204 | { | ||
| 205 | var postdata='agents='+agents; | ||
| 206 | postdata+='&selectCampaignField='+selectCampaignField; | ||
| 207 | doAjax("campaign/removecampaign",postdata,"campaignDetailsArea","","","GET",function(retrstr){ | ||
| 208 | doAjax("campaign/show","campaign="+selectCampaignField,"campaignDetailsArea","","","GET",function(retrstr){ | ||
| 209 | simpleNotification('Success','topRight',"Campaign assign suceesfully!"); | ||
| 210 | $("#usrname").select2("val", "Select User..."); | ||
| 211 | $("#selectCampaignField").select("val", "Select Dial Mode..."); | ||
| 212 | $('.nav-tabs a[href="#assign"]').tab('show'); | ||
| 213 | }); | ||
| 214 | |||
| 215 | }); | ||
| 216 | } | ||
| 217 | else | ||
| 218 | { | ||
| 219 | $("#campaignDetailsArea").html('<br/><p class="text-danger text-center">Please select the campaign and user.</p>'); | ||
| 220 | } | ||
| 221 | |||
| 222 | }); | ||
| 223 | </script> |
| 1 | <style> | ||
| 2 | .list-group{ | ||
| 3 | padding: 5px; | ||
| 4 | margin: 0px; | ||
| 5 | overflow:auto; | ||
| 6 | width:100% | ||
| 7 | } | ||
| 8 | </style> | ||
| 9 | <div class="row"> | ||
| 10 | <div class="col-md-12"> | ||
| 11 | <div class="panel panel-info"> | ||
| 12 | <div class="panel-body"> | ||
| 13 | <div class="row" style="margin: 5px"> | ||
| 14 | <div class="col-md-2"> | ||
| 15 | <label>Select Disposition:</label> | ||
| 16 | </div> | ||
| 17 | <div class="col-md-6"> | ||
| 18 | <select id="disposition" class="form-control" onchange='subDisposition($(this).val());'> | ||
| 19 | <option value></option> | ||
| 20 | <?php if(isset($disposition)) | ||
| 21 | foreach($disposition as $kay => $val) | ||
| 22 | { | ||
| 23 | $code = $dispositionCode[$kay]; | ||
| 24 | echo "<option data-id='$code' data-text='$kay' value='$val'>$kay</option>"; | ||
| 25 | } ?> | ||
| 26 | </select> | ||
| 27 | |||
| 28 | </div> | ||
| 29 | </div> | ||
| 30 | <div class="row" style="margin: 5px"> | ||
| 31 | <div class="col-md-2"> | ||
| 32 | <label>Select Sub Disposition:</label> | ||
| 33 | </div> | ||
| 34 | <div class="col-md-6"> | ||
| 35 | <select id="subDisposition" class="select2multi" style='width:100%' multiple=""> | ||
| 36 | </select> | ||
| 37 | </select> | ||
| 38 | </div> | ||
| 39 | </div> | ||
| 40 | <div class="row"> | ||
| 41 | <div class="col-md-2"> | ||
| 42 | <button id="assigndesposition" class="btn btn-xs btn-info">Assign Disposition | ||
| 43 | </button> | ||
| 44 | </div> | ||
| 45 | <div class="col-md-8" id="error"> | ||
| 46 | </div> | ||
| 47 | </div> | ||
| 48 | |||
| 49 | </div> | ||
| 50 | </div> | ||
| 51 | </div> | ||
| 52 | |||
| 53 | <div class="col-sm-12"> | ||
| 54 | <div class="panel panel-info"> | ||
| 55 | <div class="panel-heading"><strong>Disposition List</strong></div> | ||
| 56 | <div class="panel-body" id=""> | ||
| 57 | <ul class="list-group"> | ||
| 58 | <?php foreach($dispositionList as $key => $val) { if(!empty($val)){ ?> | ||
| 59 | <li class="list-group-item list-group"> | ||
| 60 | <div class="col-sm-12"> | ||
| 61 | <div class="col-sm-3"><?php echo $key; ?></div> | ||
| 62 | <div class="col-sm-6"><?php echo $val; ?></div> | ||
| 63 | <div class="col-sm-2"><a class="innerAll" href="#" onclick="deleteDesposition('<?php echo $key; ?>');"> | ||
| 64 | <span class="btn btn-primary btn-xs"><i class="fa fa-trash-o"></i></span> | ||
| 65 | </a></div> | ||
| 66 | </div> | ||
| 67 | |||
| 68 | </li> | ||
| 69 | <?php }} ?> | ||
| 70 | </ul> | ||
| 71 | </div> | ||
| 72 | </div> | ||
| 73 | </div> | ||
| 74 | |||
| 75 | </div> | ||
| 76 | |||
| 77 | <script> | ||
| 78 | function subDisposition(dispo) | ||
| 79 | { | ||
| 80 | var dispolist = dispo.split(','); | ||
| 81 | /*var dispolist = []; | ||
| 82 | |||
| 83 | $.each( dispo, function( index, value ){ | ||
| 84 | dispolist = $.merge( dispolist, value.split(',') ); | ||
| 85 | });*/ | ||
| 86 | |||
| 87 | $("#subDisposition").select2("val", "Select"); | ||
| 88 | updateJSSelect('subDisposition',dispolist); | ||
| 89 | } | ||
| 90 | |||
| 91 | function deleteDesposition(key) | ||
| 92 | { | ||
| 93 | var selectCampaignField = $('#selectCampaignField').val(); | ||
| 94 | var postdata='disposition='+key; | ||
| 95 | postdata+='&selectCampaignField='+selectCampaignField; | ||
| 96 | |||
| 97 | doAjax("campaign/deleteAssignDisposition",postdata,"campaignDetailsArea","","","GET",function(retrstr){ | ||
| 98 | simpleNotification('Success','topRight',"Campaign assign suceesfully!"); | ||
| 99 | doAjax("campaign/show","campaign="+selectCampaignField,"campaignDetailsArea","","","GET",function(retrstr){ | ||
| 100 | $("#subDisposition").select2("val", "Select"); | ||
| 101 | $('.nav-tabs a[href="#disposition"]').tab('show'); | ||
| 102 | }); | ||
| 103 | |||
| 104 | }); | ||
| 105 | } | ||
| 106 | |||
| 107 | $('#assigndesposition').click(function() | ||
| 108 | { | ||
| 109 | $("#error").html(''); | ||
| 110 | var code = $('#disposition').find(':selected').attr('data-id') | ||
| 111 | //var disposition = $("#disposition option:selected").text(); | ||
| 112 | var disposition = $('#disposition').find(':selected').attr('data-text') | ||
| 113 | var subDisposition = $('#subDisposition').val(); | ||
| 114 | var selectCampaignField = $('#selectCampaignField').val(); | ||
| 115 | //alert(selectCampaignField); | ||
| 116 | |||
| 117 | if(disposition&&selectCampaignField) | ||
| 118 | { | ||
| 119 | var postdata='disposition='+disposition; | ||
| 120 | postdata+='&code='+code; | ||
| 121 | postdata+='&disposition='+disposition; | ||
| 122 | postdata+='&subDisposition='+subDisposition; | ||
| 123 | postdata+='&selectCampaignField='+selectCampaignField; | ||
| 124 | doAjax("campaign/assigndisposition",postdata,"campaignDetailsArea","","","GET",function(retrstr){ | ||
| 125 | simpleNotification('Success','topRight',"Campaign assign suceesfully!"); | ||
| 126 | doAjax("campaign/show","campaign="+selectCampaignField,"campaignDetailsArea","","","GET",function(retrstr){ | ||
| 127 | $("#subDisposition").select2("val", "Select"); | ||
| 128 | $('.nav-tabs a[href="#disposition"]').tab('show'); | ||
| 129 | }); | ||
| 130 | |||
| 131 | }); | ||
| 132 | } | ||
| 133 | else | ||
| 134 | { | ||
| 135 | $("#error").html('<p class="text-danger text-center">Please select the campaign and disposition.</p>'); | ||
| 136 | return false; | ||
| 137 | } | ||
| 138 | |||
| 139 | |||
| 140 | |||
| 141 | }); | ||
| 142 | |||
| 143 | </script> |
application/resources/views/layout/module/campaign/campaign/campaignFilter.blade.php
deleted
100644 → 0
| 1 | <?php | ||
| 2 | $queryFields = explode(",", 'status,dialer_status,dialer_substatus,usr_id,branchCode,organizationName,designation,dob,location,state,residenceAddress,residenceAddressZipCode,officeAddress,officeAddressZipCode,alternateMobile,officeNumber,referenceName,referenceMobile,referenceName2,referenceMobile2,loanStatus,product,bucket,dpd,tenureStartDate,tenureEndDate,tenureRemaining,disbursalDate,rateOfInterest,installmentNo,chequeBounceNo,reasonForLastBounce,reasonForSecondLastBounce,cycleDate,ebnb,bank,lastMonthPaymentMode,lastMonthPaymentAmount,lastMonthPaymentDate,delinquencyString,specialCode,centralECS,emi,pos,bounceCharge,penalMTD,penalLTD,overdueAmount,installmentAmountOverdue,altphone1,altphone2,altphone3,altphone4,altphone5,altphone6,altphone7,altphone8,altphone9,altphone10,priority,dialer_substatus,dialer_callback,elegible'); | ||
| 3 | |||
| 4 | ?> | ||
| 5 | <div class="row"> | ||
| 6 | <div class="col-md-12"> | ||
| 7 | <div class="panel panel-info"> | ||
| 8 | <div class="panel-body"> | ||
| 9 | <!--<p><button id='addquery' class="btn btn-xs btn-info">ADD</button></p>---> | ||
| 10 | <label> Filter Name</label> | ||
| 11 | <input id='filtername' type='text' /> | ||
| 12 | <select id="columnSelect" multiple="" style='width:100%' class=select2multi> | ||
| 13 | @foreach($queryFields as $fields) | ||
| 14 | <option value="{{$fields}}">{{$fields}}</option> | ||
| 15 | @endforeach | ||
| 16 | </select> | ||
| 17 | <button type="submit" class="btn btn-success pull-right" value='Prepare' id='prepare'>Prepare</button> | ||
| 18 | </div> | ||
| 19 | <div> | ||
| 20 | </div> | ||
| 21 | </div> | ||
| 22 | </div> | ||
| 23 | </div> | ||
| 24 | <script> | ||
| 25 | $("#prepare").click(function(){ | ||
| 26 | console.log($("#columnSelect").val().length); | ||
| 27 | }); | ||
| 28 | </script> |
application/resources/views/layout/module/campaign/campaign/campaignScheduler.blade.php
deleted
100644 → 0
| 1 | <?php | ||
| 2 | |||
| 3 | |||
| 4 | |||
| 5 | ?> | ||
| 6 | |||
| 7 | <div class="row"> | ||
| 8 | <div class="col-md-12"> | ||
| 9 | <div class="panel panel-info"> | ||
| 10 | <div class="panel-body"> | ||
| 11 | <p><label class='label-small_new' style='width:15%'>Campaign Start Date :</label><input type=text class='form_new form_new_amend datetimepicker' name=campaignstartdate id=campaignstartdate value="{{ isset($campaignDetails->campaignstartdate)?$campaignDetails->campaignstartdate:'0000-00-00 00:00:00' }}"></p> | ||
| 12 | <p><label class='label-small_new' style='width:15%'>Campaign End Date :</label><input type=text class='form_new form_new_amend datetimepicker' name=campaignenddate id=campaignenddate value="{{ isset($campaignDetails->campaignenddate)?$campaignDetails->campaignenddate:'0000-00-00 00:00:00' }}" ></p> | ||
| 13 | <div class="col-md-2"> | ||
| 14 | <button id="scheduleCampaign" class="btn btn-xs btn-info">Schedule | ||
| 15 | </button> | ||
| 16 | </div> | ||
| 17 | </div> | ||
| 18 | </div> | ||
| 19 | </div> | ||
| 20 | </div> | ||
| 21 | <script> | ||
| 22 | $('#scheduleCampaign').click(function(){ | ||
| 23 | var selectCampaignField = $('#selectCampaignField').val(); | ||
| 24 | var starttime = $('#campaignstartdate').val(); | ||
| 25 | var endtime = $('#campaignenddate').val(); | ||
| 26 | console.log(endtime); | ||
| 27 | if(endtime != "0"){ | ||
| 28 | var postdata='selectCampaignField='+selectCampaignField+'&starttime='+starttime+'&endtime='+endtime; | ||
| 29 | doAjax("campaign/schedulecampaign",postdata,"campaignDetailsArea","","","GET",function(retrstr){ | ||
| 30 | doAjax("campaign/show","campaign="+selectCampaignField,"campaignDetailsArea","","","GET"); | ||
| 31 | simpleNotification('Success','topRight',"Campaign scheduled suceesfully!"); | ||
| 32 | $("#usrname").select2("val", "Select User..."); | ||
| 33 | $("#selectCampaignField").select("val", "Select Dial Mode..."); | ||
| 34 | |||
| 35 | }); | ||
| 36 | }else{ | ||
| 37 | $("#campaignDetailsArea").html('<br/><p class="text-danger text-center">Please select the Start and End time.</p>'); | ||
| 38 | } | ||
| 39 | |||
| 40 | }); | ||
| 41 | $('body').on('focus',".datetimepicker", function(){ | ||
| 42 | $(this).datetimepicker({format: 'YYYY-MM-DD HH:mm'}); | ||
| 43 | }); | ||
| 44 | </script> |
application/resources/views/layout/module/campaign/campaign/campaignTabCrm.blade.php
deleted
100755 → 0
| 1 | <div class="row"> | ||
| 2 | <div class="btn-group pull-right"> | ||
| 3 | <button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-fw fa-plus-square"></i> Add Field <span class="caret"></span> | ||
| 4 | </button> | ||
| 5 | <ul class="dropdown-menu"> | ||
| 6 | <li><a href="#" onclick="fbAddField('layout','addCrmArea');return false;"><i class="fa fa-fw fa-th-large"></i> Layout</a></li> | ||
| 7 | <li><a href="#" onclick="fbAddField('text','addCrmArea');return false;"><i class="fa fa-fw fa-font"></i> Text</a></li> | ||
| 8 | <li><a href="#" onclick="fbAddField('select','addCrmArea');return false;"><i class="fa fa-fw fa-indent"></i> Select Box</a></li> | ||
| 9 | <li><a href="#" onclick="fbAddField('date','addCrmArea');return false;"><i class="fa fa-fw fa-calendar"></i> Date</a></li> | ||
| 10 | <li><a href="#" onclick="fbAddField('textArea','addCrmArea');return false;"><i class="fa fa-fw fa-list-alt"></i> Text Area</a></li> | ||
| 11 | </ul> | ||
| 12 | </div> | ||
| 13 | </div> | ||
| 14 | |||
| 15 | <div class="modal fade" id="fbAddFieldForm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | ||
| 16 | <div class="modal-dialog" role="document"> | ||
| 17 | <div class="modal-content"> | ||
| 18 | <div class="modal-body" id="fbAddFieldFormContent"></div> | ||
| 19 | </div> | ||
| 20 | </div> | ||
| 21 | </div> | ||
| 22 | |||
| 23 | <hr style="margin:5px 0;border: 1px solid #ed5564;" /> | ||
| 24 | <div id="addCrmArea"></div> | ||
| 25 | |||
| 26 | <script> | ||
| 27 | var feedbackForm = '{"formData":{"row1":{"column1":{"columnName":"Personal Information","columnCount":"6","fields":{"customerName":{"type":"text","name":"customerName","title":"Customer Name","required":true,"default":"","editable":true},"customerType":{"type":"select","name":"customerType","title":"Customer Type","required":true,"options":"Existing,New,MNP,Corporate","default":"Existing","editable":true},"customerAddress":{"type":"textArea","name":"customerAddress","title":"Customer Address","required":true,"default":"","editable":true},"birthDate":{"type":"date","name":"birthDate","title":"Birth Date","required":true,"default":"","editable":true}}},"column2":{"columnName":"Plan Details","columnCount":"6","fields":{"planName":{"type":"text","name":"planName","title":"Plan Name","required":true,"default":"","editable":true},"planType":{"type":"select","name":"planType","title":"Plan Type","required":true,"options":"Prepaid,Postpaid","default":"Postpaid","editable":true},"planIncludes":{"type":"textArea","name":"planIncludes","title":"Plan Includes","required":true,"default":"","editable":true}}}}},"formFields":"customerName,customerType,customerAddress,birthDate,planName,planType,planIncludes"}'; | ||
| 28 | |||
| 29 | doAjax("campaign","action=buildForm&rawData="+feedbackForm,"addCrmArea","","","POST"); | ||
| 30 | </script> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
application/resources/views/layout/module/campaign/campaign/campaignTabData.blade.php
deleted
100755 → 0
| 1 | <?php | ||
| 2 | |||
| 3 | use App\Models\Campaign; | ||
| 4 | |||
| 5 | ini_set("precision", 15); | ||
| 6 | |||
| 7 | include_once(app_path().'/lib/phpexcel/PHPExcel.php'); | ||
| 8 | |||
| 9 | if ($_SERVER["REQUEST_METHOD"] == "POST") | ||
| 10 | { | ||
| 11 | $errorMsg = ""; $successMsg = "";$successCount = 0; | ||
| 12 | |||
| 13 | if($_FILES['file']['tmp_name']) | ||
| 14 | { | ||
| 15 | if($_FILES['file']['type'] == "application/vnd.ms-excel") | ||
| 16 | { | ||
| 17 | $fileUploadLimit = 52428800; // files size is in bytes | ||
| 18 | if($_FILES['file']['size'] < $fileUploadLimit) | ||
| 19 | { | ||
| 20 | if ($_POST["uploadFileType"] == "customerInfo" && $_POST["campaignName"] != "") | ||
| 21 | { | ||
| 22 | $inputFileType = "Excel5"; | ||
| 23 | $objReader = PHPExcel_IOFactory::createReader($inputFileType); | ||
| 24 | $objPHPExcel = $objReader->load($_FILES['file']['tmp_name']); | ||
| 25 | $objWorksheet = $objPHPExcel->getActiveSheet(); | ||
| 26 | $highestColumn = PHPExcel_Cell::columnIndexFromString($objPHPExcel->getActiveSheet()->getHighestColumn()); | ||
| 27 | $highestrow=$objPHPExcel->getActiveSheet()->getHighestRow(); | ||
| 28 | $excelarray=array();$keys=array(); | ||
| 29 | $listId = time(); | ||
| 30 | |||
| 31 | $dataColumns = ['id'=>'Id','unique_id'=>'Customer Unique Id','firstname'=>'First Name','lastname'=>'Last Name','mobile'=>'Mobile','phones'=>'Other Phones']; | ||
| 32 | |||
| 33 | $campaign=Campaign::where('mkey','=',$_POST["campaignName"])->where('mtype','=','company')->first(); | ||
| 34 | if($campaign->crm != ""){ | ||
| 35 | $crmColumns = json_decode($campaign->crm); | ||
| 36 | $crmColumns = (array)$crmColumns->formFields; | ||
| 37 | } | ||
| 38 | |||
| 39 | for($i=1;$i<=$highestrow;$i++){ | ||
| 40 | $excelarray[$i]=array(); | ||
| 41 | for($head = 0; $head < $highestColumn; $head++){ | ||
| 42 | if($i==1){ | ||
| 43 | $keys[$head]=trim($objWorksheet->getCellByColumnAndRow($head,$i)->getValue()); | ||
| 44 | }else{ | ||
| 45 | $excelarray[$i][$keys[$head]]=trim($objWorksheet->getCellByColumnAndRow($head, $i)->getValue()); | ||
| 46 | } | ||
| 47 | } | ||
| 48 | } | ||
| 49 | // print_r($crmColumns);exit; | ||
| 50 | for($i=3;$i<=$highestrow;$i++) | ||
| 51 | { | ||
| 52 | if($excelarray[$i]["id"]==""){ | ||
| 53 | $crmData = []; | ||
| 54 | if(isset($crmColumns)){ | ||
| 55 | foreach ($crmColumns as $key => $value) { | ||
| 56 | array_push($crmData, [$key => $excelarray[$i][$key]]); | ||
| 57 | } | ||
| 58 | } | ||
| 59 | $data = ["list_id"=>$listId, | ||
| 60 | "unique_id"=>$excelarray[$i]["unique_id"], | ||
| 61 | "firstname"=>$excelarray[$i]["firstname"], | ||
| 62 | "lastname"=>$excelarray[$i]["lastname"], | ||
| 63 | "mobile"=>$excelarray[$i]["mobile"], | ||
| 64 | "phones"=>$excelarray[$i]["phones"], | ||
| 65 | "crm"=>serialize($crmData), | ||
| 66 | "client"=>$_POST["campaignName"], | ||
| 67 | "status"=>"New", | ||
| 68 | 'created'=>date('Y-m-d H:i:s'), | ||
| 69 | 'modified'=>date('Y-m-d H:i:s')]; | ||
| 70 | $addToDB = DB::table('records')->insert($data); | ||
| 71 | $successCount++; | ||
| 72 | }else{ | ||
| 73 | $excelarray[$i]["id"]=intval($excelarray[$i]["id"]); | ||
| 74 | } | ||
| 75 | continue; | ||
| 76 | // $lanq = DB::table('records')->select('id')->where('lan', '=', $excelarray[$i]["lan"])->first(); | ||
| 77 | // if($lanq){ | ||
| 78 | // $excelarray[$i]["id"]=intval($lanq->id); | ||
| 79 | // }else{ | ||
| 80 | // $excelarray[$i]["id"]=$wakka->Query("insert into","","records",array('created'=>date('Y-m-d H:i:s'))); | ||
| 81 | // } | ||
| 82 | |||
| 83 | if($wakka->getCount("records","id='".$excelarray[$i]["id"]."'")==1) | ||
| 84 | { | ||
| 85 | $empdata=$wakka->getPerson($excelarray[$i]["id"]); | ||
| 86 | // $ppldata=$empdata["peopledata"]; | ||
| 87 | // $createdlog=$empdata['modifylog']; | ||
| 88 | // $fdirty=$empdata['dirty']; | ||
| 89 | |||
| 90 | // $createdlog[$updatetime]=$username."::"; | ||
| 91 | // $createdlog["updated"]=$updatetime; | ||
| 92 | |||
| 93 | $newdata=$ppldata; | ||
| 94 | if($isadmin||strstr($clientlst,$ppldata['client'])) | ||
| 95 | { | ||
| 96 | $editflag=0; | ||
| 97 | foreach($excelarray[$i] as $key => $value) | ||
| 98 | { | ||
| 99 | $value = preg_replace('/[^A-Za-z0-9\., -]/', '', $value); | ||
| 100 | |||
| 101 | if(isset($kformlib->HRFieldNames[$key])) | ||
| 102 | { | ||
| 103 | if($value!="") | ||
| 104 | { | ||
| 105 | if("A".$ppldata[$key]!="A".$value)//forcing string comparrision //MAGIC | ||
| 106 | { | ||
| 107 | $value=str_replace("'"," ",$value); | ||
| 108 | if(strstr($createdlog[$updatetime],$key)==FALSE)$createdlog[$updatetime].="$key|".str_replace(array("|",",")," ",$ppldata[$key])."|".str_replace(array("|",",")," ",$value).","; | ||
| 109 | |||
| 110 | $fdirty[$key]=1;$editflag=1; | ||
| 111 | |||
| 112 | if($triggers=='Yes') | ||
| 113 | { | ||
| 114 | $kformlib->empAnalytics($excelarray[$i]["id"],$ppldata,$key,$value,$ppldata[$key]); | ||
| 115 | $kformlib->empWorkflowTrigger($excelarray[$i]["id"],$ppldata['client'],$key,$value,$ppldata[$key],$ppldata,$newdata); | ||
| 116 | } | ||
| 117 | $newdata[$key]=$value; | ||
| 118 | } | ||
| 119 | //else $message.="same $excelarray[$i][id]:$key:$value, "; | ||
| 120 | } | ||
| 121 | //else $message.="empty $excelarray[$i][id]:$key, "; | ||
| 122 | }else{ | ||
| 123 | // $message.="Invalid key :$key, "; | ||
| 124 | } | ||
| 125 | } | ||
| 126 | if($editflag) | ||
| 127 | { | ||
| 128 | $empdata["peopledata"]=$newdata; | ||
| 129 | $empdata['modifylog']=$createdlog; | ||
| 130 | $empdata['dirty']=$fdirty; | ||
| 131 | |||
| 132 | $wakka->setPerson($excelarray[$i]["id"],$empdata); | ||
| 133 | $success.=$excelarray[$i]["id"].","; | ||
| 134 | $successCount++; | ||
| 135 | } | ||
| 136 | }else{ | ||
| 137 | $errorMsg.="No access to $excelarray[$i][id], "; | ||
| 138 | } | ||
| 139 | } | ||
| 140 | } | ||
| 141 | $successMsg .= "Data Uploaded ($successCount)."; // : $success."; | ||
| 142 | } | ||
| 143 | }else{ | ||
| 144 | $errorMsg .= "File size too large, Please check file size should be less then ".($fileUploadLimit / (1024*1024))."mb."; | ||
| 145 | } | ||
| 146 | }else{ | ||
| 147 | $errorMsg .= "File format not valid, Please attach Excel file (.xls) and try upload again."; | ||
| 148 | } | ||
| 149 | @unlink($_FILES['file']); | ||
| 150 | }else{ | ||
| 151 | $errorMsg .= "File not found, Please attach file and try upload again."; | ||
| 152 | } | ||
| 153 | if(isset($successMsg) && $successMsg!="")echo "Success! <br/>".$successMsg; | ||
| 154 | if(isset($errorMsg) && $errorMsg!="")echo "Error! <br/>".$errorMsg; | ||
| 155 | } | ||
| 156 | else | ||
| 157 | { | ||
| 158 | if(isset($_GET['format']) && $_GET['format'] == 'dataUpload'){ | ||
| 159 | if(isset($_GET['campaign']) && $_GET['campaign'] != ''){ | ||
| 160 | $dataColumns = ['id'=>'Id','unique_id'=>'Customer Unique Id','firstname'=>'First Name','lastname'=>'Last Name','mobile'=>'Mobile','phones'=>'Other Phones']; | ||
| 161 | |||
| 162 | $campaign=Campaign::where('mkey','=',$_GET['campaign'])->where('mtype','=','company')->first(); | ||
| 163 | if($campaign->crm != ''){ | ||
| 164 | $crmColumns = json_decode($campaign->crm); | ||
| 165 | if($crmColumns->formFields)$dataColumns = array_merge($dataColumns,(array) $crmColumns->formFields); | ||
| 166 | } | ||
| 167 | $PHPExcelObj = new PHPExcel(); $head=0; | ||
| 168 | foreach($dataColumns as $key => $value){ | ||
| 169 | $colstr=PHPExcel_Cell::stringFromColumnIndex($head); | ||
| 170 | $PHPExcelObj->getActiveSheet()->setCellValue($colstr."1", $key); | ||
| 171 | $PHPExcelObj->getActiveSheet()->setCellValue($colstr."2", $value); | ||
| 172 | $head++; | ||
| 173 | } | ||
| 174 | $objWriter = PHPExcel_IOFactory::createWriter($PHPExcelObj, 'Excel5'); | ||
| 175 | $objWriter->save('php://output'); | ||
| 176 | |||
| 177 | header('Content-Type: application/vnd.ms-excel'); | ||
| 178 | header('Content-Disposition: attachment;filename="DataUploadFormat.xls"'); | ||
| 179 | header('Cache-Control: max-age=0'); | ||
| 180 | return; | ||
| 181 | }else{ | ||
| 182 | echo "Campaign not found"; | ||
| 183 | return; | ||
| 184 | } | ||
| 185 | } | ||
| 186 | ?> | ||
| 187 | <div class="row"> | ||
| 188 | <div class="col-sm-12"> | ||
| 189 | <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true"> | ||
| 190 | <div class="panel panel-info"> | ||
| 191 | <div class="panel-heading" role="tab" id="headingOne" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne"> | ||
| 192 | <strong><i class="fa fa-upload"></i> Data Upload</strong> | ||
| 193 | <span class="badge pull-right"><i class="fa fa-sort"></i></span> | ||
| 194 | </div> | ||
| 195 | <div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne"> | ||
| 196 | <div class="panel-body"> | ||
| 197 | <div class="tab_generic"> | ||
| 198 | <p><span style="color:#f00;"><strong>Instruction</strong></span> (Works only if you have 'Write access" to the records) Please create an Excel-2003 format file with header as field-keys and rows containing record data. Extream Care is should be taken during bulk upload as previous values will be overwritten and lost.</p> | ||
| 199 | <hr style="margin-bottom: 10px;" /> | ||
| 200 | <div class="row"> | ||
| 201 | <div class="col-sm-3"> | ||
| 202 | <p><strong>Get Format</strong></p> | ||
| 203 | <button type="submit" class="btn btn-success" onclick="getDataFormat();return false;"><i class="fa fa-download"></i> Get Format</button> | ||
| 204 | </div> | ||
| 205 | <div class="col-sm-9"> | ||
| 206 | <p><strong>Upload File</strong></p> | ||
| 207 | <form method="POST" enctype="multipart/form-data" target="resultArea" action="campaign?action=dataUpload" class="form-inline"> | ||
| 208 | <input type="hidden" name="_token" value="{{ csrf_token() }}" /> | ||
| 209 | <input type="hidden" name="uploadFileType" value="customerInfo"/> | ||
| 210 | <input type="hidden" name="campaignName" value="{{ $campaignDetails->mkey }}"/> | ||
| 211 | <div class="form-group"> | ||
| 212 | <input type="file" class="form-control" name="file" required="required" /> | ||
| 213 | </div> | ||
| 214 | <div class="form-group"> | ||
| 215 | <button type="submit" class="btn btn-success"><i class="fa fa-upload"></i> Upload</button> | ||
| 216 | </div> | ||
| 217 | </form> | ||
| 218 | </div> | ||
| 219 | </div> | ||
| 220 | <hr style="margin-top: 10px;margin-bottom: 10px;" /> | ||
| 221 | <span>Result</span> | ||
| 222 | <iframe name=resultArea id="resultArea" style="width: 100%;border:1px solid #ccc;"></iframe> | ||
| 223 | </div> | ||
| 224 | </div> | ||
| 225 | </div> | ||
| 226 | </div> | ||
| 227 | |||
| 228 | <div class="panel panel-info"> | ||
| 229 | <div class="panel-heading" role="tab" id="headingTwo" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> | ||
| 230 | <strong><i class="fa fa-table"></i> Data List</strong> | ||
| 231 | <span class="badge pull-right"><i class="fa fa-sort"></i></span> | ||
| 232 | </div> | ||
| 233 | <div id="collapseTwo" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingTwo"> | ||
| 234 | <div class="panel-body"> | ||
| 235 | @if(isset($dataList) && count($dataList)) | ||
| 236 | <table class="table table-bordered" style="margin-bottom: 0;"> | ||
| 237 | <head><tr class="active"> | ||
| 238 | <th>List Id</th> | ||
| 239 | <th>Record Count</th> | ||
| 240 | </tr></head> | ||
| 241 | <body> | ||
| 242 | @foreach($dataList as $data) | ||
| 243 | <tr> | ||
| 244 | <td>{{ $data->list_id }}</td> | ||
| 245 | <td>{{ $data->recordCount }}</td> | ||
| 246 | </tr> | ||
| 247 | @endforeach | ||
| 248 | </body> | ||
| 249 | </table> | ||
| 250 | @else | ||
| 251 | <p>No data found</p> | ||
| 252 | @endif | ||
| 253 | </div> | ||
| 254 | </div> | ||
| 255 | </div> | ||
| 256 | </div> | ||
| 257 | </div> | ||
| 258 | </div> | ||
| 259 | |||
| 260 | <script type="text/javascript"> | ||
| 261 | function getDataFormat(){ | ||
| 262 | var campaign = $("#selectCampaignField").val(); | ||
| 263 | window.open('campaign/getDataFormat?format=dataUpload&campaign='+campaign);return false; | ||
| 264 | } | ||
| 265 | </script> | ||
| 266 | |||
| 267 | <?php | ||
| 268 | } | ||
| 269 | ?> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
application/resources/views/layout/module/campaign/campaign/campaignTabFeedback.blade.php
deleted
100755 → 0
| 1 | <div class="row"> | ||
| 2 | <div class="btn-group pull-right"> | ||
| 3 | <button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-fw fa-plus-square"></i> Add Field <span class="caret"></span> | ||
| 4 | </button> | ||
| 5 | <ul class="dropdown-menu"> | ||
| 6 | <li><a href="#" onclick="fbAddField('layout','addFieldArea');return false;"><i class="fa fa-fw fa-th-large"></i> Layout</a></li> | ||
| 7 | <li><a href="#" onclick="fbAddField('text','addFieldArea');return false;"><i class="fa fa-fw fa-font"></i> Text</a></li> | ||
| 8 | <li><a href="#" onclick="fbAddField('select','addFieldArea');return false;"><i class="fa fa-fw fa-indent"></i> Select Box</a></li> | ||
| 9 | <li><a href="#" onclick="fbAddField('date','addFieldArea');return false;"><i class="fa fa-fw fa-calendar"></i> Date</a></li> | ||
| 10 | <li><a href="#" onclick="fbAddField('textArea','addFieldArea');return false;"><i class="fa fa-fw fa-list-alt"></i> Text Area</a></li> | ||
| 11 | </ul> | ||
| 12 | </div> | ||
| 13 | </div> | ||
| 14 | |||
| 15 | <div class="modal fade" id="fbAddFieldForm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | ||
| 16 | <div class="modal-dialog" role="document"> | ||
| 17 | <div class="modal-content"> | ||
| 18 | <div class="modal-body" id="fbAddFieldFormContent"></div> | ||
| 19 | </div> | ||
| 20 | </div> | ||
| 21 | </div> | ||
| 22 | |||
| 23 | <hr style="margin:5px 0;border: 1px solid #ed5564;" /> | ||
| 24 | <div id="addFieldArea"></div> | ||
| 25 | |||
| 26 | <script> | ||
| 27 | var feedbackForm = '{"formData":{"row1":{"column1":{"columnName":"Personal Information","columnCount":"6","fields":{"customerName":{"type":"text","name":"customerName","title":"Customer Name","required":true,"default":"","editable":true},"customerType":{"type":"select","name":"customerType","title":"Customer Type","required":true,"options":"Existing,New,MNP,Corporate","default":"Existing","editable":true},"customerAddress":{"type":"textArea","name":"customerAddress","title":"Customer Address","required":true,"default":"","editable":true},"birthDate":{"type":"date","name":"birthDate","title":"Birth Date","required":true,"default":"","editable":true}}},"column2":{"columnName":"Plan Details","columnCount":"6","fields":{"planName":{"type":"text","name":"planName","title":"Plan Name","required":true,"default":"","editable":true},"planType":{"type":"select","name":"planType","title":"Plan Type","required":true,"options":"Prepaid,Postpaid","default":"Postpaid","editable":true},"planIncludes":{"type":"textArea","name":"planIncludes","title":"Plan Includes","required":true,"default":"","editable":true}}}}},"formFields":"customerName,customerType,customerAddress,birthDate,planName,planType,planIncludes"}'; | ||
| 28 | |||
| 29 | doAjax("campaign","action=buildForm&rawData="+feedbackForm,"addFieldArea","","","POST"); | ||
| 30 | </script> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
application/resources/views/layout/module/campaign/campaign/campaignTabScript.blade.php
deleted
100755 → 0
| 1 | <div class="row"> | ||
| 2 | <div class="col-sm-12"> | ||
| 3 | <div class="panel panel-info"> | ||
| 4 | <div class="panel-heading"><strong>Agent Script</strong></div> | ||
| 5 | <div class="panel-body"> | ||
| 6 | <div> | ||
| 7 | <div class="form-group" style="margin-bottom: 5px;"> | ||
| 8 | <textarea class="form-control" rows="10" id="agentScript" placeholder="Enter your script here">{{ $campaignDetails->script }}</textarea> | ||
| 9 | </div> | ||
| 10 | <div class="form-group" style="margin-bottom: 0;"> | ||
| 11 | <span>Add agent script here</span> | ||
| 12 | <button type="submit" class="btn btn-success pull-right"><i class="glyphicon glyphicon-floppy-disk"></i> Save</button> | ||
| 13 | </div> | ||
| 14 | </div> | ||
| 15 | </div> | ||
| 16 | </div> | ||
| 17 | </div> | ||
| 18 | </div> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
application/resources/views/layout/module/campaign/campaign/campaignTabSql.blade.php
deleted
100755 → 0
| 1 | <?php | ||
| 2 | //$queryFields = explode(",", 'usr_id,branchCode,organizationName,designation,dob,location,state,residenceAddress,residenceAddressZipCode,officeAddress,officeAddressZipCode,alternateMobile,officeNumber,referenceName,referenceMobile,referenceName2,referenceMobile2,loanStatus,product,bucket,dpd,tenureStartDate,tenureEndDate,tenureRemaining,disbursalDate,rateOfInterest,installmentNo,chequeBounceNo,reasonForLastBounce,reasonForSecondLastBounce,cycleDate,ebnb,bank,lastMonthPaymentMode,lastMonthPaymentAmount,lastMonthPaymentDate,delinquencyString,specialCode,centralECS,emi,pos,bounceCharge,penalMTD,penalLTD,overdueAmount,installmentAmountOverdue,altphone1,altphone2,altphone3,altphone4,altphone5,altphone6,altphone7,altphone8,altphone9,altphone10,priority,dialer_substatus,dialer_callback'); | ||
| 3 | $queryFields = explode(",", 'usr_id,branchCode,organizationName,designation,dob,location,state,residenceAddress,residenceAddressZipCode,officeAddress,officeAddressZipCode,alternateMobile,officeNumber,referenceName,referenceMobile,referenceName2,referenceMobile2,loanStatus,product,bucket,dpd,tenureStartDate,tenureEndDate,tenureRemaining,disbursalDate,rateOfInterest,installmentNo,chequeBounceNo,reasonForLastBounce,reasonForSecondLastBounce,cycleDate,ebnb,bank,lastMonthPaymentMode,lastMonthPaymentAmount,lastMonthPaymentDate,delinquencyString,specialCode,centralECS,emi,pos,bounceCharge,penalMTD,penalLTD,overdueAmount,installmentAmountOverdue,altphone1,altphone2,altphone3,altphone4,altphone5,altphone6,altphone7,altphone8,altphone9,altphone10,priority,dialer_substatus,dialer_callback'); | ||
| 4 | ?> | ||
| 5 | <div class="row"> | ||
| 6 | <div class="col-sm-12"> | ||
| 7 | <div class="panel panel-info"> | ||
| 8 | <div class="panel-heading"><strong>Query</strong></div> | ||
| 9 | <div class="panel-body"> | ||
| 10 | <div class="form-group" style="margin-bottom: 8px;"> | ||
| 11 | <label>SELECT</label> | ||
| 12 | <input type='text' value='*' id='allvalues'disabled/> | ||
| 13 | <!--<select id="querySelect" multiple="" data-rel="chosen" style='width:100%' class=select2multi> | ||
| 14 | <option value="currentstatus" selected="selected">currentstatus</option> | ||
| 15 | <option value="legalstatus" selected="selected">legalstatus</option> | ||
| 16 | <option value="mobile" selected="selected">mobile</option> | ||
| 17 | <option value="status" selected="selected">status</option> | ||
| 18 | <option value="dialer_status" selected="selected">dialer_status</option> | ||
| 19 | <option value="dialer_substatus" selected="selected">dialer_substatus</option> | ||
| 20 | @foreach($queryFields as $fields) | ||
| 21 | <option value="{{$fields}}">{{$fields}}</option> | ||
| 22 | @endforeach | ||
| 23 | </select>--> | ||
| 24 | <label style="margin-top: 5px;">FROM 'records' WHERE</label> | ||
| 25 | <input type="text" class="form-control" id="queryConditions" placeholder="1" value="1"/> | ||
| 26 | </div> | ||
| 27 | <div class="form-inline"> | ||
| 28 | <div> | ||
| 29 | <button type="submit" class="btn btn-success pull-right" id='savequery' onclick="runSqlQuery();return false;">Save</button> | ||
| 30 | <!--- <button type="submit" class="btn btn-success pull-right" onclick="runSqlQuery();return false;"><i class="glyphicon glyphicon-ok"></i> Run Query</button>---> | ||
| 31 | </div> | ||
| 32 | </div> | ||
| 33 | </div> | ||
| 34 | </div> | ||
| 35 | |||
| 36 | <div class="panel-group"> | ||
| 37 | <div class="panel panel-default"> | ||
| 38 | <div class="panel-heading"> | ||
| 39 | <h4 class="panel-title"> | ||
| 40 | Show Filters | ||
| 41 | </h4> | ||
| 42 | </div> | ||
| 43 | <div id="collapse1" > | ||
| 44 | <ul class="list-group"> | ||
| 45 | @foreach($queryLogs as $queryLog) | ||
| 46 | <li class="list-group-item"><a onclick="runFSqlQuery({{$queryLog->id}});return false;" style="cursor:pointer">{{$queryLog->query}} </a></li> | ||
| 47 | @endforeach | ||
| 48 | </ul> | ||
| 49 | <div class="panel-footer">*Please Refresh Current Campaign To See Updated Saved Queries</div> | ||
| 50 | </div> | ||
| 51 | </div> | ||
| 52 | </div> | ||
| 53 | <br><br> | ||
| 54 | |||
| 55 | <div class="panel panel-info"> | ||
| 56 | <div class="panel-heading" id="appendButton"><strong>Output</strong><button type="submit" class="btn btn-default btn-sm" onclick="downloadOutput();return false;" style="margin: 0 0 0.1% 84%;display: none" id="downloadButton"><i class="glyphicon glyphicon-download"></i> Download</button></div> | ||
| 57 | <div class="panel-body" id="sqlQueryOutput"> | ||
| 58 | <p><i class="fa fa-exclamation-circle"></i> Press Run Query button to see output!</p> | ||
| 59 | </div> | ||
| 60 | </div> | ||
| 61 | </div> | ||
| 62 | </div> | ||
| 63 | |||
| 64 | <script> | ||
| 65 | function runSqlQuery(){ | ||
| 66 | //var checkedValue = $('#savequery').val(); | ||
| 67 | //var data = 'campaign={{ is_array($campaignDetails)?$campaignDetails["mkey"]:$campaignDetails->mkey }}&querySelect='+$("#querySelect").val()+'&queryConditions='+$("#queryConditions").val()+'&queryLimit='+$("#queryLimit").val()+'&queryOffset='+$("#queryOffset").val()+'&checkedValue='+checkedValue; | ||
| 68 | var data = 'campaign={{ is_array($campaignDetails)?$campaignDetails["mkey"]:$campaignDetails->mkey }}&allvalues='+$("#allvalues").val()+'&queryConditions='+$("#queryConditions").val()+'&queryLimit='+$("#queryLimit").val()+'&queryOffset='+$("#queryOffset").val(); | ||
| 69 | doAjax("campaign/query",data,"sqlQueryOutput","","","GET"); | ||
| 70 | |||
| 71 | document.getElementById("downloadButton").style = "margin: 0% 0% 0.1% 84%;display: block"; | ||
| 72 | } | ||
| 73 | |||
| 74 | function runFSqlQuery(id){ | ||
| 75 | var data = 'campaign={{ is_array($campaignDetails)?$campaignDetails["mkey"]:$campaignDetails->mkey }}&id='+id+'&querySelect='+$("#querySelect").val(); | ||
| 76 | doAjax("campaign/fquery",data,"sqlQueryOutput","","","GET"); | ||
| 77 | |||
| 78 | document.getElementById("downloadButton").style = "margin: 0% 0% 0.1% 84%;display: block"; | ||
| 79 | } | ||
| 80 | |||
| 81 | function delSqlQuery(id){ | ||
| 82 | var data = 'id='+id; | ||
| 83 | var value = '{{ is_array($campaignDetails)?$campaignDetails["mkey"]:$campaignDetails->mkey }}'; | ||
| 84 | doAjax("campaign/delete",data,"sqlQueryOutput","","","GET"); | ||
| 85 | |||
| 86 | doAjax("campaign/show","campaign="+value,"campaignDetailsArea","","","GET",function(response){ | ||
| 87 | $("#campaignRefresh").html('<div class="form-group"><button onclick="campaignDetailsShow($(\'#selectCampaignField option:selected\').val());return false;" class="btn btn-xs btn-info">Refresh Campaign</button></div>'); | ||
| 88 | }); | ||
| 89 | } | ||
| 90 | function enablelogic(id){ | ||
| 91 | console.log(id); | ||
| 92 | var data='id='+id; | ||
| 93 | var value = '{{ is_array($campaignDetails)?$campaignDetails["mkey"]:$campaignDetails->mkey }}'; | ||
| 94 | //doAjax("campaign/enable",data,"sqlQueryOutput","","","GET"); | ||
| 95 | |||
| 96 | doAjax("campaign/show","campaign="+value,"campaignDetailsArea","","","GET",function(response){ | ||
| 97 | $("#campaignRefresh").html('<div class="form-group"><button onclick="campaignDetailsShow($(\'#selectCampaignField option:selected\').val());return false;" class="btn btn-xs btn-info">Refresh Campaign</button></div>'); | ||
| 98 | }); | ||
| 99 | } | ||
| 100 | |||
| 101 | function downloadOutput() | ||
| 102 | { | ||
| 103 | //window.open('campaign/download?campaign={{ is_array($campaignDetails)?$campaignDetails["mkey"]:$campaignDetails->mkey }}&querySelect='+$("#querySelect").val()+'&queryConditions='+$("#queryConditions").val()+'&queryLimit='+$("#queryLimit").val()+'&queryOffset='+$("#queryOffset").val());return false; | ||
| 104 | window.open('campaign/download?campaign={{ is_array($campaignDetails)?$campaignDetails["mkey"]:$campaignDetails->mkey }}&querySelect='+$("#querySelect").val()+'&queryConditions='+$("#queryConditions").val()+'&queryInCondition='+$("#queryInCondition").val()+'&queryLimit='+$("#queryLimit").val()+'&queryOffset='+$("#queryOffset").val());return false; | ||
| 105 | } | ||
| 106 | </script> |
application/resources/views/layout/module/campaign/campaign/campaignTabSqlCond.blade.php
deleted
100755 → 0
| 1 | <div class="row"> | ||
| 2 | <div class="col-sm-12"> | ||
| 3 | <div class="panel panel-info"> | ||
| 4 | <div class="panel-heading"><strong>Query List</strong></div> | ||
| 5 | <div class="panel-body" id=""> | ||
| 6 | <ul class="list-group"> | ||
| 7 | <li class="list-group-item"><input type="radio" name="query" id="currQuery" value="" checked>Default</li> | ||
| 8 | @foreach($queryLogs as $queryLog) | ||
| 9 | <li class="list-group-item"><input type="radio" name="query" id="currQuery" value="{{$queryLog->id}}" {{$queryLog->current_queue?"checked":""}}>{{$queryLog->query}}</li> | ||
| 10 | @endforeach | ||
| 11 | </ul> | ||
| 12 | |||
| 13 | <div class="form-inline"> | ||
| 14 | <div class="form-group" style="display: block;"> | ||
| 15 | <button type="submit" class="btn btn-success pull-right" onclick="addInQueue();return false;"><i class="glyphicon glyphicon-plus"></i> Filter Apply</button> | ||
| 16 | </div> | ||
| 17 | </div> | ||
| 18 | </div> | ||
| 19 | </div> | ||
| 20 | </div> | ||
| 21 | </div> | ||
| 22 | |||
| 23 | <script> | ||
| 24 | function addInQueue(){ | ||
| 25 | var data = 'radioValue='+$("input[name='query']:checked").val(); | ||
| 26 | // var checkedValue = $('.saveQryChck:checked').val(); | ||
| 27 | // var data = 'campaign={{ is_array($campaignDetails)?$campaignDetails["mkey"]:$campaignDetails->mkey }}&querySelect='+$("#querySelect").val()+'&queryConditions='+$("#queryConditions").val()+'&queryLimit='+$("#queryLimit").val()+'&queryOffset='+$("#queryOffset").val()+'&checkedValue='+checkedValue; | ||
| 28 | doAjax("campaign/addCurrQueue",data,"","","","GET"); | ||
| 29 | } | ||
| 30 | </script> |
| 1 | <?php | ||
| 2 | |||
| 3 | include_once(app_path().'/lib/phpexcel/PHPExcel.php'); | ||
| 4 | |||
| 5 | $inputFileType = "Excel5"; | ||
| 6 | $objReader = PHPExcel_IOFactory::createReader($inputFileType); | ||
| 7 | $objPHPExcel = $objReader->load("assets/extras/blank.xls"); | ||
| 8 | $baseRow = 2; | ||
| 9 | |||
| 10 | $tcol=0;$extrahdrarr=array(); | ||
| 11 | |||
| 12 | $highestColumn = sizeof($fieldsarr); | ||
| 13 | for ($head = 0; $head < $highestColumn; $head++){ | ||
| 14 | $colstr=PHPExcel_Cell::stringFromColumnIndex($head); | ||
| 15 | $objPHPExcel->getActiveSheet()->setCellValue($colstr."1", $fieldsarr[$head]); | ||
| 16 | } | ||
| 17 | |||
| 18 | $ii=1; | ||
| 19 | foreach($alist as $aline) | ||
| 20 | { | ||
| 21 | $row = $baseRow++; $col = 0; | ||
| 22 | |||
| 23 | foreach ($fieldsarr as $key) { | ||
| 24 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit(trim($aline->$key)); | ||
| 25 | } | ||
| 26 | |||
| 27 | } | ||
| 28 | |||
| 29 | header('Content-Type: application/vnd.ms-excel'); | ||
| 30 | header('Content-Disposition: attachment;filename="Output.xls"'); | ||
| 31 | header('Cache-Control: max-age=0'); | ||
| 32 | |||
| 33 | $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, $inputFileType); | ||
| 34 | $objWriter->save('php://output'); | ||
| 35 | |||
| 36 | return ; | ||
| 37 | |||
| 38 | ?> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | <script> | ||
| 2 | function addDatePicker(selector){ | ||
| 3 | $('#'+selector).datepicker({dateFormat:'yy-mm-dd',inline:true,changeYear:true,changeMonth:true,selectOtherMonths:true,yearRange:'1947:2022'}); | ||
| 4 | $('#'+selector).datepicker("show"); | ||
| 5 | } | ||
| 6 | |||
| 7 | function fbAddField(type,area){ | ||
| 8 | var output = ''; | ||
| 9 | if(type == 'layout'){ | ||
| 10 | |||
| 11 | } | ||
| 12 | $('#fbAddFieldFormContent').append(type); | ||
| 13 | $('#fbAddFieldForm').modal('show'); | ||
| 14 | |||
| 15 | $('#'+area).append(type); | ||
| 16 | } | ||
| 17 | </script> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | <div class="container-fluid"> | ||
| 2 | <div class="layout-app"> | ||
| 3 | <div class="row"> | ||
| 4 | <div class="col-md-12"> | ||
| 5 | <div class="col-separator col-separator-first col-unscrollable box"> | ||
| 6 | <div class="innerAll"> | ||
| 7 | <h4>Campaign</h4> | ||
| 8 | <hr style="margin-bottom: 10px;" /> | ||
| 9 | |||
| 10 | <div class="row"> | ||
| 11 | <div class="col-lg-4"> | ||
| 12 | <div class="form-inline"> | ||
| 13 | <div class="form-group"> | ||
| 14 | <label>Select Campaign</label> | ||
| 15 | </div> | ||
| 16 | <div class="form-group"> | ||
| 17 | <select class="form-control" id="selectCampaignField" onchange="campaignDetailsShow(this.value);return false;"> | ||
| 18 | <option value="">Select Campaign</option> | ||
| 19 | <option value="all">All</option> | ||
| 20 | @foreach($campaignList as $campaign) | ||
| 21 | <option value="{{ $campaign->mkey }}">{{ $campaign->mkey }}</option> | ||
| 22 | @endforeach | ||
| 23 | </select> | ||
| 24 | |||
| 25 | </div> | ||
| 26 | |||
| 27 | <span id="campaignRefresh"></span> | ||
| 28 | </div> | ||
| 29 | </div> | ||
| 30 | |||
| 31 | <!-- <div class="col-lg-6"> | ||
| 32 | <form class="form-inline text-right"> | ||
| 33 | <div class="form-group"> | ||
| 34 | <label>Create Campaign</label> | ||
| 35 | </div> | ||
| 36 | <div class="form-group"> | ||
| 37 | <input type="text" class="form-control" id="campaignName" placeholder="Campaign Name"> | ||
| 38 | </div> | ||
| 39 | <button type="button" class="btn btn-success" onclick="createCampaign();"><i class="glyphicon glyphicon-plus"></i> ADD</button> | ||
| 40 | </form> | ||
| 41 | </div> --> | ||
| 42 | </div> | ||
| 43 | |||
| 44 | <div id="campaignDetailsArea"></div> | ||
| 45 | </div> | ||
| 46 | </div> | ||
| 47 | </div> | ||
| 48 | </div> | ||
| 49 | |||
| 50 | </div> | ||
| 51 | </div> | ||
| 52 | |||
| 53 | <script> | ||
| 54 | function campaignDetailsShow(value){ | ||
| 55 | if(value){ | ||
| 56 | doAjax("campaign/show","campaign="+value,"campaignDetailsArea","","","GET",function(response){ | ||
| 57 | $("#campaignRefresh").html('<div class="form-group"><button onclick="campaignDetailsShow($(\'#selectCampaignField option:selected\').val());return false;" class="btn btn-xs btn-info">Refresh Campaign</button></div>'); | ||
| 58 | }); | ||
| 59 | }else{ | ||
| 60 | $("#campaignDetailsArea").html('<br/><p class="text-danger text-center">Please select the campaign.</p>'); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | |||
| 64 | // function createCampaign(){ | ||
| 65 | // var campaignName = $('#campaignName').val(); | ||
| 66 | // if(campaignName){ | ||
| 67 | // if( /[^a-zA-Z0-9]/.test(campaignName)){ | ||
| 68 | // simpleNotification('error','topRight','Campaign name is not alphanumeric.'); | ||
| 69 | // }else{ | ||
| 70 | // var dataStr = "action=createCampaign&campaignName="+campaignName; | ||
| 71 | // doAjax("campaign",dataStr,"campaignDetailsArea","","","POST",function(response){ | ||
| 72 | // // console.log(response.responseText); | ||
| 73 | // }); | ||
| 74 | // } | ||
| 75 | // }else{ | ||
| 76 | // simpleNotification('error','topRight','Campaign name should not be blank.'); | ||
| 77 | // } | ||
| 78 | // } | ||
| 79 | </script> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
application/resources/views/layout/module/campaign/campaign/sampleDataExcel.blade.php
deleted
100755 → 0
| 1 | <?php | ||
| 2 | |||
| 3 | include_once(app_path().'/lib/phpexcel/PHPExcel.php'); | ||
| 4 | |||
| 5 | $inputFileType = "Excel5"; | ||
| 6 | $objReader = PHPExcel_IOFactory::createReader($inputFileType); | ||
| 7 | $objPHPExcel = $objReader->load("assets/extras/blank.xls"); | ||
| 8 | $baseRow = 2; | ||
| 9 | |||
| 10 | $objPHPExcel->getActiveSheet()->setCellValue('A1', "12"); | ||
| 11 | |||
| 12 | |||
| 13 | header('Content-Type: application/vnd.ms-excel'); | ||
| 14 | header('Content-Disposition: attachment;filename="Output.xls"'); | ||
| 15 | header('Cache-Control: max-age=0'); | ||
| 16 | |||
| 17 | $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, $inputFileType); | ||
| 18 | $objWriter->save('php://output'); | ||
| 19 | |||
| 20 | return ; | ||
| 21 | |||
| 22 | ?> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -58,8 +58,20 @@ width:100% | ... | @@ -58,8 +58,20 @@ width:100% |
| 58 | <?php foreach($dispositionList as $key => $val) { if(!empty($val)){ ?> | 58 | <?php foreach($dispositionList as $key => $val) { if(!empty($val)){ ?> |
| 59 | <li class="list-group-item list-group"> | 59 | <li class="list-group-item list-group"> |
| 60 | <div class="col-sm-12"> | 60 | <div class="col-sm-12"> |
| 61 | <div class="col-sm-3"><?php echo $key; ?></div> | 61 | <div class="col-sm-3"><label><?php echo $key; ?></label></div> |
| 62 | <div class="col-sm-6"><?php echo $val; ?></div> | 62 | <div class="col-sm-6"> |
| 63 | <?php $count = 0; | ||
| 64 | $subDisposition = explode(",", $val); | ||
| 65 | if(count($subDisposition) > 0){ | ||
| 66 | foreach ($subDisposition as $key => $value) { | ||
| 67 | if(!empty($value)){ | ||
| 68 | $count++; | ||
| 69 | echo "$count. ".$value. "<br>"; | ||
| 70 | } | ||
| 71 | } | ||
| 72 | } | ||
| 73 | ?> | ||
| 74 | </div> | ||
| 63 | <div class="col-sm-2"><a class="innerAll" href="#" onclick="deleteDesposition('<?php echo $key; ?>');"> | 75 | <div class="col-sm-2"><a class="innerAll" href="#" onclick="deleteDesposition('<?php echo $key; ?>');"> |
| 64 | <span class="btn btn-primary btn-xs"><i class="fa fa-trash-o"></i></span> | 76 | <span class="btn btn-primary btn-xs"><i class="fa fa-trash-o"></i></span> |
| 65 | </a></div> | 77 | </a></div> |
| ... | @@ -90,18 +102,24 @@ width:100% | ... | @@ -90,18 +102,24 @@ width:100% |
| 90 | 102 | ||
| 91 | function deleteDesposition(key) | 103 | function deleteDesposition(key) |
| 92 | { | 104 | { |
| 93 | var selectCampaignField = $('#selectCampaignField').val(); | 105 | if (window.confirm('Are sure you want to delete disposition?')) |
| 94 | var postdata='disposition='+key; | 106 | { |
| 95 | postdata+='&selectCampaignField='+selectCampaignField; | ||
| 96 | |||
| 97 | doAjax("campaign/deleteAssignDisposition",postdata,"campaignDetailsArea","","","GET",function(retrstr){ | ||
| 98 | simpleNotification('Success','topRight',"Campaign assign suceesfully!"); | ||
| 99 | doAjax("campaign/show","campaign="+selectCampaignField,"campaignDetailsArea","","","GET",function(retrstr){ | ||
| 100 | $("#subDisposition").select2("val", "Select"); | ||
| 101 | $('.nav-tabs a[href="#disposition"]').tab('show'); | ||
| 102 | }); | ||
| 103 | 107 | ||
| 104 | }); | 108 | var selectCampaignField = $('#selectCampaignField').val(); |
| 109 | var postdata='disposition='+key; | ||
| 110 | postdata+='&selectCampaignField='+selectCampaignField; | ||
| 111 | |||
| 112 | doAjax("campaign/deleteAssignDisposition",postdata,"campaignDetailsArea","","","GET",function(retrstr){ | ||
| 113 | simpleNotification('Success','topRight',"Campaign assign suceesfully!"); | ||
| 114 | doAjax("campaign/show","campaign="+selectCampaignField,"campaignDetailsArea","","","GET",function(retrstr){ | ||
| 115 | $("#subDisposition").select2("val", "Select"); | ||
| 116 | $('.nav-tabs a[href="#disposition"]').tab('show'); | ||
| 117 | }); | ||
| 118 | |||
| 119 | }); | ||
| 120 | }else{ | ||
| 121 | return false; | ||
| 122 | } | ||
| 105 | } | 123 | } |
| 106 | 124 | ||
| 107 | $('#assigndesposition').click(function() | 125 | $('#assigndesposition').click(function() |
| ... | @@ -135,9 +153,6 @@ width:100% | ... | @@ -135,9 +153,6 @@ width:100% |
| 135 | $("#error").html('<p class="text-danger text-center">Please select the campaign and disposition.</p>'); | 153 | $("#error").html('<p class="text-danger text-center">Please select the campaign and disposition.</p>'); |
| 136 | return false; | 154 | return false; |
| 137 | } | 155 | } |
| 138 | |||
| 139 | |||
| 140 | |||
| 141 | }); | 156 | }); |
| 142 | 157 | ||
| 143 | </script> | 158 | </script> | ... | ... |
| ... | @@ -8,8 +8,9 @@ | ... | @@ -8,8 +8,9 @@ |
| 8 | <div class="col-md-12"> | 8 | <div class="col-md-12"> |
| 9 | <div class="panel panel-info"> | 9 | <div class="panel panel-info"> |
| 10 | <div class="panel-body"> | 10 | <div class="panel-body"> |
| 11 | <p><label class='label-small_new' style='width:15%'>Campaign Start Date :</label><input type=text class='form_new form_new_amend datetimepicker' name=campaignstartdate id=campaignstartdate value="{{ isset($campaignDetails->campaignstartdate)?$campaignDetails->campaignstartdate:'0000-00-00 00:00:00' }}"></p> | 11 | <p><label class='label-small_new' style='width:15%'>Campaign Start Time :</label><input type=text class='form_new form_new_amend datetimepicker' name=campaignstartdate id=campaignstartdate value="{{ isset($campaignDetails->campaignstartdate)?$campaignDetails->campaignstartdate:'00:00:00' }}"></p> |
| 12 | <p><label class='label-small_new' style='width:15%'>Campaign End Date :</label><input type=text class='form_new form_new_amend datetimepicker' name=campaignenddate id=campaignenddate value="{{ isset($campaignDetails->campaignenddate)?$campaignDetails->campaignenddate:'0000-00-00 00:00:00' }}" ></p> | 12 | <p><label class='label-small_new' style='width:15%'>Campaign End Time :</label><input type=text class='form_new form_new_amend datetimepicker' name=campaignenddate id=campaignenddate value="{{ isset($campaignDetails->campaignenddate)?$campaignDetails->campaignenddate:'00:00:00' }}" > |
| 13 | <span id="error" style="color:red" hidden>End time must be greater than Start time</span></p> | ||
| 13 | <div class="col-md-2"> | 14 | <div class="col-md-2"> |
| 14 | <button id="scheduleCampaign" class="btn btn-xs btn-info">Schedule | 15 | <button id="scheduleCampaign" class="btn btn-xs btn-info">Schedule |
| 15 | </button> | 16 | </button> |
| ... | @@ -23,6 +24,10 @@ | ... | @@ -23,6 +24,10 @@ |
| 23 | var selectCampaignField = $('#selectCampaignField').val(); | 24 | var selectCampaignField = $('#selectCampaignField').val(); |
| 24 | var starttime = $('#campaignstartdate').val(); | 25 | var starttime = $('#campaignstartdate').val(); |
| 25 | var endtime = $('#campaignenddate').val(); | 26 | var endtime = $('#campaignenddate').val(); |
| 27 | if (starttime>endtime){ | ||
| 28 | $('span').show(); | ||
| 29 | return false; | ||
| 30 | } | ||
| 26 | console.log(endtime); | 31 | console.log(endtime); |
| 27 | if(endtime != "0"){ | 32 | if(endtime != "0"){ |
| 28 | var postdata='selectCampaignField='+selectCampaignField+'&starttime='+starttime+'&endtime='+endtime; | 33 | var postdata='selectCampaignField='+selectCampaignField+'&starttime='+starttime+'&endtime='+endtime; |
| ... | @@ -39,6 +44,6 @@ | ... | @@ -39,6 +44,6 @@ |
| 39 | 44 | ||
| 40 | }); | 45 | }); |
| 41 | $('body').on('focus',".datetimepicker", function(){ | 46 | $('body').on('focus',".datetimepicker", function(){ |
| 42 | $(this).datetimepicker({format: 'YYYY-MM-DD HH:mm'}); | 47 | $(this).datetimepicker({format: 'HH:mm'}); |
| 43 | }); | 48 | }); |
| 44 | </script> | 49 | </script> | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | //$queryFields = explode(",", 'usr_id,branchCode,organizationName,designation,dob,location,state,residenceAddress,residenceAddressZipCode,officeAddress,officeAddressZipCode,alternateMobile,officeNumber,referenceName,referenceMobile,referenceName2,referenceMobile2,loanStatus,product,bucket,dpd,tenureStartDate,tenureEndDate,tenureRemaining,disbursalDate,rateOfInterest,installmentNo,chequeBounceNo,reasonForLastBounce,reasonForSecondLastBounce,cycleDate,ebnb,bank,lastMonthPaymentMode,lastMonthPaymentAmount,lastMonthPaymentDate,delinquencyString,specialCode,centralECS,emi,pos,bounceCharge,penalMTD,penalLTD,overdueAmount,installmentAmountOverdue,altphone1,altphone2,altphone3,altphone4,altphone5,altphone6,altphone7,altphone8,altphone9,altphone10,priority,dialer_substatus,dialer_callback'); | 2 | //$queryFields = explode(",", 'usr_id,branchCode,organizationName,designation,dob,location,state,residenceAddress,residenceAddressZipCode,officeAddress,officeAddressZipCode,alternateMobile,officeNumber,referenceName,referenceMobile,referenceName2,referenceMobile2,loanStatus,product,bucket,dpd,tenureStartDate,tenureEndDate,tenureRemaining,disbursalDate,rateOfInterest,installmentNo,chequeBounceNo,reasonForLastBounce,reasonForSecondLastBounce,cycleDate,ebnb,bank,lastMonthPaymentMode,lastMonthPaymentAmount,lastMonthPaymentDate,delinquencyString,specialCode,centralECS,emi,pos,bounceCharge,penalMTD,penalLTD,overdueAmount,installmentAmountOverdue,altphone1,altphone2,altphone3,altphone4,altphone5,altphone6,altphone7,altphone8,altphone9,altphone10,priority,dialer_substatus,dialer_callback'); |
| 3 | $queryFields = explode(",", 'usr_id,branchCode,organizationName,designation,dob,location,state,residenceAddress,residenceAddressZipCode,officeAddress,officeAddressZipCode,alternateMobile,officeNumber,referenceName,referenceMobile,referenceName2,referenceMobile2,loanStatus,product,bucket,dpd,tenureStartDate,tenureEndDate,tenureRemaining,disbursalDate,rateOfInterest,installmentNo,chequeBounceNo,reasonForLastBounce,reasonForSecondLastBounce,cycleDate,ebnb,bank,lastMonthPaymentMode,lastMonthPaymentAmount,lastMonthPaymentDate,delinquencyString,specialCode,centralECS,emi,pos,bounceCharge,penalMTD,penalLTD,overdueAmount,installmentAmountOverdue,altphone1,altphone2,altphone3,altphone4,altphone5,altphone6,altphone7,altphone8,altphone9,altphone10,priority,dialer_substatus,dialer_callback'); | 3 | $queryFields = explode(",", 'id,created,modified,currentstatus,legalstatus,firstname,lastname,mobile,emailid,client,status,clientinternalid,clientcode,priority,dialer_status,dialer_substatus,dialer_callback,dialer_remarks,dialer_flag,dialer_lastcall,crmlist_id,group,dbc_activation,digital_initiative,original_created_file,original_uploaded_date,partial_uploaded_date,dialer_last_user_id,dialer_lastcall_did,dialer_lastcall_number,bttc,service_vs_product,resolution,satisfaction,final_call_assessment,old_status,old_dialer_status,old_dialer_substatus,question,trigger_details,mf_isa,DOB,other_information,filter_condition,agreementid,applied_amount,city,comp_code,company,completeddate,cust_id,cust_name,customer_name,disb_date,emi_hl,eqty_amt,foir,ins_amt,int_rate,irr,loan_amount,location,mf_amt,nth,offer_amt,outstanding,pf,ph_mob,ph_off,ph_res,pl_offer,proc_fee,product_flag,profile_new,rank,segment,tenure,tu_application_id,ucic_id,filler1,filler2,filler3,filler4,filler5,filler6,filler7,filler8,filler9,filler10,filler11,filler12,filler13,filler14,filler15'); |
| 4 | ?> | 4 | ?> |
| 5 | <div class="row"> | 5 | <div class="row"> |
| 6 | <div class="col-sm-12"> | 6 | <div class="col-sm-12"> |
| ... | @@ -8,8 +8,8 @@ $queryFields = explode(",", 'usr_id,branchCode,organizationName,designation,dob, | ... | @@ -8,8 +8,8 @@ $queryFields = explode(",", 'usr_id,branchCode,organizationName,designation,dob, |
| 8 | <div class="panel-heading"><strong>Query</strong></div> | 8 | <div class="panel-heading"><strong>Query</strong></div> |
| 9 | <div class="panel-body"> | 9 | <div class="panel-body"> |
| 10 | <div class="form-group" style="margin-bottom: 8px;"> | 10 | <div class="form-group" style="margin-bottom: 8px;"> |
| 11 | <label>SELECT</label> | 11 | <!--<label>SELECT</label>--> |
| 12 | <input type='text' value='*' id='allvalues'disabled/> | 12 | <input type='text' value='*' id='allvalues'disabled hidden /> |
| 13 | <!--<select id="querySelect" multiple="" data-rel="chosen" style='width:100%' class=select2multi> | 13 | <!--<select id="querySelect" multiple="" data-rel="chosen" style='width:100%' class=select2multi> |
| 14 | <option value="currentstatus" selected="selected">currentstatus</option> | 14 | <option value="currentstatus" selected="selected">currentstatus</option> |
| 15 | <option value="legalstatus" selected="selected">legalstatus</option> | 15 | <option value="legalstatus" selected="selected">legalstatus</option> |
| ... | @@ -21,17 +21,27 @@ $queryFields = explode(",", 'usr_id,branchCode,organizationName,designation,dob, | ... | @@ -21,17 +21,27 @@ $queryFields = explode(",", 'usr_id,branchCode,organizationName,designation,dob, |
| 21 | <option value="{{$fields}}">{{$fields}}</option> | 21 | <option value="{{$fields}}">{{$fields}}</option> |
| 22 | @endforeach | 22 | @endforeach |
| 23 | </select>--> | 23 | </select>--> |
| 24 | <label style="margin-top: 5px;">FROM 'records' WHERE</label> | 24 | <!--<label style="margin-top: 5px;">FROM 'records' WHERE</label>--> |
| 25 | <input type="text" class="form-control" id="queryConditions" placeholder="1" value="1"/> | 25 | <input type="text" class="form-control" id="queryConditions" placeholder="Add Filter Condition Here"/> |
| 26 | </div> | 26 | </div> |
| 27 | <div class="form-inline"> | 27 | <div > |
| 28 | <div> | 28 | <div> |
| 29 | <button type="submit" class="btn btn-success pull-right" id='savequery' onclick="runSqlQuery();return false;">Save</button> | 29 | <button type="submit" class="btn btn-success pull-left" id='savequery' onclick="saveSqlQuery();return false;">Save</button> |
| 30 | <!--- <button type="submit" class="btn btn-success pull-right" onclick="runSqlQuery();return false;"><i class="glyphicon glyphicon-ok"></i> Run Query</button>---> | 30 | </div> |
| 31 | |||
| 32 | <div > | ||
| 33 | <button type="submit" class="btn btn-success pull-right" onclick="runSqlQuery();return false;"><i class="glyphicon glyphicon-ok"></i> Run </button> | ||
| 34 | |||
| 31 | </div> | 35 | </div> |
| 32 | </div> | 36 | </div> |
| 33 | </div> | 37 | </div> |
| 34 | </div> | 38 | </div> |
| 39 | <div class="panel panel-info"> | ||
| 40 | |||
| 41 | <div class="panel-body" id="sqlQueryOutput"> | ||
| 42 | <p><i class="fa fa-exclamation-circle"></i> Press Run button to see output!</p> | ||
| 43 | </div> | ||
| 44 | </div> | ||
| 35 | 45 | ||
| 36 | <div class="panel-group"> | 46 | <div class="panel-group"> |
| 37 | <div class="panel panel-default"> | 47 | <div class="panel panel-default"> |
| ... | @@ -53,7 +63,7 @@ $queryFields = explode(",", 'usr_id,branchCode,organizationName,designation,dob, | ... | @@ -53,7 +63,7 @@ $queryFields = explode(",", 'usr_id,branchCode,organizationName,designation,dob, |
| 53 | <br><br> | 63 | <br><br> |
| 54 | 64 | ||
| 55 | <div class="panel panel-info"> | 65 | <div class="panel panel-info"> |
| 56 | <div class="panel-heading" id="appendButton"><strong>Output</strong><button type="submit" class="btn btn-default btn-sm" onclick="downloadOutput();return false;" style="margin: 0 0 0.1% 84%;display: none" id="downloadButton"><i class="glyphicon glyphicon-download"></i> Download</button></div> | 66 | |
| 57 | <div class="panel-body" id="sqlQueryOutput"> | 67 | <div class="panel-body" id="sqlQueryOutput"> |
| 58 | <p><i class="fa fa-exclamation-circle"></i> Press Run Query button to see output!</p> | 68 | <p><i class="fa fa-exclamation-circle"></i> Press Run Query button to see output!</p> |
| 59 | </div> | 69 | </div> |
| ... | @@ -62,13 +72,23 @@ $queryFields = explode(",", 'usr_id,branchCode,organizationName,designation,dob, | ... | @@ -62,13 +72,23 @@ $queryFields = explode(",", 'usr_id,branchCode,organizationName,designation,dob, |
| 62 | </div> | 72 | </div> |
| 63 | 73 | ||
| 64 | <script> | 74 | <script> |
| 65 | function runSqlQuery(){ | 75 | function runSqlQuery(){ |
| 76 | var data = 'campaign={{ is_array($campaignDetails)?$campaignDetails["mkey"]:$campaignDetails->mkey }}&allvalues='+$("#allvalues").val()+'&queryConditions='+$("#queryConditions").val()+'&queryLimit='+$("#queryLimit").val()+'&queryOffset='+$("#queryOffset").val(); | ||
| 77 | doAjax("campaign/runquery",data,"sqlQueryOutput","","","GET"); | ||
| 78 | } | ||
| 79 | function saveSqlQuery(){ | ||
| 66 | //var checkedValue = $('#savequery').val(); | 80 | //var checkedValue = $('#savequery').val(); |
| 67 | //var data = 'campaign={{ is_array($campaignDetails)?$campaignDetails["mkey"]:$campaignDetails->mkey }}&querySelect='+$("#querySelect").val()+'&queryConditions='+$("#queryConditions").val()+'&queryLimit='+$("#queryLimit").val()+'&queryOffset='+$("#queryOffset").val()+'&checkedValue='+checkedValue; | 81 | //var data = 'campaign={{ is_array($campaignDetails)?$campaignDetails["mkey"]:$campaignDetails->mkey }}&querySelect='+$("#querySelect").val()+'&queryConditions='+$("#queryConditions").val()+'&queryLimit='+$("#queryLimit").val()+'&queryOffset='+$("#queryOffset").val()+'&checkedValue='+checkedValue; |
| 68 | var data = 'campaign={{ is_array($campaignDetails)?$campaignDetails["mkey"]:$campaignDetails->mkey }}&allvalues='+$("#allvalues").val()+'&queryConditions='+$("#queryConditions").val()+'&queryLimit='+$("#queryLimit").val()+'&queryOffset='+$("#queryOffset").val(); | ||
| 69 | doAjax("campaign/query",data,"sqlQueryOutput","","","GET"); | ||
| 70 | 82 | ||
| 71 | document.getElementById("downloadButton").style = "margin: 0% 0% 0.1% 84%;display: block"; | 83 | if (window.confirm('Are sure you want to save filter condition?')) |
| 84 | { | ||
| 85 | var data = 'campaign={{ is_array($campaignDetails)?$campaignDetails["mkey"]:$campaignDetails->mkey }}&allvalues='+$("#allvalues").val()+'&queryConditions='+$("#queryConditions").val()+'&queryLimit='+$("#queryLimit").val()+'&queryOffset='+$("#queryOffset").val(); | ||
| 86 | doAjax("campaign/savequery",data,"sqlQueryOutput","","","GET"); | ||
| 87 | |||
| 88 | document.getElementById("downloadButton").style = "margin: 0% 0% 0.1% 84%;display: block"; | ||
| 89 | }else{ | ||
| 90 | return false; | ||
| 91 | } | ||
| 72 | } | 92 | } |
| 73 | 93 | ||
| 74 | function runFSqlQuery(id){ | 94 | function runFSqlQuery(id){ | ... | ... |
| ... | @@ -6,14 +6,17 @@ | ... | @@ -6,14 +6,17 @@ |
| 6 | <ul class="list-group"> | 6 | <ul class="list-group"> |
| 7 | <li class="list-group-item"><input type="radio" name="query" id="currQuery" value="" checked>Default</li> | 7 | <li class="list-group-item"><input type="radio" name="query" id="currQuery" value="" checked>Default</li> |
| 8 | @foreach($queryLogs as $queryLog) | 8 | @foreach($queryLogs as $queryLog) |
| 9 | <li class="list-group-item"><input type="radio" name="query" id="currQuery" value="{{$queryLog->id}}" {{$queryLog->current_queue?"checked":""}}>{{$queryLog->query}}</li> | 9 | <li class="list-group-item"><input type="radio" name="query" id="currQuery" value="{{$queryLog->id}}" {{$queryLog->current_queue?"checked":""}}>{{$queryLog->query}} |
| 10 | <div><button class="btn btn-success pull-right" style=" margin-top: -26px;" onclick="queryCount({{$queryLog->id}});return false;" type="submit" ">Run</button></div> | ||
| 11 | <span id="sqlQueryOutput-{{$queryLog->id}}" class="countText"></span></li> | ||
| 10 | @endforeach | 12 | @endforeach |
| 11 | </ul> | 13 | </ul> |
| 12 | 14 | ||
| 13 | <div class="form-inline"> | 15 | <div class="form-inline"> |
| 14 | <div class="form-group" style="display: block;"> | 16 | <div class="form-group" style="display: block;"> |
| 15 | <button type="submit" class="btn btn-success pull-right" onclick="addInQueue();return false;"><i class="glyphicon glyphicon-plus"></i> Filter Apply</button> | 17 | <button type="submit" class="btn btn-success pull-right" onclick="addInQueue1();"><!-- <i class="glyphicon glyphicon"></i> --> Apply Filter</button> |
| 16 | </div> | 18 | </div> |
| 19 | <!--<div id="success" style="align:right color:green"></div>---> | ||
| 17 | </div> | 20 | </div> |
| 18 | </div> | 21 | </div> |
| 19 | </div> | 22 | </div> |
| ... | @@ -21,10 +24,30 @@ | ... | @@ -21,10 +24,30 @@ |
| 21 | </div> | 24 | </div> |
| 22 | 25 | ||
| 23 | <script> | 26 | <script> |
| 24 | function addInQueue(){ | 27 | function addInQueue1(){ |
| 28 | var selectCampaignField = $('#selectCampaignField').val(); | ||
| 25 | var data = 'radioValue='+$("input[name='query']:checked").val(); | 29 | var data = 'radioValue='+$("input[name='query']:checked").val(); |
| 26 | // var checkedValue = $('.saveQryChck:checked').val(); | 30 | data+='&campaign='+selectCampaignField; |
| 31 | //var checkedValue = $('.saveQryChck:checked').val(); | ||
| 27 | // var data = 'campaign={{ is_array($campaignDetails)?$campaignDetails["mkey"]:$campaignDetails->mkey }}&querySelect='+$("#querySelect").val()+'&queryConditions='+$("#queryConditions").val()+'&queryLimit='+$("#queryLimit").val()+'&queryOffset='+$("#queryOffset").val()+'&checkedValue='+checkedValue; | 32 | // var data = 'campaign={{ is_array($campaignDetails)?$campaignDetails["mkey"]:$campaignDetails->mkey }}&querySelect='+$("#querySelect").val()+'&queryConditions='+$("#queryConditions").val()+'&queryLimit='+$("#queryLimit").val()+'&queryOffset='+$("#queryOffset").val()+'&checkedValue='+checkedValue; |
| 28 | doAjax("campaign/addCurrQueue",data,"","","","GET"); | 33 | doAjax("campaign/addCurrQueue",data,"","","","GET",function(retrstr){ |
| 34 | simpleNotification('Success','topRight',"Filter assign suceesfully!"); | ||
| 35 | //$("#success").html("Filter assign suceesfully!"); | ||
| 36 | }); | ||
| 37 | } | ||
| 38 | function queryCount(id){ | ||
| 39 | /*var data = 'campaign={{ is_array($campaignDetails)?$campaignDetails["mkey"]:$campaignDetails->mkey }}&id='+id; | ||
| 40 | doAjax("campaign/runcount",data,"querycountoutput-"+id,"","","GET");*/ | ||
| 41 | $("#sqlQueryOutput-"+id).html(''); | ||
| 42 | var data = 'campaign={{ is_array($campaignDetails)?$campaignDetails["mkey"]:$campaignDetails->mkey }}&id='+id+'&querySelect='+$("#querySelect").val(); | ||
| 43 | doAjax("campaign/fquery",data,"sqlQueryOutput-"+id,"","","GET"); | ||
| 44 | |||
| 29 | } | 45 | } |
| 30 | </script> | 46 | </script> |
| 47 | <style type="text/css"> | ||
| 48 | .countText { | ||
| 49 | float: right; | ||
| 50 | margin-top: -15px; | ||
| 51 | margin-right: 10px; | ||
| 52 | } | ||
| 53 | </style> | ... | ... |
| 1 | <!-- Heading --> | ||
| 2 | <h5 class="innerAll margin-none bg-primary"> | ||
| 3 | <i class="fa fa-fw fa-pencil"></i> Add Disposition | ||
| 4 | <a href="#" class="btn btn-sm btn-inverse pull-right btn-xs" style="margin-top: -5px;" onclick="return false"> | ||
| 5 | <i class="fa fa-user fa-fw"></i> | ||
| 6 | |||
| 7 | </a> | ||
| 8 | </h5> | ||
| 9 | |||
| 10 | |||
| 11 | <form class="innerAll"> | ||
| 12 | <fieldset> | ||
| 13 | |||
| 14 | <div class="control-group"> | ||
| 15 | <label class="col-md-4 control-label" for="code">Code</label> | ||
| 16 | <div class="col-md-8 controls"> | ||
| 17 | <input class="form-control" id="code" type="text" value="" /> | ||
| 18 | </div> | ||
| 19 | </div> | ||
| 20 | |||
| 21 | <div class="control-group"> | ||
| 22 | <label class="col-md-4 control-label" for="disposition">Disposition</label> | ||
| 23 | <div class="col-md-8 controls"> | ||
| 24 | <input class="form-control" id="disposition" type="text" value="" /> | ||
| 25 | </div> | ||
| 26 | </div> | ||
| 27 | |||
| 28 | |||
| 29 | <div class="control-group"> | ||
| 30 | <label class="col-md-4 control-label" for="subDisposition">Sub Disposition</label> | ||
| 31 | <div class="col-md-8 controls"> | ||
| 32 | <input class="form-control" id="subDisposition" type="text" value="" /> | ||
| 33 | </div> | ||
| 34 | </div> | ||
| 35 | |||
| 36 | <div class="form-actions"> | ||
| 37 | <button type="submit" class="btn btn-primary" onclick='createGroupForm();return false;'>Save changes</button> | ||
| 38 | </div> | ||
| 39 | </fieldset> | ||
| 40 | </form> | ||
| 41 | <script> | ||
| 42 | function createGroupForm() | ||
| 43 | { | ||
| 44 | var putdata="csrftoken={!!Session::token()!!}"; | ||
| 45 | putdata+="&code="+$("#code").val(); | ||
| 46 | putdata+="&disposition="+$("#disposition").val(); | ||
| 47 | putdata+="&subDisposition="+$("#subDisposition").val(); | ||
| 48 | |||
| 49 | /* | ||
| 50 | doAjax('campaign?action=createCampaign',putdata,'campaignformdiv','ajax_group_create','singlethis','POST');*/ | ||
| 51 | |||
| 52 | doAjax('campaign?action=createCampaign',putdata,'campaignformdiv','ajax_group_create','singlethis','POST',function(retrstr){ | ||
| 53 | doAjax("campaign/masters","" ,"campaignDetailsArea","","","GET",function(retrstr){ | ||
| 54 | simpleNotification('Success','topRight',"Disposition created suceesfully!"); | ||
| 55 | |||
| 56 | }); | ||
| 57 | }); | ||
| 58 | |||
| 59 | } | ||
| 60 | </script> |
| 1 | <style> | ||
| 2 | .heading-buttons h4{ | ||
| 3 | line-height:20px; | ||
| 4 | } | ||
| 5 | </style> | ||
| 6 | <div class="layout-app"><!-- row-app --> | ||
| 7 | |||
| 8 | <div class="row row-app"> | ||
| 9 | |||
| 10 | <!-- col --> | ||
| 11 | <div class="col-md-12"> | ||
| 12 | |||
| 13 | <!-- col-separator.box --> | ||
| 14 | <div class="col-separator col-separator-first col-unscrollable box"> | ||
| 15 | |||
| 16 | <!-- col-table --> | ||
| 17 | <div class="col-table" id=authorworkspacediv> | ||
| 18 | <!-- Search Bar --> | ||
| 19 | <div class="input-group"> | ||
| 20 | <input type="text" class="form-control" placeholder="Search for Disposition..."> | ||
| 21 | <span class="input-group-btn"> | ||
| 22 | <button class="btn btn-primary rounded-none" type="button"><i class="fa fa-search"></i></button> | ||
| 23 | </span> | ||
| 24 | </div> | ||
| 25 | <div class="col-separator-h"></div> | ||
| 26 | <!-- End Search Bar --> | ||
| 27 | |||
| 28 | <div class="col-table-row"> | ||
| 29 | |||
| 30 | <div class="col-app col-unscrollable"> | ||
| 31 | |||
| 32 | <div class="col-app"> | ||
| 33 | |||
| 34 | <div class="row-app"> | ||
| 35 | |||
| 36 | <div class="col-md-6"> | ||
| 37 | <div class="col-separator"> | ||
| 38 | |||
| 39 | <!-- Category Heading --> | ||
| 40 | <div class="heading-buttons bg-gray border-bottom innerR half"> | ||
| 41 | <a href="#" class="btn btn-sm btn-inverse pull-right" onclick="doAjax('campaign/create','','campaignformdiv','ajax_group_create','singlethis','GET');return false"><i class="fa fa-plus fa-fw"></i>New Disposition</a> | ||
| 42 | <h4 class="innerTB margin-bottom-none">Dispositions</h4> | ||
| 43 | <div class="clearfix"></div> | ||
| 44 | </div> | ||
| 45 | <!-- End Category Heading --> | ||
| 46 | |||
| 47 | <?php //echo $grouplist->render(); ?> | ||
| 48 | <?php foreach ($dispositionList as $dispo) | ||
| 49 | { //print_r($dispo);exit(); | ||
| 50 | $tphoto="assets/images/people/avatar.jpg"; | ||
| 51 | ?> | ||
| 52 | <!-- Category Listing --> | ||
| 53 | <div class="row innerAll half border-bottom bg-gray- hover"> | ||
| 54 | <div class="col-sm-8 col-xs-10"> | ||
| 55 | <ul class="media-list margin-none"> | ||
| 56 | <li class="media"> | ||
| 57 | <a class="pull-left innerAll" href="#" onclick="editCampaign(' <?php echo $dispo['code']; ?>' , '<?php echo $dispo['disposition']; ?>', '<?php echo $dispo['disposition']; ?>');"> | ||
| 58 | <span class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i></span> | ||
| 59 | </a> | ||
| 60 | <a class="pull-left innerAll" href="#" onclick="doAjax('group/{!!$tgroup->id!!}','','campaignformdiv','ajax_group_delete','singlethis','DELETE');return false;"> | ||
| 61 | <span class="btn btn-primary btn-xs"><i class="fa fa-trash-o"></i></span> | ||
| 62 | </a> | ||
| 63 | <div class="media-body"> | ||
| 64 | <div class="innerAll"> | ||
| 65 | <h5 class=""><a href="#" class="media-heading text-primary">{!!$dispo['code']!!} : {{$dispo['disposition']}}</a></h5> | ||
| 66 | <div class="clearfix"></div> | ||
| 67 | |||
| 68 | </div> | ||
| 69 | |||
| 70 | </div> | ||
| 71 | </li> | ||
| 72 | </ul> | ||
| 73 | </div> | ||
| 74 | <div class="col-sm-3 col-xs-2"> | ||
| 75 | <div class="text-center"> | ||
| 76 | <p class="strong">Sub Disposition</p> | ||
| 77 | <span class="badge badge-primary badge-stroke" data-toggle="tooltip" data-title="Subscribed" data-placement ="right" data-container="body">{{$dispo['totalSubdisposition']}}</span> | ||
| 78 | </div> | ||
| 79 | </div> | ||
| 80 | |||
| 81 | </div> | ||
| 82 | <!-- // END Category Listing --> | ||
| 83 | <?php } ?> | ||
| 84 | <?php //echo $grouplist->render(); ?> | ||
| 85 | |||
| 86 | </div> | ||
| 87 | <!-- // END col-separator --> | ||
| 88 | </div> | ||
| 89 | <!-- // END col --> | ||
| 90 | |||
| 91 | <!-- col --> | ||
| 92 | <div class="col-md-6"> | ||
| 93 | |||
| 94 | <!-- col-separator --> | ||
| 95 | <div class="col-separator col-separator-last" id=campaignformdiv> | ||
| 96 | </div> | ||
| 97 | <!-- // END col-separator --> | ||
| 98 | |||
| 99 | </div> | ||
| 100 | <!-- // END col-table --> | ||
| 101 | |||
| 102 | </div> | ||
| 103 | <!-- // END col-separator.box --> | ||
| 104 | |||
| 105 | </div> | ||
| 106 | <!-- // END col --> | ||
| 107 | |||
| 108 | </div> | ||
| 109 | <!-- // END row-app --> | ||
| 110 | |||
| 111 | </div> | ||
| 112 | <script> | ||
| 113 | $(".pagination a").click(function(e){ | ||
| 114 | e.preventDefault(); | ||
| 115 | var url=$(this).attr("href"); | ||
| 116 | var res = url.split("page="); | ||
| 117 | menuAction("group?page="+res[1]); | ||
| 118 | return false; | ||
| 119 | }); | ||
| 120 | |||
| 121 | function editCampaign(){ | ||
| 122 | doAjax('campaign/edit','','campaignformdiv','ajax_group_create','singlethis','GET');return false; | ||
| 123 | } | ||
| 124 | </script> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | <?php | ||
| 2 | use App\Jobs\KHRMSLib; | ||
| 3 | use App\Models\CRMCall; | ||
| 4 | |||
| 5 | $client=Input::get("client"); | ||
| 6 | /*$prevData=Input::get("prev"); | ||
| 7 | $currentStatus = Input::get("currentStatus"); | ||
| 8 | $legalStatus = Input::get("legalStatus"); | ||
| 9 | if($currentStatus==""||$legalStatus==""|| $prevData==""){ | ||
| 10 | $currentStatus="ACTIVE"; | ||
| 11 | $legalStatus="PRIMARY"; | ||
| 12 | $prevData="MTD"; | ||
| 13 | }*/ | ||
| 14 | |||
| 15 | $wakka=new KHRMSLib(); | ||
| 16 | $dispoclassarr=array('NC'=>array(0,array()),'CC'=>array(0,array()),'CB'=>array(0,array()),'NA'=>array(0,array())); | ||
| 17 | |||
| 18 | $dataSelect = array('0'=>'MTD','1'=>'YTD'); | ||
| 19 | |||
| 20 | $owclientstr=array(); | ||
| 21 | $oclientlst=$wakka->clientsOwnerRWAccess(); | ||
| 22 | if(!empty($oclientlst))foreach($oclientlst as $tclnt)if($tclnt!="") | ||
| 23 | { | ||
| 24 | $owclientstr[]="'$tclnt'"; | ||
| 25 | if($client=="")$client=$tclnt; | ||
| 26 | } | ||
| 27 | if(!empty($owclientstr))$owclientstr="and client in (".implode(",",$owclientstr).")";else $owclientstr=""; | ||
| 28 | if($client!="")$owclientstr="and client='$client'"; | ||
| 29 | |||
| 30 | |||
| 31 | $roclientstr=array();$didlinesstr=array();if(Auth::user()->exten!="")$didlinesstr[]=Auth::user()->exten; | ||
| 32 | |||
| 33 | $roclientlst=$wakka->clientsReadAccess(); | ||
| 34 | |||
| 35 | if(!empty($roclientlst))foreach($roclientlst as $tclnt)if($tclnt!="") | ||
| 36 | { | ||
| 37 | $roclientstr[]="'$tclnt'"; | ||
| 38 | if($client=="")$client=$tclnt; | ||
| 39 | |||
| 40 | $mastersdata=$wakka->getCompanyMaster($tclnt); | ||
| 41 | if(!empty($mastersdata["DialerDID"]))$didlinesstr[]=$mastersdata["DialerDID"]; | ||
| 42 | |||
| 43 | |||
| 44 | if(empty($mastersdata['dialerDispoList']))$mastersdata['dialerDispoList']=$wakka->HRCoreVars['dialerDispoList']; | ||
| 45 | |||
| 46 | $dispoarr=explode("~",$mastersdata['dialerDispoList']); | ||
| 47 | foreach($dispoarr as $dispo) | ||
| 48 | { | ||
| 49 | if(!empty($dispo)) | ||
| 50 | { | ||
| 51 | $dispoprts=explode("|",$dispo); | ||
| 52 | if(sizeof($dispoprts)>=3) | ||
| 53 | { | ||
| 54 | if(isset($dispoclassarr[$dispoprts[0]])) | ||
| 55 | { | ||
| 56 | $dispoclassarr[$dispoprts[0]][1][]=$dispoprts[1]; | ||
| 57 | } | ||
| 58 | } | ||
| 59 | } | ||
| 60 | } | ||
| 61 | } | ||
| 62 | foreach($didlinesstr as $k=>$dids) | ||
| 63 | { | ||
| 64 | $didarr=explode(":",$dids); | ||
| 65 | $didlinesstr[$k]=$didarr[0]; | ||
| 66 | } | ||
| 67 | |||
| 68 | if(!empty($roclientstr))$roclientstr="and client in (".implode(",",$roclientstr).")";else $roclientstr=""; | ||
| 69 | if($client!="")$roclientstr="and client='$client'"; | ||
| 70 | |||
| 71 | |||
| 72 | //$currentstatuses=$wakka->LoadAll("select distinct currentstatus from records where currentstatus!='' $owclientstr"); | ||
| 73 | //$legalstatuses=$wakka->LoadAll("select distinct legalstatus from records where legalstatus!='' $owclientstr"); | ||
| 74 | |||
| 75 | /*$dispoarr=$wakka->LoadAll("select count(*) as cnt,currentstatus,legalstatus,dialer_status from records where 1=1 $owclientstr group by currentstatus,legalstatus,dialer_status"); | ||
| 76 | |||
| 77 | $countStatuses = array('New', 'Called'); | ||
| 78 | foreach ($countStatuses as $status) { | ||
| 79 | $$status = 0; | ||
| 80 | } | ||
| 81 | $counts= DB::table('records') | ||
| 82 | ->select(DB::raw("count(*) as cnt,status")) | ||
| 83 | ->whereIn('status', $countStatuses) | ||
| 84 | ->where('client', '=', $client) | ||
| 85 | ->groupBy('status')->get(); | ||
| 86 | |||
| 87 | foreach ($counts as $key => $count) | ||
| 88 | { | ||
| 89 | $status = $count->status; | ||
| 90 | $$status = $count->cnt; | ||
| 91 | } | ||
| 92 | |||
| 93 | $TotalData=$New + $Called; | ||
| 94 | $NotCalled=$New; | ||
| 95 | $TotalCalled=$Called; | ||
| 96 | $birthdate=date('m-d'); | ||
| 97 | |||
| 98 | $Priority=$wakka->getCount("records","priority in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) $owclientstr"); | ||
| 99 | $Flagged=$wakka->getCount("records","dialer_flag='VIP' $owclientstr"); | ||
| 100 | //$NotCalledFlagged=$wakka->getCount("records"," priority='VIP' $owclientstr"); | ||
| 101 | $NotCalledFlagged=$wakka->getCount("records"," mf_isa='VIP' $owclientstr"); | ||
| 102 | $todaybirthday=$wakka->getCount("records"," DATE_FORMAT(DOB,'%m-%d')='$birthdate' and priority='11' $owclientstr"); | ||
| 103 | |||
| 104 | if($prevData=='MTD'&&$legalStatus!='SECONDARY') | ||
| 105 | { | ||
| 106 | $dispoarr=$wakka->LoadAll("select count(*) as cnt,currentstatus,legalstatus,dialer_status from records where 1=1 $owclientstr group by currentstatus,legalstatus,dialer_status having legalstatus='$legalStatus' and currentstatus='$currentStatus'"); | ||
| 107 | |||
| 108 | $TotalData=$wakka->getCount("records","status IN ('New', 'Called','Noqueue') and currentstatus='$currentStatus' and legalstatus='$legalStatus' $owclientstr"); | ||
| 109 | $NotCalled=$wakka->getCount("records","status='New' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 110 | $TotalCalled=$wakka->getCount("records","status='Called' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 111 | $Priority=$wakka->getCount("records","priority in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 112 | $Flagged=$wakka->getCount("records","dialer_flag='VIP' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 113 | /*$NotCalledFlagged=$wakka->getCount("records"," priority='VIP' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr");*/ | ||
| 114 | /*$NotCalledFlagged=$wakka->getCount("records"," mf_isa='VIP' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 115 | } | ||
| 116 | |||
| 117 | if($prevData=='YTD'&&$legalStatus!='SECONDARY') | ||
| 118 | { | ||
| 119 | $ydispoarr=$wakka->LoadAll("select count(*) as cnt,currentstatus,legalstatus,old_dialer_status from records where 1=1 $owclientstr group by currentstatus,legalstatus,old_dialer_status"); | ||
| 120 | |||
| 121 | $TotalData=$wakka->getCount("records","old_status IN ('New', 'Called','Noqueue') and currentstatus='$currentStatus' and legalstatus='$legalStatus' $owclientstr"); | ||
| 122 | $NotCalled=$wakka->getCount("records","old_status='New' and currentstatus='$currentStatus' and legalstatus='$legalStatus' $owclientstr"); | ||
| 123 | $TotalCalled=$wakka->getCount("records","old_status='Called' and currentstatus='$currentStatus' and legalstatus='$legalStatus' $owclientstr"); | ||
| 124 | $Priority=$wakka->getCount("records","priority in (1,2,3,4,5,6,7,8,9,10) and currentstatus='$currentStatus' and legalstatus='$legalStatus' $owclientstr"); | ||
| 125 | $Flagged=$wakka->getCount("records","dialer_flag='VIP' and currentstatus='$currentStatus' and legalstatus='$legalStatus' $owclientstr");*/ | ||
| 126 | /*$NotCalledFlagged=$wakka->getCount("records"," priority='VIP' and currentstatus='$currentStatus' and legalstatus='$legalStatus' $owclientstr");*/ | ||
| 127 | /*$NotCalledFlagged=$wakka->getCount("records"," mf_isa='VIP' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 128 | }*/ | ||
| 129 | |||
| 130 | /*if($prevData=='MTD'&&$legalStatus=='SECONDARY') | ||
| 131 | { | ||
| 132 | $dispoarr=$wakka->LoadAll("select count(*) as cnt,currentstatus,legalstatus,dialer_status from records where 1=1 $owclientstr group by currentstatus,legalstatus,dialer_status having legalstatus='$legalStatus' and currentstatus='$currentStatus'"); | ||
| 133 | |||
| 134 | $TotalData=$wakka->getCount("records","status IN ('New', 'Called','Noqueue') and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 135 | $NotCalled=$wakka->getCount("records","status='New' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 136 | $TotalCalled=$wakka->getCount("records","status='Called' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 137 | $Priority=$wakka->getCount("records","priority in (1,2,3,4,5,6,7,8,9,10) and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 138 | $Flagged=$wakka->getCount("records","dialer_flag='VIP' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 139 | /*$NotCalledFlagged=$wakka->getCount("records"," priority='VIP' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr");*/ | ||
| 140 | /*$NotCalledFlagged=$wakka->getCount("records"," mf_isa='VIP' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 141 | }*/ | ||
| 142 | |||
| 143 | /*if($prevData=='YTD'&&$legalStatus=='SECONDARY') | ||
| 144 | { | ||
| 145 | $ydispoarr=$wakka->LoadAll("select count(*) as cnt,currentstatus,legalstatus,old_dialer_status from records where 1=1 $owclientstr group by currentstatus,legalstatus,old_dialer_status having legalstatus='$legalStatus' and currentstatus='$currentStatus'"); | ||
| 146 | |||
| 147 | $TotalData=$wakka->getCount("records","old_status IN ('New', 'Called','Noqueue') and currentstatus='$currentStatus' and legalstatus='$legalStatus' $owclientstr"); | ||
| 148 | $NotCalled=$wakka->getCount("records","old_status='New' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 149 | $TotalCalled=$wakka->getCount("records","old_status='Called' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 150 | $Priority=$wakka->getCount("records","priority in (1,2,3,4,5,6,7,8,9,10) and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 151 | $Flagged=$wakka->getCount("records","dialer_flag='VIP' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 152 | /*$NotCalledFlagged=$wakka->getCount("records"," priority='VIP' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr");*/ | ||
| 153 | /*$NotCalledFlagged=$wakka->getCount("records"," mf_isa='VIP' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 154 | } | ||
| 155 | |||
| 156 | $MissedCalls=0; | ||
| 157 | |||
| 158 | $udidlinesstr = array(); | ||
| 159 | foreach($didlinesstr as $didlinestr){ | ||
| 160 | $didlinestrArr=explode(":",$didlinestr); | ||
| 161 | $udidlinesstr[] = substr($didlinestrArr[0], env('didnumber')); | ||
| 162 | } | ||
| 163 | |||
| 164 | $mc=CRMCall::where('userstatus','=','InboundDROP')->where('created_at','>','2018-09-11 00:00:00')->where('created_at','>',date('Y-m-d H:i:s',time()-(7*24*60*60))); | ||
| 165 | $mc=$mc->where(function ($query) use($roclientlst,$udidlinesstr){ | ||
| 166 | $query->orWhereIn('client',$roclientlst)->orWhereIn('did',$udidlinesstr); | ||
| 167 | }); | ||
| 168 | $mc=$mc->get(); | ||
| 169 | |||
| 170 | $number_list=array(); | ||
| 171 | foreach($mc as $key=>$tcall) | ||
| 172 | { | ||
| 173 | $tccal=substr($tcall->number,-10); | ||
| 174 | $mc_number=CRMCall::where('userstatus','!=','InboundDROP') | ||
| 175 | ->where('created_at','>',$tcall->created_at) | ||
| 176 | ->where('number','like',"%".$tccal."%") | ||
| 177 | ->orderBy("id","DESC") | ||
| 178 | ->first(); | ||
| 179 | |||
| 180 | $mccount=count($mc_number); | ||
| 181 | if($mccount==0) | ||
| 182 | { | ||
| 183 | $number_list[] = $tcall->number; | ||
| 184 | } | ||
| 185 | |||
| 186 | } | ||
| 187 | |||
| 188 | if(count($number_list) > 0) { | ||
| 189 | $lcalls=DB::select("SELECT * FROM crmcalls where id in (SELECT max(id) FROM crmcalls WHERE number IN ('" . implode("','", $number_list). "') GROUP BY number )"); | ||
| 190 | |||
| 191 | foreach($lcalls as $lcall) | ||
| 192 | { | ||
| 193 | if($lcall->userstatus=="InboundDROP") | ||
| 194 | { | ||
| 195 | $MissedCalls++; | ||
| 196 | } | ||
| 197 | } | ||
| 198 | } | ||
| 199 | |||
| 200 | $callstoday=CRMCall::where("created_at",">=",date("Y-m-d 00:00:00"))->where("user_id","=",Auth::user()->id)->count(); | ||
| 201 | $callsmonth=CRMCall::where("created_at",">=",date("Y-m-01 00:00:00"))->where("user_id","=",Auth::user()->id)->count(); | ||
| 202 | |||
| 203 | |||
| 204 | $recstoday=$wakka->getCount("records","dialer_lastcall>='".date("Y-m-d 00:00:00")."' $owclientstr"); | ||
| 205 | $recsmonth=$wakka->getCount("records","dialer_lastcall>='".date("Y-m-01 00:00:00")."' $owclientstr");*/ | ||
| 206 | ?> | ||
| 207 | |||
| 208 | |||
| 209 | <div class=col-md-3> | ||
| 210 | <div class=col-md-11> | ||
| 211 | <?php if(sizeof($roclientlst)>0){ ?> | ||
| 212 | <h5> | ||
| 213 | Campaign | ||
| 214 | <select class='form-control pull-right' id=tcampaign_select onchange='campaignSelect();' style='width:50%'> | ||
| 215 | <?php foreach($roclientlst as $c){$s="";if($c==$client)$s='selected';echo "<option value='$c' $s>$c</option>";} ?> | ||
| 216 | </select> | ||
| 217 | </h5> | ||
| 218 | <br> | ||
| 219 | <!---<div class=col-md-6> | ||
| 220 | <select class=form-control id=data_select onchange='dataSelect();'> | ||
| 221 | <?php //foreach($dataSelect as $d){$s="";if($d==$prevData)$s='selected';echo "<option value='$d' $s>$d</option>";} ?> | ||
| 222 | </select> | ||
| 223 | </div> | ||
| 224 | <div style='clear:both'></div> | ||
| 225 | <br> | ||
| 226 | <?php } ?> | ||
| 227 | |||
| 228 | <h5> | ||
| 229 | Buckets | ||
| 230 | <span class='label label-small label-default pull-right'> | ||
| 231 | <a href=# onclick="dialerLoadData('CallsMonth','','',1,'','');return false;" style='color:#fff;font-size:12px'> | ||
| 232 | Month: {!!$recsmonth!!} / {!!$callsmonth!!} | ||
| 233 | </a> | ||
| 234 | </span> | ||
| 235 | <span class='label label-small label-default pull-right' style='margin-right:5px'> | ||
| 236 | <a href=# onclick="dialerLoadData('CallsToday','','',1,'','');return false;" style='color:#fff;font-size:12px'> | ||
| 237 | Today: {!!$recstoday!!} / {!!$callstoday!!} | ||
| 238 | </a> | ||
| 239 | </span> | ||
| 240 | |||
| 241 | </h5> | ||
| 242 | <div style='clear:both'></div> | ||
| 243 | <hr><br> | ||
| 244 | <?php | ||
| 245 | //print_r($legalstatuses); | ||
| 246 | //print_r($currentstatuses); | ||
| 247 | |||
| 248 | ?> | ||
| 249 | <div class=col-md-6> | ||
| 250 | <select class=form-control id=legalstatus_select onchange='bucketSelect();'> | ||
| 251 | <option value='PRIMARY'>PRIMARY</option> | ||
| 252 | <option value='SECONDARY'>SECONDARY</option> | ||
| 253 | </select> | ||
| 254 | </div> | ||
| 255 | <div class=col-md-6> | ||
| 256 | <select class=form-control id=currentstatus_select onchange='bucketSelect();'> | ||
| 257 | <option value='ACTIVE'>ACTIVE</option> | ||
| 258 | <option value='PASSIVE'>PASSIVE</option> | ||
| 259 | </select> | ||
| 260 | </div> | ||
| 261 | <div style='clear:both'></div> | ||
| 262 | |||
| 263 | <ul style="list-style:none"> | ||
| 264 | <li class="notify_alert"> | ||
| 265 | <span><a href=# onclick="dialerLoadData('CurrentQueue','','',1,'','');return false;">CurrentQueue</a></span>---> | ||
| 266 | <!--<span class="label label-small pull-right" > | ||
| 267 | 0 | ||
| 268 | </span>--> | ||
| 269 | <!---</li> | ||
| 270 | <li class="notify_alert"> | ||
| 271 | <span><a href=# onclick="dialerLoadData('MissedCalls','','',1,'','');return false;">MissedCalls</a></span> | ||
| 272 | <span class="label label-small label-primary pull-right" > | ||
| 273 | {!!$MissedCalls!!} | ||
| 274 | </span> | ||
| 275 | </li> | ||
| 276 | <li class="notify_alert"> | ||
| 277 | <span><a href=# onclick="dialerLoadData('Priority','','',1,'','');return false;">Priority</a></span> | ||
| 278 | <span class="label label-small label-info pull-right" > | ||
| 279 | {!!$Priority!!} | ||
| 280 | </span> | ||
| 281 | </li> | ||
| 282 | <li class="notify_alert"> | ||
| 283 | <span><a href=# onclick="dialerLoadData('TotalData','{!!$currentStatus!!}','{!!$legalStatus!!}',1,'','');return false;">TotalData</a></span> | ||
| 284 | <span class="label label-small label-default pull-right" > | ||
| 285 | {!!$TotalData!!} | ||
| 286 | </span> | ||
| 287 | </li> | ||
| 288 | <li class="notify_alert"> | ||
| 289 | <span><a href=# onclick="dialerLoadData('NotCalled','{!!$currentStatus!!}','{!!$legalStatus!!}',1,'','');return false;">NotCalled</a></span> | ||
| 290 | <span class="label label-small label-default pull-right" > | ||
| 291 | {!!$NotCalled!!} | ||
| 292 | </span> | ||
| 293 | </li> | ||
| 294 | <li class="notify_alert"> | ||
| 295 | <span><a href=# onclick="dialerLoadData('Called','','',1,'','');return false;">Called</a></span> | ||
| 296 | <span class="label label-small label-success pull-right" > | ||
| 297 | {!!$TotalCalled!!} | ||
| 298 | </span> | ||
| 299 | </li> | ||
| 300 | <li class="notify_alert"> | ||
| 301 | <span><a href=# onclick="return false;">Contacted</a></span> | ||
| 302 | <span class="label label-small label-success pull-right" id=contactedcnt_span> | ||
| 303 | 0 | ||
| 304 | </span> | ||
| 305 | </li> | ||
| 306 | <li class="notify_alert"> | ||
| 307 | <span><a href=# onclick="dialerLoadData('Flagged-Called','{!!$currentStatus!!}','{!!$legalStatus!!}',1,'','');return false;">Flagged-Called</a></span> | ||
| 308 | <span class="label label-small label-success pull-right" > | ||
| 309 | {!!$Flagged!!} | ||
| 310 | </span> | ||
| 311 | </li> | ||
| 312 | <li class="notify_alert"> | ||
| 313 | <span><a href=# onclick="dialerLoadData('Flagged-Notcalled','{!!$currentStatus!!}','{!!$legalStatus!!}',1,'','');return false;">Flagged-NotCalled</a></span> | ||
| 314 | <span class="label label-small label-warning pull-right" > | ||
| 315 | {!!$NotCalledFlagged!!} | ||
| 316 | </span> | ||
| 317 | </li> | ||
| 318 | <li class="notify_alert"> | ||
| 319 | <span><a href=# onclick="dialerLoadData('today-birthday','{!!$currentStatus!!}','{!!$legalStatus!!}',1,'','');return false;">Today Birthday</a></span> | ||
| 320 | <span class="label label-small label-warning pull-right" > | ||
| 321 | {!!$todaybirthday!!} | ||
| 322 | </span> | ||
| 323 | </li> | ||
| 324 | |||
| 325 | <hr><br>---> | ||
| 326 | |||
| 327 | <?php | ||
| 328 | /*if($prevData=='' ||$prevData=='MTD') | ||
| 329 | { | ||
| 330 | foreach($dispoarr as $disp) { | ||
| 331 | |||
| 332 | foreach($dispoclassarr as $dclass=>$darr) | ||
| 333 | { | ||
| 334 | if(in_array($disp['dialer_status'],$darr[1])) | ||
| 335 | { | ||
| 336 | $dispoclassarr[$dclass][0]+=$disp['cnt']; | ||
| 337 | } | ||
| 338 | } | ||
| 339 | |||
| 340 | |||
| 341 | $class=str_replace(" ","_","CLS_".$disp['currentstatus'].$disp['legalstatus']); | ||
| 342 | if($disp['dialer_status']) | ||
| 343 | { | ||
| 344 | ?> | ||
| 345 | <li class="notify_alert bucketliitem {!!$class!!}"> | ||
| 346 | <span><a href=# onclick="dialerLoadData('{!!$disp['dialer_status']!!}','{!!$disp['currentstatus']!!}','{!!$disp['legalstatus']!!}',1,'','');return false;">{!!$disp['dialer_status']!!}</a></span> | ||
| 347 | <span class="label label-small label-success pull-right" > | ||
| 348 | {!!$disp['cnt']!!} | ||
| 349 | </span> | ||
| 350 | </li> | ||
| 351 | <?php } | ||
| 352 | |||
| 353 | } | ||
| 354 | } | ||
| 355 | |||
| 356 | if($prevData=='YTD') | ||
| 357 | { | ||
| 358 | foreach($ydispoarr as $disp) { | ||
| 359 | |||
| 360 | foreach($dispoclassarr as $dclass=>$darr) | ||
| 361 | { | ||
| 362 | if(in_array($disp['old_dialer_status'],$darr[1])) | ||
| 363 | { | ||
| 364 | $dispoclassarr[$dclass][0]+=$disp['cnt']; | ||
| 365 | } | ||
| 366 | } | ||
| 367 | |||
| 368 | $class=str_replace(" ","_","CLS_".$disp['currentstatus'].$disp['legalstatus']); | ||
| 369 | if($disp['old_dialer_status']) | ||
| 370 | { | ||
| 371 | ?> | ||
| 372 | <li class="notify_alert bucketliitem {!!$class!!}"> | ||
| 373 | <span><a href=# onclick="dialerLoadData('{!!$disp['old_dialer_status']!!}','{!!$disp['currentstatus']!!}','{!!$disp['legalstatus']!!}',1,'','');return false;">{!!$disp['old_dialer_status']!!}</a></span> | ||
| 374 | <span class="label label-small label-success pull-right" > | ||
| 375 | {!!$disp['cnt']!!} | ||
| 376 | </span> | ||
| 377 | </li> | ||
| 378 | |||
| 379 | <?php | ||
| 380 | } | ||
| 381 | } | ||
| 382 | } | ||
| 383 | |||
| 384 | $contacted=$dispoclassarr['CC'][0]+$dispoclassarr['CB'][0]+$dispoclassarr['NC'][0]; | ||
| 385 | echo "<script>$('#contactedcnt_span').html('$contacted');</script>";*/ | ||
| 386 | ?> | ||
| 387 | <!-- </ul> | ||
| 388 | </div> | ||
| 389 | </div> | ||
| 390 | <div class=col-md-9 id=bucketlistdiv>--- --> | ||
| 391 | </div> | ||
| 392 | <div style='clear:both'></div> | ||
| 393 | |||
| 394 | |||
| 395 | |||
| 396 | <script> | ||
| 397 | |||
| 398 | <?php if($client){?> | ||
| 399 | $("#tcampaign_select").val('<?=$client?>'); | ||
| 400 | <?php }?> | ||
| 401 | |||
| 402 | <?php //if($prevData){ ?> | ||
| 403 | //$("#data_select").val('<?=$prevData?>'); | ||
| 404 | <?php //}?> | ||
| 405 | |||
| 406 | <?php //if($legalStatus){ ?> | ||
| 407 | //$("#legalstatus_select").val('<?=$legalStatus?>'); | ||
| 408 | <?php //}?> | ||
| 409 | |||
| 410 | <?php if($currentStatus){ ?> | ||
| 411 | $("#currentstatus_select").val('<?=$currentStatus?>'); | ||
| 412 | <?php }?> | ||
| 413 | |||
| 414 | function campaignSelect() | ||
| 415 | { | ||
| 416 | var dashlet="Dialer"; | ||
| 417 | doAjax("dashboard/dashlet?module="+dashlet+"&client="+$("#tcampaign_select").val(),"","DashletT-"+dashlet,"ajax_dashlet_"+dashlet,"singlefail","GET"); | ||
| 418 | } | ||
| 419 | |||
| 420 | /*function dataSelect() | ||
| 421 | { | ||
| 422 | var currentStatus = $('#currentstatus_select').val(); | ||
| 423 | var legalStatus = $('#legalstatus_select').val(); | ||
| 424 | var prev = $("#data_select").val(); | ||
| 425 | var client = $("#tcampaign_select").val(); | ||
| 426 | |||
| 427 | var dashlet="Dialer"; | ||
| 428 | doAjax("dashboard/dashlet?module="+dashlet+"&client="+client+"&prev="+prev+"¤tStatus="+currentStatus+"&legalStatus="+legalStatus,"","DashletT-"+dashlet,"ajax_dashlet_"+dashlet,"singlefail","GET"); | ||
| 429 | } | ||
| 430 | */ | ||
| 431 | function bucketSelect() | ||
| 432 | { | ||
| 433 | /*var activeclass='CLS_'+$('#currentstatus_select').val()+$('#legalstatus_select').val(); | ||
| 434 | $('.bucketliitem').hide(); | ||
| 435 | $('.'+activeclass).show();*/ | ||
| 436 | /*var currentStatus = $('#currentstatus_select').val(); | ||
| 437 | var legalStatus = $('#legalstatus_select').val(); | ||
| 438 | var prev = $("#data_select").val(); | ||
| 439 | var client = $("#tcampaign_select").val(); | ||
| 440 | |||
| 441 | var dashlet="Dialer"; | ||
| 442 | |||
| 443 | doAjax("dashboard/status?module="+dashlet+"&client="+client+"&prev="+prev+"¤tStatus="+currentStatus+"&legalStatus="+legalStatus,"","DashletT-"+dashlet,"ajax_dashlet_"+dashlet,"singlefail","GET"); | ||
| 444 | }*/ | ||
| 445 | } | ||
| 446 | //bucketSelect(); | ||
| 447 | |||
| 448 | function dialerLoadData(listname,currentstatus,legalstatus,page,skey,stxt) | ||
| 449 | { | ||
| 450 | |||
| 451 | //doAjax("dialer/bucketdata","client={!!$client!!}&bucket="+listname+"¤tstatus="+currentstatus+"&legalstatus="+legalstatus+'&page='+page+'&skey='+skey+'&stxt='+stxt,"bucketlistdiv","ajax_dialer_list","singlefail","GET"); | ||
| 452 | } | ||
| 453 | dialerLoadData('CurrentQueue','','',1,'',''); | ||
| 454 | </script> |
| 1 | <div class="container"> | ||
| 2 | <div class="row"> | ||
| 3 | <div class="col-sm-4 bot"> | ||
| 4 | <a href="javascript:;" onclick="menuAction('campaign');return false;" style="color:white;"> | ||
| 5 | <div class="new1"> | ||
| 6 | <div class="icon"> <i class="fa fa-cog"></i></div> | ||
| 7 | Campaign Management | ||
| 8 | </div> | ||
| 9 | </a> | ||
| 10 | </div> | ||
| 11 | |||
| 12 | <div class="col-sm-4 bot"> | ||
| 13 | <a href="javascript:;" onclick="menuAction("admin");return false;" style="color:white;"> | ||
| 14 | <div class="new1"> | ||
| 15 | <div class="icon"> <i class="fa fa-lock f4"></i></div> | ||
| 16 | Flexydial Admin | ||
| 17 | </div> | ||
| 18 | </a> | ||
| 19 | </div> | ||
| 20 | |||
| 21 | <div class="col-sm-4 bot"> | ||
| 22 | <a href="javascript:;" onclick="menuAction("user");return false;" style="color:white;"> | ||
| 23 | <div class="new1"> | ||
| 24 | <div class="icon"> <i class="fa fa-user"></i></div> | ||
| 25 | Users | ||
| 26 | </div> | ||
| 27 | </a> | ||
| 28 | </div> | ||
| 29 | |||
| 30 | <div class="col-sm-4 bot"> | ||
| 31 | <a href="javascript:;" onclick="menuAction("group");return false;" style="color:white;"> | ||
| 32 | <div class="new1"> | ||
| 33 | <div class="icon"> <i class="fa fa-users"></i></div> | ||
| 34 | Groups | ||
| 35 | </div> | ||
| 36 | </a> | ||
| 37 | </div> | ||
| 38 | |||
| 39 | <div class="col-sm-4 bot"> | ||
| 40 | <a href="javascript:;" onclick="menuAction("role");return false;" style="color:white;"> | ||
| 41 | <div class="new1"> | ||
| 42 | <div class="icon"> <i class="fa fa-star"></i></div> | ||
| 43 | Role | ||
| 44 | </div> | ||
| 45 | </a> | ||
| 46 | </div> | ||
| 47 | |||
| 48 | <div class="col-sm-4 bot"> | ||
| 49 | <a href="javascript:;" onclick="menuAction("dialmode");return false;" style="color:white;"> | ||
| 50 | <div class="new1"> | ||
| 51 | <div class="icon"> <i class="fa fa-phone"></i></div> | ||
| 52 | Manage Dial Mode | ||
| 53 | </div> | ||
| 54 | </a> | ||
| 55 | </div> | ||
| 56 | |||
| 57 | </div> | ||
| 58 | |||
| 59 | </div> | ||
| 60 | |||
| 61 | <!-- <div class="container"> | ||
| 62 | <div class="row"> | ||
| 63 | <div class="col-sm-4 "> | ||
| 64 | |||
| 65 | <div class="hero-widget well well-sm"> | ||
| 66 | <div class="icon"> | ||
| 67 | <i class="fa fa-cog"></i> | ||
| 68 | </div> | ||
| 69 | <div class="text"> | ||
| 70 | <!-- <var>75%</var> | ||
| 71 | <label class="text-muted">Campaign Management</label> | ||
| 72 | </div> | ||
| 73 | <div class="options"> | ||
| 74 | <a href="javascript:;" class="btn btn-default btn-lg acolor" onclick="menuAction('campaign');return false;"><i class="glyphicon glyphicon-search"></i> Campaign Management</a> | ||
| 75 | </div> | ||
| 76 | </div> | ||
| 77 | </div> | ||
| 78 | <div class="col-sm-4"> | ||
| 79 | <div class="hero-widget well well-sm"> | ||
| 80 | <div class="icon"> | ||
| 81 | <i class="fa fa-lock f4"></i> | ||
| 82 | </div> | ||
| 83 | <div class="text"> | ||
| 84 | <!-- <var>3</var> | ||
| 85 | <label class="text-muted">Admin</label> | ||
| 86 | </div> | ||
| 87 | <div class="options"> | ||
| 88 | <a href="javascript:;" class="btn btn-default btn-lg acolor" onclick="menuAction("admin");return false;"><i class="glyphicon glyphicon-search"></i> Flexydial Admin</a> | ||
| 89 | </div> | ||
| 90 | </div> | ||
| 91 | </div> | ||
| 92 | <div class="col-sm-4"> | ||
| 93 | <div class="hero-widget well well-sm"> | ||
| 94 | <div class="icon"> | ||
| 95 | <i class="fa fa-user"></i> | ||
| 96 | </div> | ||
| 97 | <div class="text"><!-- | ||
| 98 | <var>614</var> | ||
| 99 | <label class="text-muted">Users</label> | ||
| 100 | </div> | ||
| 101 | <div class="options"> | ||
| 102 | <a href="javascript:;" class="btn btn-default btn-lg acolor" onclick="menuAction("user");return false;"><i class="glyphicon glyphicon-search"></i> Manage Users</a> | ||
| 103 | </div> | ||
| 104 | </div> | ||
| 105 | </div> | ||
| 106 | <div class="col-sm-4"> | ||
| 107 | <div class="hero-widget well well-sm"> | ||
| 108 | <div class="icon"> | ||
| 109 | <i class="fa fa-users"></i> | ||
| 110 | </div> | ||
| 111 | <div class="text"> | ||
| 112 | <!-- <var>73</var> | ||
| 113 | <label class="text-muted">Groups</label> | ||
| 114 | </div> | ||
| 115 | <div class="options"> | ||
| 116 | <a href="javascript:;" class="btn btn-default btn-lg acolor" onclick="menuAction("group");return false;"><i class="glyphicon glyphicon-search"></i> Manage Groups</a> | ||
| 117 | </div> | ||
| 118 | </div> | ||
| 119 | </div> | ||
| 120 | |||
| 121 | <div class="col-sm-4"> | ||
| 122 | <div class="hero-widget well well-sm"> | ||
| 123 | <div class="icon"> | ||
| 124 | <i class="fa fa-star"></i> | ||
| 125 | </div> | ||
| 126 | <div class="text"> | ||
| 127 | <!-- <var>3</var> | ||
| 128 | <label class="text-muted">Role</label> | ||
| 129 | </div> | ||
| 130 | <div class="options"> | ||
| 131 | <a href="javascript:;" class="btn btn-default btn-lg acolor" onclick="menuAction("role");return false;"><i class="glyphicon glyphicon-search"></i> Manage Roles</a> | ||
| 132 | </div> | ||
| 133 | </div> | ||
| 134 | </div> | ||
| 135 | <div class="col-sm-4"> | ||
| 136 | <div class="hero-widget well well-sm"> | ||
| 137 | <div class="icon"> | ||
| 138 | <i class="fa fa-phone"></i> | ||
| 139 | </div> | ||
| 140 | <div class="text"> | ||
| 141 | <!-- <var>614</var> | ||
| 142 | <label class="text-muted">Dial Mode</label> | ||
| 143 | </div> | ||
| 144 | <div class="options"> | ||
| 145 | <a href="javascript:;" class="btn btn-default btn-lg acolor" onclick="menuAction("dialmode");return false;"><i class="glyphicon glyphicon-search"></i> Manage Dial Mode</a> | ||
| 146 | </div> | ||
| 147 | </div> | ||
| 148 | </div> | ||
| 149 | </div> | ||
| 150 | </div> --> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | <style> | ||
| 2 | .hero-widget { text-align: center; padding-top: 20px; padding-bottom: 20px; } | ||
| 3 | .hero-widget .icon { display: block; font-size: 96px; line-height: 96px; margin-bottom: 10px; text-align: center; } | ||
| 4 | .hero-widget var { display: block; height: 64px; font-size: 64px; line-height: 64px; font-style: normal; } | ||
| 5 | .hero-widget label { font-size: 17px; } | ||
| 6 | .hero-widget .options { margin-top: 10px; } | ||
| 7 | .well { background-color : #040404 } | ||
| 8 | .acolor { color: #000000;} | ||
| 9 | </style> | ||
| 10 | |||
| 11 | |||
| 12 | <div class="container"> | ||
| 13 | <div class="row"> | ||
| 14 | <div class="col-sm-4"> | ||
| 15 | <div class="hero-widget well well-sm"> | ||
| 16 | <div class="icon"> | ||
| 17 | <i class="fa fa-cog"></i> | ||
| 18 | </div> | ||
| 19 | <div class="text"> | ||
| 20 | <!-- <var>75%</var> --> | ||
| 21 | <label class="text-muted">Campaign Management</label> | ||
| 22 | </div> | ||
| 23 | <div class="options"> | ||
| 24 | <a href="javascript:;" class="btn btn-default btn-lg acolor" onclick="menuAction('campaign');return false;"><i class="glyphicon glyphicon-search"></i> Campaign Management</a> | ||
| 25 | </div> | ||
| 26 | </div> | ||
| 27 | </div> | ||
| 28 | <div class="col-sm-4"> | ||
| 29 | <div class="hero-widget well well-sm"> | ||
| 30 | <div class="icon"> | ||
| 31 | <i class="fa fa-lock f4"></i> | ||
| 32 | </div> | ||
| 33 | <div class="text"> | ||
| 34 | <!-- <var>3</var> --> | ||
| 35 | <label class="text-muted">Admin</label> | ||
| 36 | </div> | ||
| 37 | <div class="options"> | ||
| 38 | <a href="javascript:;" class="btn btn-default btn-lg acolor" onclick="menuAction("admin");return false;"><i class="glyphicon glyphicon-search"></i> Flexydial Admin</a> | ||
| 39 | </div> | ||
| 40 | </div> | ||
| 41 | </div> | ||
| 42 | <div class="col-sm-4"> | ||
| 43 | <div class="hero-widget well well-sm"> | ||
| 44 | <div class="icon"> | ||
| 45 | <i class="fa fa-user"></i> | ||
| 46 | </div> | ||
| 47 | <div class="text"><!-- | ||
| 48 | <var>614</var> --> | ||
| 49 | <label class="text-muted">Users</label> | ||
| 50 | </div> | ||
| 51 | <div class="options"> | ||
| 52 | <a href="javascript:;" class="btn btn-default btn-lg acolor" onclick="menuAction("user");return false;"><i class="glyphicon glyphicon-search"></i> Manage Users</a> | ||
| 53 | </div> | ||
| 54 | </div> | ||
| 55 | </div> | ||
| 56 | <div class="col-sm-4"> | ||
| 57 | <div class="hero-widget well well-sm"> | ||
| 58 | <div class="icon"> | ||
| 59 | <i class="fa fa-users"></i> | ||
| 60 | </div> | ||
| 61 | <div class="text"> | ||
| 62 | <!-- <var>73</var> --> | ||
| 63 | <label class="text-muted">Groups</label> | ||
| 64 | </div> | ||
| 65 | <div class="options"> | ||
| 66 | <a href="javascript:;" class="btn btn-default btn-lg acolor" onclick="menuAction("group");return false;"><i class="glyphicon glyphicon-search"></i> Manage Groups</a> | ||
| 67 | </div> | ||
| 68 | </div> | ||
| 69 | </div> | ||
| 70 | |||
| 71 | <div class="col-sm-4"> | ||
| 72 | <div class="hero-widget well well-sm"> | ||
| 73 | <div class="icon"> | ||
| 74 | <i class="fa fa-star"></i> | ||
| 75 | </div> | ||
| 76 | <div class="text"> | ||
| 77 | <!-- <var>3</var> --> | ||
| 78 | <label class="text-muted">Role</label> | ||
| 79 | </div> | ||
| 80 | <div class="options"> | ||
| 81 | <a href="javascript:;" class="btn btn-default btn-lg acolor" onclick="menuAction("role");return false;"><i class="glyphicon glyphicon-search"></i> Manage Roles</a> | ||
| 82 | </div> | ||
| 83 | </div> | ||
| 84 | </div> | ||
| 85 | <div class="col-sm-4"> | ||
| 86 | <div class="hero-widget well well-sm"> | ||
| 87 | <div class="icon"> | ||
| 88 | <i class="fa fa-phone"></i> | ||
| 89 | </div> | ||
| 90 | <div class="text"> | ||
| 91 | <!-- <var>614</var> --> | ||
| 92 | <label class="text-muted">Dial Mode</label> | ||
| 93 | </div> | ||
| 94 | <div class="options"> | ||
| 95 | <a href="javascript:;" class="btn btn-default btn-lg acolor" onclick="menuAction("dialmode");return false;"><i class="glyphicon glyphicon-search"></i> Manage Dial Mode</a> | ||
| 96 | </div> | ||
| 97 | </div> | ||
| 98 | </div> | ||
| 99 | </div> | ||
| 100 | </div> |
| 1 | <?php | ||
| 2 | use App\Jobs\KHRMSLib; | ||
| 3 | use App\Models\CRMCall; | ||
| 4 | |||
| 5 | $client=Input::get("client"); | ||
| 6 | $prevData=Input::get("prev"); | ||
| 7 | $currentStatus = Input::get("currentStatus"); | ||
| 8 | $legalStatus = Input::get("legalStatus"); | ||
| 9 | if($currentStatus==""||$legalStatus==""|| $prevData==""){ | ||
| 10 | $currentStatus="ACTIVE"; | ||
| 11 | $legalStatus="PRIMARY"; | ||
| 12 | $prevData="MTD"; | ||
| 13 | } | ||
| 14 | |||
| 15 | $wakka=new KHRMSLib(); | ||
| 16 | $dispoclassarr=array('NC'=>array(0,array()),'CC'=>array(0,array()),'CB'=>array(0,array()),'NA'=>array(0,array())); | ||
| 17 | |||
| 18 | $dataSelect = array('0'=>'MTD','1'=>'YTD'); | ||
| 19 | |||
| 20 | $owclientstr=array(); | ||
| 21 | $oclientlst=$wakka->clientsOwnerRWAccess(); | ||
| 22 | if(!empty($oclientlst))foreach($oclientlst as $tclnt)if($tclnt!="") | ||
| 23 | { | ||
| 24 | $owclientstr[]="'$tclnt'"; | ||
| 25 | if($client=="")$client=$tclnt; | ||
| 26 | } | ||
| 27 | if(!empty($owclientstr))$owclientstr="and client in (".implode(",",$owclientstr).")";else $owclientstr=""; | ||
| 28 | if($client!="")$owclientstr="and client='$client'"; | ||
| 29 | |||
| 30 | |||
| 31 | $roclientstr=array();$didlinesstr=array();if(Auth::user()->exten!="")$didlinesstr[]=Auth::user()->exten; | ||
| 32 | |||
| 33 | $roclientlst=$wakka->clientsReadAccess(); | ||
| 34 | //print_r($roclientlst); | ||
| 35 | if(!empty($roclientlst))foreach($roclientlst as $tclnt)if($tclnt!="") | ||
| 36 | { | ||
| 37 | $roclientstr[]="'$tclnt'"; | ||
| 38 | if($client=="")$client=$tclnt; | ||
| 39 | |||
| 40 | $mastersdata=$wakka->getCompanyMaster($tclnt); | ||
| 41 | if(!empty($mastersdata["DialerDID"]))$didlinesstr[]=$mastersdata["DialerDID"]; | ||
| 42 | |||
| 43 | |||
| 44 | if(empty($mastersdata['dialerDispoList']))$mastersdata['dialerDispoList']=$wakka->HRCoreVars['dialerDispoList']; | ||
| 45 | |||
| 46 | $dispoarr=explode("~",$mastersdata['dialerDispoList']); | ||
| 47 | foreach($dispoarr as $dispo) | ||
| 48 | { | ||
| 49 | if(!empty($dispo)) | ||
| 50 | { | ||
| 51 | $dispoprts=explode("|",$dispo); | ||
| 52 | if(sizeof($dispoprts)>=3) | ||
| 53 | { | ||
| 54 | if(isset($dispoclassarr[$dispoprts[0]])) | ||
| 55 | { | ||
| 56 | $dispoclassarr[$dispoprts[0]][1][]=$dispoprts[1]; | ||
| 57 | } | ||
| 58 | } | ||
| 59 | } | ||
| 60 | } | ||
| 61 | } | ||
| 62 | foreach($didlinesstr as $k=>$dids) | ||
| 63 | { | ||
| 64 | $didarr=explode(":",$dids); | ||
| 65 | $didlinesstr[$k]=$didarr[0]; | ||
| 66 | } | ||
| 67 | |||
| 68 | if(!empty($roclientstr))$roclientstr="and client in (".implode(",",$roclientstr).")";else $roclientstr=""; | ||
| 69 | if($client!="")$roclientstr="and client='$client'"; | ||
| 70 | |||
| 71 | |||
| 72 | //$currentstatuses=$wakka->LoadAll("select distinct currentstatus from records where currentstatus!='' $owclientstr"); | ||
| 73 | //$legalstatuses=$wakka->LoadAll("select distinct legalstatus from records where legalstatus!='' $owclientstr"); | ||
| 74 | |||
| 75 | $dispoarr=$wakka->LoadAll("select count(*) as cnt,currentstatus,legalstatus,dialer_status from records where 1=1 $owclientstr group by currentstatus,legalstatus,dialer_status"); | ||
| 76 | |||
| 77 | $countStatuses = array('New', 'Called'); | ||
| 78 | foreach ($countStatuses as $status) { | ||
| 79 | $$status = 0; | ||
| 80 | } | ||
| 81 | $counts= DB::table('records') | ||
| 82 | ->select(DB::raw("count(*) as cnt,status")) | ||
| 83 | ->whereIn('status', $countStatuses) | ||
| 84 | ->where('client', '=', $client) | ||
| 85 | ->groupBy('status')->get(); | ||
| 86 | |||
| 87 | foreach ($counts as $key => $count) | ||
| 88 | { | ||
| 89 | $status = $count->status; | ||
| 90 | $$status = $count->cnt; | ||
| 91 | } | ||
| 92 | |||
| 93 | $TotalData=$New + $Called; | ||
| 94 | $NotCalled=$New; | ||
| 95 | $TotalCalled=$Called; | ||
| 96 | $birthdate=date('m-d'); | ||
| 97 | |||
| 98 | $Priority=$wakka->getCount("records","priority in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) $owclientstr"); | ||
| 99 | $Flagged=$wakka->getCount("records","dialer_flag='VIP' $owclientstr"); | ||
| 100 | //$NotCalledFlagged=$wakka->getCount("records"," priority='VIP' $owclientstr"); | ||
| 101 | $NotCalledFlagged=$wakka->getCount("records"," mf_isa='VIP' $owclientstr"); | ||
| 102 | $todaybirthday=$wakka->getCount("records"," DATE_FORMAT(DOB,'%m-%d')='$birthdate' and priority='11' $owclientstr"); | ||
| 103 | |||
| 104 | if($prevData=='MTD'&&$legalStatus!='SECONDARY') | ||
| 105 | { | ||
| 106 | $dispoarr=$wakka->LoadAll("select count(*) as cnt,currentstatus,legalstatus,dialer_status from records where 1=1 $owclientstr group by currentstatus,legalstatus,dialer_status having legalstatus='$legalStatus' and currentstatus='$currentStatus'"); | ||
| 107 | |||
| 108 | $TotalData=$wakka->getCount("records","status IN ('New', 'Called','Noqueue') and currentstatus='$currentStatus' and legalstatus='$legalStatus' $owclientstr"); | ||
| 109 | $NotCalled=$wakka->getCount("records","status='New' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 110 | $TotalCalled=$wakka->getCount("records","status='Called' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 111 | $Priority=$wakka->getCount("records","priority in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 112 | $Flagged=$wakka->getCount("records","dialer_flag='VIP' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 113 | /*$NotCalledFlagged=$wakka->getCount("records"," priority='VIP' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr");*/ | ||
| 114 | $NotCalledFlagged=$wakka->getCount("records"," mf_isa='VIP' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 115 | } | ||
| 116 | |||
| 117 | if($prevData=='YTD'&&$legalStatus!='SECONDARY') | ||
| 118 | { | ||
| 119 | $ydispoarr=$wakka->LoadAll("select count(*) as cnt,currentstatus,legalstatus,old_dialer_status from records where 1=1 $owclientstr group by currentstatus,legalstatus,old_dialer_status"); | ||
| 120 | |||
| 121 | $TotalData=$wakka->getCount("records","old_status IN ('New', 'Called','Noqueue') and currentstatus='$currentStatus' and legalstatus='$legalStatus' $owclientstr"); | ||
| 122 | $NotCalled=$wakka->getCount("records","old_status='New' and currentstatus='$currentStatus' and legalstatus='$legalStatus' $owclientstr"); | ||
| 123 | $TotalCalled=$wakka->getCount("records","old_status='Called' and currentstatus='$currentStatus' and legalstatus='$legalStatus' $owclientstr"); | ||
| 124 | $Priority=$wakka->getCount("records","priority in (1,2,3,4,5,6,7,8,9,10) and currentstatus='$currentStatus' and legalstatus='$legalStatus' $owclientstr"); | ||
| 125 | $Flagged=$wakka->getCount("records","dialer_flag='VIP' and currentstatus='$currentStatus' and legalstatus='$legalStatus' $owclientstr"); | ||
| 126 | /*$NotCalledFlagged=$wakka->getCount("records"," priority='VIP' and currentstatus='$currentStatus' and legalstatus='$legalStatus' $owclientstr");*/ | ||
| 127 | $NotCalledFlagged=$wakka->getCount("records"," mf_isa='VIP' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 128 | } | ||
| 129 | |||
| 130 | if($prevData=='MTD'&&$legalStatus=='SECONDARY') | ||
| 131 | { | ||
| 132 | $dispoarr=$wakka->LoadAll("select count(*) as cnt,currentstatus,legalstatus,dialer_status from records where 1=1 $owclientstr group by currentstatus,legalstatus,dialer_status having legalstatus='$legalStatus' and currentstatus='$currentStatus'"); | ||
| 133 | |||
| 134 | $TotalData=$wakka->getCount("records","status IN ('New', 'Called','Noqueue') and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 135 | $NotCalled=$wakka->getCount("records","status='New' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 136 | $TotalCalled=$wakka->getCount("records","status='Called' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 137 | $Priority=$wakka->getCount("records","priority in (1,2,3,4,5,6,7,8,9,10) and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 138 | $Flagged=$wakka->getCount("records","dialer_flag='VIP' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 139 | /*$NotCalledFlagged=$wakka->getCount("records"," priority='VIP' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr");*/ | ||
| 140 | $NotCalledFlagged=$wakka->getCount("records"," mf_isa='VIP' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 141 | } | ||
| 142 | |||
| 143 | if($prevData=='YTD'&&$legalStatus=='SECONDARY') | ||
| 144 | { | ||
| 145 | $ydispoarr=$wakka->LoadAll("select count(*) as cnt,currentstatus,legalstatus,old_dialer_status from records where 1=1 $owclientstr group by currentstatus,legalstatus,old_dialer_status having legalstatus='$legalStatus' and currentstatus='$currentStatus'"); | ||
| 146 | |||
| 147 | $TotalData=$wakka->getCount("records","old_status IN ('New', 'Called','Noqueue') and currentstatus='$currentStatus' and legalstatus='$legalStatus' $owclientstr"); | ||
| 148 | $NotCalled=$wakka->getCount("records","old_status='New' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 149 | $TotalCalled=$wakka->getCount("records","old_status='Called' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 150 | $Priority=$wakka->getCount("records","priority in (1,2,3,4,5,6,7,8,9,10) and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 151 | $Flagged=$wakka->getCount("records","dialer_flag='VIP' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 152 | /*$NotCalledFlagged=$wakka->getCount("records"," priority='VIP' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr");*/ | ||
| 153 | $NotCalledFlagged=$wakka->getCount("records"," mf_isa='VIP' and (currentstatus='$currentStatus' and legalstatus='$legalStatus') $owclientstr"); | ||
| 154 | } | ||
| 155 | |||
| 156 | $MissedCalls=0; | ||
| 157 | |||
| 158 | $udidlinesstr = array(); | ||
| 159 | foreach($didlinesstr as $didlinestr){ | ||
| 160 | $didlinestrArr=explode(":",$didlinestr); | ||
| 161 | $udidlinesstr[] = substr($didlinestrArr[0], env('didnumber')); | ||
| 162 | } | ||
| 163 | |||
| 164 | $mc=CRMCall::where('userstatus','=','InboundDROP')->where('created_at','>','2018-09-11 00:00:00')->where('created_at','>',date('Y-m-d H:i:s',time()-(7*24*60*60))); | ||
| 165 | $mc=$mc->where(function ($query) use($roclientlst,$udidlinesstr){ | ||
| 166 | $query->orWhereIn('client',$roclientlst)->orWhereIn('did',$udidlinesstr); | ||
| 167 | }); | ||
| 168 | $mc=$mc->get(); | ||
| 169 | |||
| 170 | $number_list=array(); | ||
| 171 | foreach($mc as $key=>$tcall) | ||
| 172 | { | ||
| 173 | $tccal=substr($tcall->number,-10); | ||
| 174 | $mc_number=CRMCall::where('userstatus','!=','InboundDROP') | ||
| 175 | ->where('created_at','>',$tcall->created_at) | ||
| 176 | ->where('number','like',"%".$tccal."%") | ||
| 177 | ->orderBy("id","DESC") | ||
| 178 | ->first(); | ||
| 179 | |||
| 180 | $mccount=count($mc_number); | ||
| 181 | if($mccount==0) | ||
| 182 | { | ||
| 183 | $number_list[] = $tcall->number; | ||
| 184 | } | ||
| 185 | |||
| 186 | } | ||
| 187 | |||
| 188 | if(count($number_list) > 0) { | ||
| 189 | $lcalls=DB::select("SELECT * FROM crmcalls where id in (SELECT max(id) FROM crmcalls WHERE number IN ('" . implode("','", $number_list). "') GROUP BY number )"); | ||
| 190 | |||
| 191 | foreach($lcalls as $lcall) | ||
| 192 | { | ||
| 193 | if($lcall->userstatus=="InboundDROP") | ||
| 194 | { | ||
| 195 | $MissedCalls++; | ||
| 196 | } | ||
| 197 | } | ||
| 198 | } | ||
| 199 | |||
| 200 | $callstoday=CRMCall::where("created_at",">=",date("Y-m-d 00:00:00"))->where("user_id","=",Auth::user()->id)->count(); | ||
| 201 | $callsmonth=CRMCall::where("created_at",">=",date("Y-m-01 00:00:00"))->where("user_id","=",Auth::user()->id)->count(); | ||
| 202 | |||
| 203 | |||
| 204 | $recstoday=$wakka->getCount("records","dialer_lastcall>='".date("Y-m-d 00:00:00")."' $owclientstr"); | ||
| 205 | $recsmonth=$wakka->getCount("records","dialer_lastcall>='".date("Y-m-01 00:00:00")."' $owclientstr"); | ||
| 206 | |||
| 207 | $user=Auth::user()->id; | ||
| 208 | $role = Auth::user()->usertype;// TODO with role | ||
| 209 | |||
| 210 | $calllog = $calllog = DB::table('records') | ||
| 211 | ->join('crmcalls', 'records.dialer_callback', '=', 'crmcalls.usercallback') | ||
| 212 | ->select('records.firstname', 'records.cust_id', 'records.mobile', 'records.dialer_callback', 'records.status','records.dialer_lastcall','records.id','records.dialer_status') | ||
| 213 | ->where("crmcalls.user_id",$user) | ||
| 214 | //->where("records.dialer_substatus","Follow Up") | ||
| 215 | ->where("records.dialer_callback", "!=","0000-00-00 00:00:00") | ||
| 216 | //->where("crmcalls.usercallback", "!=","0000-00-00 00:00:00") | ||
| 217 | //->where("crmcalls.created_at", ">",date("Y-m-d 08:00:00")) | ||
| 218 | //->where("crmcalls_archive.usercallback", "=","records.dialer_callback") | ||
| 219 | //->where("records.dialer_lastcall", "<=","crmcalls_archive.usercallback") | ||
| 220 | ->get(); | ||
| 221 | |||
| 222 | $campaignFollowupCount = $calllog = DB::table('records') | ||
| 223 | ->join('crmcalls', 'records.dialer_callback', '=', 'crmcalls.usercallback') | ||
| 224 | ->select('records.firstname', 'records.cust_id', 'records.mobile', 'records.dialer_callback', 'records.status','records.dialer_lastcall','records.id','records.dialer_status') | ||
| 225 | ->where("crmcalls.user_id",$user) | ||
| 226 | //->where("records.dialer_substatus","Follow Up") | ||
| 227 | ->where("records.dialer_callback", "!=","0000-00-00 00:00:00") | ||
| 228 | //->where("crmcalls.usercallback", "!=","0000-00-00 00:00:00") | ||
| 229 | //->where("crmcalls.created_at", ">",date("Y-m-d 08:00:00")) | ||
| 230 | //->where("crmcalls_archive.usercallback", "=","records.dialer_callback") | ||
| 231 | //->where("records.dialer_lastcall", "<=","crmcalls_archive.usercallback") | ||
| 232 | ->where('records.client', '=', $client) | ||
| 233 | ->get(); | ||
| 234 | |||
| 235 | $userId = Auth::user()->id; | ||
| 236 | $TotalCalled=$wakka->getCount("crmcalls","user_id = $userId and created_at > '".date("Y-m-d 03:00:00")."'"); | ||
| 237 | $contactedTotalCalled=$wakka->getCount("crmcalls","userstatus='Contacted' and user_id = $userId and created_at > '".date("Y-m-d 03:00:00")."'"); | ||
| 238 | |||
| 239 | $campaignTotalCalled=$wakka->getCount("crmcalls","user_id = $userId and client = '$client' and created_at > '".date("Y-m-d 03:00:00")."'"); | ||
| 240 | |||
| 241 | $campaignContactedTotalCalled=$wakka->getCount("crmcalls","userstatus='Contacted' and user_id = $userId and client = '$client' and created_at > '".date("Y-m-d 03:00:00")."'"); | ||
| 242 | |||
| 243 | ?> | ||
| 244 | <?php if($role != 'Admin'){ ?> | ||
| 245 | |||
| 246 | <div class="container"> | ||
| 247 | |||
| 248 | <div class="row"> | ||
| 249 | <?php //echo "1ii".sizeof($roclientlst);?> | ||
| 250 | <?php if(sizeof($roclientlst)>0){ ?> | ||
| 251 | <div class="col-md-1" style="padding: 0px;margin: 6px;"> | ||
| 252 | <h4>Campaign</h4> | ||
| 253 | </div> | ||
| 254 | <div class=col-md-5> | ||
| 255 | <select class='form-control selcls' id=tcampaign_select onchange='campaignSelect();'> | ||
| 256 | <?php $s=""; $i = 0; | ||
| 257 | foreach($roclientlst as $c){ | ||
| 258 | $c=trim($c); | ||
| 259 | if(!empty($c)){ | ||
| 260 | //if($c==$client)$s='selected'; | ||
| 261 | if($i == 0)$s='selected'; | ||
| 262 | echo "<option value='$c' $s>$c</option>"; | ||
| 263 | } | ||
| 264 | } ?> | ||
| 265 | </select> | ||
| 266 | </div> | ||
| 267 | <div class=col-md-5> | ||
| 268 | <select class=form-control id=data_select onchange='dataSelect();' style='display:none'> | ||
| 269 | <?php foreach($dataSelect as $d){$s="";if($d==$prevData)$s='selected';echo "<option value='$d' $s>$d</option>";} ?> | ||
| 270 | </select> | ||
| 271 | </div> | ||
| 272 | <div style='clear:both'></div> | ||
| 273 | <br> | ||
| 274 | <?php } ?> | ||
| 275 | </div> | ||
| 276 | |||
| 277 | |||
| 278 | <div class="row"><div class="col-sm-4"><h4>Total</h4></div></div> | ||
| 279 | |||
| 280 | <div class="row"> | ||
| 281 | <div class="col-sm-4 bot"> | ||
| 282 | <div class="new1" style="color:white;"> | ||
| 283 | <div class="text"> | ||
| 284 | <var><?php echo $TotalCalled; ?></var> | ||
| 285 | </div> | ||
| 286 | Called | ||
| 287 | </div> | ||
| 288 | </div> | ||
| 289 | |||
| 290 | <div class="col-sm-4 bot"> | ||
| 291 | <div class="new1" style="color:white;"> | ||
| 292 | <div class="text"> | ||
| 293 | <var><?php echo $contactedTotalCalled; ?></var> | ||
| 294 | </div> | ||
| 295 | Contacted | ||
| 296 | </div> | ||
| 297 | </div> | ||
| 298 | |||
| 299 | <div class="col-sm-4 bot"> | ||
| 300 | <a href="javascript:;" onclick="loadFollowupData('all');" style="color:white;"> | ||
| 301 | <div class="new1" style="color:white;"> | ||
| 302 | <div class="text"> | ||
| 303 | <var><?php echo count($calllog); ?></var> | ||
| 304 | </div> | ||
| 305 | Follow Up | ||
| 306 | </div> | ||
| 307 | </a> | ||
| 308 | </div> | ||
| 309 | </div> | ||
| 310 | |||
| 311 | <div class="row"><div class="col-sm-4"><h4>Campaign Wise</h4></div></div> | ||
| 312 | |||
| 313 | <div class="row"> | ||
| 314 | <div class="col-sm-4 bot"> | ||
| 315 | <div class="new1" style="color:white;"> | ||
| 316 | <div class="text"> | ||
| 317 | <var><?php echo $campaignTotalCalled; ?></var> | ||
| 318 | </div> | ||
| 319 | Called | ||
| 320 | </div> | ||
| 321 | </div> | ||
| 322 | |||
| 323 | <div class="col-sm-4 bot"> | ||
| 324 | <div class="new1" style="color:white;"> | ||
| 325 | <div class="text"> | ||
| 326 | <var><?php echo $campaignContactedTotalCalled; ?></var> | ||
| 327 | </div> | ||
| 328 | Contacted | ||
| 329 | </div> | ||
| 330 | </div> | ||
| 331 | |||
| 332 | <div class="col-sm-4 bot"> | ||
| 333 | <a href="javascript:;" onclick="loadFollowupData('campaign');" style="color:white;"> | ||
| 334 | <div class="new1" style="color:white;"> | ||
| 335 | <div class="text"> | ||
| 336 | <var><?php echo count($campaignFollowupCount); ?></var> | ||
| 337 | </div> | ||
| 338 | Follow Up | ||
| 339 | </div> | ||
| 340 | </a> | ||
| 341 | </div> | ||
| 342 | |||
| 343 | </div> | ||
| 344 | <!-- <div class="row"><div class="col-sm-4"><h4>Total</h4></div></div> | ||
| 345 | <div class="row"> | ||
| 346 | <div class="col-sm-4"> | ||
| 347 | |||
| 348 | <div class="hero-widget well well-sm"> | ||
| 349 | <div class="text"> | ||
| 350 | <var><?php echo $TotalCalled; ?></var> | ||
| 351 | <label class="text-muted">Called</label> | ||
| 352 | </div> | ||
| 353 | </div> | ||
| 354 | </div> | ||
| 355 | <div class="col-sm-4"> | ||
| 356 | <div class="hero-widget well well-sm"> | ||
| 357 | <div class="text"> | ||
| 358 | <var ><?php echo $contactedTotalCalled; ?></var> | ||
| 359 | <label class="text-muted">Contacted</label> | ||
| 360 | </div> | ||
| 361 | </div> | ||
| 362 | </div> | ||
| 363 | <div class="col-sm-4"> | ||
| 364 | <div class="hero-widget well well-sm"> | ||
| 365 | <div class="text"> | ||
| 366 | <var><?php echo count($calllog); ?></var> | ||
| 367 | <label class="text-muted"> | ||
| 368 | <!-- <a href="#" onclick="menuAction('dialer/loadFollowupData');return false;">Follow Up</a>Follow Up | ||
| 369 | </label> | ||
| 370 | </div> | ||
| 371 | </div> | ||
| 372 | </div> | ||
| 373 | |||
| 374 | </div> | ||
| 375 | <div class="row"><div class="col-sm-4"><h4>Campaign Wise</h4></div></div> | ||
| 376 | |||
| 377 | <div class="row"> | ||
| 378 | <div class="col-sm-4"> | ||
| 379 | <div class="hero-widget well well-sm"> | ||
| 380 | <div class="text"> | ||
| 381 | <var><?php echo $campaignTotalCalled; ?></var> | ||
| 382 | <label class="text-muted">Called</label> | ||
| 383 | </div> | ||
| 384 | </div> | ||
| 385 | </div> | ||
| 386 | <div class="col-sm-4"> | ||
| 387 | <div class="hero-widget well well-sm"> | ||
| 388 | <div class="text"> | ||
| 389 | <var ><?php echo $campaignContactedTotalCalled; ?></var> | ||
| 390 | <label class="text-muted">Contacted</label> | ||
| 391 | </div> | ||
| 392 | </div> | ||
| 393 | </div> | ||
| 394 | <div class="col-sm-4"> | ||
| 395 | <div class="hero-widget well well-sm"> | ||
| 396 | <div class="text"> | ||
| 397 | <var><?php echo count($campaignFollowupCount); ?></var> | ||
| 398 | <label class="text-muted"><!-- <a href="#" onclick="menuAction('dialer/loadFollowupData');return false;">Follow Up</a>Follow Up</label> | ||
| 399 | </div> | ||
| 400 | </div> | ||
| 401 | </div> | ||
| 402 | |||
| 403 | |||
| 404 | </div> --> | ||
| 405 | </div> | ||
| 406 | |||
| 407 | |||
| 408 | <div class=col-md-3 style="display: none" > | ||
| 409 | <div class=col-md-11> | ||
| 410 | |||
| 411 | <!-- <h5> | ||
| 412 | Buckets | ||
| 413 | <span class='label label-small label-default pull-right'> | ||
| 414 | <a href=# onclick="dialerLoadData('CallsMonth','','',1,'','');return false;" style='color:#fff;font-size:12px'> | ||
| 415 | Month: {!!$recsmonth!!} / {!!$callsmonth!!} | ||
| 416 | </a> | ||
| 417 | </span> | ||
| 418 | <span class='label label-small label-default pull-right' style='margin-right:5px'> | ||
| 419 | <a href=# onclick="dialerLoadData('CallsToday','','',1,'','');return false;" style='color:#fff;font-size:12px'> | ||
| 420 | Today: {!!$recstoday!!} / {!!$callstoday!!} | ||
| 421 | </a> | ||
| 422 | </span> | ||
| 423 | |||
| 424 | </h5> | ||
| 425 | <div style='clear:both'></div> | ||
| 426 | <hr><br>--> | ||
| 427 | <?php | ||
| 428 | //print_r($legalstatuses); | ||
| 429 | //print_r($currentstatuses); | ||
| 430 | |||
| 431 | ?> | ||
| 432 | <!-- <div class=col-md-6> | ||
| 433 | <select class=form-control id=legalstatus_select onchange='bucketSelect();'> | ||
| 434 | <option value='PRIMARY'>PRIMARY</option> | ||
| 435 | <option value='SECONDARY'>SECONDARY</option> | ||
| 436 | </select> | ||
| 437 | </div> | ||
| 438 | <div class=col-md-6> | ||
| 439 | <select class=form-control id=currentstatus_select onchange='bucketSelect();'> | ||
| 440 | <option value='ACTIVE'>ACTIVE</option> | ||
| 441 | <option value='PASSIVE'>PASSIVE</option> | ||
| 442 | </select> | ||
| 443 | </div> --> | ||
| 444 | <div style='clear:both'></div> | ||
| 445 | <ul style="list-style:none"> | ||
| 446 | <!-- <li class="notify_alert"> | ||
| 447 | <span><a href=# onclick="dialerLoadData('CurrentQueue','','',1,'','');return false;">CurrentQueue</a></span> | ||
| 448 | <span class="label label-small pull-right" > | ||
| 449 | 0 | ||
| 450 | </span> | ||
| 451 | </li> --> | ||
| 452 | <!-- <li class="notify_alert"> | ||
| 453 | <span><a href=# onclick="dialerLoadData('MissedCalls','','',1,'','');return false;">MissedCalls</a></span> | ||
| 454 | <span class="label label-small label-primary pull-right" > | ||
| 455 | {!!$MissedCalls!!} | ||
| 456 | </span> | ||
| 457 | </li> --> | ||
| 458 | <!-- <li class="notify_alert"> | ||
| 459 | <span><a href=# onclick="dialerLoadData('Priority','','',1,'','');return false;">Priority</a></span> | ||
| 460 | <span class="label label-small label-info pull-right" > | ||
| 461 | {!!$Priority!!} | ||
| 462 | </span> | ||
| 463 | </li> --> | ||
| 464 | <li class="notify_alert"> | ||
| 465 | <span><a href=# onclick="dialerLoadData('FollowUp,','','',1,'','');return false;">FollowUp</a></span> | ||
| 466 | <span class="label label-small label-default pull-right" > | ||
| 467 | {!!$FollowUp!!} | ||
| 468 | </span> | ||
| 469 | </li> | ||
| 470 | <li class="notify_alert"> | ||
| 471 | <!-- <span><a href=# onclick="dialerLoadData('TotalData','{!!$currentStatus!!}','{!!$legalStatus!!}',1,'','');return false;">TotalData</a></span> --> | ||
| 472 | <span>TotalData</span> | ||
| 473 | <span class="label label-small label-default pull-right" > | ||
| 474 | {!!$TotalData!!} | ||
| 475 | </span> | ||
| 476 | </li> | ||
| 477 | <!-- <li class="notify_alert"> | ||
| 478 | <span><a href=# onclick="dialerLoadData('NotCalled','{!!$currentStatus!!}','{!!$legalStatus!!}',1,'','');return false;">NotCalled</a></span> | ||
| 479 | <span class="label label-small label-default pull-right" > | ||
| 480 | {!!$NotCalled!!} | ||
| 481 | </span> | ||
| 482 | </li> --> | ||
| 483 | <li class="notify_alert"> | ||
| 484 | <!-- <span><a href=# onclick="dialerLoadData('Called','','',1,'','');return false;">Called</a></span> --> | ||
| 485 | <span>Called</span> | ||
| 486 | <span class="label label-small label-success pull-right" > | ||
| 487 | {!!$TotalCalled!!} | ||
| 488 | </span> | ||
| 489 | </li> | ||
| 490 | <li class="notify_alert"> | ||
| 491 | <!-- <span><a href=# onclick="return false;">Contacted</a></span> --> | ||
| 492 | <span>Contacted</span> | ||
| 493 | <span class="label label-small label-success pull-right" id=contactedcnt_span> | ||
| 494 | 0 | ||
| 495 | </span> | ||
| 496 | </li> | ||
| 497 | <!-- <li class="notify_alert"> | ||
| 498 | <span><a href=# onclick="dialerLoadData('Flagged-Called','{!!$currentStatus!!}','{!!$legalStatus!!}',1,'','');return false;">Flagged-Called</a></span> | ||
| 499 | <span class="label label-small label-success pull-right" > | ||
| 500 | {!!$Flagged!!} | ||
| 501 | </span> | ||
| 502 | </li> --> | ||
| 503 | <!-- <li class="notify_alert"> | ||
| 504 | <span><a href=# onclick="dialerLoadData('Flagged-Notcalled','{!!$currentStatus!!}','{!!$legalStatus!!}',1,'','');return false;">Flagged-NotCalled</a></span> | ||
| 505 | <span class="label label-small label-warning pull-right" > | ||
| 506 | {!!$NotCalledFlagged!!} | ||
| 507 | </span> | ||
| 508 | </li> --> | ||
| 509 | <!-- <li class="notify_alert"> | ||
| 510 | <span><a href=# onclick="dialerLoadData('today-birthday','{!!$currentStatus!!}','{!!$legalStatus!!}',1,'','');return false;">Today Birthday</a></span> | ||
| 511 | <span class="label label-small label-warning pull-right" > | ||
| 512 | {!!$todaybirthday!!} | ||
| 513 | </span> | ||
| 514 | </li> --> | ||
| 515 | |||
| 516 | <hr><br> | ||
| 517 | |||
| 518 | <?php | ||
| 519 | if($prevData=='' ||$prevData=='MTD') | ||
| 520 | { | ||
| 521 | foreach($dispoarr as $disp) { | ||
| 522 | |||
| 523 | foreach($dispoclassarr as $dclass=>$darr) | ||
| 524 | { | ||
| 525 | if(in_array($disp['dialer_status'],$darr[1])) | ||
| 526 | { | ||
| 527 | $dispoclassarr[$dclass][0]+=$disp['cnt']; | ||
| 528 | } | ||
| 529 | } | ||
| 530 | |||
| 531 | |||
| 532 | $class=str_replace(" ","_","CLS_".$disp['currentstatus'].$disp['legalstatus']); | ||
| 533 | if($disp['dialer_status']) | ||
| 534 | { | ||
| 535 | ?> | ||
| 536 | <li class="notify_alert bucketliitem sdfsdf {!!$class!!}"> | ||
| 537 | <span><a href=# onclick="dialerLoadData('{!!$disp['dialer_status']!!}','{!!$disp['currentstatus']!!}','{!!$disp['legalstatus']!!}',1,'','');return false;">{!!$disp['dialer_status']!!}</a></span> | ||
| 538 | <span class="label label-small label-success pull-right" > | ||
| 539 | {!!$disp['cnt']!!} | ||
| 540 | </span> | ||
| 541 | </li> | ||
| 542 | <?php } | ||
| 543 | |||
| 544 | } | ||
| 545 | } | ||
| 546 | |||
| 547 | if($prevData=='YTD') | ||
| 548 | { | ||
| 549 | foreach($ydispoarr as $disp) { | ||
| 550 | |||
| 551 | foreach($dispoclassarr as $dclass=>$darr) | ||
| 552 | { | ||
| 553 | if(in_array($disp['old_dialer_status'],$darr[1])) | ||
| 554 | { | ||
| 555 | $dispoclassarr[$dclass][0]+=$disp['cnt']; | ||
| 556 | } | ||
| 557 | } | ||
| 558 | |||
| 559 | $class=str_replace(" ","_","CLS_".$disp['currentstatus'].$disp['legalstatus']); | ||
| 560 | if($disp['old_dialer_status']) | ||
| 561 | { | ||
| 562 | ?> | ||
| 563 | <li class="notify_alert bucketliitem test {!!$class!!}"> | ||
| 564 | <span><a href=# onclick="dialerLoadData('{!!$disp['old_dialer_status']!!}','{!!$disp['currentstatus']!!}','{!!$disp['legalstatus']!!}',1,'','');return false;">{!!$disp['old_dialer_status']!!}</a></span> | ||
| 565 | <span class="label label-small label-success pull-right" > | ||
| 566 | {!!$disp['cnt']!!} | ||
| 567 | </span> | ||
| 568 | </li> | ||
| 569 | |||
| 570 | <?php | ||
| 571 | } | ||
| 572 | } | ||
| 573 | } | ||
| 574 | |||
| 575 | $contacted=$dispoclassarr['CC'][0]+$dispoclassarr['CB'][0]+$dispoclassarr['NC'][0]; | ||
| 576 | echo "<script>$('#contactedcnt_span').html('$contacted');</script>"; | ||
| 577 | ?> | ||
| 578 | </ul> | ||
| 579 | </div> | ||
| 580 | </div> | ||
| 581 | <!-- <div class=col-md-9 id=bucketlistdiv></div> | ||
| 582 | --><div style='clear:both'></div> | ||
| 583 | <?php }else{ ?> | ||
| 584 | |||
| 585 | @include("layout/module/dashboard/adminHomePage") | ||
| 586 | |||
| 587 | <?php } ?> | ||
| 588 | |||
| 589 | <script> | ||
| 590 | |||
| 591 | <?php if($client){?> | ||
| 592 | $("#tcampaign_select").val('<?=$client?>'); | ||
| 593 | <?php }?> | ||
| 594 | |||
| 595 | <?php if($prevData){ ?> | ||
| 596 | $("#data_select").val('<?=$prevData?>'); | ||
| 597 | <?php }?> | ||
| 598 | |||
| 599 | <?php if($legalStatus){ ?> | ||
| 600 | $("#legalstatus_select").val('<?=$legalStatus?>'); | ||
| 601 | <?php }?> | ||
| 602 | |||
| 603 | <?php if($currentStatus){ ?> | ||
| 604 | $("#currentstatus_select").val('<?=$currentStatus?>'); | ||
| 605 | <?php }?> | ||
| 606 | |||
| 607 | function loadFollowupData(val) | ||
| 608 | { | ||
| 609 | var menu = "dialer/loadFollowupData"; | ||
| 610 | doAjax(menu+"?client="+$("#tcampaign_select").val()+"&selection="+val,'','content','ajax_'+menu,'singlethis','GET'); | ||
| 611 | } | ||
| 612 | |||
| 613 | |||
| 614 | function campaignSelect() | ||
| 615 | { | ||
| 616 | var dashlet="Dialer"; | ||
| 617 | doAjax("dashboard/dashlet?module="+dashlet+"&client="+$("#tcampaign_select").val(),"","DashletT-"+dashlet,"ajax_dashlet_"+dashlet,"singlefail","GET"); | ||
| 618 | } | ||
| 619 | |||
| 620 | function dataSelect() | ||
| 621 | { | ||
| 622 | var currentStatus = $('#currentstatus_select').val(); | ||
| 623 | var legalStatus = $('#legalstatus_select').val(); | ||
| 624 | var prev = $("#data_select").val(); | ||
| 625 | var client = $("#tcampaign_select").val(); | ||
| 626 | |||
| 627 | var dashlet="Dialer"; | ||
| 628 | doAjax("dashboard/dashlet?module="+dashlet+"&client="+client+"&prev="+prev+"¤tStatus="+currentStatus+"&legalStatus="+legalStatus,"","DashletT-"+dashlet,"ajax_dashlet_"+dashlet,"singlefail","GET"); | ||
| 629 | } | ||
| 630 | |||
| 631 | function bucketSelect() | ||
| 632 | { | ||
| 633 | /*var activeclass='CLS_'+$('#currentstatus_select').val()+$('#legalstatus_select').val(); | ||
| 634 | $('.bucketliitem').hide(); | ||
| 635 | $('.'+activeclass).show();*/ | ||
| 636 | var currentStatus = $('#currentstatus_select').val(); | ||
| 637 | var legalStatus = $('#legalstatus_select').val(); | ||
| 638 | var prev = $("#data_select").val(); | ||
| 639 | var client = $("#tcampaign_select").val(); | ||
| 640 | |||
| 641 | var dashlet="Dialer"; | ||
| 642 | |||
| 643 | doAjax("dashboard/status?module="+dashlet+"&client="+client+"&prev="+prev+"¤tStatus="+currentStatus+"&legalStatus="+legalStatus,"","DashletT-"+dashlet,"ajax_dashlet_"+dashlet,"singlefail","GET"); | ||
| 644 | } | ||
| 645 | //bucketSelect(); | ||
| 646 | |||
| 647 | function dialerLoadData(listname,currentstatus,legalstatus,page,skey,stxt) | ||
| 648 | { | ||
| 649 | |||
| 650 | doAjax("dialer/bucketdata","client={!!$client!!}&bucket="+listname+"¤tstatus="+currentstatus+"&legalstatus="+legalstatus+'&page='+page+'&skey='+skey+'&stxt='+stxt,"bucketlistdiv","ajax_dialer_list","singlefail","GET"); | ||
| 651 | } | ||
| 652 | dialerLoadData('CurrentQueue','','',1,'',''); | ||
| 653 | </script> | ||
| 654 | <style> | ||
| 655 | .hero-widget { text-align: center; padding-top: 20px; padding-bottom: 20px; text-shadow: 1px 1px 2px blue, 0 0 25px blue, 0 0 5px darkblue; } | ||
| 656 | .hero-widget .icon { display: block; font-size: 96px; line-height: 96px; margin-bottom: 10px; text-align: center; } | ||
| 657 | .hero-widget var { display: block; height: 64px; font-size: 64px; line-height: 64px; font-style: normal; } | ||
| 658 | .hero-widget label { font-size: 17px; } | ||
| 659 | .hero-widget .options { margin-top: 10px; } | ||
| 660 | .well { background-color : #040404 } | ||
| 661 | .acolor { color: #000000;} | ||
| 662 | |||
| 663 | .new1 .icon { display: block; font-size: 96px; line-height: 96px; margin-bottom: 10px; text-align: center; } | ||
| 664 | |||
| 665 | .bot { padding-bottom: 20px !important; } | ||
| 666 | .new1 var { display: block; height: 96px; font-size: 96px; line-height: 96px; font-style: normal; } | ||
| 667 | </style> | ||
| 668 | |||
| 669 | |||
| 670 | <style> | ||
| 671 | .new1 { | ||
| 672 | /*width: 200px; | ||
| 673 | height: auto;*/ | ||
| 674 | padding: 15px; | ||
| 675 | background-color: #f6f7fb; | ||
| 676 | box-shadow: 10px 10px 5px grey; | ||
| 677 | font-size:30px; | ||
| 678 | border: 2px solid red; | ||
| 679 | border-radius: 50px 20px; | ||
| 680 | text-align: center; | ||
| 681 | |||
| 682 | /* text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;*/ | ||
| 683 | text-shadow: 1px 1px 2px blue, 0 0 25px blue, 0 0 5px darkblue; | ||
| 684 | } | ||
| 685 | |||
| 686 | .selcls { | ||
| 687 | /* padding: 9px; */ | ||
| 688 | border: solid 1px #517B97; | ||
| 689 | outline: 0; | ||
| 690 | background: -webkit-gradient(linear, left top, left 25, from(#FFFFFF), color-stop(4%, #CAD9E3), to(#FFFFFF)); | ||
| 691 | background: -moz-linear-gradient(top, #FFFFFF, #CAD9E3 1px, #FFFFFF 25px); | ||
| 692 | box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px; | ||
| 693 | -moz-box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px; | ||
| 694 | -webkit-box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px; | ||
| 695 | |||
| 696 | } | ||
| 697 | |||
| 698 | </style> |
| ... | @@ -31,7 +31,7 @@ use App\Models\CRMCall; | ... | @@ -31,7 +31,7 @@ use App\Models\CRMCall; |
| 31 | $roclientstr=array();$didlinesstr=array();if(Auth::user()->exten!="")$didlinesstr[]=Auth::user()->exten; | 31 | $roclientstr=array();$didlinesstr=array();if(Auth::user()->exten!="")$didlinesstr[]=Auth::user()->exten; |
| 32 | 32 | ||
| 33 | $roclientlst=$wakka->clientsReadAccess(); | 33 | $roclientlst=$wakka->clientsReadAccess(); |
| 34 | 34 | //print_r($roclientlst); | |
| 35 | if(!empty($roclientlst))foreach($roclientlst as $tclnt)if($tclnt!="") | 35 | if(!empty($roclientlst))foreach($roclientlst as $tclnt)if($tclnt!="") |
| 36 | { | 36 | { |
| 37 | $roclientstr[]="'$tclnt'"; | 37 | $roclientstr[]="'$tclnt'"; |
| ... | @@ -203,30 +203,277 @@ use App\Models\CRMCall; | ... | @@ -203,30 +203,277 @@ use App\Models\CRMCall; |
| 203 | 203 | ||
| 204 | $recstoday=$wakka->getCount("records","dialer_lastcall>='".date("Y-m-d 00:00:00")."' $owclientstr"); | 204 | $recstoday=$wakka->getCount("records","dialer_lastcall>='".date("Y-m-d 00:00:00")."' $owclientstr"); |
| 205 | $recsmonth=$wakka->getCount("records","dialer_lastcall>='".date("Y-m-01 00:00:00")."' $owclientstr"); | 205 | $recsmonth=$wakka->getCount("records","dialer_lastcall>='".date("Y-m-01 00:00:00")."' $owclientstr"); |
| 206 | 206 | ||
| 207 | ?> | 207 | $user=Auth::user()->id; |
| 208 | $role = Auth::user()->usertype; | ||
| 209 | $userId = Auth::user()->id; | ||
| 210 | // role== user | ||
| 211 | // all | ||
| 212 | if($role == 'User'){ | ||
| 213 | |||
| 214 | $TotalCalled=$wakka->getCount("crmcalls","user_id = $userId and created_at > '".date("Y-m-d 03:00:00")."'"); | ||
| 215 | $contactedTotalCalled=$wakka->getCount("crmcalls","userstatus='Contacted' and user_id = $userId and created_at > '".date("Y-m-d 03:00:00")."'"); | ||
| 216 | |||
| 217 | $calllog = DB::table('records') | ||
| 218 | //->join('crmcalls', 'records.dialer_callback', '=', 'crmcalls.usercallback') | ||
| 219 | ->select('records.customer_name', 'records.cust_id', 'records.mobile', 'records.dialer_callback', 'records.status','records.dialer_lastcall','records.id','records.dialer_status','records.client') | ||
| 220 | ->where("records.usr_id",$userId) | ||
| 221 | //->where("records.dialer_substatus","Follow Up") | ||
| 222 | ->where("records.dialer_callback", "!=","0000-00-00 00:00:00") | ||
| 223 | //->where("crmcalls.usercallback", "!=","0000-00-00 00:00:00") | ||
| 224 | //->where("crmcalls.created_at", ">",date("Y-m-d 08:00:00")) | ||
| 225 | //->where("crmcalls_archive.usercallback", "=","records.dialer_callback") | ||
| 226 | //->where("records.dialer_lastcall", "<=","crmcalls_archive.usercallback") | ||
| 227 | ->get(); | ||
| 228 | |||
| 229 | // campaign | ||
| 230 | $campaignTotalCalled=$wakka->getCount("crmcalls","user_id = $userId and client = '$client' and created_at > '".date("Y-m-d 03:00:00")."'"); | ||
| 231 | |||
| 232 | $campaignContactedTotalCalled=$wakka->getCount("crmcalls","userstatus='Contacted' and user_id = $userId and client = '$client' and created_at > '".date("Y-m-d 03:00:00")."'"); | ||
| 233 | |||
| 234 | $campaignFollowupCount = DB::table('records') | ||
| 235 | //->join('crmcalls', 'records.dialer_callback', '=', 'crmcalls.usercallback') | ||
| 236 | ->select('records.customer_name', 'records.cust_id', 'records.mobile', 'records.dialer_callback', 'records.status','records.dialer_lastcall','records.id','records.dialer_status','records.client') | ||
| 237 | ->where("records.usr_id",$userId) | ||
| 238 | //->where("records.dialer_substatus","Follow Up") | ||
| 239 | ->where("records.dialer_callback", "!=","0000-00-00 00:00:00") | ||
| 240 | //->where("crmcalls.usercallback", "!=","0000-00-00 00:00:00") | ||
| 241 | //->where("crmcalls.created_at", ">",date("Y-m-d 08:00:00")) | ||
| 242 | //->where("crmcalls_archive.usercallback", "=","records.dialer_callback") | ||
| 243 | //->where("records.dialer_lastcall", "<=","crmcalls_archive.usercallback") | ||
| 244 | ->where('records.client', '=', $client) | ||
| 245 | ->get(); | ||
| 246 | |||
| 247 | }else if($role == 'Supervisor'){ | ||
| 248 | //supervisor | ||
| 249 | |||
| 250 | $userName = Auth::user()->username; | ||
| 251 | $supervisorUsers=$wakka->LoadAll("select id from users where supervisor='$userName';"); | ||
| 252 | $userIds = []; | ||
| 253 | foreach ($supervisorUsers as $key => $value) $userIds[] = "'".$value['id']."'"; | ||
| 254 | $supervisorUsers = implode(",",$userIds); | ||
| 255 | |||
| 256 | $supervisorTotalCalled = 0; | ||
| 257 | $supervisorContacted = 0; | ||
| 258 | $supervisorCallLog = 0; | ||
| 259 | |||
| 260 | $supervisorCampaignTotalCalled = 0; | ||
| 261 | $supervisorCampaignContacted = 0; | ||
| 262 | $supervisorCampaignCallLog = 0; | ||
| 263 | |||
| 264 | |||
| 265 | if(!empty($supervisorUsers)){ | ||
| 266 | // all | ||
| 267 | $supervisorTotalCalled=$wakka->getCount("crmcalls","user_id IN ($supervisorUsers) and created_at > '".date("Y-m-d 03:00:00")."'"); | ||
| 268 | |||
| 269 | $supervisorContacted=$wakka->getCount("crmcalls","userstatus='Contacted' and user_id IN ($supervisorUsers) and created_at > '".date("Y-m-d 03:00:00")."'"); | ||
| 270 | |||
| 271 | |||
| 272 | $supervisorCallLog = $calllog = DB::table('records') | ||
| 273 | //->join('crmcalls', 'records.dialer_callback', '=', 'crmcalls.usercallback') | ||
| 274 | ->select('records.customer_name', 'records.cust_id', 'records.mobile', 'records.dialer_callback', 'records.status','records.dialer_lastcall','records.id','records.dialer_status','records.client') | ||
| 275 | ->whereIn("records.usr_id",[$supervisorUsers]) | ||
| 276 | //->where("records.dialer_substatus","Follow Up") | ||
| 277 | ->where("records.dialer_callback", "!=","0000-00-00 00:00:00") | ||
| 278 | //->where("crmcalls.usercallback", "!=","0000-00-00 00:00:00") | ||
| 279 | //->where("crmcalls.created_at", ">",date("Y-m-d 08:00:00")) | ||
| 280 | //->where("crmcalls_archive.usercallback", "=","records.dialer_callback") | ||
| 281 | //->where("records.dialer_lastcall", "<=","crmcalls_archive.usercallback") | ||
| 282 | ->get(); | ||
| 283 | |||
| 284 | $supervisorCallLog = count($supervisorCallLog); | ||
| 285 | // campaign | ||
| 286 | |||
| 287 | $supervisorCampaignTotalCalled=$wakka->getCount("crmcalls","user_id IN ($supervisorUsers) and client = '$client' and created_at > '".date("Y-m-d 03:00:00")."'"); | ||
| 288 | |||
| 289 | $supervisorCampaignContacted=$wakka->getCount("crmcalls","userstatus='Contacted' and user_id IN ($supervisorUsers) and client = '$client' and created_at > '".date("Y-m-d 03:00:00")."'"); | ||
| 290 | |||
| 291 | |||
| 292 | $supervisorCampaignCallLog = $calllog = DB::table('records') | ||
| 293 | //->join('crmcalls', 'records.dialer_callback', '=', 'crmcalls.usercallback') | ||
| 294 | ->select('records.customer_name', 'records.cust_id', 'records.mobile', 'records.dialer_callback', 'records.status','records.dialer_lastcall','records.id','records.dialer_status','records.client') | ||
| 295 | ->whereIn("records.usr_id",[$supervisorUsers]) | ||
| 296 | //->where("records.dialer_substatus","Follow Up") | ||
| 297 | ->where("records.dialer_callback", "!=","0000-00-00 00:00:00") | ||
| 298 | //->where("crmcalls.usercallback", "!=","0000-00-00 00:00:00") | ||
| 299 | //->where("crmcalls.created_at", ">",date("Y-m-d 08:00:00")) | ||
| 300 | //->where("crmcalls_archive.usercallback", "=","records.dialer_callback") | ||
| 301 | //->where("records.dialer_lastcall", "<=","crmcalls_archive.usercallback") | ||
| 302 | ->where('records.client', '=', $client) | ||
| 303 | ->get(); | ||
| 304 | $supervisorCampaignCallLog = count($supervisorCampaignCallLog); | ||
| 305 | } | ||
| 208 | 306 | ||
| 307 | } | ||
| 209 | 308 | ||
| 210 | <div class=col-md-3> | 309 | ?> |
| 211 | <div class=col-md-11> | 310 | <?php if($role == 'User'){ ?> |
| 212 | <?php if(sizeof($roclientlst)>0){ ?> | 311 | |
| 213 | <h5> | 312 | <div class="container"> |
| 214 | Campaign | 313 | |
| 215 | <select class='form-control pull-right' id=tcampaign_select onchange='campaignSelect();' style='width:50%'> | 314 | <div class="row"> |
| 216 | <?php foreach($roclientlst as $c){$s="";if($c==$client)$s='selected';echo "<option value='$c' $s>$c</option>";} ?> | 315 | <?php if(sizeof($roclientlst)>0){ ?> |
| 217 | </select> | 316 | <div class="col-md-1" style="padding: 0px;margin: 6px;"> |
| 218 | </h5> | 317 | <h4>Campaign</h4> |
| 219 | <br> | 318 | </div> |
| 220 | <div class=col-md-6> | 319 | <div class=col-md-5> |
| 221 | <select class=form-control id=data_select onchange='dataSelect();'> | 320 | <select class='form-control selcls' id=tcampaign_select onchange='campaignSelect();'> |
| 222 | <?php foreach($dataSelect as $d){$s="";if($d==$prevData)$s='selected';echo "<option value='$d' $s>$d</option>";} ?> | 321 | <?php $s=""; $i = 0; |
| 223 | </select> | 322 | foreach($roclientlst as $c){ |
| 323 | $c=trim($c); | ||
| 324 | if(!empty($c)){ | ||
| 325 | //if($c==$client)$s='selected'; | ||
| 326 | if($i == 0)$s='selected'; | ||
| 327 | echo "<option value='$c' $s>$c</option>"; | ||
| 328 | } | ||
| 329 | } ?> | ||
| 330 | </select> | ||
| 331 | </div> | ||
| 332 | <div class=col-md-5> | ||
| 333 | <select class=form-control id=data_select onchange='dataSelect();' style='display:none'> | ||
| 334 | <?php foreach($dataSelect as $d){$s="";if($d==$prevData)$s='selected';echo "<option value='$d' $s>$d</option>";} ?> | ||
| 335 | </select> | ||
| 336 | </div> | ||
| 337 | <div style='clear:both'></div> | ||
| 338 | <br> | ||
| 339 | <?php } ?> | ||
| 340 | </div> | ||
| 341 | |||
| 342 | |||
| 343 | <div class="row"><div class="col-sm-4"><h4>Total</h4></div></div> | ||
| 344 | |||
| 345 | <div class="row"> | ||
| 346 | <div class="col-sm-4 bot"> | ||
| 347 | <div class="new1" style="color:white;"> | ||
| 348 | <div class="text"> | ||
| 349 | <var><?php echo $TotalCalled; ?></var> | ||
| 350 | </div> | ||
| 351 | Called | ||
| 352 | </div> | ||
| 353 | </div> | ||
| 354 | |||
| 355 | <div class="col-sm-4 bot"> | ||
| 356 | <div class="new1" style="color:white;"> | ||
| 357 | <div class="text"> | ||
| 358 | <var><?php echo $contactedTotalCalled; ?></var> | ||
| 359 | </div> | ||
| 360 | Contacted | ||
| 361 | </div> | ||
| 362 | </div> | ||
| 363 | |||
| 364 | <div class="col-sm-4 bot"> | ||
| 365 | <a href="javascript:;" onclick="loadFollowupData('all');" style="color:white;"> | ||
| 366 | <div class="new1" style="color:white;"> | ||
| 367 | <div class="text"> | ||
| 368 | <var><?php echo count($calllog); ?></var> | ||
| 369 | </div> | ||
| 370 | Follow Up | ||
| 224 | </div> | 371 | </div> |
| 225 | <div style='clear:both'></div> | 372 | </a> |
| 226 | <br> | 373 | </div> |
| 227 | <?php } ?> | 374 | </div> |
| 375 | |||
| 376 | <div class="row"><div class="col-sm-4"><h4>Campaign Wise</h4></div></div> | ||
| 377 | |||
| 378 | <div class="row"> | ||
| 379 | <div class="col-sm-4 bot"> | ||
| 380 | <div class="new1" style="color:white;"> | ||
| 381 | <div class="text"> | ||
| 382 | <var><?php echo $campaignTotalCalled; ?></var> | ||
| 383 | </div> | ||
| 384 | Called | ||
| 385 | </div> | ||
| 386 | </div> | ||
| 387 | |||
| 388 | <div class="col-sm-4 bot"> | ||
| 389 | <div class="new1" style="color:white;"> | ||
| 390 | <div class="text"> | ||
| 391 | <var><?php echo $campaignContactedTotalCalled; ?></var> | ||
| 392 | </div> | ||
| 393 | Contacted | ||
| 394 | </div> | ||
| 395 | </div> | ||
| 396 | |||
| 397 | <div class="col-sm-4 bot"> | ||
| 398 | <a href="javascript:;" onclick="loadFollowupData('campaign');" style="color:white;"> | ||
| 399 | <div class="new1" style="color:white;"> | ||
| 400 | <div class="text"> | ||
| 401 | <var><?php echo count($campaignFollowupCount); ?></var> | ||
| 402 | </div> | ||
| 403 | Follow Up | ||
| 404 | </div> | ||
| 405 | </a> | ||
| 406 | </div> | ||
| 407 | |||
| 408 | </div> | ||
| 409 | <!-- <div class="row"><div class="col-sm-4"><h4>Total</h4></div></div> | ||
| 410 | <div class="row"> | ||
| 411 | <div class="col-sm-4"> | ||
| 412 | |||
| 413 | <div class="hero-widget well well-sm"> | ||
| 414 | <div class="text"> | ||
| 415 | <var><?php echo $TotalCalled; ?></var> | ||
| 416 | <label class="text-muted">Called</label> | ||
| 417 | </div> | ||
| 418 | </div> | ||
| 419 | </div> | ||
| 420 | <div class="col-sm-4"> | ||
| 421 | <div class="hero-widget well well-sm"> | ||
| 422 | <div class="text"> | ||
| 423 | <var ><?php echo $contactedTotalCalled; ?></var> | ||
| 424 | <label class="text-muted">Contacted</label> | ||
| 425 | </div> | ||
| 426 | </div> | ||
| 427 | </div> | ||
| 428 | <div class="col-sm-4"> | ||
| 429 | <div class="hero-widget well well-sm"> | ||
| 430 | <div class="text"> | ||
| 431 | <var><?php echo count($calllog); ?></var> | ||
| 432 | <label class="text-muted"> | ||
| 433 | <!-- <a href="#" onclick="menuAction('dialer/loadFollowupData');return false;">Follow Up</a>Follow Up | ||
| 434 | </label> | ||
| 435 | </div> | ||
| 436 | </div> | ||
| 437 | </div> | ||
| 438 | |||
| 439 | </div> | ||
| 440 | <div class="row"><div class="col-sm-4"><h4>Campaign Wise</h4></div></div> | ||
| 441 | |||
| 442 | <div class="row"> | ||
| 443 | <div class="col-sm-4"> | ||
| 444 | <div class="hero-widget well well-sm"> | ||
| 445 | <div class="text"> | ||
| 446 | <var><?php echo $campaignTotalCalled; ?></var> | ||
| 447 | <label class="text-muted">Called</label> | ||
| 448 | </div> | ||
| 449 | </div> | ||
| 450 | </div> | ||
| 451 | <div class="col-sm-4"> | ||
| 452 | <div class="hero-widget well well-sm"> | ||
| 453 | <div class="text"> | ||
| 454 | <var ><?php echo $campaignContactedTotalCalled; ?></var> | ||
| 455 | <label class="text-muted">Contacted</label> | ||
| 456 | </div> | ||
| 457 | </div> | ||
| 458 | </div> | ||
| 459 | <div class="col-sm-4"> | ||
| 460 | <div class="hero-widget well well-sm"> | ||
| 461 | <div class="text"> | ||
| 462 | <var><?php echo count($campaignFollowupCount); ?></var> | ||
| 463 | <label class="text-muted"><!-- <a href="#" onclick="menuAction('dialer/loadFollowupData');return false;">Follow Up</a>Follow Up</label> | ||
| 464 | </div> | ||
| 465 | </div> | ||
| 466 | </div> | ||
| 467 | |||
| 228 | 468 | ||
| 229 | <h5> | 469 | </div> --> |
| 470 | </div> | ||
| 471 | |||
| 472 | |||
| 473 | <div class=col-md-3 style="display: none" > | ||
| 474 | <div class=col-md-11> | ||
| 475 | |||
| 476 | <!-- <h5> | ||
| 230 | Buckets | 477 | Buckets |
| 231 | <span class='label label-small label-default pull-right'> | 478 | <span class='label label-small label-default pull-right'> |
| 232 | <a href=# onclick="dialerLoadData('CallsMonth','','',1,'','');return false;" style='color:#fff;font-size:12px'> | 479 | <a href=# onclick="dialerLoadData('CallsMonth','','',1,'','');return false;" style='color:#fff;font-size:12px'> |
| ... | @@ -239,15 +486,15 @@ use App\Models\CRMCall; | ... | @@ -239,15 +486,15 @@ use App\Models\CRMCall; |
| 239 | </a> | 486 | </a> |
| 240 | </span> | 487 | </span> |
| 241 | 488 | ||
| 242 | </h5> | 489 | </h5> |
| 243 | <div style='clear:both'></div> | 490 | <div style='clear:both'></div> |
| 244 | <hr><br> | 491 | <hr><br>--> |
| 245 | <?php | 492 | <?php |
| 246 | //print_r($legalstatuses); | 493 | //print_r($legalstatuses); |
| 247 | //print_r($currentstatuses); | 494 | //print_r($currentstatuses); |
| 248 | 495 | ||
| 249 | ?> | 496 | ?> |
| 250 | <div class=col-md-6> | 497 | <!-- <div class=col-md-6> |
| 251 | <select class=form-control id=legalstatus_select onchange='bucketSelect();'> | 498 | <select class=form-control id=legalstatus_select onchange='bucketSelect();'> |
| 252 | <option value='PRIMARY'>PRIMARY</option> | 499 | <option value='PRIMARY'>PRIMARY</option> |
| 253 | <option value='SECONDARY'>SECONDARY</option> | 500 | <option value='SECONDARY'>SECONDARY</option> |
| ... | @@ -258,70 +505,78 @@ use App\Models\CRMCall; | ... | @@ -258,70 +505,78 @@ use App\Models\CRMCall; |
| 258 | <option value='ACTIVE'>ACTIVE</option> | 505 | <option value='ACTIVE'>ACTIVE</option> |
| 259 | <option value='PASSIVE'>PASSIVE</option> | 506 | <option value='PASSIVE'>PASSIVE</option> |
| 260 | </select> | 507 | </select> |
| 261 | </div> | 508 | </div> --> |
| 262 | <div style='clear:both'></div> | 509 | <div style='clear:both'></div> |
| 263 | |||
| 264 | <ul style="list-style:none"> | 510 | <ul style="list-style:none"> |
| 265 | <li class="notify_alert"> | 511 | <!-- <li class="notify_alert"> |
| 266 | <span><a href=# onclick="dialerLoadData('CurrentQueue','','',1,'','');return false;">CurrentQueue</a></span> | 512 | <span><a href=# onclick="dialerLoadData('CurrentQueue','','',1,'','');return false;">CurrentQueue</a></span> |
| 267 | <!--<span class="label label-small pull-right" > | 513 | <span class="label label-small pull-right" > |
| 268 | 0 | 514 | 0 |
| 269 | </span>--> | 515 | </span> |
| 270 | </li> | 516 | </li> --> |
| 271 | <li class="notify_alert"> | 517 | <!-- <li class="notify_alert"> |
| 272 | <span><a href=# onclick="dialerLoadData('MissedCalls','','',1,'','');return false;">MissedCalls</a></span> | 518 | <span><a href=# onclick="dialerLoadData('MissedCalls','','',1,'','');return false;">MissedCalls</a></span> |
| 273 | <span class="label label-small label-primary pull-right" > | 519 | <span class="label label-small label-primary pull-right" > |
| 274 | {!!$MissedCalls!!} | 520 | {!!$MissedCalls!!} |
| 275 | </span> | 521 | </span> |
| 276 | </li> | 522 | </li> --> |
| 277 | <li class="notify_alert"> | 523 | <!-- <li class="notify_alert"> |
| 278 | <span><a href=# onclick="dialerLoadData('Priority','','',1,'','');return false;">Priority</a></span> | 524 | <span><a href=# onclick="dialerLoadData('Priority','','',1,'','');return false;">Priority</a></span> |
| 279 | <span class="label label-small label-info pull-right" > | 525 | <span class="label label-small label-info pull-right" > |
| 280 | {!!$Priority!!} | 526 | {!!$Priority!!} |
| 281 | </span> | 527 | </span> |
| 282 | </li> | 528 | </li> --> |
| 529 | <li class="notify_alert"> | ||
| 530 | <span><a href=# onclick="dialerLoadData('FollowUp,','','',1,'','');return false;">FollowUp</a></span> | ||
| 531 | <span class="label label-small label-default pull-right" > | ||
| 532 | {!!$FollowUp!!} | ||
| 533 | </span> | ||
| 534 | </li> | ||
| 283 | <li class="notify_alert"> | 535 | <li class="notify_alert"> |
| 284 | <span><a href=# onclick="dialerLoadData('TotalData','{!!$currentStatus!!}','{!!$legalStatus!!}',1,'','');return false;">TotalData</a></span> | 536 | <!-- <span><a href=# onclick="dialerLoadData('TotalData','{!!$currentStatus!!}','{!!$legalStatus!!}',1,'','');return false;">TotalData</a></span> --> |
| 537 | <span>TotalData</span> | ||
| 285 | <span class="label label-small label-default pull-right" > | 538 | <span class="label label-small label-default pull-right" > |
| 286 | {!!$TotalData!!} | 539 | {!!$TotalData!!} |
| 287 | </span> | 540 | </span> |
| 288 | </li> | 541 | </li> |
| 289 | <li class="notify_alert"> | 542 | <!-- <li class="notify_alert"> |
| 290 | <span><a href=# onclick="dialerLoadData('NotCalled','{!!$currentStatus!!}','{!!$legalStatus!!}',1,'','');return false;">NotCalled</a></span> | 543 | <span><a href=# onclick="dialerLoadData('NotCalled','{!!$currentStatus!!}','{!!$legalStatus!!}',1,'','');return false;">NotCalled</a></span> |
| 291 | <span class="label label-small label-default pull-right" > | 544 | <span class="label label-small label-default pull-right" > |
| 292 | {!!$NotCalled!!} | 545 | {!!$NotCalled!!} |
| 293 | </span> | 546 | </span> |
| 294 | </li> | 547 | </li> --> |
| 295 | <li class="notify_alert"> | 548 | <li class="notify_alert"> |
| 296 | <span><a href=# onclick="dialerLoadData('Called','','',1,'','');return false;">Called</a></span> | 549 | <!-- <span><a href=# onclick="dialerLoadData('Called','','',1,'','');return false;">Called</a></span> --> |
| 550 | <span>Called</span> | ||
| 297 | <span class="label label-small label-success pull-right" > | 551 | <span class="label label-small label-success pull-right" > |
| 298 | {!!$TotalCalled!!} | 552 | {!!$TotalCalled!!} |
| 299 | </span> | 553 | </span> |
| 300 | </li> | 554 | </li> |
| 301 | <li class="notify_alert"> | 555 | <li class="notify_alert"> |
| 302 | <span><a href=# onclick="return false;">Contacted</a></span> | 556 | <!-- <span><a href=# onclick="return false;">Contacted</a></span> --> |
| 557 | <span>Contacted</span> | ||
| 303 | <span class="label label-small label-success pull-right" id=contactedcnt_span> | 558 | <span class="label label-small label-success pull-right" id=contactedcnt_span> |
| 304 | 0 | 559 | 0 |
| 305 | </span> | 560 | </span> |
| 306 | </li> | 561 | </li> |
| 307 | <li class="notify_alert"> | 562 | <!-- <li class="notify_alert"> |
| 308 | <span><a href=# onclick="dialerLoadData('Flagged-Called','{!!$currentStatus!!}','{!!$legalStatus!!}',1,'','');return false;">Flagged-Called</a></span> | 563 | <span><a href=# onclick="dialerLoadData('Flagged-Called','{!!$currentStatus!!}','{!!$legalStatus!!}',1,'','');return false;">Flagged-Called</a></span> |
| 309 | <span class="label label-small label-success pull-right" > | 564 | <span class="label label-small label-success pull-right" > |
| 310 | {!!$Flagged!!} | 565 | {!!$Flagged!!} |
| 311 | </span> | 566 | </span> |
| 312 | </li> | 567 | </li> --> |
| 313 | <li class="notify_alert"> | 568 | <!-- <li class="notify_alert"> |
| 314 | <span><a href=# onclick="dialerLoadData('Flagged-Notcalled','{!!$currentStatus!!}','{!!$legalStatus!!}',1,'','');return false;">Flagged-NotCalled</a></span> | 569 | <span><a href=# onclick="dialerLoadData('Flagged-Notcalled','{!!$currentStatus!!}','{!!$legalStatus!!}',1,'','');return false;">Flagged-NotCalled</a></span> |
| 315 | <span class="label label-small label-warning pull-right" > | 570 | <span class="label label-small label-warning pull-right" > |
| 316 | {!!$NotCalledFlagged!!} | 571 | {!!$NotCalledFlagged!!} |
| 317 | </span> | 572 | </span> |
| 318 | </li> | 573 | </li> --> |
| 319 | <li class="notify_alert"> | 574 | <!-- <li class="notify_alert"> |
| 320 | <span><a href=# onclick="dialerLoadData('today-birthday','{!!$currentStatus!!}','{!!$legalStatus!!}',1,'','');return false;">Today Birthday</a></span> | 575 | <span><a href=# onclick="dialerLoadData('today-birthday','{!!$currentStatus!!}','{!!$legalStatus!!}',1,'','');return false;">Today Birthday</a></span> |
| 321 | <span class="label label-small label-warning pull-right" > | 576 | <span class="label label-small label-warning pull-right" > |
| 322 | {!!$todaybirthday!!} | 577 | {!!$todaybirthday!!} |
| 323 | </span> | 578 | </span> |
| 324 | </li> | 579 | </li> --> |
| 325 | 580 | ||
| 326 | <hr><br> | 581 | <hr><br> |
| 327 | 582 | ||
| ... | @@ -343,7 +598,7 @@ use App\Models\CRMCall; | ... | @@ -343,7 +598,7 @@ use App\Models\CRMCall; |
| 343 | if($disp['dialer_status']) | 598 | if($disp['dialer_status']) |
| 344 | { | 599 | { |
| 345 | ?> | 600 | ?> |
| 346 | <li class="notify_alert bucketliitem {!!$class!!}"> | 601 | <li class="notify_alert bucketliitem sdfsdf {!!$class!!}"> |
| 347 | <span><a href=# onclick="dialerLoadData('{!!$disp['dialer_status']!!}','{!!$disp['currentstatus']!!}','{!!$disp['legalstatus']!!}',1,'','');return false;">{!!$disp['dialer_status']!!}</a></span> | 602 | <span><a href=# onclick="dialerLoadData('{!!$disp['dialer_status']!!}','{!!$disp['currentstatus']!!}','{!!$disp['legalstatus']!!}',1,'','');return false;">{!!$disp['dialer_status']!!}</a></span> |
| 348 | <span class="label label-small label-success pull-right" > | 603 | <span class="label label-small label-success pull-right" > |
| 349 | {!!$disp['cnt']!!} | 604 | {!!$disp['cnt']!!} |
| ... | @@ -370,7 +625,7 @@ use App\Models\CRMCall; | ... | @@ -370,7 +625,7 @@ use App\Models\CRMCall; |
| 370 | if($disp['old_dialer_status']) | 625 | if($disp['old_dialer_status']) |
| 371 | { | 626 | { |
| 372 | ?> | 627 | ?> |
| 373 | <li class="notify_alert bucketliitem {!!$class!!}"> | 628 | <li class="notify_alert bucketliitem test {!!$class!!}"> |
| 374 | <span><a href=# onclick="dialerLoadData('{!!$disp['old_dialer_status']!!}','{!!$disp['currentstatus']!!}','{!!$disp['legalstatus']!!}',1,'','');return false;">{!!$disp['old_dialer_status']!!}</a></span> | 629 | <span><a href=# onclick="dialerLoadData('{!!$disp['old_dialer_status']!!}','{!!$disp['currentstatus']!!}','{!!$disp['legalstatus']!!}',1,'','');return false;">{!!$disp['old_dialer_status']!!}</a></span> |
| 375 | <span class="label label-small label-success pull-right" > | 630 | <span class="label label-small label-success pull-right" > |
| 376 | {!!$disp['cnt']!!} | 631 | {!!$disp['cnt']!!} |
| ... | @@ -386,13 +641,19 @@ use App\Models\CRMCall; | ... | @@ -386,13 +641,19 @@ use App\Models\CRMCall; |
| 386 | echo "<script>$('#contactedcnt_span').html('$contacted');</script>"; | 641 | echo "<script>$('#contactedcnt_span').html('$contacted');</script>"; |
| 387 | ?> | 642 | ?> |
| 388 | </ul> | 643 | </ul> |
| 389 | </div> | 644 | </div> |
| 390 | </div> | 645 | </div> |
| 391 | <div class=col-md-9 id=bucketlistdiv> | 646 | <!-- <div class=col-md-9 id=bucketlistdiv></div> |
| 392 | </div> | 647 | --><div style='clear:both'></div> |
| 393 | <div style='clear:both'></div> | 648 | <?php }else if($role == 'Admin'){ ?> |
| 649 | |||
| 650 | @include("layout/module/dashboard/adminHomePage") | ||
| 394 | 651 | ||
| 652 | <?php }else if($role == 'Supervisor'){ ?> | ||
| 395 | 653 | ||
| 654 | @include("layout/module/dashboard/supervisorHomePage") | ||
| 655 | |||
| 656 | <?php } ?> | ||
| 396 | 657 | ||
| 397 | <script> | 658 | <script> |
| 398 | 659 | ||
| ... | @@ -412,6 +673,13 @@ $("#legalstatus_select").val('<?=$legalStatus?>'); | ... | @@ -412,6 +673,13 @@ $("#legalstatus_select").val('<?=$legalStatus?>'); |
| 412 | $("#currentstatus_select").val('<?=$currentStatus?>'); | 673 | $("#currentstatus_select").val('<?=$currentStatus?>'); |
| 413 | <?php }?> | 674 | <?php }?> |
| 414 | 675 | ||
| 676 | function loadFollowupData(val) | ||
| 677 | { | ||
| 678 | var menu = "dialer/loadFollowupData"; | ||
| 679 | doAjax(menu+"?client="+$("#tcampaign_select").val()+"&selection="+val,'','content','ajax_'+menu,'singlethis','GET'); | ||
| 680 | } | ||
| 681 | |||
| 682 | |||
| 415 | function campaignSelect() | 683 | function campaignSelect() |
| 416 | { | 684 | { |
| 417 | var dashlet="Dialer"; | 685 | var dashlet="Dialer"; |
| ... | @@ -452,3 +720,48 @@ function dialerLoadData(listname,currentstatus,legalstatus,page,skey,stxt) | ... | @@ -452,3 +720,48 @@ function dialerLoadData(listname,currentstatus,legalstatus,page,skey,stxt) |
| 452 | } | 720 | } |
| 453 | dialerLoadData('CurrentQueue','','',1,'',''); | 721 | dialerLoadData('CurrentQueue','','',1,'',''); |
| 454 | </script> | 722 | </script> |
| 723 | <style> | ||
| 724 | .hero-widget { text-align: center; padding-top: 20px; padding-bottom: 20px; text-shadow: 1px 1px 2px blue, 0 0 25px blue, 0 0 5px darkblue; } | ||
| 725 | .hero-widget .icon { display: block; font-size: 96px; line-height: 96px; margin-bottom: 10px; text-align: center; } | ||
| 726 | .hero-widget var { display: block; height: 64px; font-size: 64px; line-height: 64px; font-style: normal; } | ||
| 727 | .hero-widget label { font-size: 17px; } | ||
| 728 | .hero-widget .options { margin-top: 10px; } | ||
| 729 | .well { background-color : #040404 } | ||
| 730 | .acolor { color: #000000;} | ||
| 731 | |||
| 732 | .new1 .icon { display: block; font-size: 96px; line-height: 96px; margin-bottom: 10px; text-align: center; } | ||
| 733 | |||
| 734 | .bot { padding-bottom: 20px !important; } | ||
| 735 | .new1 var { display: block; height: 96px; font-size: 96px; line-height: 96px; font-style: normal; } | ||
| 736 | </style> | ||
| 737 | |||
| 738 | |||
| 739 | <style> | ||
| 740 | .new1 { | ||
| 741 | /*width: 200px; | ||
| 742 | height: auto;*/ | ||
| 743 | padding: 15px; | ||
| 744 | background-color: #f6f7fb; | ||
| 745 | box-shadow: 10px 10px 5px grey; | ||
| 746 | font-size:30px; | ||
| 747 | border: 2px solid red; | ||
| 748 | border-radius: 50px 20px; | ||
| 749 | text-align: center; | ||
| 750 | |||
| 751 | /* text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;*/ | ||
| 752 | text-shadow: 1px 1px 2px blue, 0 0 25px blue, 0 0 5px darkblue; | ||
| 753 | } | ||
| 754 | |||
| 755 | .selcls { | ||
| 756 | /* padding: 9px; */ | ||
| 757 | border: solid 1px #517B97; | ||
| 758 | outline: 0; | ||
| 759 | background: -webkit-gradient(linear, left top, left 25, from(#FFFFFF), color-stop(4%, #CAD9E3), to(#FFFFFF)); | ||
| 760 | background: -moz-linear-gradient(top, #FFFFFF, #CAD9E3 1px, #FFFFFF 25px); | ||
| 761 | box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px; | ||
| 762 | -moz-box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px; | ||
| 763 | -webkit-box-shadow: rgba(0,0,0, 0.1) 0px 0px 8px; | ||
| 764 | |||
| 765 | } | ||
| 766 | |||
| 767 | </style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -142,7 +142,7 @@ $user=Auth::user(); | ... | @@ -142,7 +142,7 @@ $user=Auth::user(); |
| 142 | } | 142 | } |
| 143 | </style> | 143 | </style> |
| 144 | 144 | ||
| 145 | <input type="hidden" id="userLoginRole" value="{{Auth::user()->usertype}}"> | 145 | |
| 146 | <div class="layout-app"><!-- row-app --> | 146 | <div class="layout-app"><!-- row-app --> |
| 147 | <div class="row row-app"> | 147 | <div class="row row-app"> |
| 148 | 148 | ... | ... |
| 1 | <div class="container"> | ||
| 2 | <div class="row"> | ||
| 3 | <?php if(sizeof($roclientlst)>0){ ?> | ||
| 4 | <div class="col-md-1" style="padding: 0px;margin: 6px;"> | ||
| 5 | <h4>Campaign</h4> | ||
| 6 | </div> | ||
| 7 | <div class=col-md-5> | ||
| 8 | <select class='form-control selcls' id=tcampaign_select onchange='campaignSelect();'> | ||
| 9 | <?php $s=""; $i = 0; | ||
| 10 | foreach($roclientlst as $c){ | ||
| 11 | $c=trim($c); | ||
| 12 | if(!empty($c)){ | ||
| 13 | //if($c==$client)$s='selected'; | ||
| 14 | if($i == 0)$s='selected'; | ||
| 15 | echo "<option value='$c' $s>$c</option>"; | ||
| 16 | } | ||
| 17 | } ?> | ||
| 18 | </select> | ||
| 19 | </div> | ||
| 20 | <div class=col-md-5> | ||
| 21 | <select class=form-control id=data_select onchange='dataSelect();' style='display:none'> | ||
| 22 | <?php foreach($dataSelect as $d){$s="";if($d==$prevData)$s='selected';echo "<option value='$d' $s>$d</option>";} ?> | ||
| 23 | </select> | ||
| 24 | </div> | ||
| 25 | <div style='clear:both'></div> | ||
| 26 | <br> | ||
| 27 | <?php } ?> | ||
| 28 | </div> | ||
| 29 | |||
| 30 | |||
| 31 | <div class="row"><div class="col-sm-4"><h4>Total</h4></div></div> | ||
| 32 | |||
| 33 | <div class="row"> | ||
| 34 | <div class="col-sm-4 bot"> | ||
| 35 | <div class="new1" style="color:white;"> | ||
| 36 | <div class="text"> | ||
| 37 | <var><?php echo $supervisorTotalCalled; ?></var> | ||
| 38 | </div> | ||
| 39 | Called | ||
| 40 | </div> | ||
| 41 | </div> | ||
| 42 | |||
| 43 | <div class="col-sm-4 bot"> | ||
| 44 | <div class="new1" style="color:white;"> | ||
| 45 | <div class="text"> | ||
| 46 | <var><?php echo $supervisorContacted; ?></var> | ||
| 47 | </div> | ||
| 48 | Contacted | ||
| 49 | </div> | ||
| 50 | </div> | ||
| 51 | |||
| 52 | <div class="col-sm-4 bot"> | ||
| 53 | <a href="javascript:;" onclick="loadFollowupData('all');" style="color:white;"> | ||
| 54 | <div class="new1" style="color:white;"> | ||
| 55 | <div class="text"> | ||
| 56 | <var><?php echo $supervisorCallLog; ?></var> | ||
| 57 | </div> | ||
| 58 | Follow Up | ||
| 59 | </div> | ||
| 60 | </a> | ||
| 61 | </div> | ||
| 62 | </div> | ||
| 63 | |||
| 64 | <div class="row"><div class="col-sm-4"><h4>Campaign Wise</h4></div></div> | ||
| 65 | |||
| 66 | <div class="row"> | ||
| 67 | <div class="col-sm-4 bot"> | ||
| 68 | <div class="new1" style="color:white;"> | ||
| 69 | <div class="text"> | ||
| 70 | <var><?php echo $supervisorCampaignTotalCalled; ?></var> | ||
| 71 | </div> | ||
| 72 | Called | ||
| 73 | </div> | ||
| 74 | </div> | ||
| 75 | |||
| 76 | <div class="col-sm-4 bot"> | ||
| 77 | <div class="new1" style="color:white;"> | ||
| 78 | <div class="text"> | ||
| 79 | <var><?php echo $supervisorCampaignContacted; ?></var> | ||
| 80 | </div> | ||
| 81 | Contacted | ||
| 82 | </div> | ||
| 83 | </div> | ||
| 84 | |||
| 85 | <div class="col-sm-4 bot"> | ||
| 86 | <a href="javascript:;" onclick="loadFollowupData('campaign');" style="color:white;"> | ||
| 87 | <div class="new1" style="color:white;"> | ||
| 88 | <div class="text"> | ||
| 89 | <var><?php echo $supervisorCampaignCallLog; ?></var> | ||
| 90 | </div> | ||
| 91 | Follow Up | ||
| 92 | </div> | ||
| 93 | </a> | ||
| 94 | </div> | ||
| 95 | |||
| 96 | </div> | ||
| 97 | </div> |
| ... | @@ -99,8 +99,8 @@ $prev_close = 0; | ... | @@ -99,8 +99,8 @@ $prev_close = 0; |
| 99 | 99 | ||
| 100 | foreach($alist as $aline) | 100 | foreach($alist as $aline) |
| 101 | { | 101 | { |
| 102 | // if($prev_user != $aline->user_id || $prev_close <= $aline->ts_Wait) | 102 | if($prev_user != $aline->user_id || $prev_close <= $aline->ts_Wait) |
| 103 | // { | 103 | { |
| 104 | $userid=$aline->user_id; | 104 | $userid=$aline->user_id; |
| 105 | 105 | ||
| 106 | $talktime=$aline->talkSec+$aline->recstartSec+$aline->recendSec; | 106 | $talktime=$aline->talkSec+$aline->recstartSec+$aline->recendSec; |
| ... | @@ -135,7 +135,7 @@ foreach($alist as $aline) | ... | @@ -135,7 +135,7 @@ foreach($alist as $aline) |
| 135 | $reportarray[$userid]["I-Dispo"]+=$aline->dispoSec/1000; | 135 | $reportarray[$userid]["I-Dispo"]+=$aline->dispoSec/1000; |
| 136 | $reportarray[$userid]["IncomingTotal"]+=($aline->callSec/1000)+($talktime/1000)+($aline->dispoSec/1000); | 136 | $reportarray[$userid]["IncomingTotal"]+=($aline->callSec/1000)+($talktime/1000)+($aline->dispoSec/1000); |
| 137 | } | 137 | } |
| 138 | // } | 138 | } |
| 139 | $reportarray[$userid]["CallCount"]++; | 139 | $reportarray[$userid]["CallCount"]++; |
| 140 | $prev_close = $aline->ts_Close;//-ts_Wait | 140 | $prev_close = $aline->ts_Close;//-ts_Wait |
| 141 | $prev_user = $aline->user_id;//-ts_Wait | 141 | $prev_user = $aline->user_id;//-ts_Wait |
| ... | @@ -351,7 +351,9 @@ function secToDuration($sec) { | ... | @@ -351,7 +351,9 @@ function secToDuration($sec) { |
| 351 | <div class=innerAll> | 351 | <div class=innerAll> |
| 352 | <h4 style="float:left;width:50%;margin:10px 0;">Login Report <small>(Agent Time Report)</small></h4> | 352 | <h4 style="float:left;width:50%;margin:10px 0;">Login Report <small>(Agent Time Report)</small></h4> |
| 353 | <div style="float:right;width:50%"> | 353 | <div style="float:right;width:50%"> |
| 354 | <button class="pull-right btn btn-sm btn-default" onclick='dlAgentlogXls();return false;' title='Download'><i class='fa fa-download'></i> Download</button> | 354 | <?php if(Auth::user()->username=='admin'){ ?> |
| 355 | <button class="pull-right btn btn-sm btn-default" onclick='dlAgentlogXls();return false;' title='Download'><i class='fa fa-download'></i> Download</button> | ||
| 356 | <?php } ?> | ||
| 355 | </div> | 357 | </div> |
| 356 | <div style="clear:both"></div> | 358 | <div style="clear:both"></div> |
| 357 | <hr style="margin-bottom: 5px;"> | 359 | <hr style="margin-bottom: 5px;"> | ... | ... |
| ... | @@ -354,7 +354,7 @@ function secToDuration($sec) { | ... | @@ -354,7 +354,7 @@ function secToDuration($sec) { |
| 354 | <div class=innerAll> | 354 | <div class=innerAll> |
| 355 | <h4 style="float:left;width:50%;margin:10px 0;">Login Report <small>(Agent Time Average Report)</small></h4> | 355 | <h4 style="float:left;width:50%;margin:10px 0;">Login Report <small>(Agent Time Average Report)</small></h4> |
| 356 | <div style="float:right;width:50%"> | 356 | <div style="float:right;width:50%"> |
| 357 | <button class="pull-right btn btn-sm btn-default" onclick='dlAgentlogXls();return false;' title='Download'><i class='fa fa-download'></i> Download</button> | 357 | <!-- <button class="pull-right btn btn-sm btn-default" onclick='dlAgentlogXls();return false;' title='Download'><i class='fa fa-download'></i> Download</button> --> |
| 358 | </div> | 358 | </div> |
| 359 | <div style="clear:both"></div> | 359 | <div style="clear:both"></div> |
| 360 | <hr style="margin-bottom: 5px;"> | 360 | <hr style="margin-bottom: 5px;"> | ... | ... |
| ... | @@ -18,7 +18,7 @@ $value =(isset($_GET['value'])) ? $_GET['value'] : ""; | ... | @@ -18,7 +18,7 @@ $value =(isset($_GET['value'])) ? $_GET['value'] : ""; |
| 18 | 18 | ||
| 19 | $logdate =(isset($_GET['logdate'])) ? strtotime($_GET['logdate']." ".$logtime.":00:00") : strtotime(date("Y-m-d")." 07:00:00"); | 19 | $logdate =(isset($_GET['logdate'])) ? strtotime($_GET['logdate']." ".$logtime.":00:00") : strtotime(date("Y-m-d")." 07:00:00"); |
| 20 | //echo $logdate; | 20 | //echo $logdate; |
| 21 | $logdateto =(isset($_GET['logdateto']))? strtotime($_GET['logdateto']." ".$logtimeto.":00:00") : strtotime(date("Y-m-d")." 22:00:00"); | 21 | $logdateto =(isset($_GET['logdate']))? strtotime($_GET['logdate']." ".$logtimeto.":00:00") : strtotime(date("Y-m-d")." 22:00:00"); |
| 22 | 22 | ||
| 23 | //echo $logdateto; | 23 | //echo $logdateto; |
| 24 | 24 | ||
| ... | @@ -132,7 +132,7 @@ if($dashboarduser->usertype != 'Admin') | ... | @@ -132,7 +132,7 @@ if($dashboarduser->usertype != 'Admin') |
| 132 | $roclientstr[]="$tclnt"; | 132 | $roclientstr[]="$tclnt"; |
| 133 | 133 | ||
| 134 | $mastersdata=$wakka->getCompanyMaster($tclnt); | 134 | $mastersdata=$wakka->getCompanyMaster($tclnt); |
| 135 | if(!empty($mastersdata["DialerDID"]))$didlinesstr[]=substr($mastersdata["DialerDID"],0,-2); | 135 | if(!empty($mastersdata["DialerDID"]))$didlinesstr[]=$mastersdata["DialerDID"]; |
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | $alist=$alist->where(function ($query) use($roclientstr,$uidlist,$didlinesstr){ | 138 | $alist=$alist->where(function ($query) use($roclientstr,$uidlist,$didlinesstr){ |
| ... | @@ -197,9 +197,8 @@ if(Input::has("dllogxls")) | ... | @@ -197,9 +197,8 @@ if(Input::has("dllogxls")) |
| 197 | $fieldsarr[$tcol++]='#'; | 197 | $fieldsarr[$tcol++]='#'; |
| 198 | $fieldsarr[$tcol++]='Start'; | 198 | $fieldsarr[$tcol++]='Start'; |
| 199 | $fieldsarr[$tcol++]='Length'; | 199 | $fieldsarr[$tcol++]='Length'; |
| 200 | $fieldsarr[$tcol++]='RM code'; | 200 | $fieldsarr[$tcol++]='User'; |
| 201 | $fieldsarr[$tcol++]='RM Name'; | 201 | $fieldsarr[$tcol++]='Name'; |
| 202 | $fieldsarr[$tcol++]='Team Manager'; | ||
| 203 | $fieldsarr[$tcol++]='Dispo'; | 202 | $fieldsarr[$tcol++]='Dispo'; |
| 204 | $fieldsarr[$tcol++]='SubDispo'; | 203 | $fieldsarr[$tcol++]='SubDispo'; |
| 205 | $fieldsarr[$tcol++]='CB'; | 204 | $fieldsarr[$tcol++]='CB'; |
| ... | @@ -267,14 +266,6 @@ if(Input::has("dllogxls")) | ... | @@ -267,14 +266,6 @@ if(Input::has("dllogxls")) |
| 267 | if(!isset($userarr[$aline->user_id])&&$aline->user_id>0)$userarr[$aline->user_id]=User::find($aline->user_id); | 266 | if(!isset($userarr[$aline->user_id])&&$aline->user_id>0)$userarr[$aline->user_id]=User::find($aline->user_id); |
| 268 | $dispname="";if(isset($userarr[$aline->user_id]))$dispname=$userarr[$aline->user_id]->dispname(); | 267 | $dispname="";if(isset($userarr[$aline->user_id]))$dispname=$userarr[$aline->user_id]->dispname(); |
| 269 | $username="";if(isset($userarr[$aline->user_id]))$username=$userarr[$aline->user_id]->username; | 268 | $username="";if(isset($userarr[$aline->user_id]))$username=$userarr[$aline->user_id]->username; |
| 270 | $supervisorId="";if(isset($userarr[$aline->user_id]))$supervisorId=$userarr[$aline->user_id]->supervisor; | ||
| 271 | $supervisorName=""; | ||
| 272 | if(isset($supervisorId)){ | ||
| 273 | $superName=User::where('username','=',$supervisorId)->get(); | ||
| 274 | foreach ($superName as $supervisorname) { | ||
| 275 | $supervisorName=$supervisorname->fullname; | ||
| 276 | } | ||
| 277 | } | ||
| 278 | 269 | ||
| 279 | $recstr=''; | 270 | $recstr=''; |
| 280 | if($dashboarduser->moduleACL("Dialer",false,false,true)) | 271 | if($dashboarduser->moduleACL("Dialer",false,false,true)) |
| ... | @@ -289,7 +280,6 @@ if(Input::has("dllogxls")) | ... | @@ -289,7 +280,6 @@ if(Input::has("dllogxls")) |
| 289 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit($length); | 280 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit($length); |
| 290 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit($username); | 281 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit($username); |
| 291 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit($dispname); | 282 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit($dispname); |
| 292 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit($supervisorName); | ||
| 293 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit($aline->userstatus); | 283 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit($aline->userstatus); |
| 294 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit($aline->usersubstatus); | 284 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit($aline->usersubstatus); |
| 295 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit(($aline->usercallback!="0000-00-00 00:00:00"?date("Y-m-d H:i:s",strtotime($aline->usercallback)-($timeoffset)):"")); | 285 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($col++,$row)->setValueExplicit(($aline->usercallback!="0000-00-00 00:00:00"?date("Y-m-d H:i:s",strtotime($aline->usercallback)-($timeoffset)):"")); |
| ... | @@ -328,7 +318,7 @@ if(Input::has("dllogxls")) | ... | @@ -328,7 +318,7 @@ if(Input::has("dllogxls")) |
| 328 | $extrahdrarr[$key]=""; | 318 | $extrahdrarr[$key]=""; |
| 329 | $extravals[$key]=""; | 319 | $extravals[$key]=""; |
| 330 | 320 | ||
| 331 | $colstr=PHPExcel_Cell::stringFromColumnIndex(sizeof($fieldsarr)+sizeof($extrahdrarr)-1); | 321 | $colstr=PHPExcel_Cell::stringFromColumnIndex(sizeof($fieldsarr)+sizeof($extrahdrarr)); |
| 332 | $objPHPExcel->getActiveSheet()->setCellValue($colstr."1", $key); | 322 | $objPHPExcel->getActiveSheet()->setCellValue($colstr."1", $key); |
| 333 | } | 323 | } |
| 334 | $extravals[$key]=$val; | 324 | $extravals[$key]=$val; |
| ... | @@ -372,22 +362,9 @@ foreach($alist as $aline) | ... | @@ -372,22 +362,9 @@ foreach($alist as $aline) |
| 372 | $length=gmdate("H:i:s",round(($aline->waitSec+$aline->callSec+$talktime+$aline->dispoSec)/1000,2)); | 362 | $length=gmdate("H:i:s",round(($aline->waitSec+$aline->callSec+$talktime+$aline->dispoSec)/1000,2)); |
| 373 | 363 | ||
| 374 | if(!isset($userarr[$aline->user_id])&&$aline->user_id>0)$userarr[$aline->user_id]=User::find($aline->user_id); | 364 | if(!isset($userarr[$aline->user_id])&&$aline->user_id>0)$userarr[$aline->user_id]=User::find($aline->user_id); |
| 375 | |||
| 376 | //print_r($userarr[$aline->user_id]); | ||
| 377 | $dispname="";if(isset($userarr[$aline->user_id]))$dispname=$userarr[$aline->user_id]->dispname(); | 365 | $dispname="";if(isset($userarr[$aline->user_id]))$dispname=$userarr[$aline->user_id]->dispname(); |
| 378 | $username="";if(isset($userarr[$aline->user_id]))$username=$userarr[$aline->user_id]->username; | 366 | $username="";if(isset($userarr[$aline->user_id]))$username=$userarr[$aline->user_id]->username; |
| 379 | $supervisorId="";if(isset($userarr[$aline->user_id]))$supervisorId=$userarr[$aline->user_id]->supervisor; | 367 | |
| 380 | $supervisorName=""; | ||
| 381 | if(isset($supervisorId)){ | ||
| 382 | $superName=User::where('username','=',$supervisorId)->get(); | ||
| 383 | foreach ($superName as $supervisorname) { | ||
| 384 | $supervisorName=$supervisorname->fullname; | ||
| 385 | } | ||
| 386 | } | ||
| 387 | |||
| 388 | |||
| 389 | |||
| 390 | |||
| 391 | $recstr=''; | 368 | $recstr=''; |
| 392 | if($dashboarduser->moduleACL("Dialer",false,false,true)) | 369 | if($dashboarduser->moduleACL("Dialer",false,false,true)) |
| 393 | { | 370 | { |
| ... | @@ -399,7 +376,6 @@ foreach($alist as $aline) | ... | @@ -399,7 +376,6 @@ foreach($alist as $aline) |
| 399 | <td>".$length."</td> | 376 | <td>".$length."</td> |
| 400 | <td>".$username."</td> | 377 | <td>".$username."</td> |
| 401 | <td>".$dispname."</td> | 378 | <td>".$dispname."</td> |
| 402 | <td>".$supervisorName."</td> | ||
| 403 | <td title='".str_replace("'"," ",$aline->userremarks)."'>".$aline->userstatus."</td> | 379 | <td title='".str_replace("'"," ",$aline->userremarks)."'>".$aline->userstatus."</td> |
| 404 | <td>".$aline->usersubstatus."</td> | 380 | <td>".$aline->usersubstatus."</td> |
| 405 | <td>".($aline->usercallback!="0000-00-00 00:00:00"?date("Y-m-d H:i:s",strtotime($aline->usercallback)+($dashboarduser->timezone*60)):"")."</td>"; | 381 | <td>".($aline->usercallback!="0000-00-00 00:00:00"?date("Y-m-d H:i:s",strtotime($aline->usercallback)+($dashboarduser->timezone*60)):"")."</td>"; |
| ... | @@ -408,7 +384,8 @@ foreach($alist as $aline) | ... | @@ -408,7 +384,8 @@ foreach($alist as $aline) |
| 408 | 384 | ||
| 409 | if(in_array('Manual',$userdialmode)) | 385 | if(in_array('Manual',$userdialmode)) |
| 410 | { | 386 | { |
| 411 | $outstr.="<td><a href=# class='' onclick='dialerQuickOpen(\"$aline->crm_id\",\"$aline->number\",\"Manual\",\"\",0);return false;'>".$aline->number."</a></td>"; | 387 | /*$outstr.="<td><a href=# class='' onclick='dialerQuickOpen(\"$aline->crm_id\",\"$aline->number\",\"Manual\",\"\",0);return false;'>".$aline->number."</a></td>";*/ |
| 388 | $outstr.="<td>$aline->number</td>"; | ||
| 412 | } | 389 | } |
| 413 | else | 390 | else |
| 414 | { | 391 | { |
| ... | @@ -510,15 +487,14 @@ if(!empty($_GET['sort']))$i++;else $i--; | ... | @@ -510,15 +487,14 @@ if(!empty($_GET['sort']))$i++;else $i--; |
| 510 | 487 | ||
| 511 | waitKeyUpRun("filter",function() { filter2(document.getElementById('filter'), 'logtable') },"2000"); | 488 | waitKeyUpRun("filter",function() { filter2(document.getElementById('filter'), 'logtable') },"2000"); |
| 512 | $('#modfrom').datepicker({dateFormat: 'yy-mm-dd',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'}); | 489 | $('#modfrom').datepicker({dateFormat: 'yy-mm-dd',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'}); |
| 513 | $('#modto').datepicker({dateFormat: 'yy-mm-dd',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'}); | ||
| 514 | }); | 490 | }); |
| 515 | </script> | 491 | </script> |
| 516 | <div> | 492 | <div> |
| 517 | 493 | ||
| 518 | <select id="crmCol" style="border:1px solid #efefef;"> | 494 | <select id="crmCol" style="border:1px solid #efefef;"> |
| 519 | <option>All</option> | 495 | <option>All</option> |
| 520 | <option value="userstatus">Disposition</option> | 496 | <option value="userstatus">Disposition</option> |
| 521 | <option value="usersubstatus">Sub-Disposition</option> | 497 | <option value="usersubstatus">Sub-Disposition</option> |
| 522 | <option value="number">Number</option> | 498 | <option value="number">Number</option> |
| 523 | <option value="client">Campaign</option> | 499 | <option value="client">Campaign</option> |
| 524 | <option value="did">DID</option> | 500 | <option value="did">DID</option> |
| ... | @@ -533,8 +509,8 @@ if(!empty($_GET['sort']))$i++;else $i--; | ... | @@ -533,8 +509,8 @@ if(!empty($_GET['sort']))$i++;else $i--; |
| 533 | document.getElementById('filter').value = "<?php echo $value;?>"; | 509 | document.getElementById('filter').value = "<?php echo $value;?>"; |
| 534 | </script> | 510 | </script> |
| 535 | 511 | ||
| 536 | Date From: <input size=10 id='modfrom' name='modfrom' type='text' value='<?php echo date("Y-m-d",$logdate); ?>' /> | 512 | Date : <input size=10 id='modfrom' name='modfrom' type='text' value='<?php echo date("Y-m-d",$logdate); ?>' /> |
| 537 | <select id="modtime" style="border:1px solid #efefef;"> | 513 | Time From:<select id="modtime" style="border:1px solid #efefef;"> |
| 538 | <?php | 514 | <?php |
| 539 | foreach (range(0,23) as $hour) { | 515 | foreach (range(0,23) as $hour) { |
| 540 | $selected = ($hour == $logtime) ? "selected" : ""; | 516 | $selected = ($hour == $logtime) ? "selected" : ""; |
| ... | @@ -542,8 +518,7 @@ if(!empty($_GET['sort']))$i++;else $i--; | ... | @@ -542,8 +518,7 @@ if(!empty($_GET['sort']))$i++;else $i--; |
| 542 | } | 518 | } |
| 543 | ?> | 519 | ?> |
| 544 | </select> | 520 | </select> |
| 545 | To: <input size=10 id='modto' name='modto' type='text' value='<?php echo date("Y-m-d",$logdateto); ?>' /> | 521 | To: <select id="modtimeto" style="border:1px solid #efefef;"> |
| 546 | <select id="modtimeto" style="border:1px solid #efefef;"> | ||
| 547 | <?php | 522 | <?php |
| 548 | foreach (range(0,23) as $hour) { | 523 | foreach (range(0,23) as $hour) { |
| 549 | $selected = ($hour == $logtimeto) ? "selected" : ""; | 524 | $selected = ($hour == $logtimeto) ? "selected" : ""; |
| ... | @@ -556,9 +531,9 @@ if(!empty($_GET['sort']))$i++;else $i--; | ... | @@ -556,9 +531,9 @@ if(!empty($_GET['sort']))$i++;else $i--; |
| 556 | </div> | 531 | </div> |
| 557 | <div style="float:right;width:30%"> | 532 | <div style="float:right;width:30%"> |
| 558 | 533 | ||
| 559 | 534 | <?php if(Auth::user()->username=='admin'){ ?> | |
| 560 | <button class="pull-right btn btn-sm btn-default" onclick='dlCalllogXls();return false;' title='Download' style='margin-top:-8px'><i class='fa fa-download'></i> Download</button> | 535 | <button class="pull-right btn btn-sm btn-default" onclick='dlCalllogXls();return false;' title='Download' style='margin-top:-8px'><i class='fa fa-download'></i> Download</button> |
| 561 | 536 | <?php } ?> | |
| 562 | </div> | 537 | </div> |
| 563 | <div style="clear:both"></div> | 538 | <div style="clear:both"></div> |
| 564 | <hr> | 539 | <hr> |
| ... | @@ -734,7 +709,7 @@ series: [{ | ... | @@ -734,7 +709,7 @@ series: [{ |
| 734 | <script> | 709 | <script> |
| 735 | function dataString() | 710 | function dataString() |
| 736 | { | 711 | { |
| 737 | return 'logdate='+$("#modfrom").val()+'&logtime='+$("#modtime").val()+'&logdateto='+$("#modto").val()+'&logtimeto='+$("#modtimeto").val()+'&key='+$("#crmCol").val()+'&value='+$("#filter").val(); | 712 | return 'logdate='+$("#modfrom").val()+'&logtime='+$("#modtime").val()+'&logtimeto='+$("#modtimeto").val()+'&key='+$("#crmCol").val()+'&value='+$("#filter").val(); |
| 738 | } | 713 | } |
| 739 | 714 | ||
| 740 | function callLogReloadFun(sortby) | 715 | function callLogReloadFun(sortby) |
| ... | @@ -885,9 +860,8 @@ series: [{ | ... | @@ -885,9 +860,8 @@ series: [{ |
| 885 | <th>#</th> | 860 | <th>#</th> |
| 886 | <th>Start</th> | 861 | <th>Start</th> |
| 887 | <th onclick='callLogReloadFun("");return false;'>Length</th> | 862 | <th onclick='callLogReloadFun("");return false;'>Length</th> |
| 888 | <th>RM code</th> | 863 | <th>User</th> |
| 889 | <th>RM Name</th> | 864 | <th>Name</th> |
| 890 | <th>Team Manager</th> | ||
| 891 | <th>Dispo</th> | 865 | <th>Dispo</th> |
| 892 | <th>SubDispo</th> | 866 | <th>SubDispo</th> |
| 893 | <th>CB</th> | 867 | <th>CB</th> | ... | ... |
| 1 | <?php | ||
| 2 | $dashboarduser=Auth::user(); | ||
| 3 | $timeoffset=$dashboarduser->timezone*60; | ||
| 4 | ?> | ||
| 5 | <div class="container-fluid"> | ||
| 6 | <div class="layout-app"> | ||
| 7 | <div class="row"> | ||
| 8 | <div class="col-md-12"> | ||
| 9 | <div class="col-separator col-separator-first col-unscrollable box"> | ||
| 10 | <div class="innerAll"> | ||
| 11 | <h4>Follow up <?php if(!empty($client)) echo ": ".$client; ?></h4> | ||
| 12 | <hr style="margin-bottom: 10px;" /> | ||
| 13 | |||
| 14 | <table class='table' | ||
| 15 | <thead> | ||
| 16 | <tr> | ||
| 17 | <th></th> | ||
| 18 | <th></th> | ||
| 19 | <?php if(empty($client)) echo "<th>Campaign</th>" ?> | ||
| 20 | <th>Cust_ID</th> | ||
| 21 | <th>Name</th> | ||
| 22 | <th>Number</th> | ||
| 23 | <!-- <th>Type</th>--> | ||
| 24 | <th>LastCall</th> | ||
| 25 | <!-- <th>Disposition</th> ---> | ||
| 26 | <th>NextFollowup</th> | ||
| 27 | <!--- <th>Status</th> ---> | ||
| 28 | |||
| 29 | <!-- <th>Count</th> --> | ||
| 30 | <!--<th></th>--> | ||
| 31 | <!-- <th>DID</th> --> | ||
| 32 | </tr> | ||
| 33 | </thead> | ||
| 34 | <tbody> | ||
| 35 | <?php | ||
| 36 | if($count > 0){ | ||
| 37 | foreach ($calllog as $key => $value) { //echo "<pre>";print_r($value);exit;?> | ||
| 38 | <tr> | ||
| 39 | <td></td> | ||
| 40 | <td></td> | ||
| 41 | <?php if(empty($client)) echo "<td>$value->client</td>" ?> | ||
| 42 | <td><?php echo $value->cust_id; ?></td> | ||
| 43 | <td><?php echo $value->customer_name; ?></td> | ||
| 44 | <td><a href=# class='' onclick='dialerQuickOpen("<?php echo $value->id; ?>","<?php echo $value->mobile; ?>","Manual","",0);return false;'><?php echo $value->mobile; ?></a></td> | ||
| 45 | <td><?php echo date("Y-m-d H:i:s",strtotime($value->dialer_lastcall)-$timeoffset); ?></td> | ||
| 46 | <!--<td><?php //echo $value->dialer_status; ?></td>--> | ||
| 47 | <td><?php echo date("Y-m-d H:i:s",strtotime($value->dialer_callback)-$timeoffset); ?></td> | ||
| 48 | <!--<td><?php //echo $value->status; ?></td>--> | ||
| 49 | </tr> | ||
| 50 | <?php } | ||
| 51 | }else{ ?> | ||
| 52 | <td colspan="9" align="center">No Record Available</td> | ||
| 53 | <?php } ?> | ||
| 54 | </table> | ||
| 55 | |||
| 56 | <div id="campaignDetailsArea"></div> | ||
| 57 | </div> | ||
| 58 | </div> | ||
| 59 | </div> | ||
| 60 | </div> | ||
| 61 | |||
| 62 | </div> | ||
| 63 | </div> |
| ... | @@ -23,7 +23,9 @@ | ... | @@ -23,7 +23,9 @@ |
| 23 | 23 | ||
| 24 | <ul class="list-group list-group-1 margin-none borders-none" style='padding-right: 26px;'> | 24 | <ul class="list-group list-group-1 margin-none borders-none" style='padding-right: 26px;'> |
| 25 | 25 | ||
| 26 | <?php if(Auth::user()->moduleACL("Dialer",true,true,true)){ ?> | 26 | <?php if(Auth::user()->moduleACL("Dialer",true,true,true)){ |
| 27 | if(Auth::user()->usertype=="Supervisor" || Auth::user()->usertype=="Admin"){ | ||
| 28 | ?> | ||
| 27 | <li class="list-group-item"> | 29 | <li class="list-group-item"> |
| 28 | <a href="#" onclick="doAjax('dialer/liveusers','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i> Live</a> | 30 | <a href="#" onclick="doAjax('dialer/liveusers','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i> Live</a> |
| 29 | </li> | 31 | </li> |
| ... | @@ -45,12 +47,12 @@ | ... | @@ -45,12 +47,12 @@ |
| 45 | <li class="list-group-item"> | 47 | <li class="list-group-item"> |
| 46 | <a href="#" onclick="doAjax('dialer/statusreport','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i> Status</a> | 48 | <a href="#" onclick="doAjax('dialer/statusreport','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i> Status</a> |
| 47 | </li> | 49 | </li> |
| 48 | <li class="list-group-item"> | 50 | <!-- <li class="list-group-item"> |
| 49 | <a href="#" onclick="doAjax('dialer/questionnaire','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i> CLP</a> | 51 | <a href="#" onclick="doAjax('dialer/questionnaire','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i> CLP</a> |
| 50 | </li> | 52 | </li> --> |
| 51 | 53 | ||
| 52 | <?php if(Auth::user()->usertype=="Supervisor" || Auth::user()->usertype=="Admin"){ ?> | 54 | <?php if(Auth::user()->usertype=="Supervisor" || Auth::user()->usertype=="Admin"){ ?> |
| 53 | <li class="list-group-item"> | 55 | <!-- <li class="list-group-item"> |
| 54 | <a href="#" onclick="doAjax('dialer/callmanagement','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i> CallManagement</a> | 56 | <a href="#" onclick="doAjax('dialer/callmanagement','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i> CallManagement</a> |
| 55 | </li> | 57 | </li> |
| 56 | <li class="list-group-item"> | 58 | <li class="list-group-item"> |
| ... | @@ -61,7 +63,7 @@ | ... | @@ -61,7 +63,7 @@ |
| 61 | </li> | 63 | </li> |
| 62 | <li class="list-group-item"> | 64 | <li class="list-group-item"> |
| 63 | <a href="#" onclick="doAjax('dialer/raicingcustomerreport','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Racing Customer</a> | 65 | <a href="#" onclick="doAjax('dialer/raicingcustomerreport','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Racing Customer</a> |
| 64 | </li> | 66 | </li> --> |
| 65 | <li class="list-group-item"> | 67 | <li class="list-group-item"> |
| 66 | <a href="#" onclick="doAjax('dialer/relationshipreport','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Relationship</a> | 68 | <a href="#" onclick="doAjax('dialer/relationshipreport','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET');return false"><i class="fa fa-circle-o"></i>Relationship</a> |
| 67 | </li> | 69 | </li> |
| ... | @@ -125,7 +127,7 @@ | ... | @@ -125,7 +127,7 @@ |
| 125 | doAjax('dialer/liveusers','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET'); | 127 | doAjax('dialer/liveusers','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET'); |
| 126 | <?php }else { ?> | 128 | <?php }else { ?> |
| 127 | doAjax('dialer/calllog','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET'); | 129 | doAjax('dialer/calllog','','rightmainreportdiv','ajax_dialer_reports','singlethis','GET'); |
| 128 | <?php } ?> | 130 | <?php }} ?> |
| 129 | </script> | 131 | </script> |
| 130 | </div> | 132 | </div> |
| 131 | 133 | ... | ... |
| ... | @@ -42,7 +42,7 @@ foreach($allusers as $user){ | ... | @@ -42,7 +42,7 @@ foreach($allusers as $user){ |
| 42 | <div class='container'> | 42 | <div class='container'> |
| 43 | 43 | ||
| 44 | <select id='dialmodeassign' class=select2multi multiple="" style="width: 30%;"> | 44 | <select id='dialmodeassign' class=select2multi multiple="" style="width: 30%;"> |
| 45 | <option value="Progressive">Progressive</option> | 45 | <option value="Progressive">Ready</option> |
| 46 | <option value="Manual">Manual</option> | 46 | <option value="Manual">Manual</option> |
| 47 | <option value="Incoming">Incoming</option> | 47 | <option value="Incoming">Incoming</option> |
| 48 | </select> | 48 | </select> | ... | ... |
| ... | @@ -340,7 +340,6 @@ else if(isset($_POST['useruploadform'])&&$wakka->GetUser()) | ... | @@ -340,7 +340,6 @@ else if(isset($_POST['useruploadform'])&&$wakka->GetUser()) |
| 340 | 340 | ||
| 341 | $createdlog[$updatetime]=$username."::"; | 341 | $createdlog[$updatetime]=$username."::"; |
| 342 | $createdlog["updated"]=$updatetime; | 342 | $createdlog["updated"]=$updatetime; |
| 343 | $excelarray[$i]["DOB"]= date('Y-m-d', PHPExcel_Shared_Date::ExcelToPHP($excelarray[$i]["DOB"])); | ||
| 344 | 343 | ||
| 345 | $newdata=$ppldata; | 344 | $newdata=$ppldata; |
| 346 | foreach($excelarray[$i] as $key => $value) | 345 | foreach($excelarray[$i] as $key => $value) | ... | ... |
| ... | @@ -107,7 +107,7 @@ if($varid!=""||$isuser) | ... | @@ -107,7 +107,7 @@ if($varid!=""||$isuser) |
| 107 | //no edit access and read other data.. | 107 | //no edit access and read other data.. |
| 108 | //check if we have owner access = read access | 108 | //check if we have owner access = read access |
| 109 | $oclientlst=$wakka->clientsReadAccess(); | 109 | $oclientlst=$wakka->clientsReadAccess(); |
| 110 | foreach($oclientlst as $tclnt)if($tclnt==$recruitdata["peopledata"]['client']&&$tclnt!=""){$noreaduser=0;break;} | 110 | foreach($oclientlst as $tclnt)if(strtolower($tclnt)==strtolower($recruitdata["peopledata"]['client'])&&$tclnt!=""){$noreaduser=0;break;} |
| 111 | } | 111 | } |
| 112 | } | 112 | } |
| 113 | } | 113 | } | ... | ... |
custom/public/favicon-bk.png
0 → 100755
5.66 KB
custom/public/logo_s-bk.png
0 → 100755
5.66 KB
-
Please register or sign in to post a comment