Commit 7466407f by hannan

commit migration file and changes

parent 724dce1b
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddTdProjectTypeToTimesheetDtlTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::rename('timesheet_tbl', 'timesheet_dtl');
Schema::table('timesheet_dtl', function (Blueprint $table) {
$table->integer('td_project_type')->after('td_review_remark')->unsigned()->nullable();
$table->integer('fk_overhead')->after('td_project_type')->unsigned()->nullable();
$table->string('td_overhead_note',100)->after('fk_overhead')->nullable();
$table->string('td_non_chargeable_desc',100)->after('td_overhead_note')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('timesheet_dtl', function (Blueprint $table) {
//
});
}
}
...@@ -17,117 +17,33 @@ input[type=number] { ...@@ -17,117 +17,33 @@ input[type=number] {
</style> </style>
<div class="ui segment"> <div class="ui segment">
<div class="ui blue left ribbon label">Chargeable Form</div>
<br><br>
<form class="ui form">
<h4 class="ui dividing header"></h4>
<div class="two fields">
<div class="two wide field">
<label>Kod Projek</label>
<select class="ui fluid dropdown">
<option value="">Kod Projek</option>
<option value="PPJ">PPJ</option>
<option value="IIUM">IIUM</option>
<option value="HLA2101">HLA 2101</option>
</select>
</div>
<div class="two wide field">
<label>Nama Projek</label>
<input type="text" name="projek[nama]" readonly="" placeholder="Nama Projek">
</div>
<div class="two wide field">
<label>Tahun</label>
<input type="text" name="tahun" readonly="" placeholder="Tahun">
</div>
<div class="two wide field">
<label>Bulan</label>
<input type="text" name="bulan" readonly="" placeholder="Bulan">
</div>
</div>
<table class="ui celled structured table">
<thead>
<tr>
<th colspan="15" class="center aligned">Date</th>
</tr>
<tr>
@for($i = 0; $i < 15 ; $i++)
<th>{{$i+1}}</th>
@endfor
</tr>
</thead>
<tbody>
<tr>
@for($i = 0; $i < 15 ; $i++)
<td>
<input type="number" onkeypress="onlynumber(event)" id="" name="" min="0" max="24" style="padding-right: 7px;padding-left: 7px;" onchange="limiter(this);">
</td>
@endfor
</tr>
</tbody>
</table>
<div class="ui button" tabindex="0">Save</div>
</form>
</div>
<div class="ui segment">
<a class="ui blue left ribbon label">Chargeable Form</a> <a class="ui blue left ribbon label">Chargeable Form</a>
<br><br> <br><br>
<form class="ui form"> <form class="ui form" action="{{ url('saveHours' )}}" method="POST">
{{csrf_field()}}
<table class="ui celled structured table"> <table class="ui celled structured table">
<thead> <thead>
<tr>
<th colspan="2">Chargeable</th>
<th colspan="15" class="center aligned">Date</th>
<th>
</th>
</tr>
<tr> <tr>
<th rowspan="2">Project Code</th> <th >Project Code</th>
<th rowspan="2">Project Name</th> <th >Project Name</th>
<th colspan="15" class="center aligned">Date</th>
</tr>
<tr>
@for($i = 0; $i < 15 ; $i++) @for($i = 0; $i < 15 ; $i++)
<th>{{$i+1}}</th> <th>{{$i+1}}</th>
@endfor @endfor
</tr> <th >Total Hours</th>
</thead>
<tbody>
@for($ProjectList = 0; $ProjectList < 3; $ProjectList++)
<tr>
<td>
{{$projectcode}}
</td>
<td>
{{$projectname}}
</td>
@for($i = 0; $i < 15 ; $i++)
<td>
<input type="number" onkeypress="onlynumber(event)" id="" name="" min="0" max="24" style="padding-right: 7px;padding-left: 7px;" onchange="limiter(this);">
</td>
@endfor
</tr>
@endfor
</tbody>
</table>
<div class="ui button" tabindex="0">Save</div>
</form>
</div>
<div class="ui segment">
<a class="ui blue left ribbon label">Non-Chargeable Form</a>
<br><br>
<form class="ui form">
<table class="ui celled structured table">
<thead>
<tr>
<th rowspan="2">Project Code</th>
<th rowspan="2">Project Name</th>
<th colspan="15" class="center aligned">Date</th>
</tr> </tr>
<tr> <tr>
@for($i = 0; $i < 15 ; $i++)
<th>{{$i+1}}</th>
@endfor
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@for($ProjectList = 0; $ProjectList < 3; $ProjectList++)
<tr> <tr>
<td> <td>
{{$projectcode}} {{$projectcode}}
...@@ -135,16 +51,21 @@ input[type=number] { ...@@ -135,16 +51,21 @@ input[type=number] {
<td> <td>
{{$projectname}} {{$projectname}}
</td> </td>
@for($i = 0; $i < 15 ; $i++) <td colspan="15">
<input type="number" onkeypress="onlynumber(event)" name="tm_chargeable_hrs" min="0" max="24" style="padding-right: 4px;padding-left: 4px;" onchange="limiter(this);">
</td>
<td> <td>
<input type="number" onkeypress="onlynumber(event)" id="" name="" min="0" max="24" style="padding-right: 7px;padding-left: 7px;" onchange="limiter(this);"> <input type="number" onkeypress="onlynumber(event)" name="" style="padding-right: 4px;padding-left: 4px;" onchange="limiter(this);" readonly="">
</td> </td>
@endfor
</tr> </tr>
@endfor
</tbody> </tbody>
</table> </table>
<div class="ui button" tabindex="0">Save</div> <button type="submit" class="center aligned ui blue compact labeled icon button">
<i class="save icon"></i>
Save
</button>
</form> </form>
</div> </div>
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
select: function(info) { select: function(info) {
// alert('ni eh? ' + info.startStr + ' to ' + info.endStr); // alert('ni eh? ' + info.startStr + ' to ' + info.endStr);
var value = prompt('Your Question'); var value = prompt('Cemana alert boleh ada test field?');
// $('.ui.small.modal') // $('.ui.small.modal')
// .modal('show') // .modal('show')
// } // }
......
@extends('ui::layouts.app')
@section('content')
<div class="ui segment">
<div class="ui blue left ribbon label">
Timesheet Approval
</div>
</div>
@endsection
\ No newline at end of file
@extends('ui::layouts.app')
@section('content')
<div class="ui segment">
<div class="ui blue left ribbon label">
Timesheet Report
</div>
</div>
@endsection
\ No newline at end of file
@extends('ui::layouts.app')
@section('content')
<div class="ui segment">
<div class="ui blue left ribbon label">
Timesheet Review
</div>
</div>
@endsection
\ No newline at end of file
@extends('ui::layouts.app')
@section('content')
<div class="ui segment">
<div class="ui blue left ribbon label">
timesheet viewer
</div>
</div>
@endsection
\ No newline at end of file
...@@ -17,6 +17,8 @@ Route::group( ...@@ -17,6 +17,8 @@ Route::group(
Route::get('kalendarNonCharge',['uses' => 'DashboardController@kalendarNonCharge', 'as' => 'dashboard.kalendarNonCharge']); Route::get('kalendarNonCharge',['uses' => 'DashboardController@kalendarNonCharge', 'as' => 'dashboard.kalendarNonCharge']);
Route::get('kalendar',['uses' => 'DashboardController@kalendar', 'as' => 'dashboard.kalendar']); Route::get('kalendar',['uses' => 'DashboardController@kalendar', 'as' => 'dashboard.kalendar']);
Route::post('saveHours',['uses' => 'DashboardController@saveHours', 'as' => 'dashboard.saveHours']);
} }
); );
......
...@@ -6,6 +6,7 @@ use Illuminate\Routing\Controller; ...@@ -6,6 +6,7 @@ use Illuminate\Routing\Controller;
use Carbon\Carbon; use Carbon\Carbon;
use DB; use DB;
use Portal\Timesheet\Model\Users; use Portal\Timesheet\Model\Users;
use Portal\Timesheet\Model\ts_master;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input; use Illuminate\Support\Facades\Input;
use File; use File;
...@@ -95,4 +96,15 @@ class DashboardController extends Controller ...@@ -95,4 +96,15 @@ class DashboardController extends Controller
{ {
return view('timesheet::dashboard.kalendar'); return view('timesheet::dashboard.kalendar');
} }
public function saveHours(Request $request)
{
// dd($request);
$data = new ts_master;
$data -> tm_chargeable_hrs = $request -> tm_chargeable_hrs;
$data -> save();
return redirect('home');
}
} }
<?php
namespace Portal\Timesheet\Model;
use Illuminate\Database\Eloquent\Model;
class ts_master extends Model
{
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'timesheet_master';
/**
* undocumented function
*
* @return void
* @author
**/
public function info()
{
}
}
...@@ -50,10 +50,20 @@ class ServiceProvider extends BaseServiceProvider ...@@ -50,10 +50,20 @@ class ServiceProvider extends BaseServiceProvider
protected function menu() protected function menu()
{ {
$menu = $this->app['laravolt.menu']->add(__('Halaman Utama'))->data('icon', 'align justify'); $dashboard = $this->app['laravolt.menu']->add(__('Halaman Utama'))->data('icon', 'align justify');
$menu->add(__('Halaman Utama'), url('/home/')) $dashboard->add(__('Halaman Utama'), url('/home/'))
->data('icon', 'tachometer alternate icon') ->data('icon', 'tachometer alternate icon')
->active('home/*'); ->active('home/*');
$dashboard->add(__('Timesheet Calendar'))
->data('icon', 'calendar alternate outline');
$dashboard->add(__('Timesheet Viewer'))
->data('icon', 'eye icon');
$dashboard->add(__('Timesheet Review'))
->data('icon', 'file alternate icon');
$dashboard->add(__('Timesheet Approval'))
->data('icon', 'check square icon');
$dashboard->add(__('Timesheet Report'))
->data('icon', 'file alternate icon');
$menu = $this->app['laravolt.menu']->add(__('Pengurusan'))->data('icon', 'align justify'); $menu = $this->app['laravolt.menu']->add(__('Pengurusan'))->data('icon', 'align justify');
$menu->add(__('Pengurusan Peranan'), route('timesheet::dashboard.pengurusan')) $menu->add(__('Pengurusan Peranan'), route('timesheet::dashboard.pengurusan'))
...@@ -91,10 +101,7 @@ class ServiceProvider extends BaseServiceProvider ...@@ -91,10 +101,7 @@ class ServiceProvider extends BaseServiceProvider
->data('icon', 'circle outline'); ->data('icon', 'circle outline');
$form->add(__('Overhed')) $form->add(__('Overhed'))
->data('icon', 'circle outline'); ->data('icon', 'circle outline');
// $menu->add(__('Maklumat Cuti'), route('ecuti::quota.index')) // $menu->add(__('Maklumat Cuti'), route('ecuti::quota.index'))
// ->data('icon', 'circle outline') // ->data('icon', 'circle outline')
......
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