9be4338a by Gopal

Javascript changes to display callbackdate time and add lead id value dynamicall…

…y using conf variable
1 parent 7a6176a2
1 <?php namespace App\Jobs; 1 <?php namespace App\Jobs;
2
3 use Storage; 2 use Storage;
4 use Auth; 3 use Auth;
5 use Input; 4 use Input;
...@@ -11,7 +10,6 @@ use DB; ...@@ -11,7 +10,6 @@ use DB;
11 $dashboarduser=Auth::user(); 10 $dashboarduser=Auth::user();
12 use App\Models\SupervisonComments; 11 use App\Models\SupervisonComments;
13 use App\Models\Record; 12 use App\Models\Record;
14
15 class KFormLib 13 class KFormLib
16 { 14 {
17 private $themehome=''; 15 private $themehome='';
...@@ -29,14 +27,12 @@ class KFormLib ...@@ -29,14 +27,12 @@ class KFormLib
29 public $FormSelectVals=array(); 27 public $FormSelectVals=array();
30 28
31 private $objcache=array(); 29 private $objcache=array();
32
33 public $HRFiledsStr=""; 30 public $HRFiledsStr="";
34 public $HRFieldNames=array(); 31 public $HRFieldNames=array();
35 public $HRFileFieldsStr=""; 32 public $HRFileFieldsStr="";
36 public $HRDateFilds=""; 33 public $HRDateFilds="";
37 public $HRDropFilds=""; 34 public $HRDropFilds="";
38 public $HRForms=array(); 35 public $HRForms=array();
39
40 public function __construct($formstr) 36 public function __construct($formstr)
41 { 37 {
42 // $user_camapign=Auth::user()->sel_campaign; 38 // $user_camapign=Auth::user()->sel_campaign;
...@@ -49,17 +45,12 @@ class KFormLib ...@@ -49,17 +45,12 @@ class KFormLib
49 // /*echo "<pre>"; 45 // /*echo "<pre>";
50 // print_r($campaign_crmfields[0]->mvalue);*/ 46 // print_r($campaign_crmfields[0]->mvalue);*/
51 // $crmfields_coreData=$campaign_crmfields[0]->mvalue; 47 // $crmfields_coreData=$campaign_crmfields[0]->mvalue;
52
53 // $data_test[1]=explode('=',$crmfields_coreData); 48 // $data_test[1]=explode('=',$crmfields_coreData);
54 // $test=implode(" ",$data_test[1]); 49 // $test=implode(" ",$data_test[1]);
55
56 50
57 //echo "<pre>".print_r($data_test[1])."Daat Test"; 51 //echo "<pre>".print_r($data_test[1])."Daat Test";
58
59 /*$campaign_crmfields=DB::select('select mvalue from hrms_masters where mtype=coreconfig AND mkey=$user_camapign'); 52 /*$campaign_crmfields=DB::select('select mvalue from hrms_masters where mtype=coreconfig AND mkey=$user_camapign');
60
61 $data_test[0]=explode('=',$campaign_crmfields);*/ 53 $data_test[0]=explode('=',$campaign_crmfields);*/
62
63 /* Old Code for CRM*/ 54 /* Old Code for CRM*/
64 //$fields=explode(",",$formstr); 55 //$fields=explode(",",$formstr);
65 $fields=explode(",",$formstr); 56 $fields=explode(",",$formstr);
...@@ -70,7 +61,6 @@ class KFormLib ...@@ -70,7 +61,6 @@ class KFormLib
70 { 61 {
71 $this->HRFiledsStr.=$parts[0].","; 62 $this->HRFiledsStr.=$parts[0].",";
72 $this->HRFieldNames[$parts[0]]=$parts[2]; 63 $this->HRFieldNames[$parts[0]]=$parts[2];
73
74 if($parts[1]=="F")$this->HRFileFieldsStr.=$parts[0].","; 64 if($parts[1]=="F")$this->HRFileFieldsStr.=$parts[0].",";
75 else if($parts[1]=="D")$this->HRDateFilds.=$parts[0].","; 65 else if($parts[1]=="D")$this->HRDateFilds.=$parts[0].",";
76 else if($parts[1]=="S"||$parts[1]=="M") 66 else if($parts[1]=="S"||$parts[1]=="M")
...@@ -79,7 +69,6 @@ class KFormLib ...@@ -79,7 +69,6 @@ class KFormLib
79 if(isset($parts[11])){$this->FormSelectVals[$parts[0]]=$parts[11];} 69 if(isset($parts[11])){$this->FormSelectVals[$parts[0]]=$parts[11];}
80 else {$this->FormSelectVals[$parts[0]]="";} 70 else {$this->FormSelectVals[$parts[0]]="";}
81 } 71 }
82
83 $this->HRForms[$parts[3]][$parts[4]][]=array($parts[5],$parts[6],$parts[7],$parts[8],$parts[9],$parts[0],$parts[1],$parts[2],$parts[10]); 72 $this->HRForms[$parts[3]][$parts[4]][]=array($parts[5],$parts[6],$parts[7],$parts[8],$parts[9],$parts[0],$parts[1],$parts[2],$parts[10]);
84 } 73 }
85 } 74 }
...@@ -87,7 +76,6 @@ class KFormLib ...@@ -87,7 +76,6 @@ class KFormLib
87 $this->themehome=url("userfiles/templates/hrms");//TODO 76 $this->themehome=url("userfiles/templates/hrms");//TODO
88 $this->storagehome=storage_path('app/templates/hrms'); 77 $this->storagehome=storage_path('app/templates/hrms');
89 } 78 }
90
91 public function data($config) 79 public function data($config)
92 { 80 {
93 $this->varid=$this->getConfig('varid',$config,''); 81 $this->varid=$this->getConfig('varid',$config,'');
...@@ -110,7 +98,6 @@ class KFormLib ...@@ -110,7 +98,6 @@ class KFormLib
110 if(isset($config[$str]))return $config[$str]; 98 if(isset($config[$str]))return $config[$str];
111 return $default; 99 return $default;
112 } 100 }
113
114 function recruitFileLink($filename) 101 function recruitFileLink($filename)
115 { 102 {
116 $themehome=$this->themehome; 103 $themehome=$this->themehome;
...@@ -131,7 +118,6 @@ class KFormLib ...@@ -131,7 +118,6 @@ class KFormLib
131 if($this->gthis=='')$this->gthis=new KHRMSLib(); 118 if($this->gthis=='')$this->gthis=new KHRMSLib();
132 $this->FormSelectVals[$selId]=implode("~",$this->gthis->clientsReadAccess()); 119 $this->FormSelectVals[$selId]=implode("~",$this->gthis->clientsReadAccess());
133 } 120 }
134
135 if(isset($this->FormSelectVals[$selId])) 121 if(isset($this->FormSelectVals[$selId]))
136 { 122 {
137 $values=explode("~",$this->FormSelectVals[$selId]);sort($values); 123 $values=explode("~",$this->FormSelectVals[$selId]);sort($values);
...@@ -169,14 +155,12 @@ class KFormLib ...@@ -169,14 +155,12 @@ class KFormLib
169 if($dataarr[$id]!='')$selarr[]=$dataarr[$id]; 155 if($dataarr[$id]!='')$selarr[]=$dataarr[$id];
170 $list=$this->fillSelect($id,$selarr); 156 $list=$this->fillSelect($id,$selarr);
171 $list="<option value=''>&nbsp;</option>".$list; 157 $list="<option value=''>&nbsp;</option>".$list;
172
173 $data="<p style='clear:both'> 158 $data="<p style='clear:both'>
174 <label class=label-small_new style='width:25%'>".$this->HRFieldNames[$id].": </label> 159 <label class=label-small_new style='width:25%'>".$this->HRFieldNames[$id].": </label>
175 <select id='$id' name='$id' class='form_hrm_select select2multi' style='width:50%'>$list</select> 160 <select id='$id' name='$id' class='form_hrm_select select2multi' style='width:50%'>$list</select>
176 <span class=field_desc></span><span class=validate_success></span> 161 <span class=field_desc></span><span class=validate_success></span>
177 <span class=validate_error>".((isset($fdirty[$id]))?$fdirtytxt:'')."</span> 162 <span class=validate_error>".((isset($fdirty[$id]))?$fdirtytxt:'')."</span>
178 </p>"; 163 </p>";
179
180 if(!$isuser||!$edituser) 164 if(!$isuser||!$edituser)
181 { 165 {
182 $data="<p style='clear:both'> 166 $data="<p style='clear:both'>
...@@ -186,12 +170,10 @@ class KFormLib ...@@ -186,12 +170,10 @@ class KFormLib
186 <span class=validate_error>".((isset($fdirty[$id]))?$fdirtytxt:'')."</span> 170 <span class=validate_error>".((isset($fdirty[$id]))?$fdirtytxt:'')."</span>
187 </p>"; 171 </p>";
188 } 172 }
189
190 return $data; 173 return $data;
191 } 174 }
192 function makeMultiSelect($id,$helptxt) 175 function makeMultiSelect($id,$helptxt)
193 { 176 {
194
195 } 177 }
196 function makeTextBox($id,$size,$type="text") 178 function makeTextBox($id,$size,$type="text")
197 { 179 {
...@@ -202,15 +184,10 @@ function makeTextBox($id,$size,$type="text") ...@@ -202,15 +184,10 @@ function makeTextBox($id,$size,$type="text")
202 $fdirtytxt=$this->fdirtytxt; 184 $fdirtytxt=$this->fdirtytxt;
203 $isuser=$this->isuser; 185 $isuser=$this->isuser;
204 $varid=$this->varid; 186 $varid=$this->varid;
205
206 if(strstr($this->HRDateFilds,$id)&&!$gthis->IsAdmin()){$ro="";$formatstr='DD.MM.YYYY';} 187 if(strstr($this->HRDateFilds,$id)&&!$gthis->IsAdmin()){$ro="";$formatstr='DD.MM.YYYY';}
207
208 if($type=="text")$size.=" capText"; 188 if($type=="text")$size.=" capText";
209 if($id=='emailid')$maillnk=" <a href='mailto:$dataarr[$id]'>Mail</a> "; 189 if($id=='emailid')$maillnk=" <a href='mailto:$dataarr[$id]'>Mail</a> ";
210
211 if($gthis->IsAdmin()&&$fdirty[$id]&&strstr($gthis->HRCoreVars["RequiredApproval"],$id))$approvaltxt="<input type=button class='btn btn-green' value='Approve' onclick='approveFData(\"$id\",\"$varid\");return false;'>"; 190 if($gthis->IsAdmin()&&$fdirty[$id]&&strstr($gthis->HRCoreVars["RequiredApproval"],$id))$approvaltxt="<input type=button class='btn btn-green' value='Approve' onclick='approveFData(\"$id\",\"$varid\");return false;'>";
212
213
214 $data="<p style='clear:both'> 191 $data="<p style='clear:both'>
215 <label class=label-small_new style='width:25%;' title=$formatstr>".$this->HRFieldNames[$id].": </label> 192 <label class=label-small_new style='width:25%;' title=$formatstr>".$this->HRFieldNames[$id].": </label>
216 <input ".($type=="file"?" style='display:inline-block' size=9":"class='$size'")." id='$id' name='$id' type='$type' value='$dataarr[$id]' $ro /> 193 <input ".($type=="file"?" style='display:inline-block' size=9":"class='$size'")." id='$id' name='$id' type='$type' value='$dataarr[$id]' $ro />
...@@ -226,11 +203,8 @@ if(!$isuser||!$edituser) ...@@ -226,11 +203,8 @@ if(!$isuser||!$edituser)
226 <span class=validate_success></span><span class=validate_error>".((isset($fdirty[$id]))?$fdirtytxt:'')."</span> 203 <span class=validate_success></span><span class=validate_error>".((isset($fdirty[$id]))?$fdirtytxt:'')."</span>
227 </p>"; 204 </p>";
228 } 205 }
229
230 return $data; 206 return $data;
231 } 207 }
232
233
234 //Changes Done On 10-Sept-16 for removing Required By Manish 208 //Changes Done On 10-Sept-16 for removing Required By Manish
235 function makeLabelText($id,$size,$type="text") 209 function makeLabelText($id,$size,$type="text")
236 { 210 {
...@@ -238,9 +212,7 @@ function makeLabelText($id,$size,$type="text") ...@@ -238,9 +212,7 @@ function makeLabelText($id,$size,$type="text")
238 $dataarr=$this->recruitdata["peopledata"]; 212 $dataarr=$this->recruitdata["peopledata"];
239 $gthis=$this->gthis; 213 $gthis=$this->gthis;
240 $fdirtytxt=$this->fdirtytxt; 214 $fdirtytxt=$this->fdirtytxt;
241
242 if(strstr($this->HRDateFilds,$id)){$ro="readonly=readonly";$formatstr='DD.MM.YYYY';} 215 if(strstr($this->HRDateFilds,$id)){$ro="readonly=readonly";$formatstr='DD.MM.YYYY';}
243
244 if($id=="ucic_id"){ 216 if($id=="ucic_id"){
245 $data="<p style='clear:both;background-color:#e6e5ef;'> 217 $data="<p style='clear:both;background-color:#e6e5ef;'>
246 <label class=label-small_new style='width:25%'>".$this->HRFieldNames[$id].": </label> 218 <label class=label-small_new style='width:25%'>".$this->HRFieldNames[$id].": </label>
...@@ -248,7 +220,6 @@ function makeLabelText($id,$size,$type="text") ...@@ -248,7 +220,6 @@ function makeLabelText($id,$size,$type="text")
248 <span class=field_desc id='fd$id'>".(($type=="file")?$this->recruitFileLink($dataarr[$id]):'')."</span> 220 <span class=field_desc id='fd$id'>".(($type=="file")?$this->recruitFileLink($dataarr[$id]):'')."</span>
249 <span class=validate_success></span><span class=validate_error></span> 221 <span class=validate_success></span><span class=validate_error></span>
250 </p>"; 222 </p>";
251
252 }else{ 223 }else{
253 $data="<p style='clear:both'> 224 $data="<p style='clear:both'>
254 <label class=label-small_new style='width:25%'>".$this->HRFieldNames[$id].": </label> 225 <label class=label-small_new style='width:25%'>".$this->HRFieldNames[$id].": </label>
...@@ -257,14 +228,12 @@ function makeLabelText($id,$size,$type="text") ...@@ -257,14 +228,12 @@ function makeLabelText($id,$size,$type="text")
257 <span class=validate_success></span><span class=validate_error></span> 228 <span class=validate_success></span><span class=validate_error></span>
258 </p>"; 229 </p>";
259 } 230 }
260
261 /*$data="<p style='clear:both'> 231 /*$data="<p style='clear:both'>
262 <label class=label-small_new style='width:25%'>".$this->HRFieldNames[$id].": </label> 232 <label class=label-small_new style='width:25%'>".$this->HRFieldNames[$id].": </label>
263 <b>$dataarr[$id]</b> 233 <b>$dataarr[$id]</b>
264 <span class=field_desc id='fd$id'>".(($type=="file")?$this->recruitFileLink($dataarr[$id]):'')."</span> 234 <span class=field_desc id='fd$id'>".(($type=="file")?$this->recruitFileLink($dataarr[$id]):'')."</span>
265 <span class=validate_success></span><span class=validate_error></span> 235 <span class=validate_success></span><span class=validate_error></span>
266 </p>";*/ 236 </p>";*/
267
268 return $data; 237 return $data;
269 } 238 }
270 function makeThumbImg($id) 239 function makeThumbImg($id)
...@@ -272,15 +241,12 @@ function makeThumbImg($id) ...@@ -272,15 +241,12 @@ function makeThumbImg($id)
272 $themehome=$this->themehome; 241 $themehome=$this->themehome;
273 $dataarr=$this->recruitdata["peopledata"]; 242 $dataarr=$this->recruitdata["peopledata"];
274 $varid=$this->varid; 243 $varid=$this->varid;
275
276 $fpath="$themehome/images/default.jpg"; 244 $fpath="$themehome/images/default.jpg";
277 if(file_exists($this->storagehome."/thumbs/$varid/".$dataarr[$id].".gif"))$fpath="$themehome/thumbs/$varid/".$dataarr[$id].".gif"; 245 if(file_exists($this->storagehome."/thumbs/$varid/".$dataarr[$id].".gif"))$fpath="$themehome/thumbs/$varid/".$dataarr[$id].".gif";
278
279 $data="<p style='clear:both'> 246 $data="<p style='clear:both'>
280 <label class=label-small_new style='width:25%'></label> 247 <label class=label-small_new style='width:25%'></label>
281 <img src='$fpath' height=100px class='image_new'> 248 <img src='$fpath' height=100px class='image_new'>
282 </p>"; 249 </p>";
283
284 return $data; 250 return $data;
285 } 251 }
286 function makeTextArea($id) 252 function makeTextArea($id)
...@@ -291,7 +257,6 @@ function makeTextArea($id) ...@@ -291,7 +257,6 @@ function makeTextArea($id)
291 $edituser=$this->edituser; 257 $edituser=$this->edituser;
292 $fdirtytxt=$this->fdirtytxt; 258 $fdirtytxt=$this->fdirtytxt;
293 $isuser=$this->isuser; 259 $isuser=$this->isuser;
294
295 $data=" 260 $data="
296 <p style='clear:both'> 261 <p style='clear:both'>
297 <label class=label-small_new style='width:25%'>".$this->HRFieldNames[$id].": </label> 262 <label class=label-small_new style='width:25%'>".$this->HRFieldNames[$id].": </label>
...@@ -311,26 +276,20 @@ function makeTextArea($id) ...@@ -311,26 +276,20 @@ function makeTextArea($id)
311 } 276 }
312 return $data; 277 return $data;
313 } 278 }
314
315 function HRTemplateString($str,$fieldsstr) 279 function HRTemplateString($str,$fieldsstr)
316 { 280 {
317 $ppldata=$this->recruitdata["peopledata"]; 281 $ppldata=$this->recruitdata["peopledata"];
318 $gthis=$this->gthis; 282 $gthis=$this->gthis;
319
320
321 if(!isset($this->objcache["ownerrmlist"]))$this->objcache["ownerrmlist"]=$gthis->getUserListforClient($ppldata['client']); 283 if(!isset($this->objcache["ownerrmlist"]))$this->objcache["ownerrmlist"]=$gthis->getUserListforClient($ppldata['client']);
322 if(!isset($this->objcache["recruitmentrmlist"]))$this->objcache["recruitmentrmlist"]=$gthis->getRecruitmentListforClient($ppldata['client']); 284 if(!isset($this->objcache["recruitmentrmlist"]))$this->objcache["recruitmentrmlist"]=$gthis->getRecruitmentListforClient($ppldata['client']);
323 if(!isset($this->objcache["acctrmlist_600"]))$this->objcache["acctrmlist_600"]=$gthis->getUserListforClientAcct($ppldata['client']); 285 if(!isset($this->objcache["acctrmlist_600"]))$this->objcache["acctrmlist_600"]=$gthis->getUserListforClientAcct($ppldata['client']);
324 if(!isset($this->objcache["bdmlist_600"]))$this->objcache["bdmlist_600"]=$gthis->getUserListforClientBDM($ppldata['client']); 286 if(!isset($this->objcache["bdmlist_600"]))$this->objcache["bdmlist_600"]=$gthis->getUserListforClientBDM($ppldata['client']);
325
326 if(!isset($this->objcache["ownerrmlist_M"]))$this->objcache["ownerrmlist_M"]=$gthis->getManagerUsers($this->objcache["ownerrmlist"]); 287 if(!isset($this->objcache["ownerrmlist_M"]))$this->objcache["ownerrmlist_M"]=$gthis->getManagerUsers($this->objcache["ownerrmlist"]);
327 if(!isset($this->objcache["recruitmentrmlist_600"]))$this->objcache["ownerrmlist_M"]=$gthis->getManagerUsers($this->objcache["recruitmentrmlist"]); 288 if(!isset($this->objcache["recruitmentrmlist_600"]))$this->objcache["ownerrmlist_M"]=$gthis->getManagerUsers($this->objcache["recruitmentrmlist"]);
328
329 $str=str_replace("{{ownerrmlist}}",$this->objcache["ownerrmlist"],$str); 289 $str=str_replace("{{ownerrmlist}}",$this->objcache["ownerrmlist"],$str);
330 $str=str_replace("{{ownerrmlist_M}}",$this->objcache["ownerrmlist"]."/".$this->objcache["ownerrmlist_M"],$str); 290 $str=str_replace("{{ownerrmlist_M}}",$this->objcache["ownerrmlist"]."/".$this->objcache["ownerrmlist_M"],$str);
331 $str=str_replace("{{recruitmentrmlist}}",$this->objcache["recruitmentrmlist"],$str); 291 $str=str_replace("{{recruitmentrmlist}}",$this->objcache["recruitmentrmlist"],$str);
332 $str=str_replace("{{acctrmlist}}",$this->objcache["acctrmlist_600"],$str); 292 $str=str_replace("{{acctrmlist}}",$this->objcache["acctrmlist_600"],$str);
333
334 if($this->edituser==1) 293 if($this->edituser==1)
335 { 294 {
336 $str=str_replace("{{recruitmentrmlist_600}}","RecruitmentRM- ".$this->objcache["recruitmentrmlist"]."/".$this->objcache["recruitmentrmlist_600"],$str); 295 $str=str_replace("{{recruitmentrmlist_600}}","RecruitmentRM- ".$this->objcache["recruitmentrmlist"]."/".$this->objcache["recruitmentrmlist_600"],$str);
...@@ -343,7 +302,6 @@ function HRTemplateString($str,$fieldsstr) ...@@ -343,7 +302,6 @@ function HRTemplateString($str,$fieldsstr)
343 $str=str_replace("{{acctrmlist_600}}","",$str); 302 $str=str_replace("{{acctrmlist_600}}","",$str);
344 $str=str_replace("{{bdmlist_600}}","",$str); 303 $str=str_replace("{{bdmlist_600}}","",$str);
345 } 304 }
346
347 //Log::info($str); 305 //Log::info($str);
348 preg_match_all('/{{[^}]*}}/', $str, $matches); 306 preg_match_all('/{{[^}]*}}/', $str, $matches);
349 if(!empty($matches)&&!empty($matches[0])) 307 if(!empty($matches)&&!empty($matches[0]))
...@@ -354,11 +312,9 @@ function HRTemplateString($str,$fieldsstr) ...@@ -354,11 +312,9 @@ function HRTemplateString($str,$fieldsstr)
354 $str=str_replace($matchstr,$ppldata[$tmpelem],$str); 312 $str=str_replace($matchstr,$ppldata[$tmpelem],$str);
355 } 313 }
356 } 314 }
357
358 return $str; 315 return $str;
359 } 316 }
360 317
361
362 function createFilesTab() 318 function createFilesTab()
363 { 319 {
364 $fdirty=$this->recruitdata["dirty"]; 320 $fdirty=$this->recruitdata["dirty"];
...@@ -369,12 +325,10 @@ function HRTemplateString($str,$fieldsstr) ...@@ -369,12 +325,10 @@ function HRTemplateString($str,$fieldsstr)
369 $storagehome=$this->storagehome; 325 $storagehome=$this->storagehome;
370 $logarr=$this->recruitdata["modifylog"]; 326 $logarr=$this->recruitdata["modifylog"];
371 $varid=$this->varid; 327 $varid=$this->varid;
372
373 328
374 $data="<div class=custom1 style='width:49%;float:left'> 329 $data="<div class=custom1 style='width:49%;float:left'>
375 <legend class='new-recruit_legend'>Current Files</legend> 330 <legend class='new-recruit_legend'>Current Files</legend>
376 <ul>"; 331 <ul>";
377
378 $fpath="$themehome/recruits/$varid"; 332 $fpath="$themehome/recruits/$varid";
379 $storagepath="$storagehome/recruits/$varid"; 333 $storagepath="$storagehome/recruits/$varid";
380 if (is_dir($storagepath)&&$handle = opendir($storagepath)) 334 if (is_dir($storagepath)&&$handle = opendir($storagepath))
...@@ -382,7 +336,6 @@ function HRTemplateString($str,$fieldsstr) ...@@ -382,7 +336,6 @@ function HRTemplateString($str,$fieldsstr)
382 $optionsstr='<option></option>'; 336 $optionsstr='<option></option>';
383 $fileids=explode(",",$this->HRFileFieldsStr); 337 $fileids=explode(",",$this->HRFileFieldsStr);
384 foreach($fileids as $fileid)$optionsstr.="<option value='$fileid'>".$this->HRFieldNames[$fileid]."</option>";//// 338 foreach($fileids as $fileid)$optionsstr.="<option value='$fileid'>".$this->HRFieldNames[$fileid]."</option>";////
385
386 $ii=0; 339 $ii=0;
387 while (false !== ($entry = readdir($handle))) 340 while (false !== ($entry = readdir($handle)))
388 { 341 {
...@@ -392,7 +345,6 @@ function HRTemplateString($str,$fieldsstr) ...@@ -392,7 +345,6 @@ function HRTemplateString($str,$fieldsstr)
392 $titlestr=''; 345 $titlestr='';
393 $flatid="UniqueId_".$ii; 346 $flatid="UniqueId_".$ii;
394 $selectstr="<select id='SEL$flatid' onchange='filesSelected(\"$flatid\",\"$entry\");' class='form_hrm_select' style='width:50%'>$optionsstr</select>";//// 347 $selectstr="<select id='SEL$flatid' onchange='filesSelected(\"$flatid\",\"$entry\");' class='form_hrm_select' style='width:50%'>$optionsstr</select>";////
395
396 $pathinfo = pathinfo($entry); 348 $pathinfo = pathinfo($entry);
397 $extension = strtolower($pathinfo['extension']); 349 $extension = strtolower($pathinfo['extension']);
398 if($extension=="jpg"||$extension=="png"||$extension=="jpeg"||$extension=="gif")$titlestr="<img src=\"$fpath/$entry\" width=400px>"; 350 if($extension=="jpg"||$extension=="png"||$extension=="jpeg"||$extension=="gif")$titlestr="<img src=\"$fpath/$entry\" width=400px>";
...@@ -409,7 +361,6 @@ function HRTemplateString($str,$fieldsstr) ...@@ -409,7 +361,6 @@ function HRTemplateString($str,$fieldsstr)
409 <div class=custom1 style='width:49%;float:left'> 361 <div class=custom1 style='width:49%;float:left'>
410 <legend class='new-recruit_legend'>Old Files</legend> 362 <legend class='new-recruit_legend'>Old Files</legend>
411 <ul>"; 363 <ul>";
412
413 $fpath="$themehome/recruits/$varid"; 364 $fpath="$themehome/recruits/$varid";
414 $storagepath="$storagehome/recruits/$varid"; 365 $storagepath="$storagehome/recruits/$varid";
415 if (is_dir($storagepath)&&$handle = opendir($storagepath)) 366 if (is_dir($storagepath)&&$handle = opendir($storagepath))
...@@ -449,11 +400,9 @@ $data.="</div><div style='width:49%;float:left'> ...@@ -449,11 +400,9 @@ $data.="</div><div style='width:49%;float:left'>
449 <td class='table_hrm_heading_green'>Old Values</td> 400 <td class='table_hrm_heading_green'>Old Values</td>
450 </tr> 401 </tr>
451 </thead>"; 402 </thead>";
452
453 if(is_array($logarr)) 403 if(is_array($logarr))
454 { 404 {
455 krsort($logarr); 405 krsort($logarr);
456
457 $i=0; 406 $i=0;
458 foreach($logarr as $logkey=>$logval) 407 foreach($logarr as $logkey=>$logval)
459 { 408 {
...@@ -470,21 +419,17 @@ $data.="</div><div style='width:49%;float:left'> ...@@ -470,21 +419,17 @@ $data.="</div><div style='width:49%;float:left'>
470 { 419 {
471 $i++;$j++; 420 $i++;$j++;
472 if(sizeof($changedvals)>3)$changedvals[2]=$changedvals[sizeof($changedvals)-1]; 421 if(sizeof($changedvals)>3)$changedvals[2]=$changedvals[sizeof($changedvals)-1];
473
474 if($j==1) $data.= "<tr><td>$logline[0]</td><td>".date("Y-m-d_H:i:s",$logkey)."</td><td>".$this->HRFieldNames[$changedvals[0]]."</td><td>$changedvals[2]</td><td>$changedvals[1]</td></tr>"; 422 if($j==1) $data.= "<tr><td>$logline[0]</td><td>".date("Y-m-d_H:i:s",$logkey)."</td><td>".$this->HRFieldNames[$changedvals[0]]."</td><td>$changedvals[2]</td><td>$changedvals[1]</td></tr>";
475 else $data.= "<tr><td></td><td></td><td>".$this->HRFieldNames[$changedvals[0]]."</td><td>$changedvals[2]</td><td>$changedvals[1]</td></tr>"; 423 else $data.= "<tr><td></td><td></td><td>".$this->HRFieldNames[$changedvals[0]]."</td><td>$changedvals[2]</td><td>$changedvals[1]</td></tr>";
476 } 424 }
477 } 425 }
478 } 426 }
479 } 427 }
480
481 $createtime=$logarr["createtime"]; 428 $createtime=$logarr["createtime"];
482 $createuser=$logarr[$createtime]; 429 $createuser=$logarr[$createtime];
483 if($createuser)$data.= "<tr><td>$createuser</td><td>".date("Y-m-d H:i:s",$createtime)."</td><td colspan=3>Created</td></tr>"; 430 if($createuser)$data.= "<tr><td>$createuser</td><td>".date("Y-m-d H:i:s",$createtime)."</td><td colspan=3>Created</td></tr>";
484 } 431 }
485
486 $data.="</table></fieldset> 432 $data.="</table></fieldset>
487
488 <fieldset> 433 <fieldset>
489 <legend class='new-recruit_legend'>Mail Logs</legend> 434 <legend class='new-recruit_legend'>Mail Logs</legend>
490 <table class='footable table' cellpadding=0 cellspacing=0 style='border-bottom:black 2px solid;margin-bottom:20px'> 435 <table class='footable table' cellpadding=0 cellspacing=0 style='border-bottom:black 2px solid;margin-bottom:20px'>
...@@ -504,7 +449,6 @@ $data.="</div><div style='width:49%;float:left'> ...@@ -504,7 +449,6 @@ $data.="</div><div style='width:49%;float:left'>
504 $parts=unserialize($aline['data']); 449 $parts=unserialize($aline['data']);
505 $check2=explode(" ",$parts['subject']); 450 $check2=explode(" ",$parts['subject']);
506 if(is_array($parts['to']))$parts['to']=implode("<br>",$parts['to']); 451 if(is_array($parts['to']))$parts['to']=implode("<br>",$parts['to']);
507
508 if($dataarr['emailid']!="") 452 if($dataarr['emailid']!="")
509 { 453 {
510 if(strstr($parts['to'],$dataarr['emailid'])||trim($check2[0])==$varid) 454 if(strstr($parts['to'],$dataarr['emailid'])||trim($check2[0])==$varid)
...@@ -518,20 +462,15 @@ $data.="</div><div style='width:49%;float:left'> ...@@ -518,20 +462,15 @@ $data.="</div><div style='width:49%;float:left'>
518 </tr>"; 462 </tr>";
519 } 463 }
520 } 464 }
521
522 $data.="</table></fieldset>"; 465 $data.="</table></fieldset>";
523 return $data; 466 return $data;
524
525 } 467 }
526
527 function createTasksTab() 468 function createTasksTab()
528 { 469 {
529 $gthis=$this->gthis; 470 $gthis=$this->gthis;
530 $varid=$this->varid; 471 $varid=$this->varid;
531 $themehome=$this->themehome; 472 $themehome=$this->themehome;
532
533 $data="<div style='width:100%;float:left'>"; 473 $data="<div style='width:100%;float:left'>";
534
535 $data.="<table class='footable table' cellpadding=0 cellspacing=0 border=0> 474 $data.="<table class='footable table' cellpadding=0 cellspacing=0 border=0>
536 <thead><tr> 475 <thead><tr>
537 <td class='table_hrm_heading_green'>Name</td> 476 <td class='table_hrm_heading_green'>Name</td>
...@@ -544,64 +483,51 @@ $data.="</div><div style='width:49%;float:left'> ...@@ -544,64 +483,51 @@ $data.="</div><div style='width:49%;float:left'>
544 <td class='table_hrm_heading_green'>Created By</td> 483 <td class='table_hrm_heading_green'>Created By</td>
545 <td class='table_hrm_heading_green'></td> 484 <td class='table_hrm_heading_green'></td>
546 </tr></thead>"; 485 </tr></thead>";
547
548 $tasksarr=$gthis->LoadAll("select * from hrms_tasks where empid='$varid' and creatorid!='System' and creatorid!='BounceMail' order by endtime desc"); 486 $tasksarr=$gthis->LoadAll("select * from hrms_tasks where empid='$varid' and creatorid!='System' and creatorid!='BounceMail' order by endtime desc");
549 foreach($tasksarr as $taskline) 487 foreach($tasksarr as $taskline)
550 { 488 {
551 if($taskline['username']=="")$taskline['username']=$taskline['escalation2']; 489 if($taskline['username']=="")$taskline['username']=$taskline['escalation2'];
552 //$delstr="<a href=# onclick='deleteTask($taskline[id]);return false;'><img src='$themehome/images/x.jpg' height=10px></a>"; 490 //$delstr="<a href=# onclick='deleteTask($taskline[id]);return false;'><img src='$themehome/images/x.jpg' height=10px></a>";
553
554 $attachf="<a href='".$themehome."/uploads/".$taskline['username']."/".$taskline['attachment']."' target=_blank>".substr($taskline['attachment'],0,15)."</a>"; 491 $attachf="<a href='".$themehome."/uploads/".$taskline['username']."/".$taskline['attachment']."' target=_blank>".substr($taskline['attachment'],0,15)."</a>";
555 $data.= "<tr><td>$taskline[name]</td><td>".str_replace(","," ",$taskline['username'])."</td><td title='Created: $taskline[created_at]'>$taskline[endtime]</td><td>$taskline[attachment]</td><td>$taskline[status]</td><td>$taskline[accepted]</td><td>$taskline[remarks]</td><td title=$taskline[id]>$taskline[creatorid]</td><td>$delstr</td></tr>"; 492 $data.= "<tr><td>$taskline[name]</td><td>".str_replace(","," ",$taskline['username'])."</td><td title='Created: $taskline[created_at]'>$taskline[endtime]</td><td>$taskline[attachment]</td><td>$taskline[status]</td><td>$taskline[accepted]</td><td>$taskline[remarks]</td><td title=$taskline[id]>$taskline[creatorid]</td><td>$delstr</td></tr>";
556 } 493 }
557
558 $data.="<tr><td colspan=9><hr></td></tr>";$delstr=""; 494 $data.="<tr><td colspan=9><hr></td></tr>";$delstr="";
559
560 $tasksarr=$gthis->LoadAll("select * from hrms_tasks where empid='$varid' and creatorid='System' order by endtime desc"); 495 $tasksarr=$gthis->LoadAll("select * from hrms_tasks where empid='$varid' and creatorid='System' order by endtime desc");
561 foreach($tasksarr as $taskline) 496 foreach($tasksarr as $taskline)
562 { 497 {
563 if($taskline['username']=="")$taskline['username']=$taskline['escalation2']; 498 if($taskline['username']=="")$taskline['username']=$taskline['escalation2'];
564 if($gthis->IsAdmin()||strstr($gthis->HRCoreVars["HRManagerUsers"],$gthis->GetUserName()))$delstr="<a href=# onclick='deleteTask($taskline[id]);return false;'><img src='$themehome/images/x.jpg' height=10px></a>"; 499 if($gthis->IsAdmin()||strstr($gthis->HRCoreVars["HRManagerUsers"],$gthis->GetUserName()))$delstr="<a href=# onclick='deleteTask($taskline[id]);return false;'><img src='$themehome/images/x.jpg' height=10px></a>";
565
566 $attachf="<a href='".$themehome."/uploads/".$taskline['username']."/".$taskline['attachment']."' target=_blank>".substr($taskline['attachment'],0,15)."</a>"; 500 $attachf="<a href='".$themehome."/uploads/".$taskline['username']."/".$taskline['attachment']."' target=_blank>".substr($taskline['attachment'],0,15)."</a>";
567 $data.= "<tr><td>$taskline[name]</td><td>".str_replace(","," ",$taskline['username'])."</td><td title='Created: $taskline[created_at]'>$taskline[endtime]</td><td>$taskline[attachment]</td><td>$taskline[status]</td><td>$taskline[accepted]</td><td>$taskline[remarks]</td><td title=$taskline[id]>$taskline[creatorid]</td><td>$delstr</td></tr>"; 501 $data.= "<tr><td>$taskline[name]</td><td>".str_replace(","," ",$taskline['username'])."</td><td title='Created: $taskline[created_at]'>$taskline[endtime]</td><td>$taskline[attachment]</td><td>$taskline[status]</td><td>$taskline[accepted]</td><td>$taskline[remarks]</td><td title=$taskline[id]>$taskline[creatorid]</td><td>$delstr</td></tr>";
568 } 502 }
569
570 $data.="</table></div>"; 503 $data.="</table></div>";
571 return $data; 504 return $data;
572 } 505 }
573
574
575 //Create Third Party CRM Tab after manual call is hit 506 //Create Third Party CRM Tab after manual call is hit
576 function createCustomCRMTab($manualmobno,$leadid) 507 function createCustomCRMTab($manualmobno,$leadid)
577 { 508 {
578 $leadid=DB::table('records')->where('mobile','=',$manualmobno)->pluck('LeadID'); 509 $leadid=DB::table('records')->where('mobile','=',$manualmobno)->pluck('LeadID');
579 $leadidvalue=$leadid[1]; 510 $leadidvalue=$leadid[1];
511 $customcrm_leadidurl = env("customcrm_leadidurl");
512 $customcrm_leadid_data_url=$customcrm_leadidurl.$leadidvalue;
580 513
581 514 $data="<div style='width:100%;float:left'>";
582
583 $data="<div style='width:100%;float:left'>";
584 $data.=" 515 $data.="
585 <div id='display_crm'> 516 <div id='display_crm'>
586 </div><div><iframe width='1080' height='760' src='https://crm.zoho.com/crm/org676480608/tab/Leads/$leadidvalue' frameborder='0' allowfullscreenframeborder='0' allowfullscreen></iframe></div></div>"; 517 </div><div><iframe width='1080' height='760' src='$customcrm_leadid_data_url' frameborder='0' allowfullscreenframeborder='0' allowfullscreen></iframe></div></div>";
587 518
588 519
589 return $data; 520 return $data;
590 } 521 }
591
592 function createDispoTab() 522 function createDispoTab()
593 { 523 {
594 $gthis=$this->gthis; 524 $gthis=$this->gthis;
595
596 $varid=$this->varid; 525 $varid=$this->varid;
597 $themehome=$this->themehome; 526 $themehome=$this->themehome;
598 $dataarr=$this->recruitdata["peopledata"]; 527 $dataarr=$this->recruitdata["peopledata"];
599
600 /*$recordDetails = DB::table('records')->where('id','=',$varid)->select('*')->get(); 528 /*$recordDetails = DB::table('records')->where('id','=',$varid)->select('*')->get();
601 $priority = $recordDetails[0]->priority;*/ 529 $priority = $recordDetails[0]->priority;*/
602
603 $data="<div style='width:100%;float:left'>"; 530 $data="<div style='width:100%;float:left'>";
604
605 $data.=" 531 $data.="
606 <div style='width:49%;float:left'><fieldset><legend class='new-recruit_legend'>Call Status</legend>"; 532 <div style='width:49%;float:left'><fieldset><legend class='new-recruit_legend'>Call Status</legend>";
607 $data.="<p style='clear:both'> 533 $data.="<p style='clear:both'>
...@@ -615,10 +541,12 @@ $data.="</div><div style='width:49%;float:left'> ...@@ -615,10 +541,12 @@ $data.="</div><div style='width:49%;float:left'>
615 </select> 541 </select>
616 </p>"; 542 </p>";
617 $data.="<p style='clear:both'> 543 $data.="<p style='clear:both'>
544 <div id='callback_datetime'>
618 <label class=label-small_new style='width:25%;' title=''>Callback: </label> 545 <label class=label-small_new style='width:25%;' title=''>Callback: </label>
619 <input class='form_new form_new_amend datetimepicker_dthr' id='dialer_usercallback' name='dialer_usercallback'> 546 <input class='form_new form_new_amend datetimepicker_dthr' id='dialer_usercallback' name='dialer_usercallback'>
547 </div>
620 </p>"; 548 </p>";
621 //Code to Add Callback Mode 549 //Code to Add Callback Mode
622 $data.="<p style='clear:both'> 550 $data.="<p style='clear:both'>
623 <label class=label-small_new style='width:25%;' title='' id='callback_label'>Callback Mode: </label> 551 <label class=label-small_new style='width:25%;' title='' id='callback_label'>Callback Mode: </label>
624 <select class='form_hrm_select' id='callback_mode' name='callback_mode'> 552 <select class='form_hrm_select' id='callback_mode' name='callback_mode'>
...@@ -626,31 +554,32 @@ $data.="</div><div style='width:49%;float:left'> ...@@ -626,31 +554,32 @@ $data.="</div><div style='width:49%;float:left'>
626 <option value='SelfCallback'>Self Callback</option> 554 <option value='SelfCallback'>Self Callback</option>
627 </select> 555 </select>
628 </p>"; 556 </p>";
629
630 $data.="<script> 557 $data.="<script>
631 $(document).ready(function() 558 $(document).ready(function()
632 { 559 {
633 $('#callback_mode').hide(); 560 $('#callback_mode').hide();
634 $('#callback_label').hide(); 561 $('#callback_label').hide();
562 $('#callback_datetime').hide();
635 $('#dialer_usersubstatus').click(function(){ 563 $('#dialer_usersubstatus').click(function(){
636 var subsource=$('#dialer_usersubstatus').val(); 564 var subsource=$('#dialer_usersubstatus').val();
637 if(subsource=='CALLBK-Call Back') 565 if(subsource=='CALLBK-Call Back')
638 { 566 {
639 $('#callback_mode').slideDown(); 567 $('#callback_mode').slideDown();
640 $('#callback_label').slideDown(); 568 $('#callback_label').slideDown();
569 $('#callback_datetime').slideDown();
641 570
642 } 571 }
643 else 572 else
644 { 573 {
645 $('#callback_mode').hide(); 574 $('#callback_mode').hide();
646 $('#callback_label').hide(); 575 $('#callback_label').hide();
576 $('#callback_datetime').hide();
647 577
648 } 578 }
649 }); 579 });
650 }); 580 });
651 </script>"; 581 </script>";
652 //Code to Add Callback Mode 582 //Code to Add Callback Mode
653
654 //CRM FORM FOR INTERESTED FORM DISPO FOR SMS 583 //CRM FORM FOR INTERESTED FORM DISPO FOR SMS
655 $data.="<p style='clear:both'> 584 $data.="<p style='clear:both'>
656 <label class=label-small_new style='width:25%;' id='sol_label' title=''>Sol_ID: </label> 585 <label class=label-small_new style='width:25%;' id='sol_label' title=''>Sol_ID: </label>
...@@ -692,13 +621,11 @@ $data.="<script> ...@@ -692,13 +621,11 @@ $data.="<script>
692 <label class=label-small_new style='width:25%;' id='cus_label' title=''>Customer_Name: </label> 621 <label class=label-small_new style='width:25%;' id='cus_label' title=''>Customer_Name: </label>
693 <input type='text' class='form_new form_new_amend' id='cust_name' name='cust_name'> 622 <input type='text' class='form_new form_new_amend' id='cust_name' name='cust_name'>
694 </p>"; 623 </p>";
695
696 //Commented for Third Party CRM 624 //Commented for Third Party CRM
697 /*$data.="<p style='clear:both'> 625 /*$data.="<p style='clear:both'>
698 <label class=label-small_new style='width:25%;' title=''>Call Remarks:</label> 626 <label class=label-small_new style='width:25%;' title=''>Call Remarks:</label>
699 <textarea id='dialer_fullremarks' name='fullremarks' style='width:70%' maxlength=4000></textarea> 627 <textarea id='dialer_fullremarks' name='fullremarks' style='width:70%' maxlength=4000></textarea>
700 </p>";*/ 628 </p>";*/
701
702 //CRM FORM FOR INTERESTED FORM DISPO FOR SMS 629 //CRM FORM FOR INTERESTED FORM DISPO FOR SMS
703 $data.="<script> 630 $data.="<script>
704 $(document).ready(function() 631 $(document).ready(function()
...@@ -714,7 +641,6 @@ $data.="<script> ...@@ -714,7 +641,6 @@ $data.="<script>
714 $('#lms_error').hide(); 641 $('#lms_error').hide();
715 $('#zone').hide(); 642 $('#zone').hide();
716 $('#cust_name').hide(); 643 $('#cust_name').hide();
717
718 $('#sol_label').hide(); 644 $('#sol_label').hide();
719 $('#lms_label').hide(); 645 $('#lms_label').hide();
720 $('#teamlead_label').hide(); 646 $('#teamlead_label').hide();
...@@ -726,7 +652,6 @@ $data.="<script> ...@@ -726,7 +652,6 @@ $data.="<script>
726 $('#lmser_label').hide(); 652 $('#lmser_label').hide();
727 $('#zone_label').hide(); 653 $('#zone_label').hide();
728 $('#cus_label').hide(); 654 $('#cus_label').hide();
729
730 $('#dialer_usersubstatus').click(function(){ 655 $('#dialer_usersubstatus').click(function(){
731 var subsource=$('#dialer_usersubstatus').val(); 656 var subsource=$('#dialer_usersubstatus').val();
732 if(subsource=='INTRST-Interested') 657 if(subsource=='INTRST-Interested')
...@@ -741,7 +666,6 @@ $data.="<script> ...@@ -741,7 +666,6 @@ $data.="<script>
741 $('#lms_error').slideDown(); 666 $('#lms_error').slideDown();
742 $('#zone').slideDown(); 667 $('#zone').slideDown();
743 $('#cust_name').slideDown(); 668 $('#cust_name').slideDown();
744
745 $('#sol_label').slideDown(); 669 $('#sol_label').slideDown();
746 $('#lms_label').slideDown(); 670 $('#lms_label').slideDown();
747 $('#teamlead_label').slideDown(); 671 $('#teamlead_label').slideDown();
...@@ -789,7 +713,6 @@ $data.="<script> ...@@ -789,7 +713,6 @@ $data.="<script>
789 <label class=label-small_new style='width:25%;' title=''>Call Remarks: </label> 713 <label class=label-small_new style='width:25%;' title=''>Call Remarks: </label>
790 <textarea id='dialer_userremarks' name='dialer_userremarks' style='width:70%' maxlength=250></textarea> 714 <textarea id='dialer_userremarks' name='dialer_userremarks' style='width:70%' maxlength=250></textarea>
791 </p>";*/ 715 </p>";*/
792
793 716
794 $attemptsval=""; 717 $attemptsval="";
795 718
...@@ -797,7 +720,6 @@ $data.="<script> ...@@ -797,7 +720,6 @@ $data.="<script>
797 { 720 {
798 $attemptsval.="<option value='".$i."'>".$i."</option>"; 721 $attemptsval.="<option value='".$i."'>".$i."</option>";
799 } 722 }
800
801 /*Code for Unwanted CRM 723 /*Code for Unwanted CRM
802 $data.="<p style='clear:both'> 724 $data.="<p style='clear:both'>
803 <label class=label-small_new style='width:25%;' title=''>Attempts: </label> 725 <label class=label-small_new style='width:25%;' title=''>Attempts: </label>
...@@ -805,26 +727,21 @@ $data.="<script> ...@@ -805,26 +727,21 @@ $data.="<script>
805 </select> 727 </select>
806 </p>";*/ 728 </p>";*/
807 729
808
809 //Supervisor Comments - By Manish on 16/02/17 730 //Supervisor Comments - By Manish on 16/02/17
810 /*if($dataarr['clientcode']) 731 /*if($dataarr['clientcode'])
811 $supComnt = SupervisonComments::select('supvisor_comments','id','agent_comments')->where('clientcode','=',$dataarr['clientcode'])->first(); 732 $supComnt = SupervisonComments::select('supvisor_comments','id','agent_comments')->where('clientcode','=',$dataarr['clientcode'])->first();
812
813 $data.="<p style='clear:both'> 733 $data.="<p style='clear:both'>
814 <label class=label-small_new style='width:25%;' title=''>Supervisor Comment: </label> 734 <label class=label-small_new style='width:25%;' title=''>Supervisor Comment: </label>
815 <textarea id='dialer_userremarks' name='dialer_userremarks' style='width:70%' maxlength=250 readonly>".$supComnt['supvisor_comments']."</textarea> 735 <textarea id='dialer_userremarks' name='dialer_userremarks' style='width:70%' maxlength=250 readonly>".$supComnt['supvisor_comments']."</textarea>
816 </p>"; 736 </p>";
817 $data.="<p style='clear:both'> 737 $data.="<p style='clear:both'>
818 <label class=label-small_new style='width:25%;' title=''>Agent Comment: </label>"; 738 <label class=label-small_new style='width:25%;' title=''>Agent Comment: </label>";
819
820 if($supComnt['agent_comments']) 739 if($supComnt['agent_comments'])
821 $data.="<textarea id='agent_comment' name='agent_comment' style='width:70%' maxlength=250>".$supComnt['agent_comments']."</textarea>"; 740 $data.="<textarea id='agent_comment' name='agent_comment' style='width:70%' maxlength=250>".$supComnt['agent_comments']."</textarea>";
822 else 741 else
823 $data.="<textarea id='agent_comment' name='agent_comment' style='width:70%' maxlength=250></textarea>"; 742 $data.="<textarea id='agent_comment' name='agent_comment' style='width:70%' maxlength=250></textarea>";
824
825 $data.="<input type='hidden' id='sup_comnt_id' value='".$supComnt['id']."'> 743 $data.="<input type='hidden' id='sup_comnt_id' value='".$supComnt['id']."'>
826 </p>";*/ 744 </p>";*/
827
828 /*$data.="<p style='clear:both'> 745 /*$data.="<p style='clear:both'>
829 <label class=label-small_new style='width:25%;' title=''>Flag as: </label> 746 <label class=label-small_new style='width:25%;' title=''>Flag as: </label>
830 <select class='form_hrm_select' id='dialer_flag' name='dialer_flag'> 747 <select class='form_hrm_select' id='dialer_flag' name='dialer_flag'>
...@@ -846,7 +763,6 @@ $data.="<script> ...@@ -846,7 +763,6 @@ $data.="<script>
846 <option value='Friday'>Friday</option> 763 <option value='Friday'>Friday</option>
847 <option value='Saturday'>Saturday</option> 764 <option value='Saturday'>Saturday</option>
848 </select> 765 </select>
849
850 <select class='form_hrm_select' id='bttc_hrs' name='bttc_hrs' style='margin-left:2%;background-color:#FFD2D2'> 766 <select class='form_hrm_select' id='bttc_hrs' name='bttc_hrs' style='margin-left:2%;background-color:#FFD2D2'>
851 <option value=''>Select Hour</option> 767 <option value=''>Select Hour</option>
852 <option value='9-10'>9-10</option> 768 <option value='9-10'>9-10</option>
...@@ -858,18 +774,14 @@ $data.="<script> ...@@ -858,18 +774,14 @@ $data.="<script>
858 <option value='4-5'>4-5</option> 774 <option value='4-5'>4-5</option>
859 <option value='6-7'>6-7</option> 775 <option value='6-7'>6-7</option>
860 ";*/ 776 ";*/
861
862 /*$recordDetails = $recordDetails[0];*/ 777 /*$recordDetails = $recordDetails[0];*/
863 $bttc = explode(":",$dataarr['bttc']); 778 $bttc = explode(":",$dataarr['bttc']);
864
865 $bttc_day = $bttc[0]; 779 $bttc_day = $bttc[0];
866 $bttc_hrs = $bttc[1]; 780 $bttc_hrs = $bttc[1];
867
868 /*for($i=1;$i<=24;$i++) 781 /*for($i=1;$i<=24;$i++)
869 { 782 {
870 $data.="<option value='".str_pad($i,"2","0",STR_PAD_LEFT)."'>".str_pad($i,"2","0",STR_PAD_LEFT)."</option>"; 783 $data.="<option value='".str_pad($i,"2","0",STR_PAD_LEFT)."'>".str_pad($i,"2","0",STR_PAD_LEFT)."</option>";
871 }*/ 784 }*/
872
873 /*$data.="</select></fieldset> 785 /*$data.="</select></fieldset>
874 <script> 786 <script>
875 \$(document).ready(function() 787 \$(document).ready(function()
...@@ -879,11 +791,8 @@ $data.="<script> ...@@ -879,11 +791,8 @@ $data.="<script>
879 }); 791 });
880 </script> 792 </script>
881 ";*/ 793 ";*/
882
883 $latestCall=CRMCall::where('crm_id','=',$this->varid)->where('ts_Call','>','0')->orderBy("created_at","DESC")->first(); 794 $latestCall=CRMCall::where('crm_id','=',$this->varid)->where('ts_Call','>','0')->orderBy("created_at","DESC")->first();
884
885 /*$data.="<fieldset><legend class='new-recruit_legend'>Alt #</legend>";*/ 795 /*$data.="<fieldset><legend class='new-recruit_legend'>Alt #</legend>";*/
886
887 $nextempty=""; 796 $nextempty="";
888 /*$data.="<p style='clear:both'> 797 /*$data.="<p style='clear:both'>
889 <label class=label-small_new style='width:25%;' title=''>Main #: </label> 798 <label class=label-small_new style='width:25%;' title=''>Main #: </label>
...@@ -897,7 +806,6 @@ $data.="<script> ...@@ -897,7 +806,6 @@ $data.="<script>
897 <label class=label-small_new style='width:25%;' title=''>Alt #$i: </label> 806 <label class=label-small_new style='width:25%;' title=''>Alt #$i: </label>
898 <input class='form_new form_new_amend' id='dialer_altphone_lbl_$i' name='dialer_altphone_lbl_$i' value='".$dataarr["altphone_lbl_$i"]."' disabled=disabled placeholder='Description'> 807 <input class='form_new form_new_amend' id='dialer_altphone_lbl_$i' name='dialer_altphone_lbl_$i' value='".$dataarr["altphone_lbl_$i"]."' disabled=disabled placeholder='Description'>
899 <input class='form_new form_new_amend' id='dialer_altphone$i' name='dialer_altphone$i' value='".$dataarr["altphone$i"]."' disabled=disabled placeholder='##########'> 808 <input class='form_new form_new_amend' id='dialer_altphone$i' name='dialer_altphone$i' value='".$dataarr["altphone$i"]."' disabled=disabled placeholder='##########'>
900
901 <a href=# class='btn btn-default' onclick='dialerDelAlt($i,$this->varid);return false;'><i class='fa fa-minus'></i></a> 809 <a href=# class='btn btn-default' onclick='dialerDelAlt($i,$this->varid);return false;'><i class='fa fa-minus'></i></a>
902 <a href=# class='btn btn-default' onclick='dialerQuickOpen($this->varid,\"".$dataarr["altphone$i"]."\",\"Manual\",\"\",0);return false;'><i class='fa fa-phone'></i></a> 810 <a href=# class='btn btn-default' onclick='dialerQuickOpen($this->varid,\"".$dataarr["altphone$i"]."\",\"Manual\",\"\",0);return false;'><i class='fa fa-phone'></i></a>
903 </p>";*/ 811 </p>";*/
...@@ -912,26 +820,19 @@ $data.="<script> ...@@ -912,26 +820,19 @@ $data.="<script>
912 <input class='form_new form_new_amend' id='dialer_altphone$nextempty' name='dialer_altphone$nextempty' value='' placeholder='##########'><a href=# class='btn btn-default' onclick='dialerAddAlt($nextempty,$this->varid);return false;'><i class='fa fa-plus'></i></a> 820 <input class='form_new form_new_amend' id='dialer_altphone$nextempty' name='dialer_altphone$nextempty' value='' placeholder='##########'><a href=# class='btn btn-default' onclick='dialerAddAlt($nextempty,$this->varid);return false;'><i class='fa fa-plus'></i></a>
913 </p>";*/ 821 </p>";*/
914 } 822 }
915
916 $data.="</fieldset> 823 $data.="</fieldset>
917
918 824
919 </fieldset></div> 825 </fieldset></div>
920
921 <div style='clear:both;width:100%;'> 826 <div style='clear:both;width:100%;'>
922 <div style='width:49%;float:left'> 827 <div style='width:49%;float:left'>
923 828
924
925 829
926 </div> 830 </div>
927
928 <div style='width:49%;float:right'> 831 <div style='width:49%;float:right'>
929 832
930
931 833
932 </div> 834 </div>
933 </div><br><br><br> 835 </div><br><br><br>
934
935 <div style='display:none'> 836 <div style='display:none'>
936 <style> 837 <style>
937 .gritter-b-center{ 838 .gritter-b-center{
...@@ -950,28 +851,20 @@ $data.="<script> ...@@ -950,28 +851,20 @@ $data.="<script>
950 <div id='angry'><img src='/assets/images/Emoticons/Angry.gif' height='240' width='255'></div> 851 <div id='angry'><img src='/assets/images/Emoticons/Angry.gif' height='240' width='255'></div>
951 </div> 852 </div>
952 <div style='clear:both'></div> 853 <div style='clear:both'></div>
953
954 <script> 854 <script>
955
956
957 function dispoChange(dispo){ 855 function dispoChange(dispo){
958
959 if(kstychCall['ts_Talk']<1||Math.ceil(((kstychCall['ts_now']-kstychCall['ts_Talk'])/1000))<10) 856 if(kstychCall['ts_Talk']<1||Math.ceil(((kstychCall['ts_now']-kstychCall['ts_Talk'])/1000))<10)
960 { 857 {
961 return; 858 return;
962 } 859 }
963
964 if(dispo=='Contacted - FollowUp - Specific' || dispo=='Contacted - Follow-Up - Generic') 860 if(dispo=='Contacted - FollowUp - Specific' || dispo=='Contacted - Follow-Up - Generic')
965 { 861 {
966 document.getElementById('serv_vs_prod').disabled=false; 862 document.getElementById('serv_vs_prod').disabled=false;
967 document.getElementById('serv_vs_prod').style.background='#77DD77'; 863 document.getElementById('serv_vs_prod').style.background='#77DD77';
968
969 document.getElementById('resolution').disabled=false; 864 document.getElementById('resolution').disabled=false;
970 document.getElementById('resolution').style.background='#77DD77'; 865 document.getElementById('resolution').style.background='#77DD77';
971
972 document.getElementById('satisfy').disabled=false; 866 document.getElementById('satisfy').disabled=false;
973 document.getElementById('satisfy').style.background='#77DD77'; 867 document.getElementById('satisfy').style.background='#77DD77';
974
975 document.getElementById('final_call_assess').disabled=false; 868 document.getElementById('final_call_assess').disabled=false;
976 document.getElementById('final_call_assess').style.background='#77DD77'; 869 document.getElementById('final_call_assess').style.background='#77DD77';
977 } 870 }
...@@ -980,29 +873,21 @@ $data.="<script> ...@@ -980,29 +873,21 @@ $data.="<script>
980 document.getElementById('serv_vs_prod').disabled=true; 873 document.getElementById('serv_vs_prod').disabled=true;
981 document.getElementById('serv_vs_prod').style.background='#f4f4f4'; 874 document.getElementById('serv_vs_prod').style.background='#f4f4f4';
982 document.getElementById('serv_vs_prod').selectedIndex=0; 875 document.getElementById('serv_vs_prod').selectedIndex=0;
983
984 document.getElementById('resolution').disabled=true; 876 document.getElementById('resolution').disabled=true;
985 document.getElementById('resolution').style.background='#f4f4f4'; 877 document.getElementById('resolution').style.background='#f4f4f4';
986 document.getElementById('resolution').selectedIndex=0; 878 document.getElementById('resolution').selectedIndex=0;
987
988 document.getElementById('satisfy').disabled=true; 879 document.getElementById('satisfy').disabled=true;
989 document.getElementById('satisfy').style.background='#f4f4f4'; 880 document.getElementById('satisfy').style.background='#f4f4f4';
990 document.getElementById('satisfy').selectedIndex=0; 881 document.getElementById('satisfy').selectedIndex=0;
991
992 document.getElementById('final_call_assess').disabled=true; 882 document.getElementById('final_call_assess').disabled=true;
993 document.getElementById('final_call_assess').style.background='#f4f4f4'; 883 document.getElementById('final_call_assess').style.background='#f4f4f4';
994 document.getElementById('final_call_assess').selectedIndex=0; 884 document.getElementById('final_call_assess').selectedIndex=0;
995 } 885 }
996 } 886 }
997
998
999 var dialerdispoarray={};var dispoClassArray={}; 887 var dialerdispoarray={};var dispoClassArray={};
1000 dialerdispoarray['']='';\n"; 888 dialerdispoarray['']='';\n";
1001
1002
1003 $mastersdata=$gthis->getCompanyMaster($client); 889 $mastersdata=$gthis->getCompanyMaster($client);
1004 if(empty($mastersdata['dialerDispoList']))$mastersdata['dialerDispoList']=$gthis->HRCoreVars['dialerDispoList']; 890 if(empty($mastersdata['dialerDispoList']))$mastersdata['dialerDispoList']=$gthis->HRCoreVars['dialerDispoList'];
1005
1006 $dispoarr=explode("~",$mastersdata['dialerDispoList']); 891 $dispoarr=explode("~",$mastersdata['dialerDispoList']);
1007 foreach($dispoarr as $dispo) 892 foreach($dispoarr as $dispo)
1008 { 893 {
...@@ -1015,9 +900,7 @@ $data.="<script> ...@@ -1015,9 +900,7 @@ $data.="<script>
1015 } 900 }
1016 } 901 }
1017 } 902 }
1018
1019 $data.=" 903 $data.="
1020
1021 function dialerDisoSelect() 904 function dialerDisoSelect()
1022 { 905 {
1023 if(dialerdispoarray) 906 if(dialerdispoarray)
...@@ -1055,17 +938,13 @@ $data.="<script> ...@@ -1055,17 +938,13 @@ $data.="<script>
1055 else 938 else
1056 { 939 {
1057 if(empty($mastersdata['dialerCustomHTML']))$mastersdata['dialerCustomHTML']=$gthis->HRCoreVars['dialerCustomHTML']; 940 if(empty($mastersdata['dialerCustomHTML']))$mastersdata['dialerCustomHTML']=$gthis->HRCoreVars['dialerCustomHTML'];
1058
1059 //$userdatahtml=str_replace("__EQ__","=",$mastersdata['dialerCustomHTML']); 941 //$userdatahtml=str_replace("__EQ__","=",$mastersdata['dialerCustomHTML']);
1060 $userdatahtml=str_replace("__PLUS__","+",$userdatahtml); 942 $userdatahtml=str_replace("__PLUS__","+",$userdatahtml);
1061 $userdatahtml=str_replace("{{varid}}",$this->varid,$userdatahtml); 943 $userdatahtml=str_replace("{{varid}}",$this->varid,$userdatahtml);
1062
1063 $data.=$userdatahtml; 944 $data.=$userdatahtml;
1064 } 945 }
1065 946
1066 // End Relationship Tagging 947 // End Relationship Tagging
1067
1068
1069 948
1070 //Log::info($userdatahtml); 949 //Log::info($userdatahtml);
1071 $data.="<hr></div>"; 950 $data.="<hr></div>";
...@@ -1073,15 +952,11 @@ $data.="<script> ...@@ -1073,15 +952,11 @@ $data.="<script>
1073 //Log::info($data); 952 //Log::info($data);
1074 return $data; 953 return $data;
1075 } 954 }
1076
1077
1078 function createCallsTab() 955 function createCallsTab()
1079 { 956 {
1080 $data="<fieldset><legend class='new-recruit_legend'>Calls History</legend>"; 957 $data="<fieldset><legend class='new-recruit_legend'>Calls History</legend>";
1081
1082 $data.=" <div class=custom1 style='width:100%;'> 958 $data.=" <div class=custom1 style='width:100%;'>
1083 <h2></h2>"; 959 <h2></h2>";
1084
1085 $data.="<hr><br><table class='table kDataTable' cellpadding=0 cellspacing=0 border=0> 960 $data.="<hr><br><table class='table kDataTable' cellpadding=0 cellspacing=0 border=0>
1086 <thead><tr> 961 <thead><tr>
1087 <td>#</td> 962 <td>#</td>
...@@ -1106,26 +981,19 @@ $data.="<script> ...@@ -1106,26 +981,19 @@ $data.="<script>
1106 //Log::info($this->varid); 981 //Log::info($this->varid);
1107 $k=1; 982 $k=1;
1108 $alist=CRMCallArchive::where('crm_id','=',$this->varid)->where('ts_Close','>','0')->orderBy("created_at","DESC")->get(); 983 $alist=CRMCallArchive::where('crm_id','=',$this->varid)->where('ts_Close','>','0')->orderBy("created_at","DESC")->get();
1109
1110 $records = DB::table('records')->where('id','=',$this->varid)->select('bttc','service_vs_product','resolution','satisfaction','final_call_assessment')->get(); 984 $records = DB::table('records')->where('id','=',$this->varid)->select('bttc','service_vs_product','resolution','satisfaction','final_call_assessment')->get();
1111
1112 $callarraid=''; 985 $callarraid='';
1113 foreach($alist as $aline) 986 foreach($alist as $aline)
1114 { 987 {
1115
1116 $callarraid.=$aline->id.","; 988 $callarraid.=$aline->id.",";
1117 } 989 }
1118
1119 $callarraid=substr($callarraid,0,-1); 990 $callarraid=substr($callarraid,0,-1);
1120 $callarraid=explode(",", $callarraid); 991 $callarraid=explode(",", $callarraid);
1121
1122 $alist_remark=DB::table('full_remark')->select('fullremark','call_id')->whereIn('call_id',$callarraid)->get(); 992 $alist_remark=DB::table('full_remark')->select('fullremark','call_id')->whereIn('call_id',$callarraid)->get();
1123 foreach($alist_remark as $aline) 993 foreach($alist_remark as $aline)
1124 { 994 {
1125 $remarkval[$aline->call_id]=$aline->fullremark; 995 $remarkval[$aline->call_id]=$aline->fullremark;
1126
1127 } 996 }
1128
1129 foreach($alist as $aline) 997 foreach($alist as $aline)
1130 { 998 {
1131 $userdata=""; 999 $userdata="";
...@@ -1136,9 +1004,7 @@ $data.="<script> ...@@ -1136,9 +1004,7 @@ $data.="<script>
1136 $userdata.="<tr><td>$userdataval</td></tr>"; 1004 $userdata.="<tr><td>$userdataval</td></tr>";
1137 } 1005 }
1138 if(trim($userdata)!="")$userdata="<table>".$userdata."</table>"; 1006 if(trim($userdata)!="")$userdata="<table>".$userdata."</table>";
1139
1140 $dispname="";if($aline->user_id>0){$tuser=User::find($aline->user_id);$dispname=$tuser->dispname();} 1007 $dispname="";if($aline->user_id>0){$tuser=User::find($aline->user_id);$dispname=$tuser->dispname();}
1141
1142 1008
1143 // $records = DB::table('records')->where('id','=',$aline->crm_id)->select('bttc','service_vs_product','resolution','satisfaction','final_call_assessment')->get(); 1009 // $records = DB::table('records')->where('id','=',$aline->crm_id)->select('bttc','service_vs_product','resolution','satisfaction','final_call_assessment')->get();
1144 $fullremarkvalue=$remarkval[$aline->id]; 1010 $fullremarkvalue=$remarkval[$aline->id];
...@@ -1146,7 +1012,6 @@ $data.="<script> ...@@ -1146,7 +1012,6 @@ $data.="<script>
1146 { 1012 {
1147 $fullremarkvalue=$aline->userremarks; 1013 $fullremarkvalue=$aline->userremarks;
1148 } 1014 }
1149
1150 $data.="<tr> 1015 $data.="<tr>
1151 <td>$k</td> 1016 <td>$k</td>
1152 <td class=''>".date("Y-m-d H:i:s",strtotime($aline->created_at)-(Auth::user()->timezone*60))."</td> 1017 <td class=''>".date("Y-m-d H:i:s",strtotime($aline->created_at)-(Auth::user()->timezone*60))."</td>
...@@ -1170,21 +1035,16 @@ $data.="<script> ...@@ -1170,21 +1035,16 @@ $data.="<script>
1170 $k++; 1035 $k++;
1171 } 1036 }
1172 $data.="</table>"; 1037 $data.="</table>";
1173
1174 $data.="</div>"; 1038 $data.="</div>";
1175 $data.="</fieldset>"; 1039 $data.="</fieldset>";
1176
1177 return $data; 1040 return $data;
1178 } 1041 }
1179
1180 //For Creating Questionaire contain 1042 //For Creating Questionaire contain
1181 function createQaireTab() 1043 function createQaireTab()
1182 { 1044 {
1183 $varid=$this->varid; 1045 $varid=$this->varid;
1184 $dataarr=$this->recruitdata["peopledata"]; 1046 $dataarr=$this->recruitdata["peopledata"];
1185
1186 $question = explode(",",$dataarr['question']); 1047 $question = explode(",",$dataarr['question']);
1187
1188 $qid=''; 1048 $qid='';
1189 $auth_ques_count = 5; 1049 $auth_ques_count = 5;
1190 //$where = 'id = 1'; 1050 //$where = 'id = 1';
...@@ -1214,21 +1074,17 @@ function createQaireTab() ...@@ -1214,21 +1074,17 @@ function createQaireTab()
1214 1074
1215 $supervisorcomments=''; 1075 $supervisorcomments='';
1216 $agent_comments=''; 1076 $agent_comments='';
1217
1218 $data = "<fieldset><div style='font-size:10px'><!-- row-app --> 1077 $data = "<fieldset><div style='font-size:10px'><!-- row-app -->
1219 <div class='row row-app'> 1078 <div class='row row-app'>
1220 <div class='col-xs-12'> 1079 <div class='col-xs-12'>
1221 <div class='col-separator col-separator-first box col-unscrollable'> 1080 <div class='col-separator col-separator-first box col-unscrollable'>
1222 <div class='col-table' style='padding-left: 13px;padding-right: 7px;'> 1081 <div class='col-table' style='padding-left: 13px;padding-right: 7px;'>
1223
1224 <div class='innerAll' style='background: #fff;'>"; 1082 <div class='innerAll' style='background: #fff;'>";
1225
1226 //Supervisor Recommendation - By Manish on 20-02-17 1083 //Supervisor Recommendation - By Manish on 20-02-17
1227 //Supervisor Recommendation - By Prashant Jadhav on 07-11-17 1084 //Supervisor Recommendation - By Prashant Jadhav on 07-11-17
1228 if($dataarr['clientcode']) 1085 if($dataarr['clientcode'])
1229 { 1086 {
1230 $supComnt = DB::table('DU_CRM_SUPERVISOR_COMMENTS')->where('V_CUSTID','=',$dataarr['clientcode'])->orderBy('V_LAST_REVIEWED_ON','DESC')->limit(3)->get(); 1087 $supComnt = DB::table('DU_CRM_SUPERVISOR_COMMENTS')->where('V_CUSTID','=',$dataarr['clientcode'])->orderBy('V_LAST_REVIEWED_ON','DESC')->limit(3)->get();
1231
1232 foreach($supComnt as $supervisorcomments) 1088 foreach($supComnt as $supervisorcomments)
1233 { 1089 {
1234 1090
...@@ -1238,7 +1094,6 @@ function createQaireTab() ...@@ -1238,7 +1094,6 @@ function createQaireTab()
1238 <label style='width:15%;' title=''>Last Review On:</label> 1094 <label style='width:15%;' title=''>Last Review On:</label>
1239 <label style='width:30%;' title=''>".$supervisorcomments->V_LAST_REVIEWED_ON."</label>"; 1095 <label style='width:30%;' title=''>".$supervisorcomments->V_LAST_REVIEWED_ON."</label>";
1240 $data.="&nbsp;&nbsp;&nbsp;<label style='width:15%;' title=''>Agent Comment: </label>"; 1096 $data.="&nbsp;&nbsp;&nbsp;<label style='width:15%;' title=''>Agent Comment: </label>";
1241
1242 if($supervisorcomments->agent_comments) 1097 if($supervisorcomments->agent_comments)
1243 $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>"; 1098 $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>";
1244 else 1099 else
...@@ -1248,18 +1103,13 @@ function createQaireTab() ...@@ -1248,18 +1103,13 @@ function createQaireTab()
1248 </div>"; 1103 </div>";
1249 } 1104 }
1250 } 1105 }
1251
1252 $data.="<legend class='task_legend'>Primary Questions</legend> 1106 $data.="<legend class='task_legend'>Primary Questions</legend>
1253
1254 <div id='primary_ques' class='primary_ques'>"; 1107 <div id='primary_ques' class='primary_ques'>";
1255 foreach($questions as $key=> $primary_question){ 1108 foreach($questions as $key=> $primary_question){
1256
1257 $data.="<div class='row' id='subParent".$primary_question->question_no."' data-parent='".$primary_question->question_no."' style='border:solid #D3D3D3 2px;border-radius:5px;margin-top:5px;'> 1109 $data.="<div class='row' id='subParent".$primary_question->question_no."' data-parent='".$primary_question->question_no."' style='border:solid #D3D3D3 2px;border-radius:5px;margin-top:5px;'>
1258 <div class='row' id='rowDiv1".$primary_question->question_no."'> 1110 <div class='row' id='rowDiv1".$primary_question->question_no."'>
1259 <div class='col-md-4' id='appendChild1".$primary_question->question_no."'> 1111 <div class='col-md-4' id='appendChild1".$primary_question->question_no."'>
1260 <div id='childParentDiv".$primary_question->question_no."'>"; 1112 <div id='childParentDiv".$primary_question->question_no."'>";
1261
1262
1263 if($primary_question->compulsory_qes =='imp') 1113 if($primary_question->compulsory_qes =='imp')
1264 { 1114 {
1265 $data.="<div class='panel panel-warning panel-heading' id='parentColorDiv".$primary_question->question_no."' style='background-color:#CD6155;cursor:pointer'>"; 1115 $data.="<div class='panel panel-warning panel-heading' id='parentColorDiv".$primary_question->question_no."' style='background-color:#CD6155;cursor:pointer'>";
...@@ -1280,7 +1130,6 @@ function createQaireTab() ...@@ -1280,7 +1130,6 @@ function createQaireTab()
1280 <input type='hidden' value='".$primary_question->questions."' id='questText_".$primary_question->question_no."'> 1130 <input type='hidden' value='".$primary_question->questions."' id='questText_".$primary_question->question_no."'>
1281 </div> 1131 </div>
1282 <div class='options_div' id='options_div".$primary_question->question_no."'>"; 1132 <div class='options_div' id='options_div".$primary_question->question_no."'>";
1283
1284 for($i=1;$i<=10;$i++) 1133 for($i=1;$i<=10;$i++)
1285 { 1134 {
1286 $opt_no = 'opt_'.$i; 1135 $opt_no = 'opt_'.$i;
...@@ -1307,13 +1156,10 @@ function createQaireTab() ...@@ -1307,13 +1156,10 @@ function createQaireTab()
1307 </div> 1156 </div>
1308 </div> 1157 </div>
1309 </div> 1158 </div>
1310
1311 <div class='row' id='rowDiv2".$primary_question->question_no."'> 1159 <div class='row' id='rowDiv2".$primary_question->question_no."'>
1312 </div> 1160 </div>
1313 <div class='row' id='rowDiv3".$primary_question->question_no."'> 1161 <div class='row' id='rowDiv3".$primary_question->question_no."'>
1314 </div> 1162 </div>
1315
1316
1317 </div> 1163 </div>
1318 "; 1164 ";
1319 } 1165 }
...@@ -1322,35 +1168,24 @@ function createQaireTab() ...@@ -1322,35 +1168,24 @@ function createQaireTab()
1322 <input type='hidden' id='questionDateTime' value=''> 1168 <input type='hidden' id='questionDateTime' value=''>
1323 <input type='button' class='btn btn-success' value='Save' id='submitQuestionAire'> 1169 <input type='button' class='btn btn-success' value='Save' id='submitQuestionAire'>
1324 </div> 1170 </div>
1325
1326 </div> 1171 </div>
1327
1328 <script> 1172 <script>
1329 $(document).ready(function(){ 1173 $(document).ready(function(){
1330
1331 var questionArray = {}; 1174 var questionArray = {};
1332 var authQuestionArray = {}; 1175 var authQuestionArray = {};
1333 var appendChild=1; 1176 var appendChild=1;
1334
1335 $('.options_div').hide(); 1177 $('.options_div').hide();
1336 $('#authArea').hide(); 1178 $('#authArea').hide();
1337 $('input:radio:checked').prop('checked', false); 1179 $('input:radio:checked').prop('checked', false);
1338
1339 var count=0; 1180 var count=0;
1340
1341 $('#auth_question').on('click', '.options', function(){ 1181 $('#auth_question').on('click', '.options', function(){
1342
1343
1344 var authQues = $(this).data('rad'); 1182 var authQues = $(this).data('rad');
1345 var authKey = $('#authKey_'+authQues).val(); 1183 var authKey = $('#authKey_'+authQues).val();
1346
1347 authQuestionArray['auth_'+authKey]={}; 1184 authQuestionArray['auth_'+authKey]={};
1348 authQuestionArray['auth_'+authKey]['auth_ques'] = $('#authQuestText_'+authQues).val(); 1185 authQuestionArray['auth_'+authKey]['auth_ques'] = $('#authQuestText_'+authQues).val();
1349 authQuestionArray['auth_'+authKey]['auth_opt'] = $(this).text(); 1186 authQuestionArray['auth_'+authKey]['auth_opt'] = $(this).text();
1350
1351 count++; 1187 count++;
1352 }); 1188 });
1353
1354 $('#submit').click(function(){ 1189 $('#submit').click(function(){
1355 if ($('.authQuestion[type=radio]:checked').length == auth_ques_count) { 1190 if ($('.authQuestion[type=radio]:checked').length == auth_ques_count) {
1356 $('#form-group').hide(); 1191 $('#form-group').hide();
...@@ -1362,132 +1197,93 @@ function createQaireTab() ...@@ -1362,132 +1197,93 @@ function createQaireTab()
1362 alert('Please answer all authentication questions'); 1197 alert('Please answer all authentication questions');
1363 } 1198 }
1364 }); 1199 });
1365
1366 $('#primary_ques').on('click', '.question', function(){ 1200 $('#primary_ques').on('click', '.question', function(){
1367
1368 if(count==0) 1201 if(count==0)
1369 { 1202 {
1370 document.getElementById('questionDateTime').value='".date("Y-m-d H-i-s")."'; 1203 document.getElementById('questionDateTime').value='".date("Y-m-d H-i-s")."';
1371 } 1204 }
1372
1373 var ques = $(this).data('ques'); 1205 var ques = $(this).data('ques');
1374 $('#options_div' + ques).toggle(); 1206 $('#options_div' + ques).toggle();
1375 }); 1207 });
1376
1377 var radCount=0; 1208 var radCount=0;
1378 var subParent; 1209 var subParent;
1379 var appendOnce = 1; 1210 var appendOnce = 1;
1380
1381 $('#primary_ques').on('click', '.options', function(){ 1211 $('#primary_ques').on('click', '.options', function(){
1382 var ques = $(this).data('ques'); 1212 var ques = $(this).data('ques');
1383 var ans = $(this).data('ans'); 1213 var ans = $(this).data('ans');
1384 var currQues=''; 1214 var currQues='';
1385
1386 var priParentQues; 1215 var priParentQues;
1387
1388 if(parseInt($('#level'+ques).val())==1) 1216 if(parseInt($('#level'+ques).val())==1)
1389 { 1217 {
1390 var element = $(this).parent().parent().parent().parent().parent().parent(); 1218 var element = $(this).parent().parent().parent().parent().parent().parent();
1391 priParentQues = element.attr('data-parent'); 1219 priParentQues = element.attr('data-parent');
1392
1393 subParent = priParentQues; 1220 subParent = priParentQues;
1394
1395 questionArray['Q-'+priParentQues] = {}; 1221 questionArray['Q-'+priParentQues] = {};
1396
1397 questionArray['Q-'+priParentQues]['prim_ques'] = $('#questText_'+ques).val(); 1222 questionArray['Q-'+priParentQues]['prim_ques'] = $('#questText_'+ques).val();
1398 questionArray['Q-'+priParentQues]['prim_response']=$(this).text(); 1223 questionArray['Q-'+priParentQues]['prim_response']=$(this).text();
1399
1400 questionArray['Q-'+priParentQues]['prim_txt'] = ''; 1224 questionArray['Q-'+priParentQues]['prim_txt'] = '';
1401
1402 $('#remark'+ques).keyup(function() { 1225 $('#remark'+ques).keyup(function() {
1403 questionArray['Q-'+priParentQues]['prim_txt']=$(this).val(); 1226 questionArray['Q-'+priParentQues]['prim_txt']=$(this).val();
1404 }); 1227 });
1405
1406 var hideRadioElement = $(this).parent(); 1228 var hideRadioElement = $(this).parent();
1407 var countLabel = hideRadioElement.children().size(); 1229 var countLabel = hideRadioElement.children().size();
1408
1409 var radEleId = hideRadioElement.attr('id'); 1230 var radEleId = hideRadioElement.attr('id');
1410
1411 var labels = document.getElementById(radEleId).querySelectorAll('label'); 1231 var labels = document.getElementById(radEleId).querySelectorAll('label');
1412
1413 for(var f=1;f<8;f++) 1232 for(var f=1;f<8;f++)
1414 { 1233 {
1415 questionArray['Q-'+priParentQues]['fol'+f+'_ques'] = ''; 1234 questionArray['Q-'+priParentQues]['fol'+f+'_ques'] = '';
1416 questionArray['Q-'+priParentQues]['fol'+f+'_response']=''; 1235 questionArray['Q-'+priParentQues]['fol'+f+'_response']='';
1417 questionArray['Q-'+priParentQues]['fol'+f+'_txt']=''; 1236 questionArray['Q-'+priParentQues]['fol'+f+'_txt']='';
1418 } 1237 }
1419
1420 radCount++; 1238 radCount++;
1421 } 1239 }
1422
1423 if(parseInt($('#level'+ques).val())==2) 1240 if(parseInt($('#level'+ques).val())==2)
1424 { 1241 {
1425 var element = $(this).parent().parent().parent().parent().parent().parent(); 1242 var element = $(this).parent().parent().parent().parent().parent().parent();
1426 priParentQues = element.attr('data-parent'); 1243 priParentQues = element.attr('data-parent');
1427
1428 questionArray['Q-'+priParentQues]['fol1_ques'] = $('#questText_'+ques).val(); 1244 questionArray['Q-'+priParentQues]['fol1_ques'] = $('#questText_'+ques).val();
1429 questionArray['Q-'+priParentQues]['fol1_response']=$(this).text(); 1245 questionArray['Q-'+priParentQues]['fol1_response']=$(this).text();
1430
1431 questionArray['Q-'+priParentQues]['fol_txt']=''; 1246 questionArray['Q-'+priParentQues]['fol_txt']='';
1432
1433 $('#remark'+ques).keyup(function() { 1247 $('#remark'+ques).keyup(function() {
1434 questionArray['Q-'+priParentQues]['fol1_txt']=$(this).val(); 1248 questionArray['Q-'+priParentQues]['fol1_txt']=$(this).val();
1435 }); 1249 });
1436
1437 var setAttrElement = $(this).parent().parent(); 1250 var setAttrElement = $(this).parent().parent();
1438 setAttrElement.attr('for','active'); 1251 setAttrElement.attr('for','active');
1439
1440 var hideElement = $(this).parent().parent().parent(); 1252 var hideElement = $(this).parent().parent().parent();
1441 var countDiv = hideElement.children().size(); 1253 var countDiv = hideElement.children().size();
1442
1443 for(var s=0;s<countDiv;s++) 1254 for(var s=0;s<countDiv;s++)
1444 { 1255 {
1445 var childEle = hideElement.children()[s]; 1256 var childEle = hideElement.children()[s];
1446
1447 if(childEle.getAttribute('for') != 'active') 1257 if(childEle.getAttribute('for') != 'active')
1448 document.getElementById(childEle.id).style.display='none'; 1258 document.getElementById(childEle.id).style.display='none';
1449
1450 } 1259 }
1451
1452 for(var f=2;f<8;f++) 1260 for(var f=2;f<8;f++)
1453 { 1261 {
1454 questionArray['Q-'+priParentQues]['fol'+f+'_ques'] = ''; 1262 questionArray['Q-'+priParentQues]['fol'+f+'_ques'] = '';
1455 questionArray['Q-'+priParentQues]['fol'+f+'_response']=''; 1263 questionArray['Q-'+priParentQues]['fol'+f+'_response']='';
1456 questionArray['Q-'+priParentQues]['fol'+f+'_txt']=''; 1264 questionArray['Q-'+priParentQues]['fol'+f+'_txt']='';
1457 } 1265 }
1458
1459
1460 } 1266 }
1461
1462 if(parseInt($('#level'+ques).val())==3) 1267 if(parseInt($('#level'+ques).val())==3)
1463 { 1268 {
1464 var element = $(this).parent().parent().parent().parent().parent().parent(); 1269 var element = $(this).parent().parent().parent().parent().parent().parent();
1465 priParentQues = element.attr('data-parent'); 1270 priParentQues = element.attr('data-parent');
1466
1467 questionArray['Q-'+priParentQues]['fol2_ques'] = $('#questText_'+ques).val(); 1271 questionArray['Q-'+priParentQues]['fol2_ques'] = $('#questText_'+ques).val();
1468 questionArray['Q-'+priParentQues]['fol2_response']=$(this).text(); 1272 questionArray['Q-'+priParentQues]['fol2_response']=$(this).text();
1469
1470 questionArray['Q-'+priParentQues]['fol2_txt']=''; 1273 questionArray['Q-'+priParentQues]['fol2_txt']='';
1471
1472 $('#remark'+ques).keyup(function() { 1274 $('#remark'+ques).keyup(function() {
1473 questionArray['Q-'+priParentQues]['fol2_txt']=$(this).val(); 1275 questionArray['Q-'+priParentQues]['fol2_txt']=$(this).val();
1474 }); 1276 });
1475
1476 var setAttrElement = $(this).parent().parent().parent(); 1277 var setAttrElement = $(this).parent().parent().parent();
1477 setAttrElement.attr('for','active'); 1278 setAttrElement.attr('for','active');
1478
1479 var hideElement = $(this).parent().parent().parent().parent(); 1279 var hideElement = $(this).parent().parent().parent().parent();
1480 var countDiv = hideElement.children().size(); 1280 var countDiv = hideElement.children().size();
1481
1482 for(var s=0;s<countDiv;s++) 1281 for(var s=0;s<countDiv;s++)
1483 { 1282 {
1484 var childEle = hideElement.children()[s]; 1283 var childEle = hideElement.children()[s];
1485
1486 if(childEle.getAttribute('for') != 'active') 1284 if(childEle.getAttribute('for') != 'active')
1487 document.getElementById(childEle.id).style.display='none'; 1285 document.getElementById(childEle.id).style.display='none';
1488
1489 } 1286 }
1490
1491 for(var f=3;f<8;f++) 1287 for(var f=3;f<8;f++)
1492 { 1288 {
1493 questionArray['Q-'+priParentQues]['fol'+f+'_ques'] = ''; 1289 questionArray['Q-'+priParentQues]['fol'+f+'_ques'] = '';
...@@ -1495,36 +1291,26 @@ function createQaireTab() ...@@ -1495,36 +1291,26 @@ function createQaireTab()
1495 questionArray['Q-'+priParentQues]['fol'+f+'_txt']=''; 1291 questionArray['Q-'+priParentQues]['fol'+f+'_txt']='';
1496 } 1292 }
1497 } 1293 }
1498
1499 if(parseInt($('#level'+ques).val())==4) 1294 if(parseInt($('#level'+ques).val())==4)
1500 { 1295 {
1501 var element = $(this).parent().parent().parent().parent().parent().parent(); 1296 var element = $(this).parent().parent().parent().parent().parent().parent();
1502 priParentQues = element.attr('data-parent'); 1297 priParentQues = element.attr('data-parent');
1503
1504 questionArray['Q-'+priParentQues]['fol3_ques'] = $('#questText_'+ques).val(); 1298 questionArray['Q-'+priParentQues]['fol3_ques'] = $('#questText_'+ques).val();
1505 questionArray['Q-'+priParentQues]['fol3_response']=$(this).text(); 1299 questionArray['Q-'+priParentQues]['fol3_response']=$(this).text();
1506
1507 questionArray['Q-'+priParentQues]['fol3_txt']=''; 1300 questionArray['Q-'+priParentQues]['fol3_txt']='';
1508
1509 $('#remark'+ques).keyup(function() { 1301 $('#remark'+ques).keyup(function() {
1510 questionArray['Q-'+priParentQues]['fol3_txt']=$(this).val(); 1302 questionArray['Q-'+priParentQues]['fol3_txt']=$(this).val();
1511 }); 1303 });
1512
1513 var setAttrElement = $(this).parent().parent().parent(); 1304 var setAttrElement = $(this).parent().parent().parent();
1514 setAttrElement.attr('for','active'); 1305 setAttrElement.attr('for','active');
1515
1516 var hideElement = $(this).parent().parent().parent().parent(); 1306 var hideElement = $(this).parent().parent().parent().parent();
1517 var countDiv = hideElement.children().size(); 1307 var countDiv = hideElement.children().size();
1518
1519 for(var s=0;s<countDiv;s++) 1308 for(var s=0;s<countDiv;s++)
1520 { 1309 {
1521 var childEle = hideElement.children()[s]; 1310 var childEle = hideElement.children()[s];
1522
1523 if(childEle.getAttribute('for') != 'active') 1311 if(childEle.getAttribute('for') != 'active')
1524 document.getElementById(childEle.id).style.display='none'; 1312 document.getElementById(childEle.id).style.display='none';
1525
1526 } 1313 }
1527
1528 for(var f=4;f<8;f++) 1314 for(var f=4;f<8;f++)
1529 { 1315 {
1530 questionArray['Q-'+priParentQues]['fol'+f+'_ques'] = ''; 1316 questionArray['Q-'+priParentQues]['fol'+f+'_ques'] = '';
...@@ -1532,35 +1318,26 @@ function createQaireTab() ...@@ -1532,35 +1318,26 @@ function createQaireTab()
1532 questionArray['Q-'+priParentQues]['fol'+f+'_txt']=''; 1318 questionArray['Q-'+priParentQues]['fol'+f+'_txt']='';
1533 } 1319 }
1534 } 1320 }
1535
1536 if(parseInt($('#level'+ques).val())==5) 1321 if(parseInt($('#level'+ques).val())==5)
1537 { 1322 {
1538 var element = $(this).parent().parent().parent().parent().parent().parent(); 1323 var element = $(this).parent().parent().parent().parent().parent().parent();
1539 priParentQues = element.attr('data-parent'); 1324 priParentQues = element.attr('data-parent');
1540
1541 questionArray['Q-'+priParentQues]['fol4_ques'] = $('#questText_'+ques).val(); 1325 questionArray['Q-'+priParentQues]['fol4_ques'] = $('#questText_'+ques).val();
1542 questionArray['Q-'+priParentQues]['fol4_response']=$(this).text(); 1326 questionArray['Q-'+priParentQues]['fol4_response']=$(this).text();
1543
1544 questionArray['Q-'+priParentQues]['fol4_txt']=''; 1327 questionArray['Q-'+priParentQues]['fol4_txt']='';
1545
1546 $('#remark'+ques).keyup(function() { 1328 $('#remark'+ques).keyup(function() {
1547 questionArray['Q-'+priParentQues]['fol4_txt']=$(this).val(); 1329 questionArray['Q-'+priParentQues]['fol4_txt']=$(this).val();
1548 }); 1330 });
1549
1550 var setAttrElement = $(this).parent().parent().parent(); 1331 var setAttrElement = $(this).parent().parent().parent();
1551 setAttrElement.attr('for','active'); 1332 setAttrElement.attr('for','active');
1552
1553 var hideElement = $(this).parent().parent().parent().parent(); 1333 var hideElement = $(this).parent().parent().parent().parent();
1554 var countDiv = hideElement.children().size(); 1334 var countDiv = hideElement.children().size();
1555
1556 for(var s=0;s<countDiv;s++) 1335 for(var s=0;s<countDiv;s++)
1557 { 1336 {
1558 var childEle = hideElement.children()[s]; 1337 var childEle = hideElement.children()[s];
1559
1560 if(childEle.getAttribute('for') != 'active') 1338 if(childEle.getAttribute('for') != 'active')
1561 document.getElementById(childEle.id).style.display='none'; 1339 document.getElementById(childEle.id).style.display='none';
1562 } 1340 }
1563
1564 for(var f=5;f<8;f++) 1341 for(var f=5;f<8;f++)
1565 { 1342 {
1566 questionArray['Q-'+priParentQues]['fol'+f+'_ques'] = ''; 1343 questionArray['Q-'+priParentQues]['fol'+f+'_ques'] = '';
...@@ -1568,36 +1345,26 @@ function createQaireTab() ...@@ -1568,36 +1345,26 @@ function createQaireTab()
1568 questionArray['Q-'+priParentQues]['fol'+f+'_txt']=''; 1345 questionArray['Q-'+priParentQues]['fol'+f+'_txt']='';
1569 } 1346 }
1570 } 1347 }
1571
1572 if(parseInt($('#level'+ques).val())==6) 1348 if(parseInt($('#level'+ques).val())==6)
1573 { 1349 {
1574 var element = $(this).parent().parent().parent().parent().parent().parent(); 1350 var element = $(this).parent().parent().parent().parent().parent().parent();
1575 priParentQues = element.attr('data-parent'); 1351 priParentQues = element.attr('data-parent');
1576
1577 questionArray['Q-'+priParentQues]['fol5_ques'] = $('#questText_'+ques).val(); 1352 questionArray['Q-'+priParentQues]['fol5_ques'] = $('#questText_'+ques).val();
1578 questionArray['Q-'+priParentQues]['fol5_response']=$(this).text(); 1353 questionArray['Q-'+priParentQues]['fol5_response']=$(this).text();
1579
1580 questionArray['Q-'+priParentQues]['fol5_txt']=''; 1354 questionArray['Q-'+priParentQues]['fol5_txt']='';
1581
1582 $('#remark'+ques).keyup(function() { 1355 $('#remark'+ques).keyup(function() {
1583 questionArray['Q-'+priParentQues]['fol5_txt']=$(this).val(); 1356 questionArray['Q-'+priParentQues]['fol5_txt']=$(this).val();
1584 }); 1357 });
1585
1586 var setAttrElement = $(this).parent().parent().parent(); 1358 var setAttrElement = $(this).parent().parent().parent();
1587 setAttrElement.attr('for','active'); 1359 setAttrElement.attr('for','active');
1588
1589 var hideElement = $(this).parent().parent().parent().parent(); 1360 var hideElement = $(this).parent().parent().parent().parent();
1590 var countDiv = hideElement.children().size(); 1361 var countDiv = hideElement.children().size();
1591
1592 for(var s=0;s<countDiv;s++) 1362 for(var s=0;s<countDiv;s++)
1593 { 1363 {
1594 var childEle = hideElement.children()[s]; 1364 var childEle = hideElement.children()[s];
1595
1596 if(childEle.getAttribute('for') != 'active') 1365 if(childEle.getAttribute('for') != 'active')
1597 document.getElementById(childEle.id).style.display='none'; 1366 document.getElementById(childEle.id).style.display='none';
1598
1599 } 1367 }
1600
1601 for(var f=6;f<8;f++) 1368 for(var f=6;f<8;f++)
1602 { 1369 {
1603 questionArray['Q-'+priParentQues]['fol'+f+'_ques'] = ''; 1370 questionArray['Q-'+priParentQues]['fol'+f+'_ques'] = '';
...@@ -1605,36 +1372,26 @@ function createQaireTab() ...@@ -1605,36 +1372,26 @@ function createQaireTab()
1605 questionArray['Q-'+priParentQues]['fol'+f+'_txt']=''; 1372 questionArray['Q-'+priParentQues]['fol'+f+'_txt']='';
1606 } 1373 }
1607 } 1374 }
1608
1609 if(parseInt($('#level'+ques).val())==7) 1375 if(parseInt($('#level'+ques).val())==7)
1610 { 1376 {
1611 var element = $(this).parent().parent().parent().parent().parent().parent(); 1377 var element = $(this).parent().parent().parent().parent().parent().parent();
1612 priParentQues = element.attr('data-parent'); 1378 priParentQues = element.attr('data-parent');
1613
1614 questionArray['Q-'+priParentQues]['fol6_ques'] = $('#questText_'+ques).val(); 1379 questionArray['Q-'+priParentQues]['fol6_ques'] = $('#questText_'+ques).val();
1615 questionArray['Q-'+priParentQues]['fol6_response']=$(this).text(); 1380 questionArray['Q-'+priParentQues]['fol6_response']=$(this).text();
1616
1617 questionArray['Q-'+priParentQues]['fol6_txt']=''; 1381 questionArray['Q-'+priParentQues]['fol6_txt']='';
1618
1619 $('#remark'+ques).keyup(function() { 1382 $('#remark'+ques).keyup(function() {
1620 questionArray['Q-'+priParentQues]['fol6_txt']=$(this).val(); 1383 questionArray['Q-'+priParentQues]['fol6_txt']=$(this).val();
1621 }); 1384 });
1622
1623 var setAttrElement = $(this).parent().parent().parent(); 1385 var setAttrElement = $(this).parent().parent().parent();
1624 setAttrElement.attr('for','active'); 1386 setAttrElement.attr('for','active');
1625
1626 var hideElement = $(this).parent().parent().parent().parent(); 1387 var hideElement = $(this).parent().parent().parent().parent();
1627 var countDiv = hideElement.children().size(); 1388 var countDiv = hideElement.children().size();
1628
1629 for(var s=0;s<countDiv;s++) 1389 for(var s=0;s<countDiv;s++)
1630 { 1390 {
1631 var childEle = hideElement.children()[s]; 1391 var childEle = hideElement.children()[s];
1632
1633 if(childEle.getAttribute('for') != 'active') 1392 if(childEle.getAttribute('for') != 'active')
1634 document.getElementById(childEle.id).style.display='none'; 1393 document.getElementById(childEle.id).style.display='none';
1635
1636 } 1394 }
1637
1638 for(var f=7;f<8;f++) 1395 for(var f=7;f<8;f++)
1639 { 1396 {
1640 questionArray['Q-'+priParentQues]['fol'+f+'_ques'] = ''; 1397 questionArray['Q-'+priParentQues]['fol'+f+'_ques'] = '';
...@@ -1642,55 +1399,41 @@ function createQaireTab() ...@@ -1642,55 +1399,41 @@ function createQaireTab()
1642 questionArray['Q-'+priParentQues]['fol'+f+'_txt']=''; 1399 questionArray['Q-'+priParentQues]['fol'+f+'_txt']='';
1643 } 1400 }
1644 } 1401 }
1645
1646 if(parseInt($('#level'+ques).val())==8) 1402 if(parseInt($('#level'+ques).val())==8)
1647 { 1403 {
1648 var element = $(this).parent().parent().parent().parent().parent().parent(); 1404 var element = $(this).parent().parent().parent().parent().parent().parent();
1649 priParentQues = element.attr('data-parent'); 1405 priParentQues = element.attr('data-parent');
1650
1651 questionArray['Q-'+priParentQues]['fol7_ques'] = $('#questText_'+ques).val(); 1406 questionArray['Q-'+priParentQues]['fol7_ques'] = $('#questText_'+ques).val();
1652 questionArray['Q-'+priParentQues]['fol7_response']=$(this).text(); 1407 questionArray['Q-'+priParentQues]['fol7_response']=$(this).text();
1653
1654 questionArray['Q-'+priParentQues]['fol7_txt']=''; 1408 questionArray['Q-'+priParentQues]['fol7_txt']='';
1655
1656 $('#remark'+ques).keyup(function() { 1409 $('#remark'+ques).keyup(function() {
1657 questionArray['Q-'+priParentQues]['fol7_txt']=$(this).val(); 1410 questionArray['Q-'+priParentQues]['fol7_txt']=$(this).val();
1658 }); 1411 });
1659
1660 var setAttrElement = $(this).parent().parent().parent(); 1412 var setAttrElement = $(this).parent().parent().parent();
1661 setAttrElement.attr('for','active'); 1413 setAttrElement.attr('for','active');
1662
1663 var hideElement = $(this).parent().parent().parent().parent(); 1414 var hideElement = $(this).parent().parent().parent().parent();
1664 var countDiv = hideElement.children().size(); 1415 var countDiv = hideElement.children().size();
1665
1666 for(var s=0;s<countDiv;s++) 1416 for(var s=0;s<countDiv;s++)
1667 { 1417 {
1668 var childEle = hideElement.children()[s]; 1418 var childEle = hideElement.children()[s];
1669
1670 if(childEle.getAttribute('for') != 'active') 1419 if(childEle.getAttribute('for') != 'active')
1671 document.getElementById(childEle.id).style.display='none'; 1420 document.getElementById(childEle.id).style.display='none';
1672
1673 } 1421 }
1674 } 1422 }
1675
1676 if(appendOnce%2==0) { 1423 if(appendOnce%2==0) {
1677 loadQuestions(ques, ans); 1424 loadQuestions(ques, ans);
1678 } 1425 }
1679 appendOnce++; 1426 appendOnce++;
1680 }); 1427 });
1681
1682 function loadQuestions(ques, ans) { 1428 function loadQuestions(ques, ans) {
1683 var level = parseInt($('#level'+ques).val()); 1429 var level = parseInt($('#level'+ques).val());
1684 var next_level = level+1; 1430 var next_level = level+1;
1685 var parent_id = '".$qid."'; 1431 var parent_id = '".$qid."';
1686
1687 if(level==1) 1432 if(level==1)
1688 { 1433 {
1689 prev_ques=''; 1434 prev_ques='';
1690 } 1435 }
1691
1692 var levelVar = parseInt($('#levelVal'+ques).val()); 1436 var levelVar = parseInt($('#levelVal'+ques).val());
1693
1694 <!-- $('#options_div'+prev_ques).attr('style','display:none');--> 1437 <!-- $('#options_div'+prev_ques).attr('style','display:none');-->
1695 $('#options_div'+$('#parent'+level+ques).val()+' input[type=radio]').attr('disabled','disabled'); 1438 $('#options_div'+$('#parent'+level+ques).val()+' input[type=radio]').attr('disabled','disabled');
1696 $.ajax({ 1439 $.ajax({
...@@ -1700,20 +1443,16 @@ function createQaireTab() ...@@ -1700,20 +1443,16 @@ function createQaireTab()
1700 }, 1443 },
1701 dataType: 'html', 1444 dataType: 'html',
1702 success: function(data) { 1445 success: function(data) {
1703
1704 var childParentDiv1 = null; 1446 var childParentDiv1 = null;
1705 var rowDiv1 = null; 1447 var rowDiv1 = null;
1706 var childParentDiv = null; 1448 var childParentDiv = null;
1707 var childParentDiv2 = null; 1449 var childParentDiv2 = null;
1708
1709 var rowDiv = $('#childParentDiv'+ques).parent().parent().attr('id'); 1450 var rowDiv = $('#childParentDiv'+ques).parent().parent().attr('id');
1710
1711 rowDiv1 = document.getElementById(rowDiv).nextElementSibling; 1451 rowDiv1 = document.getElementById(rowDiv).nextElementSibling;
1712 if(rowDiv1 != undefined) 1452 if(rowDiv1 != undefined)
1713 { 1453 {
1714 var rowDiv1ID = rowDiv1.id; 1454 var rowDiv1ID = rowDiv1.id;
1715 $('#'+rowDiv1ID).html(''); 1455 $('#'+rowDiv1ID).html('');
1716
1717 var rowDiv2 = document.getElementById(rowDiv).nextElementSibling.nextElementSibling; 1456 var rowDiv2 = document.getElementById(rowDiv).nextElementSibling.nextElementSibling;
1718 if(rowDiv2 != undefined) 1457 if(rowDiv2 != undefined)
1719 { 1458 {
...@@ -1721,47 +1460,35 @@ function createQaireTab() ...@@ -1721,47 +1460,35 @@ function createQaireTab()
1721 $('#'+rowDiv2ID).html(''); 1460 $('#'+rowDiv2ID).html('');
1722 } 1461 }
1723 } 1462 }
1724
1725 childParentDiv = $('#childParentDiv'+ques).parent().attr('id'); 1463 childParentDiv = $('#childParentDiv'+ques).parent().attr('id');
1726
1727 childParentDiv1 = document.getElementById(childParentDiv).nextElementSibling; 1464 childParentDiv1 = document.getElementById(childParentDiv).nextElementSibling;
1728
1729 if(childParentDiv1 != null) 1465 if(childParentDiv1 != null)
1730 { 1466 {
1731 var childParentDiv1ID = childParentDiv1.id; 1467 var childParentDiv1ID = childParentDiv1.id;
1732 $('#'+childParentDiv1ID).remove(); 1468 $('#'+childParentDiv1ID).remove();
1733
1734 childParentDiv2 = document.getElementById(childParentDiv).nextElementSibling; 1469 childParentDiv2 = document.getElementById(childParentDiv).nextElementSibling;
1735
1736 if(childParentDiv2 != undefined) 1470 if(childParentDiv2 != undefined)
1737 { 1471 {
1738 var childParentDiv2ID = childParentDiv2.id; 1472 var childParentDiv2ID = childParentDiv2.id;
1739 $('#'+childParentDiv2ID).remove(); 1473 $('#'+childParentDiv2ID).remove();
1740 } 1474 }
1741 } 1475 }
1742
1743 if(level<3) 1476 if(level<3)
1744 { 1477 {
1745 $('#rowDiv1'+subParent).append('<div class=\"col-md-4\" id=\"appendChild'+appendChild+ques+'\"></div>'); 1478 $('#rowDiv1'+subParent).append('<div class=\"col-md-4\" id=\"appendChild'+appendChild+ques+'\"></div>');
1746 } 1479 }
1747
1748 if(level>=3 && level<=5) 1480 if(level>=3 && level<=5)
1749 { 1481 {
1750 $('#rowDiv2'+subParent).append('<div class=\"col-md-4\" id=\"appendChild'+appendChild+ques+'\"></div>'); 1482 $('#rowDiv2'+subParent).append('<div class=\"col-md-4\" id=\"appendChild'+appendChild+ques+'\"></div>');
1751 } 1483 }
1752
1753 if(level>=6 && level<=8) 1484 if(level>=6 && level<=8)
1754 { 1485 {
1755 $('#rowDiv3'+subParent).append('<div class=\"col-md-4\" id=\"appendChild'+appendChild+ques+'\"></div>'); 1486 $('#rowDiv3'+subParent).append('<div class=\"col-md-4\" id=\"appendChild'+appendChild+ques+'\"></div>');
1756 } 1487 }
1757
1758 $('#appendChild'+appendChild+ques).append(data); 1488 $('#appendChild'+appendChild+ques).append(data);
1759
1760 var parentColor = document.getElementById('parentColorDiv'+subParent).getAttribute('style'); 1489 var parentColor = document.getElementById('parentColorDiv'+subParent).getAttribute('style');
1761
1762 for(var c=0;c<=8;c++){ 1490 for(var c=0;c<=8;c++){
1763 var colorDiv = document.getElementById('subParent'+subParent).getElementsByClassName('childDiv')[c]; 1491 var colorDiv = document.getElementById('subParent'+subParent).getElementsByClassName('childDiv')[c];
1764
1765 if(colorDiv!=undefined) 1492 if(colorDiv!=undefined)
1766 colorDiv.setAttribute('style',parentColor); 1493 colorDiv.setAttribute('style',parentColor);
1767 } 1494 }
...@@ -1769,9 +1496,7 @@ function createQaireTab() ...@@ -1769,9 +1496,7 @@ function createQaireTab()
1769 }); 1496 });
1770 prev_ques = ques; 1497 prev_ques = ques;
1771 appendChild++; 1498 appendChild++;
1772
1773 } 1499 }
1774
1775 $('#submitQuestionAire').click(function() 1500 $('#submitQuestionAire').click(function()
1776 { 1501 {
1777 if(radCount==0) 1502 if(radCount==0)
...@@ -1779,7 +1504,6 @@ function createQaireTab() ...@@ -1779,7 +1504,6 @@ function createQaireTab()
1779 alert('Please select some options first'); 1504 alert('Please select some options first');
1780 return; 1505 return;
1781 } 1506 }
1782
1783 var postdata='varid='+$('#varid').val(); 1507 var postdata='varid='+$('#varid').val();
1784 postdata+='&mobile='+'".$dataarr["mobile"]."'; 1508 postdata+='&mobile='+'".$dataarr["mobile"]."';
1785 postdata+='&client='+'".$dataarr["client"]."'; 1509 postdata+='&client='+'".$dataarr["client"]."';
...@@ -1789,14 +1513,9 @@ function createQaireTab() ...@@ -1789,14 +1513,9 @@ function createQaireTab()
1789 postdata+='&questionArray='+encodeURIComponent(JSON.stringify(questionArray)); 1513 postdata+='&questionArray='+encodeURIComponent(JSON.stringify(questionArray));
1790 doAjax('questionare',postdata,'createtaskdiv','ajaxMutex_recSaveData','singlethis','POST'); 1514 doAjax('questionare',postdata,'createtaskdiv','ajaxMutex_recSaveData','singlethis','POST');
1791 }); 1515 });
1792
1793 1516
1794
1795
1796
1797 }); 1517 });
1798 function updateagentcomments(id){ 1518 function updateagentcomments(id){
1799
1800 1519
1801 var agent_comment = $('#'+id+'_agent_comment').val(); 1520 var agent_comment = $('#'+id+'_agent_comment').val();
1802 if(agent_comment) 1521 if(agent_comment)
...@@ -1805,45 +1524,34 @@ function createQaireTab() ...@@ -1805,45 +1524,34 @@ function createQaireTab()
1805 var postdata='id='+id; 1524 var postdata='id='+id;
1806 postdata+='&agent_comment='+agent_comment; 1525 postdata+='&agent_comment='+agent_comment;
1807 postdata+='&mobile='+'".$dataarr["mobile"]."'; 1526 postdata+='&mobile='+'".$dataarr["mobile"]."';
1808
1809 doAjax('record?action=savecomment',postdata,'createtaskdiv','ajaxMutex_recSaveData','singlethis','POST'); 1527 doAjax('record?action=savecomment',postdata,'createtaskdiv','ajaxMutex_recSaveData','singlethis','POST');
1810 } 1528 }
1811 else 1529 else
1812 { 1530 {
1813 alert('Please insert agent comment first'); 1531 alert('Please insert agent comment first');
1814 } 1532 }
1815
1816 } 1533 }
1817
1818 </script> 1534 </script>
1819
1820
1821 </div> 1535 </div>
1822 </div> 1536 </div>
1823 </div> 1537 </div>
1824 </div> 1538 </div>
1825 </div></fieldset>"; 1539 </div></fieldset>";
1826 return $data; 1540 return $data;
1827
1828 } 1541 }
1829
1830 //QuestionAire History 1542 //QuestionAire History
1831 function createQaireHistTab() 1543 function createQaireHistTab()
1832 { 1544 {
1833 $user_id = Auth::user()->username; 1545 $user_id = Auth::user()->username;
1834 $cust_id = $this->recruitdata["peopledata"]["clientcode"]; 1546 $cust_id = $this->recruitdata["peopledata"]["clientcode"];
1835 $data=""; 1547 $data="";
1836
1837 $bulkCallID = DB::table("questionaire_details")->where('user_id','=',$user_id)->where('cust_id','=',$cust_id)->orderBy('id','desc')->select('call_id')->distinct()->get(); 1548 $bulkCallID = DB::table("questionaire_details")->where('user_id','=',$user_id)->where('cust_id','=',$cust_id)->orderBy('id','desc')->select('call_id')->distinct()->get();
1838
1839 dy> 1549 dy>
1840 $custIdArr = array(); 1550 $custIdArr = array();
1841 foreach($bulkCallID as $key=> $callID){ 1551 foreach($bulkCallID as $key=> $callID){
1842 1552
1843 $questionAirDetails = DB::table("questionaire_details")->where('user_id','=',$user_id)->where('cust_id','=',$cust_id)->where('call_id','=',$callID->call_id)->select('*')->get(); 1553 $questionAirDetails = DB::table("questionaire_details")->where('user_id','=',$user_id)->where('cust_id','=',$cust_id)->where('call_id','=',$callID->call_id)->select('*')->get();
1844
1845 $questionAirSortDetails = $questionAirDetails[0]; 1554 $questionAirSortDetails = $questionAirDetails[0];
1846
1847 $data.="<a onclick='questionAireDiv".$key."()'><div class='panel panel-warning panel-body'> 1555 $data.="<a onclick='questionAireDiv".$key."()'><div class='panel panel-warning panel-body'>
1848 <caption><div> 1556 <caption><div>
1849 <div class='col-xs-4'><label class='col-xs-4'>Date/time</label><p class='col-xs-8'>".$questionAirSortDetails->question_time."</p></div> 1557 <div class='col-xs-4'><label class='col-xs-4'>Date/time</label><p class='col-xs-8'>".$questionAirSortDetails->question_time."</p></div>
...@@ -1864,7 +1572,6 @@ function createQaireHistTab() ...@@ -1864,7 +1572,6 @@ function createQaireHistTab()
1864 <th>Followup7</th> 1572 <th>Followup7</th>
1865 </tr> 1573 </tr>
1866 </thead><tbody>"; 1574 </thead><tbody>";
1867
1868 foreach($questionAirDetails as $keys=> $questionAirDetail){ 1575 foreach($questionAirDetails as $keys=> $questionAirDetail){
1869 if($keys%2==0) 1576 if($keys%2==0)
1870 { 1577 {
...@@ -1885,7 +1592,6 @@ function createQaireHistTab() ...@@ -1885,7 +1592,6 @@ function createQaireHistTab()
1885 <td>".$questionAirDetail->followup6_question."</td> 1592 <td>".$questionAirDetail->followup6_question."</td>
1886 <td>".$questionAirDetail->followup7_question."</td> 1593 <td>".$questionAirDetail->followup7_question."</td>
1887 </tr>"; 1594 </tr>";
1888
1889 if($keys%2==0) 1595 if($keys%2==0)
1890 { 1596 {
1891 $data.="<tr style='background-color:#e6e5ef'>"; 1597 $data.="<tr style='background-color:#e6e5ef'>";
...@@ -1894,7 +1600,6 @@ function createQaireHistTab() ...@@ -1894,7 +1600,6 @@ function createQaireHistTab()
1894 { 1600 {
1895 $data.="<tr style='background-color:#ffffff'>"; 1601 $data.="<tr style='background-color:#ffffff'>";
1896 } 1602 }
1897
1898 $data.="<td>".$questionAirDetail->question."</td> 1603 $data.="<td>".$questionAirDetail->question."</td>
1899 <td>Response</td> 1604 <td>Response</td>
1900 <td>".$questionAirDetail->primary_response."</td> 1605 <td>".$questionAirDetail->primary_response."</td>
...@@ -1906,7 +1611,6 @@ function createQaireHistTab() ...@@ -1906,7 +1611,6 @@ function createQaireHistTab()
1906 <td>".$questionAirDetail->followup6_response."</td> 1611 <td>".$questionAirDetail->followup6_response."</td>
1907 <td>".$questionAirDetail->followup7_response."</td> 1612 <td>".$questionAirDetail->followup7_response."</td>
1908 </tr>"; 1613 </tr>";
1909
1910 if($keys%2==0) 1614 if($keys%2==0)
1911 { 1615 {
1912 $data.="<tr style='background-color:#e6e5ef'>"; 1616 $data.="<tr style='background-color:#e6e5ef'>";
...@@ -1915,7 +1619,6 @@ function createQaireHistTab() ...@@ -1915,7 +1619,6 @@ function createQaireHistTab()
1915 { 1619 {
1916 $data.="<tr style='background-color:#ffffff'>"; 1620 $data.="<tr style='background-color:#ffffff'>";
1917 } 1621 }
1918
1919 $data.="<td>".$questionAirDetail->question."</td> 1622 $data.="<td>".$questionAirDetail->question."</td>
1920 <td>Text</td> 1623 <td>Text</td>
1921 <td>".$questionAirDetail->primary_text."</td> 1624 <td>".$questionAirDetail->primary_text."</td>
...@@ -1928,14 +1631,11 @@ function createQaireHistTab() ...@@ -1928,14 +1631,11 @@ function createQaireHistTab()
1928 <td>".$questionAirDetail->followup7_text."</td> 1631 <td>".$questionAirDetail->followup7_text."</td>
1929 </tr>"; 1632 </tr>";
1930 } 1633 }
1931
1932 $data.=" 1634 $data.="
1933 </tbody></table></div></a> 1635 </tbody></table></div></a>
1934 <script> 1636 <script>
1935 function questionAireDiv".$key."(){ 1637 function questionAireDiv".$key."(){
1936
1937 var tabStyle".$key." = document.getElementById('questionAireTable".$key."').style.display; 1638 var tabStyle".$key." = document.getElementById('questionAireTable".$key."').style.display;
1938
1939 if(tabStyle".$key."=='none') 1639 if(tabStyle".$key."=='none')
1940 { 1640 {
1941 document.getElementById('questionAireTable".$key."').style.display='block'; 1641 document.getElementById('questionAireTable".$key."').style.display='block';
...@@ -1944,32 +1644,23 @@ $data.=" ...@@ -1944,32 +1644,23 @@ $data.="
1944 { 1644 {
1945 document.getElementById('questionAireTable".$key."').style.display='none'; 1645 document.getElementById('questionAireTable".$key."').style.display='none';
1946 } 1646 }
1947
1948 } 1647 }
1949 </script> 1648 </script>
1950 "; 1649 ";
1951 } 1650 }
1952
1953 // $allQuestions = DB::table("questionaire_details")->whereIn('call_id', $custIdArr)->get(); 1651 // $allQuestions = DB::table("questionaire_details")->whereIn('call_id', $custIdArr)->get();
1954
1955 return $data; 1652 return $data;
1956 } 1653 }
1957
1958 function createCompManage() 1654 function createCompManage()
1959 { 1655 {
1960 $varid=$this->varid; 1656 $varid=$this->varid;
1961 $dataarr=$this->recruitdata["peopledata"]; 1657 $dataarr=$this->recruitdata["peopledata"];
1962 $callId=1; 1658 $callId=1;
1963
1964 $crmcallDetails=CRMCall::where('crm_id','=',$varid)->orderBy("created_at","DESC")->first(); 1659 $crmcallDetails=CRMCall::where('crm_id','=',$varid)->orderBy("created_at","DESC")->first();
1965
1966 if($crmcallDetails) 1660 if($crmcallDetails)
1967 $callId = $crmcallDetails->id; 1661 $callId = $crmcallDetails->id;
1968
1969 $compFields = DB::table("complaint_fields")->get(); 1662 $compFields = DB::table("complaint_fields")->get();
1970
1971 $resclassUnitArr = DB::table("complaint_resol_class_unit")->get(); 1663 $resclassUnitArr = DB::table("complaint_resol_class_unit")->get();
1972
1973 $custType = "<option value=''></option>"; 1664 $custType = "<option value=''></option>";
1974 $custBand = "<option value=''></option>"; 1665 $custBand = "<option value=''></option>";
1975 $servType = "<option value=''></option>"; 1666 $servType = "<option value=''></option>";
...@@ -1985,62 +1676,43 @@ function createCompManage() ...@@ -1985,62 +1676,43 @@ function createCompManage()
1985 $logBranchName = "<option value=''>Select...</option>"; 1676 $logBranchName = "<option value=''>Select...</option>";
1986 $logBranchCode = "<option value=''></option>"; 1677 $logBranchCode = "<option value=''></option>";
1987 $resBranchCode = "<option value=''></option>"; 1678 $resBranchCode = "<option value=''></option>";
1988
1989 foreach ($resclassUnitArr as $key => $resclassunit) { 1679 foreach ($resclassUnitArr as $key => $resclassunit) {
1990 if($resclassunit->resolve_class_unit) 1680 if($resclassunit->resolve_class_unit)
1991 $resclassUnit.= "<option value='$resclassunit->id'>$resclassunit->resolve_class_unit</option>"; 1681 $resclassUnit.= "<option value='$resclassunit->id'>$resclassunit->resolve_class_unit</option>";
1992 } 1682 }
1993
1994 foreach ($compFields as $key => $fields) { 1683 foreach ($compFields as $key => $fields) {
1995
1996 if($fields->cust_type) 1684 if($fields->cust_type)
1997 $custType.= "<option value='$fields->cust_type'>$fields->cust_type</option>"; 1685 $custType.= "<option value='$fields->cust_type'>$fields->cust_type</option>";
1998
1999 if($fields->cust_band) 1686 if($fields->cust_band)
2000 $custBand.= "<option value='$fields->cust_band'>$fields->cust_band</option>"; 1687 $custBand.= "<option value='$fields->cust_band'>$fields->cust_band</option>";
2001
2002 if($fields->service_type) 1688 if($fields->service_type)
2003 $servType.= "<option value='$fields->service_type'>$fields->service_type</option>"; 1689 $servType.= "<option value='$fields->service_type'>$fields->service_type</option>";
2004
2005 if($fields->priority) 1690 if($fields->priority)
2006 $priority.= "<option value='$fields->priority'>$fields->priority</option>"; 1691 $priority.= "<option value='$fields->priority'>$fields->priority</option>";
2007
2008 if($fields->rbb) 1692 if($fields->rbb)
2009 $rbb.= "<option value='$fields->rbb'>$fields->rbb</option>"; 1693 $rbb.= "<option value='$fields->rbb'>$fields->rbb</option>";
2010
2011 if($fields->non_rbb) 1694 if($fields->non_rbb)
2012 $nonRbb.= "<option value='$fields->non_rbb'>$fields->non_rbb</option>"; 1695 $nonRbb.= "<option value='$fields->non_rbb'>$fields->non_rbb</option>";
2013
2014 if($fields->source_of_info) 1696 if($fields->source_of_info)
2015 $srcInfo.= "<option value='$fields->source_of_info'>$fields->source_of_info</option>"; 1697 $srcInfo.= "<option value='$fields->source_of_info'>$fields->source_of_info</option>";
2016
2017 if($fields->cust_city) 1698 if($fields->cust_city)
2018 $custCity.= "<option value='$fields->cust_city'>$fields->cust_city</option>"; 1699 $custCity.= "<option value='$fields->cust_city'>$fields->cust_city</option>";
2019
2020 if($fields->acknowledge) 1700 if($fields->acknowledge)
2021 $ackSent.= "<option value='$fields->acknowledge'>$fields->acknowledge</option>"; 1701 $ackSent.= "<option value='$fields->acknowledge'>$fields->acknowledge</option>";
2022
2023 if($fields->logging_branch_name) 1702 if($fields->logging_branch_name)
2024 $logBranchName.= "<option value='$fields->logging_branch_name'>$fields->logging_branch_name</option>"; 1703 $logBranchName.= "<option value='$fields->logging_branch_name'>$fields->logging_branch_name</option>";
2025
2026 if($fields->logging_branch_code) 1704 if($fields->logging_branch_code)
2027 $logBranchCode.= "<option value='$fields->logging_branch_code'>$fields->logging_branch_code</option>"; 1705 $logBranchCode.= "<option value='$fields->logging_branch_code'>$fields->logging_branch_code</option>";
2028
2029 if($fields->resolving_branch_code) 1706 if($fields->resolving_branch_code)
2030 $resBranchCode.= "<option value='$fields->resolving_branch_code'>$fields->resolving_branch_code</option>"; 1707 $resBranchCode.= "<option value='$fields->resolving_branch_code'>$fields->resolving_branch_code</option>";
2031
2032 if($fields->resolving_branch_w_code) 1708 if($fields->resolving_branch_w_code)
2033 $resolving_branch_w_code[] = explode("-", $fields->resolving_branch_w_code); 1709 $resolving_branch_w_code[] = explode("-", $fields->resolving_branch_w_code);
2034
2035 if($fields->logging_branch_w_code) 1710 if($fields->logging_branch_w_code)
2036 $logging_branch_w_code[] = explode("-", $fields->logging_branch_w_code); 1711 $logging_branch_w_code[] = explode("-", $fields->logging_branch_w_code);
2037
2038 } 1712 }
2039
2040 $resolving_branch_w_code = json_encode($resolving_branch_w_code); 1713 $resolving_branch_w_code = json_encode($resolving_branch_w_code);
2041 $logging_branch_w_code = json_encode($logging_branch_w_code); 1714 $logging_branch_w_code = json_encode($logging_branch_w_code);
2042 $logdate=strtotime(date('Y-m-d H:i:s'))+330*60; 1715 $logdate=strtotime(date('Y-m-d H:i:s'))+330*60;
2043
2044 $data = " 1716 $data = "
2045 <style> 1717 <style>
2046 .search { 1718 .search {
...@@ -2063,7 +1735,6 @@ foreach ($resclassUnitArr as $key => $resclassunit) { ...@@ -2063,7 +1735,6 @@ foreach ($resclassUnitArr as $key => $resclassunit) {
2063 <label class='label-small_new' style='width:29%;'>Complainant Name <span style='color:red;'>*</span></label> 1735 <label class='label-small_new' style='width:29%;'>Complainant Name <span style='color:red;'>*</span></label>
2064 <input type='text' class='form_new form_new_amend' style='width:50%;' id='compName' value=''> 1736 <input type='text' class='form_new form_new_amend' style='width:50%;' id='compName' value=''>
2065 </div> 1737 </div>
2066
2067 <div style='width:49%;float:left'> 1738 <div style='width:49%;float:left'>
2068 <label class='label-small_new' style='width:29%;'>AAN</label> 1739 <label class='label-small_new' style='width:29%;'>AAN</label>
2069 <input type='number' class='form_new form_new_amend' style='width:50%;' id='aan'> 1740 <input type='number' class='form_new form_new_amend' style='width:50%;' id='aan'>
...@@ -2089,7 +1760,6 @@ foreach ($resclassUnitArr as $key => $resclassunit) { ...@@ -2089,7 +1760,6 @@ foreach ($resclassUnitArr as $key => $resclassunit) {
2089 <label class='label-small_new' style='width:29%;'>Cust ID<span style='color:red;'>*</span></label> 1760 <label class='label-small_new' style='width:29%;'>Cust ID<span style='color:red;'>*</span></label>
2090 <input type='number' class='form_new form_new_amend'style='width:50%;' value='' id='custId'> 1761 <input type='number' class='form_new form_new_amend'style='width:50%;' value='' id='custId'>
2091 </div> 1762 </div>
2092
2093 <div style='width:49%;float:left'> 1763 <div style='width:49%;float:left'>
2094 <label class='label-small_new' style='width:29%;'>Shadow Cust ID</label> 1764 <label class='label-small_new' style='width:29%;'>Shadow Cust ID</label>
2095 <input type='number' class='form_new form_new_amend' style='width:50%;' id='shadCustId'> 1765 <input type='number' class='form_new form_new_amend' style='width:50%;' id='shadCustId'>
...@@ -2101,7 +1771,6 @@ foreach ($resclassUnitArr as $key => $resclassunit) { ...@@ -2101,7 +1771,6 @@ foreach ($resclassUnitArr as $key => $resclassunit) {
2101 <label class='label-small_new' style='width:29%;'>CASA FD/RA/DP Number</label> 1771 <label class='label-small_new' style='width:29%;'>CASA FD/RA/DP Number</label>
2102 <input type='number' class='form_new form_new_amend' style='width:50%;' id='casa'> 1772 <input type='number' class='form_new form_new_amend' style='width:50%;' id='casa'>
2103 </div> 1773 </div>
2104
2105 <div style='width:49%;float:left' class='search'> 1774 <div style='width:49%;float:left' class='search'>
2106 <label class='label-small_new' style='width:29%;'>Docket Number<span style='color:red;'>*</span></label> 1775 <label class='label-small_new' style='width:29%;'>Docket Number<span style='color:red;'>*</span></label>
2107 <input type='text' class='form_new form_new_amend' style='width:52%;' id='dockNum' value=''> 1776 <input type='text' class='form_new form_new_amend' style='width:52%;' id='dockNum' value=''>
...@@ -2113,7 +1782,6 @@ foreach ($resclassUnitArr as $key => $resclassunit) { ...@@ -2113,7 +1782,6 @@ foreach ($resclassUnitArr as $key => $resclassunit) {
2113 <label class='label-small_new' style='width:29%;'>Customer Name On Card</label> 1782 <label class='label-small_new' style='width:29%;'>Customer Name On Card</label>
2114 <input type='text' class='form_new form_new_amend' style='width:50%;' id='custNameOnCard' value=''> 1783 <input type='text' class='form_new form_new_amend' style='width:50%;' id='custNameOnCard' value=''>
2115 </div> 1784 </div>
2116
2117 <div style='width:49%;float:left'> 1785 <div style='width:49%;float:left'>
2118 <label class='label-small_new' style='width:29%;'>Card Number</label> 1786 <label class='label-small_new' style='width:29%;'>Card Number</label>
2119 <input type='text' class='form_new form_new_amend' style='width:50%;' id='cardNum' maxlength='16'> 1787 <input type='text' class='form_new form_new_amend' style='width:50%;' id='cardNum' maxlength='16'>
...@@ -2125,7 +1793,6 @@ foreach ($resclassUnitArr as $key => $resclassunit) { ...@@ -2125,7 +1793,6 @@ foreach ($resclassUnitArr as $key => $resclassunit) {
2125 <label class='label-small_new' style='width:29%;'>Customer Band</label> 1793 <label class='label-small_new' style='width:29%;'>Customer Band</label>
2126 <select id='custBand' class='form_hrm_select select2multi' style='width:50%'>$custBand</select> 1794 <select id='custBand' class='form_hrm_select select2multi' style='width:50%'>$custBand</select>
2127 </div> 1795 </div>
2128
2129 <div style='width:49%;float:left'> 1796 <div style='width:49%;float:left'>
2130 <label class='label-small_new' style='width:29%;'>Custmer Type</label> 1797 <label class='label-small_new' style='width:29%;'>Custmer Type</label>
2131 <select id='custType' class='form_hrm_select select2multi' style='width:50%;'>$custType</select> 1798 <select id='custType' class='form_hrm_select select2multi' style='width:50%;'>$custType</select>
...@@ -2137,7 +1804,6 @@ foreach ($resclassUnitArr as $key => $resclassunit) { ...@@ -2137,7 +1804,6 @@ foreach ($resclassUnitArr as $key => $resclassunit) {
2137 <label class='label-small_new' style='width:29%;'>Customer Mobile<span style='color:red;'>*</span></label> 1804 <label class='label-small_new' style='width:29%;'>Customer Mobile<span style='color:red;'>*</span></label>
2138 <input type='number' class='form_new form_new_amend' style='width:50%;' id='custMob' maxlength='10'> 1805 <input type='number' class='form_new form_new_amend' style='width:50%;' id='custMob' maxlength='10'>
2139 </div> 1806 </div>
2140
2141 <div style='width:49%;float:left'> 1807 <div style='width:49%;float:left'>
2142 <label class='label-small_new' style='width:29%;'>Contact Number</label> 1808 <label class='label-small_new' style='width:29%;'>Contact Number</label>
2143 <input type='number' class='form_new form_new_amend' style='width:50%;' id='contNum'> 1809 <input type='number' class='form_new form_new_amend' style='width:50%;' id='contNum'>
...@@ -2149,7 +1815,6 @@ foreach ($resclassUnitArr as $key => $resclassunit) { ...@@ -2149,7 +1815,6 @@ foreach ($resclassUnitArr as $key => $resclassunit) {
2149 <label class='label-small_new' style='width:29%;'>Email</label> 1815 <label class='label-small_new' style='width:29%;'>Email</label>
2150 <input type='text' class='form_new form_new_amend' style='width:50%;' id='email' value='' maxlength='50'> 1816 <input type='text' class='form_new form_new_amend' style='width:50%;' id='email' value='' maxlength='50'>
2151 </div> 1817 </div>
2152
2153 <div style='width:49%;float:left'> 1818 <div style='width:49%;float:left'>
2154 <label class='label-small_new' style='width:29%;'>Case Reference</label> 1819 <label class='label-small_new' style='width:29%;'>Case Reference</label>
2155 <input type='text' class='form_new form_new_amend' style='width:50%;' id='caseRef' value='' maxlength='50'> 1820 <input type='text' class='form_new form_new_amend' style='width:50%;' id='caseRef' value='' maxlength='50'>
...@@ -2161,14 +1826,12 @@ foreach ($resclassUnitArr as $key => $resclassunit) { ...@@ -2161,14 +1826,12 @@ foreach ($resclassUnitArr as $key => $resclassunit) {
2161 <label class='label-small_new' style='width:29%;'>Source Of Information<span style='color:red;'>*</span></label> 1826 <label class='label-small_new' style='width:29%;'>Source Of Information<span style='color:red;'>*</span></label>
2162 <select id='srcInfo' class='form_hrm_select select2multi' style='width:50%'>$srcInfo</select> 1827 <select id='srcInfo' class='form_hrm_select select2multi' style='width:50%'>$srcInfo</select>
2163 </div> 1828 </div>
2164
2165 <div style='width:49%;float:left'> 1829 <div style='width:49%;float:left'>
2166 <label class='label-small_new' style='width:29%;'>Customer City</label> 1830 <label class='label-small_new' style='width:29%;'>Customer City</label>
2167 <select id='custCity' class='form_hrm_select select2multi' style='width:50%;'>$custCity</select> 1831 <select id='custCity' class='form_hrm_select select2multi' style='width:50%;'>$custCity</select>
2168 </div> 1832 </div>
2169 </div> 1833 </div>
2170 <br><br><br> 1834 <br><br><br>
2171
2172 <h5>Case Information</h5> 1835 <h5>Case Information</h5>
2173 <hr/> 1836 <hr/>
2174 <br> 1837 <br>
...@@ -2188,7 +1851,6 @@ foreach ($resclassUnitArr as $key => $resclassunit) { ...@@ -2188,7 +1851,6 @@ foreach ($resclassUnitArr as $key => $resclassunit) {
2188 <label class='label-small_new' style='width:29%;'>Logging Branch Name<span style='color:red;'>*</span></label> 1851 <label class='label-small_new' style='width:29%;'>Logging Branch Name<span style='color:red;'>*</span></label>
2189 <select id='logBranchName' class='form_hrm_select select2multi' style='width:50%' readonly>$logBranchName</select> 1852 <select id='logBranchName' class='form_hrm_select select2multi' style='width:50%' readonly>$logBranchName</select>
2190 </div> 1853 </div>
2191
2192 <div style='width:49%;float:left'> 1854 <div style='width:49%;float:left'>
2193 <label class='label-small_new' style='width:29%;'>Logging Classification Unit<span style='color:red;'>*</span></label> 1855 <label class='label-small_new' style='width:29%;'>Logging Classification Unit<span style='color:red;'>*</span></label>
2194 <select id='logClassUnit' class='form_hrm_select select2multi' style='width:50%' readonly> 1856 <select id='logClassUnit' class='form_hrm_select select2multi' style='width:50%' readonly>
...@@ -2204,7 +1866,6 @@ foreach ($resclassUnitArr as $key => $resclassunit) { ...@@ -2204,7 +1866,6 @@ foreach ($resclassUnitArr as $key => $resclassunit) {
2204 <label class='label-small_new' style='width:29%;'>Logging Branch Code</label> 1866 <label class='label-small_new' style='width:29%;'>Logging Branch Code</label>
2205 <input type='text' class='form_new form_new_amend' style='width:50%;' id='logBranchCode' value='' readonly> 1867 <input type='text' class='form_new form_new_amend' style='width:50%;' id='logBranchCode' value='' readonly>
2206 </div> 1868 </div>
2207
2208 <div style='width:49%;float:left'> 1869 <div style='width:49%;float:left'>
2209 <label class='label-small_new' style='width:29%;'>Acknowledge Sent</label> 1870 <label class='label-small_new' style='width:29%;'>Acknowledge Sent</label>
2210 <select id='ackSent' class='form_hrm_select select2multi' style='width:50%'>$ackSent</select> 1871 <select id='ackSent' class='form_hrm_select select2multi' style='width:50%'>$ackSent</select>
...@@ -2216,7 +1877,6 @@ foreach ($resclassUnitArr as $key => $resclassunit) { ...@@ -2216,7 +1877,6 @@ foreach ($resclassUnitArr as $key => $resclassunit) {
2216 <label class='label-small_new' style='width:29%;'>Proposed/Resolving Classification Unit</label> 1877 <label class='label-small_new' style='width:29%;'>Proposed/Resolving Classification Unit</label>
2217 <select id='resclassUnit' class='form_hrm_select select2multi' style='width:50%'>$resclassUnit</select> 1878 <select id='resclassUnit' class='form_hrm_select select2multi' style='width:50%'>$resclassUnit</select>
2218 </div> 1879 </div>
2219
2220 <div style='width:49%;float:left'> 1880 <div style='width:49%;float:left'>
2221 <label class='label-small_new' style='width:29%;'>Resolving Branch Code</label> 1881 <label class='label-small_new' style='width:29%;'>Resolving Branch Code</label>
2222 <input type='text' class='form_new form_new_amend' style='width:50%;' id='resBranchCode' value='' readonly> 1882 <input type='text' class='form_new form_new_amend' style='width:50%;' id='resBranchCode' value='' readonly>
...@@ -2279,44 +1939,32 @@ foreach ($resclassUnitArr as $key => $resclassunit) { ...@@ -2279,44 +1939,32 @@ foreach ($resclassUnitArr as $key => $resclassunit) {
2279 <input type='button' class='btn btn-default btn-md' style='margin-left:40%' value='Save' id='save'> 1939 <input type='button' class='btn btn-default btn-md' style='margin-left:40%' value='Save' id='save'>
2280 </div> 1940 </div>
2281 </div> 1941 </div>
2282
2283 <script> 1942 <script>
2284
2285 var addInfotext_max = 1000-$('#addInfo').val().length; 1943 var addInfotext_max = 1000-$('#addInfo').val().length;
2286 $('#addInfoText').html(addInfotext_max + ' chars remaining'); 1944 $('#addInfoText').html(addInfotext_max + ' chars remaining');
2287
2288 $('#addInfo').keyup(function() { 1945 $('#addInfo').keyup(function() {
2289 var addInfotext_length = $('#addInfo').val().length; 1946 var addInfotext_length = $('#addInfo').val().length;
2290 var addInfotext_remaining = addInfotext_max - addInfotext_length; 1947 var addInfotext_remaining = addInfotext_max - addInfotext_length;
2291
2292 $('#addInfoText').html(addInfotext_remaining + ' chars remaining'); 1948 $('#addInfoText').html(addInfotext_remaining + ' chars remaining');
2293 }); 1949 });
2294
2295 var noctext_max = 512-$('#noc').val().length; 1950 var noctext_max = 512-$('#noc').val().length;
2296 $('#nocText').html(noctext_max + ' chars remaining'); 1951 $('#nocText').html(noctext_max + ' chars remaining');
2297
2298 $('#noc').keyup(function() { 1952 $('#noc').keyup(function() {
2299 var noctext_length = $('#noc').val().length; 1953 var noctext_length = $('#noc').val().length;
2300 var noctext_remaining = noctext_max - noctext_length; 1954 var noctext_remaining = noctext_max - noctext_length;
2301
2302 $('#nocText').html(noctext_remaining + ' chars remaining'); 1955 $('#nocText').html(noctext_remaining + ' chars remaining');
2303 }); 1956 });
2304
2305 var detailSuggesttext_max = 512-$('#detailSuggest').val().length; 1957 var detailSuggesttext_max = 512-$('#detailSuggest').val().length;
2306 $('#detailSuggestText').html(detailSuggesttext_max + ' chars remaining'); 1958 $('#detailSuggestText').html(detailSuggesttext_max + ' chars remaining');
2307
2308 $('#detailSuggest').keyup(function() { 1959 $('#detailSuggest').keyup(function() {
2309 var detailSuggesttext_length = $('#detailSuggest').val().length; 1960 var detailSuggesttext_length = $('#detailSuggest').val().length;
2310 var detailSuggesttext_remaining = detailSuggesttext_max - detailSuggesttext_length; 1961 var detailSuggesttext_remaining = detailSuggesttext_max - detailSuggesttext_length;
2311
2312 $('#detailSuggestText').html(detailSuggesttext_remaining + ' chars remaining'); 1962 $('#detailSuggestText').html(detailSuggesttext_remaining + ' chars remaining');
2313 }); 1963 });
2314
2315 $('#logBranchName').click(function() 1964 $('#logBranchName').click(function()
2316 { 1965 {
2317 var logBranchName = $(this).val(); 1966 var logBranchName = $(this).val();
2318 var logging_branch_w_code = $logging_branch_w_code; 1967 var logging_branch_w_code = $logging_branch_w_code;
2319
2320 if(logBranchName) 1968 if(logBranchName)
2321 { 1969 {
2322 for(var l in logging_branch_w_code) 1970 for(var l in logging_branch_w_code)
...@@ -2332,12 +1980,10 @@ foreach ($resclassUnitArr as $key => $resclassunit) { ...@@ -2332,12 +1980,10 @@ foreach ($resclassUnitArr as $key => $resclassunit) {
2332 $('#logBranchCode').val(''); 1980 $('#logBranchCode').val('');
2333 } 1981 }
2334 }); 1982 });
2335
2336 $('#resBranch').click(function() 1983 $('#resBranch').click(function()
2337 { 1984 {
2338 var resBranchVal = $(this).val(); 1985 var resBranchVal = $(this).val();
2339 var resolving_branch_w_code = $resolving_branch_w_code; 1986 var resolving_branch_w_code = $resolving_branch_w_code;
2340
2341 for(var lb in resolving_branch_w_code) 1987 for(var lb in resolving_branch_w_code)
2342 { 1988 {
2343 if((resolving_branch_w_code[lb][0]).trim()==resBranchVal) 1989 if((resolving_branch_w_code[lb][0]).trim()==resBranchVal)
...@@ -2346,31 +1992,25 @@ foreach ($resclassUnitArr as $key => $resclassunit) { ...@@ -2346,31 +1992,25 @@ foreach ($resclassUnitArr as $key => $resclassunit) {
2346 } 1992 }
2347 } 1993 }
2348 }); 1994 });
2349
2350 $('#resclassUnit').click(function() 1995 $('#resclassUnit').click(function()
2351 { 1996 {
2352 var resclassUnitVal = $(this).val(); 1997 var resclassUnitVal = $(this).val();
2353
2354 //To make empty when Non rbb selected 1998 //To make empty when Non rbb selected
2355 $('#resBranchCode').val(''); 1999 $('#resBranchCode').val('');
2356 $('#resBranch').select2('val', ''); 2000 $('#resBranch').select2('val', '');
2357
2358 if(resclassUnitVal) 2001 if(resclassUnitVal)
2359 { 2002 {
2360 doAjax('resclassUnit','resclassUnitVal='+encodeURIComponent(resclassUnitVal),'','','singlethis','POST',function(retstr){ 2003 doAjax('resclassUnit','resclassUnitVal='+encodeURIComponent(resclassUnitVal),'','','singlethis','POST',function(retstr){
2361 var compArr = JSON.parse(retstr.responseText); 2004 var compArr = JSON.parse(retstr.responseText);
2362 $('#resBranch').empty(); 2005 $('#resBranch').empty();
2363
2364 if(resclassUnitVal == '19') 2006 if(resclassUnitVal == '19')
2365 { 2007 {
2366 $('#resBranch').append(\"<option value=''>Select...</option>\"); 2008 $('#resBranch').append(\"<option value=''>Select...</option>\");
2367
2368 for(var i in compArr) 2009 for(var i in compArr)
2369 { 2010 {
2370 $('#resBranch').append(\"<option value='\"+compArr[i]['rbb']+\"'>\"+compArr[i]['rbb']+\"</option>\"); 2011 $('#resBranch').append(\"<option value='\"+compArr[i]['rbb']+\"'>\"+compArr[i]['rbb']+\"</option>\");
2371 } 2012 }
2372 } 2013 }
2373
2374 if(resclassUnitVal != '19') 2014 if(resclassUnitVal != '19')
2375 { 2015 {
2376 for(var i in compArr) 2016 for(var i in compArr)
...@@ -2378,16 +2018,12 @@ foreach ($resclassUnitArr as $key => $resclassunit) { ...@@ -2378,16 +2018,12 @@ foreach ($resclassUnitArr as $key => $resclassunit) {
2378 $('#resBranch').append(\"<option value='\"+compArr[i]['non_rbb']+\"'>\"+compArr[i]['non_rbb']+\"</option>\"); 2018 $('#resBranch').append(\"<option value='\"+compArr[i]['non_rbb']+\"'>\"+compArr[i]['non_rbb']+\"</option>\");
2379 } 2019 }
2380 } 2020 }
2381
2382 }); 2021 });
2383
2384 var action = 'category/'+resclassUnitVal; 2022 var action = 'category/'+resclassUnitVal;
2385
2386 $('#cat').select2('val', ''); 2023 $('#cat').select2('val', '');
2387 $('#cat').html(''); 2024 $('#cat').html('');
2388 $('#subCat').select2('val', ''); 2025 $('#subCat').select2('val', '');
2389 $('#subCat').html(''); 2026 $('#subCat').html('');
2390
2391 $.ajax({ 2027 $.ajax({
2392 type: 'get', 2028 type: 'get',
2393 url: action, 2029 url: action,
...@@ -2395,39 +2031,29 @@ foreach ($resclassUnitArr as $key => $resclassunit) { ...@@ -2395,39 +2031,29 @@ foreach ($resclassUnitArr as $key => $resclassunit) {
2395 success: function(nextRecord) 2031 success: function(nextRecord)
2396 { 2032 {
2397 var catArr = nextRecord['category']; 2033 var catArr = nextRecord['category'];
2398
2399 $('#cat').append(\"<option value=''>Select Category</option>\"); 2034 $('#cat').append(\"<option value=''>Select Category</option>\");
2400
2401 for(var i in catArr) 2035 for(var i in catArr)
2402 { 2036 {
2403 $('#cat').append(\"<option value='\"+catArr[i]['id']+\"~\"+catArr[i]['category']+\"'>\"+catArr[i]['category']+\"</option>\"); 2037 $('#cat').append(\"<option value='\"+catArr[i]['id']+\"~\"+catArr[i]['category']+\"'>\"+catArr[i]['category']+\"</option>\");
2404 } 2038 }
2405
2406 2039
2407 } 2040 }
2408 }); 2041 });
2409
2410 } 2042 }
2411 }); 2043 });
2412
2413 $('#cat').click(function() 2044 $('#cat').click(function()
2414 { 2045 {
2415 var catidsplit = $(this).val(); 2046 var catidsplit = $(this).val();
2416 var categoryval = catidsplit.split('~'); 2047 var categoryval = catidsplit.split('~');
2417 catId = categoryval[0]; 2048 catId = categoryval[0];
2418 categoryvalue = categoryval[1]; 2049 categoryvalue = categoryval[1];
2419
2420 var resclassUnitVal = $('#resclassUnit').val(); 2050 var resclassUnitVal = $('#resclassUnit').val();
2421
2422 //To make empty when Non rbb selected 2051 //To make empty when Non rbb selected
2423 $('#subCat').select2('val', ''); 2052 $('#subCat').select2('val', '');
2424
2425 if(catId) 2053 if(catId)
2426 { 2054 {
2427 var action = 'subcategory/'+catId+'/'+resclassUnitVal; 2055 var action = 'subcategory/'+catId+'/'+resclassUnitVal;
2428
2429 $('#subCat').html(''); 2056 $('#subCat').html('');
2430
2431 $.ajax({ 2057 $.ajax({
2432 type: 'get', 2058 type: 'get',
2433 url: action, 2059 url: action,
...@@ -2435,9 +2061,7 @@ foreach ($resclassUnitArr as $key => $resclassunit) { ...@@ -2435,9 +2061,7 @@ foreach ($resclassUnitArr as $key => $resclassunit) {
2435 success: function(nextRecord) 2061 success: function(nextRecord)
2436 { 2062 {
2437 var subCatArr = nextRecord['sub_category']; 2063 var subCatArr = nextRecord['sub_category'];
2438
2439 $('#subCat').append(\"<option value=''>Select SubCategory</option>\"); 2064 $('#subCat').append(\"<option value=''>Select SubCategory</option>\");
2440
2441 for(var i in subCatArr) 2065 for(var i in subCatArr)
2442 { 2066 {
2443 $('#subCat').append(\"<option value='\"+subCatArr[i]+\"'>\"+subCatArr[i]+\"</option>\"); 2067 $('#subCat').append(\"<option value='\"+subCatArr[i]+\"'>\"+subCatArr[i]+\"</option>\");
...@@ -2446,9 +2070,7 @@ foreach ($resclassUnitArr as $key => $resclassunit) { ...@@ -2446,9 +2070,7 @@ foreach ($resclassUnitArr as $key => $resclassunit) {
2446 } 2070 }
2447 }); 2071 });
2448 } 2072 }
2449
2450 }); 2073 });
2451
2452 //To save all details 2074 //To save all details
2453 $('#save').click(function() 2075 $('#save').click(function()
2454 { 2076 {
...@@ -2489,7 +2111,6 @@ foreach ($resclassUnitArr as $key => $resclassunit) { ...@@ -2489,7 +2111,6 @@ foreach ($resclassUnitArr as $key => $resclassunit) {
2489 var compStatus = $('#compStatus').val(); 2111 var compStatus = $('#compStatus').val();
2490 var call_id = ".$callId."; 2112 var call_id = ".$callId.";
2491 2113
2492
2493 2114
2494 if(compName==''){ 2115 if(compName==''){
2495 simpleNotification('error','topRight','please enter Complainant Name'); 2116 simpleNotification('error','topRight','please enter Complainant Name');
...@@ -2528,7 +2149,6 @@ foreach ($resclassUnitArr as $key => $resclassunit) { ...@@ -2528,7 +2149,6 @@ foreach ($resclassUnitArr as $key => $resclassunit) {
2528 simpleNotification('error','topRight','please enter Nature Of Complaint'); 2149 simpleNotification('error','topRight','please enter Nature Of Complaint');
2529 return; 2150 return;
2530 } 2151 }
2531
2532 if(isNaN(cardNum)) 2152 if(isNaN(cardNum))
2533 { 2153 {
2534 swal('Please enter proper Card Number'); 2154 swal('Please enter proper Card Number');
...@@ -2579,25 +2199,19 @@ foreach ($resclassUnitArr as $key => $resclassunit) { ...@@ -2579,25 +2199,19 @@ foreach ($resclassUnitArr as $key => $resclassunit) {
2579 2199
2580 return $data; 2200 return $data;
2581 } 2201 }
2582
2583 function createChildCase() 2202 function createChildCase()
2584 { 2203 {
2585 $callId=0; 2204 $callId=0;
2586 $varid=$this->varid; 2205 $varid=$this->varid;
2587 $dataarr=$this->recruitdata["peopledata"]; 2206 $dataarr=$this->recruitdata["peopledata"];
2588
2589 $resclassUnit = "<option value=''></option>"; 2207 $resclassUnit = "<option value=''></option>";
2590 $cat = "<option value=''></option>"; 2208 $cat = "<option value=''></option>";
2591 $subCat = "<option value=''></option>"; 2209 $subCat = "<option value=''></option>";
2592
2593 $resclassUnitArr = DB::table("complaint_resol_class_unit")->get(); 2210 $resclassUnitArr = DB::table("complaint_resol_class_unit")->get();
2594
2595 foreach ($resclassUnitArr as $key => $resclassunit) { 2211 foreach ($resclassUnitArr as $key => $resclassunit) {
2596 if($resclassunit->resolve_class_unit) 2212 if($resclassunit->resolve_class_unit)
2597 $resclassUnit.= "<option value='$resclassunit->id'>$resclassunit->resolve_class_unit</option>"; 2213 $resclassUnit.= "<option value='$resclassunit->id'>$resclassunit->resolve_class_unit</option>";
2598 } 2214 }
2599
2600
2601 $data = " 2215 $data = "
2602 <style> 2216 <style>
2603 .search { 2217 .search {
...@@ -2620,7 +2234,6 @@ function createChildCase() ...@@ -2620,7 +2234,6 @@ function createChildCase()
2620 <label class='label-small_new' style='width:29%;'>Complainant Name</label> 2234 <label class='label-small_new' style='width:29%;'>Complainant Name</label>
2621 <input type='text' class='form_new form_new_amend' style='width:50%;' id='ccompName' value='".$dataarr['firstname']."'> 2235 <input type='text' class='form_new form_new_amend' style='width:50%;' id='ccompName' value='".$dataarr['firstname']."'>
2622 </div> 2236 </div>
2623
2624 <div style='width:49%;float:left'> 2237 <div style='width:49%;float:left'>
2625 <label class='label-small_new' style='width:29%;'>Custmer Type</label> 2238 <label class='label-small_new' style='width:29%;'>Custmer Type</label>
2626 <input type='text' class='form_new form_new_amend' style='width:50%;' id='ccustType' value='".$compDetails->cust_type."' readonly> 2239 <input type='text' class='form_new form_new_amend' style='width:50%;' id='ccustType' value='".$compDetails->cust_type."' readonly>
...@@ -2662,7 +2275,6 @@ function createChildCase() ...@@ -2662,7 +2275,6 @@ function createChildCase()
2662 <label class='label-small_new' style='width:29%;'>Resolving Classification Unit</label> 2275 <label class='label-small_new' style='width:29%;'>Resolving Classification Unit</label>
2663 <select id='cresclassUnit' class='form_hrm_select select2multi' style='width:50%'>$resclassUnit</select> 2276 <select id='cresclassUnit' class='form_hrm_select select2multi' style='width:50%'>$resclassUnit</select>
2664 </div> 2277 </div>
2665
2666 <div style='width:49%;float:left'> 2278 <div style='width:49%;float:left'>
2667 <label class='label-small_new' style='width:29%;'>Resolving Branch</label> 2279 <label class='label-small_new' style='width:29%;'>Resolving Branch</label>
2668 <select id='cresBranch' class='form_hrm_select select2multi' style='width:50%'></select> 2280 <select id='cresBranch' class='form_hrm_select select2multi' style='width:50%'></select>
...@@ -2711,62 +2323,46 @@ function createChildCase() ...@@ -2711,62 +2323,46 @@ function createChildCase()
2711 <input type='button' class='btn btn-default btn-md' style='margin-left:40%' value='Save' id='Save'> 2323 <input type='button' class='btn btn-default btn-md' style='margin-left:40%' value='Save' id='Save'>
2712 </div> 2324 </div>
2713 </div> 2325 </div>
2714
2715 <script> 2326 <script>
2716
2717 var addInfotext_max = 1000-$('#caddInfo').val().length; 2327 var addInfotext_max = 1000-$('#caddInfo').val().length;
2718 $('#caddInfoText').html(addInfotext_max + ' chars remaining'); 2328 $('#caddInfoText').html(addInfotext_max + ' chars remaining');
2719
2720 $('#caddInfo').keyup(function() { 2329 $('#caddInfo').keyup(function() {
2721 var addInfotext_length = $('#caddInfo').val().length; 2330 var addInfotext_length = $('#caddInfo').val().length;
2722 var addInfotext_remaining = addInfotext_max - addInfotext_length; 2331 var addInfotext_remaining = addInfotext_max - addInfotext_length;
2723
2724 $('#caddInfoText').html(addInfotext_remaining + ' chars remaining'); 2332 $('#caddInfoText').html(addInfotext_remaining + ' chars remaining');
2725 }); 2333 });
2726
2727 var taskDesctext_max = 512-$('#ctaskDesc').val().length; 2334 var taskDesctext_max = 512-$('#ctaskDesc').val().length;
2728 $('#ctaskDescText').html(taskDesctext_max + ' chars remaining'); 2335 $('#ctaskDescText').html(taskDesctext_max + ' chars remaining');
2729
2730 $('#ctaskDesc').keyup(function() { 2336 $('#ctaskDesc').keyup(function() {
2731 var taskDesctext_length = $('#ctaskDesc').val().length; 2337 var taskDesctext_length = $('#ctaskDesc').val().length;
2732 var taskDesctext_remaining = taskDesctext_max - taskDesctext_length; 2338 var taskDesctext_remaining = taskDesctext_max - taskDesctext_length;
2733
2734 $('#ctaskDescText').html(taskDesctext_remaining + ' chars remaining'); 2339 $('#ctaskDescText').html(taskDesctext_remaining + ' chars remaining');
2735 }); 2340 });
2736
2737 var commentstext_max = 512-$('#comments').val().length; 2341 var commentstext_max = 512-$('#comments').val().length;
2738 $('#commentsText').html(commentstext_max + ' chars remaining'); 2342 $('#commentsText').html(commentstext_max + ' chars remaining');
2739
2740 $('#comments').keyup(function() { 2343 $('#comments').keyup(function() {
2741 var commentstext_length = $('#comments').val().length; 2344 var commentstext_length = $('#comments').val().length;
2742 var commentstext_remaining = commentstext_max - commentstext_length; 2345 var commentstext_remaining = commentstext_max - commentstext_length;
2743
2744 $('#commentsText').html(commentstext_remaining + ' chars remaining'); 2346 $('#commentsText').html(commentstext_remaining + ' chars remaining');
2745 }); 2347 });
2746
2747 $('#cresclassUnit').click(function() 2348 $('#cresclassUnit').click(function()
2748 { 2349 {
2749 var resclassUnitVal = $(this).val(); 2350 var resclassUnitVal = $(this).val();
2750
2751 //To make empty when Non rbb selected 2351 //To make empty when Non rbb selected
2752 $('#cresBranch').select2('val', ''); 2352 $('#cresBranch').select2('val', '');
2753
2754 if(resclassUnitVal) 2353 if(resclassUnitVal)
2755 { 2354 {
2756 doAjax('resclassUnit','resclassUnitVal='+encodeURIComponent(resclassUnitVal),'','','singlethis','POST',function(retstr){ 2355 doAjax('resclassUnit','resclassUnitVal='+encodeURIComponent(resclassUnitVal),'','','singlethis','POST',function(retstr){
2757 var compArr = JSON.parse(retstr.responseText); 2356 var compArr = JSON.parse(retstr.responseText);
2758 $('#cresBranch').empty(); 2357 $('#cresBranch').empty();
2759
2760 if(resclassUnitVal == '19') 2358 if(resclassUnitVal == '19')
2761 { 2359 {
2762 $('#cresBranch').append(\"<option value=''>Select...</option>\"); 2360 $('#cresBranch').append(\"<option value=''>Select...</option>\");
2763
2764 for(var i in compArr) 2361 for(var i in compArr)
2765 { 2362 {
2766 $('#cresBranch').append(\"<option value='\"+compArr[i]['rbb']+\"'>\"+compArr[i]['rbb']+\"</option>\"); 2363 $('#cresBranch').append(\"<option value='\"+compArr[i]['rbb']+\"'>\"+compArr[i]['rbb']+\"</option>\");
2767 } 2364 }
2768 } 2365 }
2769
2770 if(resclassUnitVal != '19') 2366 if(resclassUnitVal != '19')
2771 { 2367 {
2772 for(var i in compArr) 2368 for(var i in compArr)
...@@ -2774,16 +2370,12 @@ function createChildCase() ...@@ -2774,16 +2370,12 @@ function createChildCase()
2774 $('#cresBranch').append(\"<option value='\"+compArr[i]['non_rbb']+\"'>\"+compArr[i]['non_rbb']+\"</option>\"); 2370 $('#cresBranch').append(\"<option value='\"+compArr[i]['non_rbb']+\"'>\"+compArr[i]['non_rbb']+\"</option>\");
2775 } 2371 }
2776 } 2372 }
2777
2778 }); 2373 });
2779
2780 var action = 'category/'+resclassUnitVal; 2374 var action = 'category/'+resclassUnitVal;
2781
2782 $('#ccat').select2('val', ''); 2375 $('#ccat').select2('val', '');
2783 $('#ccat').html(''); 2376 $('#ccat').html('');
2784 $('#csubCat').select2('val', ''); 2377 $('#csubCat').select2('val', '');
2785 $('#csubCat').html(''); 2378 $('#csubCat').html('');
2786
2787 $.ajax({ 2379 $.ajax({
2788 type: 'get', 2380 type: 'get',
2789 url: action, 2381 url: action,
...@@ -2791,34 +2383,25 @@ function createChildCase() ...@@ -2791,34 +2383,25 @@ function createChildCase()
2791 success: function(nextRecord) 2383 success: function(nextRecord)
2792 { 2384 {
2793 var catArr = nextRecord['category']; 2385 var catArr = nextRecord['category'];
2794
2795 $('#ccat').append(\"<option value=''>Select Category</option>\"); 2386 $('#ccat').append(\"<option value=''>Select Category</option>\");
2796
2797 for(var i in catArr) 2387 for(var i in catArr)
2798 { 2388 {
2799 $('#ccat').append(\"<option value='\"+catArr[i]['id']+\"'>\"+catArr[i]['category']+\"</option>\"); 2389 $('#ccat').append(\"<option value='\"+catArr[i]['id']+\"'>\"+catArr[i]['category']+\"</option>\");
2800 } 2390 }
2801
2802 2391
2803 } 2392 }
2804 }); 2393 });
2805
2806 } 2394 }
2807 }); 2395 });
2808
2809 $('#ccat').click(function() 2396 $('#ccat').click(function()
2810 { 2397 {
2811 var catId = $(this).val(); 2398 var catId = $(this).val();
2812
2813 //To make empty when Non rbb selected 2399 //To make empty when Non rbb selected
2814 $('#csubCat').select2('val', ''); 2400 $('#csubCat').select2('val', '');
2815
2816 if(catId) 2401 if(catId)
2817 { 2402 {
2818 var action = 'subcategory/'+catId; 2403 var action = 'subcategory/'+catId;
2819
2820 $('#subCat').html(''); 2404 $('#subCat').html('');
2821
2822 $.ajax({ 2405 $.ajax({
2823 type: 'get', 2406 type: 'get',
2824 url: action, 2407 url: action,
...@@ -2826,9 +2409,7 @@ function createChildCase() ...@@ -2826,9 +2409,7 @@ function createChildCase()
2826 success: function(nextRecord) 2409 success: function(nextRecord)
2827 { 2410 {
2828 var subCatArr = nextRecord['sub_category']; 2411 var subCatArr = nextRecord['sub_category'];
2829
2830 $('#csubCat').append(\"<option value=''>Select SubCategory</option>\"); 2412 $('#csubCat').append(\"<option value=''>Select SubCategory</option>\");
2831
2832 for(var i in subCatArr) 2413 for(var i in subCatArr)
2833 { 2414 {
2834 $('#csubCat').append(\"<option value='\"+subCatArr[i]+\"'>\"+subCatArr[i]+\"</option>\"); 2415 $('#csubCat').append(\"<option value='\"+subCatArr[i]+\"'>\"+subCatArr[i]+\"</option>\");
...@@ -2837,9 +2418,7 @@ function createChildCase() ...@@ -2837,9 +2418,7 @@ function createChildCase()
2837 } 2418 }
2838 }); 2419 });
2839 } 2420 }
2840
2841 }); 2421 });
2842
2843 //To save all details 2422 //To save all details
2844 $('#Save').click(function() 2423 $('#Save').click(function()
2845 { 2424 {
...@@ -2856,13 +2435,11 @@ function createChildCase() ...@@ -2856,13 +2435,11 @@ function createChildCase()
2856 var compStatus = $('#ccompStatus').val(); 2435 var compStatus = $('#ccompStatus').val();
2857 var comments = $('#comments').val(); 2436 var comments = $('#comments').val();
2858 var varid = '".$varid."'; 2437 var varid = '".$varid."';
2859
2860 if(compName==''||resBranch==''||cat==''||subCat==''||taskDesc=='') 2438 if(compName==''||resBranch==''||cat==''||subCat==''||taskDesc=='')
2861 { 2439 {
2862 alert('Complainant Name,Resolving Branch Name,Category,Subcategory,Task Description'); 2440 alert('Complainant Name,Resolving Branch Name,Category,Subcategory,Task Description');
2863 return; 2441 return;
2864 } 2442 }
2865
2866 var postdata='complainant_name='+encodeURIComponent(compName); 2443 var postdata='complainant_name='+encodeURIComponent(compName);
2867 postdata+='&cust_type='+encodeURIComponent(custType); 2444 postdata+='&cust_type='+encodeURIComponent(custType);
2868 postdata+='&service_type='+encodeURIComponent(serveType); 2445 postdata+='&service_type='+encodeURIComponent(serveType);
...@@ -2880,7 +2457,6 @@ function createChildCase() ...@@ -2880,7 +2457,6 @@ function createChildCase()
2880 }); 2457 });
2881 </script> 2458 </script>
2882 "; 2459 ";
2883
2884 return $data; 2460 return $data;
2885 } 2461 }
2886 //Function for lead form creation by Gopal 2462 //Function for lead form creation by Gopal
...@@ -2919,7 +2495,6 @@ function createLeadEntryForm() ...@@ -2919,7 +2495,6 @@ function createLeadEntryForm()
2919 $data="<div style='clear:both;margin:2% 0 0 1%;border-style: dotted solid dashed;padding:2%'> 2495 $data="<div style='clear:both;margin:2% 0 0 1%;border-style: dotted solid dashed;padding:2%'>
2920 <h5>Lead Entry Form</h5> 2496 <h5>Lead Entry Form</h5>
2921 <hr/><br> 2497 <hr/><br>
2922
2923 <div style='clear:both;width:100%;'> 2498 <div style='clear:both;width:100%;'>
2924 <div style='width:49%;float:left'> 2499 <div style='width:49%;float:left'>
2925 <label class='label-small_new' style='width:29%;font-weight:bold;'>Customer Name</label> 2500 <label class='label-small_new' style='width:29%;font-weight:bold;'>Customer Name</label>
...@@ -2984,9 +2559,6 @@ function createLeadEntryForm() ...@@ -2984,9 +2559,6 @@ function createLeadEntryForm()
2984 </div> 2559 </div>
2985 2560
2986 <script> 2561 <script>
2987
2988
2989
2990 $('#leadformSave').click(function() 2562 $('#leadformSave').click(function()
2991 { 2563 {
2992 if(kstychCall['ts_Talk']<1||Math.ceil(((getNowTS()-kstychCall['ts_Talk'])/1000))<10) 2564 if(kstychCall['ts_Talk']<1||Math.ceil(((getNowTS()-kstychCall['ts_Talk'])/1000))<10)
...@@ -3074,17 +2646,13 @@ function createLeadEntryForm() ...@@ -3074,17 +2646,13 @@ function createLeadEntryForm()
3074 } 2646 }
3075 2647
3076 }); 2648 });
3077
3078 </script> 2649 </script>
3079 "; 2650 ";
3080
3081 return $data; 2651 return $data;
3082
3083 } 2652 }
3084 function createRacingCust() 2653 function createRacingCust()
3085 { 2654 {
3086 $dataarr=$this->recruitdata["peopledata"]; 2655 $dataarr=$this->recruitdata["peopledata"];
3087
3088 $data="<div style='clear:both;margin:2% 0 0 1%;border-style: dotted solid dashed;padding:2%'> 2656 $data="<div style='clear:both;margin:2% 0 0 1%;border-style: dotted solid dashed;padding:2%'>
3089 <h5>Customer Information</h5> 2657 <h5>Customer Information</h5>
3090 <hr/><br> 2658 <hr/><br>
...@@ -3095,7 +2663,6 @@ function createRacingCust() ...@@ -3095,7 +2663,6 @@ function createRacingCust()
3095 <label class='label-small_new' style='width:50%;' >".date('Y-m-d')."</label> 2663 <label class='label-small_new' style='width:50%;' >".date('Y-m-d')."</label>
3096 </div> 2664 </div>
3097 <br><br> 2665 <br><br>
3098
3099 <div style='width:49%;float:left'> 2666 <div style='width:49%;float:left'>
3100 <label class='label-small_new' style='width:29%;'>PB Code</label> 2667 <label class='label-small_new' style='width:29%;'>PB Code</label>
3101 <input type='text' class='form_new form_new_amend'style='width:50%;' value='' id='PBcode'> 2668 <input type='text' class='form_new form_new_amend'style='width:50%;' value='' id='PBcode'>
...@@ -3104,7 +2671,6 @@ function createRacingCust() ...@@ -3104,7 +2671,6 @@ function createRacingCust()
3104 <label class='label-small_new' style='width:29%;'>PB Name</label> 2671 <label class='label-small_new' style='width:29%;'>PB Name</label>
3105 <input type='text' class='form_new form_new_amend'style='width:50%;' value='' id='PBname'> 2672 <input type='text' class='form_new form_new_amend'style='width:50%;' value='' id='PBname'>
3106 </div> 2673 </div>
3107
3108 </div> 2674 </div>
3109 <br><br> 2675 <br><br>
3110 <div style='clear:both;width:100%;'> 2676 <div style='clear:both;width:100%;'>
...@@ -3117,7 +2683,6 @@ function createRacingCust() ...@@ -3117,7 +2683,6 @@ function createRacingCust()
3117 <label class='label-small_new' style='width:29%;'>Supervisor Mail ID</label> 2683 <label class='label-small_new' style='width:29%;'>Supervisor Mail ID</label>
3118 <input type='text' class='form_new form_new_amend' style='width:50%;' id='SupervisormailID'> 2684 <input type='text' class='form_new form_new_amend' style='width:50%;' id='SupervisormailID'>
3119 </div> 2685 </div>
3120
3121 </div> 2686 </div>
3122 <br><br> 2687 <br><br>
3123 <div style='clear:both;width:100%;'> 2688 <div style='clear:both;width:100%;'>
...@@ -3130,11 +2695,9 @@ function createRacingCust() ...@@ -3130,11 +2695,9 @@ function createRacingCust()
3130 <label class='label-small_new' style='width:29%;'>Group ID Name</label> 2695 <label class='label-small_new' style='width:29%;'>Group ID Name</label>
3131 <input type='text' class='form_new form_new_amend' style='width:50%;' id='groupidname' value=''> 2696 <input type='text' class='form_new form_new_amend' style='width:50%;' id='groupidname' value=''>
3132 </div> 2697 </div>
3133
3134 </div> 2698 </div>
3135 <br><br> 2699 <br><br>
3136 <div style='clear:both;width:100%;'> 2700 <div style='clear:both;width:100%;'>
3137
3138 <div style='width:49%;float:left'> 2701 <div style='width:49%;float:left'>
3139 <label class='label-small_new' style='width:29%;'>Cust ID</label> 2702 <label class='label-small_new' style='width:29%;'>Cust ID</label>
3140 <input type='text' class='form_new form_new_amend' style='width:50%;' id='custID' maxlength='16'> 2703 <input type='text' class='form_new form_new_amend' style='width:50%;' id='custID' maxlength='16'>
...@@ -3143,7 +2706,6 @@ function createRacingCust() ...@@ -3143,7 +2706,6 @@ function createRacingCust()
3143 <label class='label-small_new' style='width:29%;'>Cust Name</label> 2706 <label class='label-small_new' style='width:29%;'>Cust Name</label>
3144 <input type='text' class='form_new form_new_amend' style='width:50%;' id='custname' value=''> 2707 <input type='text' class='form_new form_new_amend' style='width:50%;' id='custname' value=''>
3145 </div> 2708 </div>
3146
3147 </div> 2709 </div>
3148 <br><br> 2710 <br><br>
3149 <div style='clear:both;width:100%;'> 2711 <div style='clear:both;width:100%;'>
...@@ -3155,7 +2717,6 @@ function createRacingCust() ...@@ -3155,7 +2717,6 @@ function createRacingCust()
3155 <label class='label-small_new' style='width:29%;'>Cust ID</label> 2717 <label class='label-small_new' style='width:29%;'>Cust ID</label>
3156 <input type='text' class='form_new form_new_amend' style='width:50%;' id='Custid' maxlength='16'> 2718 <input type='text' class='form_new form_new_amend' style='width:50%;' id='Custid' maxlength='16'>
3157 </div> 2719 </div>
3158
3159 </div> 2720 </div>
3160 <br><br> 2721 <br><br>
3161 <div style='clear:both;width:100%;'> 2722 <div style='clear:both;width:100%;'>
...@@ -3167,19 +2728,16 @@ function createRacingCust() ...@@ -3167,19 +2728,16 @@ function createRacingCust()
3167 <label class='label-small_new' style='width:29%;'>Relationship With Group ID</label> 2728 <label class='label-small_new' style='width:29%;'>Relationship With Group ID</label>
3168 <input type='text' class='form_new form_new_amend' style='width:50%;' id='relationshipgroupid' maxlength='16'> 2729 <input type='text' class='form_new form_new_amend' style='width:50%;' id='relationshipgroupid' maxlength='16'>
3169 </div> 2730 </div>
3170
3171 </div> 2731 </div>
3172 <br><br> 2732 <br><br>
3173 <div style='clear:both;width:100%;'> 2733 <div style='clear:both;width:100%;'>
3174 <div style='width:49%;float:left'> 2734 <div style='width:49%;float:left'>
3175
3176 <label class='label-small_new' style='width:29%;'>Grouping</label> 2735 <label class='label-small_new' style='width:29%;'>Grouping</label>
3177 <select id='newGroupdditiongroup' class='form_hrm_select select2multi' style='width:50%'> 2736 <select id='newGroupdditiongroup' class='form_hrm_select select2multi' style='width:50%'>
3178 <option value='New_Group'>New Group</option> 2737 <option value='New_Group'>New Group</option>
3179 <option value='Addition_to_group'>Addition to group</option> 2738 <option value='Addition_to_group'>Addition to group</option>
3180 <option value='Addition_to_group'>Regroup</option> 2739 <option value='Addition_to_group'>Regroup</option>
3181 </select> 2740 </select>
3182
3183 </div> 2741 </div>
3184 <div style='width:49%;float:left'> 2742 <div style='width:49%;float:left'>
3185 <label class='label-small_new' style='width:29%;'>Racing from</label> 2743 <label class='label-small_new' style='width:29%;'>Racing from</label>
...@@ -3187,18 +2745,12 @@ function createRacingCust() ...@@ -3187,18 +2745,12 @@ function createRacingCust()
3187 </div> 2745 </div>
3188 </div> 2746 </div>
3189 <br><br><br> 2747 <br><br><br>
3190
3191
3192 <br><br> 2748 <br><br>
3193 <div style='clear:both;width:100%;'> 2749 <div style='clear:both;width:100%;'>
3194 <input type='button' class='btn btn-default btn-md' style='margin-left:40%' value='Save' id='CRSave'> 2750 <input type='button' class='btn btn-default btn-md' style='margin-left:40%' value='Save' id='CRSave'>
3195 </div> 2751 </div>
3196 </div> 2752 </div>
3197
3198 <script> 2753 <script>
3199
3200
3201
3202 $('#CRSave').click(function() 2754 $('#CRSave').click(function()
3203 { 2755 {
3204 var snumber = $('#snumber').val(); 2756 var snumber = $('#snumber').val();
...@@ -3216,7 +2768,6 @@ function createRacingCust() ...@@ -3216,7 +2768,6 @@ function createRacingCust()
3216 var relationshipgroupid = $('#relationshipgroupid').val(); 2768 var relationshipgroupid = $('#relationshipgroupid').val();
3217 var newGroupdditiongroup = $('#newGroupdditiongroup').val(); 2769 var newGroupdditiongroup = $('#newGroupdditiongroup').val();
3218 var racingfrom = $('#racingfrom').val(); 2770 var racingfrom = $('#racingfrom').val();
3219
3220 var postdata='s_no='+encodeURIComponent(snumber); 2771 var postdata='s_no='+encodeURIComponent(snumber);
3221 postdata+='&pb_name='+encodeURIComponent(PBname); 2772 postdata+='&pb_name='+encodeURIComponent(PBname);
3222 postdata+='&pb_code='+encodeURIComponent(PBcode); 2773 postdata+='&pb_code='+encodeURIComponent(PBcode);
...@@ -3235,12 +2786,9 @@ function createRacingCust() ...@@ -3235,12 +2786,9 @@ function createRacingCust()
3235 postdata+='&mobile='+'".$dataarr["mobile"]."'; 2786 postdata+='&mobile='+'".$dataarr["mobile"]."';
3236 postdata+='&client='+'".$dataarr["client"]."'; 2787 postdata+='&client='+'".$dataarr["client"]."';
3237 postdata+='&clientcode='+'".$dataarr["clientcode"]."'; 2788 postdata+='&clientcode='+'".$dataarr["clientcode"]."';
3238
3239 doAjax('custrace',postdata,'createtaskdiv','ajaxMutex_recSaveData','singlethis','POST'); 2789 doAjax('custrace',postdata,'createtaskdiv','ajaxMutex_recSaveData','singlethis','POST');
3240 }); 2790 });
3241
3242 </script>"; 2791 </script>";
3243
3244 return $data; 2792 return $data;
3245 } 2793 }
3246 //for RLP 2794 //for RLP
...@@ -3251,10 +2799,8 @@ function createRLP() ...@@ -3251,10 +2799,8 @@ function createRLP()
3251 $data=""; 2799 $data="";
3252 //echo "<pre>".print_r($rlpcust)."</pre>"; 2800 //echo "<pre>".print_r($rlpcust)."</pre>";
3253 $data.="<fieldset><legend class='new-recruit_legend'>RLP Customer WISE</legend>"; 2801 $data.="<fieldset><legend class='new-recruit_legend'>RLP Customer WISE</legend>";
3254
3255 $data.="<div class=custom1 style='width:100%;'> 2802 $data.="<div class=custom1 style='width:100%;'>
3256 <h2></h2>"; 2803 <h2></h2>";
3257
3258 $data.="<hr><br><table class='table kDataTable' cellpadding=0 cellspacing=0 border=0> 2804 $data.="<hr><br><table class='table kDataTable' cellpadding=0 cellspacing=0 border=0>
3259 <thead><tr> 2805 <thead><tr>
3260 <td class='table_hrm_heading_green'>Product</td> 2806 <td class='table_hrm_heading_green'>Product</td>
...@@ -3420,18 +2966,14 @@ function createRLP() ...@@ -3420,18 +2966,14 @@ function createRLP()
3420 <td></td> 2966 <td></td>
3421 </tr> 2967 </tr>
3422 </table></div></fieldset>"; 2968 </table></div></fieldset>";
3423
3424 return $data; 2969 return $data;
3425
3426 } 2970 }
3427
3428 function createOneAssistForm() 2971 function createOneAssistForm()
3429 { 2972 {
3430 $dataarr=$this->recruitdata["peopledata"]; 2973 $dataarr=$this->recruitdata["peopledata"];
3431 $data="<div style='clear:both;margin:2% 0 0 1%;border-style: dotted solid dashed;padding:2%'> 2974 $data="<div style='clear:both;margin:2% 0 0 1%;border-style: dotted solid dashed;padding:2%'>
3432 <h5>One Assist Form</h5> 2975 <h5>One Assist Form</h5>
3433 <hr/><br> 2976 <hr/><br>
3434
3435 <div style='clear:both;width:100%;'> 2977 <div style='clear:both;width:100%;'>
3436 <div style='width:49%;float:left'> 2978 <div style='width:49%;float:left'>
3437 <label class='label-small_new' style='width:29%;font-weight:bold;'>Customer Name</label> 2979 <label class='label-small_new' style='width:29%;font-weight:bold;'>Customer Name</label>
...@@ -3476,7 +3018,6 @@ function createOneAssistForm() ...@@ -3476,7 +3018,6 @@ function createOneAssistForm()
3476 </div> 3018 </div>
3477 </div> 3019 </div>
3478 <br><br> 3020 <br><br>
3479
3480 <br><br> 3021 <br><br>
3481 <div style='clear:both;width:100%;'> 3022 <div style='clear:both;width:100%;'>
3482 <div> 3023 <div>
...@@ -3491,9 +3032,6 @@ function createOneAssistForm() ...@@ -3491,9 +3032,6 @@ function createOneAssistForm()
3491 </div> 3032 </div>
3492 3033
3493 <script> 3034 <script>
3494
3495
3496
3497 $('#oneassistformSave').click(function() 3035 $('#oneassistformSave').click(function()
3498 { 3036 {
3499 3037
...@@ -3525,12 +3063,9 @@ function createOneAssistForm() ...@@ -3525,12 +3063,9 @@ function createOneAssistForm()
3525 3063
3526 3064
3527 }); 3065 });
3528
3529 </script> 3066 </script>
3530 "; 3067 ";
3531
3532 return $data; 3068 return $data;
3533
3534 } 3069 }
3535 function colorCodeRec($id) 3070 function colorCodeRec($id)
3536 { 3071 {
...@@ -3538,7 +3073,6 @@ function colorCodeRec($id) ...@@ -3538,7 +3073,6 @@ function colorCodeRec($id)
3538 $dataarr=$this->recruitdata["peopledata"]; 3073 $dataarr=$this->recruitdata["peopledata"];
3539 $gthis=$this->gthis; 3074 $gthis=$this->gthis;
3540 $edituser=$this->edituser; 3075 $edituser=$this->edituser;
3541
3542 if($edituser) 3076 if($edituser)
3543 { 3077 {
3544 $colorarr=array(); 3078 $colorarr=array();
...@@ -3553,24 +3087,18 @@ function colorCodeRec($id) ...@@ -3553,24 +3087,18 @@ function colorCodeRec($id)
3553 } 3087 }
3554 return $data; 3088 return $data;
3555 } 3089 }
3556
3557 function CreateForm(&$frm) 3090 function CreateForm(&$frm)
3558 { 3091 {
3559 $fdirty=$this->recruitdata["dirty"]; 3092 $fdirty=$this->recruitdata["dirty"];
3560 $dataarr=$this->recruitdata["peopledata"]; 3093 $dataarr=$this->recruitdata["peopledata"];
3561
3562 3094
3563
3564
3565 $gthis=$this->gthis; 3095 $gthis=$this->gthis;
3566 $edituser=$this->edituser; 3096 $edituser=$this->edituser;
3567 $recruitdata=$this->recruitdata; 3097 $recruitdata=$this->recruitdata;
3568 $isuser=$this->isuser; 3098 $isuser=$this->isuser;
3569 $oldbkrec=$this->oldbkrec; 3099 $oldbkrec=$this->oldbkrec;
3570 $themehome=$this->themehome; 3100 $themehome=$this->themehome;
3571
3572 $data="";$i=1;$tabsdata='';$firsttab="active"; 3101 $data="";$i=1;$tabsdata='';$firsttab="active";
3573
3574 if(Auth::check()) 3102 if(Auth::check())
3575 { 3103 {
3576 if(Auth::user()->moduleACL("HR",true,false,false)) 3104 if(Auth::user()->moduleACL("HR",true,false,false))
...@@ -3587,15 +3115,10 @@ function CreateForm(&$frm) ...@@ -3587,15 +3115,10 @@ function CreateForm(&$frm)
3587 $frm['DialerDispo']["{{id}} {{firstname}}"][]=array(); 3115 $frm['DialerDispo']["{{id}} {{firstname}}"][]=array();
3588 //$frm['Feedback']["{{id}} {{firstname}}"][]=array(); 3116 //$frm['Feedback']["{{id}} {{firstname}}"][]=array();
3589 $frm['CallHistory']["{{id}} {{firstname}}"][]=array(); 3117 $frm['CallHistory']["{{id}} {{firstname}}"][]=array();
3590
3591
3592 3118
3593
3594
3595 /*if(Auth::user()->username =="B654321" || Auth::user()->username =="B12345"){ 3119 /*if(Auth::user()->username =="B654321" || Auth::user()->username =="B12345"){
3596 $frm['QuestionAire']["{{id}} {{firstname}}"][]=array(); 3120 $frm['QuestionAire']["{{id}} {{firstname}}"][]=array();
3597 $frm['QuestionAireHist']["{{id}} {{firstname}}"][]=array();}*/ 3121 $frm['QuestionAireHist']["{{id}} {{firstname}}"][]=array();}*/
3598
3599 //$frm['QuestionnAire']["{{id}} {{firstname}}"][]=array(); 3122 //$frm['QuestionnAire']["{{id}} {{firstname}}"][]=array();
3600 //$frm['CLP']["{{id}} {{firstname}}"][]=array(); 3123 //$frm['CLP']["{{id}} {{firstname}}"][]=array();
3601 //$frm['CLP History']["{{id}} {{firstname}}"][]=array(); 3124 //$frm['CLP History']["{{id}} {{firstname}}"][]=array();
...@@ -3612,25 +3135,18 @@ function CreateForm(&$frm) ...@@ -3612,25 +3135,18 @@ function CreateForm(&$frm)
3612 } 3135 }
3613 } 3136 }
3614 } 3137 }
3615
3616
3617
3618
3619 $tabstr='<div class="tab_bar_green tabsbar-2"><ul class="row row-merge">'; 3138 $tabstr='<div class="tab_bar_green tabsbar-2"><ul class="row row-merge">';
3620
3621 foreach(array_slice($frm,1) as $tbname=>$tabs) 3139 foreach(array_slice($frm,1) as $tbname=>$tabs)
3622 { 3140 {
3623 3141
3624 3142
3625 $tabname='CustomCRM'; 3143 $tabname='CustomCRM';
3626 if(($tbname=='Files/Logs'||$tbname=='Letters'||$tbname=='Tasks'||$tbname=='DialerDispo'||$tbname=='CallHistory'||$tabname='CustomCRM')&&!$isuser)continue; 3144 if(($tbname=='Files/Logs'||$tbname=='Letters'||$tbname=='Tasks'||$tbname=='DialerDispo'||$tbname=='CallHistory'||$tabname='CustomCRM')&&!$isuser)continue;
3627
3628 if($tbname!='') 3145 if($tbname!='')
3629 { 3146 {
3630 $tabstr.="<li class='$firsttab'><a href='#tabs-$i' data-toggle=tab>$tbname</a></li>"; 3147 $tabstr.="<li class='$firsttab'><a href='#tabs-$i' data-toggle=tab>$tbname</a></li>";
3631 $tabsdata.="<div class='$firsttab tab-pane ' id=tabs-$i>"; 3148 $tabsdata.="<div class='$firsttab tab-pane ' id=tabs-$i>";
3632 $firsttab=''; 3149 $firsttab='';
3633
3634 $fsetstr=""; 3150 $fsetstr="";
3635 foreach($tabs as $fsetname=>$fset) 3151 foreach($tabs as $fsetname=>$fset)
3636 { 3152 {
...@@ -3640,7 +3156,6 @@ function CreateForm(&$frm) ...@@ -3640,7 +3156,6 @@ function CreateForm(&$frm)
3640 { 3156 {
3641 if($rowval==''){$rowval=$flines[1][1];if($flines[1][0]==0)$flines[1][0]=1;$fsetstr.="<div style='float:left;width:".(100/$flines[1][0])."%'>";} 3157 if($rowval==''){$rowval=$flines[1][1];if($flines[1][0]==0)$flines[1][0]=1;$fsetstr.="<div style='float:left;width:".(100/$flines[1][0])."%'>";}
3642 else if($rowval!=$flines[1][1]){$rowval=$flines[1][1];$fsetstr.="</div><div style='float:left;width:".(100/$flines[1][0])."%'>";} 3158 else if($rowval!=$flines[1][1]){$rowval=$flines[1][1];$fsetstr.="</div><div style='float:left;width:".(100/$flines[1][0])."%'>";}
3643
3644 if($flines[0]!=''&&substr($flines[0], -2)=='~1') 3159 if($flines[0]!=''&&substr($flines[0], -2)=='~1')
3645 { 3160 {
3646 $fsetstr.="<div class=tab_generic><fieldset style='margin-right:3px;' id='fsetid_".$flines[5]."_1'><legend class='new-recruit_legend' style='background:#9CBFFF'><b style='color:white'>".substr($flines[0], 0, -2)."</b><span class='pull-right'><a href=# onclick='$(\"#fsetid_".$flines[5]."_1_div\").toggle();return false;'><i class='fa fa-sort'></i></a></span></legend><div id='fsetid_".$flines[5]."_1_div'>"; 3161 $fsetstr.="<div class=tab_generic><fieldset style='margin-right:3px;' id='fsetid_".$flines[5]."_1'><legend class='new-recruit_legend' style='background:#9CBFFF'><b style='color:white'>".substr($flines[0], 0, -2)."</b><span class='pull-right'><a href=# onclick='$(\"#fsetid_".$flines[5]."_1_div\").toggle();return false;'><i class='fa fa-sort'></i></a></span></legend><div id='fsetid_".$flines[5]."_1_div'>";
...@@ -3649,7 +3164,6 @@ function CreateForm(&$frm) ...@@ -3649,7 +3164,6 @@ function CreateForm(&$frm)
3649 { 3164 {
3650 $fsetstr.="<div class=tab_generic><fieldset style='margin-right:3px;' id='fsetid_".$flines[5]."_1'><legend class='new-recruit_legend' style='background:#9CBFFF'><b style='color:white'>".substr($flines[0], 0, -2)."</b><span class='pull-right'><a href=# onclick='$(\"#fsetid_".$flines[5]."_1_div\").toggle();return false;'><i class='fa fa-sort'></i></a></span></legend><div id='fsetid_".$flines[5]."_1_div' style='display:none'>"; 3165 $fsetstr.="<div class=tab_generic><fieldset style='margin-right:3px;' id='fsetid_".$flines[5]."_1'><legend class='new-recruit_legend' style='background:#9CBFFF'><b style='color:white'>".substr($flines[0], 0, -2)."</b><span class='pull-right'><a href=# onclick='$(\"#fsetid_".$flines[5]."_1_div\").toggle();return false;'><i class='fa fa-sort'></i></a></span></legend><div id='fsetid_".$flines[5]."_1_div' style='display:none'>";
3651 } 3166 }
3652
3653 if(!($flines[4][2]=='0'&&!$isuser)) 3167 if(!($flines[4][2]=='0'&&!$isuser))
3654 { 3168 {
3655 if(!($flines[4][1]=='0'&&!$edituser)) 3169 if(!($flines[4][1]=='0'&&!$edituser))
...@@ -3680,7 +3194,6 @@ function CreateForm(&$frm) ...@@ -3680,7 +3194,6 @@ function CreateForm(&$frm)
3680 if($tbname=='CustomCRM')$tabsdata.=$this->createCustomCRMTab($manualmobno,$leadid); 3194 if($tbname=='CustomCRM')$tabsdata.=$this->createCustomCRMTab($manualmobno,$leadid);
3681 if($tbname=='DialerDispo')$tabsdata.=$this->createDispoTab(); 3195 if($tbname=='DialerDispo')$tabsdata.=$this->createDispoTab();
3682 if($tbname=='CallHistory')$tabsdata.=$this->createCallsTab(); 3196 if($tbname=='CallHistory')$tabsdata.=$this->createCallsTab();
3683
3684 //if($tbname=='CLP')$tabsdata.=$this->createQaireTab(); 3197 //if($tbname=='CLP')$tabsdata.=$this->createQaireTab();
3685 //if($tbname=='CLP History')$tabsdata.=$this->createQaireHistTab(); 3198 //if($tbname=='CLP History')$tabsdata.=$this->createQaireHistTab();
3686 //if($tbname=='ComplaintManagement')$tabsdata.=$this->createCompManage(); 3199 //if($tbname=='ComplaintManagement')$tabsdata.=$this->createCompManage();
...@@ -3695,10 +3208,7 @@ function CreateForm(&$frm) ...@@ -3695,10 +3208,7 @@ function CreateForm(&$frm)
3695 } 3208 }
3696 } 3209 }
3697 $tabstr.='</ul></div>'; 3210 $tabstr.='</ul></div>';
3698
3699 $data="<div class=relativeWrap>".$tabstr.'<div class="tab-content">'.$tabsdata.'</div>'."</div>"; 3211 $data="<div class=relativeWrap>".$tabstr.'<div class="tab-content">'.$tabsdata.'</div>'."</div>";
3700
3701
3702 $data="<div id=createtaskdiv></div><div style='clear:both'></div>".$this->colorCodeRec('candidatecategory').$data.$this->CreateFormScripts(); 3212 $data="<div id=createtaskdiv></div><div style='clear:both'></div>".$this->colorCodeRec('candidatecategory').$data.$this->CreateFormScripts();
3703 return $data; 3213 return $data;
3704 } 3214 }
...@@ -3706,7 +3216,6 @@ function CreateForm(&$frm) ...@@ -3706,7 +3216,6 @@ function CreateForm(&$frm)
3706 function CreateFormScripts() 3216 function CreateFormScripts()
3707 { 3217 {
3708 $varid=$this->varid; 3218 $varid=$this->varid;
3709
3710 $wakka=$this->gthis; 3219 $wakka=$this->gthis;
3711 $hrexclusiveflag=0;if(empty($this->recruitdata["peopledata"]['client']))$this->recruitdata["peopledata"]['client']='__'; 3220 $hrexclusiveflag=0;if(empty($this->recruitdata["peopledata"]['client']))$this->recruitdata["peopledata"]['client']='__';
3712 if(strstr($this->HRExclusiveClients,$this->recruitdata["peopledata"]['client'])) 3221 if(strstr($this->HRExclusiveClients,$this->recruitdata["peopledata"]['client']))
...@@ -3720,11 +3229,9 @@ function CreateForm(&$frm) ...@@ -3720,11 +3229,9 @@ function CreateForm(&$frm)
3720 } 3229 }
3721 } 3230 }
3722 if(!$this->isuser)$hrexclusiveflag=0; 3231 if(!$this->isuser)$hrexclusiveflag=0;
3723
3724 $recordDetails = DB::table('records')->where('id','=',$varid)->select('mf_isa','emailid')->get(); 3232 $recordDetails = DB::table('records')->where('id','=',$varid)->select('mf_isa','emailid')->get();
3725 $priority = $recordDetails[0]->mf_isa; 3233 $priority = $recordDetails[0]->mf_isa;
3726 $emailid = $recordDetails[0]->emailid; 3234 $emailid = $recordDetails[0]->emailid;
3727
3728 $data=" <div id=recdialog></div><br><input type=hidden name='id' id='id' value='".$this->varid."'> 3235 $data=" <div id=recdialog></div><br><input type=hidden name='id' id='id' value='".$this->varid."'>
3729 <input type=hidden name='workflowstatus' id='workflowstatus' value='".$this->recruitdata["peopledata"]["workflowstatus"]."'> 3236 <input type=hidden name='workflowstatus' id='workflowstatus' value='".$this->recruitdata["peopledata"]["workflowstatus"]."'>
3730 <input type=hidden name=varid id=varid value='".$this->varid."'> 3237 <input type=hidden name=varid id=varid value='".$this->varid."'>
...@@ -3738,10 +3245,8 @@ function CreateForm(&$frm) ...@@ -3738,10 +3245,8 @@ function CreateForm(&$frm)
3738 if('".$this->recruitdata["peopledata"]['dialer_flag']."'=='VIP') 3245 if('".$this->recruitdata["peopledata"]['dialer_flag']."'=='VIP')
3739 { 3246 {
3740 \$('#dialer_flag').val('".$this->recruitdata["peopledata"]['dialer_flag']."'); 3247 \$('#dialer_flag').val('".$this->recruitdata["peopledata"]['dialer_flag']."');
3741
3742 dialerFlagExit=1; 3248 dialerFlagExit=1;
3743 } 3249 }
3744
3745 if('".$priority."'=='VIP' && dialerFlagExit!=1) 3250 if('".$priority."'=='VIP' && dialerFlagExit!=1)
3746 { 3251 {
3747 \$('#dialer_flag').val('".$priority."'); 3252 \$('#dialer_flag').val('".$priority."');
...@@ -3768,14 +3273,12 @@ function CreateForm(&$frm) ...@@ -3768,14 +3273,12 @@ function CreateForm(&$frm)
3768 function recruitData() 3273 function recruitData()
3769 { 3274 {
3770 var postdata='varid='+$('#varid').val(); 3275 var postdata='varid='+$('#varid').val();
3771
3772 var varslist='".$this->HRFiledsStr."'; 3276 var varslist='".$this->HRFiledsStr."';
3773 var varsarr=varslist.split(','); 3277 var varsarr=varslist.split(',');
3774 for(var i=0;i<varsarr.length;i++) 3278 for(var i=0;i<varsarr.length;i++)
3775 { 3279 {
3776 if(varsarr[i]!=''&&$('#'+varsarr[i]).length)postdata+='&'+varsarr[i]+'='+encodeURIComponent($('#'+varsarr[i]).val()); 3280 if(varsarr[i]!=''&&$('#'+varsarr[i]).length)postdata+='&'+varsarr[i]+'='+encodeURIComponent($('#'+varsarr[i]).val());
3777 } 3281 }
3778
3779 doAjax('record?action=save',postdata,'createtaskdiv','ajaxMutex_recSaveData','singlethis','POST'); 3282 doAjax('record?action=save',postdata,'createtaskdiv','ajaxMutex_recSaveData','singlethis','POST');
3780 } 3283 }
3781 </script>"; 3284 </script>";
...@@ -3807,7 +3310,6 @@ function CreateForm(&$frm) ...@@ -3807,7 +3310,6 @@ function CreateForm(&$frm)
3807 function saltotal() 3310 function saltotal()
3808 { 3311 {
3809 var stotal=0; 3312 var stotal=0;
3810
3811 if($('#salbasic').val()=='')$('#salbasic').val('0'); 3313 if($('#salbasic').val()=='')$('#salbasic').val('0');
3812 if($('#salhouserent').val()=='')$('#salhouserent').val('0'); 3314 if($('#salhouserent').val()=='')$('#salhouserent').val('0');
3813 if($('#saltransport').val()=='')$('#saltransport').val('0'); 3315 if($('#saltransport').val()=='')$('#saltransport').val('0');
...@@ -3816,7 +3318,6 @@ function CreateForm(&$frm) ...@@ -3816,7 +3318,6 @@ function CreateForm(&$frm)
3816 if($('#salmedical').val()=='')$('#salmedical').val('0'); 3318 if($('#salmedical').val()=='')$('#salmedical').val('0');
3817 if($('#salelectricity').val()=='')$('#salelectricity').val('0'); 3319 if($('#salelectricity').val()=='')$('#salelectricity').val('0');
3818 if($('#salother').val()=='')$('#salother').val('0'); 3320 if($('#salother').val()=='')$('#salother').val('0');
3819
3820 stotal+=parseFloat($('#salbasic').val()); 3321 stotal+=parseFloat($('#salbasic').val());
3821 stotal+=parseFloat($('#salhouserent').val()); 3322 stotal+=parseFloat($('#salhouserent').val());
3822 stotal+=parseFloat($('#saltransport').val()); 3323 stotal+=parseFloat($('#saltransport').val());
...@@ -3825,7 +3326,6 @@ function CreateForm(&$frm) ...@@ -3825,7 +3326,6 @@ function CreateForm(&$frm)
3825 stotal+=parseFloat($('#salmedical').val()); 3326 stotal+=parseFloat($('#salmedical').val());
3826 stotal+=parseFloat($('#salelectricity').val()); 3327 stotal+=parseFloat($('#salelectricity').val());
3827 stotal+=parseFloat($('#salother').val()); 3328 stotal+=parseFloat($('#salother').val());
3828
3829 $('#saltotal').val(stotal); 3329 $('#saltotal').val(stotal);
3830 } 3330 }
3831 $('#salelectricity').keyup(saltotal); 3331 $('#salelectricity').keyup(saltotal);
...@@ -3837,7 +3337,6 @@ function CreateForm(&$frm) ...@@ -3837,7 +3337,6 @@ function CreateForm(&$frm)
3837 $('#salfood').keyup(saltotal); 3337 $('#salfood').keyup(saltotal);
3838 $('#salother').keyup(saltotal); 3338 $('#salother').keyup(saltotal);
3839 $('#saltotal').keyup(saltotal); 3339 $('#saltotal').keyup(saltotal);
3840
3841 function recd_sendmail(filepath){mailFile(filepath,$('#recd_to').val(),$('#recd_subject').val(),$('#recd_from').val(),encodeURIComponent($('#recd_message').val()));} 3340 function recd_sendmail(filepath){mailFile(filepath,$('#recd_to').val(),$('#recd_subject').val(),$('#recd_from').val(),encodeURIComponent($('#recd_message').val()));}
3842 function mailFileDialog(filepath) 3341 function mailFileDialog(filepath)
3843 { 3342 {
...@@ -3848,10 +3347,8 @@ function CreateForm(&$frm) ...@@ -3848,10 +3347,8 @@ function CreateForm(&$frm)
3848 dhtml+='<p style=\"clear:both\"><label class=label-small_new style=\"width:25%\">Message:</label><textarea class=\"form_new form_new_amend\" id=recd_message style=\"width:60%\">Please find the Document Attached</textarea></p>'; 3347 dhtml+='<p style=\"clear:both\"><label class=label-small_new style=\"width:25%\">Message:</label><textarea class=\"form_new form_new_amend\" id=recd_message style=\"width:60%\">Please find the Document Attached</textarea></p>';
3849 dhtml+='<p style=\"clear:both\"><label class=label-small_new style=\"width:25%\">Attachment:</label>'+filepath+'</p>'; 3348 dhtml+='<p style=\"clear:both\"><label class=label-small_new style=\"width:25%\">Attachment:</label>'+filepath+'</p>';
3850 dhtml+='</fieldset>'; 3349 dhtml+='</fieldset>';
3851
3852 $('#recdialog').html(''); 3350 $('#recdialog').html('');
3853 $('#recdialog').html(dhtml); 3351 $('#recdialog').html(dhtml);
3854
3855 $('#recdialog').dialog({ 3352 $('#recdialog').dialog({
3856 autoOpen: false, 3353 autoOpen: false,
3857 width: '70%', 3354 width: '70%',
...@@ -3867,7 +3364,6 @@ function CreateForm(&$frm) ...@@ -3867,7 +3364,6 @@ function CreateForm(&$frm)
3867 }); 3364 });
3868 $('#recdialog').dialog('open'); 3365 $('#recdialog').dialog('open');
3869 } 3366 }
3870
3871 function deleteTask(tid) 3367 function deleteTask(tid)
3872 { 3368 {
3873 var postdata='tid='+tid; 3369 var postdata='tid='+tid;
...@@ -3907,7 +3403,6 @@ function CreateForm(&$frm) ...@@ -3907,7 +3403,6 @@ function CreateForm(&$frm)
3907 console.log('no file selected'); 3403 console.log('no file selected');
3908 } 3404 }
3909 }); 3405 });
3910
3911 return false; 3406 return false;
3912 } 3407 }
3913 ajaxFileUpload3('pdfsplitfile',".$this->varid."); 3408 ajaxFileUpload3('pdfsplitfile',".$this->varid.");
...@@ -3951,11 +3446,8 @@ function CreateForm(&$frm) ...@@ -3951,11 +3446,8 @@ function CreateForm(&$frm)
3951 }); 3446 });
3952 </script>"; 3447 </script>";
3953 } 3448 }
3954
3955 return $data; 3449 return $data;
3956 } 3450 }
3957
3958
3959 function checkDuplicate($varid,$key,$val) 3451 function checkDuplicate($varid,$key,$val)
3960 { 3452 {
3961 $gthis=$this->gthis; 3453 $gthis=$this->gthis;
...@@ -3982,7 +3474,6 @@ function checkDuplicate($varid,$key,$val) ...@@ -3982,7 +3474,6 @@ function checkDuplicate($varid,$key,$val)
3982 } 3474 }
3983 } 3475 }
3984 } 3476 }
3985
3986 function chechAlNum($val) 3477 function chechAlNum($val)
3987 { 3478 {
3988 if($val=="") 3479 if($val=="")
...@@ -4004,10 +3495,8 @@ function validatePostData() ...@@ -4004,10 +3495,8 @@ function validatePostData()
4004 $ppldata=$this->recruitdata["peopledata"]; 3495 $ppldata=$this->recruitdata["peopledata"];
4005 $message=''; 3496 $message='';
4006 if($wakka->getCount("records","id='$varid'")!=1)$message=" Record doesnot exists, "; 3497 if($wakka->getCount("records","id='$varid'")!=1)$message=" Record doesnot exists, ";
4007
4008 //only if active statuses 3498 //only if active statuses
4009 $empstatus=Input::get('currentstatus');if($empstatus=="")$empstatus="__NOCHECK__"; 3499 $empstatus=Input::get('currentstatus');if($empstatus=="")$empstatus="__NOCHECK__";
4010
4011 if(stristr($wakka->HRCoreVars['hrrecruitstatuses'],$empstatus)||stristr($wakka->HRCoreVars['hrworkingstatus'],$empstatus)) 3500 if(stristr($wakka->HRCoreVars['hrrecruitstatuses'],$empstatus)||stristr($wakka->HRCoreVars['hrworkingstatus'],$empstatus))
4012 { 3501 {
4013 //$this->HRForms[$parts[3]][$parts[4]][]=array($parts[5],$parts[6],$parts[7],$parts[8],$parts[9],$parts[0],$parts[1],$parts[2],$parts[10]); 3502 //$this->HRForms[$parts[3]][$parts[4]][]=array($parts[5],$parts[6],$parts[7],$parts[8],$parts[9],$parts[0],$parts[1],$parts[2],$parts[10]);
...@@ -4026,10 +3515,8 @@ function validatePostData() ...@@ -4026,10 +3515,8 @@ function validatePostData()
4026 { 3515 {
4027 if($vline!="") 3516 if($vline!="")
4028 { 3517 {
4029
4030 $vline=str_replace("__COMMA__",",",$vline); 3518 $vline=str_replace("__COMMA__",",",$vline);
4031 $fline5=Input::get($flines[5]); 3519 $fline5=Input::get($flines[5]);
4032
4033 //$message.="[$flines[5]|$vline] "; 3520 //$message.="[$flines[5]|$vline] ";
4034 if($vline=="NONEMPTY") 3521 if($vline=="NONEMPTY")
4035 { 3522 {
...@@ -4074,7 +3561,6 @@ function validatePostData() ...@@ -4074,7 +3561,6 @@ function validatePostData()
4074 } 3561 }
4075 } 3562 }
4076 } 3563 }
4077
4078 //select values check 3564 //select values check
4079 $dropsarr=explode(",",$this->HRDropFilds); 3565 $dropsarr=explode(",",$this->HRDropFilds);
4080 foreach($dropsarr as $dropitem) 3566 foreach($dropsarr as $dropitem)
...@@ -4085,7 +3571,6 @@ function validatePostData() ...@@ -4085,7 +3571,6 @@ function validatePostData()
4085 if(Input::get($dropitem)!=''&&Input::get($dropitem)!='undefined'&&!strstr($selvals,trim(Input::get($dropitem)))) 3571 if(Input::get($dropitem)!=''&&Input::get($dropitem)!='undefined'&&!strstr($selvals,trim(Input::get($dropitem))))
4086 $message.=" Wrong Value of '".$this->HRFieldNames[$dropitem]."'"; 3572 $message.=" Wrong Value of '".$this->HRFieldNames[$dropitem]."'";
4087 } 3573 }
4088
4089 //date check 3574 //date check
4090 $datesarr=explode(",",$this->HRDateFilds); 3575 $datesarr=explode(",",$this->HRDateFilds);
4091 foreach($datesarr as $dateitem) 3576 foreach($datesarr as $dateitem)
...@@ -4102,10 +3587,8 @@ function validatePostData() ...@@ -4102,10 +3587,8 @@ function validatePostData()
4102 } 3587 }
4103 } 3588 }
4104 } 3589 }
4105
4106 //client cannot be changed unless Admin 3590 //client cannot be changed unless Admin
4107 if(!$wakka->IsAdmin())if(trim($ppldata["client"])!=""&&$ppldata["client"]!=Input::get("client"))$message=" Client Cannot be changed, use Renew-Record"; 3591 if(!$wakka->IsAdmin())if(trim($ppldata["client"])!=""&&$ppldata["client"]!=Input::get("client"))$message=" Client Cannot be changed, use Renew-Record";
4108
4109 if(Input::get('currentstatus')==$wakka->HRCoreVars['hrTriggerHoldStatus']) 3592 if(Input::get('currentstatus')==$wakka->HRCoreVars['hrTriggerHoldStatus'])
4110 { 3593 {
4111 $message="";//bypass checks for candidates 3594 $message="";//bypass checks for candidates
...@@ -4122,7 +3605,6 @@ function validatePostData() ...@@ -4122,7 +3605,6 @@ function validatePostData()
4122 $ppldata['varid']=Input::get('varid'); 3605 $ppldata['varid']=Input::get('varid');
4123 $ppldata['id']=Input::get('varid'); 3606 $ppldata['id']=Input::get('varid');
4124 $client=Input::get('client'); 3607 $client=Input::get('client');
4125
4126 //file vars change the file names to store,and if empty keep the old name 3608 //file vars change the file names to store,and if empty keep the old name
4127 $tmpstr=explode(",",$this->HRFileFieldsStr); 3609 $tmpstr=explode(",",$this->HRFileFieldsStr);
4128 foreach($tmpstr as $tmpelem) 3610 foreach($tmpstr as $tmpelem)
...@@ -4146,7 +3628,6 @@ function validatePostData() ...@@ -4146,7 +3628,6 @@ function validatePostData()
4146 } 3628 }
4147 } 3629 }
4148 } 3630 }
4149
4150 $tmpstr=explode(",",$this->HRFiledsStr); 3631 $tmpstr=explode(",",$this->HRFiledsStr);
4151 $newdata=array();foreach($tmpstr as $key) 3632 $newdata=array();foreach($tmpstr as $key)
4152 { 3633 {
...@@ -4160,12 +3641,10 @@ function validatePostData() ...@@ -4160,12 +3641,10 @@ function validatePostData()
4160 { 3641 {
4161 if(strstr($changearr[$changearr["updated"]],$key)==FALSE)$changearr[$changearr["updated"]].="$key|".str_replace(array("|",",")," ",$val)."|".str_replace(array("|",",")," ",$wakka->safeString($newval)).","; 3642 if(strstr($changearr[$changearr["updated"]],$key)==FALSE)$changearr[$changearr["updated"]].="$key|".str_replace(array("|",",")," ",$val)."|".str_replace(array("|",",")," ",$wakka->safeString($newval)).",";
4162 $this->recruitdata['dirty'][$key]=1; 3643 $this->recruitdata['dirty'][$key]=1;
4163
4164 $this->empWorkflowTrigger($ppldata['varid'],$client,$key,$newval,$val,$ppldata,$newdata); 3644 $this->empWorkflowTrigger($ppldata['varid'],$client,$key,$newval,$val,$ppldata,$newdata);
4165 $this->empAnalytics($ppldata['varid'],$ppldata,$key,$newval,$val); 3645 $this->empAnalytics($ppldata['varid'],$ppldata,$key,$newval,$val);
4166 } 3646 }
4167 } 3647 }
4168
4169 foreach($tmpstr as $tmpelem) 3648 foreach($tmpstr as $tmpelem)
4170 { 3649 {
4171 if(Input::exists($tmpelem)) 3650 if(Input::exists($tmpelem))
...@@ -4174,8 +3653,6 @@ function validatePostData() ...@@ -4174,8 +3653,6 @@ function validatePostData()
4174 if($ppldata[$tmpelem]=="")unset($ppldata[$tmpelem]); 3653 if($ppldata[$tmpelem]=="")unset($ppldata[$tmpelem]);
4175 } 3654 }
4176 } 3655 }
4177
4178
4179 //run holded up triggers if 3656 //run holded up triggers if
4180 if($newdata["currentstatus"]!=$wakka->HRCoreVars['hrTriggerHoldStatus']) 3657 if($newdata["currentstatus"]!=$wakka->HRCoreVars['hrTriggerHoldStatus'])
4181 { 3658 {
...@@ -4199,20 +3676,16 @@ function validatePostData() ...@@ -4199,20 +3676,16 @@ function validatePostData()
4199 function processFormSubmit() 3676 function processFormSubmit()
4200 { 3677 {
4201 if(Auth::guest())return "Error-401"; 3678 if(Auth::guest())return "Error-401";
4202
4203 $wakka=$this->gthis; 3679 $wakka=$this->gthis;
4204 $tasknotification=''; 3680 $tasknotification='';
4205 $resultstr=""; 3681 $resultstr="";
4206 $result=false; 3682 $result=false;
4207 $varid=$this->varid; 3683 $varid=$this->varid;
4208
4209 $message=$this->validatePostData(); 3684 $message=$this->validatePostData();
4210 if($message==""||$wakka->IsAdmin()) 3685 if($message==""||$wakka->IsAdmin())
4211 { 3686 {
4212 if($message!="")$tasknotification.="Please Check: $message<br>"; 3687 if($message!="")$tasknotification.="Please Check: $message<br>";
4213
4214 $this->updateArrayWithPostData(); 3688 $this->updateArrayWithPostData();
4215
4216 //$res=$wakka->setPerson($varid,$this->recruitdata); 3689 //$res=$wakka->setPerson($varid,$this->recruitdata);
4217 if($res<0) 3690 if($res<0)
4218 { 3691 {
...@@ -4221,20 +3694,14 @@ function validatePostData() ...@@ -4221,20 +3694,14 @@ function validatePostData()
4221 else 3694 else
4222 { 3695 {
4223 $result=true; 3696 $result=true;
4224
4225 $wakka->cleanSystemTaskbyID($varid,$this->HRFiledsStr); 3697 $wakka->cleanSystemTaskbyID($varid,$this->HRFiledsStr);
4226 $tasksemp=$wakka->LoadAll("select name from hrms_tasks where empid='$varid' and status in ('NEW','WIP')"); 3698 $tasksemp=$wakka->LoadAll("select name from hrms_tasks where empid='$varid' and status in ('NEW','WIP')");
4227 foreach($tasksemp as $tline)$tasknotification.=$tline['name']."<br>"; 3699 foreach($tasksemp as $tline)$tasknotification.=$tline['name']."<br>";
4228
4229 if($tasknotification==''){$resultstr="<div class='alert alert-success'><strong>Record Updated!</strong><p>Record Data Updated Successfully, you may search and edit or continue to edit data.</p><div style='display:none' id='happy'><img src='/assets/images/emot/happy.jpg' height='80' width='80'></div><div style='display:none' id='sad'><img src='/assets/images/emot/sad.png' height='80' width='80'></div></div><script>clearFileVars();</script><script>simpleNotification('success','topRight','Saved Successfully'); 3700 if($tasknotification==''){$resultstr="<div class='alert alert-success'><strong>Record Updated!</strong><p>Record Data Updated Successfully, you may search and edit or continue to edit data.</p><div style='display:none' id='happy'><img src='/assets/images/emot/happy.jpg' height='80' width='80'></div><div style='display:none' id='sad'><img src='/assets/images/emot/sad.png' height='80' width='80'></div></div><script>clearFileVars();</script><script>simpleNotification('success','topRight','Saved Successfully');
4230
4231 </script>";} 3701 </script>";}
4232 else {$resultstr="<div class='alert alert-success'><strong>Data Saved with Task Escalation</strong><p>Tasks Created:- <br>$tasknotification</p></div><script>clearFileVars();</script><script>simpleNotification('success','topRight','Saved Successfully');</script>"; 3702 else {$resultstr="<div class='alert alert-success'><strong>Data Saved with Task Escalation</strong><p>Tasks Created:- <br>$tasknotification</p></div><script>clearFileVars();</script><script>simpleNotification('success','topRight','Saved Successfully');</script>";
4233 } 3703 }
4234
4235 $resultstr.= $this->getProcess($this->recruitdata['peopledata'],$wakka); 3704 $resultstr.= $this->getProcess($this->recruitdata['peopledata'],$wakka);
4236
4237
4238 //sanity check files and task 3705 //sanity check files and task
4239 $recruitdata=$this->recruitdata; 3706 $recruitdata=$this->recruitdata;
4240 $tmpstr=explode(",",$this->HRFileFieldsStr); 3707 $tmpstr=explode(",",$this->HRFileFieldsStr);
...@@ -4259,18 +3726,14 @@ function validatePostData() ...@@ -4259,18 +3726,14 @@ function validatePostData()
4259 } 3726 }
4260 $this->recruitdata=$recruitdata; 3727 $this->recruitdata=$recruitdata;
4261 $res=$wakka->setPerson($varid,$this->recruitdata); 3728 $res=$wakka->setPerson($varid,$this->recruitdata);
4262
4263 } 3729 }
4264 } 3730 }
4265 else 3731 else
4266 { 3732 {
4267 $resultstr="<div class='alert alert-danger'><strong>Record Add/Update Error!</strong><p>Please Check : $message</p></div><script>simpleNotification('error','topRight','Error in saving, Check Errors');</script>"; 3733 $resultstr="<div class='alert alert-danger'><strong>Record Add/Update Error!</strong><p>Please Check : $message</p></div><script>simpleNotification('error','topRight','Error in saving, Check Errors');</script>";
4268 } 3734 }
4269
4270 return $resultstr; 3735 return $resultstr;
4271 } 3736 }
4272
4273
4274 function buildUL($tooltip,$fpath,$text,$tdata="",$onclick="") 3737 function buildUL($tooltip,$fpath,$text,$tdata="",$onclick="")
4275 { 3738 {
4276 $data="<ul class='dash dash2' onclick='$onclick return false;'> 3739 $data="<ul class='dash dash2' onclick='$onclick return false;'>
...@@ -4285,9 +3748,7 @@ return $data; ...@@ -4285,9 +3748,7 @@ return $data;
4285 } 3748 }
4286 function getProcess(&$ppldata,&$gthis) 3749 function getProcess(&$ppldata,&$gthis)
4287 { 3750 {
4288
4289 } 3751 }
4290
4291 function getStageStatus(&$gthis,$stagestr,&$ppldata,$imgoverride="") 3752 function getStageStatus(&$gthis,$stagestr,&$ppldata,$imgoverride="")
4292 { 3753 {
4293 $completed=true;$tdata="";$titleD=array(); 3754 $completed=true;$tdata="";$titleD=array();
...@@ -4304,10 +3765,8 @@ function getStageStatus(&$gthis,$stagestr,&$ppldata,$imgoverride="") ...@@ -4304,10 +3765,8 @@ function getStageStatus(&$gthis,$stagestr,&$ppldata,$imgoverride="")
4304 } 3765 }
4305 } 3766 }
4306 $title[]="<br>";if(is_array($titleD))$title=array_merge($title,$titleD); 3767 $title[]="<br>";if(is_array($titleD))$title=array_merge($title,$titleD);
4307
4308 if($completed)$imgoverride="tick_48"; 3768 if($completed)$imgoverride="tick_48";
4309 if(!$completed&&$imgoverride=="")$imgoverride="stop_48"; 3769 if(!$completed&&$imgoverride=="")$imgoverride="stop_48";
4310
4311 if($imgoverride!="stop_48"&&$tdata!="stop_48,err1") 3770 if($imgoverride!="stop_48"&&$tdata!="stop_48,err1")
4312 { 3771 {
4313 //if last stage is done set system exit status 3772 //if last stage is done set system exit status
...@@ -4326,26 +3785,17 @@ function getStageStatus(&$gthis,$stagestr,&$ppldata,$imgoverride="") ...@@ -4326,26 +3785,17 @@ function getStageStatus(&$gthis,$stagestr,&$ppldata,$imgoverride="")
4326 if($ppldata["workflowstatus"]!=$wfstrs[1])$gthis->setPersonKey($ppldata["id"],"workflowstatus",$wfstrs[1]); 3785 if($ppldata["workflowstatus"]!=$wfstrs[1])$gthis->setPersonKey($ppldata["id"],"workflowstatus",$wfstrs[1]);
4327 if($ppldata["workflowstatusS"]!=$imgoverride)$gthis->setPersonKey($ppldata["id"],"workflowstatusS",$imgoverride); 3786 if($ppldata["workflowstatusS"]!=$imgoverride)$gthis->setPersonKey($ppldata["id"],"workflowstatusS",$imgoverride);
4328 } 3787 }
4329
4330 $wfstrs[1].="_ToDo"; 3788 $wfstrs[1].="_ToDo";
4331 } 3789 }
4332
4333 if(!isset($ppldata['generalremarks']))$ppldata['generalremarks']=''; 3790 if(!isset($ppldata['generalremarks']))$ppldata['generalremarks']='';
4334
4335 if($completed)return $this->buildUL(implode("<br>",$titleD),$this->themehome."/assets/icons/$imgoverride.png",$wfstrs[1],$tdata,"Rpopupopen(\"$ppldata[id]\",\"$stagestr\",\"$ppldata[generalremarks]\");"); 3791 if($completed)return $this->buildUL(implode("<br>",$titleD),$this->themehome."/assets/icons/$imgoverride.png",$wfstrs[1],$tdata,"Rpopupopen(\"$ppldata[id]\",\"$stagestr\",\"$ppldata[generalremarks]\");");
4336 else return $this->buildUL(implode("<br>",$title), $this->themehome."/assets/icons/$imgoverride.png",$wfstrs[1],$tdata,"Rpopupopen(\"$ppldata[id]\",\"$stagestr\",\"$ppldata[generalremarks]\");"); 3792 else return $this->buildUL(implode("<br>",$title), $this->themehome."/assets/icons/$imgoverride.png",$wfstrs[1],$tdata,"Rpopupopen(\"$ppldata[id]\",\"$stagestr\",\"$ppldata[generalremarks]\");");
4337 } 3793 }
4338
4339
4340 function empWorkflowTrigger($varid,$client,$key,$newval,$oldval,&$postvars,&$newdata) 3794 function empWorkflowTrigger($varid,$client,$key,$newval,$oldval,&$postvars,&$newdata)
4341 { 3795 {
4342
4343 } 3796 }
4344 function empAnalytics($varid,&$ppldata,$key,$newval,$oldval) 3797 function empAnalytics($varid,&$ppldata,$key,$newval,$oldval)
4345 { 3798 {
4346
4347 } 3799 }
4348 //Log::info($data); 3800 //Log::info($data);
4349
4350 } 3801 }
4351
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!