Commit 398b0d85 by hannan

changes after internal review and timesheet reporting

parent 18f24ba2
......@@ -35,7 +35,7 @@
</div>
</div>
<br>
<a class="ui teal left ribbon label">Timesheet Tracking</a>
<a class="ui teal left ribbon label">Timesheet Status</a>
<br>
<table class="ui unstackable celled table">
<thead>
......
......@@ -43,7 +43,7 @@
<td style="width: 20%;">Nonchargeable (B) : {{ data_get($staff,'nonchargeable') }}</td>
<td style="width: 20%;">Overhead (C) : {{ data_get($staff,'overhead') }}</td>
<td style="width: 15%;">Overtime: {{ data_get($staff,'overtime') }}</td>
<td class="right aligned">Total Hours/Days: {{ data_get($staff,'totalhrs')." hours/ ".data_get($staff,'totaldays')." days" }}</td>
<td class="right aligned">Total Hours/Days: {{ data_get($staff,'totalhrs')." hours/ ".number_format(data_get($staff,'totalhrs')/8, 1, '.', '')." days" }}</td>
</tr>
</thead>
</table>
......@@ -78,7 +78,7 @@
<td style="width: 26%;">{{ data_get($chargeable, 'pname') }}</td>
<td style="width: 26%;">{{ data_get($chargeable, 'pmname') }}</td>
<td style="width: 12.5%;" class="center aligned">{{ data_get($chargeable, 'hours') }}</td>
<td style="width: 12.5%;" class="center aligned">{{ data_get($chargeable, 'hours')/8 }}</td>
<td style="width: 12.5%;" class="center aligned">{{ number_format(data_get($chargeable, 'hours')/8, 1, '.', '') }}</td>
</tr>
@endforeach
@endif
......@@ -90,7 +90,7 @@
<td style="width: 26%;">{{ data_get($nonchargeable, 'pname') }}</td>
<td style="width: 26%;">{{ data_get($nonchargeable, 'pmname') }}</td>
<td style="width: 12.5%;" class="center aligned">{{ data_get($nonchargeable, 'hours') }}</td>
<td style="width: 12.5%;" class="center aligned">{{ data_get($nonchargeable, 'hours')/8 }}</td>
<td style="width: 12.5%;" class="center aligned">{{ number_format(data_get($nonchargeable, 'hours')/8, 1, '.', '') }}</td>
</tr>
@endforeach
@endif
......@@ -102,7 +102,7 @@
<td style="width: 26%;">{{ data_get($chargeable, 'pname') }}</td>
<td style="width: 26%;">{{ data_get($chargeable, 'pmname') }}</td>
<td style="width: 12.5%;" class="center aligned">{{ data_get($chargeable, 'hours') }}</td>
<td style="width: 12.5%;" class="center aligned">{{ data_get($chargeable, 'hours')/8 }}</td>
<td style="width: 12.5%;" class="center aligned">{{ number_format(data_get($chargeable, 'hours')/8, 1, '.', '') }}</td>
</tr>
@endforeach
@endif
......
......@@ -42,7 +42,7 @@
<td style="width: 20%;">Nonchargeable (B) : {{ data_get($staff,'nonchargeable') }}</td>
<td style="width: 20%;">Overhead (C) : {{ data_get($staff,'overhead') }}</td>
<td style="width: 15%;">Overtime: {{ data_get($staff,'overtime') }}</td>
<td class="right aligned">Total Hours/Days: {{ data_get($staff,'totalhrs')." hours/ ".data_get($staff,'totaldays')." days" }}</td>
<td class="right aligned">Total Hours/Days: {{ data_get($staff,'totalhrs')." hours/ ".number_format(data_get($staff,'totalhrs')/8, 1, '.', '')." days" }}</td>
</tr>
</thead>
</table>
......@@ -78,7 +78,7 @@
<td style="width: 26%;">{{ data_get($chargeable, 'pname') }}</td>
<td style="width: 26%;">{{ data_get($chargeable, 'pmname') }}</td>
<td style="width: 12.5%;" class="center aligned">{{ data_get($chargeable, 'hours') }}</td>
<td style="width: 12.5%;" class="center aligned">{{ data_get($chargeable, 'hours')/8 }}</td>
<td style="width: 12.5%;" class="center aligned">{{ number_format(data_get($chargeable, 'hours')/8, 1, '.', '') }}</td>
</tr>
@endforeach
@endif
......@@ -90,7 +90,7 @@
<td style="width: 26%;">{{ data_get($nonchargeable, 'pname') }}</td>
<td style="width: 26%;">{{ data_get($nonchargeable, 'pmname') }}</td>
<td style="width: 12.5%;" class="center aligned">{{ data_get($nonchargeable, 'hours') }}</td>
<td style="width: 12.5%;" class="center aligned">{{ data_get($nonchargeable, 'hours')/8 }}</td>
<td style="width: 12.5%;" class="center aligned">{{ number_format(data_get($nonchargeable, 'hours')/8, 1, '.', '') }}</td>
</tr>
@endforeach
@endif
......@@ -102,7 +102,7 @@
<td style="width: 26%;">{{ data_get($chargeable, 'pname') }}</td>
<td style="width: 26%;">{{ data_get($chargeable, 'pmname') }}</td>
<td style="width: 12.5%;" class="center aligned">{{ data_get($chargeable, 'hours') }}</td>
<td style="width: 12.5%;" class="center aligned">{{ data_get($chargeable, 'hours')/8 }}</td>
<td style="width: 12.5%;" class="center aligned">{{ number_format(data_get($chargeable, 'hours')/8, 1, '.', '') }}</td>
</tr>
@endforeach
@endif
......
......@@ -3,7 +3,7 @@
@section('content')
<div class="ui segment">
<div class="ui blue left ribbon label">
<div class="ui pink left ribbon label">
Timesheet Viewer
</div>
<br><br>
......@@ -146,7 +146,7 @@
@if($valchargehour)
<td>{{ $totalcharge }}</td>
<td>{{ $totalcharge/8 }}</td>
<td>{{ number_format($totalcharge/8, 1, '.', '') }}</td>
@else
<td>0</td>
<td>0</td>
......@@ -193,7 +193,7 @@
@endif
<th>@if($totalchargehrs){{ $totalchargehrs }}@else 0 @endif</th>
<th>@if($totalchargehrs){{ $totalchargehrs/8 }}@else 0 @endif</th>
<th>@if($totalchargehrs){{ number_format($totalchargehrs/8, 1, '.', '') }}@else 0 @endif</th>
</tfoot>
</table>
</div>
......@@ -301,7 +301,7 @@
@if($valnonchargehour)
<td>{{ $totalnoncharge }}</td>
<td>{{ $totalnoncharge/8 }}</td>
<td>{{ number_format($totalnoncharge/8, 1, '.', '') }}</td>
@else
<td>0</td>
<td>0</td>
......@@ -346,7 +346,7 @@
@endfor
@endif
<th>@if($totalnonchargehrs){{ $totalnonchargehrs }}@else 0 @endif</th>
<th>@if($totalnonchargehrs){{ $totalnonchargehrs/8 }}@else 0 @endif</th>
<th>@if($totalnonchargehrs){{ number_format($totalnonchargehrs/8, 1, '.', '') }}@else 0 @endif</th>
</tfoot>
</table>
</div>
......@@ -451,7 +451,7 @@
@if($totaloverhead)
<td>{{ $totaloverhead }}</td>
<td>{{ $totaloverhead/8 }}</td>
<td>{{ number_format($totaloverhead/8, 1, '.', '') }}</td>
@else
<td>0</td>
<td>0</td>
......@@ -496,7 +496,7 @@
@endfor
@endif
<th>@if($totaloverheadhrs) {{ $totaloverheadhrs }} @else 0 @endif</th>
<th>@if($totaloverheadhrs) {{ $totaloverheadhrs/8 }} @else 0 @endif</th>
<th>@if($totaloverheadhrs) {{ number_format($totaloverheadhrs/8, 1, '.', '') }} @else 0 @endif</th>
</tfoot>
</table>
</div>
......@@ -620,7 +620,7 @@
@endfor
@endif
<td> @if($check) {{ ($totalnonchargehrs + $totaloverheadhrs) }} @else 0 @endif </td>
<td> {{ ($totalnonchargehrs + $totaloverheadhrs)/8 }} </td>
<td> {{ number_format(($totalnonchargehrs + $totaloverheadhrs)/8, 1, '.', '') }} </td>
</tr>
<tr>
......@@ -728,7 +728,7 @@
0
@endif
</td>
<td>{{ $totalot/8 }}</td>
<td>{{ number_format($totalot/8, 1, '.', '') }}</td>
</tr>
</tbody>
</table>
......@@ -749,9 +749,9 @@
<tr>
<?php $verifiername = $approvalname= ""; ?>
<td class="center aligned">@if($check){{ data_get($check,'tm_submission_at') }}@endif</td>
<td class="center aligned">@if($check->tm_verified_by){{ data_get($profile,'HOD_NAME') }}@endif</td>
<td class="center aligned">@if($check){{ data_get($profile,'HOD_NAME') }}@endif</td>
<td class="center aligned">@if($check){{ data_get($check,'tm_verified_at') }}@endif</td>
<td class="center aligned">@if($check->tm_approved_by){{ data_get($profile,'BOD_NAME') }}@endif</td>
<td class="center aligned">@if($check){{ data_get($profile,'BOD_NAME') }}@endif</td>
<td class="center aligned">@if($check){{$check->tm_approved_at}}@endif</td>
</tr>
</tbody>
......@@ -759,9 +759,7 @@
</div>
</div>
<br>
@if($curruser->id == $user->penyokong)
<button type="button" class="ui green button" onclick="window.location.href='{{ route('timesheet::dashboard.timesheetReview',[ 'phase' => $phase, 'month' => $month ]) }}';">Back</button>
......@@ -770,7 +768,9 @@
@else
@if($check != null)
@if(data_get($check,'tm_timesheet_master_sts') != (2||3||4) )
<button type="button" class="ui green button" onclick="window.location.href='{{ route('timesheet::dashboard.tsubmit',[ 'tid'=> $check->id, 'totalot'=> $totalot, 'totalchargehrs'=>$totalchargehrs, 'totalnonchargehrs'=> $totalnonchargehrs, 'totaloverheadhrs'=>$totaloverheadhrs ]) }}';">Submit</button>
@endif
@else
<button type="button" class="ui disabled green button">Submit</button>
@endif
......
......@@ -39,7 +39,7 @@ input[type=number] {
</div>
</form> -->
<br>
@if($phase == 1)
<!-- @if($phase == 1)
<button class="center aligned ui green compact right labeled icon button" id="phase2" onclick="window.location.href='{{ route('timesheet::form.chargeableForm', ['phase' => 2, 'month' => $month, 'year' => $year]) }}';">
<i class="angle double right icon"></i>
Phase 2
......@@ -49,7 +49,20 @@ input[type=number] {
<i class="angle double left icon"></i>
Phase 1
</button>
@endif
@endif -->
<button class="center aligned ui violet compact right labeled icon button" onclick="window.location.href='{{ route('timesheet::form.nonChargeableForm', ['phase' => $phase, 'month' => $month, 'year' => $year]) }}';">
<i class="angle double right icon"></i>
Non-Chargeable Form
</button>
<button class="center aligned ui purple compact right labeled icon button" onclick="window.location.href='{{ route('timesheet::form.overheadForm', ['phase' => $phase, 'month' => $month, 'year' => $year]) }}';">
<i class="angle double right icon"></i>
Overhead Form
</button>
<button class="center aligned ui pink compact right labeled icon button" onclick="window.location.href='{{ route('timesheet::dashboard.timesheetViewer', ['phase' => $phase, 'month' => $month, 'year' => $year]) }}';">
<i class="angle double right icon"></i>
Timesheet Viewer
</button>
<form class="ui form" action="{{ route('timesheet::form.savechargeablehours' )}}" method="POST">
{{csrf_field()}}
<input type="hidden" name="userId" value="{{$userId}}">
......@@ -63,7 +76,7 @@ input[type=number] {
<th colspan="@if($phase == 1) 15 @else {{$daymonth-15}} @endif" class="center aligned">Date</th>
<th rowspan="2">
@if($projectlist == [])
<button type="submit" class="ui disabled fluid center aligned ui blue compact labeled icon button">
<button type="submit" class="fluid center aligned ui blue compact labeled icon button">
<i class="save icon"></i>
Save
</button>
......@@ -172,10 +185,6 @@ input[type=number] {
</table>
</form>
<br>
<button class="center aligned ui teal compact right labeled icon button" onclick="window.location.href='{{ route('timesheet::form.nonChargeableForm', ['phase' => $phase, 'month' => $month, 'year' => $year]) }}';">
<i class="angle double right icon"></i>
Non-Chargeable Form
</button>
</div>
@endsection
......
......@@ -64,11 +64,11 @@ input[type=number] {
</div>
<div class="ui segment">
<a class="ui blue left ribbon label">Non-Chargeable Form</a>
<a class="ui violet left ribbon label">Non-Chargeable Form</a>
<br>
<br>
@if($phase == 1)
<!-- @if($phase == 1)
<button class="center aligned ui green compact right labeled icon button" id="phase2" onclick="window.location.href='{{ route('timesheet::form.nonChargeableForm', ['phase' => 2, 'month' => $month, 'year' => $year]) }}';">
<i class="angle double right icon"></i>
Phase 2
......@@ -78,9 +78,20 @@ input[type=number] {
<i class="angle double left icon"></i>
Phase 1
</button>
@endif
<button class="center aligned ui olive compact labeled icon button" id="task">
@endif -->
<button class="center aligned ui blue compact labeled icon button" onclick="window.location.href='{{ route('timesheet::form.chargeableForm', ['phase' => $phase, 'month' => $month, 'year' => $year]) }}';">
<i class="angle double left icon"></i>
Chargeable Form
</button>
<button class="center aligned ui purple compact right labeled icon button" onclick="window.location.href='{{ route('timesheet::form.overheadForm', ['phase' => $phase, 'month' => $month, 'year' => $year, 'fk_tm_id' => $fk_tm_id]) }}';">
<i class="angle double right icon"></i>
Overhead Form
</button>
<button class="center aligned ui pink compact right labeled icon button" onclick="window.location.href='{{ route('timesheet::dashboard.timesheetViewer', ['phase' => $phase, 'month' => $month, 'year' => $year]) }}';">
<i class="angle double right icon"></i>
Timesheet Viewer
</button>
<button class="right floated aligned ui olive compact labeled icon button" id="task">
<i class="plus icon"></i>
Task
</button>
......@@ -207,14 +218,6 @@ input[type=number] {
</table>
</form>
<br>
<button class="center aligned ui teal compact labeled icon button" onclick="window.location.href='{{ route('timesheet::form.chargeableForm', ['phase' => $phase, 'month' => $month, 'year' => $year]) }}';">
<i class="angle double left icon"></i>
Chargeable Form
</button>
<button class="center aligned ui teal compact right labeled icon button" onclick="window.location.href='{{ route('timesheet::form.overheadForm', ['phase' => $phase, 'month' => $month, 'year' => $year, 'fk_tm_id' => $fk_tm_id]) }}';">
<i class="angle double right icon"></i>
Overhead Form
</button>
</div>
@endsection
......
......@@ -2,7 +2,7 @@
@section('content')
<div class="ui small modal uploadmodal">
<div class="ui orange modal uploadmodal">
<div class="header">
Upload Attachment
</div>
......@@ -27,17 +27,26 @@
<div class="ui unstackable segment">
<a class="ui blue left ribbon label">Senarai Notes</a>
<br><br>
@if(data_get($staff,'fk_lkp_department') == 7)
<button class="ui right floated small purple labeled icon button" id="uploadmodal">
<button class="right floated aligned ui olive compact labeled icon button" id="uploadmodal">
<i class="file icon"></i>
Upload File
</button>
@endif
<a href="{{ route('timesheet::form.penambahannote') }}" class="ui right floated small yellow labeled icon button">
<a href="{{ route('timesheet::form.penambahannote') }}" class="right floated aligned ui orange compact labeled icon button">
<i class="plus icon"></i>Add New Notes
</a><br><br>
</a>
<button class="center aligned ui purple compact labeled icon button" onclick="window.location.href='{{ route('timesheet::form.overheadForm', ['phase' => $phase, 'month' => $month]) }}';">
<i class="angle double left icon"></i>
Overhead Form
</button>
<button class="center aligned ui pink compact right labeled icon button" onclick="window.location.href='{{ route('timesheet::dashboard.timesheetViewer', ['phase' => $phase, 'month' => $month, 'year' => $year]) }}';">
<i class="angle double right icon"></i>
Timesheet Viewer
</button>
<table class="ui celled padded table">
<thead>
<tr>
......@@ -59,14 +68,6 @@
</tbody>
</table>
<button class="center aligned ui teal compact labeled icon button" onclick="window.location.href='{{ route('timesheet::form.overheadForm', ['phase' => $phase, 'month' => $month]) }}';">
<i class="angle double left icon"></i>
Overhead Form
</button>
<button class="center aligned ui green compact right labeled icon button" onclick="window.location.href='{{ route('timesheet::dashboard.timesheetViewer', ['phase' => $phase, 'month' => $month, 'year' => $year]) }}';">
<i class="angle double right icon"></i>
Timesheet Viewer
</button>
</div>
@endsection
......
......@@ -22,7 +22,7 @@ input[type=number] {
</div>
<div class="ui segment">
<a class="ui blue left ribbon label">Overhead Form</a>
<a class="ui purple left ribbon label">Overhead Form</a>
<br>
<!-- <form class="ui form">
<div class="field">
......@@ -44,7 +44,7 @@ input[type=number] {
</form> -->
<br>
@if($phase == 1)
<!-- @if($phase == 1)
<button class="center aligned ui green compact right labeled icon button" id="phase2" onclick="window.location.href='{{ route('timesheet::form.overheadForm', ['phase' => 2, 'month' => $month, 'year' => $year]) }}';">
<i class="angle double right icon"></i>
Phase 2
......@@ -54,12 +54,23 @@ input[type=number] {
<i class="angle double left icon"></i>
Phase 1
</button>
@endif
<button class="center aligned ui yellow compact labeled icon button" id="notes" onclick="window.location.href='{{ route('timesheet::form.notelist', ['year'=> $year, 'month'=> $month, 'phase'=> $phase, 'fk_tm_id'=> $fk_tm_id] ) }} ';">
@endif -->
<button class="center aligned ui blue compact labeled icon button" onclick="window.location.href='{{ route('timesheet::form.chargeableForm', ['phase' => $phase, 'month' => $month, 'year' => $year]) }}';">
<i class="angle double left icon"></i>
Chargeable Form
</button>
<button class="center aligned ui violet compact labeled icon button" onclick="window.location.href='{{ route('timesheet::form.nonChargeableForm', ['phase' => $phase, 'month' => $month, 'year' => $year]) }}';">
<i class="angle double left icon"></i>
Non-Chargeable Form
</button>
<button class="right floated aligned ui yellow compact labeled icon button" id="notes" onclick="window.location.href='{{ route('timesheet::form.notelist', ['year'=> $year, 'month'=> $month, 'phase'=> $phase, 'fk_tm_id'=> $fk_tm_id] ) }} ';">
<i class="plus icon"></i>
Notes
</button>
<button class="center aligned ui pink compact right labeled icon button" onclick="window.location.href='{{ route('timesheet::dashboard.timesheetViewer', ['phase' => $phase, 'month' => $month, 'year' => $year]) }}';">
<i class="angle double right icon"></i>
Timesheet Viewer
</button>
<form class="ui form" action="{{ route('timesheet::form.saveoverheadhours' )}}" method="POST">
{{csrf_field()}}
......@@ -173,14 +184,6 @@ input[type=number] {
</table>
</form>
<br>
<button class="center aligned ui teal compact labeled icon button" onclick="window.location.href='{{ route('timesheet::form.nonChargeableForm', ['phase' => $phase, 'month' => $month, 'year' => $year]) }}';">
<i class="angle double left icon"></i>
Non-Chargeable Form
</button>
<button class="center aligned ui green compact right labeled icon button" onclick="window.location.href='{{ route('timesheet::dashboard.timesheetViewer', ['phase' => $phase, 'month' => $month, 'year' => $year]) }}';">
<i class="angle double right icon"></i>
Timesheet Viewer
</button>
</div>
......
......@@ -39,7 +39,7 @@
</div>
</div>
<button class="ui button" type="submit">Submit</button>
<button class="ui button" type="submit">Open Form</button>
</form>
</div>
......
......@@ -18,7 +18,7 @@
<option value="0">Inactive</option>
</select>
</div>
<button class="ui button" type="submit">Submit</button>
<button class="ui button" type="submit">Add</button>
</form>
</div>
@endsection
\ No newline at end of file
......@@ -18,7 +18,7 @@
<option value="0">Inactive</option>
</select>
</div>
<button class="ui button" type="submit">Submit</button>
<button class="ui button" type="submit">Add</button>
</form>
</div>
@endsection
\ No newline at end of file
......@@ -32,7 +32,7 @@
<option value="0">Inactive</option>
</select>
</div>
<button class="ui blue button" type="submit">Submit</button>
<button class="ui blue button" type="submit">Add</button>
<button class="ui green button" type="button" onclick="window.location.href='{{ route('timesheet::maintenance.senaraiProject') }} ';">Back</button>
</form>
</div>
......
......@@ -54,7 +54,7 @@
<option value="0">Inactive</option>
</select>
</div>
<button class="ui blue button" type="submit">Save</button>
<button class="ui blue button" type="submit">Add</button>
<button class="ui green button" type="button" onclick="window.location.href='{{ route('timesheet::maintenance.senaraiProjectTeam', ['id'=> $pid] ) }} ';">Back</button>
</form>
</div>
......
......@@ -35,7 +35,7 @@
<option value="0">Inactive</option>
</select>
</div>
<button class="ui blue button" type="submit">Submit</button>
<button class="ui blue button" type="submit">Update</button>
<button class="ui green button" type="button" onclick="window.location.href='{{ route('timesheet::maintenance.senaraiProject') }} ';">Back</button>
</form>
</div>
......
@extends('ui::layouts.app')
@section('content')
<div class="ui segment">
<div class="ui purple left ribbon label">
Report by Project
</div>
<br>
<br>
<div class="ui styled fluid accordion">
<div class="title">
<table class="ui unstackable celled table">
<thead>
<tr>
<th>TIMESHEET {{$month}} {{$year}} by Project</th>
</tr>
<tr>
<th>Project: </th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>aiaya</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
@endsection
@push('script')
@endpush
\ No newline at end of file
@extends('ui::layouts.app')
@section('content')
<div class="ui segment">
<a class="ui green left ribbon label">Report by Project</a>
<br><br>
<form class="ui form" action="{{ route('timesheet::report.generateprojectreport') }}" method="POST">
{{csrf_field()}}
<div class="five wide field">
<label>Project</label>
<select name="project" class="ui fluid dropdown" required="required">
@foreach($proj as $key => $value)
<option value="{{ data_get($value,'id') }}">{{ data_get($value,'p_project_code') }} | {{ data_get($value,'p_project_description') }}</option>
@endforeach
</select>
</div>
<div class="two fields">
<div class="three wide field">
<label>Year</label>
<select name="year" class="ui fluid dropdown" required="required">
@foreach($year as $key => $value)
<option value="{{ data_get($value,'tm_year') }}">{{ data_get($value,'tm_year') }}</option>
@endforeach
</select>
</div>
<div class="three wide field">
<label>Month</label>
<select name="month" class="ui fluid dropdown" required="required">
@foreach($month as $key => $value)
<option value="{{ $key+1 }}">{{ $value }}</option>
@endforeach
</select>
</div>
</div>
<button class="ui olive button" type="submit">Generate Report</button>
</form>
</div>
@endsection
\ No newline at end of file
......@@ -4,18 +4,21 @@
<div class="ui segment">
<div class="ui purple left ribbon label">
Ringkasan Laporan
Report Summary
</div>
<br>
<br>
<div class="ui styled fluid accordion">
<div class="title">
<div class="title scrolling content">
<table class="ui unstackable celled table">
<thead>
<tr>
<th colspan="{{count($chargeproject)+7}}"><b>TIMESHEET {{strtoupper($month)}} {{$year}}</b></th>
</tr>
<tr>
<th colspan="5"></th>
<th colspan="{{count($chargeproject)}}">Chargeable</th>
<th colspan="{{count($chargeproject)}}" class="center aligned">Chargeable</th>
<th colspan="2"></th>
</tr>
<tr>
......@@ -33,20 +36,36 @@
<th>Total Days</th>
</tr>
</thead>
<?php
// dd(count($staffs->where('deptID', 1)));
?>
@foreach($staffs as $key => $staff)
<tbody>
<tr>
<td>{{$key+1}}</td>
<td>{{data_get($staff,'deptName')}}</td>
<td>{{data_get($staff,'deptCode')}}</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>
<td></td>
<?php $total = 0; ?>
@foreach($chargeproject as $key => $chargeable)
<td>
@foreach($ringkasan as $key => $value)
@if(data_get($value,'staffid') == data_get($staff,'staffid') && data_get($chargeable,'id') == data_get($value,'c_pid'))
{{data_get($value,'total_c_hours')}}
<?php $total += data_get($value,'total_c_hours'); ?>
@endif
@endforeach
</td>
@endforeach
<td class="center aligned">{{$total}}</td>
<td class="center aligned">{{number_format($total/8, 1, '.', '')}}</td>
</tr>
</tbody>
@endforeach
</table>
</div>
</div>
......
......@@ -3,7 +3,7 @@
@section('content')
<div class="ui segment">
<a class="ui green left ribbon label">Laporan Projek Chargeable </a>
<a class="ui green left ribbon label">Report Summary </a>
<br><br>
<form class="ui form" action="{{ route('timesheet::report.generateRingkasan') }}" method="POST">
......@@ -20,7 +20,7 @@
<div class="two fields">
<div class="three wide field">
<label>Tahun</label>
<label>Year</label>
<select name="year" class="ui fluid dropdown" required="required">
@foreach($year as $key => $value)
<option value="{{ data_get($value,'tm_year') }}">{{ data_get($value,'tm_year') }}</option>
......@@ -28,7 +28,7 @@
</select>
</div>
<div class="three wide field">
<label>Bulan</label>
<label>Month</label>
<select name="month" class="ui fluid dropdown" required="required">
@foreach($month as $key => $value)
<option value="{{ $key+1 }}">{{ $value }}</option>
......@@ -37,7 +37,7 @@
</div>
</div>
<button class="ui olive button" type="submit">Jana Laporan</button>
<button class="ui olive button" type="submit">Generate Report</button>
</form>
</div>
......
......@@ -33,6 +33,10 @@ Route::group(
//laporan
Route::get('ringkasanLaporan', ['uses' => 'ReportController@ringkasanLaporan', 'as' => 'report.ringkasanLaporan']);
Route::post('generateRingkasan', ['uses' => 'ReportController@generateRingkasan', 'as' => 'report.generateRingkasan']);
Route::get('projectreport', ['uses' => 'ReportController@projectreport', 'as' => 'report.projectReport']);
Route::post('generateprojectreport', ['uses' => 'ReportController@generateprojectreport', 'as' => 'report.generateprojectreport']);
Route::get('deptreport', ['uses' => 'ReportController@deptreport', 'as' => 'report.deptreport']);
Route::post('generatedeptreport', ['uses' => 'ReportController@generatedeptreport', 'as' => 'report.generatedeptreport']);
//maintenance
Route::get('senaraiProject',['uses' => 'MaintenanceController@senaraiProject', 'as' => 'maintenance.senaraiProject']);
......
......@@ -55,17 +55,47 @@ class ReportController extends Controller
public function generateRingkasan(Request $request)
{
$ringkasan = VwRingkasanLaporan::all();
$ringkasan = VwRingkasanLaporan::where('month', $request->month)
->where('year', $request->year)
->get();
$chargeproject = VwChargeable::all();
$nonchargeproject = VwNonChargeable::all();
$staffs = VwStaff::all();
$staffs = VwStaff::orderby('deptID')->get();
// dd($nonchargeproject);
$curryear = date('Y');
$year = date('Y');
if ($request->year) {
$curryear = $request->year;
$year = $request->year;
}
$month = date('F', mktime(0,0,0,$request->month, 1, date('Y')));
return view('timesheet::report.ringkasan', compact('month', 'year','ringkasan', 'chargeproject', 'nonchargeproject', 'staffs'));
}
public function projectreport()
{
$proj = Project::where('p_project_type', 1)
->get();
$month = [];
for ($m=1; $m<=12; $m++) {
$month[] = date('F', mktime(0,0,0,$m, 1, date('Y')));
}
return view('timesheet::report.ringkasan', compact('ringkasan', 'chargeproject', 'nonchargeproject', 'staffs'));
$year = Ts_master::select('tm_year')
->distinct('tm_year')
->orderby('tm_year','DESC')
->get();
return view('timesheet::report.projectReport', compact('proj', 'month', 'year'));
}
public function generateprojectreport(Request $request)
{
dd($request);
return view('timesheet::report.project');
}
}
\ No newline at end of file
......@@ -50,8 +50,8 @@ class ServiceProvider extends BaseServiceProvider
protected function menu()
{
$dashboard = $this->app['laravolt.menu']->add(__('Halaman Utama'))->data('icon', 'align justify');
$dashboard->add(__('Halaman Utama'), url('/home/'))
$dashboard = $this->app['laravolt.menu']->add(__('Dashboard'))->data('icon', 'align justify');
$dashboard->add(__('Dashboard'), url('/home/'))
->data('icon', 'tachometer alternate icon')
->active('home/*');
......@@ -62,79 +62,75 @@ class ServiceProvider extends BaseServiceProvider
$form = $this->app['laravolt.menu'];
// $form = $this->app['laravolt.menu']->add(__('Borang'))->data('icon', 'align justify');
$form->add(__('Borang Chargeable'), route('timesheet::form.filterChargeable'))
->data('icon', 'file outline outline')
$form->add(__('Timesheet Form'), route('timesheet::form.filterChargeable'))
->data('icon', 'calendar alternate outline icon')
->active('chargeableForm/*')
->data('permission', Permission::borang);
$form->add(__('Borang Non-Chargeable'), route('timesheet::form.filterNonChargeable'))
->data('icon', 'file outline outline')
->active('nonChargeableForm/*')
->data('permission', Permission::borang);
// $form->add(__('Borang Non-Chargeable'), route('timesheet::form.filterNonChargeable'))
// ->data('icon', 'file outline outline')
// ->active('nonChargeableForm/*')
// ->data('permission', Permission::borang);
$form->add(__('Borang Overhead'), route('timesheet::form.filterOverhead'))
->data('icon', 'file outline outline')
->active('overheadForm/*')
->data('permission', Permission::borang);
// $form->add(__('Borang Overhead'), route('timesheet::form.filterOverhead'))
// ->data('icon', 'file outline outline')
// ->active('overheadForm/*')
// ->data('permission', Permission::borang);
$form->add(__('Notes'), route('timesheet::form.filterNotes'))
->data('icon', 'file outline outline')
->active('notelist/*')
->data('permission', Permission::borang);
// $form->add(__('Notes'), route('timesheet::form.filterNotes'))
// ->data('icon', 'file outline outline')
// ->active('notelist/*')
// ->data('permission', Permission::borang);
$form->add(__('Timesheet Viewer'), route('timesheet::dashboard.filterViewer'))
->data('icon', 'file outline icon')
->data('icon', 'calendar alternate outline icon')
->active('timesheetViewer/*')
->data('permission', Permission::tsviewer);
$form->add(__('Timesheet Review'), route('timesheet::dashboard.filterReview'))
->data('icon', 'file outline icon')
->data('icon', 'calendar alternate outline icon')
->active('timesheetReview/*')
->data('permission', Permission::kehadiran);
$form->add(__('Timesheet Approval'), route('timesheet::dashboard.filterApproval'))
->data('icon', 'file outline icon')
->data('icon', 'calendar alternate outline icon')
->active('timesheetApproval/*')
->data('permission', Permission::kehadiran);
$form->add(__('Timesheet Report'))
->data('icon', 'file outline icon')
->active('timesheetReport/*')
->data('permission', Permission::kehadiran);
$laporan = $this->app['laravolt.menu']->add(__('Laporan'))->data('icon', 'align justify');
$laporan->add(__('Ringkasan Laporan'), route('timesheet::report.ringkasanLaporan'))
$laporan = $this->app['laravolt.menu']->add(__('Report'))->data('icon', 'align justify');
$laporan->add(__('Report Summary'), route('timesheet::report.ringkasanLaporan'))
->data('icon', 'file alternate outline icon')
->active('pengurusan/*')
->data('permission', Permission::laporan);
$laporan->add(__('Laporan Projek Non-Chargeable'))
$laporan->add(__('Report by Project'))
->data('icon', 'file alternate outline icon')
->active('pengurusan/*')
->data('permission', Permission::laporan);
$laporan->add(__('Laporan Mengikut Jabatan & Staf'))
$laporan->add(__('Report by Department'), route('timesheet::report.projectReport'))
->data('icon', 'file alternate outline icon')
->active('pengurusan/*')
->data('permission', Permission::laporan);
$pengurusanProject = $this->app['laravolt.menu']->add(__('Pengurusan Project'))->data('icon', 'align justify');
$pengurusanProject->add(__('Senarai Project'), route('timesheet::maintenance.senaraiProject'))
$pengurusanProject = $this->app['laravolt.menu']->add(__('Project Management'))->data('icon', 'align justify');
$pengurusanProject->add(__('List of Project'), route('timesheet::maintenance.senaraiProject'))
->data('icon', 'users icon')
->active('pengurusan/*')
->data('permission', Permission::pengurusan);
$pengurusanProject->add(__('Penambahan Project'), route('timesheet::maintenance.penambahanProject'))
$pengurusanProject->add(__('Add New Project'), route('timesheet::maintenance.penambahanProject'))
->data('icon', 'users icon')
->active('pengurusan/*')
->data('permission', Permission::pengurusan);
$pengurusanProject->add(__('Senarai Overhead'), route('timesheet::maintenance.senaraiOverhead'))
$pengurusanProject->add(__('List of Overhead'), route('timesheet::maintenance.senaraiOverhead'))
->data('icon', 'users icon')
->active('pengurusan/*')
->data('permission', Permission::pengurusan);
$pengurusanProject->add(__('Penambahan Overhead'), route('timesheet::maintenance.penambahanOverhead'))
$pengurusanProject->add(__('Add New Overhead'), route('timesheet::maintenance.penambahanOverhead'))
->data('icon', 'users icon')
->active('pengurusan/*')
->data('permission', Permission::pengurusan);
$pengurusanProject->add(__('Senarai Peranan'), route('timesheet::maintenance.senaraiPeranan'))
$pengurusanProject->add(__('List of Roles'), route('timesheet::maintenance.senaraiPeranan'))
->data('icon', 'users icon')
->active('pengurusan/*')
->data('permission', Permission::pengurusan);
$pengurusanProject->add(__('Penambahan Peranan'), route('timesheet::maintenance.penambahanPeranan'))
$pengurusanProject->add(__('Add New Roles'), route('timesheet::maintenance.penambahanPeranan'))
->data('icon', 'users icon')
->active('pengurusan/*')
->data('permission', Permission::pengurusan);
......
......@@ -5,11 +5,11 @@
<a class="ui red ribbon label">{{ ucfirst(auth()->user()->name) }}</a>
<p></p>
<a class="ui yellow image label">
<i class="user circle icon"></i>Peranan
<i class="user circle icon"></i>Role
<div class="detail">{{ ucfirst(auth()->user()->roles['0']->name) }}</div>
</a>
<p></p>
<a href="{{ route('auth::logout') }}" class="ui teal left ribbon label">Log Keluar</a>
<a href="{{ route('auth::logout') }}" class="ui teal left ribbon label">Logout</a>
<p></p>
</div>
</div>
......
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