Commit 33fbb268 by hannan

project_team migration

parent e750f24c
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateProjectTeamTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('project_team', function (Blueprint $table) {
$table->increments('id');
$table->integer('fk_project_id')->unsigned()->nullable();
$table->string('pt_project_description',50)->nullable();
$table->string('pt_team',50)->nullable();
$table->integer('pt_project_task_sts')->unsigned()->nullable();
$table->timestamps();
$table->integer('updated_by')->nullable();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('project_team');
}
}
...@@ -20,6 +20,7 @@ input[type=number] { ...@@ -20,6 +20,7 @@ input[type=number] {
<a class="ui blue left ribbon label">Chargeable Form</a> <a class="ui blue left ribbon label">Chargeable Form</a>
<br> <br>
<hr> <hr>
Day = {{$day}} Day = {{$day}}
{{$sampleTimesheet_dtl[0]['td_date']}} {{$sampleTimesheet_dtl[0]['td_date']}}
<br> <br>
...@@ -47,8 +48,8 @@ input[type=number] { ...@@ -47,8 +48,8 @@ input[type=number] {
</th> </th>
</tr> </tr>
<tr> <tr>
<th >Project Code</th> <th>Project Code</th>
<th >Project Name</th> <th>Project Name</th>
@if($phase == 1) @if($phase == 1)
@for($i = 0; $i < 15 ; $i++) @for($i = 0; $i < 15 ; $i++)
...@@ -60,7 +61,7 @@ input[type=number] { ...@@ -60,7 +61,7 @@ input[type=number] {
@endfor @endfor
@endif @endif
<th >Total Hours</th> <th>Total Hours</th>
</tr> </tr>
<tr> <tr>
...@@ -81,7 +82,8 @@ input[type=number] { ...@@ -81,7 +82,8 @@ input[type=number] {
<?php <?php
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1); $date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
$valuehour = $hour->where('td_date','=',$date)->where('td_project',$project['td_project']) $valuehour = $hour->where('td_date','=',$date)
->where('td_project',$project['td_project'])
->where('tm_phase',$phase) ->where('tm_phase',$phase)
->first(); ->first();
?> ?>
......
...@@ -81,27 +81,8 @@ class DashboardController extends Controller ...@@ -81,27 +81,8 @@ class DashboardController extends Controller
$userId = Auth::id(); $userId = Auth::id();
$user = users::where('id', Auth::id())->first(); $user = users::where('id', Auth::id())->first();
$projectcode = 'Project Code';
$projectname = 'Project Name';
// nanti project code query dari table project: // nanti project code query dari table project:
$samplequery[] = [
'pcode' => 'LHD2021',
'pname' => 'APIM',
'pid' => '1',
];
$samplequery[] = [
'pcode' => 'LHD20212',
'pname' => 'SMART',
'pid' => '2',
];
$sampleTimesheet_dtl[] = [ $sampleTimesheet_dtl[] = [
'td_id' => '1', 'td_id' => '1',
...@@ -143,7 +124,6 @@ class DashboardController extends Controller ...@@ -143,7 +124,6 @@ class DashboardController extends Controller
// if (day == $i+1) // if (day == $i+1)
// $check if (td_hours != null) {{td_hours}} // $check if (td_hours != null) {{td_hours}}
//sample dulu //sample dulu
$phase = 1; $phase = 1;
...@@ -194,7 +174,7 @@ class DashboardController extends Controller ...@@ -194,7 +174,7 @@ class DashboardController extends Controller
{ {
$hour = null; $hour = null;
} }
// dd($hour);
//kalau ada juga = bawak data details //kalau ada juga = bawak data details
// check timesheet detail // check timesheet detail
...@@ -219,7 +199,8 @@ class DashboardController extends Controller ...@@ -219,7 +199,8 @@ class DashboardController extends Controller
// dd($checkTimesheetDetail); // dd($checkTimesheetDetail);
// dd($hour); // dd($hour);
return view('timesheet::dashboard.borangBolehCaj', compact('userId','projectcode', 'projectname','month','phase','samplequery','daymonth','year','sampleTimesheet_dtl','day','hour'));
return view('timesheet::dashboard.borangBolehCaj', compact('userId','month','phase','daymonth','year','sampleTimesheet_dtl','day','hour'));
} }
public function kalendarCharge() public function kalendarCharge()
...@@ -304,7 +285,6 @@ class DashboardController extends Controller ...@@ -304,7 +285,6 @@ class DashboardController extends Controller
{ {
//update hours to null //update hours to null
$checkTimesheetDetail->td_hours = $valuehour; $checkTimesheetDetail->td_hours = $valuehour;
$checkTimesheetDetail->update(); $checkTimesheetDetail->update();
......
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