Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
3
3f-timesheet
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dockers
3f-timesheet
Commits
7466407f
Commit
7466407f
authored
May 30, 2022
by
hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit migration file and changes
parent
724dce1b
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
167 additions
and
112 deletions
+167
-112
database/migrations/2022_05_30_155341_add_td_project_type_to_timesheet_dtl_table.php
+36
-0
packages/portal/timesheet/resources/views/dashboard/borangBolehCaj.blade.php
+24
-103
packages/portal/timesheet/resources/views/dashboard/kalendar.blade.php
+1
-1
packages/portal/timesheet/resources/views/dashboard/timesheet_approval.blade.php
+12
-0
packages/portal/timesheet/resources/views/dashboard/timesheet_report.blade.php
+12
-0
packages/portal/timesheet/resources/views/dashboard/timesheet_review.blade.php
+12
-0
packages/portal/timesheet/resources/views/dashboard/timesheet_viewer.blade.php
+12
-0
packages/portal/timesheet/routes/web.php
+2
-0
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
+12
-0
packages/portal/timesheet/src/Model/ts_master.php
+29
-0
packages/portal/timesheet/src/ServiceProvider.php
+15
-8
No files found.
database/migrations/2022_05_30_155341_add_td_project_type_to_timesheet_dtl_table.php
0 → 100644
View file @
7466407f
<?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
)
{
//
});
}
}
packages/portal/timesheet/resources/views/dashboard/borangBolehCaj.blade.php
View file @
7466407f
...
@@ -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
:
7
px
;
padding
-
left
:
7
px
;
" 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
:
7
px
;
padding
-
left
:
7
px
;
" 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
:
4
px
;
padding
-
left
:
4
px
;
" onchange="
limiter
(
this
);
">
</td>
<td>
<td>
<input type="
number
" onkeypress="
onlynumber
(
event
)
"
id="" name="" min="
0
" max="
24
" style="
padding
-
right
:
7
px
;
padding
-
left
:
7
px
;
" onchange="
limiter
(
this
);
">
<input type="
number
" onkeypress="
onlynumber
(
event
)
"
name="" style="
padding
-
right
:
4
px
;
padding
-
left
:
4
px
;
" 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>
...
...
packages/portal/timesheet/resources/views/dashboard/kalendar.blade.php
View file @
7466407f
...
@@ -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')
// }
// }
...
...
packages/portal/timesheet/resources/views/dashboard/timesheet_approval.blade.php
0 → 100644
View file @
7466407f
@
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
packages/portal/timesheet/resources/views/dashboard/timesheet_report.blade.php
0 → 100644
View file @
7466407f
@
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
packages/portal/timesheet/resources/views/dashboard/timesheet_review.blade.php
0 → 100644
View file @
7466407f
@
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
packages/portal/timesheet/resources/views/dashboard/timesheet_viewer.blade.php
0 → 100644
View file @
7466407f
@
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
packages/portal/timesheet/routes/web.php
View file @
7466407f
...
@@ -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'
]);
}
}
);
);
...
...
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
View file @
7466407f
...
@@ -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'
);
}
}
}
packages/portal/timesheet/src/Model/ts_master.php
0 → 100644
View file @
7466407f
<?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
()
{
}
}
packages/portal/timesheet/src/ServiceProvider.php
View file @
7466407f
...
@@ -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')
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment