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
33fbb268
Commit
33fbb268
authored
Jun 09, 2022
by
hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
project_team migration
parent
e750f24c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
27 deletions
+48
-27
database/migrations/2022_06_08_172639_create_project_team_table.php
+39
-0
packages/portal/timesheet/resources/views/dashboard/borangBolehCaj.blade.php
+6
-4
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
+3
-23
No files found.
database/migrations/2022_06_08_172639_create_project_team_table.php
0 → 100644
View file @
33fbb268
<?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'
);
}
}
packages/portal/timesheet/resources/views/dashboard/borangBolehCaj.blade.php
View file @
33fbb268
...
...
@@ -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();
?>
...
...
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
View file @
33fbb268
...
...
@@ -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
();
...
...
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