Initial Change
Showing
21 changed files
with
1075 additions
and
95 deletions
This diff is collapsed.
Click to expand it.
| ... | @@ -95,4 +95,5 @@ Route::group(['middleware' => ['web']], function () { | ... | @@ -95,4 +95,5 @@ Route::group(['middleware' => ['web']], function () { |
| 95 | Route::post('dialmodeassign', array('uses'=> 'DialModeController@dialmodeassign', 'as'=>'assign.dialmodes')); | 95 | Route::post('dialmodeassign', array('uses'=> 'DialModeController@dialmodeassign', 'as'=>'assign.dialmodes')); |
| 96 | ///for the rlp pbwise | 96 | ///for the rlp pbwise |
| 97 | Route::get('rlp', array('uses'=> 'RecordController@rlpPbwise', 'as'=>'rlppb.comments')); | 97 | Route::get('rlp', array('uses'=> 'RecordController@rlpPbwise', 'as'=>'rlppb.comments')); |
| 98 | |||
| 98 | }); | 99 | }); | ... | ... |
| ... | @@ -818,11 +818,20 @@ $data.="</fieldset></div> | ... | @@ -818,11 +818,20 @@ $data.="</fieldset></div> |
| 818 | var dialerdispoarray={};var dispoClassArray={}; | 818 | var dialerdispoarray={};var dispoClassArray={}; |
| 819 | dialerdispoarray['']='';\n"; | 819 | dialerdispoarray['']='';\n"; |
| 820 | 820 | ||
| 821 | $mastersdata=$gthis->getDispocampaignData($dataarr[client]); | ||
| 822 | //$dispoarr=explode("~",$mastersdata['mvalue']); | ||
| 821 | 823 | ||
| 824 | if(empty($mastersdata)) | ||
| 825 | { | ||
| 822 | $mastersdata=$gthis->getCompanyMaster($client); | 826 | $mastersdata=$gthis->getCompanyMaster($client); |
| 823 | if(empty($mastersdata['dialerDispoList']))$mastersdata['dialerDispoList']=$gthis->HRCoreVars['dialerDispoList']; | 827 | if(empty($mastersdata['dialerDispoList']))$mastersdata['dialerDispoList']=$gthis->HRCoreVars['dialerDispoList']; |
| 824 | 828 | ||
| 825 | $dispoarr=explode("~",$mastersdata['dialerDispoList']); | 829 | $dispoarr=explode("~",$mastersdata['dialerDispoList']); |
| 830 | }else{ | ||
| 831 | $dispoarr=explode("~",$mastersdata['mvalue']); | ||
| 832 | } | ||
| 833 | |||
| 834 | |||
| 826 | foreach($dispoarr as $dispo) | 835 | foreach($dispoarr as $dispo) |
| 827 | { | 836 | { |
| 828 | if(!empty($dispo)) | 837 | if(!empty($dispo)) |
| ... | @@ -1163,7 +1172,7 @@ function createQaireTab() | ... | @@ -1163,7 +1172,7 @@ function createQaireTab() |
| 1163 | } | 1172 | } |
| 1164 | 1173 | ||
| 1165 | } | 1174 | } |
| 1166 | 1175 | if(isset($supComnt)){ | |
| 1167 | foreach($supComnt as $supervisorcomments) | 1176 | foreach($supComnt as $supervisorcomments) |
| 1168 | { | 1177 | { |
| 1169 | 1178 | ||
| ... | @@ -1182,6 +1191,7 @@ function createQaireTab() | ... | @@ -1182,6 +1191,7 @@ function createQaireTab() |
| 1182 | <input type=button id='".$supervisorcomments->id."_submitComments' class='btn btn-info' value='Submit' onclick='updateagentcomments(".$supervisorcomments->id.");'style=' margin: 5px 0 5px 660px;'> | 1191 | <input type=button id='".$supervisorcomments->id."_submitComments' class='btn btn-info' value='Submit' onclick='updateagentcomments(".$supervisorcomments->id.");'style=' margin: 5px 0 5px 660px;'> |
| 1183 | </div>"; | 1192 | </div>"; |
| 1184 | } | 1193 | } |
| 1194 | } | ||
| 1185 | 1195 | ||
| 1186 | $data.="<legend class='task_legend'>Primary Questions</legend> | 1196 | $data.="<legend class='task_legend'>Primary Questions</legend> |
| 1187 | 1197 | ||
| ... | @@ -3358,53 +3368,7 @@ function createRLP() | ... | @@ -3358,53 +3368,7 @@ function createRLP() |
| 3358 | return $data; | 3368 | return $data; |
| 3359 | 3369 | ||
| 3360 | } | 3370 | } |
| 3361 | function createSMSForm() | ||
| 3362 | { | ||
| 3363 | //echo "Manoj"; | ||
| 3364 | $dataarr=$this->recruitdata["peopledata"]; | ||
| 3365 | $data="<div style='clear:both;margin:2% 0 0 1%;border-style: dotted solid dashed;padding:2%'> | ||
| 3366 | <h5>SMS</h5> | ||
| 3367 | <hr/><br> | ||
| 3368 | 3371 | ||
| 3369 | <div style='clear:both;width:100%;'> | ||
| 3370 | <div style='width:49%;float:left'> | ||
| 3371 | <label class='label-small_new' style='width:29%;font-weight:bold;'>Customer Name</label> | ||
| 3372 | <input type='text' class='form_new form_new_amend' style='width:50%;border: 2px solid;' value='".$dataarr['firstname']."' id='customer_name' readonly> | ||
| 3373 | </div> | ||
| 3374 | </div> | ||
| 3375 | <br><br> | ||
| 3376 | <div style='clear:both;width:100%;'> | ||
| 3377 | <div style='width:49%;float:left'> | ||
| 3378 | <label class='label-small_new' style='width:29%;font-weight:bold;'>Mobile Number</label> | ||
| 3379 | <input type='text' class='form_new form_new_amend' style='width:50%;border: 2px solid;' id='mobilenumber'> | ||
| 3380 | </div> | ||
| 3381 | </div> | ||
| 3382 | <br><br> | ||
| 3383 | <div style='clear:both;width:100%;'> | ||
| 3384 | <div> | ||
| 3385 | <label class='label-small_new' style='width:14%;font-weight:bold;'>Message</label> | ||
| 3386 | <textarea class='form_new form_new_amend'style='width:74%;border: 2px solid;' maxlength='512' id='message' rows='4'></textarea> | ||
| 3387 | </div> | ||
| 3388 | </div> | ||
| 3389 | <br><br> | ||
| 3390 | <div style='clear:both;width:100%;'> | ||
| 3391 | <input type='button' class='btn btn-default btn-md' style='margin-left:40%;font-weight:bold;' value='Send' id='sendmessage'> | ||
| 3392 | </div> | ||
| 3393 | </div> | ||
| 3394 | <script> | ||
| 3395 | $('#sendmessage').click(()=>{ | ||
| 3396 | var postdata='mobile='+$('#mobilenumber').val(); | ||
| 3397 | postdata+='&message='+$('#message').val(); | ||
| 3398 | doAjax('record?action=sendsms',postdata,'createtaskdiv','ajaxMutex_recSaveData','singlethis','POST'); | ||
| 3399 | |||
| 3400 | //alert('your mobile number is given '+$('#mobilenumber').val()); | ||
| 3401 | |||
| 3402 | }) | ||
| 3403 | </script>"; | ||
| 3404 | |||
| 3405 | |||
| 3406 | return $data; | ||
| 3407 | } | ||
| 3408 | function createOneAssistForm() | 3372 | function createOneAssistForm() |
| 3409 | { | 3373 | { |
| 3410 | $dataarr=$this->recruitdata["peopledata"]; | 3374 | $dataarr=$this->recruitdata["peopledata"]; |
| ... | @@ -3580,9 +3544,6 @@ function CreateForm(&$frm) | ... | @@ -3580,9 +3544,6 @@ function CreateForm(&$frm) |
| 3580 | { | 3544 | { |
| 3581 | $frm['One Assist']["{{id}} {{firstname}}"][]=array(); | 3545 | $frm['One Assist']["{{id}} {{firstname}}"][]=array(); |
| 3582 | } | 3546 | } |
| 3583 | if(Auth::user()->username == "admin"){ | ||
| 3584 | $frm['SMS']["{{id}} {{firstname}}"][]=array(); | ||
| 3585 | } | ||
| 3586 | } | 3547 | } |
| 3587 | } | 3548 | } |
| 3588 | 3549 | ||
| ... | @@ -3652,7 +3613,6 @@ function CreateForm(&$frm) | ... | @@ -3652,7 +3613,6 @@ function CreateForm(&$frm) |
| 3652 | if($tbname=='Lead Entry Form')$tabsdata.=$this->createLeadEntryForm(); | 3613 | if($tbname=='Lead Entry Form')$tabsdata.=$this->createLeadEntryForm(); |
| 3653 | if($tbname=='RLP')$tabsdata.=$this->createRLP(); | 3614 | if($tbname=='RLP')$tabsdata.=$this->createRLP(); |
| 3654 | if($tbname=='One Assist')$tabsdata.=$this->createOneAssistForm(); | 3615 | if($tbname=='One Assist')$tabsdata.=$this->createOneAssistForm(); |
| 3655 | if($tbname=='SMS')$tabsdata.=$this->createSMSForm(); | ||
| 3656 | $tabsdata.="</div>"; | 3616 | $tabsdata.="</div>"; |
| 3657 | $i++; | 3617 | $i++; |
| 3658 | } | 3618 | } | ... | ... |
| ... | @@ -870,13 +870,13 @@ function popMail($userid) | ... | @@ -870,13 +870,13 @@ function popMail($userid) |
| 870 | } | 870 | } |
| 871 | function getPersonServer($empid) | 871 | function getPersonServer($empid) |
| 872 | { | 872 | { |
| 873 | if($this->getCount("records","clientcode='$empid'")==1) | 873 | if($this->getCount("records_demo","id='$empid'")==1) |
| 874 | { | 874 | { |
| 875 | $empdata=$this->LoadSingle("select * from records where clientcode='$empid';"); | 875 | $empdata=$this->LoadSingle("select * from records_demo where id='$empid';"); |
| 876 | $personarr['peopledata']=unserialize($empdata['peopledata']); | 876 | $personarr['peopledata']=unserialize($empdata['peopledata']); |
| 877 | $personarr['modifylog']=unserialize($empdata['modifylog']); | 877 | $personarr['modifylog']=unserialize($empdata['modifylog']); |
| 878 | $personarr['dirty']=unserialize($empdata['dirty']); | 878 | $personarr['dirty']=unserialize($empdata['dirty']); |
| 879 | $personarr['peopledata']['clientcode']=$empid; | 879 | $personarr['peopledata']['id']=$empid; |
| 880 | return $personarr; | 880 | return $personarr; |
| 881 | } | 881 | } |
| 882 | else return FALSE; | 882 | else return FALSE; |
| ... | @@ -1033,7 +1033,7 @@ function popMail($userid) | ... | @@ -1033,7 +1033,7 @@ function popMail($userid) |
| 1033 | 1033 | ||
| 1034 | function setPersonServer($empid,&$personarr) | 1034 | function setPersonServer($empid,&$personarr) |
| 1035 | { | 1035 | { |
| 1036 | if($this->getCount("records","clientcode='$empid'")==1&&is_array($personarr['peopledata'])) | 1036 | if($this->getCount("records_demo","id='$empid'")==1&&is_array($personarr['peopledata'])) |
| 1037 | { | 1037 | { |
| 1038 | $spostvars=serialize($personarr['peopledata']); | 1038 | $spostvars=serialize($personarr['peopledata']); |
| 1039 | $screatedlog=serialize($personarr['modifylog']); | 1039 | $screatedlog=serialize($personarr['modifylog']); |
| ... | @@ -1046,10 +1046,10 @@ function popMail($userid) | ... | @@ -1046,10 +1046,10 @@ function popMail($userid) |
| 1046 | { | 1046 | { |
| 1047 | $cachestr=''; | 1047 | $cachestr=''; |
| 1048 | 1048 | ||
| 1049 | /*if($personarr['peopledata']['dialer_flag']=="VIP" || $personarr['peopledata']['dialer_flag']=="") | 1049 | if($personarr['peopledata']['dialer_flag']=="VIP" || $personarr['peopledata']['dialer_flag']=="") |
| 1050 | { | 1050 | { |
| 1051 | $personarr['peopledata']['priority'] = ""; | 1051 | $personarr['peopledata']['priority'] = ""; |
| 1052 | }*/ | 1052 | } |
| 1053 | 1053 | ||
| 1054 | foreach($this->cachearray as $cachekey) | 1054 | foreach($this->cachearray as $cachekey) |
| 1055 | { | 1055 | { |
| ... | @@ -1072,13 +1072,13 @@ function popMail($userid) | ... | @@ -1072,13 +1072,13 @@ function popMail($userid) |
| 1072 | } | 1072 | } |
| 1073 | } | 1073 | } |
| 1074 | } | 1074 | } |
| 1075 | $personarr['peopledata']['clientcode']=$empid; | 1075 | $personarr['peopledata']['id']=$empid; |
| 1076 | 1076 | ||
| 1077 | $quoteP=serialize($personarr['peopledata']); | 1077 | $quoteP=serialize($personarr['peopledata']); |
| 1078 | $quoteM=serialize($personarr['modifylog']); | 1078 | $quoteM=serialize($personarr['modifylog']); |
| 1079 | $quoteD=serialize($personarr['dirty']); | 1079 | $quoteD=serialize($personarr['dirty']); |
| 1080 | /*$status=$personarr['peopledata']['status'];*/ | 1080 | /*$status=$personarr['peopledata']['status'];*/ |
| 1081 | return $this->Query("update records set modified=now(),peopledata='$quoteP',modifylog='$quoteM',dirty='$quoteD' $cachestr where clientcode='$empid' limit 1"); | 1081 | return $this->Query("update records_demo set modified=now(),peopledata='$quoteP',modifylog='$quoteM',dirty='$quoteD' $cachestr where id='$empid' limit 1"); |
| 1082 | } | 1082 | } |
| 1083 | } | 1083 | } |
| 1084 | else return -1; | 1084 | else return -1; |
| ... | @@ -1159,7 +1159,7 @@ function popMail($userid) | ... | @@ -1159,7 +1159,7 @@ function popMail($userid) |
| 1159 | } | 1159 | } |
| 1160 | } | 1160 | } |
| 1161 | 1161 | ||
| 1162 | return $this->LoadAll("select id,peopledata".$sqlarr." from records where $wheresql;"); | 1162 | return $this->LoadAll("select id".$sqlarr." from records where $wheresql;"); |
| 1163 | } | 1163 | } |
| 1164 | function getPersons($wheresql) | 1164 | function getPersons($wheresql) |
| 1165 | { | 1165 | { |
| ... | @@ -1174,33 +1174,6 @@ function popMail($userid) | ... | @@ -1174,33 +1174,6 @@ function popMail($userid) |
| 1174 | 1174 | ||
| 1175 | return $this->LoadAll("select id,created,modified,peopledata,modifylog,dirty".$sqlarr." from records where $wheresql;"); | 1175 | return $this->LoadAll("select id,created,modified,peopledata,modifylog,dirty".$sqlarr." from records where $wheresql;"); |
| 1176 | } | 1176 | } |
| 1177 | function getPersonsMissedcall($wheresql) | ||
| 1178 | { | ||
| 1179 | $sqlarr=""; | ||
| 1180 | foreach($this->cachearray as $cachekey) | ||
| 1181 | { | ||
| 1182 | if($cachekey!='') | ||
| 1183 | { | ||
| 1184 | $sqlarr.=" ,`$cachekey`"; | ||
| 1185 | } | ||
| 1186 | } | ||
| 1187 | |||
| 1188 | return $this->LoadAll("select id,created,modified,peopledata,modifylog,dirty".$sqlarr." from records where $wheresql ORDER BY modified desc;"); | ||
| 1189 | } | ||
| 1190 | |||
| 1191 | function getPersonsdownloadreport($wheresql) | ||
| 1192 | { | ||
| 1193 | $sqlarr=""; | ||
| 1194 | foreach($this->cachearray as $cachekey) | ||
| 1195 | { | ||
| 1196 | if($cachekey!='') | ||
| 1197 | { | ||
| 1198 | $sqlarr.=" ,`$cachekey`"; | ||
| 1199 | } | ||
| 1200 | } | ||
| 1201 | |||
| 1202 | return $this->LoadAll("select id,created,modified,peopledata,modifylog,dirty,client".$sqlarr." from records where $wheresql ORDER BY id asc ;"); | ||
| 1203 | } | ||
| 1204 | 1177 | ||
| 1205 | function isWorkingEmployee(&$ppldata,$year,$month,$date=0) | 1178 | function isWorkingEmployee(&$ppldata,$year,$month,$date=0) |
| 1206 | { | 1179 | { |
| ... | @@ -1388,7 +1361,12 @@ function popMail($userid) | ... | @@ -1388,7 +1361,12 @@ function popMail($userid) |
| 1388 | function getCompanyMaster($company) | 1361 | function getCompanyMaster($company) |
| 1389 | { | 1362 | { |
| 1390 | $companyarr=$this->loadAllDBMasters($company,'company');//$this->LoadSingle("select * from hrms_masters where mkey='$company' and mtype='company';"); | 1363 | $companyarr=$this->loadAllDBMasters($company,'company');//$this->LoadSingle("select * from hrms_masters where mkey='$company' and mtype='company';"); |
| 1364 | |||
| 1391 | $mastersdata=array(); | 1365 | $mastersdata=array(); |
| 1366 | |||
| 1367 | $mastersdata['status'] = $companyarr["status"]; | ||
| 1368 | /* $mastersdata['campaignstartdate'] = $companyarr["campaignstartdate"]; | ||
| 1369 | $mastersdata['campaignenddate'] = $companyarr["campaignenddate"];*/ | ||
| 1392 | if(!isset($companyarr["mvalue"]))$companyarr["mvalue"]=""; | 1370 | if(!isset($companyarr["mvalue"]))$companyarr["mvalue"]=""; |
| 1393 | 1371 | ||
| 1394 | $companymasters=explode("|",$companyarr["mvalue"]); | 1372 | $companymasters=explode("|",$companyarr["mvalue"]); |
| ... | @@ -1415,6 +1393,11 @@ function popMail($userid) | ... | @@ -1415,6 +1393,11 @@ function popMail($userid) |
| 1415 | 1393 | ||
| 1416 | return $mastersdata; | 1394 | return $mastersdata; |
| 1417 | } | 1395 | } |
| 1396 | function getDispocampaignData($company){ | ||
| 1397 | $companyar=$this->LoadSingle("select mvalue from hrms_masters where mkey='$company' and mtype='coreconfig';"); | ||
| 1398 | //print_r($company); | ||
| 1399 | return $companyar; | ||
| 1400 | } | ||
| 1418 | function getEmailListforClient($tclient) | 1401 | function getEmailListforClient($tclient) |
| 1419 | { | 1402 | { |
| 1420 | $unameslist=array(); | 1403 | $unameslist=array(); |
| ... | @@ -1610,6 +1593,26 @@ function popMail($userid) | ... | @@ -1610,6 +1593,26 @@ function popMail($userid) |
| 1610 | } | 1593 | } |
| 1611 | function clientsReadAccess() | 1594 | function clientsReadAccess() |
| 1612 | { | 1595 | { |
| 1596 | /* $companyarr=$this->LoadAll("select * from hrms_masters where mtype='company' and status='active'"); | ||
| 1597 | $campaigns=array(); | ||
| 1598 | $now = new \DateTime(); | ||
| 1599 | foreach($companyarr as $tcompany){ | ||
| 1600 | $campaigns[]=$tcompany['mkey']; | ||
| 1601 | } | ||
| 1602 | foreach($companyarr as $tcompany){ | ||
| 1603 | $campaignstartdate = new \DateTime($tcompany['campaignstartdate']); | ||
| 1604 | $campaignenddate = new \DateTime($tcompany['campaignenddate']); | ||
| 1605 | |||
| 1606 | if(empty($tcompany['campaignstartdate']) || empty($tcompany['campaignenddate'])){ | ||
| 1607 | print_r($tcompany['mkey']); | ||
| 1608 | $campaigns[]=$tcompany['mkey']; | ||
| 1609 | }else{ | ||
| 1610 | if($campaignstartdate < $now and $campaignenddate > $now){ | ||
| 1611 | print_r($tcompany['mkey']); | ||
| 1612 | $campaigns[]=$tcompany['mkey']; | ||
| 1613 | } | ||
| 1614 | } | ||
| 1615 | }*/ | ||
| 1613 | $clientlst=array(); | 1616 | $clientlst=array(); |
| 1614 | if($this->GetBBBUserData("readotherdata")=="No") | 1617 | if($this->GetBBBUserData("readotherdata")=="No") |
| 1615 | { | 1618 | { |
| ... | @@ -1630,7 +1633,8 @@ function popMail($userid) | ... | @@ -1630,7 +1633,8 @@ function popMail($userid) |
| 1630 | } | 1633 | } |
| 1631 | else | 1634 | else |
| 1632 | { | 1635 | { |
| 1633 | $companyarr=$this->LoadAll("select * from hrms_masters where mtype='company'"); | 1636 | $companyarr=$this->LoadAll("select * from hrms_masters where mtype='company' and status='active'"); |
| 1637 | //$companyarr=$this->LoadAll("select * from hrms_masters where mtype='company'"); | ||
| 1634 | foreach($companyarr as $tcompany)$clientlst[]=$tcompany['mkey']; | 1638 | foreach($companyarr as $tcompany)$clientlst[]=$tcompany['mkey']; |
| 1635 | 1639 | ||
| 1636 | $selectarr=$this->loadAllDBMasters("client",'select'); | 1640 | $selectarr=$this->loadAllDBMasters("client",'select'); |
| ... | @@ -1639,7 +1643,31 @@ function popMail($userid) | ... | @@ -1639,7 +1643,31 @@ function popMail($userid) |
| 1639 | if(is_array($clientlst))$clientlst=array_unique(array_merge($clientlst,$newvalues)); | 1643 | if(is_array($clientlst))$clientlst=array_unique(array_merge($clientlst,$newvalues)); |
| 1640 | } | 1644 | } |
| 1641 | } | 1645 | } |
| 1642 | return $clientlst; | 1646 | $activeClientCampaign = array(); |
| 1647 | $companyarr=$this->LoadAll("select * from hrms_masters where mtype='company' and status='active'"); | ||
| 1648 | $campaigns=array(); | ||
| 1649 | $dashboarduser=Auth::user(); | ||
| 1650 | $timeoffset = $dashboarduser->timezone; //-330; //$dashboarduser->timezone; | ||
| 1651 | $timeoffset = $timeoffset*60; | ||
| 1652 | $now = strtotime(date("Y-m-d H:i:s"))-$timeoffset; | ||
| 1653 | |||
| 1654 | foreach($companyarr as $tcompany){ | ||
| 1655 | $campaignstartdate = strtotime($tcompany['campaignstartdate']); | ||
| 1656 | $campaignenddate = strtotime($tcompany['campaignenddate']); | ||
| 1657 | if($tcompany['campaignstartdate'] == '0000-00-00 00:00:00' || $tcompany['campaignenddate'] == '0000-00-00 00:00:00'){ | ||
| 1658 | $campaigns[]=$tcompany['mkey']; | ||
| 1659 | }else{ | ||
| 1660 | if($campaignstartdate < $now and $campaignenddate > $now){ | ||
| 1661 | $campaigns[]=$tcompany['mkey']; | ||
| 1662 | } | ||
| 1663 | } | ||
| 1664 | } | ||
| 1665 | foreach ($clientlst as $key => $value) { | ||
| 1666 | if(in_array($value, $campaigns)){ | ||
| 1667 | $activeClientCampaign[]=$value; | ||
| 1668 | } | ||
| 1669 | } | ||
| 1670 | return $activeClientCampaign; | ||
| 1643 | } | 1671 | } |
| 1644 | function clientsOwnerRWAccess() | 1672 | function clientsOwnerRWAccess() |
| 1645 | { | 1673 | { |
| ... | @@ -1811,9 +1839,7 @@ function popMail($userid) | ... | @@ -1811,9 +1839,7 @@ function popMail($userid) |
| 1811 | function searchPhone($key,$number) | 1839 | function searchPhone($key,$number) |
| 1812 | { | 1840 | { |
| 1813 | $users=array(); | 1841 | $users=array(); |
| 1814 | |||
| 1815 | $mobile10=substr($number,-10); | 1842 | $mobile10=substr($number,-10); |
| 1816 | //Log::info($mobile10." ^ "); | ||
| 1817 | $tusers=$this->getPersons("RIGHT($key,10) = $mobile10"); | 1843 | $tusers=$this->getPersons("RIGHT($key,10) = $mobile10"); |
| 1818 | if($tusers) | 1844 | if($tusers) |
| 1819 | { | 1845 | { | ... | ... |
| ... | @@ -109,10 +109,10 @@ return [ | ... | @@ -109,10 +109,10 @@ 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 | 112 | "Campaign" => ["disp"=>"FCM","icon"=>"file","dash"=>"", | |
| 113 | "Campaign" => ["disp"=>"Campaign","icon"=>"file","dash"=>"","onclick"=>"menuAction('campaign');"], | 113 | "submenu"=>["FCM"=>["menuAction('campaign');"], |
| 114 | 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');"], | ... | ... |
| 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
0 → 100755
| 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> |
application/resources/views/layout/module/campaign/campaign/campaignAssignToDisposition.blade.php
0 → 100755
| 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> |
| 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> |
| 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> |
| 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 |
This diff is collapsed.
Click to expand it.
application/resources/views/layout/module/campaign/campaign/campaignTabFeedback.blade.php
0 → 100755
| 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 |
| 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 |
| 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> |
| 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 |
| 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 |
-
Please register or sign in to post a comment