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
fe7f44ad
Commit
fe7f44ad
authored
Aug 03, 2026
by
Muhammad Iz'aan bin suhaimi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
standardize the icon and color, fix the claim that dont have pm.
parent
909f9a26
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
87 additions
and
166 deletions
+87
-166
packages/portal/mileage/resources/views/BOD/history.blade.php
+2
-7
packages/portal/mileage/resources/views/BOD/index.blade.php
+3
-14
packages/portal/mileage/resources/views/BOD/show.blade.php
+2
-13
packages/portal/mileage/resources/views/HOD/history.blade.php
+2
-8
packages/portal/mileage/resources/views/HOD/index.blade.php
+5
-19
packages/portal/mileage/resources/views/HOD/show.blade.php
+2
-13
packages/portal/mileage/resources/views/PM/index.blade.php
+4
-9
packages/portal/mileage/resources/views/PM/show.blade.php
+6
-13
packages/portal/mileage/resources/views/finance/index.blade.php
+1
-6
packages/portal/mileage/resources/views/finance/show.blade.php
+1
-7
packages/portal/mileage/resources/views/mileage/audit-trail.blade.php
+1
-1
packages/portal/mileage/resources/views/mileage/form.blade.php
+2
-15
packages/portal/mileage/resources/views/mileage/list.blade.php
+18
-27
packages/portal/mileage/resources/views/mileage/queryForm.blade.php
+2
-13
packages/portal/mileage/routes/web.php
+1
-0
packages/portal/mileage/src/Data/Repo/HODRepo.php
+8
-1
packages/portal/mileage/src/Data/Repo/MileageRepo.php
+22
-0
packages/portal/mileage/src/Http/Controllers/MileageController.php
+5
-0
No files found.
packages/portal/mileage/resources/views/BOD/history.blade.php
View file @
fe7f44ad
...
...
@@ -3,7 +3,7 @@
@
section
(
'content'
)
<
div
class
="
ui
segment
">
<a class="
ui
violet
left
ribbon
label
">Laporan Tuntutan Mileage - BOD</a><br/>
<a class="
ui
teal
left
ribbon
label
">Laporan Tuntutan Mileage - BOD</a><br/>
<div class="
ui
segment
">
@php
...
...
@@ -79,12 +79,7 @@
<tbody>
@forelse(
$list
as
$index
=>
$claim
)
@php
$refId
=
$claim->lkpStatus
?->ref_id ?? 0;
$color
= match(
$refId
) {
9 => 'green',
10 => 'orange',
default => 'grey',
};
$color
= 'grey';
@endphp
<tr>
<td>{{
$list->firstItem
() +
$index
}}</td>
...
...
packages/portal/mileage/resources/views/BOD/index.blade.php
View file @
fe7f44ad
...
...
@@ -3,7 +3,7 @@
@
section
(
'content'
)
<
div
class
="
ui
segment
">
<a class="
ui
violet
left
ribbon
label
">BOD Dashboard - Tuntutan Mileage</a><br/>
<a class="
ui
teal
left
ribbon
label
">BOD Dashboard - Tuntutan Mileage</a><br/>
<div class="
ui
segment
">
@if(session('success'))
...
...
@@ -38,18 +38,7 @@
<tbody>
@forelse(
$list
as
$index
=>
$claim
)
@php
$refId
=
$claim->lkpStatus
?->ref_id ?? 0;
$color
= match(
$refId
) {
1 => 'grey',
2 => 'blue',
3 => 'yellow',
4 => 'red',
5 => 'olive',
6, 8, 10 => 'orange',
7 => 'teal',
9 => 'green',
default => 'grey',
};
$color
= 'grey';
$bulan
= [
1=>'Januari', 2=>'Februari', 3=>'Mac', 4=>'April',
5=>'Mei', 6=>'Jun', 7=>'Julai', 8=>'Ogos',
...
...
@@ -65,7 +54,7 @@
<td><span class="
ui
{{
$color
}}
label
">{{
$claim->lkpStatus
?->description ?? '-' }}</span></td>
<td>
<a href="
{{
route
(
'mileage::BOD.show'
,
$claim
->
id
)
}}
" class="
ui
blue
small
button
">
<i class="
eye
icon
"></i>
<i class="
eye
icon
"></i>
Lihat
</a>
</td>
</tr>
...
...
packages/portal/mileage/resources/views/BOD/show.blade.php
View file @
fe7f44ad
...
...
@@ -3,7 +3,7 @@
@
section
(
'content'
)
<
div
class
="
ui
segment
">
<a class="
ui
violet
left
ribbon
label
">Semakan Permohonan (BOD) - {{
$claim->mm_apply_no
}}</a><br/><br/>
<a class="
ui
teal
left
ribbon
label
">Semakan Permohonan (BOD) - {{
$claim->mm_apply_no
}}</a><br/><br/>
{{-- Maklumat Permohonan --}}
<div class="
ui
segment
">
...
...
@@ -46,18 +46,7 @@
<td>Status</td>
<td>
@php
$refId
=
$claim->lkpStatus
?->ref_id ?? 0;
$color
= match(
$refId
) {
1 => 'grey',
2 => 'blue',
3 => 'yellow',
4 => 'red',
5 => 'olive',
6, 8, 10 => 'orange',
7 => 'teal',
9 => 'green',
default => 'grey',
};
$color
= 'grey';
@endphp
<span class="
ui
{{
$color
}}
label
">{{
$claim->lkpStatus
?->description ?? '-' }}</span>
</td>
...
...
packages/portal/mileage/resources/views/HOD/history.blade.php
View file @
fe7f44ad
...
...
@@ -3,7 +3,7 @@
@
section
(
'content'
)
<
div
class
="
ui
segment
">
<a class="
ui
violet
left
ribbon
label
">Laporan Tuntutan Mileage - HOD</a><br/>
<a class="
ui
teal
left
ribbon
label
">Laporan Tuntutan Mileage - HOD</a><br/>
<div class="
ui
segment
">
@php
...
...
@@ -81,13 +81,7 @@
<tbody>
@forelse(
$list
as
$index
=>
$claim
)
@php
$refId
=
$claim->lkpStatus
?->ref_id ?? 0;
$color
= match(
$refId
) {
7 => 'teal',
8, 10 => 'orange',
9 => 'green',
default => 'grey',
};
$color
= 'grey';
@endphp
<tr>
<td>{{
$list->firstItem
() +
$index
}}</td>
...
...
packages/portal/mileage/resources/views/HOD/index.blade.php
View file @
fe7f44ad
...
...
@@ -3,7 +3,7 @@
@
section
(
'content'
)
<
div
class
="
ui
segment
">
<a class="
ui
violet
left
ribbon
label
">HOD Dashboard - Tuntutan Mileage</a><br/>
<a class="
ui
teal
left
ribbon
label
">HOD Dashboard - Tuntutan Mileage</a><br/>
<div class="
ui
segment
">
@if(session('success'))
...
...
@@ -38,18 +38,7 @@
<tbody>
@forelse(
$list
as
$index
=>
$claim
)
@php
$refId
=
$claim->lkpStatus
?->ref_id ?? 0;
$color
= match(
$refId
) {
1 => 'grey',
2 => 'blue',
3 => 'yellow',
4 => 'red',
5 => 'olive',
6, 8, 10 => 'orange',
7 => 'teal',
9 => 'green',
default => 'grey',
};
$color
= 'grey';
$bulan
= [
1=>'Januari', 2=>'Februari', 3=>'Mac', 4=>'April',
5=>'Mei', 6=>'Jun', 7=>'Julai', 8=>'Ogos',
...
...
@@ -64,12 +53,9 @@
<td>{{
$claim->mm_submit_date
? \Carbon\Carbon::parse(
$claim->mm_submit_date
)->format('d/m/Y') : '-' }}</td>
<td><span class="
ui
{{
$color
}}
label
">{{
$claim->lkpStatus
?->description ?? '-' }}</span></td>
<td>
<div class="
ui
small
icon
buttons
">
<a href="
{{
route
(
'mileage::HOD.show'
,
$claim
->
id
)
}}
" class="
ui
blue
button
">
<i class="
eye
icon
"></i>
</a>
</div>
<a href="
{{
route
(
'mileage::HOD.show'
,
$claim
->
id
)
}}
" class="
ui
blue
small
button
">
<i class="
eye
icon
"></i> Lihat
</a>
</td>
</tr>
@empty
...
...
packages/portal/mileage/resources/views/HOD/show.blade.php
View file @
fe7f44ad
...
...
@@ -3,7 +3,7 @@
@
section
(
'content'
)
<
div
class
="
ui
segment
">
<a class="
ui
violet
left
ribbon
label
">Semakan Permohonan - {{
$claim->mm_apply_no
}}</a><br/><br/>
<a class="
ui
teal
left
ribbon
label
">Semakan Permohonan - {{
$claim->mm_apply_no
}}</a><br/><br/>
{{-- Claim Header Info --}}
<div class="
ui
segment
">
...
...
@@ -42,18 +42,7 @@
<td>Status</td>
<td>
@php
$refId
=
$claim->lkpStatus
?->ref_id ?? 0;
$color
= match(
$refId
) {
1 => 'grey',
2 => 'blue',
3 => 'yellow',
4 => 'red',
5 => 'olive',
6, 8, 10 => 'orange',
7 => 'teal',
9 => 'green',
default => 'grey',
};
$color
= 'grey';
@endphp
<span class="
ui
{{
$color
}}
label
">{{
$claim->lkpStatus
?->description ?? '-' }}</span>
</td>
...
...
packages/portal/mileage/resources/views/PM/index.blade.php
View file @
fe7f44ad
...
...
@@ -3,7 +3,7 @@
@
section
(
'content'
)
<
div
class
="
ui
segment
">
<a class="
ui
olive
left
ribbon
label
">PM Dashboard - Tuntutan Mileage</a><br/>
<a class="
ui
teal
left
ribbon
label
">PM Dashboard - Tuntutan Mileage</a><br/>
<div class="
ui
segment
">
@if(session('success'))
...
...
@@ -38,13 +38,8 @@
<tbody>
@forelse(
$list
as
$index
=>
$claim
)
@php
$refId
=
$claim->lkpStatus
?->ref_id ?? 0;
$color
= match(
$refId
) {
2 => 'blue',
3 => 'yellow',
6 => 'orange',
default => 'grey',
};
$color
= 'grey';
$bulan
= [
1=>'Januari', 2=>'Februari', 3=>'Mac', 4=>'April',
5=>'Mei', 6=>'Jun', 7=>'Julai', 8=>'Ogos',
...
...
@@ -60,7 +55,7 @@
<td><span class="
ui
{{
$color
}}
label
">{{
$claim->lkpStatus
?->description ?? '-' }}</span></td>
<td>
<a href="
{{
route
(
'mileage::PM.show'
,
$claim
->
id
)
}}
" class="
ui
blue
small
button
">
<i class="
eye
icon
"></i>
<i class="
eye
icon
"></i>
Lihat
</a>
</td>
</tr>
...
...
packages/portal/mileage/resources/views/PM/show.blade.php
View file @
fe7f44ad
...
...
@@ -7,7 +7,7 @@
@
endphp
<
div
class
="
ui
segment
">
<a class="
ui
olive
left
ribbon
label
">Semakan PM - {{
$claim->mm_apply_no
}}</a><br/><br/>
<a class="
ui
teal
left
ribbon
label
">Semakan PM - {{
$claim->mm_apply_no
}}</a><br/><br/>
{{-- Maklumat Permohonan --}}
<div class="
ui
segment
">
...
...
@@ -37,14 +37,7 @@
<td>Status</td>
<td>
@php
$refId
=
$claim->lkpStatus
?->ref_id ?? 0;
$color
= match(
$refId
) {
2 => 'blue',
3 => 'yellow',
6 => 'orange',
5 => 'olive',
default => 'grey',
};
$color
= 'grey';
@endphp
<span class="
ui
{{
$color
}}
label
">{{
$claim->lkpStatus
?->description ?? '-' }}</span>
</td>
...
...
@@ -286,9 +279,9 @@
<td>{{
$detail->md_description
}}</td>
<td class="
center
aligned
">
@if(
$myReview
?->status === 'reviewed')
<span class="
ui
green
label
">
<i class="
check
icon
"></i>
Disemak</span>
<span class="
ui
green
label
"> Disemak</span>
@elseif(
$myReview
?->status === 'queried')
<span class="
ui
red
label
">
<i class="
question
icon
"></i>
Dikuiri</span>
<span class="
ui
red
label
"> Dikuiri</span>
@else
<span class="
ui
orange
label
">Pending</span>
@endif
...
...
@@ -298,11 +291,11 @@
<form method="
POST
" action="
{{
route
(
'mileage::PM.reviewDetail'
,
$detail
->
id
)
}}
" style="
display
:
inline
;
">
@csrf
<button type="
submit
" class="
ui
olive
mini
button
">
<i class="
check
icon
"></i>
Semak
Semak
</button>
</form>
<button type="
button
" class="
ui
orange
mini
button
" onclick="
toggleKuiri
({{
$detail
->
id
}})
">
<i class="
question
icon
"></i>
Kuiri
Kuiri
</button>
@else
-
...
...
packages/portal/mileage/resources/views/finance/index.blade.php
View file @
fe7f44ad
...
...
@@ -85,12 +85,7 @@
<tbody>
@forelse(
$list
as
$index
=>
$claim
)
@php
$refId
=
$claim->lkpStatus
?->ref_id ?? 0;
$color
= match(
$refId
) {
9 => 'teal',
11 => 'violet',
default => 'grey',
};
$color
= 'grey';
@endphp
<tr>
<td>{{
$list->firstItem
() +
$index
}}</td>
...
...
packages/portal/mileage/resources/views/finance/show.blade.php
View file @
fe7f44ad
...
...
@@ -54,13 +54,7 @@
<td>Status</td>
<td>
@php
$refId
=
$claim->lkpStatus
?->ref_id ?? 0;
$color
= match(
$refId
) {
9 => 'teal',
11 => 'violet',
12 => 'green',
default => 'grey',
};
$color
= 'grey';
@endphp
<span class="
ui
{{
$color
}}
label
">{{
$claim->lkpStatus
?->description ?? '-' }}</span>
</td>
...
...
packages/portal/mileage/resources/views/mileage/audit-trail.blade.php
View file @
fe7f44ad
...
...
@@ -3,7 +3,7 @@
@
section
(
'content'
)
<
div
class
="
ui
segment
">
<a class="
ui
violet
left
ribbon
label
">Audit Trail Tuntutan Mileage</a><br/>
<a class="
ui
teal
left
ribbon
label
">Audit Trail Tuntutan Mileage</a><br/>
<div class="
ui
segment
">
@if(session('success'))
...
...
packages/portal/mileage/resources/views/mileage/form.blade.php
View file @
fe7f44ad
...
...
@@ -3,7 +3,7 @@
@
section
(
'content'
)
<
div
class
="
ui
segment
">
<a class="
ui
violet
left
ribbon
label
">Permohonan Tuntutan Mileage - {{
$claim->mm_apply_no
}}</a><br/><br/>
<a class="
ui
teal
left
ribbon
label
">Permohonan Tuntutan Mileage - {{
$claim->mm_apply_no
}}</a><br/><br/>
@if(session('success'))
<div class="
ui
success
message
">{{ session('success') }}</div>
...
...
@@ -41,20 +41,7 @@
<td>Status</td>
<td>
@php
$refId
=
$claim->lkpStatus
?->ref_id ?? 0;
$color
= match(
$refId
) {
1 => 'grey',
2 => 'blue',
3 => 'yellow',
4 => 'red',
5 => 'olive',
6, 8, 10 => 'orange',
7 => 'teal',
9 => 'green',
11 => 'violet',
12 => 'green',
default => 'grey',
};
$color
= 'grey';
@endphp
<span class="
ui
{{
$color
}}
label
">{{
$claim->lkpStatus
?->description ?? '-' }}</span>
</td>
...
...
packages/portal/mileage/resources/views/mileage/list.blade.php
View file @
fe7f44ad
...
...
@@ -15,7 +15,7 @@
</
style
>
<
div
class
="
ui
segment
">
<a class="
ui
violet
left
ribbon
label
">Senarai Permohonan Tuntutan Mileage</a><br/>
<a class="
ui
teal
left
ribbon
label
">Senarai Permohonan Tuntutan Mileage</a><br/>
<div class="
ui
segment
">
@if(session('success'))
...
...
@@ -63,41 +63,32 @@
}],
['header' => __('Status'), 'raw' => function(
$row
){
$status
=
$row->lkpStatus
?->description ?? 'Draf';
$refId
=
$row->lkpStatus
?->ref_id ?? 0;
$color
= match(
$refId
) {
1 => 'grey',
2 => 'blue',
3 => 'yellow',
4 => 'red',
5 => 'olive',
6, 8, 10 => 'orange',
7 => 'teal',
9 => 'green',
11 => 'violet',
12 => 'green',
default => 'grey',
};
$color
= 'grey';
return '<span class="
ui
' . $color . '
label
">' .
$status
. '</span>';
}],
['header' => __('Tindakan'), 'raw' => function(
$row
){
$icon
= 'eye';
$color
= 'teal';
$url
= route('mileage::mileage.claim.form',
$row->id
);
if (
$row->status
== 1) {
$icon
= 'edit';
$color
= 'blue';
} elseif (
$row->status
== 8) {
$icon
= 'exclamation circle';
$color
= 'orange';
$output
= '<a href="
' . $url . '
" class="
ui
yellow
small
button
"><i class="
edit
icon
"></i> Kemaskini</a>';
$deleteUrl
= route('mileage::mileage.claim.delete',
$row->id
);
$token
= csrf_token();
$output
.= '
<form method="
POST
" action="
' . $deleteUrl . '
" style="
display
:
inline
;
margin
-
left
:
4
px
;
" onsubmit="
return
confirm
(
\
'Padam draf permohonan ini? Tindakan ini tidak boleh dibatalkan.\')">
<input type="hidden" name="_token" value="'
.
$token
.
'">
<input type="hidden" name="_method" value="DELETE">
<button type="submit" class="ui red small button"><i class="trash icon"></i> Padam</button>
</form>'
;
}
elseif
(
in_array
(
$row
->
status
,
[
6
,
8
,
10
]))
{
$output
=
'<a href="'
.
$url
.
'" class="ui yellow small button"><i class="edit icon"></i> Kemaskini</a>'
;
}
else
{
$output
=
'<a href="'
.
$url
.
'" class="ui blue small button"><i class="eye icon"></i> Lihat</a>'
;
}
$url
= route('mileage::mileage.claim.form',
$row->id
);
return '<a href="
' . $url . '
" class="
ui
' . $color . '
small
icon
button
"><i class="
' . $icon . '
icon
"></i></a>';
return
$output
;
}]
])
...
...
packages/portal/mileage/resources/views/mileage/queryForm.blade.php
View file @
fe7f44ad
...
...
@@ -3,7 +3,7 @@
@
section
(
'content'
)
<
div
class
="
ui
segment
">
<a class="
ui
violet
left
ribbon
label
">Permohonan Semula - {{
$claim->mm_apply_no
}}</a><br/><br/>
<a class="
ui
teal
left
ribbon
label
">Permohonan Semula - {{
$claim->mm_apply_no
}}</a><br/><br/>
@if(session('success'))
<div class="
ui
success
message
">{{ session('success') }}</div>
...
...
@@ -54,18 +54,7 @@
<td>Status</td>
<td>
@php
$refId
=
$claim->lkpStatus
?->ref_id ?? 0;
$color
= match(
$refId
) {
1 => 'grey',
2 => 'blue',
3 => 'yellow',
4 => 'red',
5 => 'olive',
6, 8, 10 => 'orange',
7 => 'teal',
9 => 'green',
default => 'grey',
};
$color
= 'grey';
@endphp
<span class="
ui
{{
$color
}}
label
">{{
$claim->lkpStatus
?->description ?? '-' }}</span>
</td>
...
...
packages/portal/mileage/routes/web.php
View file @
fe7f44ad
...
...
@@ -107,6 +107,7 @@ function () {
Route
::
post
(
'claim/{id}/attachment/upload'
,
[
'uses'
=>
'MileageController@uploadAttachment'
,
'as'
=>
'mileage.claim.attachment.upload'
]);
Route
::
delete
(
'claim/attachment/{id}/delete'
,
[
'uses'
=>
'MileageController@deleteAttachment'
,
'as'
=>
'mileage.claim.attachment.delete'
]);
Route
::
post
(
'claim/{id}/save-draft'
,
[
'uses'
=>
'MileageController@saveDraftClaim'
,
'as'
=>
'mileage.claim.saveDraft'
]);
Route
::
delete
(
'claim/{id}/delete'
,
[
'uses'
=>
'MileageController@deleteClaim'
,
'as'
=>
'mileage.claim.delete'
]);
Route
::
get
(
'audit-trail'
,
[
'uses'
=>
'MileageController@getAuditTrail'
,
'as'
=>
'mileage.audit-trail'
]);
...
...
packages/portal/mileage/src/Data/Repo/HODRepo.php
View file @
fe7f44ad
...
...
@@ -17,7 +17,13 @@ public function getHodList($request)
$search
=
$request
->
get
(
'search'
);
return
MileageClaimMain
::
with
([
'lkpStatus'
,
'staffInfo'
])
->
whereIn
(
'status'
,
[
5
])
->
where
(
function
(
$q
)
{
$q
->
whereIn
(
'status'
,
[
5
])
->
orWhere
(
function
(
$q2
)
{
$q2
->
where
(
'status'
,
2
)
->
whereDoesntHave
(
'pmReviews'
);
});
})
->
whereHas
(
'staffInfo'
,
function
(
$q
)
{
$q
->
where
(
'penyokong'
,
Auth
::
id
());
})
...
...
@@ -26,6 +32,7 @@ public function getHodList($request)
})
->
orderBy
(
'created_at'
,
'desc'
)
->
paginate
(
10
);
}
public
function
getHodHistory
(
$request
)
...
...
packages/portal/mileage/src/Data/Repo/MileageRepo.php
View file @
fe7f44ad
...
...
@@ -320,6 +320,28 @@ public function destroyDetail($id)
return
$detail
;
}
public
function
deleteClaim
(
$id
)
{
$staff
=
StaffInfo
::
where
(
'fk_users'
,
Auth
::
id
())
->
first
();
$claim
=
MileageClaimMain
::
where
(
'id'
,
$id
)
->
where
(
'fk_lkp_staff_info'
,
$staff
->
id
??
null
)
->
where
(
'status'
,
1
)
->
firstOrFail
();
foreach
(
$claim
->
attachments
as
$attachment
)
{
\Illuminate\Support\Facades\Storage
::
disk
(
'public'
)
->
delete
(
$attachment
->
file_path
);
$attachment
->
delete
();
}
$claim
->
details
()
->
delete
();
MileageClaimPmReview
::
where
(
'fk_claim_id'
,
$id
)
->
delete
();
$claim
->
delete
();
}
public
function
getUsedMonths
()
{
$staff
=
StaffInfo
::
where
(
'fk_users'
,
Auth
::
id
())
->
first
();
...
...
packages/portal/mileage/src/Http/Controllers/MileageController.php
View file @
fe7f44ad
...
...
@@ -169,6 +169,11 @@ public function deleteAttachment(Request $request, $id)
->
with
(
'success'
,
'Fail berjaya dipadam.'
);
}
public
function
deleteClaim
(
Request
$request
,
$id
)
{
$this
->
repos
->
deleteClaim
(
$id
);
return
redirect
()
->
route
(
'mileage::mileage.listmileage'
)
->
with
(
'success'
,
'Draf permohonan berjaya dipadam.'
);
}
}
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