e160c0bd by Prashant Jadhav

changes for saving question and supervisor recomndation

1 parent 4a9f4561
...@@ -115,7 +115,7 @@ class DialerController extends Controller { ...@@ -115,7 +115,7 @@ class DialerController extends Controller {
115 altphone7 like '%".substr($callnumber,-10)."' OR 115 altphone7 like '%".substr($callnumber,-10)."' OR
116 altphone8 like '%".substr($callnumber,-10)."' OR 116 altphone8 like '%".substr($callnumber,-10)."' OR
117 altphone9 like '%".substr($callnumber,-10)."' OR 117 altphone9 like '%".substr($callnumber,-10)."' OR
118 altphone10 like '%".substr($callnumber,-10)."') and id=$crmid "); 118 altphone10 like '%".substr($callnumber,-10)."') and id=$crmid $roclientstr ");
119 /*$tusers=$wakka->getPersonIDs("(mobile like '%".substr($callnumber,-10)."' OR 119 /*$tusers=$wakka->getPersonIDs("(mobile like '%".substr($callnumber,-10)."' OR
120 altphone1 like '%$callnumber' OR 120 altphone1 like '%$callnumber' OR
121 altphone2 like '%$callnumber' OR 121 altphone2 like '%$callnumber' OR
...@@ -141,7 +141,7 @@ class DialerController extends Controller { ...@@ -141,7 +141,7 @@ class DialerController extends Controller {
141 altphone7 like '%".substr($callnumber,-10)."' OR 141 altphone7 like '%".substr($callnumber,-10)."' OR
142 altphone8 like '%".substr($callnumber,-10)."' OR 142 altphone8 like '%".substr($callnumber,-10)."' OR
143 altphone9 like '%".substr($callnumber,-10)."' OR 143 altphone9 like '%".substr($callnumber,-10)."' OR
144 altphone10 like '%".substr($callnumber,-10)."' "); 144 altphone10 like '%".substr($callnumber,-10)."' $roclientstr");
145 /*$tusers=$wakka->getPersonIDs("mobile like '%".substr($callnumber,-10)."' OR 145 /*$tusers=$wakka->getPersonIDs("mobile like '%".substr($callnumber,-10)."' OR
146 altphone1 like '%$callnumber' OR 146 altphone1 like '%$callnumber' OR
147 altphone2 like '%$callnumber' OR 147 altphone2 like '%$callnumber' OR
...@@ -758,10 +758,10 @@ if($action=="recarchive") ...@@ -758,10 +758,10 @@ if($action=="recarchive")
758 } 758 }
759 public function show($id) 759 public function show($id)
760 { 760 {
761 /*if(time()>strtotime('14:30:00') || time()<strtotime('03:30:00')) 761 if(time()>strtotime('14:30:00') || time()<strtotime('03:30:00'))
762 { 762 {
763 Session::flush(); 763 Session::flush();
764 }*/ 764 }
765 765
766 if($id=="bucketdata") 766 if($id=="bucketdata")
767 { 767 {
...@@ -834,7 +834,7 @@ public function show($id) ...@@ -834,7 +834,7 @@ public function show($id)
834 834
835 $dbres=array(); 835 $dbres=array();
836 if($bucket=="CurrentQueue")$dbres=$this->getCallSequencing(20); 836 if($bucket=="CurrentQueue")$dbres=$this->getCallSequencing(20);
837 else if($bucket=="Priority")$dbres=$wakka->getPersons("priority in (1,2,3,4,5,6,7,8,9,10) $owclientstr limit $bs,$bl"); 837 else if($bucket=="Priority")$dbres=$wakka->getPersons("priority in (1,2,3,4,5,6,7,8,9,10) $owclientstr ORDER BY FIELD(priority,10,9,8,7,6,5,4,3,2,1) limit $bs,$bl");
838 else if($bucket=="TotalData")$dbres=$wakka->getPersons("1=1 and currentstatus='$currentstatus' and legalstatus='$legalstatus' and status!='Noqueue' $owclientstr limit $bs,$bl"); 838 else if($bucket=="TotalData")$dbres=$wakka->getPersons("1=1 and currentstatus='$currentstatus' and legalstatus='$legalstatus' and status!='Noqueue' $owclientstr limit $bs,$bl");
839 else if($bucket=="SearchData")$dbres=$wakka->getPersons("1=1 $roclientstrAll $skey limit $bs,$bl"); 839 else if($bucket=="SearchData")$dbres=$wakka->getPersons("1=1 $roclientstrAll $skey limit $bs,$bl");
840 else if($bucket=="NotCalled")$dbres=$wakka->getPersons("status='New' and currentstatus='$currentstatus' and legalstatus='$legalstatus' $owclientstr limit $bs,$bl"); 840 else if($bucket=="NotCalled")$dbres=$wakka->getPersons("status='New' and currentstatus='$currentstatus' and legalstatus='$legalstatus' $owclientstr limit $bs,$bl");
...@@ -1145,14 +1145,14 @@ public function show($id) ...@@ -1145,14 +1145,14 @@ public function show($id)
1145 if($type != "" && $id != ""){ 1145 if($type != "" && $id != ""){
1146 if($type == "category"){ 1146 if($type == "category"){
1147 $output = "<option value=''>Select Category</option>"; 1147 $output = "<option value=''>Select Category</option>";
1148 $category = DB::table("relationship_category")->where("service_id",$id)->where("title","!=","")->where("status","=","Active")->get(); 1148 $category = DB::table("relationship_category")->where("service_id",$id)->where("title","!=","")->get();
1149 foreach($category as $cat){ 1149 foreach($category as $cat){
1150 $output .= "<option value='".$cat->id."'>".$cat->title."</option>"; 1150 $output .= "<option value='".$cat->id."'>".$cat->title."</option>";
1151 } 1151 }
1152 return $output; 1152 return $output;
1153 }else if($type == "subCategory"){ 1153 }else if($type == "subCategory"){
1154 $output = "<option value=''>Select Sub Category</option>"; 1154 $output = "<option value=''>Select Sub Category</option>";
1155 $subCategory = DB::table("relationship_sub_category")->where("category_id",$id)->where("title","!=","")->where("status","=","Active")->get(); 1155 $subCategory = DB::table("relationship_sub_category")->where("category_id",$id)->where("title","!=","")->get();
1156 foreach($subCategory as $cat){ 1156 foreach($subCategory as $cat){
1157 $output .= "<option value='".$cat->title."'>".$cat->title."</option>"; 1157 $output .= "<option value='".$cat->title."'>".$cat->title."</option>";
1158 } 1158 }
...@@ -1173,6 +1173,7 @@ public function show($id) ...@@ -1173,6 +1173,7 @@ public function show($id)
1173 $wakka = new KHRMSLib(); 1173 $wakka = new KHRMSLib();
1174 $rows=""; 1174 $rows="";
1175 1175
1176
1176 $owclientstr=array(); 1177 $owclientstr=array();
1177 $oclientlst=$wakka->clientsOwnerRWAccess(); 1178 $oclientlst=$wakka->clientsOwnerRWAccess();
1178 1179
...@@ -1252,7 +1253,7 @@ public function show($id) ...@@ -1252,7 +1253,7 @@ public function show($id)
1252 $reccrm_ids[] = "'".$recordValue[0]->id."'"; 1253 $reccrm_ids[] = "'".$recordValue[0]->id."'";
1253 } 1254 }
1254 else{ 1255 else{
1255 $dbres[]=array('client'=>$lcall->client,'mobile'=>substr($lcall->number,-10),'callid'=>$lcall->id,'datetime'=>$lcall->updated_at); 1256 $dbres[]=array('client'=>$lcall->client,'mobile'=>substr($lcall->number,-10),'callid'=>$lcall->id,'modified'=>$lcall->updated_at);
1256 } 1257 }
1257 } 1258 }
1258 } 1259 }
...@@ -1262,13 +1263,14 @@ public function show($id) ...@@ -1262,13 +1263,14 @@ public function show($id)
1262 { 1263 {
1263 $recids_str = implode(",", $reccrm_ids); 1264 $recids_str = implode(",", $reccrm_ids);
1264 $rec=$wakka->getPersons("id in ($recids_str)"); 1265 $rec=$wakka->getPersons("id in ($recids_str)");
1266
1265 $dbres = array_merge($dbres,$rec); 1267 $dbres = array_merge($dbres,$rec);
1266 1268
1267 $mobile=""; 1269 $mobile="";
1268 foreach ($dbres as $dbrow) 1270 foreach ($dbres as $dbrow)
1269 { 1271 {
1270 1272
1271 $mobile.= $dbrow['mobile']."-".$dbrow['client']."-".$dbrow['datetime'].","; 1273 $mobile.= $dbrow['mobile']."-".$dbrow['client']."-".$dbrow['modified'].",";
1272 } 1274 }
1273 return "<script>alert('Missed call is pending for :-----".$mobile." !')</script>"; 1275 return "<script>alert('Missed call is pending for :-----".$mobile." !')</script>";
1274 //echo "<pre>".print_r($dbres)."</pre>"; 1276 //echo "<pre>".print_r($dbres)."</pre>";
......
...@@ -80,7 +80,8 @@ class QuestionareController extends Controller ...@@ -80,7 +80,8 @@ class QuestionareController extends Controller
80 { 80 {
81 //return "<script>simpleNotification('Alert','topRight','Get on call first!!')</script>"; 81 //return "<script>simpleNotification('Alert','topRight','Get on call first!!')</script>";
82 } 82 }
83 83 if($call_status=='ANSWER' && $call_id !="")
84 {
84 foreach($questionArray as $key=> $quesArray) 85 foreach($questionArray as $key=> $quesArray)
85 { 86 {
86 $explodeQues = explode("-", $key); 87 $explodeQues = explode("-", $key);
...@@ -101,7 +102,7 @@ class QuestionareController extends Controller ...@@ -101,7 +102,7 @@ class QuestionareController extends Controller
101 102
102 if($questioncallid==$call_id && $questionid==$ques) 103 if($questioncallid==$call_id && $questionid==$ques)
103 { 104 {
104 DB::statement("update questionaire_details set created_at='".date("Y-m-d H:i:s")."', updated_at='".date("Y-m-d H:i:s")."', user_id='".$user_id."',cust_id='".$cust_id."',call_id='".$call_id."',name='".$name."',number='".$mobile."',question_time='".$questionDateTime."',question='".$ques."',primary_question='".$quesArray->prim_ques."',primary_response='".trim($quesArray->prim_response)."',primary_text='".$quesArray->prim_txt."',followup1_question='".$quesArray->fol1_ques."',followup1_response='".trim($quesArray->fol1_response)."',followup1_text='".$quesArray->fol1_txt."',followup2_question='".$quesArray->fol2_ques."',followup2_response='".trim($quesArray->fol1_response)."',followup2_text='".$quesArray->fol2_txt."',followup3_question='".$quesArray->fol3_ques."',followup3_response='".trim($quesArray->fol1_response)."',followup3_text='".$quesArray->fol3_txt."',followup4_question='".$quesArray->fol4_ques."',followup4_response='".trim($quesArray->fol4_response)."',followup4_text='".$quesArray->fol4_txt."',followup5_question='".$quesArray->fol5_ques."',followup5_response='".trim($quesArray->fol5_response)."',followup5_text='".$quesArray->fol5_txt."',followup6_question='".$quesArray->fol6_ques."',followup6_response='".trim($quesArray->fol6_response)."',followup6_text='".$quesArray->fol6_txt."',followup7_question='".$quesArray->fol7_ques."',followup7_response='".trim($quesArray->fol7_response)."',followup7_text='".$quesArray->fol7_txt."' where call_id='".$call_id."' and question='".$ques."' and cust_id='".$cust_id."' "); 105 DB::statement("update questionaire_details set updated_at='".date("Y-m-d H:i:s")."', user_id='".$user_id."',cust_id='".$cust_id."',call_id='".$call_id."',name='".$name."',number='".$mobile."',question_time='".$questionDateTime."',question='".$ques."',primary_question='".$quesArray->prim_ques."',primary_response='".trim($quesArray->prim_response)."',primary_text='".$quesArray->prim_txt."',followup1_question='".$quesArray->fol1_ques."',followup1_response='".trim($quesArray->fol1_response)."',followup1_text='".$quesArray->fol1_txt."',followup2_question='".$quesArray->fol2_ques."',followup2_response='".trim($quesArray->fol1_response)."',followup2_text='".$quesArray->fol2_txt."',followup3_question='".$quesArray->fol3_ques."',followup3_response='".trim($quesArray->fol1_response)."',followup3_text='".$quesArray->fol3_txt."',followup4_question='".$quesArray->fol4_ques."',followup4_response='".trim($quesArray->fol4_response)."',followup4_text='".$quesArray->fol4_txt."',followup5_question='".$quesArray->fol5_ques."',followup5_response='".trim($quesArray->fol5_response)."',followup5_text='".$quesArray->fol5_txt."',followup6_question='".$quesArray->fol6_ques."',followup6_response='".trim($quesArray->fol6_response)."',followup6_text='".$quesArray->fol6_txt."',followup7_question='".$quesArray->fol7_ques."',followup7_response='".trim($quesArray->fol7_response)."',followup7_text='".$quesArray->fol7_txt."' where call_id='".$call_id."' and question='".$ques."' and cust_id='".$cust_id."' ");
105 } 106 }
106 else 107 else
107 { 108 {
...@@ -109,6 +110,13 @@ class QuestionareController extends Controller ...@@ -109,6 +110,13 @@ class QuestionareController extends Controller
109 } 110 }
110 } 111 }
111 return "<div class='alert alert-success'><strong>All Questions Saved Successfully!</strong></div>"; 112 return "<div class='alert alert-success'><strong>All Questions Saved Successfully!</strong></div>";
113
114 }
115 else
116 {
117 return "<script>simpleNotification('error','topRight','Please Get on call first');</script>";
118 }
119
112 } 120 }
113 } 121 }
114 122
......
...@@ -38,7 +38,10 @@ class RacingCustomerController extends Controller ...@@ -38,7 +38,10 @@ class RacingCustomerController extends Controller
38 $relationship_with_group_id_next = Input::get("relationship_with_group_id_next"); 38 $relationship_with_group_id_next = Input::get("relationship_with_group_id_next");
39 $new_group_addition_to_group = Input::get("new_group_addition_to_group"); 39 $new_group_addition_to_group = Input::get("new_group_addition_to_group");
40 $racing_from = Input::get("racing_from"); 40 $racing_from = Input::get("racing_from");
41 41 $user_id = Auth::user()->username;
42 $clientcode = Input::get('clientcode');
43 $mobile = Input::get('mobile');
44 $client = Input::get('client');
42 if($pb_name=="")return "<script>simpleNotification('error','topRight','please enter pb name');</script>"; 45 if($pb_name=="")return "<script>simpleNotification('error','topRight','please enter pb name');</script>";
43 if($pb_code=="")return "<script>simpleNotification('error','topRight','please enter pb code');</script>"; 46 if($pb_code=="")return "<script>simpleNotification('error','topRight','please enter pb code');</script>";
44 if($pb_landline_contact_no=="")return "<script>simpleNotification('error','topRight','please enter PB landline Contact No.');</script>"; 47 if($pb_landline_contact_no=="")return "<script>simpleNotification('error','topRight','please enter PB landline Contact No.');</script>";
...@@ -54,12 +57,21 @@ class RacingCustomerController extends Controller ...@@ -54,12 +57,21 @@ class RacingCustomerController extends Controller
54 if($new_group_addition_to_group=="")return "<script>simpleNotification('error','topRight','please select Grouping');</script>"; 57 if($new_group_addition_to_group=="")return "<script>simpleNotification('error','topRight','please select Grouping');</script>";
55 if($racing_from=="")return "<script>simpleNotification('error','topRight','please enter Racing From');</script>"; 58 if($racing_from=="")return "<script>simpleNotification('error','topRight','please enter Racing From');</script>";
56 59
60 $crmcallDetails=CRMCall::where('number','like','%'.substr($mobile,-10).'%')->orderBy("created_at","DESC")->first();
61
62 if($crmcallDetails)
63 {
64 $call_id = $crmcallDetails->id;
65 $call_status = $crmcallDetails->status;
66 $crm_id = $crmcallDetails->crm_id;
67 }
68
57 $setracingCutomer = array(); 69 $setracingCutomer = array();
58 70
59 $setracingCutomer[]="date='".date("Y-m-d H:i:s")."'"; 71 $setracingCutomer[]="date='".date("Y-m-d H:i:s")."'";
60 //$setracingCutomer[]="product_code='$product_code'"; 72 //$setracingCutomer[]="product_code='$product_code'";
61 $setracingCutomer[]="pb_name='$pb_name'"; 73 $setracingCutomer[]="pb_name='$pb_name'";
62 $setracingCutomer[]="pb_code='$pb_code'"; 74 $setracingCutomer[]="pb_code='$client'";
63 $setracingCutomer[]="pb_landline_contact_no='$pb_landline_contact_no'"; 75 $setracingCutomer[]="pb_landline_contact_no='$pb_landline_contact_no'";
64 $setracingCutomer[]="supervisor_mail_id='$supervisor_mail_id'"; 76 $setracingCutomer[]="supervisor_mail_id='$supervisor_mail_id'";
65 $setracingCutomer[]="group_id='$group_id'"; 77 $setracingCutomer[]="group_id='$group_id'";
...@@ -72,19 +84,27 @@ class RacingCustomerController extends Controller ...@@ -72,19 +84,27 @@ class RacingCustomerController extends Controller
72 $setracingCutomer[]="relationship_with_group_id_next='$relationship_with_group_id_next'"; 84 $setracingCutomer[]="relationship_with_group_id_next='$relationship_with_group_id_next'";
73 $setracingCutomer[]="new_group_addition_to_group='$new_group_addition_to_group'"; 85 $setracingCutomer[]="new_group_addition_to_group='$new_group_addition_to_group'";
74 $setracingCutomer[]="racing_from='$racing_from'"; 86 $setracingCutomer[]="racing_from='$racing_from'";
87 $setracingCutomer[]="call_id='$call_id'";
75 88
76 $setracingCut=implode(",",$setracingCutomer); 89 $setracingCut=implode(",",$setracingCutomer);
77 90
91 if($call_status=='ANSWER' && $call_id!="")
92 {
78 DB::statement("insert into potentialcustomer_details set $setracingCut"); 93 DB::statement("insert into potentialcustomer_details set $setracingCut");
79 94
80 return "<script>simpleNotification('success','topRight','Customer Details Saved Successfully');</script>"; 95 return "<script>simpleNotification('success','topRight','Customer Details Saved Successfully');</script>";
81 } 96 }
97 else
98 {
99 return "<script>simpleNotification('error','topRight','Please Get on call first');</script>";
100 }
101 }
82 public function updateracingcust() 102 public function updateracingcust()
83 { 103 {
84 $id=Input::get("id"); 104 $id=Input::get("id");
85 $status=Input::get("supervisorstatus"); 105 $status=Input::get("supervisorstatus");
86 106
87 DB::statement("update potentialcustomer_details set supervisor_status='$status' where id=$id"); 107 DB::statement("update potentialcustomer_details set supervisor_status='$status',supervisor_update='".date("Y-m-d H:i:s")."' where id=$id");
88 108
89 return "<script>simpleNotification('success','topRight','Supervisor status Saved Successfully');</script>"; 109 return "<script>simpleNotification('success','topRight','Supervisor status Saved Successfully');</script>";
90 } 110 }
......
...@@ -7,6 +7,10 @@ use App\Models\Notification; ...@@ -7,6 +7,10 @@ use App\Models\Notification;
7 use App\Jobs\KHRMSLib; 7 use App\Jobs\KHRMSLib;
8 use App\Models\User; 8 use App\Models\User;
9 use DB; 9 use DB;
10 use App\Models\CRMCall;
11 use App\Http\Controllers;
12 use App\Http\Requests;
13 use Illuminate\Http\Request;
10 14
11 class RecordController extends Controller { 15 class RecordController extends Controller {
12 16
...@@ -122,19 +126,27 @@ class RecordController extends Controller { ...@@ -122,19 +126,27 @@ class RecordController extends Controller {
122 } 126 }
123 if($action=="savecomment") 127 if($action=="savecomment")
124 { 128 {
125 $agentArray = array(); 129 $id = Input::get('id');
126 $wakka = new KHRMSLib();
127
128 $clientcode = Input::get('clientcode');
129 $agent_comments = Input::get('agent_comment'); 130 $agent_comments = Input::get('agent_comment');
130 $agent_comments = preg_replace("/[^ \w]+/", "",$agent_comments); 131 $agent_comments = preg_replace("/[^ \w]+/", "",$agent_comments);
132 $user_id=Auth::user()->id;
133 $mobile = Input::get('mobile');
134 $crmcallDetails=CRMCall::where('number','like','%'.substr($mobile,-10).'%')->orderBy("created_at","DESC")->first();
131 135
132 $agentArray['clientcode'] = $clientcode; 136 if($crmcallDetails)
133 $agentArray['agent_comments'] = $agent_comments; 137 {
134 $agentArray['agent'] = Auth::user()->username; 138 $call_id = $crmcallDetails->id;
135 139 $call_status = $crmcallDetails->status;
136 $wakka->setComment($clientcode,$agentArray); 140 $crm_id = $crmcallDetails->crm_id;
137 141 }
142 if($call_status=='ANSWER' && $call_id!=""){
143 DB::statement("update DU_CRM_SUPERVISOR_COMMENTS set updated_at=now(),agent_comments='$agent_comments',user_id='$user_id',call_id=$call_id where id=$id");
144 return "<script>simpleNotification('success','topRight','Supervisor status Saved Successfully');</script>";
145 }
146 else
147 {
148 return "<script>simpleNotification('error','topRight','Please Get on call first');</script>";
149 }
138 } 150 }
139 151
140 } 152 }
...@@ -216,7 +228,6 @@ class RecordController extends Controller { ...@@ -216,7 +228,6 @@ class RecordController extends Controller {
216 228
217 $data['pbcode']=$pbcode; 229 $data['pbcode']=$pbcode;
218 return view('layout.module.record.rlppbwise',$data); 230 return view('layout.module.record.rlppbwise',$data);
219
220 } 231 }
221 }
222 232
233 }
......
...@@ -1114,30 +1114,31 @@ function createQaireTab() ...@@ -1114,30 +1114,31 @@ function createQaireTab()
1114 <div class='innerAll' style='background: #fff;'>"; 1114 <div class='innerAll' style='background: #fff;'>";
1115 1115
1116 //Supervisor Recommendation - By Manish on 20-02-17 1116 //Supervisor Recommendation - By Manish on 20-02-17
1117 //Supervisor Recommendation - By Prashant Jadhav on 07-11-17
1117 if($dataarr['clientcode']) 1118 if($dataarr['clientcode'])
1118 { 1119 {
1119 $supComnt = SupervisonComments::select('supvisor_recommends','id','agent_comments')->where('clientcode','=',$dataarr['clientcode'])->first(); 1120 $supComnt = DB::table('DU_CRM_SUPERVISOR_COMMENTS')->where('V_CUSTID','=',$dataarr['clientcode'])->orderBy('V_LAST_REVIEWED_ON','DESC')->limit(3)->get();
1120 $supervisorcomments=preg_replace("/[^ \w]+/", "", $supComnt['supvisor_recommends']);
1121 $agent_comments=preg_replace("/[^ \w]+/", "", $supComnt['agent_comments']);
1122 } 1121 }
1123 1122
1124 $data.="<p style='clear:both'><br>
1125 <label class=label-small_new style='width:25%;' title=''>Supervisor Recommendation: </label>
1126 <textarea id='dialer_userremarks' name='dialer_userremarks' style='width:40%' maxlength=250 placeholder='Only 250 Characters' readonly>".$supervisorcomments."</textarea>
1127 </p>";
1128 $data.="<p style='clear:both'>
1129 <label class=label-small_new style='width:25%;' title=''>Agent Comment: </label>";
1130 1123
1131 if($supComnt['agent_comments']) 1124 foreach($supComnt as $supervisorcomments)
1132 $data.="<textarea id='agent_comment' name='agent_comment' style='width:40%' maxlength=250 placeholder='Only 250 Characters'>".$agent_comments."</textarea>"; 1125 {
1133 else
1134 $data.="<textarea id='agent_comment' name='agent_comment' style='width:40%' maxlength=250 placeholder='Only 250 Characters'></textarea>";
1135 1126
1136 $data.="<input type='hidden' id='clientcode' value='".$dataarr['clientcode']."'> 1127 $data.="<p style='clear:both'><br>
1137 </p> 1128 <label style='width:15%;' title=''>Supervisor Recommendation:</label>
1138 <div class='container'> 1129 <textarea id='dialer_userremarks' name='dialer_userremarks' style='width:30%;height:100px;' maxlength=250 placeholder='Only 250 Characters' readonly>".$supervisorcomments->T_BM_INSTRUCTION."</textarea>&nbsp;&nbsp;&nbsp;&nbsp;<label style='width:15%;' title=''>BM Product Recommendation:</label><textarea id='dialer_userremarks' name='dialer_userremarks' style='width:20%;height:100px;' maxlength=250 placeholder='Only 250 Characters' readonly>".$supervisorcomments->T_BM_PRODUCT_RECO."</textarea><br><br>
1139 <input type=button id='submitComments' class='btn btn-info' value='Submit' style=' margin: 5px 0 5px 660px;'> 1130 <label style='width:15%;' title=''>Last Review On:</label>
1131 <label style='width:30%;' title=''>".$supervisorcomments->V_LAST_REVIEWED_ON."</label>";
1132 $data.="&nbsp;&nbsp;&nbsp;<label style='width:15%;' title=''>Agent Comment: </label>";
1133
1134 if($supervisorcomments->agent_comments)
1135 $data.="<textarea id='".$supervisorcomments->id."_agent_comment' name='agent_comment' style='width:20%;height:100px;' maxlength=250 placeholder='Only 250 Characters'>".$supervisorcomments->agent_comments."</textarea>";
1136 else
1137 $data.="<textarea id='".$supervisorcomments->id."_agent_comment' name='agent_comment' style='width:20%;height:100px;' maxlength=250 placeholder='Only 250 Characters'></textarea>";
1138 $data.="</p><div class='container'>
1139 <input type=button id='".$supervisorcomments->id."_submitComments' class='btn btn-info' value='Submit' onclick='updateagentcomments(".$supervisorcomments->id.");'style=' margin: 5px 0 5px 660px;'>
1140 </div>"; 1140 </div>";
1141 }
1141 1142
1142 $data.="<legend class='task_legend'>Primary Questions</legend> 1143 $data.="<legend class='task_legend'>Primary Questions</legend>
1143 1144
...@@ -1698,15 +1699,21 @@ function createQaireTab() ...@@ -1698,15 +1699,21 @@ function createQaireTab()
1698 doAjax('questionare',postdata,'createtaskdiv','ajaxMutex_recSaveData','singlethis','POST'); 1699 doAjax('questionare',postdata,'createtaskdiv','ajaxMutex_recSaveData','singlethis','POST');
1699 }); 1700 });
1700 1701
1701 $('#submitComments').click(function()
1702 {
1703 var agent_comment = $('#agent_comment').val();
1704 var clientcode = $('#clientcode').val();
1705 1702
1703
1704
1705
1706 });
1707 function updateagentcomments(id){
1708
1709
1710 var agent_comment = $('#'+id+'_agent_comment').val();
1706 if(agent_comment) 1711 if(agent_comment)
1707 { 1712 {
1708 var postdata='clientcode='+clientcode; 1713
1714 var postdata='id='+id;
1709 postdata+='&agent_comment='+agent_comment; 1715 postdata+='&agent_comment='+agent_comment;
1716 postdata+='&mobile='+'".$dataarr["mobile"]."';
1710 1717
1711 doAjax('record?action=savecomment',postdata,'createtaskdiv','ajaxMutex_recSaveData','singlethis','POST'); 1718 doAjax('record?action=savecomment',postdata,'createtaskdiv','ajaxMutex_recSaveData','singlethis','POST');
1712 } 1719 }
...@@ -1714,11 +1721,8 @@ function createQaireTab() ...@@ -1714,11 +1721,8 @@ function createQaireTab()
1714 { 1721 {
1715 alert('Please insert agent comment first'); 1722 alert('Please insert agent comment first');
1716 } 1723 }
1717 });
1718 1724
1719 1725 }
1720
1721 });
1722 1726
1723 </script> 1727 </script>
1724 1728
...@@ -3069,6 +3073,9 @@ function createRacingCust() ...@@ -3069,6 +3073,9 @@ function createRacingCust()
3069 postdata+='&relationship_with_group_id_next='+encodeURIComponent(relationshipgroupid); 3073 postdata+='&relationship_with_group_id_next='+encodeURIComponent(relationshipgroupid);
3070 postdata+='&new_group_addition_to_group='+encodeURIComponent(newGroupdditiongroup); 3074 postdata+='&new_group_addition_to_group='+encodeURIComponent(newGroupdditiongroup);
3071 postdata+='&racing_from='+encodeURIComponent(racingfrom); 3075 postdata+='&racing_from='+encodeURIComponent(racingfrom);
3076 postdata+='&mobile='+'".$dataarr["mobile"]."';
3077 postdata+='&client='+'".$dataarr["client"]."';
3078 postdata+='&clientcode='+'".$dataarr["clientcode"]."';
3072 3079
3073 doAjax('custrace',postdata,'createtaskdiv','ajaxMutex_recSaveData','singlethis','POST'); 3080 doAjax('custrace',postdata,'createtaskdiv','ajaxMutex_recSaveData','singlethis','POST');
3074 }); 3081 });
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!