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
d37f6e18
Commit
d37f6e18
authored
Sep 02, 2022
by
hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes in timesheet
parent
27511bf4
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
35 additions
and
116 deletions
+35
-116
app/Exports/UsersExport.php
+0
-31
packages/portal/timesheet/resources/views/dashboard/timesheetViewer.blade.php
+1
-0
packages/portal/timesheet/resources/views/exports/users.blade.php
+0
-17
packages/portal/timesheet/resources/views/form/chargeableForm.blade.php
+2
-32
packages/portal/timesheet/resources/views/form/overheadForm.blade.php
+9
-4
packages/portal/timesheet/resources/views/maintenance/penambahanOverhead.blade.php
+2
-1
packages/portal/timesheet/resources/views/maintenance/senaraiOverhead.blade.php
+2
-2
packages/portal/timesheet/resources/views/maintenance/senaraiProject.blade.php
+1
-1
packages/portal/timesheet/resources/views/maintenance/senaraiProjectTeam.blade.php
+5
-2
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
+9
-8
packages/portal/timesheet/src/Http/Controllers/FormController.php
+1
-4
packages/portal/timesheet/src/Http/Controllers/MaintenanceController.php
+3
-2
packages/portal/timesheet/src/Http/Controllers/ReportController.php
+0
-12
No files found.
app/Exports/UsersExport.php
deleted
100644 → 0
View file @
27511bf4
<?php
namespace
App\Exports
;
use
App\User
;
// use Illuminate\Contracts\Support\Responsable;
use
Illuminate\Contracts\View\View
;
use
Maatwebsite\Excel\Concerns\Exportable
;
use
Maatwebsite\Excel\Concerns\FromCollection
;
use
Maatwebsite\Excel\Concerns\FromView
;
use
Maatwebsite\Excel\Concerns\ShouldAutoSize
;
// class UsersExport implements FromCollection, Responsable
class
UsersExport
implements
FromView
,
ShouldAutoSize
{
use
Exportable
;
// private $fileName = "Ringkasan Laporan.xlsx";
/**
* @return \Illuminate\Support\Collection
*/
public
function
view
()
:
View
{
// dd(User::all());
return
view
(
'timesheet::exports.users'
,
[
'users'
=>
User
::
all
()
]);
}
}
packages/portal/timesheet/resources/views/dashboard/timesheetViewer.blade.php
View file @
d37f6e18
...
...
@@ -760,6 +760,7 @@
</div>
<br>
@if(
$curruser->id
==
$user->penyokong
)
<button type="
button
" class="
ui
green
button
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
dashboard
.
timesheetReview
',[ '
phase
' => $phase, '
month
' => $month ]) }}'
;
">Back</button>
...
...
packages/portal/timesheet/resources/views/exports/users.blade.php
deleted
100644 → 0
View file @
27511bf4
<table>
<thead>
<tr>
<th>
Name
</th>
<th>
Email
</th>
</tr>
</thead>
<tbody>
@foreach($users as $key => $user)
<tr>
<td>
{{ $user->name }}
</td>
<td>
{{ $user->email }}
</td>
</tr>
@endforeach
</tbody>
</table>
\ No newline at end of file
packages/portal/timesheet/resources/views/form/chargeableForm.blade.php
View file @
d37f6e18
...
...
@@ -18,38 +18,10 @@ input[type=number] {
<
div
class
="
ui
segment
">
<a class="
ui
blue
left
ribbon
label
">Chargeable Form</a>
<br>
<!-- <br>
<form class="
ui
form
">
<div class="
field
">
<div class="
three
fields
">
<div class="
one
wide
field
">
<label>Phase</label>
<input type="
text
" placeholder="
Year
" value="
{{
$phase
}}
" readonly="
readonly
">
</div>
<div class="
one
wide
field
">
<label>Month</label>
<input type="
text
" placeholder="
Month
" value="
{{
$month
}}
" readonly="
readonly
">
</div>
<div class="
two
wide
field
">
<label>Year</label>
<input type="
text
" placeholder="
Year
" value="
{{
$year
}}
" readonly="
readonly
">
</div>
</div>
</div>
</form> -->
<br>
<!-- @if(
$phase
== 1)
<button class="
center
aligned
ui
green
compact
right
labeled
icon
button
" id="
phase2
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
form
.
chargeableForm
', ['
phase
' => 2, '
month
' => $month, '
year
' => $year]) }}'
;
">
<i class="
angle
double
right
icon
"></i>
Phase 2
</button>
@else
<button class="
center
aligned
ui
green
compact
labeled
icon
button
" id="
phase1
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
form
.
chargeableForm
', ['
phase
' => 1, '
month
' => $month, '
year
' => $year]) }}'
;
">
<i class="
angle
double
left
icon
"></i>
Phase 1
</button>
@endif -->
<button class="
center
aligned
ui
violet
compact
right
labeled
icon
button
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
form
.
nonChargeableForm
', ['
phase
' => $phase, '
month
' => $month, '
year
' => $year]) }}'
;
">
<i class="
angle
double
right
icon
"></i>
Non-Chargeable Form
...
...
@@ -155,8 +127,6 @@ input[type=number] {
@for(
$i
= 15;
$i
<
$daymonth
;
$i
++)
<?php
$valuehour
= '';
$date
=
$year
.'-'.sprintf('%02d',
$month
).'-'.sprintf('%02d',
$i
+1);
...
...
packages/portal/timesheet/resources/views/form/overheadForm.blade.php
View file @
d37f6e18
...
...
@@ -63,10 +63,15 @@ input[type=number] {
<i class="
angle
double
left
icon
"></i>
Non-Chargeable Form
</button>
<button class="
right
floated
aligned
ui
yellow
compact
labeled
icon
button
" id="
notes
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
form
.
notelist
', ['
year
'=> $year, '
month
'=> $month, '
phase
'=> $phase, '
fk_tm_id
'=> $fk_tm_id] ) }} '
;
">
<i class="
plus
icon
"></i>
Notes
</button>
@if(
$checkoverhead
)
<button class="
right
floated
aligned
ui
yellow
compact
labeled
icon
button
" id="
notes
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
form
.
notelist
', ['
year
'=> $year, '
month
'=> $month, '
phase
'=> $phase, '
fk_tm_id
'=> $fk_tm_id] ) }} '
;
">
<i class="
plus
icon
"></i>
Notes
</button>
@else
@endif
<button class="
center
aligned
ui
pink
compact
right
labeled
icon
button
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
dashboard
.
timesheetViewer
', ['
phase
' => $phase, '
month
' => $month, '
year
' => $year]) }}'
;
">
<i class="
angle
double
right
icon
"></i>
Timesheet Viewer
...
...
packages/portal/timesheet/resources/views/maintenance/penambahanOverhead.blade.php
View file @
d37f6e18
...
...
@@ -18,7 +18,7 @@
<option value="
0
">Inactive</option>
</select>
</div>
<button class="
ui
button
" type="
submit
">Add</button>
<button class="
ui
b
lue
b
utton
" type="
submit
">Add</button>
</form>
</div>
@endsection
\ No newline at end of file
packages/portal/timesheet/resources/views/maintenance/senaraiOverhead.blade.php
View file @
d37f6e18
...
...
@@ -3,8 +3,8 @@
@
section
(
'content'
)
<
div
class
="
ui
segment
">
<a class="
ui
blue
left
ribbon
label
">
Senarai
Overhead</a>
<a href="
{{
route
(
'timesheet::maintenance.penambahanOverhead'
)}}
" class="
ui
right
floated
small
primary
labeled
icon
button
"><i class="
plus
icon
"></i>
Penambahan Lookup Overhead
<a class="
ui
blue
left
ribbon
label
">
List of
Overhead</a>
<a href="
{{
route
(
'timesheet::maintenance.penambahanOverhead'
)}}
" class="
ui
right
floated
small
primary
labeled
icon
button
"><i class="
plus
icon
"></i>
Add Overhead Lookup
</a>
<br>
<table class="
ui
celled
padded
table
">
...
...
packages/portal/timesheet/resources/views/maintenance/senaraiProject.blade.php
View file @
d37f6e18
...
...
@@ -3,7 +3,7 @@
@
section
(
'content'
)
<
div
class
="
ui
segment
">
<a class="
ui
blue
left
ribbon
label
">
Senarai
Project</a>
<a class="
ui
blue
left
ribbon
label
">
List of
Project</a>
<a href="
{{
route
(
'timesheet::maintenance.penambahanProject'
)}}
" class="
ui
right
floated
small
primary
labeled
icon
button
"><i class="
plus
icon
"></i>Add New Project
</a>
<br>
...
...
packages/portal/timesheet/resources/views/maintenance/senaraiProjectTeam.blade.php
View file @
d37f6e18
...
...
@@ -3,7 +3,7 @@
@
section
(
'content'
)
<
div
class
="
ui
segment
">
<a class="
ui
blue
left
ribbon
label
">
Senarai
Project Team</a>
<a class="
ui
blue
left
ribbon
label
">
List of
Project Team</a>
<a href="
{{
route
(
'timesheet::maintenance.penambahanProjectTeam'
,
[
'id'
=>
$pid
])
}}
" class="
ui
right
floated
small
primary
labeled
icon
button
"><i class="
plus
icon
"></i>Add New Project Team
</a>
<br>
...
...
@@ -28,7 +28,10 @@
<td>
{
{$project['projectteam']}
}
</td>
<td>{{ data_get(
$project
, 'role') }}</td>
<td>
{
{$project['status']}
}
</td>
<td><a href="
{{
route
(
'timesheet::maintenance.editprojectteam'
,
[
'id'
=>
$project
[
'id'
]])}}
">Edit</a></td>
<td>
<button class="
compact
ui
button
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
maintenance
.
editprojectteam
', ['
id
' => $project['
id
']])}}'
;
">Edit
</button>
</td>
</tr>
@endforeach
</tbody>
...
...
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
View file @
d37f6e18
...
...
@@ -408,14 +408,15 @@ class DashboardController extends Controller
->
first
();
// dd(Staff_info::all());
$hod
=
Staff_info
::
find
(
$user
->
penyokong
)
->
fullname
;
$penyokong
=
Staff_info
::
where
(
'penyokong'
,
0
)
->
get
();
// $hod = Staff_info::find($user->penyokong)
// ->fullname;
$bod
=
Staff_info
::
select
(
'id'
,
'fullname'
)
->
whereIn
(
'id'
,
[
1
,
45
,
46
,
47
,
48
])
->
get
();
// $penyokong = Staff_info::where('penyokong', 0)
// ->get();
// dd($penyokong);
// $bod = Staff_info::select('id', 'fullname')
// ->whereIn('id', [1,45,46,47,48])
// ->get();
$year
=
date
(
'Y'
);
...
...
@@ -576,7 +577,7 @@ class DashboardController extends Controller
}
// dd($check->id);
return
view
(
'timesheet::dashboard.timesheetViewer'
,
compact
(
'curruser'
,
'user'
,
'profile'
,
'dept'
,
'
hod'
,
'phase'
,
'month'
,
'year'
,
'strMonth'
,
'daymonth'
,
'chargeablelist'
,
'nonchargeablelist'
,
'overheadlist'
,
'chargehour'
,
'nonchargehour'
,
'totalchargehrs'
,
'totalnonchargehrs'
,
'totaloverheadhrs'
,
'overheadhour'
,
'notes'
,
'check'
,
'strdays'
,
'penyokong'
,
'bod
'
));
return
view
(
'timesheet::dashboard.timesheetViewer'
,
compact
(
'curruser'
,
'user'
,
'profile'
,
'dept'
,
'
phase'
,
'month'
,
'year'
,
'strMonth'
,
'daymonth'
,
'chargeablelist'
,
'nonchargeablelist'
,
'overheadlist'
,
'chargehour'
,
'nonchargehour'
,
'totalchargehrs'
,
'totalnonchargehrs'
,
'totaloverheadhrs'
,
'overheadhour'
,
'notes'
,
'check'
,
'strdays
'
));
}
public
function
tsubmit
(
Request
$request
)
...
...
packages/portal/timesheet/src/Http/Controllers/FormController.php
View file @
d37f6e18
...
...
@@ -729,9 +729,6 @@ class FormController extends Controller
->
where
(
'tm_phase'
,
$phase
)
->
first
();
// dd($checkoverhead);
//kalau ada, dia gi ke edit
if
(
$checkoverhead
)
{
...
...
@@ -749,7 +746,7 @@ class FormController extends Controller
// dd($checkoverhead->id);
return
view
(
'timesheet::form.overheadForm'
,
compact
(
'projectlist'
,
'userId'
,
'month'
,
'phase'
,
'daymonth'
,
'year'
,
'hour'
,
'project'
,
'fk_tm_id'
,
'strdays'
));
return
view
(
'timesheet::form.overheadForm'
,
compact
(
'
checkoverhead'
,
'
projectlist'
,
'userId'
,
'month'
,
'phase'
,
'daymonth'
,
'year'
,
'hour'
,
'project'
,
'fk_tm_id'
,
'strdays'
));
}
public
function
saveoverheadhours
(
Request
$request
)
...
...
packages/portal/timesheet/src/Http/Controllers/MaintenanceController.php
View file @
d37f6e18
...
...
@@ -436,7 +436,7 @@ class MaintenanceController extends Controller
$data
->
save
();
return
redirect
()
->
route
(
'timesheet::maintenance.senaraiOverhead'
)
->
with
(
'success'
,
'
Role Updated
'
);
->
with
(
'success'
,
'
Overhead lookup added!
'
);
}
public
function
editoverhead
(
Request
$request
)
...
...
@@ -454,7 +454,8 @@ class MaintenanceController extends Controller
'o_overhead_desc'
=>
$request
->
description
,
'o_overhead_sts'
=>
$request
->
status
]);
return
redirect
()
->
route
(
'timesheet::maintenance.senaraiOverhead'
);
return
redirect
()
->
route
(
'timesheet::maintenance.senaraiOverhead'
)
->
with
(
'success'
,
'Overhead lookup updated!'
);
}
public
function
loadstaff
(
$dept
)
...
...
packages/portal/timesheet/src/Http/Controllers/ReportController.php
View file @
d37f6e18
...
...
@@ -40,18 +40,6 @@ use Maatwebsite\Excel\Facades\Excel;
class
ReportController
extends
Controller
{
public
function
export
(
Request
$request
)
{
// dd($request);
$month
=
date
(
'F'
,
mktime
(
0
,
0
,
0
,
$request
->
month
,
1
,
date
(
'Y'
)));
$year
=
strval
(
$request
->
year
);
return
(
new
UsersExport
)
->
download
(
'Ringkasan Laporan '
.
$month
.
' '
.
$year
.
'.xlsx'
);
// return new UsersExport;
}
public
function
ringkasanLaporan
()
{
$dept
=
Department
::
all
()
...
...
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