Commit 6410e2ff by Azhan Hannan

Log Pia #159 : Paparkan tajuk report

parent 03a49aa3
...@@ -10,6 +10,7 @@ use Portal\Timesheet\Model\Tproject; ...@@ -10,6 +10,7 @@ use Portal\Timesheet\Model\Tproject;
use Portal\Timesheet\Model\VwRingkasanLaporan; use Portal\Timesheet\Model\VwRingkasanLaporan;
use Portal\Timesheet\Model\VwNonchargeSummary; use Portal\Timesheet\Model\VwNonchargeSummary;
use Portal\Timesheet\Model\VwOverheadSummary; use Portal\Timesheet\Model\VwOverheadSummary;
use Portal\Timesheet\Model\Department;
// use Illuminate\Contracts\Support\Responsable; // use Illuminate\Contracts\Support\Responsable;
use Illuminate\Contracts\View\View; use Illuminate\Contracts\View\View;
use Illuminate\Http\Request; use Illuminate\Http\Request;
...@@ -55,7 +56,7 @@ class RingkasanExport implements ShouldAutoSize, FromView, WithColumnWidths ...@@ -55,7 +56,7 @@ class RingkasanExport implements ShouldAutoSize, FromView, WithColumnWidths
$dept = $this->request['dept']; $dept = $this->request['dept'];
$month = $this->request['month']; $month = $this->request['month'];
$year = $this->request['year']; $year = $this->request['year'];
// dd(Department::where('id', $dept)->first());
$liststaffs = []; $liststaffs = [];
$chargeproject = VwChargeable::where('deleted_at', null)->get(); $chargeproject = VwChargeable::where('deleted_at', null)->get();
...@@ -127,6 +128,7 @@ class RingkasanExport implements ShouldAutoSize, FromView, WithColumnWidths ...@@ -127,6 +128,7 @@ class RingkasanExport implements ShouldAutoSize, FromView, WithColumnWidths
'month' => date('F', mktime(0,0,0,$month, 1, date('Y'))), 'month' => date('F', mktime(0,0,0,$month, 1, date('Y'))),
'year' => $year, 'year' => $year,
'dept' => $dept,
]); ]);
} }
else else
...@@ -174,6 +176,7 @@ class RingkasanExport implements ShouldAutoSize, FromView, WithColumnWidths ...@@ -174,6 +176,7 @@ class RingkasanExport implements ShouldAutoSize, FromView, WithColumnWidths
'month' => date('F', mktime(0,0,0,$month, 1, date('Y'))), 'month' => date('F', mktime(0,0,0,$month, 1, date('Y'))),
'year' => $year, 'year' => $year,
'dept' => Department::where('id', $dept)->first() ,
]); ]);
} }
......
<table> <table>
<thead> <thead>
<tr> <tr>
<th>Department </th> <th></th>
<th> Report by Department </th>
</tr>
<tr>
<th></th>
<th> Department </th>
<th>:</th> <th>:</th>
<th colspan="3"> {{data_get($dept,'description')}} </th> <th colspan="2"> {{data_get($dept,'description')}} </th>
</tr> </tr>
<tr> <tr>
<th></th>
<th> Month/Year</th> <th> Month/Year</th>
<th>:</th> <th>:</th>
<th colspan="3"> {{ date('F', mktime(0, 0, 0, $month, 10)) }} {{$year}}</th> <th colspan="2"> {{ date('F', mktime(0, 0, 0, $month, 10)) }} {{$year}}</th>
</tr> </tr>
</thead> </thead>
</table> </table>
......
<table class="ui unstackable celled table"> <table class="ui unstackable celled table">
<thead> <thead>
<tr><th></th> <tr>
<th></th>
<th colspan="3"> Report Overtime</th>
</tr>
<tr>
<th></th>
<th style="width: 10%">Department</th> <th style="width: 10%">Department</th>
<th style="width: 1%">:</th> <th style="width: 1%">:</th>
<th colspan="2">{{ data_get($dept,'description') }}</th> <th colspan="2">{{ data_get($dept,'description') }}</th>
...@@ -16,6 +21,7 @@ ...@@ -16,6 +21,7 @@
<table class="ui unstackable celled table"> <table class="ui unstackable celled table">
<thead> <thead>
<tr>
<th class="center aligned">No</th> <th class="center aligned">No</th>
<th>Name</th> <th>Name</th>
<th class="center aligned">Staff No</th> <th class="center aligned">Staff No</th>
...@@ -23,6 +29,7 @@ ...@@ -23,6 +29,7 @@
<th class="center aligned">Total Days</th> <th class="center aligned">Total Days</th>
<th class="center aligned">Total Overtime Hours</th> <th class="center aligned">Total Overtime Hours</th>
<th class="center aligned">Total Overtime Days</th> <th class="center aligned">Total Overtime Days</th>
</tr>
</thead> </thead>
<tbody> <tbody>
@foreach($staffs as $key => $staff) @foreach($staffs as $key => $staff)
......
<table class="ui unstackable celled table"> <table class="ui unstackable celled table">
<thead> <thead>
<tr> <tr>
<th></th>
<th colspan="3">Project Report</th>
</tr>
<tr>
<th></th>
<th style="width: 10%">Project </th> <th style="width: 10%">Project </th>
<th style="width: 1%">:</th> <th style="width: 1%">:</th>
<th colspan="2"> {{data_get($pdetail,'pcode')}} - {{data_get($pdetail,'pname')}}</th> <th> {{data_get($pdetail,'pcode')}} - {{data_get($pdetail,'pname')}}</th>
</tr> </tr>
<tr> <tr>
<th></th>
<th style="width: 10%"> Month/Year</th> <th style="width: 10%"> Month/Year</th>
<th style="width: 1%">:</th> <th style="width: 1%">:</th>
<th colspan="2"> {{$month}} {{$year}}</th> <th> {{$month}} {{$year}}</th>
</tr> </tr>
</thead> </thead>
</table> </table>
......
...@@ -2,6 +2,16 @@ ...@@ -2,6 +2,16 @@
<thead> <thead>
<tr> <tr>
<th></th> <th></th>
<th colspan="3"> Report Summary</th>
</tr>
<tr>
<th></th>
<th style="width: 10%"> Department</th>
<th style="width: 1%">:</th>
<th style="width: 89%"> {{ data_get($dept,'description') }} </th>
</tr>
<tr>
<th></th>
<th style="width: 10%"> Month/Year</th> <th style="width: 10%"> Month/Year</th>
<th style="width: 1%">:</th> <th style="width: 1%">:</th>
<th style="width: 89%"> {{ $month}} {{ $year }}</th> <th style="width: 89%"> {{ $month}} {{ $year }}</th>
......
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