Commit 10dcfc09 by Azhan Hannan

cosmetic - set button export to the left. option to filter report summary by department or by all.

parent 0b78a1ff
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
Report Summary Report Summary
</div> </div>
<button class="right floated center aligned ui violet compact labeled icon button" onclick="window.location.href='{{ route('timesheet::export.exportsummary', ['month'=> $intmonth, 'year'=> $year]) }}';"> <button class="floated center aligned ui violet compact labeled icon button" onclick="window.location.href='{{ route('timesheet::export.exportsummary', ['month'=> $intmonth, 'year'=> $year]) }}';">
<i class="file excel outline icon"></i> <i class="file excel outline icon"></i>
Export to Excel Export to Excel
</button> </button>
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<div class="five wide field"> <div class="five wide field">
<label>Department</label> <label>Department</label>
<select name="dept" class="ui fluid dropdown" required="required"> <select name="dept" class="ui fluid dropdown" required="required">
<option value="all">All staffs</option>
@foreach($dept as $key => $value) @foreach($dept as $key => $value)
<option value="{{data_get($value, 'id')}}">{{ data_get($value,'description') }}</option> <option value="{{data_get($value, 'id')}}">{{ data_get($value,'description') }}</option>
@endforeach @endforeach
......
...@@ -83,11 +83,19 @@ class ReportController extends Controller ...@@ -83,11 +83,19 @@ class ReportController extends Controller
// dd($ovhours); // dd($ovhours);
$chargeproject = VwChargeable::all(); $chargeproject = VwChargeable::all();
// $nonchargeproject = VwNonChargeable::all();
if ($request->dept == 'all') {
$staffs = VwStaff::orderby('deptID')
->where('deptID','!=', 8)
->get();
}
else
{
$staffs = VwStaff::orderby('deptID') $staffs = VwStaff::orderby('deptID')
->where('deptID','!=', 8) ->where('deptID','!=', 8)
->where('deptID', $request->dept) ->where('deptID', $request->dept)
->get(); ->get();
}
$year = date('Y'); $year = date('Y');
if ($request->year) { if ($request->year) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment