Commit 18f24ba2 by hannan

changes

parent 9dbaecb6
@extends('ui::layouts.app')
@section('content')
<div class="ui segment">
<div class="ui purple left ribbon label">
Ringkasan Laporan
</div>
<br>
<br>
<div class="ui styled fluid accordion">
<div class="title">
<table class="ui unstackable celled table">
<thead>
<tr>
<th colspan="5"></th>
<th colspan="{{count($chargeproject)}}">Chargeable</th>
<th colspan="2"></th>
</tr>
<tr>
<th>No</th>
<th>Department</th>
<th>Staff Id</th>
<th>Staff Name</th>
<th>Position</th>
@foreach($chargeproject as $key => $chargeable)
<th>
{{data_get($chargeable, 'p_project_code')}}
</th>
@endforeach
<th>Total Hours</th>
<th>Total Days</th>
</tr>
</thead>
@foreach($staffs as $key => $staff)
<tbody>
<tr>
<td>{{$key+1}}</td>
<td>{{data_get($staff,'deptName')}}</td>
<td>{{data_get($staff,'staffid')}}</td>
<td>{{data_get($staff,'name')}}</td>
<td>position</td>
<td>hours</td>
<td>total hours</td>
<td>total days</td>
</tr>
</tbody>
@endforeach
</table>
</div>
</div>
</div>
@endsection
@push('script')
@endpush
\ No newline at end of file
...@@ -18,6 +18,10 @@ use Portal\Timesheet\Model\Role; ...@@ -18,6 +18,10 @@ use Portal\Timesheet\Model\Role;
use Portal\Timesheet\Model\VwViewer; use Portal\Timesheet\Model\VwViewer;
use Portal\Timesheet\Model\VwReviewProfile; use Portal\Timesheet\Model\VwReviewProfile;
use Portal\Timesheet\Model\VwReviewDetails; use Portal\Timesheet\Model\VwReviewDetails;
use Portal\Timesheet\Model\VwRingkasanLaporan;
use Portal\Timesheet\Model\VwChargeable;
use Portal\Timesheet\Model\VwNonChargeable;
use Portal\Timesheet\Model\VwStaff;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input; use Illuminate\Support\Facades\Input;
use File; use File;
...@@ -51,13 +55,17 @@ class ReportController extends Controller ...@@ -51,13 +55,17 @@ class ReportController extends Controller
public function generateRingkasan(Request $request) public function generateRingkasan(Request $request)
{ {
dd($request); $ringkasan = VwRingkasanLaporan::all();
$chargeproject = VwChargeable::all();
$nonchargeproject = VwNonChargeable::all();
$staffs = VwStaff::all();
// dd($nonchargeproject);
$curryear = date('Y'); $curryear = date('Y');
if ($request->year) { if ($request->year) {
$curryear = $request->year; $curryear = $request->year;
} }
return view('timesheet::report.ringkasan', compact('ringkasan', 'chargeproject', 'nonchargeproject', 'staffs'));
} }
} }
\ No newline at end of file
<?php
namespace Portal\Timesheet\Model;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
class VwChargeable extends Model
{
use Notifiable;
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'vw_chargeable_project';
/**
* undocumented function
*
* @return void
* @author
**/
public function info()
{
}
}
<?php
namespace Portal\Timesheet\Model;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
class VwNonChargeable extends Model
{
use Notifiable;
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'vw_nonchargeable_project';
/**
* undocumented function
*
* @return void
* @author
**/
public function info()
{
}
}
<?php
namespace Portal\Timesheet\Model;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
class VwRingkasanLaporan extends Model
{
use Notifiable;
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'vw_ringkasan_laporan';
/**
* undocumented function
*
* @return void
* @author
**/
public function info()
{
}
}
<?php
namespace Portal\Timesheet\Model;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
class VwStaff extends Model
{
use Notifiable;
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'vw_staff';
/**
* undocumented function
*
* @return void
* @author
**/
public function info()
{
}
}
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