changes for saving relationship
Showing
1 changed file
with
52 additions
and
94 deletions
| ... | @@ -849,11 +849,14 @@ $data.="</fieldset></div> | ... | @@ -849,11 +849,14 @@ $data.="</fieldset></div> |
| 849 | dialerDisoSelect(); | 849 | dialerDisoSelect(); |
| 850 | </script>"; | 850 | </script>"; |
| 851 | // Relationship Tagging | 851 | // Relationship Tagging |
| 852 | /*$relationshipServices = DB::table('relationship_service')->get(); | 852 | if(Auth::user()->username=='B654321') |
| 853 | $data.='<hr/><legend class="new-recruit_legend">Relationship Taggiing</legend> | 853 | { |
| 854 | $relationshipServices = DB::table('relationship_service')->get(); | ||
| 855 | $data.='<hr/><legend class="new-recruit_legend">Relationship Taggiing</legend> | ||
| 856 | <p id=chkboxrelship><input type=checkbox onclick="enableRelationships();return false;" id=relchkboxenable> Click to Tag Relationships</p> | ||
| 854 | <div class="row"> | 857 | <div class="row"> |
| 855 | <div class="col-sm-3"> | 858 | <div class="col-sm-3"> |
| 856 | <select class="form_hrm_select" id="relationshipService" name="" style="width:100%;" onchange="changeRelationshipCategory(this.value);return false;"> | 859 | <select class="select2multi" id="relationshipService" name="" style="width:100%;" onchange="changeRelationshipCategory(this.value);return false;"> |
| 857 | <option value="">Select Service</option>'; | 860 | <option value="">Select Service</option>'; |
| 858 | foreach($relationshipServices as $value){ | 861 | foreach($relationshipServices as $value){ |
| 859 | $data.='<option value="'.$value->id.'">'.$value->title.'</option>'; | 862 | $data.='<option value="'.$value->id.'">'.$value->title.'</option>'; |
| ... | @@ -861,10 +864,10 @@ $data.="</fieldset></div> | ... | @@ -861,10 +864,10 @@ $data.="</fieldset></div> |
| 861 | $data.='</select> | 864 | $data.='</select> |
| 862 | </div> | 865 | </div> |
| 863 | <div class="col-sm-3"> | 866 | <div class="col-sm-3"> |
| 864 | <select class="form_hrm_select" id="relationshipCategory" name="" style="width:100%;" onclick="changeRelationshipSubCategory(this.value);return false;"></select> | 867 | <select class="select2multi" id="relationshipCategory" name="" style="width:100%;" onclick="changeRelationshipSubCategory(this.value);return false;"></select> |
| 865 | </div> | 868 | </div> |
| 866 | <div class="col-sm-3"> | 869 | <div class="col-sm-3"> |
| 867 | <select class="form_hrm_select" id="relationshipSubCategory" name="" style="width:100%;"></select> | 870 | <select class="select2multi" id="relationshipSubCategory" name="" style="width:100%;"></select> |
| 868 | </div> | 871 | </div> |
| 869 | <div class="col-sm-3"> | 872 | <div class="col-sm-3"> |
| 870 | <button class="btn btn-success" onclick="addRelationship();return false;">Add</button> | 873 | <button class="btn btn-success" onclick="addRelationship();return false;">Add</button> |
| ... | @@ -873,28 +876,27 @@ $data.="</fieldset></div> | ... | @@ -873,28 +876,27 @@ $data.="</fieldset></div> |
| 873 | <div class="row"> | 876 | <div class="row"> |
| 874 | <div class="col-sm-4" style="padding:5px 0;"> | 877 | <div class="col-sm-4" style="padding:5px 0;"> |
| 875 | <label class="label-small_new" style="width:25%;">Service 1: </label> | 878 | <label class="label-small_new" style="width:25%;">Service 1: </label> |
| 876 | <input type="text" class="form_new form_new_amend disabled" id="dialerdata_service1-'.$varid.'" name="" style="width:70%"" /> | 879 | <input type="text" class="form_new form_new_amend disabled" id="dialerdata_service1-'.$varid.'" name="" style="width:70%" disabled="disabled" /> |
| 877 | </div> | 880 | </div> |
| 878 | <div class="col-sm-4" style="padding:5px 0;"> | 881 | <div class="col-sm-4" style="padding:5px 0;"> |
| 879 | <label class="label-small_new" style="width:25%;">Service 2: </label> | 882 | <label class="label-small_new" style="width:25%;">Service 2: </label> |
| 880 | <input type="text" class="form_new form_new_amend disabled" id="dialerdata_service2-'.$varid.'" name="" style="width:70%"" | 883 | <input type="text" class="form_new form_new_amend disabled" id="dialerdata_service2-'.$varid.'" name="" style="width:70%" disabled="disabled"/> |
| 881 | /> | ||
| 882 | </div> | 884 | </div> |
| 883 | <div class="col-sm-4" style="padding:5px 0;"> | 885 | <div class="col-sm-4" style="padding:5px 0;"> |
| 884 | <label class="label-small_new" style="width:25%;">Service 3: </label> | 886 | <label class="label-small_new" style="width:25%;">Service 3: </label> |
| 885 | <input type="text" class="form_new form_new_amend disabled" id="dialerdata_service3-'.$varid.'" name="" style="width:70%"" /> | 887 | <input type="text" class="form_new form_new_amend disabled" id="dialerdata_service3-'.$varid.'" name="" style="width:70%" disabled="disabled"/> |
| 886 | </div> | 888 | </div> |
| 887 | <div class="col-sm-4" style="padding:5px 0;"> | 889 | <div class="col-sm-4" style="padding:5px 0;"> |
| 888 | <label class="label-small_new" style="width:25%;">Service 4: </label> | 890 | <label class="label-small_new" style="width:25%;">Service 4: </label> |
| 889 | <input type="text" class="form_new form_new_amend disabled" id="dialerdata_service4-'.$varid.'" name="" style="width:70%"" /> | 891 | <input type="text" class="form_new form_new_amend disabled" id="dialerdata_service4-'.$varid.'" name="" style="width:70%" disabled="disabled"/> |
| 890 | </div> | 892 | </div> |
| 891 | <div class="col-sm-4" style="padding:5px 0;"> | 893 | <div class="col-sm-4" style="padding:5px 0;"> |
| 892 | <label class="label-small_new" style="width:25%;">Service 5: </label> | 894 | <label class="label-small_new" style="width:25%;">Service 5: </label> |
| 893 | <input type="text" class="form_new form_new_amend disabled" id="dialerdata_service5-'.$varid.'" name="" style="width:70%"" /> | 895 | <input type="text" class="form_new form_new_amend disabled" id="dialerdata_service5-'.$varid.'" name="" style="width:70%" disabled="disabled"/> |
| 894 | </div> | 896 | </div> |
| 895 | <div class="col-sm-4" style="padding:5px 0;"> | 897 | <div class="col-sm-4" style="padding:5px 0;"> |
| 896 | <label class="label-small_new" style="width:25%;">Service 6: </label> | 898 | <label class="label-small_new" style="width:25%;">Service 6: </label> |
| 897 | <input type="text" class="form_new form_new_amend disabled" id="dialerdata_service6-'.$varid.'" name="" style="width:70%"" /> | 899 | <input type="text" class="form_new form_new_amend disabled" id="dialerdata_service6-'.$varid.'" name="" style="width:70%" disabled="disabled"/> |
| 898 | </div> | 900 | </div> |
| 899 | </div><hr style="padding:5px 0;"/> | 901 | </div><hr style="padding:5px 0;"/> |
| 900 | <script> | 902 | <script> |
| ... | @@ -909,105 +911,61 @@ $data.="</fieldset></div> | ... | @@ -909,105 +911,61 @@ $data.="</fieldset></div> |
| 909 | } | 911 | } |
| 910 | } | 912 | } |
| 911 | var service = 1; | 913 | var service = 1; |
| 914 | if(typeof customerDispofields == "undefined")var customerDispofields = {}; | ||
| 915 | |||
| 912 | function addRelationship(){ | 916 | function addRelationship(){ |
| 913 | var relationshipService = $("#relationshipService option:selected").text(); | 917 | var relationshipService = $("#relationshipService option:selected").text(); |
| 914 | var relationshipCategory = $("#relationshipCategory option:selected").text(); | 918 | var relationshipCategory = $("#relationshipCategory option:selected").text(); |
| 915 | var relationshipSubCategory = $("#relationshipSubCategory").val(); | 919 | var relationshipSubCategory = $("#relationshipSubCategory").val(); |
| 916 | if(service <= 6){ | 920 | if(service <= 6){ |
| 917 | $("#dialerdata_service"+ service +"-'.$varid.'").val(relationshipService+" -- "+relationshipCategory+" -- "+relationshipSubCategory); | 921 | $("#dialerdata_service"+service+"-'.$varid.'").val(relationshipService+" -- "+relationshipCategory+" -- "+relationshipSubCategory); |
| 922 | if(typeof customerDispofields['.$varid.'] == "undefined") | ||
| 923 | { | ||
| 924 | customerDispofields['.$varid.']={}; | ||
| 925 | customerDispofields['.$varid.']["dialerdata_service"+service]=""; | ||
| 926 | } | ||
| 927 | customerDispofields['.$varid.']["dialerdata_service"+service] = relationshipService+" -- "+relationshipCategory+" -- "+relationshipSubCategory; | ||
| 918 | service++; | 928 | service++; |
| 919 | } | 929 | } |
| 920 | } | 930 | } |
| 921 | </script>';*/ | 931 | function enableRelationships() |
| 922 | // End Relationship Tagging | 932 | { |
| 933 | if(kstychCall["ts_Talk"]<1||Math.ceil(((getNowTS()-kstychCall["ts_Talk"])/1000))<10) | ||
| 934 | { | ||
| 935 | $("#relchkboxenable").removeAttr("checked"); return; | ||
| 936 | } | ||
| 937 | $("#chkboxrelship").hide(); | ||
| 938 | $("#dialerdata_service1-'.$varid.'").prop("disabled",false); | ||
| 939 | $("#dialerdata_service2-'.$varid.'").prop("disabled",false); | ||
| 940 | $("#dialerdata_service3-'.$varid.'").prop("disabled",false); | ||
| 941 | $("#dialerdata_service4-'.$varid.'").prop("disabled",false); | ||
| 942 | $("#dialerdata_service5-'.$varid.'").prop("disabled",false); | ||
| 943 | $("#dialerdata_service6-'.$varid.'").prop("disabled",false); | ||
| 944 | } | ||
| 945 | </script>'; | ||
| 946 | } | ||
| 947 | else | ||
| 948 | { | ||
| 949 | if(empty($mastersdata['dialerCustomHTML']))$mastersdata['dialerCustomHTML']=$gthis->HRCoreVars['dialerCustomHTML']; | ||
| 923 | 950 | ||
| 951 | $userdatahtml=str_replace("__EQ__","=",$mastersdata['dialerCustomHTML']); | ||
| 952 | $userdatahtml=str_replace("__PLUS__","+",$userdatahtml); | ||
| 953 | $userdatahtml=str_replace("{{varid}}",$this->varid,$userdatahtml); | ||
| 924 | 954 | ||
| 925 | if(empty($mastersdata['dialerCustomHTML']))$mastersdata['dialerCustomHTML']=$gthis->HRCoreVars['dialerCustomHTML']; | 955 | $data.=$userdatahtml; |
| 956 | } | ||
| 957 | |||
| 958 | // End Relationship Tagging | ||
| 926 | 959 | ||
| 927 | $userdatahtml=str_replace("__EQ__","=",$mastersdata['dialerCustomHTML']); | ||
| 928 | $userdatahtml=str_replace("__PLUS__","+",$userdatahtml); | ||
| 929 | $userdatahtml=str_replace("{{varid}}",$this->varid,$userdatahtml); | ||
| 930 | 960 | ||
| 931 | $data.=$userdatahtml; | 961 | |
| 932 | //Log::info($userdatahtml); | 962 | //Log::info($userdatahtml); |
| 933 | $data.="<hr></div>"; | 963 | $data.="<hr></div>"; |
| 934 | //$data.="</div>"; | 964 | //$data.="</div>"; |
| 935 | //Log::info($data); | 965 | //Log::info($data); |
| 936 | return $data; | 966 | return $data; |
| 937 | } | 967 | } |
| 938 | /* function createCallsTab() | ||
| 939 | { | ||
| 940 | $data="<fieldset><legend class='new-recruit_legend'>Calls History</legend>"; | ||
| 941 | |||
| 942 | $data.=" <div class=custom1 style='width:100%;'> | ||
| 943 | <h2></h2>"; | ||
| 944 | |||
| 945 | $data.="<hr><br><table class='table kDataTable' cellpadding=0 cellspacing=0 border=0> | ||
| 946 | <thead><tr> | ||
| 947 | <td>#</td> | ||
| 948 | <td class='table_hrm_heading_green'>Start</td> | ||
| 949 | <!--<td class='table_hrm_heading_green'>Length*</td>--> | ||
| 950 | <td class='table_hrm_heading_green'>User</td> | ||
| 951 | <td class='table_hrm_heading_green'>Number</td> | ||
| 952 | <td class='table_hrm_heading_green'>Type</td> | ||
| 953 | <!--<td class='table_hrm_heading_green'>Status*</td>--> | ||
| 954 | <td class='table_hrm_heading_green'>Disposition</td> | ||
| 955 | <td class='table_hrm_heading_green'>SubDispo</td> | ||
| 956 | <td class='table_hrm_heading_green'>Callback</td> | ||
| 957 | <td class='table_hrm_heading_green'>Remarks</td> | ||
| 958 | <td class='table_hrm_heading_green'>Custom</td> | ||
| 959 | <td class='table_hrm_heading_green'>BTTC</td> | ||
| 960 | <td class='table_hrm_heading_green'>Service vs Product</td> | ||
| 961 | <td class='table_hrm_heading_green'>Resolution</td> | ||
| 962 | <td class='table_hrm_heading_green'>Satisfaction</td> | ||
| 963 | <td class='table_hrm_heading_green'>Final Call Assessment</td> | ||
| 964 | </tr></thead>"; | ||
| 965 | //Log::info($this->varid); | ||
| 966 | $k=1; | ||
| 967 | $alist=CRMCallArchive::where('crm_id','=',$this->varid)->where('ts_Close','>','0')->orderBy("created_at","DESC")->get(); | ||
| 968 | foreach($alist as $aline) | ||
| 969 | { | ||
| 970 | $userdata=""; | ||
| 971 | $userdataarr=json_decode($aline->userdata,true); | ||
| 972 | if(is_array($userdataarr))foreach($userdataarr as $userdatavar=>$userdataval) | ||
| 973 | { | ||
| 974 | $userdata.="<tr><td>$userdataval</td></tr>"; | ||
| 975 | } | ||
| 976 | if(trim($userdata)!="")$userdata="<table>".$userdata."</table>"; | ||
| 977 | |||
| 978 | $dispname="";if($aline->user_id>0){$tuser=User::find($aline->user_id);$dispname=$tuser->dispname();} | ||
| 979 | |||
| 980 | $records = DB::table('records')->where('id','=',$aline->crm_id)->select('bttc','service_vs_product','resolution','satisfaction','final_call_assessment')->get(); | ||
| 981 | |||
| 982 | $data.="<tr> | ||
| 983 | <td>$k</td> | ||
| 984 | <td class=''>".date("Y-m-d H:i:s",strtotime($aline->created_at)-(Auth::user()->timezone*60))."</td> | ||
| 985 | <!--<td class=''>".round($aline->callsec/1000,2)."</td>--> | ||
| 986 | <td class=''>".$dispname."</td> | ||
| 987 | <td class=''>".$aline->number."</td> | ||
| 988 | <td class=''>".$aline->type."</td> | ||
| 989 | <!--<td class=''>".$aline->status."</td>--> | ||
| 990 | <td class=''>".$aline->userstatus."</td> | ||
| 991 | <td class=''>".$aline->usersubstatus."</td> | ||
| 992 | <td class=''>".date("Y-m-d H:i:s",strtotime($aline->usercallback)-(Auth::user()->timezone*60))."</td> | ||
| 993 | <td class=''>".$aline->userremarks."</td> | ||
| 994 | <td class=''>".$userdata."</td> | ||
| 995 | <td class=''>".$records[0]->bttc."</td> | ||
| 996 | <td class=''>".$records[0]->service_vs_product."</td> | ||
| 997 | <td class=''>".$records[0]->resolution."</td> | ||
| 998 | <td class=''>".$records[0]->satisfaction."</td> | ||
| 999 | <td class=''>".$records[0]->final_call_assessment."</td> | ||
| 1000 | </tr>"; | ||
| 1001 | $k++; | ||
| 1002 | } | ||
| 1003 | $data.="</table>"; | ||
| 1004 | |||
| 1005 | $data.="</div>"; | ||
| 1006 | $data.="</fieldset>"; | ||
| 1007 | |||
| 1008 | return $data; | ||
| 1009 | 968 | ||
| 1010 | }*/ | ||
| 1011 | 969 | ||
| 1012 | function createCallsTab() | 970 | function createCallsTab() |
| 1013 | { | 971 | { |
| ... | @@ -1192,7 +1150,7 @@ function createQaireTab() | ... | @@ -1192,7 +1150,7 @@ function createQaireTab() |
| 1192 | } | 1150 | } |
| 1193 | if($primary_question->compulsory_qes =='imp') | 1151 | if($primary_question->compulsory_qes =='imp') |
| 1194 | { | 1152 | { |
| 1195 | $data.="<div class='panel panel-warning panel-heading' id='parentColorDiv".$primary_question->question_no."' style='background-color:#52BE80;cursor:pointer'>"; | 1153 | $data.="<div class='panel panel-warning panel-heading' id='parentColorDiv".$primary_question->question_no."' style='background-color:#CD6155;cursor:pointer'>"; |
| 1196 | }else if($questionhistory=='') | 1154 | }else if($questionhistory=='') |
| 1197 | { | 1155 | { |
| 1198 | if($key%2!=0) | 1156 | if($key%2!=0) |
| ... | @@ -3170,7 +3128,7 @@ function CreateForm(&$frm) | ... | @@ -3170,7 +3128,7 @@ function CreateForm(&$frm) |
| 3170 | $frm['Racing Format']["{{id}} {{firstname}}"][]=array(); | 3128 | $frm['Racing Format']["{{id}} {{firstname}}"][]=array(); |
| 3171 | //if(Auth::user()->username =="B654321" || Auth::user()->username =="B12345") | 3129 | //if(Auth::user()->username =="B654321" || Auth::user()->username =="B12345") |
| 3172 | //{ | 3130 | //{ |
| 3173 | //$frm['Lead Entry Form']["{{id}} {{firstname}}"][]=array(); | 3131 | $frm['Lead Entry Form']["{{id}} {{firstname}}"][]=array(); |
| 3174 | //} | 3132 | //} |
| 3175 | } | 3133 | } |
| 3176 | } | 3134 | } | ... | ... |
-
Please register or sign in to post a comment