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] {
<a class="ui blue left ribbon label">Chargeable Form</a>
<br>
<hr>
Day = {{$day}}
{{$sampleTimesheet_dtl[0]['td_date']}}
<br>
......@@ -47,8 +48,8 @@ input[type=number] {
</th>
</tr>
<tr>
<th >Project Code</th>
<th >Project Name</th>
<th>Project Code</th>
<th>Project Name</th>
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
......@@ -60,7 +61,7 @@ input[type=number] {
@endfor
@endif
<th >Total Hours</th>
<th>Total Hours</th>
</tr>
<tr>
......@@ -81,7 +82,8 @@ input[type=number] {
<?php
$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)
->first();
?>
......
......@@ -81,27 +81,8 @@ class DashboardController extends Controller
$userId = Auth::id();
$user = users::where('id', Auth::id())->first();
$projectcode = 'Project Code';
$projectname = 'Project Name';
// nanti project code query dari table project:
$samplequery[] = [
'pcode' => 'LHD2021',
'pname' => 'APIM',
'pid' => '1',
];
$samplequery[] = [
'pcode' => 'LHD20212',
'pname' => 'SMART',
'pid' => '2',
];
$sampleTimesheet_dtl[] = [
'td_id' => '1',
......@@ -143,7 +124,6 @@ class DashboardController extends Controller
// if (day == $i+1)
// $check if (td_hours != null) {{td_hours}}
//sample dulu
$phase = 1;
......@@ -194,7 +174,7 @@ class DashboardController extends Controller
{
$hour = null;
}
// dd($hour);
//kalau ada juga = bawak data details
// check timesheet detail
......@@ -219,7 +199,8 @@ class DashboardController extends Controller
// dd($checkTimesheetDetail);
// 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()
......@@ -304,7 +285,6 @@ class DashboardController extends Controller
{
//update hours to null
$checkTimesheetDetail->td_hours = $valuehour;
$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