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
0d7c5f84
Commit
0d7c5f84
authored
Oct 31, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes in project report
parent
9eba9eac
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
6 deletions
+38
-6
packages/portal/timesheet/resources/views/report/department.blade.php
+3
-1
packages/portal/timesheet/resources/views/report/project.blade.php
+14
-5
packages/portal/timesheet/src/Http/Controllers/MaintenanceController.php
+21
-0
No files found.
packages/portal/timesheet/resources/views/report/department.blade.php
View file @
0d7c5f84
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
<div class="
ui
purple
left
ribbon
label
">
<div class="
ui
purple
left
ribbon
label
">
Report by Department
Report by Department
</div>
</div>
<button class="
right
floated
center
aligned
ui
violet
compact
labeled
icon
button
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
export
.
exportdepartment
', ['
month
'=> $intmonth, '
year
'=> $year, '
dept
'=> $dept->id]) }}'
;
">
<button class="
right
floated
center
aligned
ui
violet
compact
labeled
icon
button
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
export
.
exportdepartment
', ['
month
'=> $intmonth, '
year
'=> $year, '
dept
'=> $dept->id]) }}'
;
">
<i class="
file
excel
outline
icon
"></i>
<i class="
file
excel
outline
icon
"></i>
Export to Excel
Export to Excel
...
@@ -44,6 +43,9 @@
...
@@ -44,6 +43,9 @@
<?php
$totalhours
=
$totaldays
=
$staffhours
=
$staffdays
= 0; ?>
<?php
$totalhours
=
$totaldays
=
$staffhours
=
$staffdays
= 0; ?>
@foreach(
$staffs
as
$key
=>
$staff
)
@foreach(
$staffs
as
$key
=>
$staff
)
<tbody>
<tbody>
<?php
$countproject
=
$project->where
('staffid', data_get(
$staff
,'staffid'));
?>
<tr>
<tr>
<td colspan="
6
">
{
{data_get($staff,'name')}
}
</td>
<td colspan="
6
">
{
{data_get($staff,'name')}
}
</td>
</tr>
</tr>
...
...
packages/portal/timesheet/resources/views/report/project.blade.php
View file @
0d7c5f84
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
</thead>
</thead>
</table>
</table>
<table class="
ui
unstackable
celled
table
">
<table class="
ui
unstackable
table
">
<thead>
<thead>
<tr>
<tr>
<th style="
width
:
10
%
" class="
center
aligned
" rowspan="
2
">role</th>
<th style="
width
:
10
%
" class="
center
aligned
" rowspan="
2
">role</th>
...
@@ -50,17 +50,26 @@
...
@@ -50,17 +50,26 @@
<tbody>
<tbody>
<?php
$totalhours
=
$totaldays
= 0;?>
<?php
$totalhours
=
$totaldays
= 0;?>
@foreach(
$pteam
as
$key
=>
$team
)
@foreach(
$pteam
as
$key
=>
$team
)
<?php
$balhours
= 0; ?>
<?php
$balhours
= 0;
foreach (
$ptstaffs
as
$key
=>
$value
) {
if (data_get(
$team
,'pm_roles') == data_get(
$value
,'roleid')) {
$count
=
$ptstaffs->where
('roleid', data_get(
$team
,'pm_roles'));
}
}
?>
<tr>
<td style="
width
:
10
%
" rowspan="
{{
count
(
$count
)
+
1
}}
" class="
center
aligned
">
{
{data_get($team,'role.role')}
}
</td>
</tr>
@foreach(
$ptstaffs
as
$key
=>
$staff
)
@foreach(
$ptstaffs
as
$key
=>
$staff
)
@if(data_get(
$team
,'pm_roles') == data_get(
$staff
,'roleid'))
@if(data_get(
$team
,'pm_roles') == data_get(
$staff
,'roleid'))
<?php
<?php
// dump(
$staff->staffid
);
$count
=
$ptstaffs->where
('roleid', data_get(
$team
,'pm_roles'));
$count
=
$ptstaffs->where
('roleid', data_get(
$team
,'pm_roles'));
$acc
=
$accumulate->where
('staffid', data_get(
$staff
,'staffid'));
$acc
=
$accumulate->where
('staffid', data_get(
$staff
,'staffid'));
// dump(
$acc
);
// dump(
count(
$count
)
);
?>
?>
<tr>
<tr>
<td style="
width
:
10
%
" class="
center
aligned
">
{
{data_get($team,'role.role')}
}
</td>
<td class="
center
aligned
">
<td class="
center
aligned
">
{
{data_get($team,'pm_days')}
}
Days <br>
{
{data_get($team,'pm_days')}
}
Days <br>
{
{data_get($team,'pm_hours')}
}
Hours
{
{data_get($team,'pm_hours')}
}
Hours
...
...
packages/portal/timesheet/src/Http/Controllers/MaintenanceController.php
View file @
0d7c5f84
...
@@ -474,11 +474,14 @@ class MaintenanceController extends Controller
...
@@ -474,11 +474,14 @@ class MaintenanceController extends Controller
$userId
=
users
::
find
(
Auth
::
id
())
$userId
=
users
::
find
(
Auth
::
id
())
->
u_staffID
;
->
u_staffID
;
$data
=
Staff_info
::
where
(
'id'
,
$request
->
staffId
)
$data
=
Staff_info
::
where
(
'id'
,
$request
->
staffId
)
->
first
();
->
first
();
$team
=
Pteam
::
where
(
'id'
,
$request
->
id
)
->
first
();
$team
=
Pteam
::
where
(
'id'
,
$request
->
id
)
->
first
();
$role
=
$team
->
role_id
;
$team
->
role_id
=
$request
->
role
;
$team
->
role_id
=
$request
->
role
;
$team
->
pt_project_task_sts
=
$request
->
status
;
$team
->
pt_project_task_sts
=
$request
->
status
;
$team
->
pt_team
=
$data
->
fullname
;
$team
->
pt_team
=
$data
->
fullname
;
...
@@ -486,6 +489,24 @@ class MaintenanceController extends Controller
...
@@ -486,6 +489,24 @@ class MaintenanceController extends Controller
$team
->
updated_by
=
$userId
;
$team
->
updated_by
=
$userId
;
$team
->
save
();
$team
->
save
();
$checkpteam
=
Pteam
::
where
(
'fk_project_id'
,
$pid
)
->
where
(
'role_id'
,
$role
)
->
first
();
// dd($checkpteam);
if
(
$checkpteam
)
{
}
else
{
$checkmandays
=
Pmandays
::
where
(
'fk_project'
,
$pid
)
->
where
(
'pm_roles'
,
$role
)
->
first
();
$checkmandays
->
delete
();
// dd($checkmandays);
// dd('null, delete pmandays');
}
return
redirect
()
->
route
(
'timesheet::maintenance.senaraiProjectTeam'
,
[
'id'
=>
$pid
])
return
redirect
()
->
route
(
'timesheet::maintenance.senaraiProjectTeam'
,
[
'id'
=>
$pid
])
->
with
(
'success'
,
'Project Team Updated Successfully'
);;
->
with
(
'success'
,
'Project Team Updated Successfully'
);;
}
}
...
...
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