Commit 99707ac9 by Azhan Hannan

Log Pia #33 - TIMESHEET FORM & TIMESHEET VIEWER - Tambah paparan ‘Year’ ( DISPLAY CURRENT YEAR )

parent 1f7d0ea7
...@@ -10,16 +10,6 @@ ...@@ -10,16 +10,6 @@
{{csrf_field()}} {{csrf_field()}}
<div class="@if($currmonth == 1) three fields @else two fields @endif"> <div class="@if($currmonth == 1) three fields @else two fields @endif">
@if($currmonth == 1)
<div class="three wide field">
<label>Year</label>
<select name="year" class="ui fluid dropdown" required="required">
<option value="{{ $curryear-1 }}">{{ $curryear-1 }}</option>
<option value="{{ $curryear }}">{{ $curryear }}</option>
</select>
</div>
@endif
<div class="three wide field"> <div class="three wide field">
<label>Month</label> <label>Month</label>
...@@ -37,6 +27,21 @@ ...@@ -37,6 +27,21 @@
<option value="2">2nd Half-month</option> <option value="2">2nd Half-month</option>
</select> </select>
</div> </div>
@if($currmonth == 1)
<div class="three wide field">
<label>Year</label>
<select name="year" class="ui fluid dropdown" required="required">
<option value="{{ $curryear-1 }}">{{ $curryear-1 }}</option>
<option value="{{ $curryear }}">{{ $curryear }}</option>
</select>
</div>
@else
<div class="three wide field">
<label>Year</label>
<input type="text" name="year" class="ui fluid dropdown" value="{{ $curryear }}" readonly="readonly">
</div>
@endif
</div> </div>
<button class="ui green button" type="submit">Open Form</button> <button class="ui green button" type="submit">Open Form</button>
......
...@@ -32,7 +32,7 @@ class FormController extends Controller ...@@ -32,7 +32,7 @@ class FormController extends Controller
public function filterChargeable() public function filterChargeable()
{ {
$currmonth = date('n'); $currmonth = date('n');
// $currmonth = 1; $currmonth = 1;
$curryear = date('Y'); $curryear = date('Y');
...@@ -45,20 +45,6 @@ class FormController extends Controller ...@@ -45,20 +45,6 @@ class FormController extends Controller
return view('timesheet::form.filterChargeable', compact('month', 'currmonth', 'curryear')); return view('timesheet::form.filterChargeable', compact('month', 'currmonth', 'curryear'));
} }
// public function filterNonChargeable()
// {
// $currmonth = date('n');
// $curryear = date('Y');
// $month = [];
// for ($m=1; $m<=12; $m++) {
// $month[] = date('F', mktime(0,0,0,$m, 1, date('Y')));
// }
// return view('timesheet::form.filterNonChargeable', compact('month', 'currmonth', 'curryear'));
// }
public function filterOverhead() public function filterOverhead()
{ {
$currmonth = date('n'); $currmonth = date('n');
......
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