Commit c5dacab1 by hannan

changes in timesheet viewer

parent 96e7cbc3
...@@ -8,46 +8,97 @@ ...@@ -8,46 +8,97 @@
</div> </div>
<br><br> <br><br>
<div class="ui horizontal segments"> <table class="ui unstackable collapsing table">
<div class="center aligned ui segment"> <tbody>
<div class="ui labeled input"> <tr>
<div class="ui label"> <td rowspan="4">
Name: <img src="https://www.3fresources.com/app/themes/3f/images/3f-logo.svg" height="126" width="126" alt="3f-logo">
</td>
<td>Name</td>
<td>:</td>
<td>Azhan Hannan</td>
<td rowspan="4"></td>
<td>Department</td>
<td>:</td>
<td>PSS</td>
<td rowspan="4"></td>
</tr>
<tr>
<td>Staff No</td>
<td>:</td>
<td>999</td>
<td>Reporting Manager</td>
<td>:</td>
<td>En. Faizal</td>
</tr>
<tr>
<td>Designation</td>
<td>:</td>
<td>Intern</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Month</td>
<td>:</td>
<td>
<div class="ui form">
<div class="field">
<select class="ui search dropdown">
<option value="1">January</option>
<option value="2">February</option>
</select>
</div> </div>
<input type="text" placeholder="">
</div><br><br>
<div class="ui labeled input">
<div class="ui label">
Staff No:
</div>
<input type="text" placeholder="">
</div><br><br>
<div class="ui labeled input">
<div class="ui label">
Designation:
</div>
<input type="text" placeholder="">
</div>
</div>
<div class="center aligned ui segment">
<div class="ui labeled input">
<div class="ui label">
Department:
</div>
<input type="text" placeholder="">
</div><br><br>
<div class="ui labeled input">
<div class="ui label">
Reporting Manager:
</div>
<input type="text" placeholder="">
</div> </div>
</td>
<td>Phase</td>
<td>:</td>
<td>
<div class="ui form">
<div class="field">
<select class="ui search dropdown">
<option value="1">1</option>
<option value="2">2</option>
</select>
</div> </div>
</div> </div>
</td>
</td>
</tr>
</tbody>
</table>
<div class="ui segment"> <div class="ui segment">
Chargeable <table class="ui celled structured table unstackable">
<thead>
<tr>
<th colspan="2">Chargeable</th>
<th colspan="@if($phase == 1) 15 @else {{$daymonth-15}} @endif" class="center aligned">Date</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>Project Code</td>
<td>Project Name</td>
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
<td>{{$i+1}}</td>
@endfor
@else
@for($i = 15; $i < $daymonth; $i++)
<td>{{$i+1}}</td>
@endfor
@endif
<td>Total Hours</td>
</tr>
</tbody>
</table>
</div> </div>
<div class="ui segment"> <div class="ui segment">
Non Chargeable Non Chargeable
</div> </div>
......
...@@ -73,9 +73,6 @@ input[type=number] { ...@@ -73,9 +73,6 @@ input[type=number] {
@endif @endif
<th>Total Hours</th> <th>Total Hours</th>
</tr> </tr>
<tr>
</tr>
</thead> </thead>
<tbody> <tbody>
......
...@@ -106,15 +106,15 @@ class DashboardController extends Controller ...@@ -106,15 +106,15 @@ class DashboardController extends Controller
$year = date('Y'); $year = date('Y');
$day = date('j'); $day = date('j');
$day = 16; // $day = 16;
if ($day<16) { if ($day < 16) {
$phase = 1; $phase = 1;
} else { } else {
$phase = 2; $phase = 2;
} }
// dd($phase); $daymonth=cal_days_in_month(CAL_GREGORIAN,$month,$year);
$myDate = $month.'/'.$day.'/'.$year; $myDate = $month.'/'.$day.'/'.$year;
$date = Carbon::createFromFormat('m/d/Y', $myDate); $date = Carbon::createFromFormat('m/d/Y', $myDate);
...@@ -138,7 +138,7 @@ class DashboardController extends Controller ...@@ -138,7 +138,7 @@ class DashboardController extends Controller
} }
return view('timesheet::dashboard.timesheetViewer', compact('user', 'dept', 'phase', 'month', 'year', 'day', 'strMonth')); return view('timesheet::dashboard.timesheetViewer', compact('user', 'dept', 'phase', 'month', 'year', 'day', 'strMonth', 'daymonth'));
} }
......
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