e837975b by G Manojkumar

Virtual channel Template

1 parent 4a7ea0e4
1 <?php
2
3 namespace App\Http\Controllers;
4
5 use Illuminate\Http\Request;
6
7 use App\Http\Requests;
8
9 class VirtualController extends Controller
10 {
11 /**
12 * Display a listing of the resource.
13 *
14 * @return \Illuminate\Http\Response
15 */
16 public function index()
17 {
18
19 }
20
21 /**
22 * Show the form for creating a new resource.
23 *
24 * @return \Illuminate\Http\Response
25 */
26 public function create()
27 {
28 //
29 }
30
31 /**
32 * Store a newly created resource in storage.
33 *
34 * @param \Illuminate\Http\Request $request
35 * @return \Illuminate\Http\Response
36 */
37 public function store(Request $request)
38 {
39 //
40 }
41
42 /**
43 * Display the specified resource.
44 *
45 * @param int $id
46 * @return \Illuminate\Http\Response
47 */
48 public function show($id)
49 {
50 if($id=="virtualdata")
51 {
52 return view("layout.module.virtualchannel.virtualdata",array());
53 }
54
55 return view("layout.module.virtualchannel.$id",array());
56
57 }
58
59 /**
60 * Show the form for editing the specified resource.
61 *
62 * @param int $id
63 * @return \Illuminate\Http\Response
64 */
65 public function edit($id)
66 {
67 //
68 }
69
70 /**
71 * Update the specified resource in storage.
72 *
73 * @param \Illuminate\Http\Request $request
74 * @param int $id
75 * @return \Illuminate\Http\Response
76 */
77 public function update(Request $request, $id)
78 {
79 //
80 }
81
82 /**
83 * Remove the specified resource from storage.
84 *
85 * @param int $id
86 * @return \Illuminate\Http\Response
87 */
88 public function destroy($id)
89 {
90 //
91 }
92 }
...@@ -50,6 +50,7 @@ Route::group(['middleware' => ['web']], function () { ...@@ -50,6 +50,7 @@ Route::group(['middleware' => ['web']], function () {
50 Route::resource('hr','HRController'); 50 Route::resource('hr','HRController');
51 Route::resource('social','SocialController'); 51 Route::resource('social','SocialController');
52 Route::resource('web','WebController'); 52 Route::resource('web','WebController');
53 Route::resource('virtualchannel','VirtualController');
53 54
54 Route::get('notes', array('uses' => 'NotesController@loadQuestions', 'as'=>'questionare.load_questions')); 55 Route::get('notes', array('uses' => 'NotesController@loadQuestions', 'as'=>'questionare.load_questions'));
55 Route::post('notes',array('uses' => 'NotesController@store', 'as'=>'notes.store')); 56 Route::post('notes',array('uses' => 'NotesController@store', 'as'=>'notes.store'));
......
...@@ -97,6 +97,7 @@ return [ ...@@ -97,6 +97,7 @@ return [
97 "Dialer" => ["disp"=>"Dialer","icon"=>"phone","dash"=>"Dialer", 97 "Dialer" => ["disp"=>"Dialer","icon"=>"phone","dash"=>"Dialer",
98 "submenu"=>["Dialer"=>["kDialerModel();"], 98 "submenu"=>["Dialer"=>["kDialerModel();"],
99 "Reports"=>["menuAction('dialer/reports');"], 99 "Reports"=>["menuAction('dialer/reports');"],
100 "Virtual channels"=>["menuAction('virtualchannel/Virtualdata');"],
100 ]], 101 ]],
101 "DialerCampaign" => ["disp"=>"Dialer","icon"=>"phone","dash"=>"", 102 "DialerCampaign" => ["disp"=>"Dialer","icon"=>"phone","dash"=>"",
102 "submenu"=>[ 103 "submenu"=>[
......
1 <?php
2 //Here array is Productname=>array(LG,ExpectedAmt,LC,Amount)
3 $Product = array('Term'=>array('','','',''),'SmartPay'=> array('' , 'NA', '','NA' ),'BillPay'=>array('','NA','','NA'),'BillPay+SI'=>array('','NA','','NA'),'CC LE'=>array('','NA','','NA'),'CC Upgrade'=>array('','NA','','NA'),'PL10Sec'=>array('','','',''),'Quick Money'=>array('','','',''),'Jaldi5'=>array('','','',''),'GI'=>array('','','',''),'MF'=>array('','','',''),'FD/RD'=>array('','','',''),'LI'=>array('','','',''),'AL'=>array('','','',''),'PL-CRM'=>array('','','',''),'PL-DAP'=>array('','','',''),'HL'=>array('','','',''),'Other Assets'=>array('','','',''),'DEMAT'=>array('','NA','','NA'),'CDL'=>array('','','',''),'CC-Fresh'=>array('','NA','','NA'),'CC-STP'=>array('','NA','','NA'),'CASA'=>array('','NA','','NA'),'PayZapp Registration'=>array('','NA','','NA'));
4 ?>
1 <?php
2 use App\Models\CRMCall;
3 use App\Models\User;
4 use App\Jobs\KHRMSLib;
5
6 $attempts = CRMCall::where('userstatus','!=','InboundDROP')->where('created_at','>',date('Y-m-d',time()))->where('user_id','=',Auth::user()->id)->count();
7 //print_r(($attempts));
8
9 $Contacts = CRMCall::where('userstatus','NOT IN',"('NORECORD','InboundDROP')")->where('created_at','>',date('Y-m-d',time()))->where('user_id','=',Auth::user()->id)->count();
10 $uniqueContacts = DB::select("select count(distinct(number)) as uniquecount from crmcalls where userstatus NOT IN ('InboundDROP','NORECORD') and user_id=".Auth::user()->id." group by number");
11 //print_r($uniqueContacts);
12 //include(resource_path().'/views/layout/module/virtualchannel/VirtualFieldsArray.php');
13 //print_r($Product);
14
15 //echo "<div>Virtual</div>";
16 ?>
17
18 <div class="table-responsive" style="background: #fff;">
19 <br>
20 <div><h4>Virtual Channels</h4></div>
21 <table class="table">
22 <thead>
23 <tr>
24 <th>No.of Attempts</th>
25 <th><?php echo $attempts; ?></th>
26 </tr>
27 <tr>
28 <th>No.of Contacts</th>
29 <th><?php echo $Contacts; ?></th>
30 </tr>
31 <tr>
32 <th>Unique Contacts</th>
33 <th><?php foreach($uniqueContacts as $uniquecounts){echo $uniquecounts->uniquecount; } ?></th>
34 </tr>
35 <tr>
36 <th>Income Achievement</th>
37 <th></th>
38 </tr>
39 <tr>
40 <th>Product</th>
41 <th>LG</th>
42 <th>Expected Amount(If Applicable)</th>
43 <th>LC</th>
44 <th>Amount(If Applicable)</th>
45 </tr>
46
47 <?php
48 include(resource_path().'/views/layout/module/virtualchannel/VirtualFieldsArray.php');
49 foreach ($Product as $ProductType => $value) {
50 $i=1;
51 ?>
52 <tr>
53 <td><?php echo $ProductType; ?></td>
54 <?php foreach ($value as $key => $ProductAmt) { ?>
55
56 <td><?php if($ProductAmt==''){ ?><input type="number" name=<?php echo $ProductType."".$i;?> id=<?php echo $ProductType."".$i;?>> <?php }else echo $ProductAmt; $i++;}?></td>
57 </tr>
58 <?php } ?>
59 </table>
60
61 </div>
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!