supervisorreport.blade.php 3.66 KB

<div class="container">
        <div style="text-align:center">
                <h2>Output Report</h2>
                <p></p>
        </div>

        <div class="row">
                <div class="column">
                        <form class="form-horizontal"  id="output-report-supervisor" name="output-report-supervisor">
                                <div class="table-responsive" style="background: #fff;">
<br>
				<div class="dropdown">
<label style="text-indent: 2em;">
<h5>
Select RM/PB :
</h5>
</label>
<select id="supervisorid" style="border:3px solid #efefef;" onchange='userchange("");'>
<option value="ALL">ALL
</option>
<?php
        foreach($supervisor as $user){
        $selected = ($user->id == $users)?"selected":"";
?>
<option value="{{$user->id }}" {{$selected}}>{{$user->username}}</option>
<?php } ?>
</select>
</div>
<br>
                                        <table class="table">
                                                <thead>
                                                        <tr>
                                                                <th>No.of Attempts</th>
                                                                <th>{{ $Contacts->call_attempts }}
                                                                </th>
                                                        </tr>
                                                        <tr>
                                                                <th>No.of Contacts</th>
                                                                <th> {{ $Contacts->call_contacts }}
                                                                </th>
                                                        </tr>
                                                        <tr>
                                                                <th>Unique Contacts</th>

                                                                <th> {{ $Contacts->call_unique_contacts }}
                                                                </th>
                                                        </tr>
                                                        <tr>
                                                                <th>Income Achievement</th>
								 <th>{{ $totalIncome }}</th>
                                                        </tr>

                                                        <tr>
                                                                <th>Product</th>
                                                                <th>LG</th>
                                                                <th>Expected Amount(If Applicable)</th>
                                                                <th>LC</th>
                                                                <th>Amount(If Applicable)</th>
                                                        </tr>
                                                </thead>
					<tbody>
						<?php foreach($report as $key => $val){ //print_r($val); ?>
						<tr>
							<td>{{$val->product_name}}</td>
							<td>{{$val->totallead}}</td>
							<td>{{$val->totalleadamt}}</td>
							<td>{{$val->totalleadclosed}}</td>
							<td>{{$val->leadcloseamt}}</td>
						</tr>
						<?php } ?>
					</tbody>
                                          </table>
				</div>
			</form>
			<script>
				function userchange()
				{
					var user = $('#supervisorid').val();
					//console.log(user);
					doAjax('outputreport/supervisordata?user='+user,'','middlemainreportdiv','ajax_create_supervisor_report','singlethis','GET', function(retstr){
			menuAction('outputreport/supervisordata?user='+user);
	});
	}
			</script>
		</div>
	</div>