Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mileage-claim
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
trainee
mileage-claim
Commits
14c715a4
Commit
14c715a4
authored
Jul 21, 2026
by
Muhammad Danial Bin Mohd Zaidi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix migrations
parent
2d09e672
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
55 deletions
+36
-55
database/migrations/seperate/2026_06_11_060303_create_overtime_request_main_table.php
+0
-1
database/migrations/seperate/2026_06_11_060326_create_overtime_request_detail_table.php
+18
-36
database/migrations/seperate/2026_06_11_060346_create_overtime_claim_main_table.php
+13
-14
database/migrations/seperate/2026_06_11_060401_create_overtime_claim_detail_table.php
+0
-3
database/migrations/seperate/2026_06_24_014915_add_ocm_query_status_to_overtime_claim_main_table.php
+3
-1
packages/portal/overtime/src/Data/Repo/OvertimeRequestRepo.php
+2
-0
No files found.
database/migrations/seperate/2026_06_11_060303_create_overtime_request_main_table.php
View file @
14c715a4
...
...
@@ -27,7 +27,6 @@ public function up()
$table
->
dateTime
(
'orm_requested_date'
)
->
nullable
();
$table
->
integer
(
'orm_approved_by_id'
)
->
nullable
();
// FK → project_team.id
$table
->
dateTime
(
'orm_approved_date'
)
->
nullable
();
$table
->
timestamps
();
$table
->
integer
(
'updated_by'
)
->
nullable
();
$table
->
softDeletes
();
...
...
database/migrations/seperate/2026_06_11_060326_create_overtime_request_detail_table.php
View file @
14c715a4
...
...
@@ -8,46 +8,27 @@
{
public
function
up
()
:
void
{
Schema
::
table
(
'overtime_request_detail'
,
function
(
Blueprint
$table
)
{
if
(
!
Schema
::
hasColumn
(
'overtime_request_detail'
,
'ord_day_type'
))
{
$table
->
string
(
'ord_day_type'
)
->
nullable
()
->
after
(
'ord_month_of_overtime'
);
}
if
(
!
Schema
::
hasColumn
(
'overtime_request_detail'
,
'ord_office_start'
))
{
$table
->
string
(
'ord_office_start'
)
->
nullable
()
->
after
(
'ord_day_type'
);
}
if
(
!
Schema
::
hasColumn
(
'overtime_request_detail'
,
'ord_office_end'
))
{
$table
->
string
(
'ord_office_end'
)
->
nullable
()
->
after
(
'ord_office_start'
);
}
if
(
!
Schema
::
hasColumn
(
'overtime_request_detail'
,
'ord_time_from'
))
{
$table
->
string
(
'ord_time_from'
)
->
nullable
()
->
after
(
'ord_office_end'
);
}
if
(
!
Schema
::
hasColumn
(
'overtime_request_detail'
,
'ord_time_to'
))
{
$table
->
string
(
'ord_time_to'
)
->
nullable
()
->
after
(
'ord_time_from'
);
}
if
(
!
Schema
::
hasColumn
(
'overtime_request_detail'
,
'ord_tasks'
))
{
$table
->
text
(
'ord_tasks'
)
->
nullable
()
->
after
(
'ord_time_to'
);
}
Schema
::
create
(
'overtime_request_detail'
,
function
(
Blueprint
$table
)
{
$table
->
id
();
$table
->
integer
(
'fk_overtime_request_main'
)
->
nullable
();
// FK → overtime_request_main.id
$table
->
integer
(
'ord_staff_id'
)
->
nullable
();
// FK → users.id
$table
->
string
(
'ord_name'
)
->
nullable
();
$table
->
integer
(
'ord_month_of_overtime'
)
->
nullable
();
$table
->
decimal
(
'ord_budgeted'
,
10
,
2
)
->
nullable
();
$table
->
decimal
(
'ord_utilised_to_date'
,
10
,
2
)
->
nullable
();
$table
->
decimal
(
'ord_planned_ot_hour'
,
10
,
2
)
->
nullable
();
$table
->
decimal
(
'ord_balance'
,
10
,
2
)
->
nullable
();
$table
->
text
(
'ord_reason'
)
->
nullable
();
$table
->
decimal
(
'ord_total_hours'
,
10
,
2
)
->
nullable
();
$table
->
timestamps
();
$table
->
integer
(
'updated_by'
)
->
nullable
();
$table
->
softDeletes
();
});
}
public
function
down
()
:
void
{
Schema
::
table
(
'overtime_request_detail'
,
function
(
Blueprint
$table
)
{
$table
->
dropColumn
([
'ord_day_type'
,
'ord_office_start'
,
'ord_office_end'
,
'ord_time_from'
,
'ord_time_to'
,
'ord_tasks'
,
]);
});
Schema
::
dropIfExists
(
'overtime_request_detail'
);
}
};
\ No newline at end of file
database/migrations/seperate/2026_06_11_060346_create_overtime_claim_main_table.php
View file @
14c715a4
...
...
@@ -11,21 +11,20 @@ public function up(): void
Schema
::
create
(
'overtime_claim_main'
,
function
(
Blueprint
$table
)
{
$table
->
id
();
$table
->
string
(
'ocm_apply_no'
)
->
nullable
();
// e.g. OTC-202606-0001
$table
->
integer
(
'ocm_name'
);
// FK → users.id (staff)
$table
->
date
(
'ocm_date'
);
$table
->
tinyInteger
(
'ocm_status'
)
->
default
(
1
);
$table
->
string
(
'ocm_project'
)
->
nullable
();
$table
->
string
(
'ocm_department'
)
->
nullable
();
$table
->
string
(
'ocm_position'
)
->
nullable
();
$table
->
integer
(
'ocm_requested_by_id'
)
->
nullable
();
// FK → users.id
$table
->
dateTime
(
'ocm_requested_date'
)
->
nullable
();
$table
->
integer
(
'ocm_approved_by_id'
)
->
nullable
();
// FK → users.id
$table
->
integer
(
'fk_lkp_staff_info'
)
->
nullable
();
$table
->
string
(
'ocm_apply_no'
)
->
nullable
();
$table
->
string
(
'ocm_staff_employee_code'
)
->
nullable
();
$table
->
string
(
'ocm_staff_name'
)
->
nullable
();
$table
->
integer
(
'ocm_division'
)
->
nullable
();
$table
->
integer
(
'ocm_month'
)
->
nullable
();
$table
->
integer
(
'ocm_year'
)
->
nullable
();
$table
->
tinyInteger
(
'ocm_status'
)
->
default
(
1
);
$table
->
tinyInteger
(
'ocm_query_status'
)
->
nullable
();
$table
->
integer
(
'ocm_verified_by'
)
->
nullable
();
$table
->
dateTime
(
'ocm_verified_date'
)
->
nullable
();
$table
->
integer
(
'ocm_approved_by'
)
->
nullable
();
$table
->
dateTime
(
'ocm_approved_date'
)
->
nullable
();
$table
->
dateTime
(
'ocm_submit_date'
)
->
nullable
();
$table
->
timestamps
();
$table
->
integer
(
'updated_by'
)
->
nullable
();
$table
->
softDeletes
();
...
...
database/migrations/seperate/2026_06_11_060401_create_overtime_claim_detail_table.php
View file @
14c715a4
...
...
@@ -18,7 +18,6 @@ public function up()
$table
->
integer
(
'fk_overtime_claim_main'
);
// FK → overtime_claim_main.id
$table
->
integer
(
'fk_lkp_project'
)
->
nullable
();
// FK → lkp_project.id
$table
->
dateTime
(
'ocd_date'
)
->
nullable
();
$table
->
string
(
'ocd_day_type'
,
20
)
->
nullable
();
$table
->
string
(
'ocd_office_hour'
,
30
)
->
nullable
();
...
...
@@ -26,9 +25,7 @@ public function up()
$table
->
time
(
'ocd_overtime_to'
)
->
nullable
();
$table
->
text
(
'ocd_tasks'
)
->
nullable
();
$table
->
decimal
(
'ocd_effective_hours'
,
10
,
2
)
->
default
(
0
);
$table
->
decimal
(
'ocd_total_hours'
,
10
,
2
)
->
default
(
0
);
$table
->
timestamps
();
$table
->
integer
(
'updated_by'
)
->
nullable
();
$table
->
softDeletes
();
...
...
database/migrations/seperate/2026_06_24_014915_add_ocm_query_status_to_overtime_claim_main_table.php
View file @
14c715a4
...
...
@@ -9,7 +9,9 @@
public
function
up
()
:
void
{
Schema
::
table
(
'overtime_claim_main'
,
function
(
Blueprint
$table
)
{
$table
->
tinyInteger
(
'ocm_query_status'
)
->
nullable
()
->
after
(
'ocm_status'
);
if
(
!
Schema
::
hasColumn
(
'overtime_claim_main'
,
'ocm_query_status'
))
{
$table
->
tinyInteger
(
'ocm_query_status'
)
->
nullable
()
->
after
(
'ocm_status'
);
}
if
(
!
Schema
::
hasColumn
(
'overtime_claim_main'
,
'ocm_approved_by'
))
{
$table
->
integer
(
'ocm_approved_by'
)
->
nullable
()
->
after
(
'ocm_query_status'
);
...
...
packages/portal/overtime/src/Data/Repo/OvertimeRequestRepo.php
View file @
14c715a4
...
...
@@ -378,6 +378,7 @@ public function addRequestFormDetail(int $mainId, $request): OvertimeRequestDeta
$detail
=
OvertimeRequestDetail
::
create
([
'fk_overtime_request_main'
=>
$mainId
,
'ord_staff_id'
=>
Auth
::
id
(),
'ord_name'
=>
$request
->
ord_name
,
'ord_month_of_overtime'
=>
$request
->
ord_month_of_overtime
,
'ord_budgeted'
=>
$budgeted
,
...
...
@@ -404,6 +405,7 @@ public function updateRequestFormDetail(int $detailId, $request): OvertimeReques
$balance
=
$budgeted
-
$utilised
;
$detail
->
update
([
'ord_staff_id'
=>
Auth
::
id
(),
'ord_name'
=>
$request
->
ord_name
,
'ord_month_of_overtime'
=>
$request
->
ord_month_of_overtime
,
'ord_budgeted'
=>
$budgeted
,
...
...
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