Merge branch 'dev-beu-dispositionList' into dev-beu-phase-1
Showing
31 changed files
with
1680 additions
and
222 deletions
| ... | @@ -10,6 +10,9 @@ use Response; | ... | @@ -10,6 +10,9 @@ use Response; |
| 10 | use App\Models\User; | 10 | use App\Models\User; |
| 11 | use SimpleXLSX; | 11 | use SimpleXLSX; |
| 12 | use App\Jobs\KHRMSLib; | 12 | use App\Jobs\KHRMSLib; |
| 13 | use App\Models\Disposition; | ||
| 14 | use App\Models\SubDisposition; | ||
| 15 | use App\Models\DispositionPlan; | ||
| 13 | 16 | ||
| 14 | class CampaignController extends Controller { | 17 | class CampaignController extends Controller { |
| 15 | 18 | ||
| ... | @@ -64,13 +67,6 @@ class CampaignController extends Controller { | ... | @@ -64,13 +67,6 @@ class CampaignController extends Controller { |
| 64 | $highestColumn = count($objWorksheet[0]); | 67 | $highestColumn = count($objWorksheet[0]); |
| 65 | $highestrow=count($objWorksheet); | 68 | $highestrow=count($objWorksheet); |
| 66 | 69 | ||
| 67 | //echo "<pre>";print_r($objWorksheet); | ||
| 68 | //echo "\n"; | ||
| 69 | //print_r($highestColumn); | ||
| 70 | //echo "\n"; | ||
| 71 | |||
| 72 | //echo $highestrow; | ||
| 73 | |||
| 74 | for($i=0;$i<$highestrow;$i++) | 70 | for($i=0;$i<$highestrow;$i++) |
| 75 | {//echo $i; | 71 | {//echo $i; |
| 76 | $excelarray[$i]=array(); | 72 | $excelarray[$i]=array(); |
| ... | @@ -88,8 +84,6 @@ class CampaignController extends Controller { | ... | @@ -88,8 +84,6 @@ class CampaignController extends Controller { |
| 88 | } | 84 | } |
| 89 | } | 85 | } |
| 90 | 86 | ||
| 91 | //echo "<pre>";print_r($excelarray); | ||
| 92 | |||
| 93 | for($i=1;$i<$highestrow;$i++) | 87 | for($i=1;$i<$highestrow;$i++) |
| 94 | { | 88 | { |
| 95 | if($excelarray[$i]["name"]!="" || $excelarray[$i]["name"]!="0" || $excelarray[$i]["name"]!=0 ) | 89 | if($excelarray[$i]["name"]!="" || $excelarray[$i]["name"]!="0" || $excelarray[$i]["name"]!=0 ) |
| ... | @@ -129,13 +123,21 @@ class CampaignController extends Controller { | ... | @@ -129,13 +123,21 @@ class CampaignController extends Controller { |
| 129 | $usercampaign->clients=$campaignList; | 123 | $usercampaign->clients=$campaignList; |
| 130 | $usercampaign->data=$data; | 124 | $usercampaign->data=$data; |
| 131 | $usercampaign->save(); | 125 | $usercampaign->save(); |
| 132 | } | 126 | }else{ |
| 133 | 127 | ||
| 128 | $discardedData[] = $excelarray[$i]["name"]; | ||
| 129 | |||
| 130 | } | ||
| 134 | 131 | ||
| 135 | } | 132 | } |
| 136 | } | 133 | } |
| 137 | } | 134 | } |
| 138 | 135 | ||
| 136 | // download discarded data | ||
| 137 | |||
| 138 | |||
| 139 | |||
| 140 | |||
| 139 | } | 141 | } |
| 140 | } | 142 | } |
| 141 | 143 | ||
| ... | @@ -237,41 +239,26 @@ class CampaignController extends Controller { | ... | @@ -237,41 +239,26 @@ class CampaignController extends Controller { |
| 237 | $gthis = new KHRMSLib(); | 239 | $gthis = new KHRMSLib(); |
| 238 | $campaign = Input::get("campaign"); | 240 | $campaign = Input::get("campaign"); |
| 239 | 241 | ||
| 240 | $mastersdata=$gthis->getCompanyMaster($campaign); | 242 | $dispositionPlans=DispositionPlan::where("status","=","active")->get(); |
| 241 | $disposition = array(); | ||
| 242 | if(empty($mastersdata['dialerDispoList']))$mastersdata['dialerDispoList']=$gthis->HRCoreVars['dialerDispoList']; | ||
| 243 | $dispoarr=explode("~",$mastersdata['dialerDispoList']); | ||
| 244 | foreach($dispoarr as $dispo) | ||
| 245 | { | ||
| 246 | if(!empty($dispo)) | ||
| 247 | { | ||
| 248 | $dispoprts=explode("|",$dispo); | ||
| 249 | if(sizeof($dispoprts)>=3) | ||
| 250 | { | ||
| 251 | $disposition[$dispoprts[1]] = $dispoprts[2]; | ||
| 252 | $dispositionCode[$dispoprts[1]] = $dispoprts[0]; | ||
| 253 | /*$data.="dialerdispoarray['$dispoprts[1]']='$dispoprts[2]'; | ||
| 254 | dispoClassArray['$dispoprts[0]']='$dispoprts[1]';";*/ | ||
| 255 | } | ||
| 256 | } | ||
| 257 | } | ||
| 258 | $data['disposition'] = $disposition; | ||
| 259 | $data['dispositionCode'] = $dispositionCode; | ||
| 260 | 243 | ||
| 244 | $data['dispositionPlans'] = $dispositionPlans; | ||
| 261 | 245 | ||
| 262 | $dispositionList=DB::table('hrms_masters')->select('*')->where('status','=','Active')->where("mkey","=",$campaign)->where("mtype","=",'coreconfig')->first(); | 246 | $data['selectedDispositionPlan'] = DB::table('campaign_disposition_plan') |
| 247 | ->join('disposition_plan', 'campaign_disposition_plan.dispo_plan_id', '=', 'disposition_plan.id') | ||
| 248 | ->select('disposition_plan.name as name ', 'disposition_plan.id as planid') | ||
| 249 | ->where("campaign","=",$campaign) | ||
| 250 | ->where("disposition_plan.status","active") | ||
| 251 | ->first(); | ||
| 263 | 252 | ||
| 264 | $dispolist=explode("~",$dispositionList->mvalue); | ||
| 265 | $dispositionList = array(); | ||
| 266 | foreach ($dispolist as $key => $dispo) { | ||
| 267 | if(!empty($dispo)) | ||
| 268 | { | ||
| 269 | $dispoprts=explode("|",$dispo); | ||
| 270 | $dispositionList[$dispoprts[1]]= $dispoprts[2]; | ||
| 271 | } | ||
| 272 | } | ||
| 273 | 253 | ||
| 274 | $data['dispositionList'] = $dispositionList; | 254 | $data['dispositionList'] = DB::table('campaign_disposition_plan') |
| 255 | ->join('disposition_plan_config', 'campaign_disposition_plan.dispo_plan_id', '=', 'disposition_plan_config.dispo_plan_id') | ||
| 256 | ->join('disposition_plan', 'disposition_plan.id', '=', 'disposition_plan_config.dispo_plan_id') | ||
| 257 | ->select('disposition_plan_config.disposition as disposition ', 'disposition_plan_config.sub_disposition as subDisposition') | ||
| 258 | ->where("campaign","=",$campaign) | ||
| 259 | ->where("disposition_plan.status","active") | ||
| 260 | ->get(); | ||
| 261 | |||
| 275 | //$campaign = Input::get("campaign"); | 262 | //$campaign = Input::get("campaign"); |
| 276 | if($campaign != ""){ | 263 | if($campaign != ""){ |
| 277 | //this condition for getting all campaign data | 264 | //this condition for getting all campaign data |
| ... | @@ -737,6 +724,80 @@ class CampaignController extends Controller { | ... | @@ -737,6 +724,80 @@ class CampaignController extends Controller { |
| 737 | 724 | ||
| 738 | if($id=="assigndisposition"){ | 725 | if($id=="assigndisposition"){ |
| 739 | $wakka = new KHRMSLib(); | 726 | $wakka = new KHRMSLib(); |
| 727 | $planId = Input::get('plan'); | ||
| 728 | $campaign = Input::get("selectCampaignField"); | ||
| 729 | |||
| 730 | $campaignDispositionPlan = DB::table('campaign_disposition_plan')->where('campaign','=', $campaign)->select('*'); | ||
| 731 | |||
| 732 | if($campaignDispositionPlan->count() > 0){ | ||
| 733 | DB::table('campaign_disposition_plan')->where('campaign','=', $campaign)->update(['dispo_plan_id' => $planId,'updated_at'=>date("Y-m-d H:i:s")]); | ||
| 734 | }else{ | ||
| 735 | DB::table('campaign_disposition_plan')->insert(['campaign'=>$campaign,'dispo_plan_id'=>$planId, 'created_at'=>date("Y-m-d H:i:s"),'updated_at'=>date("Y-m-d H:i:s")]); | ||
| 736 | } | ||
| 737 | |||
| 738 | $dispositionEntities = DispositionPlan::join('disposition_plan_config', 'disposition_plan.id', '=', 'disposition_plan_config.dispo_plan_id') | ||
| 739 | ->join('disposition', 'disposition.name', '=', 'disposition_plan_config.disposition') | ||
| 740 | ->select('disposition_plan.id as dispositionPlanId', 'disposition_plan.name as name','disposition_plan.status AS status','disposition.code AS code','disposition_plan_config.disposition as disposition','disposition_plan_config.sub_disposition as sub_disposition') | ||
| 741 | ->where('disposition_plan.id','=',$planId) | ||
| 742 | ->where('disposition.status','active') | ||
| 743 | ->get(); | ||
| 744 | |||
| 745 | if($dispositionEntities->count() > 0){ | ||
| 746 | $mvalue = ''; | ||
| 747 | foreach ($dispositionEntities as $key => $dispositionEntity) { | ||
| 748 | $code = $dispositionEntity->code; | ||
| 749 | $disposition = $dispositionEntity->disposition; | ||
| 750 | $subDisposition = $dispositionEntity->sub_disposition; | ||
| 751 | |||
| 752 | if(!empty($mvalue)){ | ||
| 753 | $mvalue = $mvalue."~$code|$disposition|$subDisposition"; | ||
| 754 | }else{ | ||
| 755 | $mvalue = "$code|$disposition|$subDisposition"; | ||
| 756 | } | ||
| 757 | } | ||
| 758 | |||
| 759 | $hrmsdata = DB::table('hrms_masters')->where('mkey','=', $campaign)->where('mtype','=', 'coreconfig')->select('*'); | ||
| 760 | if($hrmsdata->count() == 0){ | ||
| 761 | DB::table('hrms_masters')->insert(['mkey'=>$campaign, 'mtype'=>'coreconfig', 'mvalue'=>$mvalue,'status'=>'active']); | ||
| 762 | }else{ | ||
| 763 | $wakka->Query("update hrms_masters set mvalue='$mvalue' where mkey='$campaign' and mtype='coreconfig';"); | ||
| 764 | } | ||
| 765 | |||
| 766 | } | ||
| 767 | |||
| 768 | /*foreach ($plans as $key => $plan) { | ||
| 769 | $dispositionPlan = Disposition::join('sub_disposition', 'disposition.id', '=', 'sub_disposition.dispo_id') | ||
| 770 | ->select('disposition.id as dispoId', 'disposition.plan AS plan', 'disposition.name as disposition','disposition.code as code','disposition.status AS status', | ||
| 771 | DB::raw('count(*) as totalSubDispo, sub_disposition.id'), | ||
| 772 | DB::raw('GROUP_CONCAT(sub_disposition.name) as sunDispoName, sub_disposition.name')) | ||
| 773 | ->where("plan","=",$plan) | ||
| 774 | ->groupBy('sub_disposition.dispo_id') | ||
| 775 | ->get(); | ||
| 776 | |||
| 777 | if($dispositionPlan->count() > 0){ | ||
| 778 | $dispositionPlan = $dispositionPlan->first(); | ||
| 779 | $code = $dispositionPlan->code; | ||
| 780 | $disposition = $dispositionPlan->disposition; | ||
| 781 | $subDisposition = $dispositionPlan->sunDispoName; | ||
| 782 | |||
| 783 | $hrmsdata = DB::table('hrms_masters')->where('mkey','=', $campaign)->where('mtype','=', 'coreconfig')->select('*'); | ||
| 784 | if($hrmsdata->count() == 0){ | ||
| 785 | $mvalue = "$code|$disposition|$subDisposition"; | ||
| 786 | DB::table('hrms_masters')->insert(['mkey'=>$campaign, 'mtype'=>'coreconfig', 'mvalue'=>$mvalue,'status'=>'active']); | ||
| 787 | }else{ | ||
| 788 | $hrmsdata = $hrmsdata->first(); | ||
| 789 | if(!empty($hrmsdata->mvalue)){ | ||
| 790 | $mvalue .= $hrmsdata->mvalue."~$code|$disposition|$subDisposition"; | ||
| 791 | }else{ | ||
| 792 | $mvalue = "$code|$disposition|$subDisposition"; | ||
| 793 | } | ||
| 794 | $wakka->Query("update hrms_masters set mvalue='$mvalue' where mkey='$campaign' and mtype='coreconfig';"); | ||
| 795 | } | ||
| 796 | } | ||
| 797 | }*/ | ||
| 798 | |||
| 799 | |||
| 800 | /*$wakka = new KHRMSLib(); | ||
| 740 | $code = Input::get('code'); | 801 | $code = Input::get('code'); |
| 741 | $disposition = Input::get('disposition'); | 802 | $disposition = Input::get('disposition'); |
| 742 | $subDisposition = Input::get('subDisposition'); | 803 | $subDisposition = Input::get('subDisposition'); |
| ... | @@ -771,32 +832,33 @@ class CampaignController extends Controller { | ... | @@ -771,32 +832,33 @@ class CampaignController extends Controller { |
| 771 | $mvalue = "$code|$disposition|$subDisposition"; | 832 | $mvalue = "$code|$disposition|$subDisposition"; |
| 772 | } | 833 | } |
| 773 | $wakka->Query("update hrms_masters set mvalue='$mvalue' where mkey='$campaign' and mtype='coreconfig';"); | 834 | $wakka->Query("update hrms_masters set mvalue='$mvalue' where mkey='$campaign' and mtype='coreconfig';"); |
| 774 | } | 835 | }*/ |
| 775 | |||
| 776 | } | 836 | } |
| 777 | 837 | ||
| 778 | if($id == "sampleDataExcel"){ | 838 | if($id == "sampleDataExcel"){ |
| 779 | /*$objPHPExcel = new \PHPExcel(); | 839 | /*include_once(app_path().'/lib/phpexcel/PHPExcel.php'); |
| 780 | $objPHPExcel->getProperties() | 840 | $objPHPExcel = new \PHPExcel(); |
| 781 | ->setCreator("Temporaris") | ||
| 782 | ->setLastModifiedBy("Temporaris") | ||
| 783 | ->setTitle("Template Relevé des heures intérimaires") | ||
| 784 | ->setSubject("Template excel") | ||
| 785 | ->setDescription("Template excel permettant la création d'un ou plusieurs relevés d'heures") | ||
| 786 | ->setKeywords("Template excel"); | ||
| 787 | $objPHPExcel->setActiveSheetIndex(0); | 841 | $objPHPExcel->setActiveSheetIndex(0); |
| 788 | $objPHPExcel->getActiveSheet()->SetCellValue('A1', "12"); | 842 | $objPHPExcel->getActiveSheet()->SetCellValue('A1', "campaign"); |
| 843 | $objPHPExcel->getActiveSheet()->SetCellValue('A2', "C1"); | ||
| 844 | $objPHPExcel->getActiveSheet()->SetCellValue('A3', "C1"); | ||
| 845 | $objPHPExcel->getActiveSheet()->SetCellValue('A4', "C2"); | ||
| 846 | $objPHPExcel->getActiveSheet()->SetCellValue('A5', "C2"); | ||
| 847 | $objPHPExcel->getActiveSheet()->SetCellValue('B1', "name"); | ||
| 848 | $objPHPExcel->getActiveSheet()->SetCellValue('B2', "U1"); | ||
| 849 | $objPHPExcel->getActiveSheet()->SetCellValue('B3', "U2"); | ||
| 850 | $objPHPExcel->getActiveSheet()->SetCellValue('B4', "U1"); | ||
| 851 | $objPHPExcel->getActiveSheet()->SetCellValue('B5', "U3"); | ||
| 789 | 852 | ||
| 790 | $writer = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); | 853 | $writer = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); |
| 791 | header('Content-Type: application/vnd.ms-excel'); | 854 | header('Content-Type: application/vnd.ms-excel'); |
| 792 | header('Content-Disposition: attachment;filename="excel.xls"'); | 855 | header('Content-Disposition: attachment;filename="campaignUserMappingExcelFormat.xls"'); |
| 793 | header('Cache-Control: max-age=0'); | 856 | header('Cache-Control: max-age=0'); |
| 794 | 857 | ||
| 795 | $writer->save('php://output'); | 858 | $writer->save('php://output');*/ |
| 796 | |||
| 797 | return ;*/ | ||
| 798 | 859 | ||
| 799 | return view("layout.module.campaign.sampleDataExcel"); | 860 | $filepath = "assets/extras/campaignUserMappingFormat.xls"; |
| 861 | return Response::download($filepath); | ||
| 800 | } | 862 | } |
| 801 | 863 | ||
| 802 | return; | 864 | return; | ... | ... |
| 1 | <?php namespace App\Http\Controllers; | ||
| 2 | |||
| 3 | use Auth; | ||
| 4 | use Input; | ||
| 5 | use Config; | ||
| 6 | use Session; | ||
| 7 | use DB; | ||
| 8 | use App\Services\FormBuilder; | ||
| 9 | use Illuminate\Http\Request; | ||
| 10 | use Response; | ||
| 11 | use App\Models\Disposition; | ||
| 12 | use App\Models\SubDisposition; | ||
| 13 | |||
| 14 | class DispositionController extends Controller { | ||
| 15 | |||
| 16 | |||
| 17 | public function __construct() | ||
| 18 | { | ||
| 19 | $this->middleware('auth'); | ||
| 20 | $this->middleware('module_access'); | ||
| 21 | } | ||
| 22 | |||
| 23 | public function index() | ||
| 24 | { | ||
| 25 | $data['dispositions']= Disposition::join('sub_disposition', 'disposition.id', '=', 'sub_disposition.dispo_id') | ||
| 26 | ->select('disposition.id as dispoId', 'disposition.name as disposition','disposition.code as code','disposition.status AS status', | ||
| 27 | DB::raw('count(*) as totalSubDispo, sub_disposition.id'), | ||
| 28 | DB::raw('GROUP_CONCAT(sub_disposition.name) as sunDispoName, sub_disposition.name')) | ||
| 29 | ->groupBy('sub_disposition.dispo_id') | ||
| 30 | ->get(); | ||
| 31 | |||
| 32 | return view("layout.module.disposition.index", $data); | ||
| 33 | } | ||
| 34 | public function create() | ||
| 35 | { | ||
| 36 | return view('layout.module.disposition.create'); | ||
| 37 | } | ||
| 38 | public function store(Request $request) | ||
| 39 | { | ||
| 40 | $action = Input::get("action"); | ||
| 41 | |||
| 42 | if($action == 'isExists'){ | ||
| 43 | $disposition = Input::get("disposition"); | ||
| 44 | $code = Input::get("code"); | ||
| 45 | $exists=Disposition::where("name","=",$disposition)->orwhere("code","=",$code)->first(); | ||
| 46 | if($exists){ | ||
| 47 | $dispositionId = Input::get("dispoId"); | ||
| 48 | if($dispositionId == $exists->id){ | ||
| 49 | return "false"; | ||
| 50 | } | ||
| 51 | return "true"; | ||
| 52 | }else{ | ||
| 53 | return "false"; | ||
| 54 | } | ||
| 55 | } | ||
| 56 | |||
| 57 | if($action == 'createDisposition'){ | ||
| 58 | $code = Input::get("code"); | ||
| 59 | $disposition = Input::get("disposition"); | ||
| 60 | $subDisposition = Input::get("subDisposition"); | ||
| 61 | $status = Input::get("status"); | ||
| 62 | |||
| 63 | $disposition = Disposition::create([ | ||
| 64 | 'code' => $code, | ||
| 65 | 'name' => $disposition, | ||
| 66 | 'status' => $status, | ||
| 67 | 'created_at' => date("Y-m-d H:i:s"), | ||
| 68 | 'updated_at' => date("Y-m-d H:i:s") | ||
| 69 | ]); | ||
| 70 | |||
| 71 | $dispoId = $disposition->id; | ||
| 72 | |||
| 73 | foreach ($subDisposition as $key => $value) { | ||
| 74 | $subDisposition = SubDisposition::create([ | ||
| 75 | 'dispo_id' => $dispoId, | ||
| 76 | 'name' => $value, | ||
| 77 | 'created_at' => date("Y-m-d H:i:s"), | ||
| 78 | 'updated_at' => date("Y-m-d H:i:s") | ||
| 79 | ]); | ||
| 80 | } | ||
| 81 | return; | ||
| 82 | |||
| 83 | } | ||
| 84 | |||
| 85 | if($action == 'updateDisposition'){ | ||
| 86 | $dispoId = Input::get("dispoId"); | ||
| 87 | $code = Input::get("code"); | ||
| 88 | $disposition = Input::get("disposition"); | ||
| 89 | $subDisposition = Input::get("subDisposition"); | ||
| 90 | $status = Input::get("status"); | ||
| 91 | |||
| 92 | Disposition::where('id', $dispoId) | ||
| 93 | ->update([ | ||
| 94 | 'code' => $code, | ||
| 95 | 'name' => $disposition, | ||
| 96 | 'status' => $status]); | ||
| 97 | |||
| 98 | SubDisposition::where('dispo_id', $dispoId)->delete(); | ||
| 99 | |||
| 100 | foreach ($subDisposition as $key => $value) { | ||
| 101 | $subDisposition = SubDisposition::create([ | ||
| 102 | 'dispo_id' => $dispoId, | ||
| 103 | 'name' => $value, | ||
| 104 | 'created_at' => date("Y-m-d H:i:s"), | ||
| 105 | 'updated_at' => date("Y-m-d H:i:s") | ||
| 106 | ]); | ||
| 107 | } | ||
| 108 | return; | ||
| 109 | |||
| 110 | } | ||
| 111 | } | ||
| 112 | public function show($id) | ||
| 113 | { | ||
| 114 | |||
| 115 | } | ||
| 116 | public function edit($id) | ||
| 117 | { | ||
| 118 | $data['disposition']= Disposition::join('sub_disposition', 'disposition.id', '=', 'sub_disposition.dispo_id') | ||
| 119 | ->select('disposition.id AS dispoId', 'disposition.name as disposition','disposition.code as code','disposition.status AS status', | ||
| 120 | DB::raw('count(*) as totalSubDispo, sub_disposition.id'), | ||
| 121 | DB::raw('GROUP_CONCAT(sub_disposition.name) as sunDispoName, sub_disposition.name')) | ||
| 122 | ->groupBy('sub_disposition.dispo_id') | ||
| 123 | ->where('disposition.id','=',$id) | ||
| 124 | ->get()->first(); | ||
| 125 | |||
| 126 | return view('layout.module.disposition.edit',$data); | ||
| 127 | } | ||
| 128 | public function update($id) | ||
| 129 | { | ||
| 130 | |||
| 131 | } | ||
| 132 | public function destroy($id) | ||
| 133 | { | ||
| 134 | } | ||
| 135 | public function dashboard() | ||
| 136 | { | ||
| 137 | } | ||
| 138 | } |
| 1 | <?php namespace App\Http\Controllers; | ||
| 2 | |||
| 3 | use Auth; | ||
| 4 | use Input; | ||
| 5 | use Config; | ||
| 6 | use Session; | ||
| 7 | use DB; | ||
| 8 | use App\Services\FormBuilder; | ||
| 9 | use Illuminate\Http\Request; | ||
| 10 | use Response; | ||
| 11 | use App\Models\Disposition; | ||
| 12 | use App\Models\SubDisposition; | ||
| 13 | use App\Models\DispositionPlan; | ||
| 14 | use App\Models\DispositionPlanConfig; | ||
| 15 | |||
| 16 | class DispositionPlanController extends Controller { | ||
| 17 | |||
| 18 | |||
| 19 | public function __construct() | ||
| 20 | { | ||
| 21 | $this->middleware('auth'); | ||
| 22 | $this->middleware('module_access'); | ||
| 23 | } | ||
| 24 | |||
| 25 | public function index() | ||
| 26 | { | ||
| 27 | $data['dispositionPlan']= DispositionPlan::leftjoin('disposition_plan_config', 'disposition_plan.id', '=', 'disposition_plan_config.dispo_plan_id') | ||
| 28 | ->select('disposition_plan.id as dispositionPlanId', 'disposition_plan.name as name','disposition_plan.status AS status', | ||
| 29 | DB::raw('count(*) as totalDisposition, disposition_plan_config.id'), | ||
| 30 | DB::raw('GROUP_CONCAT(disposition_plan_config.disposition) as disposition, disposition_plan_config.disposition')) | ||
| 31 | ->groupBy('disposition_plan_config.dispo_plan_id') | ||
| 32 | //->where('status','active') | ||
| 33 | ->get(); | ||
| 34 | |||
| 35 | return view("layout.module.dispositionplan.index", $data); | ||
| 36 | } | ||
| 37 | public function create() | ||
| 38 | { | ||
| 39 | $data['dispositionEntities'] = Disposition::join('sub_disposition', 'disposition.id', '=', 'sub_disposition.dispo_id') | ||
| 40 | ->select('disposition.id as dispoId', 'disposition.name as disposition','disposition.code as code','disposition.status AS status', | ||
| 41 | DB::raw('count(*) as totalSubDispo, sub_disposition.id'), | ||
| 42 | DB::raw('GROUP_CONCAT(sub_disposition.name) as sunDispoName, sub_disposition.name')) | ||
| 43 | ->groupBy('sub_disposition.dispo_id') | ||
| 44 | ->where('status','active') | ||
| 45 | ->get(); | ||
| 46 | |||
| 47 | return view('layout.module.dispositionplan.create', $data); | ||
| 48 | } | ||
| 49 | public function store(Request $request) | ||
| 50 | { | ||
| 51 | $action = Input::get("action"); | ||
| 52 | |||
| 53 | if($action == 'isExists'){ | ||
| 54 | $plan = Input::get("plan"); | ||
| 55 | $exists=DispositionPlan::where("name","=",$plan)->first(); | ||
| 56 | |||
| 57 | if($exists){ | ||
| 58 | $planId = Input::get("dispositionPlanId"); | ||
| 59 | if($planId == $exists->id){ | ||
| 60 | return "false"; | ||
| 61 | } | ||
| 62 | return "true"; | ||
| 63 | }else{ | ||
| 64 | return "false"; | ||
| 65 | } | ||
| 66 | } | ||
| 67 | |||
| 68 | if($action == 'createDispositionPlan'){ | ||
| 69 | $plan = Input::get("plan"); | ||
| 70 | $dispositionList = Input::get("disposition"); | ||
| 71 | $subDisposition = Input::get("subDisposition"); | ||
| 72 | $status = Input::get("status"); | ||
| 73 | |||
| 74 | $dispositionPlan = DispositionPlan::create([ | ||
| 75 | 'name' => $plan, | ||
| 76 | 'status' => $status, | ||
| 77 | 'created_at' => date("Y-m-d H:i:s"), | ||
| 78 | 'updated_at' => date("Y-m-d H:i:s") | ||
| 79 | ]); | ||
| 80 | |||
| 81 | foreach ($dispositionList as $key => $disposition) { | ||
| 82 | $dispositionPlanConfig = DispositionPlanConfig::create([ | ||
| 83 | 'dispo_plan_id' => $dispositionPlan->id, | ||
| 84 | 'disposition' => $disposition, | ||
| 85 | 'sub_disposition' => implode(",", $subDisposition[$key]), | ||
| 86 | 'created_at' => date("Y-m-d H:i:s"), | ||
| 87 | 'updated_at' => date("Y-m-d H:i:s") | ||
| 88 | ]); | ||
| 89 | } | ||
| 90 | return; | ||
| 91 | } | ||
| 92 | |||
| 93 | if($action == 'updateDispositionPlan'){ | ||
| 94 | $dispositionPlanId = Input::get("dispositionPlanId"); | ||
| 95 | $plan = Input::get("plan"); | ||
| 96 | $dispositionList = Input::get("disposition"); | ||
| 97 | $subDisposition = Input::get("subDisposition"); | ||
| 98 | $status = Input::get("status"); | ||
| 99 | |||
| 100 | DispositionPlan::where('id', $dispositionPlanId) | ||
| 101 | ->update(['name' => $plan, | ||
| 102 | 'status' => $status, | ||
| 103 | 'updated_at' => date("Y-m-d H:i:s") | ||
| 104 | ]); | ||
| 105 | |||
| 106 | DispositionPlanConfig::where('dispo_plan_id', $dispositionPlanId)->delete(); | ||
| 107 | |||
| 108 | foreach ($dispositionList as $key => $disposition) { | ||
| 109 | $dispositionPlanConfig = DispositionPlanConfig::create([ | ||
| 110 | 'dispo_plan_id' => $dispositionPlanId, | ||
| 111 | 'disposition' => $disposition, | ||
| 112 | 'sub_disposition' => implode(",", $subDisposition[$key]), | ||
| 113 | 'created_at' => date("Y-m-d H:i:s"), | ||
| 114 | 'updated_at' => date("Y-m-d H:i:s") | ||
| 115 | ]); | ||
| 116 | } | ||
| 117 | return; | ||
| 118 | } | ||
| 119 | } | ||
| 120 | public function show($id) | ||
| 121 | { | ||
| 122 | |||
| 123 | } | ||
| 124 | public function edit($id) | ||
| 125 | { | ||
| 126 | $data['dispositionEntities'] = Disposition::join('sub_disposition', 'disposition.id', '=', 'sub_disposition.dispo_id') | ||
| 127 | ->select('disposition.id as dispoId', 'disposition.name as disposition','disposition.code as code','disposition.status AS status', | ||
| 128 | DB::raw('count(*) as totalSubDispo, sub_disposition.id'), | ||
| 129 | DB::raw('GROUP_CONCAT(sub_disposition.name) as sunDispoName, sub_disposition.name')) | ||
| 130 | ->groupBy('sub_disposition.dispo_id') | ||
| 131 | ->where('status','active') | ||
| 132 | ->get(); | ||
| 133 | |||
| 134 | $data['dispositionPlan']= DispositionPlan::join('disposition_plan_config', 'disposition_plan.id', '=', 'disposition_plan_config.dispo_plan_id') | ||
| 135 | ->select('disposition_plan.id as dispositionPlanId', 'disposition_plan.name as name','disposition_plan.status AS status','disposition_plan_config.disposition as disposition','disposition_plan_config.sub_disposition as sub_disposition') | ||
| 136 | ->where('disposition_plan.id','=',$id) | ||
| 137 | ->get(); | ||
| 138 | |||
| 139 | |||
| 140 | return view('layout.module.dispositionplan.edit',$data); | ||
| 141 | } | ||
| 142 | public function update($id) | ||
| 143 | { | ||
| 144 | |||
| 145 | } | ||
| 146 | public function destroy($id) | ||
| 147 | { | ||
| 148 | } | ||
| 149 | public function dashboard() | ||
| 150 | { | ||
| 151 | } | ||
| 152 | } |
| ... | @@ -41,6 +41,8 @@ Route::group(['middleware' => ['web']], function () { | ... | @@ -41,6 +41,8 @@ Route::group(['middleware' => ['web']], function () { |
| 41 | Route::resource('user','UserController'); | 41 | Route::resource('user','UserController'); |
| 42 | Route::resource('group','GroupController'); | 42 | Route::resource('group','GroupController'); |
| 43 | Route::resource('role','RoleController'); | 43 | Route::resource('role','RoleController'); |
| 44 | Route::resource('dispositionPlan','DispositionPlanController'); | ||
| 45 | Route::resource('disposition','DispositionController'); | ||
| 44 | 46 | ||
| 45 | Route::resource('master','MasterController'); | 47 | Route::resource('master','MasterController'); |
| 46 | Route::resource('admin','AdminController'); | 48 | Route::resource('admin','AdminController'); | ... | ... |
| ... | @@ -818,20 +818,69 @@ $data.="</fieldset></div> | ... | @@ -818,20 +818,69 @@ $data.="</fieldset></div> |
| 818 | var dialerdispoarray={};var dispoClassArray={}; | 818 | var dialerdispoarray={};var dispoClassArray={}; |
| 819 | dialerdispoarray['']='';\n"; | 819 | dialerdispoarray['']='';\n"; |
| 820 | 820 | ||
| 821 | $mastersdata=$gthis->getDispocampaignData($dataarr[client]); | 821 | // to get client corconfig |
| 822 | //$dispoarr=explode("~",$mastersdata['mvalue']); | 822 | /*$mastersdata= $gthis->getDispocampaignData($dataarr['client']); |
| 823 | $dispoarr = []; | ||
| 823 | 824 | ||
| 824 | if(empty($mastersdata)) | 825 | if(empty($mastersdata)) |
| 825 | { | 826 | { |
| 827 | // if client company is empty get data from campaign company | ||
| 826 | $mastersdata=$gthis->getCompanyMaster($client); | 828 | $mastersdata=$gthis->getCompanyMaster($client); |
| 827 | if(empty($mastersdata['dialerDispoList']))$mastersdata['dialerDispoList']=$gthis->HRCoreVars['dialerDispoList']; | ||
| 828 | 829 | ||
| 830 | /* commented above code : now get data from dispostion table | ||
| 831 | if(empty($mastersdata['dialerDispoList'])){ | ||
| 832 | $mastersdata['dialerDispoList']=$gthis->HRCoreVars['dialerDispoList']; | ||
| 833 | }* | ||
| 834 | if(!empty($mastersdata['dialerDispoList'])){ | ||
| 829 | $dispoarr=explode("~",$mastersdata['dialerDispoList']); | 835 | $dispoarr=explode("~",$mastersdata['dialerDispoList']); |
| 836 | } | ||
| 830 | }else{ | 837 | }else{ |
| 831 | $dispoarr=explode("~",$mastersdata['mvalue']); | 838 | $dispoarr=explode("~",$mastersdata['mvalue']); |
| 832 | } | 839 | } |
| 833 | 840 | ||
| 841 | if(count($dispoarr) > 0){ | ||
| 842 | foreach($dispoarr as $dispo) | ||
| 843 | { | ||
| 844 | if(!empty($dispo)) | ||
| 845 | { | ||
| 846 | $dispoprts=explode("|",$dispo); | ||
| 847 | if(sizeof($dispoprts)>=3) | ||
| 848 | { | ||
| 849 | $data.="dialerdispoarray['$dispoprts[1]']='$dispoprts[2]';dispoClassArray['$dispoprts[0]']='$dispoprts[1]';"; | ||
| 850 | } | ||
| 851 | } | ||
| 852 | } | ||
| 853 | }else{ | ||
| 854 | // get disposition from disposition table | ||
| 855 | $dispositionPlan = $gthis->getDispositionList(); | ||
| 856 | foreach ($dispositionPlan as $key => $value) { | ||
| 857 | $disposition = $value->disposition; | ||
| 858 | $subDisposition = $value->sunDispoName; | ||
| 859 | $data.="dialerdispoarray['$disposition']='$subDisposition';"; | ||
| 860 | } | ||
| 861 | }*/ | ||
| 862 | |||
| 863 | $mastersdata = DB::table('campaign_disposition_plan') | ||
| 864 | ->join('disposition_plan_config', 'campaign_disposition_plan.dispo_plan_id', '=', 'disposition_plan_config.dispo_plan_id') | ||
| 865 | ->join('disposition_plan', 'disposition_plan.id', '=', 'disposition_plan_config.dispo_plan_id') | ||
| 866 | ->select('disposition_plan_config.disposition as disposition ', 'disposition_plan_config.sub_disposition as subDisposition') | ||
| 867 | ->where("campaign","=",$dataarr['client']) | ||
| 868 | ->where("disposition_plan.status","active") | ||
| 869 | ->get(); | ||
| 870 | |||
| 871 | if($mastersdata->count() > 0){ | ||
| 834 | 872 | ||
| 873 | foreach ($mastersdata as $key => $value) { | ||
| 874 | $disposition = $value->disposition; | ||
| 875 | $subDisposition = $value->subDisposition; | ||
| 876 | $data.="dialerdispoarray['$disposition']='$subDisposition';"; | ||
| 877 | } | ||
| 878 | |||
| 879 | }else{ | ||
| 880 | // if client company is empty get data from campaign company | ||
| 881 | $mastersdata=$gthis->getCompanyMaster($client); | ||
| 882 | if(!empty($mastersdata['dialerDispoList'])){ | ||
| 883 | $dispoarr=explode("~",$mastersdata['dialerDispoList']); | ||
| 835 | foreach($dispoarr as $dispo) | 884 | foreach($dispoarr as $dispo) |
| 836 | { | 885 | { |
| 837 | if(!empty($dispo)) | 886 | if(!empty($dispo)) |
| ... | @@ -843,6 +892,16 @@ $data.="</fieldset></div> | ... | @@ -843,6 +892,16 @@ $data.="</fieldset></div> |
| 843 | } | 892 | } |
| 844 | } | 893 | } |
| 845 | } | 894 | } |
| 895 | }else{ | ||
| 896 | // get disposition from disposition table | ||
| 897 | $dispositionPlan = $gthis->getDispositionList(); | ||
| 898 | foreach ($dispositionPlan as $key => $value) { | ||
| 899 | $disposition = $value->disposition; | ||
| 900 | $subDisposition = $value->sunDispoName; | ||
| 901 | $data.="dialerdispoarray['$disposition']='$subDisposition';"; | ||
| 902 | } | ||
| 903 | } | ||
| 904 | } | ||
| 846 | 905 | ||
| 847 | $data.=" | 906 | $data.=" |
| 848 | 907 | ... | ... |
| ... | @@ -1398,6 +1398,21 @@ function popMail($userid) | ... | @@ -1398,6 +1398,21 @@ function popMail($userid) |
| 1398 | //print_r($company); | 1398 | //print_r($company); |
| 1399 | return $companyar; | 1399 | return $companyar; |
| 1400 | } | 1400 | } |
| 1401 | |||
| 1402 | function getDispositionList(){ | ||
| 1403 | |||
| 1404 | $dispositionPlan = DB::table('disposition')->join('sub_disposition', 'disposition.id', '=', 'sub_disposition.dispo_id') | ||
| 1405 | ->select('disposition.id as dispoId', 'disposition.name as disposition','disposition.code as code','disposition.status AS status', | ||
| 1406 | DB::raw('count(*) as totalSubDispo, sub_disposition.id'), | ||
| 1407 | DB::raw('GROUP_CONCAT(sub_disposition.name) as sunDispoName, sub_disposition.name')) | ||
| 1408 | ->groupBy('sub_disposition.dispo_id') | ||
| 1409 | ->where('status','active') | ||
| 1410 | ->get(); | ||
| 1411 | |||
| 1412 | return $dispositionPlan; | ||
| 1413 | |||
| 1414 | } | ||
| 1415 | |||
| 1401 | function getEmailListforClient($tclient) | 1416 | function getEmailListforClient($tclient) |
| 1402 | { | 1417 | { |
| 1403 | $unameslist=array(); | 1418 | $unameslist=array(); | ... | ... |
application/app/Models/Disposition.php
0 → 100644
application/app/Models/DispositionPlan.php
0 → 100644
application/app/Models/SubDisposition.php
0 → 100644
| ... | @@ -113,6 +113,8 @@ return [ | ... | @@ -113,6 +113,8 @@ return [ |
| 113 | "submenu"=>["Campaign Management"=>["menuAction('campaign');"], | 113 | "submenu"=>["Campaign Management"=>["menuAction('campaign');"], |
| 114 | "Bulk Upload"=>["menuAction('campaign/bulkupload');"], | 114 | "Bulk Upload"=>["menuAction('campaign/bulkupload');"], |
| 115 | ]], | 115 | ]], |
| 116 | "dispositionPlan" => ["disp"=>"Disposition Plan","icon"=>"globe","dash"=>"","onclick"=>"menuAction('dispositionPlan');"], | ||
| 117 | "disposition" => ["disp"=>"Disposition List","icon"=>"globe","dash"=>"","onclick"=>"menuAction('disposition');"], | ||
| 116 | "Admin" => ["disp"=>"Admin","icon"=>"gear","dash"=>"", | 118 | "Admin" => ["disp"=>"Admin","icon"=>"gear","dash"=>"", |
| 117 | "submenu"=>["Masters"=>["showBlock('Masters');"], | 119 | "submenu"=>["Masters"=>["showBlock('Masters');"], |
| 118 | "Delete Record"=>["showBlock('DeletePerson');"], | 120 | "Delete Record"=>["showBlock('DeletePerson');"], | ... | ... |
| ... | @@ -237,6 +237,9 @@ hr.separator.top { | ... | @@ -237,6 +237,9 @@ hr.separator.top { |
| 237 | hr.separator.bottom { | 237 | hr.separator.bottom { |
| 238 | margin: 0 0 5px; | 238 | margin: 0 0 5px; |
| 239 | } | 239 | } |
| 240 | .tmar{ | ||
| 241 | margin-top: 10px; | ||
| 242 | } | ||
| 240 | @media print { | 243 | @media print { |
| 241 | html, body { | 244 | html, body { |
| 242 | height: auto !important; | 245 | height: auto !important; | ... | ... |
No preview for this file type
| ... | @@ -23,8 +23,8 @@ | ... | @@ -23,8 +23,8 @@ |
| 23 | <input type="submit" name="upload" id="upload" class="btn btn-primary" value="Upload"> | 23 | <input type="submit" name="upload" id="upload" class="btn btn-primary" value="Upload"> |
| 24 | 24 | ||
| 25 | </div> | 25 | </div> |
| 26 | <div class="col-md-2"> | 26 | <div class="col-md-3"> |
| 27 | <!--- <span><a href="javascript:void(0)" id="downloadExcel">Sample excel format</a></span>---> | 27 | <span><a href="javascript:void(0)" id="downloadExcel">Sample excel format</a></span> |
| 28 | </div> | 28 | </div> |
| 29 | </form> | 29 | </form> |
| 30 | </div> | 30 | </div> |
| ... | @@ -69,8 +69,7 @@ $(document).ready(function(){ | ... | @@ -69,8 +69,7 @@ $(document).ready(function(){ |
| 69 | }); | 69 | }); |
| 70 | 70 | ||
| 71 | $('#downloadExcel').click(function(){ | 71 | $('#downloadExcel').click(function(){ |
| 72 | event.preventDefault(); | 72 | window.open('campaign/sampleDataExcel'); |
| 73 | doAjax("campaign/sampleDataExcel","","","","","GET"); | ||
| 74 | return false; | 73 | return false; |
| 75 | }); | 74 | }); |
| 76 | }); | 75 | }); | ... | ... |
application/resources/views/layout/module/campaign/campaignAssignToDisposition.blade-bk.php
0 → 100755
| 1 | <style> | ||
| 2 | .list-group{ | ||
| 3 | padding: 5px; | ||
| 4 | margin: 0px; | ||
| 5 | overflow:auto; | ||
| 6 | width:100% | ||
| 7 | } | ||
| 8 | </style> | ||
| 9 | <div class="row"> | ||
| 10 | <div class="col-md-12"> | ||
| 11 | <div class="panel panel-info"> | ||
| 12 | <div class="panel-body"> | ||
| 13 | <div class="row" style="margin: 5px"> | ||
| 14 | <div class="col-md-2"> | ||
| 15 | <label>Select Disposition:</label> | ||
| 16 | </div> | ||
| 17 | <div class="col-md-6"> | ||
| 18 | <select id="disposition" class="form-control" onchange='subDisposition($(this).val());'> | ||
| 19 | <option value></option> | ||
| 20 | <?php if(isset($disposition)) | ||
| 21 | foreach($disposition as $kay => $val) | ||
| 22 | { | ||
| 23 | $code = $dispositionCode[$kay]; | ||
| 24 | echo "<option data-id='$code' data-text='$kay' value='$val'>$kay</option>"; | ||
| 25 | } ?> | ||
| 26 | </select> | ||
| 27 | |||
| 28 | </div> | ||
| 29 | </div> | ||
| 30 | <div class="row" style="margin: 5px"> | ||
| 31 | <div class="col-md-2"> | ||
| 32 | <label>Select Sub Disposition:</label> | ||
| 33 | </div> | ||
| 34 | <div class="col-md-6"> | ||
| 35 | <select id="subDisposition" class="select2multi" style='width:100%' multiple=""> | ||
| 36 | </select> | ||
| 37 | </select> | ||
| 38 | </div> | ||
| 39 | </div> | ||
| 40 | <div class="row"> | ||
| 41 | <div class="col-md-2"> | ||
| 42 | <button id="assigndesposition" class="btn btn-xs btn-info">Assign Disposition | ||
| 43 | </button> | ||
| 44 | </div> | ||
| 45 | <div class="col-md-8" id="error"> | ||
| 46 | </div> | ||
| 47 | </div> | ||
| 48 | |||
| 49 | </div> | ||
| 50 | </div> | ||
| 51 | </div> | ||
| 52 | |||
| 53 | <div class="col-sm-12"> | ||
| 54 | <div class="panel panel-info"> | ||
| 55 | <div class="panel-heading"><strong>Disposition List</strong></div> | ||
| 56 | <div class="panel-body" id=""> | ||
| 57 | <ul class="list-group"> | ||
| 58 | <?php foreach($dispositionList as $key => $val) { if(!empty($val)){ ?> | ||
| 59 | <li class="list-group-item list-group"> | ||
| 60 | <div class="col-sm-12"> | ||
| 61 | <div class="col-sm-3"><label><?php echo $key; ?></label></div> | ||
| 62 | <div class="col-sm-6"> | ||
| 63 | <?php $count = 0; | ||
| 64 | $subDisposition = explode(",", $val); | ||
| 65 | if(count($subDisposition) > 0){ | ||
| 66 | foreach ($subDisposition as $key => $value) { | ||
| 67 | if(!empty($value)){ | ||
| 68 | $count++; | ||
| 69 | echo "$count. ".$value. "<br>"; | ||
| 70 | } | ||
| 71 | } | ||
| 72 | } | ||
| 73 | ?> | ||
| 74 | </div> | ||
| 75 | <div class="col-sm-2"><a class="innerAll" href="#" onclick="deleteDesposition('<?php echo $key; ?>');"> | ||
| 76 | <span class="btn btn-primary btn-xs"><i class="fa fa-trash-o"></i></span> | ||
| 77 | </a></div> | ||
| 78 | </div> | ||
| 79 | |||
| 80 | </li> | ||
| 81 | <?php }} ?> | ||
| 82 | </ul> | ||
| 83 | </div> | ||
| 84 | </div> | ||
| 85 | </div> | ||
| 86 | |||
| 87 | </div> | ||
| 88 | |||
| 89 | <script> | ||
| 90 | function subDisposition(dispo) | ||
| 91 | { | ||
| 92 | var dispolist = dispo.split(','); | ||
| 93 | /*var dispolist = []; | ||
| 94 | |||
| 95 | $.each( dispo, function( index, value ){ | ||
| 96 | dispolist = $.merge( dispolist, value.split(',') ); | ||
| 97 | });*/ | ||
| 98 | |||
| 99 | $("#subDisposition").select2("val", "Select"); | ||
| 100 | updateJSSelect('subDisposition',dispolist); | ||
| 101 | } | ||
| 102 | |||
| 103 | function deleteDesposition(key) | ||
| 104 | { | ||
| 105 | if (window.confirm('Are sure you want to delete disposition?')) | ||
| 106 | { | ||
| 107 | |||
| 108 | var selectCampaignField = $('#selectCampaignField').val(); | ||
| 109 | var postdata='disposition='+key; | ||
| 110 | postdata+='&selectCampaignField='+selectCampaignField; | ||
| 111 | |||
| 112 | doAjax("campaign/deleteAssignDisposition",postdata,"campaignDetailsArea","","","GET",function(retrstr){ | ||
| 113 | simpleNotification('Success','topRight',"Campaign assign suceesfully!"); | ||
| 114 | doAjax("campaign/show","campaign="+selectCampaignField,"campaignDetailsArea","","","GET",function(retrstr){ | ||
| 115 | $("#subDisposition").select2("val", "Select"); | ||
| 116 | $('.nav-tabs a[href="#disposition"]').tab('show'); | ||
| 117 | }); | ||
| 118 | |||
| 119 | }); | ||
| 120 | }else{ | ||
| 121 | return false; | ||
| 122 | } | ||
| 123 | } | ||
| 124 | |||
| 125 | $('#assigndesposition').click(function() | ||
| 126 | { | ||
| 127 | $("#error").html(''); | ||
| 128 | var code = $('#disposition').find(':selected').attr('data-id') | ||
| 129 | //var disposition = $("#disposition option:selected").text(); | ||
| 130 | var disposition = $('#disposition').find(':selected').attr('data-text') | ||
| 131 | var subDisposition = $('#subDisposition').val(); | ||
| 132 | var selectCampaignField = $('#selectCampaignField').val(); | ||
| 133 | //alert(selectCampaignField); | ||
| 134 | |||
| 135 | if(disposition&&selectCampaignField) | ||
| 136 | { | ||
| 137 | var postdata='disposition='+disposition; | ||
| 138 | postdata+='&code='+code; | ||
| 139 | postdata+='&disposition='+disposition; | ||
| 140 | postdata+='&subDisposition='+subDisposition; | ||
| 141 | postdata+='&selectCampaignField='+selectCampaignField; | ||
| 142 | doAjax("campaign/assigndisposition",postdata,"campaignDetailsArea","","","GET",function(retrstr){ | ||
| 143 | simpleNotification('Success','topRight',"Campaign assign suceesfully!"); | ||
| 144 | doAjax("campaign/show","campaign="+selectCampaignField,"campaignDetailsArea","","","GET",function(retrstr){ | ||
| 145 | $("#subDisposition").select2("val", "Select"); | ||
| 146 | $('.nav-tabs a[href="#disposition"]').tab('show'); | ||
| 147 | }); | ||
| 148 | |||
| 149 | }); | ||
| 150 | } | ||
| 151 | else | ||
| 152 | { | ||
| 153 | $("#error").html('<p class="text-danger text-center">Please select the campaign and disposition.</p>'); | ||
| 154 | return false; | ||
| 155 | } | ||
| 156 | }); | ||
| 157 | |||
| 158 | </script> |
| ... | @@ -10,33 +10,26 @@ width:100% | ... | @@ -10,33 +10,26 @@ width:100% |
| 10 | <div class="col-md-12"> | 10 | <div class="col-md-12"> |
| 11 | <div class="panel panel-info"> | 11 | <div class="panel panel-info"> |
| 12 | <div class="panel-body"> | 12 | <div class="panel-body"> |
| 13 | <?php //echo "<pre>";print_r($selectedDispositionPlan); ?> | ||
| 13 | <div class="row" style="margin: 5px"> | 14 | <div class="row" style="margin: 5px"> |
| 14 | <div class="col-md-2"> | 15 | <div class="col-md-2"> |
| 15 | <label>Select Disposition:</label> | 16 | <label>Select Disposition Plan:</label> |
| 16 | </div> | 17 | </div> |
| 17 | <div class="col-md-6"> | 18 | <div class="col-md-6"> |
| 18 | <select id="disposition" class="form-control" onchange='subDisposition($(this).val());'> | 19 | <select id="dispositionPlan" class="form-control" style='width:100%' required=""> |
| 19 | <option value></option> | 20 | <option value>Select Disposition Plan</option> |
| 20 | <?php if(isset($disposition)) | 21 | <?php |
| 21 | foreach($disposition as $kay => $val) | 22 | if(isset($dispositionPlans)) |
| 22 | { | 23 | foreach($dispositionPlans as $kay => $val){ |
| 23 | $code = $dispositionCode[$kay]; | 24 | $sel= ''; |
| 24 | echo "<option data-id='$code' data-text='$kay' value='$val'>$kay</option>"; | 25 | if($val->id == $selectedDispositionPlan->planid)$sel='selected'; |
| 25 | } ?> | 26 | echo "<option value='$val->id' $sel>$val->name</option>"; |
| 27 | } | ||
| 28 | ?> | ||
| 26 | </select> | 29 | </select> |
| 27 | 30 | ||
| 28 | </div> | 31 | </div> |
| 29 | </div> | 32 | </div> |
| 30 | <div class="row" style="margin: 5px"> | ||
| 31 | <div class="col-md-2"> | ||
| 32 | <label>Select Sub Disposition:</label> | ||
| 33 | </div> | ||
| 34 | <div class="col-md-6"> | ||
| 35 | <select id="subDisposition" class="select2multi" style='width:100%' multiple=""> | ||
| 36 | </select> | ||
| 37 | </select> | ||
| 38 | </div> | ||
| 39 | </div> | ||
| 40 | <div class="row"> | 33 | <div class="row"> |
| 41 | <div class="col-md-2"> | 34 | <div class="col-md-2"> |
| 42 | <button id="assigndesposition" class="btn btn-xs btn-info">Assign Disposition | 35 | <button id="assigndesposition" class="btn btn-xs btn-info">Assign Disposition |
| ... | @@ -52,16 +45,17 @@ width:100% | ... | @@ -52,16 +45,17 @@ width:100% |
| 52 | 45 | ||
| 53 | <div class="col-sm-12"> | 46 | <div class="col-sm-12"> |
| 54 | <div class="panel panel-info"> | 47 | <div class="panel panel-info"> |
| 55 | <div class="panel-heading"><strong>Disposition List</strong></div> | 48 | <div class="panel-heading"><strong>Disposition Plan : <?php echo $selectedDispositionPlan->name; ?></strong></div> |
| 56 | <div class="panel-body" id=""> | 49 | <div class="panel-body" id=""> |
| 57 | <ul class="list-group"> | 50 | <ul class="list-group"> |
| 58 | <?php foreach($dispositionList as $key => $val) { if(!empty($val)){ ?> | 51 | <?php |
| 52 | foreach($dispositionList as $key => $val) { ?> | ||
| 59 | <li class="list-group-item list-group"> | 53 | <li class="list-group-item list-group"> |
| 60 | <div class="col-sm-12"> | 54 | <div class="col-sm-12"> |
| 61 | <div class="col-sm-3"><label><?php echo $key; ?></label></div> | 55 | <div class="col-sm-3"><label><?php echo $val->disposition; ?></label></div> |
| 62 | <div class="col-sm-6"> | 56 | <div class="col-sm-4"> |
| 63 | <?php $count = 0; | 57 | <?php $count = 0; |
| 64 | $subDisposition = explode(",", $val); | 58 | $subDisposition = explode(",", $val->subDisposition); |
| 65 | if(count($subDisposition) > 0){ | 59 | if(count($subDisposition) > 0){ |
| 66 | foreach ($subDisposition as $key => $value) { | 60 | foreach ($subDisposition as $key => $value) { |
| 67 | if(!empty($value)){ | 61 | if(!empty($value)){ |
| ... | @@ -72,13 +66,10 @@ width:100% | ... | @@ -72,13 +66,10 @@ width:100% |
| 72 | } | 66 | } |
| 73 | ?> | 67 | ?> |
| 74 | </div> | 68 | </div> |
| 75 | <div class="col-sm-2"><a class="innerAll" href="#" onclick="deleteDesposition('<?php echo $key; ?>');"> | ||
| 76 | <span class="btn btn-primary btn-xs"><i class="fa fa-trash-o"></i></span> | ||
| 77 | </a></div> | ||
| 78 | </div> | 69 | </div> |
| 79 | 70 | ||
| 80 | </li> | 71 | </li> |
| 81 | <?php }} ?> | 72 | <?php } ?> |
| 82 | </ul> | 73 | </ul> |
| 83 | </div> | 74 | </div> |
| 84 | </div> | 75 | </div> |
| ... | @@ -90,12 +81,6 @@ width:100% | ... | @@ -90,12 +81,6 @@ width:100% |
| 90 | function subDisposition(dispo) | 81 | function subDisposition(dispo) |
| 91 | { | 82 | { |
| 92 | var dispolist = dispo.split(','); | 83 | var dispolist = dispo.split(','); |
| 93 | /*var dispolist = []; | ||
| 94 | |||
| 95 | $.each( dispo, function( index, value ){ | ||
| 96 | dispolist = $.merge( dispolist, value.split(',') ); | ||
| 97 | });*/ | ||
| 98 | |||
| 99 | $("#subDisposition").select2("val", "Select"); | 84 | $("#subDisposition").select2("val", "Select"); |
| 100 | updateJSSelect('subDisposition',dispolist); | 85 | updateJSSelect('subDisposition',dispolist); |
| 101 | } | 86 | } |
| ... | @@ -125,32 +110,36 @@ width:100% | ... | @@ -125,32 +110,36 @@ width:100% |
| 125 | $('#assigndesposition').click(function() | 110 | $('#assigndesposition').click(function() |
| 126 | { | 111 | { |
| 127 | $("#error").html(''); | 112 | $("#error").html(''); |
| 128 | var code = $('#disposition').find(':selected').attr('data-id') | 113 | var plan = $('#dispositionPlan').val();//$('#dispositionPlan').find(':selected').text(); |
| 114 | var selectCampaignField = $('#selectCampaignField').val(); | ||
| 115 | |||
| 129 | //var disposition = $("#disposition option:selected").text(); | 116 | //var disposition = $("#disposition option:selected").text(); |
| 130 | var disposition = $('#disposition').find(':selected').attr('data-text') | 117 | /*var disposition = $('#disposition').find(':selected').attr('data-text') |
| 131 | var subDisposition = $('#subDisposition').val(); | 118 | var subDisposition = $('#subDisposition').val(); |
| 132 | var selectCampaignField = $('#selectCampaignField').val(); | 119 | var selectCampaignField = $('#selectCampaignField').val();*/ |
| 133 | //alert(selectCampaignField); | 120 | //alert(selectCampaignField); |
| 134 | 121 | ||
| 135 | if(disposition&&selectCampaignField) | 122 | //if(disposition&&selectCampaignField) |
| 136 | { | 123 | if(plan&&selectCampaignField){ |
| 137 | var postdata='disposition='+disposition; | 124 | var postdata='plan='+plan; |
| 125 | postdata+='&selectCampaignField='+selectCampaignField; | ||
| 126 | /*var postdata='disposition='+disposition; | ||
| 138 | postdata+='&code='+code; | 127 | postdata+='&code='+code; |
| 139 | postdata+='&disposition='+disposition; | 128 | postdata+='&disposition='+disposition; |
| 140 | postdata+='&subDisposition='+subDisposition; | 129 | postdata+='&subDisposition='+subDisposition; |
| 141 | postdata+='&selectCampaignField='+selectCampaignField; | 130 | postdata+='&selectCampaignField='+selectCampaignField;*/ |
| 131 | |||
| 142 | doAjax("campaign/assigndisposition",postdata,"campaignDetailsArea","","","GET",function(retrstr){ | 132 | doAjax("campaign/assigndisposition",postdata,"campaignDetailsArea","","","GET",function(retrstr){ |
| 143 | simpleNotification('Success','topRight',"Campaign assign suceesfully!"); | 133 | simpleNotification('Success','topRight',"Campaign assign suceesfully!"); |
| 144 | doAjax("campaign/show","campaign="+selectCampaignField,"campaignDetailsArea","","","GET",function(retrstr){ | 134 | doAjax("campaign/show","campaign="+selectCampaignField,"campaignDetailsArea","","","GET",function(retrstr){ |
| 145 | $("#subDisposition").select2("val", "Select"); | 135 | $("#subDisposition").select2("val", "Select"); |
| 146 | $('.nav-tabs a[href="#disposition"]').tab('show'); | 136 | $('.nav-tabs a[href="#disposition"]').tab('show'); |
| 147 | }); | 137 | }); |
| 148 | |||
| 149 | }); | 138 | }); |
| 150 | } | 139 | |
| 151 | else | 140 | }else{ |
| 152 | { | 141 | simpleNotification('Error','topRight',"Please select disposition plan!"); |
| 153 | $("#error").html('<p class="text-danger text-center">Please select the campaign and disposition.</p>'); | 142 | $("#error").html('<p class="text-danger text-center">Please select disposition plan.</p>'); |
| 154 | return false; | 143 | return false; |
| 155 | } | 144 | } |
| 156 | }); | 145 | }); | ... | ... |
| 1 | <!-- Heading --> | ||
| 2 | <h5 class="innerAll margin-none bg-primary"> | ||
| 3 | <i class="fa fa-fw fa-pencil"></i> Add Disposition | ||
| 4 | <a href="#" class="btn btn-sm btn-inverse pull-right btn-xs" style="margin-top: -5px;" onclick="return false"> | ||
| 5 | <i class="fa fa-user fa-fw"></i> | ||
| 6 | |||
| 7 | </a> | ||
| 8 | </h5> | ||
| 9 | |||
| 10 | |||
| 11 | <form class="innerAll"> | ||
| 12 | <fieldset> | ||
| 13 | |||
| 14 | <div class="control-group"> | ||
| 15 | <label class="col-md-4 control-label" for="code">Code</label> | ||
| 16 | <div class="col-md-8 controls"> | ||
| 17 | <input class="form-control" id="code" type="text" value="" /> | ||
| 18 | </div> | ||
| 19 | </div> | ||
| 20 | |||
| 21 | <div class="control-group"> | ||
| 22 | <label class="col-md-4 control-label" for="disposition">Disposition</label> | ||
| 23 | <div class="col-md-8 controls"> | ||
| 24 | <input class="form-control" id="disposition" type="text" value="" /> | ||
| 25 | </div> | ||
| 26 | </div> | ||
| 27 | |||
| 28 | |||
| 29 | <div class="control-group"> | ||
| 30 | <label class="col-md-4 control-label" for="subDisposition">Sub Disposition</label> | ||
| 31 | <div class="col-md-8 controls"> | ||
| 32 | <input class="form-control" id="subDisposition" type="text" value="" /> | ||
| 33 | </div> | ||
| 34 | </div> | ||
| 35 | |||
| 36 | <div class="form-actions"> | ||
| 37 | <button type="submit" class="btn btn-primary" onclick='createGroupForm();return false;'>Save changes</button> | ||
| 38 | </div> | ||
| 39 | </fieldset> | ||
| 40 | </form> | ||
| 41 | <script> | ||
| 42 | function createGroupForm() | ||
| 43 | { | ||
| 44 | var putdata="csrftoken={!!Session::token()!!}"; | ||
| 45 | putdata+="&code="+$("#code").val(); | ||
| 46 | putdata+="&disposition="+$("#disposition").val(); | ||
| 47 | putdata+="&subDisposition="+$("#subDisposition").val(); | ||
| 48 | |||
| 49 | /* | ||
| 50 | doAjax('campaign?action=createCampaign',putdata,'campaignformdiv','ajax_group_create','singlethis','POST');*/ | ||
| 51 | |||
| 52 | doAjax('campaign?action=createCampaign',putdata,'campaignformdiv','ajax_group_create','singlethis','POST',function(retrstr){ | ||
| 53 | doAjax("campaign/masters","" ,"campaignDetailsArea","","","GET",function(retrstr){ | ||
| 54 | simpleNotification('Success','topRight',"Disposition created suceesfully!"); | ||
| 55 | |||
| 56 | }); | ||
| 57 | }); | ||
| 58 | |||
| 59 | } | ||
| 60 | </script> |
| 1 | <?php | ||
| 2 | |||
| 3 | include_once(app_path().'/lib/phpexcel/PHPExcel.php'); | ||
| 4 | |||
| 5 | $inputFileType = "Excel5"; | ||
| 6 | $objReader = PHPExcel_IOFactory::createReader($inputFileType); | ||
| 7 | $objPHPExcel = $objReader->load("assets/extras/blank.xls"); | ||
| 8 | $baseRow = 2; | ||
| 9 | |||
| 10 | $objPHPExcel->getActiveSheet()->setCellValue('A1', "12"); | ||
| 11 | |||
| 12 | |||
| 13 | header('Content-Type: application/vnd.ms-excel'); | ||
| 14 | header('Content-Disposition: attachment;filename="Output.xls"'); | ||
| 15 | header('Cache-Control: max-age=0'); | ||
| 16 | |||
| 17 | $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, $inputFileType); | ||
| 18 | $objWriter->save('php://output'); | ||
| 19 | |||
| 20 | return ; | ||
| 21 | |||
| 22 | ?> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -28,16 +28,16 @@ | ... | @@ -28,16 +28,16 @@ |
| 28 | </div> | 28 | </div> |
| 29 | 29 | ||
| 30 | <div class="col-sm-4 bot"> | 30 | <div class="col-sm-4 bot"> |
| 31 | <a href="javascript:;" onclick="menuAction("group");return false;" style="color:white;"> | 31 | <a href="javascript:;" onclick="menuAction('disposition');return false;" style="color:white;"> |
| 32 | <div class="new1"> | 32 | <div class="new1"> |
| 33 | <div class="icon"> <i class="fa fa-users"></i></div> | 33 | <div class="icon"> <i class="fa fa-users"></i></div> |
| 34 | Groups | 34 | Disposition List |
| 35 | </div> | 35 | </div> |
| 36 | </a> | 36 | </a> |
| 37 | </div> | 37 | </div> |
| 38 | 38 | ||
| 39 | <div class="col-sm-4 bot"> | 39 | <div class="col-sm-4 bot"> |
| 40 | <a href="javascript:;" onclick="menuAction("role");return false;" style="color:white;"> | 40 | <a href="javascript:;" onclick="menuAction('dispositionPlan');return false;" style="color:white;"> |
| 41 | <div class="new1"> | 41 | <div class="new1"> |
| 42 | <div class="icon"> <i class="fa fa-star"></i></div> | 42 | <div class="icon"> <i class="fa fa-star"></i></div> |
| 43 | Role | 43 | Role | ... | ... |
| ... | @@ -40,12 +40,14 @@ use App\Models\CRMCall; | ... | @@ -40,12 +40,14 @@ use App\Models\CRMCall; |
| 40 | $mastersdata=$wakka->getCompanyMaster($tclnt); | 40 | $mastersdata=$wakka->getCompanyMaster($tclnt); |
| 41 | if(!empty($mastersdata["DialerDID"]))$didlinesstr[]=$mastersdata["DialerDID"]; | 41 | if(!empty($mastersdata["DialerDID"]))$didlinesstr[]=$mastersdata["DialerDID"]; |
| 42 | 42 | ||
| 43 | 43 | $dispoarr = []; | |
| 44 | if(empty($mastersdata['dialerDispoList']))$mastersdata['dialerDispoList']=$wakka->HRCoreVars['dialerDispoList']; | 44 | if(!empty($mastersdata['dialerDispoList'])){ |
| 45 | 45 | // $mastersdata['dialerDispoList']=$wakka->HRCoreVars['dialerDispoList']; | |
| 46 | $dispoarr=explode("~",$mastersdata['dialerDispoList']); | 46 | $dispoarr=explode("~",$mastersdata['dialerDispoList']); |
| 47 | foreach($dispoarr as $dispo) | 47 | } |
| 48 | { | 48 | |
| 49 | if(count($dispoarr) > 0){ | ||
| 50 | foreach($dispoarr as $dispo){ | ||
| 49 | if(!empty($dispo)) | 51 | if(!empty($dispo)) |
| 50 | { | 52 | { |
| 51 | $dispoprts=explode("|",$dispo); | 53 | $dispoprts=explode("|",$dispo); |
| ... | @@ -58,6 +60,15 @@ use App\Models\CRMCall; | ... | @@ -58,6 +60,15 @@ use App\Models\CRMCall; |
| 58 | } | 60 | } |
| 59 | } | 61 | } |
| 60 | } | 62 | } |
| 63 | }else{ | ||
| 64 | $dispositionPlan = $wakka->getDispositionList(); | ||
| 65 | foreach ($dispositionPlan as $key => $value) { | ||
| 66 | $disposition = $value->disposition; | ||
| 67 | $subDisposition = $value->sunDispoName; | ||
| 68 | $data.="dialerdispoarray['$disposition']='$subDisposition';"; | ||
| 69 | } | ||
| 70 | } | ||
| 71 | |||
| 61 | } | 72 | } |
| 62 | foreach($didlinesstr as $k=>$dids) | 73 | foreach($didlinesstr as $k=>$dids) |
| 63 | { | 74 | { |
| ... | @@ -210,6 +221,12 @@ use App\Models\CRMCall; | ... | @@ -210,6 +221,12 @@ use App\Models\CRMCall; |
| 210 | // role== user | 221 | // role== user |
| 211 | // all | 222 | // all |
| 212 | if($role == 'User'){ | 223 | if($role == 'User'){ |
| 224 | $TotalCalled= 0; | ||
| 225 | $contactedTotalCalled=0; | ||
| 226 | $calllog = []; | ||
| 227 | $campaignTotalCalled=0; | ||
| 228 | $campaignContactedTotalCalled=0; | ||
| 229 | $campaignFollowupCount = []; | ||
| 213 | 230 | ||
| 214 | $TotalCalled=$wakka->getCount("crmcalls","user_id = $userId and created_at > '".date("Y-m-d 03:00:00")."'"); | 231 | $TotalCalled=$wakka->getCount("crmcalls","user_id = $userId and created_at > '".date("Y-m-d 03:00:00")."'"); |
| 215 | $contactedTotalCalled=$wakka->getCount("crmcalls","userstatus='Contacted' and user_id = $userId and created_at > '".date("Y-m-d 03:00:00")."'"); | 232 | $contactedTotalCalled=$wakka->getCount("crmcalls","userstatus='Contacted' and user_id = $userId and created_at > '".date("Y-m-d 03:00:00")."'"); | ... | ... |
| 1 | <!-- Heading --> | ||
| 2 | <h5 class="innerAll margin-none bg-primary"> | ||
| 3 | <i class="fa fa-fw fa-pencil"></i>Add Disposition | ||
| 4 | <a href="#" class="btn btn-sm btn-inverse pull-right btn-xs" style="margin-top: -5px;" onclick="return false"> | ||
| 5 | <i class="fa fa-user fa-fw"></i> | ||
| 6 | |||
| 7 | </a> | ||
| 8 | </h5> | ||
| 9 | |||
| 10 | |||
| 11 | <form method="post" id="dispositionForm" class="innerAll"> | ||
| 12 | <fieldset> | ||
| 13 | |||
| 14 | <div class="control-group"> | ||
| 15 | <label class="col-md-4 control-label" for="disposition">Disposition Name</label> | ||
| 16 | <div class="col-md-8 controls tmar"> | ||
| 17 | <input class="form-control" id="disposition" name="disposition" type="text" value="" required /> | ||
| 18 | </div> | ||
| 19 | </div> | ||
| 20 | |||
| 21 | <div class="control-group "> | ||
| 22 | <label class="col-md-4 control-label" for="code">Code</label> | ||
| 23 | <div class="col-md-8 controls tmar"> | ||
| 24 | <input class="form-control" id="code" name="code" type="text" value="" required /> | ||
| 25 | </div> | ||
| 26 | </div> | ||
| 27 | |||
| 28 | <!-- <div class="control-group"> | ||
| 29 | <label class="col-md-4 control-label" for="subDisposition">Sub Disposition</label> | ||
| 30 | <div class="col-md-8 controls tmar"> | ||
| 31 | <input class="form-control" id="subDisposition" name="subDisposition" type="text" required /> | ||
| 32 | </div> | ||
| 33 | </div> --> | ||
| 34 | |||
| 35 | <div class="control-group"> | ||
| 36 | <label class="col-md-4 control-label" for="status">Status</label> | ||
| 37 | <div class="col-md-8 controls tmar"> | ||
| 38 | <select class="form-control" id="" name="status" > | ||
| 39 | <option value="active">Active</option> | ||
| 40 | <option value="inactive">Inactive</option> | ||
| 41 | </select> | ||
| 42 | </div> | ||
| 43 | </div> | ||
| 44 | |||
| 45 | <div class="field_wrapper"> | ||
| 46 | <div class="row"> | ||
| 47 | <label class="col-md-4 control-label" for="subDisposition">Sub Disposition</label> | ||
| 48 | <div class="col-md-7 controls tmar"> | ||
| 49 | <input type="text" class="form-control" name="subDisposition[]" required/> | ||
| 50 | </div> | ||
| 51 | <div class="col-md-1 controls tmar"> | ||
| 52 | <a href="javascript:void(0);" class="add_button" title="Add field"><i class="fa fa-plus fa-3 iconsize" aria-hidden="true"></i></a> | ||
| 53 | </div> | ||
| 54 | </div> | ||
| 55 | </div> | ||
| 56 | |||
| 57 | |||
| 58 | |||
| 59 | |||
| 60 | <div class="form-actions"> | ||
| 61 | <!-- <button type="submit" class="btn btn-primary" onclick='createDisposition();return false;'>Save changes</button> --> | ||
| 62 | |||
| 63 | <input type="submit" name="save" id="save" class="btn btn-primary" value="Save changes"> | ||
| 64 | </div> | ||
| 65 | </fieldset> | ||
| 66 | </form> | ||
| 67 | <script> | ||
| 68 | $(document).ready(function(){ | ||
| 69 | |||
| 70 | //var maxField = 10; //Input fields increment limitation | ||
| 71 | var addButton = $('.add_button'); //Add button selector | ||
| 72 | var wrapper = $('.field_wrapper'); //Input field wrapper | ||
| 73 | var fieldHTML = '<div class="row"><label class="col-md-4 control-label" for="subDisposition"></label><div class="col-md-7 controls tmar"><input type="text" class="form-control" name="subDisposition[]" required /></div><div class="col-md-1 controls tmar"><a href="javascript:void(0);" class="remove_button"><i class="fa fa-minus fa-3 iconsize" aria-hidden="true"></i></a></div></div>'; //New input field html | ||
| 74 | |||
| 75 | //var x = 1; //Initial field counter is 1 | ||
| 76 | |||
| 77 | //Once add button is clicked | ||
| 78 | $(addButton).click(function(){ | ||
| 79 | //Check maximum number of input fields | ||
| 80 | //if(x < maxField){ | ||
| 81 | //x++; //Increment field counter | ||
| 82 | $(wrapper).append(fieldHTML); //Add field html | ||
| 83 | //} | ||
| 84 | }); | ||
| 85 | |||
| 86 | //Once remove button is clicked | ||
| 87 | $(wrapper).on('click', '.remove_button', function(e){ | ||
| 88 | e.preventDefault(); | ||
| 89 | $(this).parent('div').parent('div').remove(); //Remove field html | ||
| 90 | //x--; //Decrement field counter | ||
| 91 | }); | ||
| 92 | |||
| 93 | $('#dispositionForm').on('submit', function(event){ | ||
| 94 | event.preventDefault(); | ||
| 95 | var putdata = $('#dispositionForm').serialize(); | ||
| 96 | |||
| 97 | doAjax('disposition?action=isExists',putdata,'','','','POST',function(retrstr){ | ||
| 98 | if(retrstr.responseText == "true"){ | ||
| 99 | simpleNotification('Error','topRight',"Disposition Already Exists!"); | ||
| 100 | return false; | ||
| 101 | }else{ | ||
| 102 | doAjax('disposition?action=createDisposition',putdata,'dispositionFormDiv','ajax_group_create','singlethis','POST',function(retrstr){ | ||
| 103 | doAjax('disposition','','content','ajax_disposition','singlethis','GET',function(retrstr){ | ||
| 104 | simpleNotification('Success','topRight',"Disposition created suceesfully!"); | ||
| 105 | }); | ||
| 106 | }); | ||
| 107 | } | ||
| 108 | }); | ||
| 109 | }); | ||
| 110 | |||
| 111 | }); | ||
| 112 | </script> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | <!-- Heading --> | ||
| 2 | <h5 class="innerAll margin-none bg-primary"> | ||
| 3 | <i class="fa fa-fw fa-pencil"></i> Edit Disposition | ||
| 4 | <a href="#" class="btn btn-sm btn-inverse pull-right btn-xs" style="margin-top: -5px;" onclick="return false"> | ||
| 5 | <i class="fa fa-user fa-fw"></i> | ||
| 6 | |||
| 7 | </a> | ||
| 8 | </h5> | ||
| 9 | <?php //echo "<prE>";print_r($dispositionPlan); ?> | ||
| 10 | <form method="post" id="dispositionForm" class="innerAll"> | ||
| 11 | <input class="form-control" name="dispoId" type="hidden" value="{!!$disposition->dispoId!!}" /> | ||
| 12 | <fieldset> | ||
| 13 | |||
| 14 | <div class="control-group"> | ||
| 15 | <label class="col-md-4 control-label" for="disposition">Disposition Name</label> | ||
| 16 | <div class="col-md-8 controls tmar"> | ||
| 17 | <input class="form-control" id="disposition" name="disposition" type="text" value="{!!$disposition->disposition!!}" required /> | ||
| 18 | </div> | ||
| 19 | </div> | ||
| 20 | |||
| 21 | <div class="control-group "> | ||
| 22 | <label class="col-md-4 control-label" for="code">Code</label> | ||
| 23 | <div class="col-md-8 controls tmar"> | ||
| 24 | <input class="form-control" id="code" name="code" type="text" value="{!!$disposition->code!!}" required /> | ||
| 25 | </div> | ||
| 26 | </div> | ||
| 27 | |||
| 28 | |||
| 29 | |||
| 30 | |||
| 31 | <!-- <div class="control-group"> | ||
| 32 | <label class="col-md-4 control-label" for="subDisposition">Sub Disposition</label> | ||
| 33 | <div class="col-md-8 controls tmar"> | ||
| 34 | <input class="form-control" id="subDisposition" name="subDisposition" type="text" required /> | ||
| 35 | </div> | ||
| 36 | </div> --> | ||
| 37 | |||
| 38 | <div class="control-group"> | ||
| 39 | <label class="col-md-4 control-label" for="status">Status</label> | ||
| 40 | <div class="col-md-8 controls tmar"> | ||
| 41 | <select class="form-control" id="" name="status" > | ||
| 42 | <option value="{!!$disposition->status!!}">{!!$disposition->status!!}</option> | ||
| 43 | <option value="active">Active</option> | ||
| 44 | <option value="inactive">Inactive</option> | ||
| 45 | </select> | ||
| 46 | </div> | ||
| 47 | </div> | ||
| 48 | |||
| 49 | <?php $subDispo = explode(",", $disposition->sunDispoName); ?> | ||
| 50 | <div class="field_wrapper"> | ||
| 51 | <?php for ($i=0; $i < count($subDispo); $i++) { | ||
| 52 | if($i == 0){ ?> | ||
| 53 | <div class="row"> | ||
| 54 | <label class="col-md-4 control-label" for="subDisposition">Sub Disposition</label> | ||
| 55 | <div class="col-md-7 controls tmar"> | ||
| 56 | <input type="text" class="form-control" name="subDisposition[]" value="{!!$subDispo[$i]!!}" required/> | ||
| 57 | </div> | ||
| 58 | <div class="col-md-1 controls tmar"> | ||
| 59 | <a href="javascript:void(0);" class="add_button" title="Add field"><i class="fa fa-plus fa-3" aria-hidden="true"></i></a> | ||
| 60 | </div> | ||
| 61 | </div> | ||
| 62 | <?php }else{ | ||
| 63 | ?> | ||
| 64 | <div class="row"> | ||
| 65 | <label class="col-md-4 control-label" for="subDisposition"></label> | ||
| 66 | <div class="col-md-7 controls tmar"> | ||
| 67 | <input type="text" class="form-control" name="subDisposition[]" value="{!!$subDispo[$i]!!}" required /></div><div class="col-md-1 controls tmar"><a href="javascript:void(0);" class="remove_button"><i class="fa fa-minus fa-3 iconsize" aria-hidden="true"></i></a> | ||
| 68 | </div> | ||
| 69 | </div> | ||
| 70 | <?php } | ||
| 71 | } ?> | ||
| 72 | </div> | ||
| 73 | |||
| 74 | |||
| 75 | |||
| 76 | |||
| 77 | <div class="form-actions"> | ||
| 78 | <!-- <button type="submit" class="btn btn-primary" onclick='createDisposition();return false;'>Save changes</button> --> | ||
| 79 | |||
| 80 | <input type="submit" name="save" id="save" class="btn btn-primary" value="Save changes"> | ||
| 81 | </div> | ||
| 82 | </fieldset> | ||
| 83 | </form> | ||
| 84 | <script> | ||
| 85 | $(document).ready(function(){ | ||
| 86 | //var maxField = 10; //Input fields increment limitation | ||
| 87 | var addButton = $('.add_button'); //Add button selector | ||
| 88 | var wrapper = $('.field_wrapper'); //Input field wrapper | ||
| 89 | var fieldHTML = '<div class="row"><label class="col-md-4 control-label" for="subDisposition"></label><div class="col-md-7 controls tmar"><input type="text" class="form-control" name="subDisposition[]" required /></div><div class="col-md-1 controls tmar"><a href="javascript:void(0);" class="remove_button"><i class="fa fa-minus fa-3 iconsize" aria-hidden="true"></i></a></div></div>'; //New input field html | ||
| 90 | |||
| 91 | //var x = 1; //Initial field counter is 1 | ||
| 92 | |||
| 93 | //Once add button is clicked | ||
| 94 | $(addButton).click(function(){ | ||
| 95 | //Check maximum number of input fields | ||
| 96 | //if(x < maxField){ | ||
| 97 | //x++; //Increment field counter | ||
| 98 | $(wrapper).append(fieldHTML); //Add field html | ||
| 99 | //} | ||
| 100 | }); | ||
| 101 | |||
| 102 | //Once remove button is clicked | ||
| 103 | $(wrapper).on('click', '.remove_button', function(e){ | ||
| 104 | e.preventDefault(); | ||
| 105 | $(this).parent('div').parent('div').remove(); //Remove field html | ||
| 106 | //x--; //Decrement field counter | ||
| 107 | }); | ||
| 108 | $('#dispositionForm').on('submit', function(event){ | ||
| 109 | event.preventDefault(); | ||
| 110 | var putdata = $('#dispositionForm').serialize(); | ||
| 111 | |||
| 112 | doAjax('disposition?action=isExists',putdata,'','','','POST',function(retrstr){ | ||
| 113 | if(retrstr.responseText == "true"){ | ||
| 114 | simpleNotification('Error','topRight',"Disposition Already Exists!"); | ||
| 115 | return false; | ||
| 116 | }else{ | ||
| 117 | doAjax('disposition?action=updateDisposition',putdata,'dispositionFormDiv','ajax_group_create','singlethis','POST',function(retrstr){ | ||
| 118 | doAjax('disposition','','content','ajax_disposition','singlethis','GET',function(retrstr){ | ||
| 119 | simpleNotification('Success','topRight',"Disposition updated suceesfully!"); | ||
| 120 | }); | ||
| 121 | }); | ||
| 122 | } | ||
| 123 | }); | ||
| 124 | |||
| 125 | }); | ||
| 126 | }); | ||
| 127 | |||
| 128 | </script> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -38,48 +38,71 @@ | ... | @@ -38,48 +38,71 @@ |
| 38 | 38 | ||
| 39 | <!-- Category Heading --> | 39 | <!-- Category Heading --> |
| 40 | <div class="heading-buttons bg-gray border-bottom innerR half"> | 40 | <div class="heading-buttons bg-gray border-bottom innerR half"> |
| 41 | <a href="#" class="btn btn-sm btn-inverse pull-right" onclick="doAjax('campaign/create','','campaignformdiv','ajax_group_create','singlethis','GET');return false"><i class="fa fa-plus fa-fw"></i>New Disposition</a> | 41 | <a href="#" class="btn btn-sm btn-inverse pull-right" onclick="doAjax('disposition/create','','dispositionFormDiv','ajax_group_create','singlethis','GET');return false"><i class="fa fa-plus fa-fw"></i>New Disposition</a> |
| 42 | <h4 class="innerTB margin-bottom-none">Dispositions</h4> | 42 | <h4 class="innerTB margin-bottom-none">Disposition List</h4> |
| 43 | <div class="clearfix"></div> | 43 | <div class="clearfix"></div> |
| 44 | </div> | 44 | </div> |
| 45 | <!-- End Category Heading --> | 45 | <!-- End Category Heading --> |
| 46 | 46 | ||
| 47 | <?php //echo $grouplist->render(); ?> | 47 | <?php //echo $grouplist->render(); ?> |
| 48 | <?php foreach ($dispositionList as $dispo) | 48 | <?php if(count($dispositions) > 0){ |
| 49 | { //print_r($dispo);exit(); | 49 | foreach ($dispositions as $dispo){ //echo "<pre>";print_r($dispo);exit(); |
| 50 | $tphoto="assets/images/people/avatar.jpg"; | 50 | $tphoto="assets/images/people/avatar.jpg"; |
| 51 | ?> | 51 | ?> |
| 52 | <!-- Category Listing --> | 52 | <!-- dispolist Listing --> |
| 53 | <div class="row innerAll half border-bottom bg-gray- hover"> | 53 | <div class="row innerAll half border-bottom bg-gray-hover"> |
| 54 | <div class="col-sm-8 col-xs-10"> | 54 | <div class="col-sm-2 col-xs-4"> |
| 55 | <ul class="media-list margin-none"> | 55 | <ul class="media-list margin-none"> |
| 56 | <li class="media"> | 56 | <li class="media"> |
| 57 | <a class="pull-left innerAll" href="#" onclick="editCampaign(' <?php echo $dispo['code']; ?>' , '<?php echo $dispo['disposition']; ?>', '<?php echo $dispo['disposition']; ?>');"> | 57 | <a class="pull-left innerAll" href="#" onclick="doAjax('disposition/{!!$dispo->dispoId!!}/edit','','dispositionFormDiv','ajax_group_create','singlethis','GET');return false;"> |
| 58 | <span class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i></span> | 58 | <span class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i></span> |
| 59 | </a> | 59 | </a> |
| 60 | <a class="pull-left innerAll" href="#" onclick="doAjax('group/{!!$tgroup->id!!}','','campaignformdiv','ajax_group_delete','singlethis','DELETE');return false;"> | 60 | <!-- <div class="media-body"> |
| 61 | <span class="btn btn-primary btn-xs"><i class="fa fa-trash-o"></i></span> | ||
| 62 | </a> | ||
| 63 | <div class="media-body"> | ||
| 64 | <div class="innerAll"> | 61 | <div class="innerAll"> |
| 65 | <h5 class=""><a href="#" class="media-heading text-primary">{!!$dispo['code']!!} : {{$dispo['disposition']}}</a></h5> | 62 | <h5 class=""><a href="#" class="media-heading text-primary" onclick="doAjax('disposition/{!!$dispo->dispoId!!}/edit','','dispositionFormDiv','ajax_group_create','singlethis','GET');return false;"> {!!$dispo->plan!!}</a></h5> |
| 66 | <div class="clearfix"></div> | 63 | <div class="clearfix"></div> |
| 67 | |||
| 68 | </div> | 64 | </div> |
| 69 | 65 | ||
| 70 | </div> | 66 | </div> --> |
| 71 | </li> | 67 | </li> |
| 72 | </ul> | 68 | </ul> |
| 73 | </div> | 69 | </div> |
| 74 | <div class="col-sm-3 col-xs-2"> | 70 | <div class="col-sm-4 col-xs-hidden"> |
| 71 | <div class="innerAll"> | ||
| 72 | <div class="media"> | ||
| 73 | <!-- <a href="#" class="pull-left"> | ||
| 74 | <img src="{!!$tphoto!!}" class="media-object" width=35px /> | ||
| 75 | </a> --> | ||
| 76 | <div class="media-body"> | ||
| 77 | <a href="#" class="text-small" title='{!!$dispo->created_at!!}' onclick="doAjax('disposition/{!!$dispo->dispoId!!}/edit','','dispositionFormDiv','ajax_group_create','singlethis','GET');return false;">{!!$dispo->code!!} : {!!$dispo->disposition!!}</a> | ||
| 78 | <div class="clearfix"></div> | ||
| 79 | <small> | ||
| 80 | @if($dispo->status=="active") | ||
| 81 | <span class="label label-success">{!!$dispo->status!!}</span> | ||
| 82 | @elseif($dispo->status=="inactive") | ||
| 83 | <span class="label label-warning">{!!$dispo->status!!}</span> | ||
| 84 | @endif | ||
| 85 | </small> | ||
| 86 | </div> | ||
| 87 | </div> | ||
| 88 | </div> | ||
| 89 | </div> | ||
| 90 | <div class="col-sm-3 col-xs-4"> | ||
| 75 | <div class="text-center"> | 91 | <div class="text-center"> |
| 76 | <p class="strong">Sub Disposition</p> | 92 | <p class="strong">Sub Disposition</p> |
| 77 | <span class="badge badge-primary badge-stroke" data-toggle="tooltip" data-title="Subscribed" data-placement ="right" data-container="body">{{$dispo['totalSubdisposition']}}</span> | 93 | <!-- <span class="badge badge-primary" data-toggle="tooltip" data-title="Published" data-placement="left" data-container="body">0</span> --> |
| 94 | <span class="badge badge-primary badge-stroke" data-toggle="tooltip" data-title="Subscribed" data-placement="right" data-container="body">{!!$dispo->totalSubDispo!!}</span> | ||
| 78 | </div> | 95 | </div> |
| 79 | </div> | 96 | </div> |
| 80 | 97 | ||
| 81 | </div> | 98 | </div> |
| 82 | <!-- // END Category Listing --> | 99 | <!-- // END Dispolist Listing --> |
| 100 | <?php } }else{?> | ||
| 101 | <div class="row innerAll half border-bottom bg-gray-hover"> | ||
| 102 | <div class="col-sm-6 col-xs-8" style="text-align: center;"> | ||
| 103 | <b>No data available</b> | ||
| 104 | </div> | ||
| 105 | </div> | ||
| 83 | <?php } ?> | 106 | <?php } ?> |
| 84 | <?php //echo $grouplist->render(); ?> | 107 | <?php //echo $grouplist->render(); ?> |
| 85 | 108 | ||
| ... | @@ -92,7 +115,7 @@ | ... | @@ -92,7 +115,7 @@ |
| 92 | <div class="col-md-6"> | 115 | <div class="col-md-6"> |
| 93 | 116 | ||
| 94 | <!-- col-separator --> | 117 | <!-- col-separator --> |
| 95 | <div class="col-separator col-separator-last" id=campaignformdiv> | 118 | <div class="col-separator col-separator-last" id=dispositionFormDiv> |
| 96 | </div> | 119 | </div> |
| 97 | <!-- // END col-separator --> | 120 | <!-- // END col-separator --> |
| 98 | 121 | ||
| ... | @@ -118,7 +141,16 @@ menuAction("group?page="+res[1]); | ... | @@ -118,7 +141,16 @@ menuAction("group?page="+res[1]); |
| 118 | return false; | 141 | return false; |
| 119 | }); | 142 | }); |
| 120 | 143 | ||
| 121 | function editCampaign(){ | 144 | $(document).ready(function(){ |
| 122 | doAjax('campaign/edit','','campaignformdiv','ajax_group_create','singlethis','GET');return false; | 145 | |
| 123 | } | 146 | }); |
| 124 | </script> | 147 | </script> |
| 148 | <style type="text/css"> | ||
| 149 | .tmar { | ||
| 150 | margin-top : 10px; | ||
| 151 | } | ||
| 152 | .iconsize { | ||
| 153 | font-size: 2em; | ||
| 154 | margin-top: 5px; | ||
| 155 | } | ||
| 156 | </style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| 1 | <!-- Heading --> | ||
| 2 | <h5 class="innerAll margin-none bg-primary"> | ||
| 3 | <i class="fa fa-fw fa-pencil"></i>Add Disposition Plan | ||
| 4 | <a href="#" class="btn btn-sm btn-inverse pull-right btn-xs" style="margin-top: -5px;" onclick="return false"> | ||
| 5 | <i class="fa fa-user fa-fw"></i> | ||
| 6 | |||
| 7 | </a> | ||
| 8 | </h5> | ||
| 9 | |||
| 10 | |||
| 11 | <form method="post" id="dispositionPlanForm" class="innerAll"> | ||
| 12 | <fieldset> | ||
| 13 | |||
| 14 | <div class="control-group"> | ||
| 15 | <label class="col-md-4 control-label" for="plan">Disposition Plan Name</label> | ||
| 16 | <div class="col-md-8 controls tmar"> | ||
| 17 | <input class="form-control" id="plan" name="plan" type="text" value="" required /> | ||
| 18 | </div> | ||
| 19 | </div> | ||
| 20 | |||
| 21 | <div class="control-group"> | ||
| 22 | <label class="col-md-4 control-label" for="status">Status</label> | ||
| 23 | <div class="col-md-8 controls tmar"> | ||
| 24 | <select class="form-control" id="" name="status" required> | ||
| 25 | <option value="active">Active</option> | ||
| 26 | <option value="inactive">Inactive</option> | ||
| 27 | </select> | ||
| 28 | </div> | ||
| 29 | </div> | ||
| 30 | |||
| 31 | <div class="control-group"> | ||
| 32 | <label class="col-md-12 control-label tmar" for="status">Disposition</label> | ||
| 33 | </div> | ||
| 34 | |||
| 35 | <div class="control-group field_wrapper"> | ||
| 36 | <div class="row"> | ||
| 37 | <div class="col-md-11"> | ||
| 38 | <div class="panel panel-info"> | ||
| 39 | <div class="panel-body"> | ||
| 40 | <div class="row" style="margin: 5px"> | ||
| 41 | <div class="col-md-4"> | ||
| 42 | <label>Select Disposition:</label> | ||
| 43 | </div> | ||
| 44 | <?php $data = ''; | ||
| 45 | if(isset($dispositionEntities)) | ||
| 46 | foreach($dispositionEntities as $dispositionEntity) | ||
| 47 | { | ||
| 48 | $data .= "<option data-id='$dispositionEntity->code' data-text='$dispositionEntity->sunDispoName' value='$dispositionEntity->disposition'>$dispositionEntity->disposition</option>"; | ||
| 49 | } | ||
| 50 | ?> | ||
| 51 | <div class="col-md-8 controls tmar"> | ||
| 52 | <select class="form-control disposition" name="disposition[]" data-subDospoId="subDisposition1" required> | ||
| 53 | <option value>Select ..</option> | ||
| 54 | <?php echo $data; ?> | ||
| 55 | </select> | ||
| 56 | </div> | ||
| 57 | </div> | ||
| 58 | |||
| 59 | <div class="row" style="margin: 5px"> | ||
| 60 | <div class="col-md-4"> | ||
| 61 | <label>Select Sub Disposition:</label> | ||
| 62 | </div> | ||
| 63 | <div class="col-md-8 controls tmar"> | ||
| 64 | <select name="subDisposition[0][]" id="subDisposition1" class="select2multi" style='width:100%' multiple=""> | ||
| 65 | </select> | ||
| 66 | </div> | ||
| 67 | </div> | ||
| 68 | |||
| 69 | </div> | ||
| 70 | </div> | ||
| 71 | </div> | ||
| 72 | <div class="col-md-1"> | ||
| 73 | <a href="javascript:void(0);" class="add_button" title="Add field"><i class="fa fa-plus fa-3 iconsize" aria-hidden="true"></i></a> | ||
| 74 | </div> | ||
| 75 | </div> | ||
| 76 | </div> | ||
| 77 | |||
| 78 | <div class="form-actions"> | ||
| 79 | |||
| 80 | <input type="submit" name="save" id="save" class="btn btn-primary" value="Save changes"> | ||
| 81 | </div> | ||
| 82 | </fieldset> | ||
| 83 | </form> | ||
| 84 | <script> | ||
| 85 | $(document).ready(function(){ | ||
| 86 | var i = 1; | ||
| 87 | var wrapper = $('.field_wrapper'); //Input field wrapper | ||
| 88 | |||
| 89 | $('body').on('click', '.add_button', function() { | ||
| 90 | i++; | ||
| 91 | var dispoOption = "<?php echo $data; ?>"; | ||
| 92 | var fieldHTML = '<div class="row"><div class="col-md-11"><div class="panel panel-info"><div class="panel-body"><div class="row" style="margin: 5px"><div class="col-md-4"><label>Select Disposition:</label></div><div class="col-md-8 controls tmar"><select name="disposition[]" class="form-control disposition" data-subDospoId="subDisposition'+i+'" required><option value>Select...</option>'; | ||
| 93 | fieldHTML = fieldHTML + dispoOption; | ||
| 94 | fieldHTML = fieldHTML +'</select></div></div><div class="row" style="margin: 5px"><div class="col-md-4"> <label>Select Sub Disposition:</label></div><div class="col-md-8 controls tmar"><select name="subDisposition['+(i-1)+'][]" id="subDisposition'+i+'" class="select2multi" style="width:100%"" multiple=""></select></div></div></div></div></div><div class="col-md-1"><a href="javascript:void(0);" class="remove_button"><i class="fa fa-minus fa-3 iconsize" aria-hidden="true"></i></a></div></div>'; //New input field html | ||
| 95 | |||
| 96 | $(wrapper).append(fieldHTML); | ||
| 97 | |||
| 98 | $(".select2multi").not('.kstych_init').addClass('kstych_init').select2({placeholder: "Select...",allowClear: true }); | ||
| 99 | }); | ||
| 100 | |||
| 101 | $(wrapper).on('click', '.remove_button', function(e){ | ||
| 102 | e.preventDefault(); | ||
| 103 | $(this).parent('div').parent('div').remove(); | ||
| 104 | }); | ||
| 105 | |||
| 106 | //$(".disposition").change(function(){ | ||
| 107 | $('body').on('click', '.disposition', function() { | ||
| 108 | |||
| 109 | var subDispositionId = $(this).attr('data-subDospoId'); | ||
| 110 | var subDispo = $(this).find(':selected').attr('data-text') //this.find(':selected').attr('data-text'); | ||
| 111 | var subdispolist = subDispo.split(','); | ||
| 112 | $("#"+subDispositionId).select2("val", "Select"); | ||
| 113 | updateJSSelect(subDispositionId,subdispolist); | ||
| 114 | |||
| 115 | }); | ||
| 116 | |||
| 117 | $('#dispositionPlanForm').on('submit', function(event){ | ||
| 118 | event.preventDefault(); | ||
| 119 | var putdata = $('#dispositionPlanForm').serialize(); | ||
| 120 | |||
| 121 | doAjax('dispositionPlan?action=isExists',putdata,'','','','POST',function(retrstr){ | ||
| 122 | if(retrstr.responseText == "true"){ | ||
| 123 | simpleNotification('Error','topRight',"Disposition plan Already Exists!"); | ||
| 124 | return false; | ||
| 125 | }else{ | ||
| 126 | doAjax('dispositionPlan?action=createDispositionPlan',putdata,'dispositionPlanFormDiv','ajax_group_create','singlethis','POST',function(retrstr){ | ||
| 127 | doAjax('dispositionPlan','','content','ajax_dispositionPlan','singlethis','GET',function(retrstr){ | ||
| 128 | simpleNotification('Success','topRight',"Disposition plan created suceesfully!"); | ||
| 129 | }); | ||
| 130 | }); | ||
| 131 | } | ||
| 132 | }); | ||
| 133 | }); | ||
| 134 | |||
| 135 | }); | ||
| 136 | </script> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
This diff is collapsed.
Click to expand it.
| 1 | <style> | ||
| 2 | .heading-buttons h4{ | ||
| 3 | line-height:20px; | ||
| 4 | } | ||
| 5 | </style> | ||
| 6 | <div class="layout-app"><!-- row-app --> | ||
| 7 | |||
| 8 | <div class="row row-app"> | ||
| 9 | |||
| 10 | <!-- col --> | ||
| 11 | <div class="col-md-12"> | ||
| 12 | |||
| 13 | <!-- col-separator.box --> | ||
| 14 | <div class="col-separator col-separator-first col-unscrollable box"> | ||
| 15 | |||
| 16 | <!-- col-table --> | ||
| 17 | <div class="col-table" id=authorworkspacediv> | ||
| 18 | <!-- Search Bar --> | ||
| 19 | <div class="input-group"> | ||
| 20 | <input type="text" class="form-control" placeholder="Search for Disposition..."> | ||
| 21 | <span class="input-group-btn"> | ||
| 22 | <button class="btn btn-primary rounded-none" type="button"><i class="fa fa-search"></i></button> | ||
| 23 | </span> | ||
| 24 | </div> | ||
| 25 | <div class="col-separator-h"></div> | ||
| 26 | <!-- End Search Bar --> | ||
| 27 | |||
| 28 | <div class="col-table-row"> | ||
| 29 | |||
| 30 | <div class="col-app col-unscrollable"> | ||
| 31 | |||
| 32 | <div class="col-app"> | ||
| 33 | |||
| 34 | <div class="row-app"> | ||
| 35 | |||
| 36 | <div class="col-md-6"> | ||
| 37 | <div class="col-separator"> | ||
| 38 | |||
| 39 | <!-- Category Heading --> | ||
| 40 | <div class="heading-buttons bg-gray border-bottom innerR half"> | ||
| 41 | <a href="#" class="btn btn-sm btn-inverse pull-right" onclick="doAjax('dispositionPlan/create','','dispositionPlanFormDiv','ajax_group_create','singlethis','GET');return false"><i class="fa fa-plus fa-fw"></i>New Disposition Plan</a> | ||
| 42 | <h4 class="innerTB margin-bottom-none">Disposition Plan</h4> | ||
| 43 | <div class="clearfix"></div> | ||
| 44 | </div> | ||
| 45 | <!-- End Category Heading --> | ||
| 46 | |||
| 47 | <?php //echo $grouplist->render(); ?> | ||
| 48 | <?php if(count($dispositionPlan) > 0){ | ||
| 49 | foreach ($dispositionPlan as $dispo){ //echo "<pre>";print_r($dispo);exit(); | ||
| 50 | $tphoto="assets/images/people/avatar.jpg"; | ||
| 51 | ?> | ||
| 52 | <!-- dispolist Listing --> | ||
| 53 | <div class="row innerAll half border-bottom bg-gray-hover"> | ||
| 54 | <div class="col-sm-6 col-xs-8"> | ||
| 55 | <ul class="media-list margin-none"> | ||
| 56 | <li class="media"> | ||
| 57 | <a class="pull-left innerAll" href="#" onclick="doAjax('dispositionPlan/{!!$dispo->dispositionPlanId!!}/edit','','dispositionPlanFormDiv','ajax_group_create','singlethis','GET');return false;"> | ||
| 58 | <span class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i></span> | ||
| 59 | </a> | ||
| 60 | <!-- <a class="pull-left innerAll" href="#" onclick="doAjax('campaign/{!!$dispo->id!!}','','groupformdiv','ajax_group_delete','singlethis','DELETE');return false;"> | ||
| 61 | <span class="btn btn-primary btn-xs"><i class="fa fa-trash-o"></i></span> | ||
| 62 | </a> --> | ||
| 63 | <div class="media-body"> | ||
| 64 | <div class="innerAll"> | ||
| 65 | <h5 class=""><a href="#" class="media-heading text-primary" onclick="doAjax('dispositionPlan/{!!$dispo->dispositionPlanId!!}/edit','','dispositionPlanFormDiv','ajax_group_create','singlethis','GET');return false;"> {!!$dispo->name!!}</a></h5> | ||
| 66 | <div class="clearfix"></div> | ||
| 67 | <small> | ||
| 68 | @if($dispo->status=="active") | ||
| 69 | <span class="label label-success">{!!$dispo->status!!}</span> | ||
| 70 | @elseif($dispo->status=="inactive") | ||
| 71 | <span class="label label-warning">{!!$dispo->status!!}</span> | ||
| 72 | @endif | ||
| 73 | </small> | ||
| 74 | <!-- <small class="margin-none label label-inverse">Social</small> | ||
| 75 | <small class="margin-none label label-inverse">Learn</small> | ||
| 76 | <small class="margin-none label label-inverse">Author</small> | ||
| 77 | <small class="margin-none label label-inverse">Library</small> --> | ||
| 78 | |||
| 79 | </div> | ||
| 80 | |||
| 81 | </div> | ||
| 82 | </li> | ||
| 83 | </ul> | ||
| 84 | </div> | ||
| 85 | <!-- <div class="col-sm-3 col-xs-hidden"> | ||
| 86 | <div class="innerAll"> | ||
| 87 | <div class="media"> | ||
| 88 | <div class="media-body"> | ||
| 89 | <a href="#" class="text-small" title='{!!$dispo->created_at!!}' onclick="doAjax('dispositionPlan/{!!$dispo->dispoId!!}/edit','','dispositionPlanFormDiv','ajax_group_create','singlethis','GET');return false;">{!!$dispo->disposition!!}</a> | ||
| 90 | <div class="clearfix"></div> | ||
| 91 | <small> | ||
| 92 | @if($dispo->status=="active") | ||
| 93 | <span class="label label-success">{!!$dispo->status!!}</span> | ||
| 94 | @elseif($dispo->status=="inactive") | ||
| 95 | <span class="label label-warning">{!!$dispo->status!!}</span> | ||
| 96 | @endif | ||
| 97 | </small> | ||
| 98 | </div> | ||
| 99 | </div> | ||
| 100 | </div> | ||
| 101 | </div> --> | ||
| 102 | <div class="col-sm-3 col-xs-4"> | ||
| 103 | <div class="text-center"> | ||
| 104 | <p class="strong">Disposition</p> | ||
| 105 | <!-- <span class="badge badge-primary" data-toggle="tooltip" data-title="Published" data-placement="left" data-container="body">0</span> --> | ||
| 106 | <span class="badge badge-primary badge-stroke" data-toggle="tooltip" data-title="Subscribed" data-placement="right" data-container="body">{!!$dispo->totalDisposition!!}</span> | ||
| 107 | </div> | ||
| 108 | </div> | ||
| 109 | |||
| 110 | </div> | ||
| 111 | <!-- // END Dispolist Listing --> | ||
| 112 | <?php } }else{?> | ||
| 113 | <div class="row innerAll half border-bottom bg-gray-hover"> | ||
| 114 | <div class="col-sm-6 col-xs-8" style="text-align: center;"> | ||
| 115 | <b>No data available</b> | ||
| 116 | </div> | ||
| 117 | </div> | ||
| 118 | <?php } ?> | ||
| 119 | <?php //echo $grouplist->render(); ?> | ||
| 120 | |||
| 121 | </div> | ||
| 122 | <!-- // END col-separator --> | ||
| 123 | </div> | ||
| 124 | <!-- // END col --> | ||
| 125 | |||
| 126 | <!-- col --> | ||
| 127 | <div class="col-md-6"> | ||
| 128 | |||
| 129 | <!-- col-separator --> | ||
| 130 | <div class="col-separator col-separator-last" id=dispositionPlanFormDiv> | ||
| 131 | </div> | ||
| 132 | <!-- // END col-separator --> | ||
| 133 | |||
| 134 | </div> | ||
| 135 | <!-- // END col-table --> | ||
| 136 | |||
| 137 | </div> | ||
| 138 | <!-- // END col-separator.box --> | ||
| 139 | |||
| 140 | </div> | ||
| 141 | <!-- // END col --> | ||
| 142 | |||
| 143 | </div> | ||
| 144 | <!-- // END row-app --> | ||
| 145 | |||
| 146 | </div> | ||
| 147 | <script> | ||
| 148 | $(".pagination a").click(function(e){ | ||
| 149 | e.preventDefault(); | ||
| 150 | var url=$(this).attr("href"); | ||
| 151 | var res = url.split("page="); | ||
| 152 | menuAction("group?page="+res[1]); | ||
| 153 | return false; | ||
| 154 | }); | ||
| 155 | |||
| 156 | $(document).ready(function(){ | ||
| 157 | |||
| 158 | }); | ||
| 159 | </script> | ||
| 160 | <style type="text/css"> | ||
| 161 | .tmar { | ||
| 162 | margin-top : 10px; | ||
| 163 | } | ||
| 164 | .iconsize { | ||
| 165 | font-size: 2em; | ||
| 166 | margin-top: 5px; | ||
| 167 | } | ||
| 168 | </style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
custom/db/campaign_disposition_plan.sql
0 → 100644
| 1 | -- phpMyAdmin SQL Dump | ||
| 2 | -- version 4.5.3.1 | ||
| 3 | -- http://www.phpmyadmin.net | ||
| 4 | -- | ||
| 5 | -- Host: localhost | ||
| 6 | -- Generation Time: Feb 25, 2019 at 08:52 AM | ||
| 7 | -- Server version: 10.0.28-MariaDB | ||
| 8 | -- PHP Version: 5.6.29 | ||
| 9 | |||
| 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; | ||
| 11 | SET time_zone = "+00:00"; | ||
| 12 | |||
| 13 | |||
| 14 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | ||
| 15 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | ||
| 16 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | ||
| 17 | /*!40101 SET NAMES utf8mb4 */; | ||
| 18 | |||
| 19 | -- | ||
| 20 | -- Database: `flexydial_hdfc_beu` | ||
| 21 | -- | ||
| 22 | |||
| 23 | -- -------------------------------------------------------- | ||
| 24 | |||
| 25 | -- | ||
| 26 | -- Table structure for table `campaign_disposition_plan` | ||
| 27 | -- | ||
| 28 | |||
| 29 | CREATE TABLE `campaign_disposition_plan` ( | ||
| 30 | `id` int(11) NOT NULL, | ||
| 31 | `campaign` varchar(50) NOT NULL, | ||
| 32 | `dispo_plan_id` int(11) NOT NULL, | ||
| 33 | `created_at` datetime NOT NULL, | ||
| 34 | `updated_at` datetime NOT NULL | ||
| 35 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
| 36 | |||
| 37 | -- | ||
| 38 | -- Indexes for dumped tables | ||
| 39 | -- | ||
| 40 | |||
| 41 | -- | ||
| 42 | -- Indexes for table `campaign_disposition_plan` | ||
| 43 | -- | ||
| 44 | ALTER TABLE `campaign_disposition_plan` | ||
| 45 | ADD PRIMARY KEY (`id`); | ||
| 46 | |||
| 47 | -- | ||
| 48 | -- AUTO_INCREMENT for dumped tables | ||
| 49 | -- | ||
| 50 | |||
| 51 | -- | ||
| 52 | -- AUTO_INCREMENT for table `campaign_disposition_plan` | ||
| 53 | -- | ||
| 54 | ALTER TABLE `campaign_disposition_plan` | ||
| 55 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; | ||
| 56 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; | ||
| 57 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; | ||
| 58 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; |
custom/db/disposition.sql
0 → 100644
| 1 | -- phpMyAdmin SQL Dump | ||
| 2 | -- version 4.5.3.1 | ||
| 3 | -- http://www.phpmyadmin.net | ||
| 4 | -- | ||
| 5 | -- Host: localhost | ||
| 6 | -- Generation Time: Feb 20, 2019 at 10:52 AM | ||
| 7 | -- Server version: 10.0.28-MariaDB | ||
| 8 | -- PHP Version: 5.6.29 | ||
| 9 | |||
| 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; | ||
| 11 | SET time_zone = "+00:00"; | ||
| 12 | |||
| 13 | |||
| 14 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | ||
| 15 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | ||
| 16 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | ||
| 17 | /*!40101 SET NAMES utf8mb4 */; | ||
| 18 | |||
| 19 | -- | ||
| 20 | -- Database: `flexydial_hdfc_beu` | ||
| 21 | -- | ||
| 22 | |||
| 23 | -- -------------------------------------------------------- | ||
| 24 | |||
| 25 | -- | ||
| 26 | -- Table structure for table `disposition` | ||
| 27 | -- | ||
| 28 | |||
| 29 | CREATE TABLE `disposition` ( | ||
| 30 | `id` int(11) NOT NULL, | ||
| 31 | `plan` varchar(100) NOT NULL, | ||
| 32 | `code` varchar(2) NOT NULL, | ||
| 33 | `name` varchar(100) NOT NULL, | ||
| 34 | `status` enum('active','inactive') NOT NULL DEFAULT 'active', | ||
| 35 | `created_at` datetime NOT NULL, | ||
| 36 | `updated_at` datetime NOT NULL | ||
| 37 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
| 38 | |||
| 39 | -- | ||
| 40 | -- Dumping data for table `disposition` | ||
| 41 | -- | ||
| 42 | |||
| 43 | INSERT INTO `disposition` (`id`, `plan`, `code`, `name`, `status`, `created_at`, `updated_at`) VALUES | ||
| 44 | (1, 'Not Contacted', 'NC', 'Not Contacted', 'active', '2019-02-20 10:50:56', '2019-02-20 10:50:56'), | ||
| 45 | (2, 'Contacted', 'CC', 'Contacted', 'active', '2019-02-20 10:52:17', '2019-02-20 10:52:17'), | ||
| 46 | (3, 'Login', 'LN', 'Login', 'active', '2019-02-20 10:52:35', '2019-02-20 10:52:35'); | ||
| 47 | |||
| 48 | -- | ||
| 49 | -- Indexes for dumped tables | ||
| 50 | -- | ||
| 51 | |||
| 52 | -- | ||
| 53 | -- Indexes for table `disposition` | ||
| 54 | -- | ||
| 55 | ALTER TABLE `disposition` | ||
| 56 | ADD PRIMARY KEY (`id`); | ||
| 57 | |||
| 58 | -- | ||
| 59 | -- AUTO_INCREMENT for dumped tables | ||
| 60 | -- | ||
| 61 | |||
| 62 | -- | ||
| 63 | -- AUTO_INCREMENT for table `disposition` | ||
| 64 | -- | ||
| 65 | ALTER TABLE `disposition` | ||
| 66 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; | ||
| 67 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; | ||
| 68 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; | ||
| 69 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; |
custom/db/disposition_plan.sql
0 → 100644
| 1 | -- phpMyAdmin SQL Dump | ||
| 2 | -- version 4.5.3.1 | ||
| 3 | -- http://www.phpmyadmin.net | ||
| 4 | -- | ||
| 5 | -- Host: localhost | ||
| 6 | -- Generation Time: Feb 25, 2019 at 08:53 AM | ||
| 7 | -- Server version: 10.0.28-MariaDB | ||
| 8 | -- PHP Version: 5.6.29 | ||
| 9 | |||
| 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; | ||
| 11 | SET time_zone = "+00:00"; | ||
| 12 | |||
| 13 | |||
| 14 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | ||
| 15 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | ||
| 16 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | ||
| 17 | /*!40101 SET NAMES utf8mb4 */; | ||
| 18 | |||
| 19 | -- | ||
| 20 | -- Database: `flexydial_hdfc_beu` | ||
| 21 | -- | ||
| 22 | |||
| 23 | -- -------------------------------------------------------- | ||
| 24 | |||
| 25 | -- | ||
| 26 | -- Table structure for table `disposition_plan` | ||
| 27 | -- | ||
| 28 | |||
| 29 | CREATE TABLE `disposition_plan` ( | ||
| 30 | `id` int(11) NOT NULL, | ||
| 31 | `name` varchar(500) NOT NULL, | ||
| 32 | `status` enum('active','inactive') NOT NULL DEFAULT 'active', | ||
| 33 | `created_at` datetime NOT NULL, | ||
| 34 | `updated_at` datetime NOT NULL | ||
| 35 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
| 36 | |||
| 37 | -- | ||
| 38 | -- Indexes for dumped tables | ||
| 39 | -- | ||
| 40 | |||
| 41 | -- | ||
| 42 | -- Indexes for table `disposition_plan` | ||
| 43 | -- | ||
| 44 | ALTER TABLE `disposition_plan` | ||
| 45 | ADD PRIMARY KEY (`id`); | ||
| 46 | |||
| 47 | -- | ||
| 48 | -- AUTO_INCREMENT for dumped tables | ||
| 49 | -- | ||
| 50 | |||
| 51 | -- | ||
| 52 | -- AUTO_INCREMENT for table `disposition_plan` | ||
| 53 | -- | ||
| 54 | ALTER TABLE `disposition_plan` | ||
| 55 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; | ||
| 56 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; | ||
| 57 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; | ||
| 58 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; |
custom/db/disposition_plan_config.sql
0 → 100644
| 1 | -- phpMyAdmin SQL Dump | ||
| 2 | -- version 4.5.3.1 | ||
| 3 | -- http://www.phpmyadmin.net | ||
| 4 | -- | ||
| 5 | -- Host: localhost | ||
| 6 | -- Generation Time: Feb 25, 2019 at 08:54 AM | ||
| 7 | -- Server version: 10.0.28-MariaDB | ||
| 8 | -- PHP Version: 5.6.29 | ||
| 9 | |||
| 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; | ||
| 11 | SET time_zone = "+00:00"; | ||
| 12 | |||
| 13 | |||
| 14 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | ||
| 15 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | ||
| 16 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | ||
| 17 | /*!40101 SET NAMES utf8mb4 */; | ||
| 18 | |||
| 19 | -- | ||
| 20 | -- Database: `flexydial_hdfc_beu` | ||
| 21 | -- | ||
| 22 | |||
| 23 | -- -------------------------------------------------------- | ||
| 24 | |||
| 25 | -- | ||
| 26 | -- Table structure for table `disposition_plan_config` | ||
| 27 | -- | ||
| 28 | |||
| 29 | CREATE TABLE `disposition_plan_config` ( | ||
| 30 | `id` int(11) NOT NULL, | ||
| 31 | `dispo_plan_id` int(11) NOT NULL, | ||
| 32 | `disposition` varchar(500) NOT NULL, | ||
| 33 | `sub_disposition` varchar(1000) NOT NULL, | ||
| 34 | `created_at` datetime NOT NULL, | ||
| 35 | `updated_at` datetime NOT NULL | ||
| 36 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
| 37 | |||
| 38 | -- | ||
| 39 | -- Indexes for dumped tables | ||
| 40 | -- | ||
| 41 | |||
| 42 | -- | ||
| 43 | -- Indexes for table `disposition_plan_config` | ||
| 44 | -- | ||
| 45 | ALTER TABLE `disposition_plan_config` | ||
| 46 | ADD PRIMARY KEY (`id`); | ||
| 47 | |||
| 48 | -- | ||
| 49 | -- AUTO_INCREMENT for dumped tables | ||
| 50 | -- | ||
| 51 | |||
| 52 | -- | ||
| 53 | -- AUTO_INCREMENT for table `disposition_plan_config` | ||
| 54 | -- | ||
| 55 | ALTER TABLE `disposition_plan_config` | ||
| 56 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; | ||
| 57 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; | ||
| 58 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; | ||
| 59 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; |
custom/db/sub_disposition.sql
0 → 100644
| 1 | -- phpMyAdmin SQL Dump | ||
| 2 | -- version 4.5.3.1 | ||
| 3 | -- http://www.phpmyadmin.net | ||
| 4 | -- | ||
| 5 | -- Host: localhost | ||
| 6 | -- Generation Time: Feb 20, 2019 at 10:53 AM | ||
| 7 | -- Server version: 10.0.28-MariaDB | ||
| 8 | -- PHP Version: 5.6.29 | ||
| 9 | |||
| 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; | ||
| 11 | SET time_zone = "+00:00"; | ||
| 12 | |||
| 13 | |||
| 14 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | ||
| 15 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | ||
| 16 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | ||
| 17 | /*!40101 SET NAMES utf8mb4 */; | ||
| 18 | |||
| 19 | -- | ||
| 20 | -- Database: `flexydial_hdfc_beu` | ||
| 21 | -- | ||
| 22 | |||
| 23 | -- -------------------------------------------------------- | ||
| 24 | |||
| 25 | -- | ||
| 26 | -- Table structure for table `sub_disposition` | ||
| 27 | -- | ||
| 28 | |||
| 29 | CREATE TABLE `sub_disposition` ( | ||
| 30 | `id` int(11) NOT NULL, | ||
| 31 | `dispo_id` int(11) NOT NULL, | ||
| 32 | `name` varchar(100) NOT NULL, | ||
| 33 | `created_at` datetime NOT NULL, | ||
| 34 | `updated_at` datetime NOT NULL | ||
| 35 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
| 36 | |||
| 37 | -- | ||
| 38 | -- Dumping data for table `sub_disposition` | ||
| 39 | -- | ||
| 40 | |||
| 41 | INSERT INTO `sub_disposition` (`id`, `dispo_id`, `name`, `created_at`, `updated_at`) VALUES | ||
| 42 | (1, 1, 'Wrong No/ Out of Service', '2019-02-20 10:50:56', '2019-02-20 10:50:56'), | ||
| 43 | (2, 1, 'Ringing No Response', '2019-02-20 10:50:56', '2019-02-20 10:50:56'), | ||
| 44 | (3, 1, 'Not Reachable', '2019-02-20 10:50:56', '2019-02-20 10:50:56'), | ||
| 45 | (4, 2, 'Appointment Fixed', '2019-02-20 10:52:17', '2019-02-20 10:52:17'), | ||
| 46 | (5, 2, 'Follow Up', '2019-02-20 10:52:17', '2019-02-20 10:52:17'), | ||
| 47 | (6, 2, 'Not Interested', '2019-02-20 10:52:17', '2019-02-20 10:52:17'), | ||
| 48 | (7, 2, 'NI-DND', '2019-02-20 10:52:17', '2019-02-20 10:52:17'), | ||
| 49 | (8, 2, 'Not Eligible', '2019-02-20 10:52:17', '2019-02-20 10:52:17'), | ||
| 50 | (9, 2, 'Duplicate Lead', '2019-02-20 10:52:17', '2019-02-20 10:52:17'), | ||
| 51 | (10, 2, 'NCPR Customer', '2019-02-20 10:52:17', '2019-02-20 10:52:17'), | ||
| 52 | (11, 2, 'DNC Customer', '2019-02-20 10:52:17', '2019-02-20 10:52:17'), | ||
| 53 | (12, 3, 'LOS Number', '2019-02-20 10:52:35', '2019-02-20 10:52:35'); | ||
| 54 | |||
| 55 | -- | ||
| 56 | -- Indexes for dumped tables | ||
| 57 | -- | ||
| 58 | |||
| 59 | -- | ||
| 60 | -- Indexes for table `sub_disposition` | ||
| 61 | -- | ||
| 62 | ALTER TABLE `sub_disposition` | ||
| 63 | ADD PRIMARY KEY (`id`); | ||
| 64 | |||
| 65 | -- | ||
| 66 | -- AUTO_INCREMENT for dumped tables | ||
| 67 | -- | ||
| 68 | |||
| 69 | -- | ||
| 70 | -- AUTO_INCREMENT for table `sub_disposition` | ||
| 71 | -- | ||
| 72 | ALTER TABLE `sub_disposition` | ||
| 73 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13; | ||
| 74 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; | ||
| 75 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; | ||
| 76 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; |
-
Please register or sign in to post a comment