Commit 99707ac9 by Azhan Hannan

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

parent 1f7d0ea7
......@@ -10,16 +10,6 @@
{{csrf_field()}}
<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">
<label>Month</label>
......@@ -38,6 +28,21 @@
</select>
</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>
<button class="ui green button" type="submit">Open Form</button>
</form>
......
......@@ -32,7 +32,7 @@ class FormController extends Controller
public function filterChargeable()
{
$currmonth = date('n');
// $currmonth = 1;
$currmonth = 1;
$curryear = date('Y');
......@@ -45,20 +45,6 @@ class FormController extends Controller
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()
{
$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