Merge branch 'master' of http://54.197.18.130/yashwant/hdfc
Showing
5 changed files
with
223 additions
and
175 deletions
| ... | @@ -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"); |
| ... | @@ -1088,13 +1088,13 @@ public function show($id) | ... | @@ -1088,13 +1088,13 @@ public function show($id) |
| 1088 | return view("layout.module.dialer.questairereport",array()); | 1088 | return view("layout.module.dialer.questairereport",array()); |
| 1089 | } | 1089 | } |
| 1090 | if($id=="callmanagement") | 1090 | if($id=="callmanagement") |
| 1091 | { | 1091 | { |
| 1092 | return view("layout.module.dialer.callmanagementreport",array()); | 1092 | return view("layout.module.dialer.callmanagementreport",array()); |
| 1093 | } | 1093 | } |
| 1094 | if($id=="supmessages") | 1094 | if($id=="supmessages") |
| 1095 | { | 1095 | { |
| 1096 | return view("layout.module.dialer.supmessagesreport",array()); | 1096 | return view("layout.module.dialer.supmessagesreport",array()); |
| 1097 | } | 1097 | } |
| 1098 | 1098 | ||
| 1099 | if($id=='playrecfile') | 1099 | if($id=='playrecfile') |
| 1100 | { | 1100 | { |
| ... | @@ -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 | } |
| ... | @@ -1172,6 +1172,7 @@ public function show($id) | ... | @@ -1172,6 +1172,7 @@ public function show($id) |
| 1172 | $dbres=array(); | 1172 | $dbres=array(); |
| 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(); |
| ... | @@ -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,35 +80,43 @@ class QuestionareController extends Controller | ... | @@ -80,35 +80,43 @@ 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 | if($call_status=='ANSWER' && $call_id !="") | ||
| 84 | { | ||
| 85 | foreach($questionArray as $key=> $quesArray) | ||
| 86 | { | ||
| 87 | $explodeQues = explode("-", $key); | ||
| 83 | 88 | ||
| 84 | foreach($questionArray as $key=> $quesArray) | 89 | $ques = $explodeQues[1]; |
| 85 | { | 90 | $questionid=''; |
| 86 | $explodeQues = explode("-", $key); | 91 | $questioncallid=''; |
| 87 | |||
| 88 | $ques = $explodeQues[1]; | ||
| 89 | $questionid=''; | ||
| 90 | $questioncallid=''; | ||
| 91 | 92 | ||
| 92 | $questiondetails=DB::table("questionaire_details")->where("cust_id","=",$cust_id)->where("call_id","=",$call_id)->where("question","=",$ques)->select('call_id','question')->first(); | 93 | $questiondetails=DB::table("questionaire_details")->where("cust_id","=",$cust_id)->where("call_id","=",$call_id)->where("question","=",$ques)->select('call_id','question')->first(); |
| 93 | if($questiondetails) | 94 | if($questiondetails) |
| 94 | { | 95 | { |
| 95 | $questioncallid=$questiondetails->call_id; | 96 | $questioncallid=$questiondetails->call_id; |
| 96 | $questionid=$questiondetails->question; | 97 | $questionid=$questiondetails->question; |
| 97 | 98 | ||
| 98 | //echo $questioncallid."---".$questionid; | 99 | //echo $questioncallid."---".$questionid; |
| 99 | } | 100 | } |
| 100 | 101 | ||
| 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 | { |
| 108 | DB::statement("insert into 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."'"); | 109 | DB::statement("insert into 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."'"); |
| 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 | ... | ... |
| ... | @@ -23,68 +23,88 @@ class RacingCustomerController extends Controller | ... | @@ -23,68 +23,88 @@ class RacingCustomerController extends Controller |
| 23 | 23 | ||
| 24 | public function saveRacingCustomer() | 24 | public function saveRacingCustomer() |
| 25 | { | 25 | { |
| 26 | //$product_code = Input::get("product_code"); | 26 | //$product_code = Input::get("product_code"); |
| 27 | $pb_name = Input::get("pb_name"); | 27 | $pb_name = Input::get("pb_name"); |
| 28 | $pb_code = Input::get("pb_code"); | 28 | $pb_code = Input::get("pb_code"); |
| 29 | $pb_landline_contact_no = Input::get("pb_landline_contact_no"); | 29 | $pb_landline_contact_no = Input::get("pb_landline_contact_no"); |
| 30 | $supervisor_mail_id = Input::get("supervisor_mail_id"); | 30 | $supervisor_mail_id = Input::get("supervisor_mail_id"); |
| 31 | $group_id = Input::get("group_id"); | 31 | $group_id = Input::get("group_id"); |
| 32 | $group_id_name = Input::get("group_id_name"); | 32 | $group_id_name = Input::get("group_id_name"); |
| 33 | $cust_id = Input::get("cust_id"); | 33 | $cust_id = Input::get("cust_id"); |
| 34 | $cust_name = Input::get("cust_name"); | 34 | $cust_name = Input::get("cust_name"); |
| 35 | $relationship_with_group_id = Input::get("relationship_with_group_id"); | 35 | $relationship_with_group_id = Input::get("relationship_with_group_id"); |
| 36 | $cust_id_next = Input::get("cust_id_next"); | 36 | $cust_id_next = Input::get("cust_id_next"); |
| 37 | $cust_name_next = Input::get("cust_name_next"); | 37 | $cust_name_next = Input::get("cust_name_next"); |
| 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 | $user_id = Auth::user()->username; | ||
| 42 | $clientcode = Input::get('clientcode'); | ||
| 43 | $mobile = Input::get('mobile'); | ||
| 44 | $client = Input::get('client'); | ||
| 45 | if($pb_name=="")return "<script>simpleNotification('error','topRight','please enter pb name');</script>"; | ||
| 46 | if($pb_code=="")return "<script>simpleNotification('error','topRight','please enter pb code');</script>"; | ||
| 47 | if($pb_landline_contact_no=="")return "<script>simpleNotification('error','topRight','please enter PB landline Contact No.');</script>"; | ||
| 48 | if($supervisor_mail_id=="")return "<script>simpleNotification('error','topRight','please enter Supervisor Mail ID');</script>"; | ||
| 49 | if($group_id=="")return "<script>simpleNotification('error','topRight','please enter Group ID');</script>"; | ||
| 50 | if($group_id_name=="")return "<script>simpleNotification('error','topRight','please enter Group ID Name');</script>"; | ||
| 51 | if($cust_id=="")return "<script>simpleNotification('error','topRight','please enter Cust ID');</script>"; | ||
| 52 | if($cust_name=="")return "<script>simpleNotification('error','topRight','please enter Cust Name');</script>"; | ||
| 53 | if($relationship_with_group_id=="")return "<script>simpleNotification('error','topRight','please enter Relationship With Group ID');</script>"; | ||
| 54 | if($cust_id_next=="")return "<script>simpleNotification('error','topRight','please enter Cust ID');</script>"; | ||
| 55 | if($cust_name_next=="")return "<script>simpleNotification('error','topRight','please enter Cust Name');</script>"; | ||
| 56 | if($relationship_with_group_id_next=="")return "<script>simpleNotification('error','topRight','please enter Relationship With Group ID');</script>"; | ||
| 57 | if($new_group_addition_to_group=="")return "<script>simpleNotification('error','topRight','please select Grouping');</script>"; | ||
| 58 | if($racing_from=="")return "<script>simpleNotification('error','topRight','please enter Racing From');</script>"; | ||
| 41 | 59 | ||
| 42 | if($pb_name=="")return "<script>simpleNotification('error','topRight','please enter pb name');</script>"; | 60 | $crmcallDetails=CRMCall::where('number','like','%'.substr($mobile,-10).'%')->orderBy("created_at","DESC")->first(); |
| 43 | 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>"; | ||
| 45 | if($supervisor_mail_id=="")return "<script>simpleNotification('error','topRight','please enter Supervisor Mail ID');</script>"; | ||
| 46 | if($group_id=="")return "<script>simpleNotification('error','topRight','please enter Group ID');</script>"; | ||
| 47 | if($group_id_name=="")return "<script>simpleNotification('error','topRight','please enter Group ID Name');</script>"; | ||
| 48 | if($cust_id=="")return "<script>simpleNotification('error','topRight','please enter Cust ID');</script>"; | ||
| 49 | if($cust_name=="")return "<script>simpleNotification('error','topRight','please enter Cust Name');</script>"; | ||
| 50 | if($relationship_with_group_id=="")return "<script>simpleNotification('error','topRight','please enter Relationship With Group ID');</script>"; | ||
| 51 | if($cust_id_next=="")return "<script>simpleNotification('error','topRight','please enter Cust ID');</script>"; | ||
| 52 | if($cust_name_next=="")return "<script>simpleNotification('error','topRight','please enter Cust Name');</script>"; | ||
| 53 | if($relationship_with_group_id_next=="")return "<script>simpleNotification('error','topRight','please enter Relationship With Group ID');</script>"; | ||
| 54 | 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>"; | ||
| 56 | 61 | ||
| 57 | $setracingCutomer = array(); | 62 | if($crmcallDetails) |
| 63 | { | ||
| 64 | $call_id = $crmcallDetails->id; | ||
| 65 | $call_status = $crmcallDetails->status; | ||
| 66 | $crm_id = $crmcallDetails->crm_id; | ||
| 67 | } | ||
| 58 | 68 | ||
| 59 | $setracingCutomer[]="date='".date("Y-m-d H:i:s")."'"; | 69 | $setracingCutomer = array(); |
| 60 | //$setracingCutomer[]="product_code='$product_code'"; | ||
| 61 | $setracingCutomer[]="pb_name='$pb_name'"; | ||
| 62 | $setracingCutomer[]="pb_code='$pb_code'"; | ||
| 63 | $setracingCutomer[]="pb_landline_contact_no='$pb_landline_contact_no'"; | ||
| 64 | $setracingCutomer[]="supervisor_mail_id='$supervisor_mail_id'"; | ||
| 65 | $setracingCutomer[]="group_id='$group_id'"; | ||
| 66 | $setracingCutomer[]="group_id_name='$group_id_name'"; | ||
| 67 | $setracingCutomer[]="cust_id='$cust_id'"; | ||
| 68 | $setracingCutomer[]="cust_name='$cust_name'"; | ||
| 69 | $setracingCutomer[]="relationship_with_group_id='$relationship_with_group_id'"; | ||
| 70 | $setracingCutomer[]="cust_id_next='$cust_id_next'"; | ||
| 71 | $setracingCutomer[]="cust_name_next='$cust_name_next'"; | ||
| 72 | $setracingCutomer[]="relationship_with_group_id_next='$relationship_with_group_id_next'"; | ||
| 73 | $setracingCutomer[]="new_group_addition_to_group='$new_group_addition_to_group'"; | ||
| 74 | $setracingCutomer[]="racing_from='$racing_from'"; | ||
| 75 | 70 | ||
| 76 | $setracingCut=implode(",",$setracingCutomer); | 71 | $setracingCutomer[]="date='".date("Y-m-d H:i:s")."'"; |
| 72 | //$setracingCutomer[]="product_code='$product_code'"; | ||
| 73 | $setracingCutomer[]="pb_name='$pb_name'"; | ||
| 74 | $setracingCutomer[]="pb_code='$client'"; | ||
| 75 | $setracingCutomer[]="pb_landline_contact_no='$pb_landline_contact_no'"; | ||
| 76 | $setracingCutomer[]="supervisor_mail_id='$supervisor_mail_id'"; | ||
| 77 | $setracingCutomer[]="group_id='$group_id'"; | ||
| 78 | $setracingCutomer[]="group_id_name='$group_id_name'"; | ||
| 79 | $setracingCutomer[]="cust_id='$cust_id'"; | ||
| 80 | $setracingCutomer[]="cust_name='$cust_name'"; | ||
| 81 | $setracingCutomer[]="relationship_with_group_id='$relationship_with_group_id'"; | ||
| 82 | $setracingCutomer[]="cust_id_next='$cust_id_next'"; | ||
| 83 | $setracingCutomer[]="cust_name_next='$cust_name_next'"; | ||
| 84 | $setracingCutomer[]="relationship_with_group_id_next='$relationship_with_group_id_next'"; | ||
| 85 | $setracingCutomer[]="new_group_addition_to_group='$new_group_addition_to_group'"; | ||
| 86 | $setracingCutomer[]="racing_from='$racing_from'"; | ||
| 87 | $setracingCutomer[]="call_id='$call_id'"; | ||
| 77 | 88 | ||
| 78 | DB::statement("insert into potentialcustomer_details set $setracingCut"); | 89 | $setracingCut=implode(",",$setracingCutomer); |
| 79 | 90 | ||
| 80 | return "<script>simpleNotification('success','topRight','Customer Details Saved Successfully');</script>"; | 91 | if($call_status=='ANSWER' && $call_id!="") |
| 92 | { | ||
| 93 | DB::statement("insert into potentialcustomer_details set $setracingCut"); | ||
| 94 | |||
| 95 | return "<script>simpleNotification('success','topRight','Customer Details Saved Successfully');</script>"; | ||
| 96 | } | ||
| 97 | else | ||
| 98 | { | ||
| 99 | return "<script>simpleNotification('error','topRight','Please Get on call first');</script>"; | ||
| 100 | } | ||
| 81 | } | 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 | } | ... | ... |
application/app/Http/Controllers/RecordController.php
100755 → 100644
| ... | @@ -7,23 +7,27 @@ use App\Models\Notification; | ... | @@ -7,23 +7,27 @@ 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 | ||
| 13 | 17 | ||
| 14 | public function __construct() | 18 | public function __construct() |
| 15 | { | 19 | { |
| 16 | $this->middleware('auth'); | 20 | $this->middleware('auth'); |
| 17 | $this->middleware('module_access'); | 21 | $this->middleware('module_access'); |
| 18 | } | 22 | } |
| 19 | 23 | ||
| 20 | public function index() | 24 | public function index() |
| 21 | { | 25 | { |
| 22 | return view('layout.module.record.index',array()); | 26 | return view('layout.module.record.index',array()); |
| 23 | } | 27 | } |
| 24 | public function create() | 28 | public function create() |
| 25 | { | 29 | { |
| 26 | // | 30 | // |
| 27 | } | 31 | } |
| 28 | public function store() | 32 | public function store() |
| 29 | { | 33 | { |
| ... | @@ -49,7 +53,7 @@ class RecordController extends Controller { | ... | @@ -49,7 +53,7 @@ class RecordController extends Controller { |
| 49 | if($action=="addkey") | 53 | if($action=="addkey") |
| 50 | { | 54 | { |
| 51 | $wakka = new KHRMSLib(); | 55 | $wakka = new KHRMSLib(); |
| 52 | 56 | ||
| 53 | $varid=Input::get("varid"); | 57 | $varid=Input::get("varid"); |
| 54 | $keys=explode(",",Input::get("keys")); | 58 | $keys=explode(",",Input::get("keys")); |
| 55 | $record=$wakka->getPerson($varid); | 59 | $record=$wakka->getPerson($varid); |
| ... | @@ -58,18 +62,18 @@ class RecordController extends Controller { | ... | @@ -58,18 +62,18 @@ class RecordController extends Controller { |
| 58 | $val=Input::get($key); | 62 | $val=Input::get($key); |
| 59 | $record["peopledata"][$key]=$val; | 63 | $record["peopledata"][$key]=$val; |
| 60 | } | 64 | } |
| 61 | 65 | ||
| 62 | $wakka->setPerson($varid,$record); | 66 | $wakka->setPerson($varid,$record); |
| 63 | 67 | ||
| 64 | return Response::make(""); | 68 | return Response::make(""); |
| 65 | } | 69 | } |
| 66 | if($action=="delaltphone") | 70 | if($action=="delaltphone") |
| 67 | { | 71 | { |
| 68 | $wakka = new KHRMSLib(); | 72 | $wakka = new KHRMSLib(); |
| 69 | 73 | ||
| 70 | $varid=Input::get("varid"); | 74 | $varid=Input::get("varid"); |
| 71 | $i=Input::get("i"); | 75 | $i=Input::get("i"); |
| 72 | 76 | ||
| 73 | $record=$wakka->getPerson($varid); | 77 | $record=$wakka->getPerson($varid); |
| 74 | for($k=$i+1;$k<=10;$k++,$i++) | 78 | for($k=$i+1;$k<=10;$k++,$i++) |
| 75 | { | 79 | { |
| ... | @@ -78,7 +82,7 @@ class RecordController extends Controller { | ... | @@ -78,7 +82,7 @@ class RecordController extends Controller { |
| 78 | } | 82 | } |
| 79 | $record["peopledata"]["altphone10"]=""; | 83 | $record["peopledata"]["altphone10"]=""; |
| 80 | $record["peopledata"]["altphone_lbl_10"]=""; | 84 | $record["peopledata"]["altphone_lbl_10"]=""; |
| 81 | 85 | ||
| 82 | $wakka->setPerson($varid,$record); | 86 | $wakka->setPerson($varid,$record); |
| 83 | } | 87 | } |
| 84 | if($action=="bulkupload") | 88 | if($action=="bulkupload") |
| ... | @@ -86,13 +90,13 @@ class RecordController extends Controller { | ... | @@ -86,13 +90,13 @@ class RecordController extends Controller { |
| 86 | return view('layout.module.record.bulkupload',$data); | 90 | return view('layout.module.record.bulkupload',$data); |
| 87 | } | 91 | } |
| 88 | if($action=="callclient") | 92 | if($action=="callclient") |
| 89 | { | 93 | { |
| 90 | $clientSel = Input::get('client'); | 94 | $clientSel = Input::get('client'); |
| 91 | 95 | ||
| 92 | $clientcodeSel = DB::table('records')->where('client','=',$clientSel)->select('clientcode')->orderBy('clientcode','ASC')->get(); | 96 | $clientcodeSel = DB::table('records')->where('client','=',$clientSel)->select('clientcode')->orderBy('clientcode','ASC')->get(); |
| 93 | 97 | ||
| 94 | return $clientcodeSel; | 98 | return $clientcodeSel; |
| 95 | } | 99 | } |
| 96 | if($action=="questionlist") | 100 | if($action=="questionlist") |
| 97 | { | 101 | { |
| 98 | $clientcode = Input::get('clientcode'); | 102 | $clientcode = Input::get('clientcode'); |
| ... | @@ -121,21 +125,29 @@ class RecordController extends Controller { | ... | @@ -121,21 +125,29 @@ class RecordController extends Controller { |
| 121 | 125 | ||
| 122 | } | 126 | } |
| 123 | if($action=="savecomment") | 127 | if($action=="savecomment") |
| 124 | { | 128 | { |
| 125 | $agentArray = array(); | 129 | $id = Input::get('id'); |
| 126 | $wakka = new KHRMSLib(); | 130 | $agent_comments = Input::get('agent_comment'); |
| 127 | 131 | $agent_comments = preg_replace("/[^ \w]+/", "",$agent_comments); | |
| 128 | $clientcode = Input::get('clientcode'); | 132 | $user_id=Auth::user()->id; |
| 129 | $agent_comments = Input::get('agent_comment'); | 133 | $mobile = Input::get('mobile'); |
| 130 | $agent_comments = preg_replace("/[^ \w]+/", "",$agent_comments); | 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 | } | |
| 138 | } | 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 | } | ||
| 150 | } | ||
| 139 | 151 | ||
| 140 | } | 152 | } |
| 141 | public function show($id) | 153 | public function show($id) |
| ... | @@ -153,11 +165,11 @@ class RecordController extends Controller { | ... | @@ -153,11 +165,11 @@ class RecordController extends Controller { |
| 153 | } | 165 | } |
| 154 | public function edit($id) | 166 | public function edit($id) |
| 155 | { | 167 | { |
| 156 | // | 168 | // |
| 157 | } | 169 | } |
| 158 | public function update($id) | 170 | public function update($id) |
| 159 | { | 171 | { |
| 160 | // | 172 | // |
| 161 | } | 173 | } |
| 162 | public function destroy($id) | 174 | public function destroy($id) |
| 163 | { | 175 | { |
| ... | @@ -167,7 +179,7 @@ class RecordController extends Controller { | ... | @@ -167,7 +179,7 @@ class RecordController extends Controller { |
| 167 | 179 | ||
| 168 | public function dashboard() | 180 | public function dashboard() |
| 169 | { | 181 | { |
| 170 | //echo "OK"; | 182 | //echo "OK"; |
| 171 | } | 183 | } |
| 172 | 184 | ||
| 173 | public function supervisorUpload() | 185 | public function supervisorUpload() |
| ... | @@ -177,30 +189,30 @@ class RecordController extends Controller { | ... | @@ -177,30 +189,30 @@ class RecordController extends Controller { |
| 177 | 189 | ||
| 178 | $data['wakka'] = new KHRMSLib(); | 190 | $data['wakka'] = new KHRMSLib(); |
| 179 | $dashboarduser=Auth::user(); | 191 | $dashboarduser=Auth::user(); |
| 180 | //$allusers=User::where('supervisor','=',$dashboarduser->username)->get(); | 192 | //$allusers=User::where('supervisor','=',$dashboarduser->username)->get(); |
| 181 | 193 | ||
| 182 | 194 | ||
| 183 | $allusers=User::where(function ($query) use($dashboarduser) { | 195 | $allusers=User::where(function ($query) use($dashboarduser) { |
| 184 | $query->where('supervisor','=',$dashboarduser->username) | 196 | $query->where('supervisor','=',$dashboarduser->username) |
| 185 | ->orWhere('lteam2','=',$dashboarduser->username) | 197 | ->orWhere('lteam2','=',$dashboarduser->username) |
| 186 | ->orWhere('lteam','=',$dashboarduser->username); | 198 | ->orWhere('lteam','=',$dashboarduser->username); |
| 187 | })->get(); | 199 | })->get(); |
| 188 | //echo "<pre>".print_r($allusers)."</pre>"; | 200 | //echo "<pre>".print_r($allusers)."</pre>"; |
| 189 | 201 | ||
| 190 | 202 | ||
| 191 | /*$allusers=User::where('supervisor','=',$dashboarduser->username)->orWhere('lteam2','=',$dashboarduser->username)->orWhere('lteam','=',$dashboarduser->username)->get();*/ | 203 | /*$allusers=User::where('supervisor','=',$dashboarduser->username)->orWhere('lteam2','=',$dashboarduser->username)->orWhere('lteam','=',$dashboarduser->username)->get();*/ |
| 192 | //$allusers=User::where('supervisor','=','A20971')->get(); | 204 | //$allusers=User::where('supervisor','=','A20971')->get(); |
| 193 | 205 | ||
| 194 | 206 | ||
| 195 | foreach($allusers as $alluser){ | 207 | foreach($allusers as $alluser){ |
| 196 | $usrData = json_decode($alluser->data); | 208 | $usrData = json_decode($alluser->data); |
| 197 | 209 | ||
| 198 | $usrHRMSData = unserialize($usrData->hrmsdata); | 210 | $usrHRMSData = unserialize($usrData->hrmsdata); |
| 199 | 211 | ||
| 200 | if($usrHRMSData['clientsownerlist']&&$usrHRMSData['clientsownerlist']!='null') | 212 | if($usrHRMSData['clientsownerlist']&&$usrHRMSData['clientsownerlist']!='null') |
| 201 | $client[] = $usrHRMSData['clientsownerlist']; | 213 | $client[] = $usrHRMSData['clientsownerlist']; |
| 202 | 214 | ||
| 203 | $username[] = $alluser->username; | 215 | $username[] = $alluser->username; |
| 204 | } | 216 | } |
| 205 | 217 | ||
| 206 | $data['client'] = $client; | 218 | $data['client'] = $client; |
| ... | @@ -208,15 +220,14 @@ class RecordController extends Controller { | ... | @@ -208,15 +220,14 @@ class RecordController extends Controller { |
| 208 | 220 | ||
| 209 | return view('layout.module.record.commentsUpload',$data); | 221 | return view('layout.module.record.commentsUpload',$data); |
| 210 | } | 222 | } |
| 211 | public function rlpPbwise() | 223 | public function rlpPbwise() |
| 212 | { | 224 | { |
| 213 | $data = array(); | 225 | $data = array(); |
| 214 | 226 | ||
| 215 | $pbcode=Input::get('pbcode'); | 227 | $pbcode=Input::get('pbcode'); |
| 216 | |||
| 217 | $data['pbcode']=$pbcode; | ||
| 218 | return view('layout.module.record.rlppbwise',$data); | ||
| 219 | |||
| 220 | } | ||
| 221 | } | ||
| 222 | 228 | ||
| 229 | $data['pbcode']=$pbcode; | ||
| 230 | return view('layout.module.record.rlppbwise',$data); | ||
| 231 | } | ||
| 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> | 1123 | |
| 1125 | <label class=label-small_new style='width:25%;' title=''>Supervisor Recommendation: </label> | 1124 | foreach($supComnt as $supervisorcomments) |
| 1126 | <textarea id='dialer_userremarks' name='dialer_userremarks' style='width:40%' maxlength=250 placeholder='Only 250 Characters' readonly>".$supervisorcomments."</textarea> | 1125 | { |
| 1127 | </p>"; | 1126 | |
| 1128 | $data.="<p style='clear:both'> | 1127 | $data.="<p style='clear:both'><br> |
| 1129 | <label class=label-small_new style='width:25%;' title=''>Agent Comment: </label>"; | 1128 | <label style='width:15%;' title=''>Supervisor Recommendation:</label> |
| 1130 | 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> <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> | |
| 1131 | if($supComnt['agent_comments']) | 1130 | <label style='width:15%;' title=''>Last Review On:</label> |
| 1132 | $data.="<textarea id='agent_comment' name='agent_comment' style='width:40%' maxlength=250 placeholder='Only 250 Characters'>".$agent_comments."</textarea>"; | 1131 | <label style='width:30%;' title=''>".$supervisorcomments->V_LAST_REVIEWED_ON."</label>"; |
| 1133 | else | 1132 | $data.=" <label style='width:15%;' title=''>Agent Comment: </label>"; |
| 1134 | $data.="<textarea id='agent_comment' name='agent_comment' style='width:40%' maxlength=250 placeholder='Only 250 Characters'></textarea>"; | 1133 | |
| 1135 | 1134 | if($supervisorcomments->agent_comments) | |
| 1136 | $data.="<input type='hidden' id='clientcode' value='".$dataarr['clientcode']."'> | 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>"; |
| 1137 | </p> | 1136 | else |
| 1138 | <div class='container'> | 1137 | $data.="<textarea id='".$supervisorcomments->id."_agent_comment' name='agent_comment' style='width:20%;height:100px;' maxlength=250 placeholder='Only 250 Characters'></textarea>"; |
| 1139 | <input type=button id='submitComments' class='btn btn-info' value='Submit' style=' margin: 5px 0 5px 660px;'> | 1138 | $data.="</p><div class='container'> |
| 1140 | </div>"; | 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>"; | ||
| 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 | |
| 1702 | { | 1703 | |
| 1703 | var agent_comment = $('#agent_comment').val(); | 1704 | |
| 1704 | var clientcode = $('#clientcode').val(); | 1705 | |
| 1706 | }); | ||
| 1707 | function updateagentcomments(id){ | ||
| 1705 | 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 | |
| 1709 | postdata+='&agent_comment='+agent_comment; | 1714 | var postdata='id='+id; |
| 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 | |||
| 1719 | 1724 | ||
| 1720 | 1725 | } | |
| 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 | }); | ... | ... |
-
Please register or sign in to post a comment