Commit df23dbc0 by hannan

Users able to key in hours for each date column except on leave.

Date column disabled and dimmed if the date is exist.
parent 3d0c9b61
...@@ -78,7 +78,11 @@ input[type=number] { ...@@ -78,7 +78,11 @@ input[type=number] {
@if($phase == 1) @if($phase == 1)
@for($i = 0; $i < 15 ; $i++) @for($i = 0; $i < 15 ; $i++)
<td > <td >
<input type="text" onkeypress="onlynumber(event)" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="@if($project['td_date'] == $i+1) {{$project['td_hours']}} @endif" min="0" max="24" style="padding:2px;margin:unset" onchange="limiter(this);"> @if($project['td_date'] == $i+1)
<input type="text" onkeypress="onlynumber(event)" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="{{$project['td_hours']}}" min="0" max="24" style="padding:2px;margin:unset;color:#A0A0A0;" onchange="limiter(this);" readonly="readonly">
@else
<input type="text" onkeypress="onlynumber(event)" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="" min="0" max="24" style="padding:2px;margin:unset" onchange="limiter(this);">
@endif
</td> </td>
@endfor @endfor
@else @else
...@@ -89,7 +93,7 @@ input[type=number] { ...@@ -89,7 +93,7 @@ input[type=number] {
@endfor @endfor
@endif @endif
<td> <td>
<input type="number" onkeypress="onlynumber(event)" name="" style="padding-right: 4px;padding-left: 4px;" onchange="limiter(this);" readonly=""> <input type="number" onkeypress="onlynumber(event)" name="total" style="padding-right: 4px;padding-left: 4px;" onchange="limiter(this);" readonly="">
</td> </td>
</tr> </tr>
@endforeach @endforeach
......
...@@ -102,40 +102,41 @@ class DashboardController extends Controller ...@@ -102,40 +102,41 @@ class DashboardController extends Controller
$sampleTimesheet_dtl[] = [ $sampleTimesheet_dtl[] = [
'td_id' => '1', 'td_id' => '2',
'td_date' => date('j-n-Y',strtotime('6/5/2022')), 'td_date' => date('j-n-Y',strtotime('6/5/2022')),
'td_project' => '1', 'td_project' => '2',
'tm_id' => '1', 'tm_id' => '1',
'tm_staff_id' => '1000', 'tm_staff_id' => '1000',
'project_type' => '1', 'project_type' => '1',
'fk_o_id' => '', 'fk_o_id' => '',
'tm_month' => '6', 'tm_month' => '6',
'tm_phase' => '1', 'tm_phase' => '1',
'td_project_code' => 'LHD20212', 'td_project_code' => 'LHD2021',
'td_project_name' => 'SMART', 'td_project_name' => 'APIM',
'td_hours' => '5' 'td_hours' => '3',
]; ];
$sampleTimesheet_dtl[] = [ $sampleTimesheet_dtl[] = [
'td_id' => '2', 'td_id' => '1',
'td_date' => date('j-n-Y',strtotime('6/5/2022')), 'td_date' => date('j-n-Y',strtotime('6/5/2022')),
'td_project' => '2', 'td_project' => '1',
'tm_id' => '1', 'tm_id' => '1',
'tm_staff_id' => '1000', 'tm_staff_id' => '1000',
'project_type' => '1', 'project_type' => '1',
'fk_o_id' => '', 'fk_o_id' => '',
'tm_month' => '6', 'tm_month' => '6',
'tm_phase' => '1', 'tm_phase' => '1',
'td_project_code' => 'LHD2021', 'td_project_code' => 'LHD20212',
'td_project_name' => 'APIM', 'td_project_name' => 'SMART',
'td_hours' => '3', 'td_hours' => '5'
]; ];
// dd($sampleTimesheet_dtl[0]['td_date']); // dd($sampleTimesheet_dtl[0]['td_date']);
// if (day == $i+1) // if (day == $i+1)
......
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