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
d26a4cf1
Commit
d26a4cf1
authored
Jul 17, 2026
by
Muhammad Danial Bin Mohd Zaidi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
translation (malay to english)
parent
acd1b48f
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
100 additions
and
101 deletions
+100
-101
app/Enums/Permission.php
+1
-1
packages/portal/overtime/resources/views/overtime/audit_trail.blade.php
+9
-9
packages/portal/overtime/resources/views/overtime/overtimeclaim/pd/view.blade.php
+0
-1
packages/portal/overtime/resources/views/overtime/overtimeclaim/projectmanager/view.blade.php
+1
-1
packages/portal/overtime/resources/views/overtime/overtimeclaim/view_modal.blade.php
+7
-7
packages/portal/overtime/resources/views/overtime/overtimeclaim/view_modal_content.blade.php
+5
-5
packages/portal/overtime/resources/views/overtime/overtimerequest/pd/view.blade.php
+7
-7
packages/portal/overtime/resources/views/overtime/overtimerequest/pm/create.blade.php
+6
-6
packages/portal/overtime/src/Data/Repo/OvertimeClaimHodRepo.php
+4
-4
packages/portal/overtime/src/Data/Repo/OvertimeClaimPdRepo.php
+3
-3
packages/portal/overtime/src/Data/Repo/OvertimeClaimRepo.php
+16
-16
packages/portal/overtime/src/Data/Repo/OvertimeRequestRepo.php
+14
-14
packages/portal/overtime/src/Http/Controllers/OvertimeClaimHodController.php
+3
-3
packages/portal/overtime/src/Http/Controllers/OvertimeClaimPdController.php
+3
-3
packages/portal/overtime/src/Http/Controllers/OvertimeHodController.php
+4
-4
packages/portal/overtime/src/Http/Controllers/OvertimeProjectManagerController.php
+4
-4
packages/portal/overtime/src/Http/Controllers/OvertimeRequestController.php
+13
-13
No files found.
app/Enums/Permission.php
View file @
d26a4cf1
...
@@ -21,7 +21,7 @@ final class Permission extends Enum
...
@@ -21,7 +21,7 @@ final class Permission extends Enum
const
MANAGE_ROLE
=
'epicentrum::manage-role'
;
const
MANAGE_ROLE
=
'epicentrum::manage-role'
;
// asasd
// asasd
// hannah punya --------------------
--
// hannah punya --------------------
const
PROJECT_MANAGER
=
"PROJECT_MANAGER"
;
const
PROJECT_MANAGER
=
"PROJECT_MANAGER"
;
const
PROJECT_DIRECTOR
=
"PROJECT_DIRECTOR"
;
const
PROJECT_DIRECTOR
=
"PROJECT_DIRECTOR"
;
const
HOD
=
"HOD"
;
const
HOD
=
"HOD"
;
...
...
packages/portal/overtime/resources/views/overtime/audit_trail.blade.php
View file @
d26a4cf1
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
</
style
>
</
style
>
<
div
class
="
ui
segment
">
<
div
class
="
ui
segment
">
<a class="
ui
teal
left
ribbon
label
">
Audit Trail Tuntutan Lebih Masa
</a>
<a class="
ui
teal
left
ribbon
label
">
Overtime Claim Audit Trail
</a>
<div class="
ui
segment
">
<div class="
ui
segment
">
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
</div>
</div>
<div class="
column
" style="
text
-
align
:
right
;
padding
-
top
:
1.2
rem
;
">
<div class="
column
" style="
text
-
align
:
right
;
padding
-
top
:
1.2
rem
;
">
<a href="
{{
route
(
'overtime::overtime.listovertime'
)
}}
" class="
ui
grey
button
">
<a href="
{{
route
(
'overtime::overtime.listovertime'
)
}}
" class="
ui
grey
button
">
<i class="
arrow
left
icon
"></i>
Kembali
<i class="
arrow
left
icon
"></i>
Back
</a>
</a>
</div>
</div>
</div>
</div>
...
@@ -31,11 +31,11 @@
...
@@ -31,11 +31,11 @@
<form method="
GET
" class="
ui
form
" style="
margin
-
bottom
:
1
rem
;
">
<form method="
GET
" class="
ui
form
" style="
margin
-
bottom
:
1
rem
;
">
<div class="
fields
" style="
align
-
items
:
flex
-
end
;
">
<div class="
fields
" style="
align
-
items
:
flex
-
end
;
">
<div class="
field
" style="
flex
:
1
;
">
<div class="
field
" style="
flex
:
1
;
">
<input type="
text
" name="
search
" placeholder="
Cari
No
.
Tuntutan
…
" value="
{{
request
(
'search'
)
}}
">
<input type="
text
" name="
search
" placeholder="
Search
claim
number
…
" value="
{{
request
(
'search'
)
}}
">
</div>
</div>
<div class="
field
">
<div class="
field
">
<button type="
submit
" class="
ui
teal
button
">
<button type="
submit
" class="
ui
teal
button
">
<i class="
search
icon
"></i>
Cari
<i class="
search
icon
"></i>
Search
</button>
</button>
</div>
</div>
</div>
</div>
...
@@ -45,10 +45,10 @@
...
@@ -45,10 +45,10 @@
<thead>
<thead>
<tr>
<tr>
<th style="
width
:
50
px
;
">No</th>
<th style="
width
:
50
px
;
">No</th>
<th>
No. Tuntutan
</th>
<th>
Claim No.
</th>
<th>
Tindaka
n</th>
<th>
Actio
n</th>
<th>
Peneranga
n</th>
<th>
Descriptio
n</th>
<th>
Tarikh
</th>
<th>
Date
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
@empty
@empty
<tr>
<tr>
<td colspan="
5
" style="
text
-
align
:
center
;
color
:
#bbb; font-style:italic; padding:1.6rem;">
<td colspan="
5
" style="
text
-
align
:
center
;
color
:
#bbb; font-style:italic; padding:1.6rem;">
Tiada
rekod
audit
trail
dijumpai
.
No
audit
trail
records
found
.
</
td
>
</
td
>
</
tr
>
</
tr
>
@
endforelse
@
endforelse
...
...
packages/portal/overtime/resources/views/overtime/overtimeclaim/pd/view.blade.php
View file @
d26a4cf1
...
@@ -153,7 +153,6 @@
...
@@ -153,7 +153,6 @@
</
div
>
</
div
>
</
div
>
</
div
>
// FOOTER
<
div
class
="
rf
-
footer
">
<
div
class
="
rf
-
footer
">
<a href="
{{
route
(
'overtime::overtime.pdclaimreviewlist'
)
}}
" class="
ui
grey
button
">
<a href="
{{
route
(
'overtime::overtime.pdclaimreviewlist'
)
}}
" class="
ui
grey
button
">
<i class="
arrow
left
icon
"></i> Back
<i class="
arrow
left
icon
"></i> Back
...
...
packages/portal/overtime/resources/views/overtime/overtimeclaim/projectmanager/view.blade.php
View file @
d26a4cf1
...
@@ -140,7 +140,7 @@
...
@@ -140,7 +140,7 @@
<td><strong>{{ number_format(
$d->ocd_effective_hours
, 1) }}</strong></td>
<td><strong>{{ number_format(
$d->ocd_effective_hours
, 1) }}</strong></td>
</tr>
</tr>
@empty
@empty
<tr><td colspan="
10
" style="
color
:
#bbb; font-style:italic; padding:1.5rem;">
Tiada entri
.</td></tr>
<tr><td colspan="
10
" style="
color
:
#bbb; font-style:italic; padding:1.5rem;">
No entries found
.</td></tr>
@
endforelse
@
endforelse
</
tbody
>
</
tbody
>
<
tfoot
>
<
tfoot
>
...
...
packages/portal/overtime/resources/views/overtime/overtimeclaim/view_modal.blade.php
View file @
d26a4cf1
...
@@ -50,11 +50,11 @@
...
@@ -50,11 +50,11 @@
</div>
</div>
<script>
<script>
var
VCM_MONTHS
=
[
'Jan'
,
'Feb'
,
'Ma
c'
,
'Apr'
,
'Mei'
,
'Jun'
,
'Jul'
,
'Ogos'
,
'Sep'
,
'Okt'
,
'Nov'
,
'Dis
'
];
var
VCM_MONTHS
=
[
'Jan'
,
'Feb'
,
'Ma
r'
,
'Apr'
,
'May'
,
'Jun'
,
'Jul'
,
'Aug'
,
'Sep'
,
'Oct'
,
'Nov'
,
'Dec
'
];
var
VCM_DAYS
=
[
'
Ahad'
,
'Isnin'
,
'Selasa'
,
'Rabu'
,
'Khamis'
,
'Jumaat'
,
'Sabtu
'
];
var
VCM_DAYS
=
[
'
Sunday'
,
'Monday'
,
'Tuesday'
,
'Wednesday'
,
'Thursday'
,
'Friday'
,
'Saturday
'
];
var
VCM_MONTH_MS
=
[
var
VCM_MONTH_MS
=
[
'Januar
i'
,
'Februari'
,
'Mac'
,
'April'
,
'Mei'
,
'Jun
'
,
'Januar
y'
,
'February'
,
'March'
,
'April'
,
'May'
,
'June
'
,
'Jul
ai'
,
'Ogos'
,
'September'
,
'Oktober'
,
'November'
,
'Dis
ember'
'Jul
y'
,
'August'
,
'September'
,
'October'
,
'November'
,
'Dec
ember'
];
];
function
vcmPad
(
n
)
{
return
String
(
n
).
padStart
(
2
,
'0'
);
}
function
vcmPad
(
n
)
{
return
String
(
n
).
padStart
(
2
,
'0'
);
}
...
@@ -85,14 +85,14 @@ function viewTuntutan(id) {
...
@@ -85,14 +85,14 @@ function viewTuntutan(id) {
}
else
{
}
else
{
$
(
'#vm-claim-content'
).
html
(
$
(
'#vm-claim-content'
).
html
(
'<div class="ui negative message"><p>'
'<div class="ui negative message"><p>'
+
vcmEsc
(
res
.
message
||
'
Error occurred while loading
data.'
)
+
vcmEsc
(
res
.
message
||
'
An error occurred while loading the
data.'
)
+
'</p></div>'
+
'</p></div>'
);
);
}
}
},
},
error
:
function
()
{
error
:
function
()
{
$
(
'#vm-claim-content'
).
html
(
$
(
'#vm-claim-content'
).
html
(
'<div class="ui negative message"><p>Network error. Please try again.</p></div>'
'<div class="ui negative message"><p>Network error. Please try again
later
.</p></div>'
);
);
},
},
});
});
...
@@ -136,7 +136,7 @@ function vcmBuildHtml(main, details) {
...
@@ -136,7 +136,7 @@ function vcmBuildHtml(main, details) {
+
'</thead><tbody>'
;
+
'</thead><tbody>'
;
if
(
!
details
||
details
.
length
===
0
)
{
if
(
!
details
||
details
.
length
===
0
)
{
html
+=
'<tr><td colspan="10" class="vm-empty">No details
adde
d.</td></tr>'
html
+=
'<tr><td colspan="10" class="vm-empty">No details
foun
d.</td></tr>'
+
'</tbody></table></div>'
;
+
'</tbody></table></div>'
;
return
html
;
return
html
;
}
}
...
...
packages/portal/overtime/resources/views/overtime/overtimeclaim/view_modal_content.blade.php
View file @
d26a4cf1
<?php
<?php
$months
=
[
'Jan'
,
'Feb'
,
'Ma
c'
,
'Apr'
,
'Mei'
,
'Jun'
,
'Jul'
,
'Ogos'
,
'Sep'
,
'Okt'
,
'Nov'
,
'Dis
'
];
$months
=
[
'Jan'
,
'Feb'
,
'Ma
r'
,
'Apr'
,
'May'
,
'Jun'
,
'Jul'
,
'Aug'
,
'Sep'
,
'Oct'
,
'Nov'
,
'Dec
'
];
$days
=
[
'
Ahad'
,
'Isnin'
,
'Selasa'
,
'Rabu'
,
'Khamis'
,
'Jumaat'
,
'Sabtu
'
];
$days
=
[
'
Sunday'
,
'Monday'
,
'Tuesday'
,
'Wednesday'
,
'Thursday'
,
'Friday'
,
'Saturday
'
];
$monthNames
=
[
$monthNames
=
[
'Januar
i'
,
'Februari'
,
'Mac'
,
'April'
,
'Mei'
,
'Jun
'
,
'Januar
y'
,
'February'
,
'March'
,
'April'
,
'May'
,
'June
'
,
'Jul
ai'
,
'Ogos'
,
'September'
,
'Oktober'
,
'November'
,
'Dis
ember'
'Jul
y'
,
'August'
,
'September'
,
'October'
,
'November'
,
'Dec
ember'
];
];
$escape
=
function
(
$value
)
{
$escape
=
function
(
$value
)
{
...
@@ -68,7 +68,7 @@
...
@@ -68,7 +68,7 @@
</thead>
</thead>
<tbody>
<tbody>
@if (empty($details))
@if (empty($details))
<tr><td
colspan=
"10"
class=
"vm-empty"
>
No details
adde
d.
</td></tr>
<tr><td
colspan=
"10"
class=
"vm-empty"
>
No details
foun
d.
</td></tr>
@else
@else
@foreach ($details as $detail)
@foreach ($details as $detail)
@php
@php
...
...
packages/portal/overtime/resources/views/overtime/overtimerequest/pd/view.blade.php
View file @
d26a4cf1
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
<div class="
meta
-
line
">Project: <strong>{{
$project->p_project_description
?? '-' }}</strong></div>
<div class="
meta
-
line
">Project: <strong>{{
$project->p_project_description
?? '-' }}</strong></div>
<div class="
meta
-
line
">Department: <strong>{{
$main->orm_department_label
?? '-' }}</strong></div>
<div class="
meta
-
line
">Department: <strong>{{
$main->orm_department_label
?? '-' }}</strong></div>
<div class="
meta
-
line
">Request Date: <strong>{{
$main->orm_requested_date
? \Carbon\Carbon::parse(
$main->orm_requested_date
)->format('d/m/Y') : '-' }}</strong></div>
<div class="
meta
-
line
">Request Date: <strong>{{
$main->orm_requested_date
? \Carbon\Carbon::parse(
$main->orm_requested_date
)->format('d/m/Y') : '-' }}</strong></div>
<div class="
meta
-
line
">Approve by: <strong>{{
$main->orm_approved_by_name
?? '-' }}</strong></div>
<div class="
meta
-
line
">Approve
d
by: <strong>{{
$main->orm_approved_by_name
?? '-' }}</strong></div>
<div class="
meta
-
line
">Approved Date: <strong>{{
$main->orm_approved_date
? \Carbon\Carbon::parse(
$main->orm_approved_date
)->format('d/m/Y') : '-' }}</strong></div>
<div class="
meta
-
line
">Approved Date: <strong>{{
$main->orm_approved_date
? \Carbon\Carbon::parse(
$main->orm_approved_date
)->format('d/m/Y') : '-' }}</strong></div>
<div class="
meta
-
line
">Status: <span class="
ui
label
" style="
font
-
size
:.
78
rem
;
">{{
$statuses[$main->orm_status]
->description ?? '-' }}</span></div>
<div class="
meta
-
line
">Status: <span class="
ui
label
" style="
font
-
size
:.
78
rem
;
">{{
$statuses[$main->orm_status]
->description ?? '-' }}</span></div>
</div>
</div>
...
@@ -90,7 +90,7 @@
...
@@ -90,7 +90,7 @@
<td class="
td
-
left
">{{
$d->ord_reason
?: '-' }}</td>
<td class="
td
-
left
">{{
$d->ord_reason
?: '-' }}</td>
</tr>
</tr>
@empty
@empty
<tr><td colspan="
8
" style="
color
:
#bbb; font-style:italic; padding:1.5rem;">No details.</td></tr>
<tr><td colspan="
8
" style="
color
:
#bbb; font-style:italic; padding:1.5rem;">No details
found
.</td></tr>
@
endforelse
@
endforelse
</
tbody
>
</
tbody
>
<
tfoot
>
<
tfoot
>
...
@@ -114,7 +114,7 @@
...
@@ -114,7 +114,7 @@
<
div
style
=
"margin-top:.8rem;"
>
<
div
style
=
"margin-top:.8rem;"
>
<
div
class
="
ui
form
">
<
div
class
="
ui
form
">
<div class="
grouped
fields
">
<div class="
grouped
fields
">
<label style="
font
-
weight
:
600
;
">
Pilih Tindaka
n</label>
<label style="
font
-
weight
:
600
;
">
Choose Actio
n</label>
<div class="
field
">
<div class="
field
">
<div class="
ui
radio
checkbox
">
<div class="
ui
radio
checkbox
">
<input type="
radio
" name="
pd_action
" value="
support
" id="
pd_action_support
" checked>
<input type="
radio
" name="
pd_action
" value="
support
" id="
pd_action_support
" checked>
...
@@ -199,7 +199,7 @@ function showError(msg) { $('#error-text').text(msg); $('#error-msg').show()
...
@@ -199,7 +199,7 @@ function showError(msg) { $('#error-text').text(msg); $('#error-msg').show()
$('#btn-pd-action').on('click', function () {
$('#btn-pd-action').on('click', function () {
var action = $('input[name="
pd_action
"]:checked').val();
var action = $('input[name="
pd_action
"]:checked').val();
if (action === 'support') {
if (action === 'support') {
if (!confirm('
Confirm the approval of
this request form?')) return;
if (!confirm('
Approve
this request form?')) return;
$.ajax({
$.ajax({
url : "
{{
route
(
'overtime::overtime.pdapproverequest'
,
$main
->
id
)
}}
",
url : "
{{
route
(
'overtime::overtime.pdapproverequest'
,
$main
->
id
)
}}
",
method: 'POST',
method: 'POST',
...
@@ -220,8 +220,8 @@ function showError(msg) { $('#error-text').text(msg); $('#error-msg').show()
...
@@ -220,8 +220,8 @@ function showError(msg) { $('#error-text').text(msg); $('#error-msg').show()
}
}
var remark = $('#kueri_remark').val().trim();
var remark = $('#kueri_remark').val().trim();
if (!remark) { showError('
Sila isi catatan kueri
.'); return; }
if (!remark) { showError('
Please enter query notes
.'); return; }
if (!confirm('Confirm
the submission of
this query back to the Project Manager?')) return;
if (!confirm('Confirm
sending
this query back to the Project Manager?')) return;
$.ajax({
$.ajax({
url : "
{{
route
(
'overtime::overtime.pdkuerirequest'
,
$main
->
id
)
}}
",
url : "
{{
route
(
'overtime::overtime.pdkuerirequest'
,
$main
->
id
)
}}
",
...
@@ -232,7 +232,7 @@ function showError(msg) { $('#error-text').text(msg); $('#error-msg').show()
...
@@ -232,7 +232,7 @@ function showError(msg) { $('#error-text').text(msg); $('#error-msg').show()
showSuccess(res.message);
showSuccess(res.message);
setTimeout(function () { window.location.href = res.redirect; }, 1200);
setTimeout(function () { window.location.href = res.redirect; }, 1200);
} else {
} else {
showError(res.message || 'Error while s
ubmitting the query back. Please try again
');
showError(res.message || 'Error while s
ending the query back. Please try again.
');
}
}
},
},
error: function (xhr) {
error: function (xhr) {
...
...
packages/portal/overtime/resources/views/overtime/overtimerequest/pm/create.blade.php
View file @
d26a4cf1
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
<p
style=
"color:#888; margin-bottom:1.2rem;"
>
<p
style=
"color:#888; margin-bottom:1.2rem;"
>
<i
class=
"info circle icon"
></i>
<i
class=
"info circle icon"
></i>
Select project for the new request form.
Select
a
project for the new request form.
</p>
</p>
<div
class=
"required field"
id=
"field-orm_project"
>
<div
class=
"required field"
id=
"field-orm_project"
>
...
@@ -85,7 +85,7 @@ function renderProjectOptions(occupied) {
...
@@ -85,7 +85,7 @@ function renderProjectOptions(occupied) {
ALL_PROJECTS
.
forEach
(
function
(
p
)
{
ALL_PROJECTS
.
forEach
(
function
(
p
)
{
var
isTaken
=
occupied
.
indexOf
(
String
(
p
.
id
))
!==
-
1
;
var
isTaken
=
occupied
.
indexOf
(
String
(
p
.
id
))
!==
-
1
;
var
label
=
p
.
name
+
(
isTaken
?
' (
Sudah ada borang untuk bulan ini
)'
:
''
);
var
label
=
p
.
name
+
(
isTaken
?
' (
A request form already exists for this month
)'
:
''
);
var
attrs
=
isTaken
?
' disabled style="color:#bbb;"'
:
''
;
var
attrs
=
isTaken
?
' disabled style="color:#bbb;"'
:
''
;
var
selected
=
(
!
isTaken
&&
current
==
p
.
id
)
?
' selected'
:
''
;
var
selected
=
(
!
isTaken
&&
current
==
p
.
id
)
?
' selected'
:
''
;
...
@@ -153,14 +153,14 @@ function resetRequestModal() {
...
@@ -153,14 +153,14 @@ function resetRequestModal() {
if
(
!
project
)
{
if
(
!
project
)
{
$
(
'#field-orm_project'
).
addClass
(
'error'
);
$
(
'#field-orm_project'
).
addClass
(
'error'
);
$
(
'#rmodal-error-text'
).
text
(
'
Sila pilih projek
.'
);
$
(
'#rmodal-error-text'
).
text
(
'
Please select a project
.'
);
$
(
'#rmodal-error-msg'
).
show
();
$
(
'#rmodal-error-msg'
).
show
();
return
;
return
;
}
}
if
(
!
month
||
!
year
)
{
if
(
!
month
||
!
year
)
{
$
(
'#field-orm_date'
).
addClass
(
'error'
);
$
(
'#field-orm_date'
).
addClass
(
'error'
);
$
(
'#rmodal-error-text'
).
text
(
'
Sila pilih bulan permohonan OT
.'
);
$
(
'#rmodal-error-text'
).
text
(
'
Please select the OT request month
.'
);
$
(
'#rmodal-error-msg'
).
show
();
$
(
'#rmodal-error-msg'
).
show
();
return
;
return
;
}
}
...
@@ -184,13 +184,13 @@ function resetRequestModal() {
...
@@ -184,13 +184,13 @@ function resetRequestModal() {
$
(
'#rmodal-success-msg'
).
show
();
$
(
'#rmodal-success-msg'
).
show
();
setTimeout
(
function
()
{
window
.
location
.
href
=
res
.
redirect
;
},
800
);
setTimeout
(
function
()
{
window
.
location
.
href
=
res
.
redirect
;
},
800
);
}
else
{
}
else
{
$
(
'#rmodal-error-text'
).
text
(
res
.
message
||
'
Ralat tidak diketahui
.'
);
$
(
'#rmodal-error-text'
).
text
(
res
.
message
||
'
Unknown error
.'
);
$
(
'#rmodal-error-msg'
).
show
();
$
(
'#rmodal-error-msg'
).
show
();
}
}
},
},
error
:
function
(
xhr
)
{
error
:
function
(
xhr
)
{
btn
.
removeClass
(
'loading disabled'
);
btn
.
removeClass
(
'loading disabled'
);
var
msg
=
'
Ralat rangkaian. Sila cuba lagi
.'
;
var
msg
=
'
Network error. Please try again
.'
;
if
(
xhr
.
status
===
422
&&
xhr
.
responseJSON
&&
xhr
.
responseJSON
.
errors
)
{
if
(
xhr
.
status
===
422
&&
xhr
.
responseJSON
&&
xhr
.
responseJSON
.
errors
)
{
msg
=
Object
.
values
(
xhr
.
responseJSON
.
errors
).
flat
().
join
(
' '
);
msg
=
Object
.
values
(
xhr
.
responseJSON
.
errors
).
flat
().
join
(
' '
);
}
else
if
(
xhr
.
responseJSON
&&
xhr
.
responseJSON
.
message
)
{
}
else
if
(
xhr
.
responseJSON
&&
xhr
.
responseJSON
.
message
)
{
...
...
packages/portal/overtime/src/Data/Repo/OvertimeClaimHodRepo.php
View file @
d26a4cf1
...
@@ -108,7 +108,7 @@ public function sokongClaim($request, int $claimId): OvertimeClaimMain
...
@@ -108,7 +108,7 @@ public function sokongClaim($request, int $claimId): OvertimeClaimMain
$pending
=
$this
->
countPendingPmReviews
(
$claimId
);
$pending
=
$this
->
countPendingPmReviews
(
$claimId
);
if
(
$pending
>
0
)
{
if
(
$pending
>
0
)
{
throw
new
\Exception
(
'
Belum semua PM telah menyemak. Sokongan HOD tidak dibenarkan lagi
.'
);
throw
new
\Exception
(
'
Not all PMs have reviewed yet. HOD support is not allowed yet
.'
);
}
}
$claim
->
update
([
$claim
->
update
([
...
@@ -117,7 +117,7 @@ public function sokongClaim($request, int $claimId): OvertimeClaimMain
...
@@ -117,7 +117,7 @@ public function sokongClaim($request, int $claimId): OvertimeClaimMain
]);
]);
$this
->
logAudit
(
'UPDATE'
,
$claim
->
id
,
null
,
$this
->
logAudit
(
'UPDATE'
,
$claim
->
id
,
null
,
"
menyokong permohonan
{
$claim
->
ocm_apply_no
}
dan menghantar k
e PD."
);
"
supported claim
{
$claim
->
ocm_apply_no
}
and sent it to th
e PD."
);
return
$claim
;
return
$claim
;
}
}
...
@@ -146,7 +146,7 @@ public function kueriClaim($request, int $claimId): OvertimeClaimMain
...
@@ -146,7 +146,7 @@ public function kueriClaim($request, int $claimId): OvertimeClaimMain
]);
]);
$this
->
logAudit
(
'UPDATE'
,
$claim
->
id
,
null
,
$this
->
logAudit
(
'UPDATE'
,
$claim
->
id
,
null
,
"
mengueri permohonan
{
$claim
->
ocm_apply_no
}
dan menghantar semula kepada pemohon
."
);
"
queried claim
{
$claim
->
ocm_apply_no
}
and sent it back to the applicant
."
);
return
$claim
;
return
$claim
;
}
}
...
@@ -169,7 +169,7 @@ private function logAudit(string $taskCode, int $claimId, ?int $detailId, string
...
@@ -169,7 +169,7 @@ private function logAudit(string $taskCode, int $claimId, ?int $detailId, string
$userName
=
Auth
::
user
()
->
name
??
'Unknown'
;
$userName
=
Auth
::
user
()
->
name
??
'Unknown'
;
$applyNo
=
OvertimeClaimMain
::
where
(
'id'
,
$claimId
)
->
value
(
'ocm_apply_no'
)
??
'-'
;
$applyNo
=
OvertimeClaimMain
::
where
(
'id'
,
$claimId
)
->
value
(
'ocm_apply_no'
)
??
'-'
;
$description
=
"
{
$userName
}
melakukan tindakan
{
$taskName
}
pada permohonan
{
$applyNo
}
."
;
$description
=
"
{
$userName
}
performed
{
$taskName
}
on claim
{
$applyNo
}
."
;
if
(
$extra
)
{
if
(
$extra
)
{
$description
.=
' '
.
$extra
;
$description
.=
' '
.
$extra
;
}
}
...
...
packages/portal/overtime/src/Data/Repo/OvertimeClaimPdRepo.php
View file @
d26a4cf1
...
@@ -94,7 +94,7 @@ public function sokongClaim($request, int $claimId): OvertimeClaimMain
...
@@ -94,7 +94,7 @@ public function sokongClaim($request, int $claimId): OvertimeClaimMain
]);
]);
$this
->
logAudit
(
'UPDATE'
,
$claim
->
id
,
null
,
$this
->
logAudit
(
'UPDATE'
,
$claim
->
id
,
null
,
"
meluluskan permohonan
{
$claim
->
ocm_apply_no
}
."
);
"
approved claim
{
$claim
->
ocm_apply_no
}
."
);
return
$claim
;
return
$claim
;
}
}
...
@@ -123,7 +123,7 @@ public function kueriClaim($request, int $claimId): OvertimeClaimMain
...
@@ -123,7 +123,7 @@ public function kueriClaim($request, int $claimId): OvertimeClaimMain
]);
]);
$this
->
logAudit
(
'UPDATE'
,
$claim
->
id
,
null
,
$this
->
logAudit
(
'UPDATE'
,
$claim
->
id
,
null
,
"
mengueri permohonan
{
$claim
->
ocm_apply_no
}
dan menghantar semula kepada pemohon
."
);
"
queried claim
{
$claim
->
ocm_apply_no
}
and sent it back to the applicant
."
);
return
$claim
;
return
$claim
;
}
}
...
@@ -146,7 +146,7 @@ private function logAudit(string $taskCode, int $claimId, ?int $detailId, string
...
@@ -146,7 +146,7 @@ private function logAudit(string $taskCode, int $claimId, ?int $detailId, string
$userName
=
Auth
::
user
()
->
name
??
'Unknown'
;
$userName
=
Auth
::
user
()
->
name
??
'Unknown'
;
$applyNo
=
OvertimeClaimMain
::
where
(
'id'
,
$claimId
)
->
value
(
'ocm_apply_no'
)
??
'-'
;
$applyNo
=
OvertimeClaimMain
::
where
(
'id'
,
$claimId
)
->
value
(
'ocm_apply_no'
)
??
'-'
;
$description
=
"
{
$userName
}
melakukan tindakan
{
$taskName
}
pada permohonan
{
$applyNo
}
."
;
$description
=
"
{
$userName
}
performed
{
$taskName
}
on claim
{
$applyNo
}
."
;
if
(
$extra
)
{
if
(
$extra
)
{
$description
.=
' '
.
$extra
;
$description
.=
' '
.
$extra
;
}
}
...
...
packages/portal/overtime/src/Data/Repo/OvertimeClaimRepo.php
View file @
d26a4cf1
...
@@ -172,7 +172,7 @@ public function addOvertimeClaimDetail(int $id, $request): OvertimeClaimDetail
...
@@ -172,7 +172,7 @@ public function addOvertimeClaimDetail(int $id, $request): OvertimeClaimDetail
$detail
=
$existing
->
fresh
();
$detail
=
$existing
->
fresh
();
$this
->
getAuditTrail
(
'UPDATE'
,
$id
,
$detail
->
id
,
$this
->
getAuditTrail
(
'UPDATE'
,
$id
,
$detail
->
id
,
'Entr
i tarikh '
.
$request
->
ocd_date
.
' dikemaskini
.'
);
'Entr
y date '
.
$request
->
ocd_date
.
' updated
.'
);
return
$detail
;
return
$detail
;
}
}
...
@@ -182,7 +182,7 @@ public function addOvertimeClaimDetail(int $id, $request): OvertimeClaimDetail
...
@@ -182,7 +182,7 @@ public function addOvertimeClaimDetail(int $id, $request): OvertimeClaimDetail
]));
]));
$this
->
getAuditTrail
(
'CREATE'
,
$id
,
$detail
->
id
,
$this
->
getAuditTrail
(
'CREATE'
,
$id
,
$detail
->
id
,
'Entr
i tarikh '
.
$request
->
ocd_date
.
' ditambah
.'
);
'Entr
y date '
.
$request
->
ocd_date
.
' added
.'
);
return
$detail
;
return
$detail
;
}
}
...
@@ -200,7 +200,7 @@ public function removeOvertimeClaimDetail(int $id): void
...
@@ -200,7 +200,7 @@ public function removeOvertimeClaimDetail(int $id): void
$detail
->
delete
();
$detail
->
delete
();
$this
->
getAuditTrail
(
'DELETE'
,
$mainId
,
$id
,
$this
->
getAuditTrail
(
'DELETE'
,
$mainId
,
$id
,
'Entr
i tarikh '
.
$date
.
' dibuang
.'
);
'Entr
y date '
.
$date
.
' removed
.'
);
}
}
...
@@ -221,7 +221,7 @@ public function updateOvertimeClaim($request, int $id): OvertimeClaimMain
...
@@ -221,7 +221,7 @@ public function updateOvertimeClaim($request, int $id): OvertimeClaimMain
'updated_by'
=>
Auth
::
id
(),
'updated_by'
=>
Auth
::
id
(),
]);
]);
$this
->
getAuditTrail
(
'UPDATE'
,
$id
,
null
,
'
Tuntutan dikemaskini
.'
);
$this
->
getAuditTrail
(
'UPDATE'
,
$id
,
null
,
'
Claim updated
.'
);
return
$record
;
return
$record
;
}
}
...
@@ -231,7 +231,7 @@ public function updateOvertimeClaim($request, int $id): OvertimeClaimMain
...
@@ -231,7 +231,7 @@ public function updateOvertimeClaim($request, int $id): OvertimeClaimMain
// =========================================================================
// =========================================================================
// SUBMIT (status-aware — first submission goes to 2, resubmission after kueri
goes to 3)
// SUBMIT (status-aware - first submission goes to 2, resubmission after query
goes to 3)
// =========================================================================
// =========================================================================
public
function
submitOvertimeClaim
(
$request
,
int
$id
)
:
OvertimeClaimMain
public
function
submitOvertimeClaim
(
$request
,
int
$id
)
:
OvertimeClaimMain
...
@@ -240,7 +240,7 @@ public function submitOvertimeClaim($request, int $id): OvertimeClaimMain
...
@@ -240,7 +240,7 @@ public function submitOvertimeClaim($request, int $id): OvertimeClaimMain
$detailCount
=
OvertimeClaimDetail
::
where
(
'fk_overtime_claim_main'
,
$id
)
->
count
();
$detailCount
=
OvertimeClaimDetail
::
where
(
'fk_overtime_claim_main'
,
$id
)
->
count
();
if
(
$detailCount
===
0
)
{
if
(
$detailCount
===
0
)
{
throw
new
\Exception
(
'
Sila tambah sekurang-kurangnya satu hari tuntutan lebih masa
.'
);
throw
new
\Exception
(
'
Please add at least one overtime claim day
.'
);
}
}
$isResubmission
=
$record
->
ocm_status
==
6
&&
$record
->
ocm_query_status
==
1
;
$isResubmission
=
$record
->
ocm_status
==
6
&&
$record
->
ocm_query_status
==
1
;
...
@@ -260,7 +260,7 @@ public function submitOvertimeClaim($request, int $id): OvertimeClaimMain
...
@@ -260,7 +260,7 @@ public function submitOvertimeClaim($request, int $id): OvertimeClaimMain
]);
]);
$this
->
getAuditTrail
(
'SUBMIT'
,
$id
,
null
,
$this
->
getAuditTrail
(
'SUBMIT'
,
$id
,
null
,
$isResubmission
?
'
Tuntutan dihantar semula selepas kueri.'
:
'Tuntutan dihantar untuk kelulusan
.'
);
$isResubmission
?
'
Claim resubmitted after query.'
:
'Claim submitted for approval
.'
);
return
$record
;
return
$record
;
}
}
...
@@ -274,7 +274,7 @@ public function deleteOvertimeClaim(int $id): void
...
@@ -274,7 +274,7 @@ public function deleteOvertimeClaim(int $id): void
OvertimeClaimDetail
::
where
(
'fk_overtime_claim_main'
,
$id
)
->
delete
();
OvertimeClaimDetail
::
where
(
'fk_overtime_claim_main'
,
$id
)
->
delete
();
OvertimeClaimMain
::
findOrFail
(
$id
)
->
delete
();
OvertimeClaimMain
::
findOrFail
(
$id
)
->
delete
();
$this
->
getAuditTrail
(
'DELETE'
,
$id
,
null
,
'
Tuntutan dipadam
.'
);
$this
->
getAuditTrail
(
'DELETE'
,
$id
,
null
,
'
Claim deleted
.'
);
}
}
...
@@ -294,7 +294,7 @@ public function getAuditTrail(string $taskCode, int $claimId, ?int $detailId = n
...
@@ -294,7 +294,7 @@ public function getAuditTrail(string $taskCode, int $claimId, ?int $detailId = n
$applyNo
=
OvertimeClaimMain
::
where
(
'id'
,
$claimId
)
->
value
(
'ocm_apply_no'
)
??
'-'
;
$applyNo
=
OvertimeClaimMain
::
where
(
'id'
,
$claimId
)
->
value
(
'ocm_apply_no'
)
??
'-'
;
$description
=
"
{
$userName
}
melakukan tindakan
{
$taskName
}
pada permohonan
{
$applyNo
}
."
;
$description
=
"
{
$userName
}
performed
{
$taskName
}
on claim
{
$applyNo
}
."
;
if
(
$extra
)
{
if
(
$extra
)
{
$description
.=
' '
.
$extra
;
$description
.=
' '
.
$extra
;
}
}
...
@@ -327,7 +327,7 @@ public function getAuditTrailList($request)
...
@@ -327,7 +327,7 @@ public function getAuditTrailList($request)
}
}
// =========================================================================
// =========================================================================
// BATAL (cancel
— allowed only from Draf=1 or Dikueri oleh
PM=6)
// BATAL (cancel
- allowed only from Draft=1 or Queried by
PM=6)
// =========================================================================
// =========================================================================
public
function
batalOvertimeClaim
(
int
$id
)
:
OvertimeClaimMain
public
function
batalOvertimeClaim
(
int
$id
)
:
OvertimeClaimMain
...
@@ -335,21 +335,21 @@ public function batalOvertimeClaim(int $id): OvertimeClaimMain
...
@@ -335,21 +335,21 @@ public function batalOvertimeClaim(int $id): OvertimeClaimMain
$record
=
$this
->
findOvertimeClaim
(
$id
);
$record
=
$this
->
findOvertimeClaim
(
$id
);
if
(
!
in_array
(
$record
->
ocm_status
,
[
1
,
6
]))
{
if
(
!
in_array
(
$record
->
ocm_status
,
[
1
,
6
]))
{
throw
new
\Exception
(
'
Permohonan pada status semasa tidak boleh dibatalkan
.'
);
throw
new
\Exception
(
'
The claim cannot be cancelled in its current status
.'
);
}
}
$record
->
update
([
$record
->
update
([
'ocm_status'
=>
4
,
//
Batal Permohonan
'ocm_status'
=>
4
,
//
Cancelled claim
'updated_by'
=>
Auth
::
id
(),
'updated_by'
=>
Auth
::
id
(),
]);
]);
$this
->
getAuditTrail
(
'UPDATE'
,
$id
,
null
,
'
Permohonan dibatalkan oleh pemohon
.'
);
$this
->
getAuditTrail
(
'UPDATE'
,
$id
,
null
,
'
Claim cancelled by the applicant
.'
);
return
$record
;
return
$record
;
}
}
// =========================================================================
// =========================================================================
// SAVE
KUERI RESPOND (pemohon responding to PM's kueri
remark)
// SAVE
QUERY RESPONSE (applicant responding to PM's query
remark)
// =========================================================================
// =========================================================================
public
function
saveKueriRespond
(
int
$claimId
,
string
$respond
)
:
void
public
function
saveKueriRespond
(
int
$claimId
,
string
$respond
)
:
void
...
@@ -365,7 +365,7 @@ public function saveKueriRespond(int $claimId, string $respond): void
...
@@ -365,7 +365,7 @@ public function saveKueriRespond(int $claimId, string $respond): void
$query
->
update
([
'respond'
=>
$respond
]);
$query
->
update
([
'respond'
=>
$respond
]);
}
}
// Audit trail: claimant respon
d to kueri
// Audit trail: claimant respon
se to query
$this
->
getAuditTrail
(
'RESPOND'
,
$record
->
id
,
null
,
'
Pemohon menjawab kueri
: '
.
substr
(
$respond
,
0
,
100
));
$this
->
getAuditTrail
(
'RESPOND'
,
$record
->
id
,
null
,
'
Applicant replied to query
: '
.
substr
(
$respond
,
0
,
100
));
}
}
}
}
packages/portal/overtime/src/Data/Repo/OvertimeRequestRepo.php
View file @
d26a4cf1
...
@@ -273,7 +273,7 @@ public function storeRequestForm($request): OvertimeRequestMain
...
@@ -273,7 +273,7 @@ public function storeRequestForm($request): OvertimeRequestMain
$record
->
save
();
$record
->
save
();
// Audit trail: creation of request form
// Audit trail: creation of request form
$this
->
logAuditTrail
(
'CREATE'
,
$record
->
id
,
null
,
'
Borang permohonan dicipta
.'
);
$this
->
logAuditTrail
(
'CREATE'
,
$record
->
id
,
null
,
'
Request form created
.'
);
return
$record
;
return
$record
;
}
}
...
@@ -298,7 +298,7 @@ public function updateRequestForm($request, int $id): OvertimeRequestMain
...
@@ -298,7 +298,7 @@ public function updateRequestForm($request, int $id): OvertimeRequestMain
]);
]);
// Audit trail: update of request form
// Audit trail: update of request form
$this
->
logAuditTrail
(
'UPDATE'
,
$record
->
id
,
null
,
'
Borang permohonan dikemaskini
.'
);
$this
->
logAuditTrail
(
'UPDATE'
,
$record
->
id
,
null
,
'
Request form updated
.'
);
return
$record
;
return
$record
;
}
}
...
@@ -312,7 +312,7 @@ public function batalRequestForm(int $id): OvertimeRequestMain
...
@@ -312,7 +312,7 @@ public function batalRequestForm(int $id): OvertimeRequestMain
$record
=
$this
->
findRequestForm
(
$id
);
$record
=
$this
->
findRequestForm
(
$id
);
if
(
$record
->
orm_status
!=
0
)
{
if
(
$record
->
orm_status
!=
0
)
{
throw
new
\Exception
(
'
Borang permohonan pada status semasa tidak boleh dibatalkan
.'
);
throw
new
\Exception
(
'
The request form cannot be cancelled in its current status
.'
);
}
}
$record
->
update
([
$record
->
update
([
...
@@ -321,7 +321,7 @@ public function batalRequestForm(int $id): OvertimeRequestMain
...
@@ -321,7 +321,7 @@ public function batalRequestForm(int $id): OvertimeRequestMain
]);
]);
// Audit trail: cancel request form
// Audit trail: cancel request form
$this
->
logAuditTrail
(
'UPDATE'
,
$record
->
id
,
null
,
'
Borang permohonan dibatalkan oleh pemohon
.'
);
$this
->
logAuditTrail
(
'UPDATE'
,
$record
->
id
,
null
,
'
Request form cancelled by the applicant
.'
);
return
$record
;
return
$record
;
}
}
...
@@ -336,7 +336,7 @@ public function deleteRequestForm(int $id): void
...
@@ -336,7 +336,7 @@ public function deleteRequestForm(int $id): void
$this
->
findRequestForm
(
$id
)
->
update
([
'deleted_at'
=>
now
()]);
$this
->
findRequestForm
(
$id
)
->
update
([
'deleted_at'
=>
now
()]);
// Audit trail: delete request form
// Audit trail: delete request form
$this
->
logAuditTrail
(
'DELETE'
,
$id
,
null
,
'
Borang permohonan dipadam
.'
);
$this
->
logAuditTrail
(
'DELETE'
,
$id
,
null
,
'
Request form deleted
.'
);
}
}
// =========================================================================
// =========================================================================
...
@@ -362,7 +362,7 @@ public function addRequestFormDetail(int $mainId, $request): OvertimeRequestDeta
...
@@ -362,7 +362,7 @@ public function addRequestFormDetail(int $mainId, $request): OvertimeRequestDeta
]);
]);
// Audit trail: add detail row
// Audit trail: add detail row
$this
->
logAuditTrail
(
'CREATE'
,
$mainId
,
$detail
->
id
,
'
Perkara ditambah pada borang permohonan
.'
);
$this
->
logAuditTrail
(
'CREATE'
,
$mainId
,
$detail
->
id
,
'
Item added to the request form
.'
);
return
$detail
;
return
$detail
;
}
}
...
@@ -386,7 +386,7 @@ public function updateRequestFormDetail(int $detailId, $request): OvertimeReques
...
@@ -386,7 +386,7 @@ public function updateRequestFormDetail(int $detailId, $request): OvertimeReques
]);
]);
// Audit trail: update detail row
// Audit trail: update detail row
$this
->
logAuditTrail
(
'UPDATE'
,
$detail
->
fk_overtime_request_main
,
$detail
->
id
,
'
Perkara dikemaskini pada borang permohonan
.'
);
$this
->
logAuditTrail
(
'UPDATE'
,
$detail
->
fk_overtime_request_main
,
$detail
->
id
,
'
Item updated on the request form
.'
);
return
$detail
->
fresh
();
return
$detail
->
fresh
();
}
}
...
@@ -398,7 +398,7 @@ public function removeRequestFormDetail(int $detailId): void
...
@@ -398,7 +398,7 @@ public function removeRequestFormDetail(int $detailId): void
$detail
->
delete
();
$detail
->
delete
();
// Audit trail: remove detail row
// Audit trail: remove detail row
$this
->
logAuditTrail
(
'DELETE'
,
$mainId
,
$detailId
,
'
Perkara dipadam dari borang permohonan
.'
);
$this
->
logAuditTrail
(
'DELETE'
,
$mainId
,
$detailId
,
'
Item removed from the request form
.'
);
}
}
// =========================================================================
// =========================================================================
// AUDIT TRAIL (helper for request repo)
// AUDIT TRAIL (helper for request repo)
...
@@ -417,7 +417,7 @@ private function logAuditTrail(string $taskCode, int $claimId, ?int $detailId =
...
@@ -417,7 +417,7 @@ private function logAuditTrail(string $taskCode, int $claimId, ?int $detailId =
$userName
=
Auth
::
user
()
->
name
??
'Unknown'
;
$userName
=
Auth
::
user
()
->
name
??
'Unknown'
;
$applyNo
=
OvertimeRequestMain
::
where
(
'id'
,
$claimId
)
->
value
(
'orm_apply_no'
)
??
'-'
;
$applyNo
=
OvertimeRequestMain
::
where
(
'id'
,
$claimId
)
->
value
(
'orm_apply_no'
)
??
'-'
;
$description
=
"
{
$userName
}
melakukan tindakan
{
$taskName
}
pada permohonan
{
$applyNo
}
."
;
$description
=
"
{
$userName
}
performed
{
$taskName
}
on request
{
$applyNo
}
."
;
if
(
$extra
)
{
if
(
$extra
)
{
$description
.=
' '
.
$extra
;
$description
.=
' '
.
$extra
;
}
}
...
@@ -444,19 +444,19 @@ public function submitRequestForm(int $id): OvertimeRequestMain
...
@@ -444,19 +444,19 @@ public function submitRequestForm(int $id): OvertimeRequestMain
}
}
$record
->
update
([
$record
->
update
([
'orm_status'
=>
2
,
//
Permohonan Baharu
(also used for resubmission)
'orm_status'
=>
2
,
//
New request
(also used for resubmission)
'orm_requested_date'
=>
now
(),
'orm_requested_date'
=>
now
(),
'updated_by'
=>
Auth
::
id
(),
'updated_by'
=>
Auth
::
id
(),
]);
]);
// Audit trail: submission
// Audit trail: submission
$this
->
logAuditTrail
(
'SUBMIT'
,
$record
->
id
,
null
,
'
Borang permohonan dihantar untuk semakan HOD
.'
);
$this
->
logAuditTrail
(
'SUBMIT'
,
$record
->
id
,
null
,
'
Request form submitted for HOD review
.'
);
return
$record
;
return
$record
;
}
}
// =========================================================================
// =========================================================================
// SAVE KUERI RESPOND (PM responding to HOD/PD's kueri
remark)
// SAVE QUERY RESPONSE (PM responding to HOD/PD's query
remark)
// =========================================================================
// =========================================================================
public
function
saveKueriRespond
(
int
$id
,
string
$respond
)
:
void
public
function
saveKueriRespond
(
int
$id
,
string
$respond
)
:
void
...
@@ -479,7 +479,7 @@ public function saveKueriRespond(int $id, string $respond): void
...
@@ -479,7 +479,7 @@ public function saveKueriRespond(int $id, string $respond): void
$query
->
update
([
'respond'
=>
$respond
]);
$query
->
update
([
'respond'
=>
$respond
]);
}
}
// Audit trail: PM respon
d to kueri
// Audit trail: PM respon
se to query
$this
->
logAuditTrail
(
'RESPOND'
,
$record
->
id
,
null
,
'PM
menjawab kueri
: '
.
substr
(
$respond
,
0
,
100
));
$this
->
logAuditTrail
(
'RESPOND'
,
$record
->
id
,
null
,
'PM
replied to query
: '
.
substr
(
$respond
,
0
,
100
));
}
}
}
}
packages/portal/overtime/src/Http/Controllers/OvertimeClaimHodController.php
View file @
d26a4cf1
...
@@ -55,7 +55,7 @@ public function sokongClaim(Request $request, int $id): JsonResponse
...
@@ -55,7 +55,7 @@ public function sokongClaim(Request $request, int $id): JsonResponse
return
response
()
->
json
([
return
response
()
->
json
([
'success'
=>
true
,
'success'
=>
true
,
'message'
=>
"
Permohonan
{
$claim
->
ocm_apply_no
}
disokong dan dihantar k
e PD."
,
'message'
=>
"
Claim
{
$claim
->
ocm_apply_no
}
has been supported and sent to th
e PD."
,
'redirect'
=>
route
(
'overtime::overtime.hodreviewlist'
),
'redirect'
=>
route
(
'overtime::overtime.hodreviewlist'
),
]);
]);
});
});
...
@@ -69,7 +69,7 @@ public function kueriClaim(Request $request, int $id): JsonResponse
...
@@ -69,7 +69,7 @@ public function kueriClaim(Request $request, int $id): JsonResponse
{
{
$request
->
validate
(
$request
->
validate
(
[
'remarks'
=>
'required|string|max:2000'
],
[
'remarks'
=>
'required|string|max:2000'
],
[
'remarks.required'
=>
'
Sila isi remarks untuk kueri
.'
]
[
'remarks.required'
=>
'
Please enter remarks for the query
.'
]
);
);
return
$this
->
withTransaction
(
function
()
use
(
$request
,
$id
)
{
return
$this
->
withTransaction
(
function
()
use
(
$request
,
$id
)
{
...
@@ -77,7 +77,7 @@ public function kueriClaim(Request $request, int $id): JsonResponse
...
@@ -77,7 +77,7 @@ public function kueriClaim(Request $request, int $id): JsonResponse
return
response
()
->
json
([
return
response
()
->
json
([
'success'
=>
true
,
'success'
=>
true
,
'message'
=>
"
Permohonan
{
$claim
->
ocm_apply_no
}
dikueri dan dihantar semula kepada pemohon
."
,
'message'
=>
"
Claim
{
$claim
->
ocm_apply_no
}
has been queried and sent back to the applicant
."
,
'redirect'
=>
route
(
'overtime::overtime.hodreviewlist'
),
'redirect'
=>
route
(
'overtime::overtime.hodreviewlist'
),
]);
]);
});
});
...
...
packages/portal/overtime/src/Http/Controllers/OvertimeClaimPdController.php
View file @
d26a4cf1
...
@@ -54,7 +54,7 @@ public function sokongClaim(Request $request, int $id): JsonResponse
...
@@ -54,7 +54,7 @@ public function sokongClaim(Request $request, int $id): JsonResponse
return
response
()
->
json
([
return
response
()
->
json
([
'success'
=>
true
,
'success'
=>
true
,
'message'
=>
"
Permohonan
{
$claim
->
ocm_apply_no
}
telah diluluskan
."
,
'message'
=>
"
Claim
{
$claim
->
ocm_apply_no
}
has been approved
."
,
'redirect'
=>
route
(
'overtime::overtime.pdreviewlist'
),
'redirect'
=>
route
(
'overtime::overtime.pdreviewlist'
),
]);
]);
});
});
...
@@ -68,7 +68,7 @@ public function kueriClaim(Request $request, int $id): JsonResponse
...
@@ -68,7 +68,7 @@ public function kueriClaim(Request $request, int $id): JsonResponse
{
{
$request
->
validate
(
$request
->
validate
(
[
'remarks'
=>
'required|string|max:2000'
],
[
'remarks'
=>
'required|string|max:2000'
],
[
'remarks.required'
=>
'
Sila isi remarks untuk kueri
.'
]
[
'remarks.required'
=>
'
Please enter remarks for the query
.'
]
);
);
return
$this
->
withTransaction
(
function
()
use
(
$request
,
$id
)
{
return
$this
->
withTransaction
(
function
()
use
(
$request
,
$id
)
{
...
@@ -76,7 +76,7 @@ public function kueriClaim(Request $request, int $id): JsonResponse
...
@@ -76,7 +76,7 @@ public function kueriClaim(Request $request, int $id): JsonResponse
return
response
()
->
json
([
return
response
()
->
json
([
'success'
=>
true
,
'success'
=>
true
,
'message'
=>
"
Permohonan
{
$claim
->
ocm_apply_no
}
dikueri dan dihantar semula kepada pemohon
."
,
'message'
=>
"
Claim
{
$claim
->
ocm_apply_no
}
has been queried and sent back to the applicant
."
,
'redirect'
=>
route
(
'overtime::overtime.pdreviewlist'
),
'redirect'
=>
route
(
'overtime::overtime.pdreviewlist'
),
]);
]);
});
});
...
...
packages/portal/overtime/src/Http/Controllers/OvertimeHodController.php
View file @
d26a4cf1
...
@@ -69,7 +69,7 @@ public function approveRequestForm(Request $request, int $id): JsonResponse
...
@@ -69,7 +69,7 @@ public function approveRequestForm(Request $request, int $id): JsonResponse
return
response
()
->
json
([
return
response
()
->
json
([
'success'
=>
true
,
'success'
=>
true
,
'message'
=>
'
Borang permohonan disokong dan dihantar k
e Project Director.'
,
'message'
=>
'
Request form has been supported and sent to th
e Project Director.'
,
'redirect'
=>
route
(
'overtime::overtime.hodreviewlist'
),
'redirect'
=>
route
(
'overtime::overtime.hodreviewlist'
),
]);
]);
});
});
...
@@ -82,7 +82,7 @@ public function rejectRequestForm(Request $request, int $id): JsonResponse
...
@@ -82,7 +82,7 @@ public function rejectRequestForm(Request $request, int $id): JsonResponse
return
response
()
->
json
([
return
response
()
->
json
([
'success'
=>
true
,
'success'
=>
true
,
'message'
=>
'
Borang permohonan ditolak
.'
,
'message'
=>
'
Request form has been rejected
.'
,
'redirect'
=>
route
(
'overtime::overtime.hodreviewlist'
),
'redirect'
=>
route
(
'overtime::overtime.hodreviewlist'
),
]);
]);
});
});
...
@@ -105,7 +105,7 @@ public function kueriRequestForm(Request $request, int $id): JsonResponse
...
@@ -105,7 +105,7 @@ public function kueriRequestForm(Request $request, int $id): JsonResponse
$request
->
validate
([
$request
->
validate
([
'remark'
=>
'required|string|max:2000'
,
'remark'
=>
'required|string|max:2000'
,
],
[
],
[
'remark.required'
=>
'
Sila isi catatan kueri
.'
,
'remark.required'
=>
'
Please enter query notes
.'
,
]);
]);
return
$this
->
withTransaction
(
function
()
use
(
$request
,
$id
)
{
return
$this
->
withTransaction
(
function
()
use
(
$request
,
$id
)
{
...
@@ -113,7 +113,7 @@ public function kueriRequestForm(Request $request, int $id): JsonResponse
...
@@ -113,7 +113,7 @@ public function kueriRequestForm(Request $request, int $id): JsonResponse
return
response
()
->
json
([
return
response
()
->
json
([
'success'
=>
true
,
'success'
=>
true
,
'message'
=>
'
Borang permohonan dikueri dan dihantar balik kepada
PM.'
,
'message'
=>
'
Request form has been queried and sent back to the
PM.'
,
'redirect'
=>
route
(
'overtime::overtime.hodreviewlist'
),
'redirect'
=>
route
(
'overtime::overtime.hodreviewlist'
),
]);
]);
});
});
...
...
packages/portal/overtime/src/Http/Controllers/OvertimeProjectManagerController.php
View file @
d26a4cf1
...
@@ -79,7 +79,7 @@ public function markReviewed(Request $request, int $id): JsonResponse
...
@@ -79,7 +79,7 @@ public function markReviewed(Request $request, int $id): JsonResponse
$request
->
validate
([
$request
->
validate
([
'request_form_id'
=>
'required|integer|exists:overtime_request_main,id'
,
'request_form_id'
=>
'required|integer|exists:overtime_request_main,id'
,
],
[
],
[
'request_form_id.required'
=>
'
Sila pilih borang permohonan berkaitan
.'
,
'request_form_id.required'
=>
'
Please select the related request form
.'
,
]);
]);
return
$this
->
withTransaction
(
function
()
use
(
$request
,
$id
)
{
return
$this
->
withTransaction
(
function
()
use
(
$request
,
$id
)
{
...
@@ -98,7 +98,7 @@ public function sokongClaim(Request $request, int $id): JsonResponse
...
@@ -98,7 +98,7 @@ public function sokongClaim(Request $request, int $id): JsonResponse
$request
->
validate
([
$request
->
validate
([
'request_form_id'
=>
'required|integer|exists:overtime_request_main,id'
,
'request_form_id'
=>
'required|integer|exists:overtime_request_main,id'
,
],
[
],
[
'request_form_id.required'
=>
'
Sila pilih borang permohonan berkaitan
.'
,
'request_form_id.required'
=>
'
Please select the related request form
.'
,
]);
]);
return
$this
->
withTransaction
(
function
()
use
(
$request
,
$id
)
{
return
$this
->
withTransaction
(
function
()
use
(
$request
,
$id
)
{
...
@@ -106,7 +106,7 @@ public function sokongClaim(Request $request, int $id): JsonResponse
...
@@ -106,7 +106,7 @@ public function sokongClaim(Request $request, int $id): JsonResponse
return
response
()
->
json
([
return
response
()
->
json
([
'success'
=>
true
,
'success'
=>
true
,
'message'
=>
'
Permohonan disokong dan dihantar ke
HOD.'
,
'message'
=>
'
Claim has been supported and sent to
HOD.'
,
'redirect'
=>
route
(
'overtime::overtime.projectmanager.list'
),
'redirect'
=>
route
(
'overtime::overtime.projectmanager.list'
),
]);
]);
});
});
...
@@ -129,7 +129,7 @@ public function kueriClaim(Request $request, int $id): JsonResponse
...
@@ -129,7 +129,7 @@ public function kueriClaim(Request $request, int $id): JsonResponse
return
response
()
->
json
([
return
response
()
->
json
([
'success'
=>
true
,
'success'
=>
true
,
'message'
=>
'
Permohonan dikueri dan dihantar balik kepada pemohon
.'
,
'message'
=>
'
Claim has been queried and sent back to the applicant
.'
,
'redirect'
=>
route
(
'overtime::overtime.projectmanager.list'
),
'redirect'
=>
route
(
'overtime::overtime.projectmanager.list'
),
]);
]);
});
});
...
...
packages/portal/overtime/src/Http/Controllers/OvertimeRequestController.php
View file @
d26a4cf1
...
@@ -54,8 +54,8 @@ public function storeOvertimeRequest(Request $request): JsonResponse
...
@@ -54,8 +54,8 @@ public function storeOvertimeRequest(Request $request): JsonResponse
'orm_project'
=>
'required|integer'
,
'orm_project'
=>
'required|integer'
,
'orm_date'
=>
'required|date'
,
'orm_date'
=>
'required|date'
,
],
[
],
[
'orm_project.required'
=>
'Sila pilih projek
.'
,
'orm_project.required'
=>
'Please select a project
.'
,
'orm_date.required'
=>
'Sila pilih bulan permohonan OT
.'
,
'orm_date.required'
=>
'Please select the OT request month
.'
,
]);
]);
$requestKey
=
sprintf
(
'%s|%s'
,
(
string
)
$request
->
orm_project
,
\Carbon\Carbon
::
parse
(
$request
->
orm_date
)
->
format
(
'Ym'
));
$requestKey
=
sprintf
(
'%s|%s'
,
(
string
)
$request
->
orm_project
,
\Carbon\Carbon
::
parse
(
$request
->
orm_date
)
->
format
(
'Ym'
));
...
@@ -64,7 +64,7 @@ public function storeOvertimeRequest(Request $request): JsonResponse
...
@@ -64,7 +64,7 @@ public function storeOvertimeRequest(Request $request): JsonResponse
if
(
in_array
(
$requestKey
,
$existing
))
{
if
(
in_array
(
$requestKey
,
$existing
))
{
return
response
()
->
json
([
return
response
()
->
json
([
'success'
=>
false
,
'success'
=>
false
,
'message'
=>
'
Borang permohonan untuk projek dan bulan ini sudah wujud
.'
,
'message'
=>
'
A request form for this project and month already exists
.'
,
],
422
);
],
422
);
}
}
...
@@ -73,7 +73,7 @@ public function storeOvertimeRequest(Request $request): JsonResponse
...
@@ -73,7 +73,7 @@ public function storeOvertimeRequest(Request $request): JsonResponse
return
response
()
->
json
([
return
response
()
->
json
([
'success'
=>
true
,
'success'
=>
true
,
'message'
=>
'
Borang permohonan berjaya dicipta
.'
,
'message'
=>
'
Request form created successfully
.'
,
'redirect'
=>
route
(
'overtime::overtime.editovertimerequest'
,
$record
->
id
),
'redirect'
=>
route
(
'overtime::overtime.editovertimerequest'
,
$record
->
id
),
]);
]);
});
});
...
@@ -121,7 +121,7 @@ public function updateOvertimeRequest(Request $request, int $id): JsonResponse
...
@@ -121,7 +121,7 @@ public function updateOvertimeRequest(Request $request, int $id): JsonResponse
return
response
()
->
json
([
return
response
()
->
json
([
'success'
=>
true
,
'success'
=>
true
,
'message'
=>
'
Borang permohonan berjaya dikemaskini
.'
,
'message'
=>
'
Request form updated successfully
.'
,
]);
]);
});
});
}
}
...
@@ -158,7 +158,7 @@ public function addOvertimeRequestDetail(Request $request, int $id): JsonRespons
...
@@ -158,7 +158,7 @@ public function addOvertimeRequestDetail(Request $request, int $id): JsonRespons
return
response
()
->
json
([
return
response
()
->
json
([
'success'
=>
true
,
'success'
=>
true
,
'message'
=>
'Entr
i berjaya ditambah
.'
,
'message'
=>
'Entr
y added successfully
.'
,
'detail'
=>
$detail
,
'detail'
=>
$detail
,
]);
]);
});
});
...
@@ -179,7 +179,7 @@ public function updateOvertimeRequestDetail(Request $request, int $id): JsonResp
...
@@ -179,7 +179,7 @@ public function updateOvertimeRequestDetail(Request $request, int $id): JsonResp
return
response
()
->
json
([
return
response
()
->
json
([
'success'
=>
true
,
'success'
=>
true
,
'message'
=>
'Entr
i berjaya dikemaskini
.'
,
'message'
=>
'Entr
y updated successfully
.'
,
'detail'
=>
$detail
,
'detail'
=>
$detail
,
]);
]);
});
});
...
@@ -196,7 +196,7 @@ public function removeOvertimeRequestDetail(Request $request, int $id): JsonResp
...
@@ -196,7 +196,7 @@ public function removeOvertimeRequestDetail(Request $request, int $id): JsonResp
return
response
()
->
json
([
return
response
()
->
json
([
'success'
=>
true
,
'success'
=>
true
,
'message'
=>
'Entr
i berjaya dibuang
.'
,
'message'
=>
'Entr
y removed successfully
.'
,
]);
]);
});
});
}
}
...
@@ -212,7 +212,7 @@ public function batalOvertimeRequest(Request $request, int $id): JsonResponse
...
@@ -212,7 +212,7 @@ public function batalOvertimeRequest(Request $request, int $id): JsonResponse
return
response
()
->
json
([
return
response
()
->
json
([
'success'
=>
true
,
'success'
=>
true
,
'message'
=>
'
Borang permohonan berjaya dibatalkan
.'
,
'message'
=>
'
Request form cancelled successfully
.'
,
]);
]);
});
});
}
}
...
@@ -228,7 +228,7 @@ public function deleteOvertimeRequest(Request $request, int $id): JsonResponse
...
@@ -228,7 +228,7 @@ public function deleteOvertimeRequest(Request $request, int $id): JsonResponse
return
response
()
->
json
([
return
response
()
->
json
([
'success'
=>
true
,
'success'
=>
true
,
'message'
=>
'
Borang permohonan berjaya dipadam
.'
,
'message'
=>
'
Request form deleted successfully
.'
,
]);
]);
});
});
}
}
...
@@ -305,7 +305,7 @@ public function submitOvertimeRequest(Request $request, int $id): JsonResponse
...
@@ -305,7 +305,7 @@ public function submitOvertimeRequest(Request $request, int $id): JsonResponse
return
response
()
->
json
([
return
response
()
->
json
([
'success'
=>
true
,
'success'
=>
true
,
'message'
=>
'
Borang permohonan berjaya dihantar untuk semakan HOD
.'
,
'message'
=>
'
Request form submitted for HOD review successfully
.'
,
'redirect'
=>
route
(
'overtime::overtime.listovertimerequest'
),
'redirect'
=>
route
(
'overtime::overtime.listovertimerequest'
),
]);
]);
});
});
...
@@ -316,7 +316,7 @@ public function saveKueriRespond(Request $request, int $id): JsonResponse
...
@@ -316,7 +316,7 @@ public function saveKueriRespond(Request $request, int $id): JsonResponse
$request
->
validate
([
$request
->
validate
([
'respond'
=>
'required|string|max:2000'
,
'respond'
=>
'required|string|max:2000'
,
],
[
],
[
'respond.required'
=>
'
Sila isi respond
.'
,
'respond.required'
=>
'
Please enter a response
.'
,
]);
]);
return
$this
->
withTransaction
(
function
()
use
(
$request
,
$id
)
{
return
$this
->
withTransaction
(
function
()
use
(
$request
,
$id
)
{
...
@@ -324,7 +324,7 @@ public function saveKueriRespond(Request $request, int $id): JsonResponse
...
@@ -324,7 +324,7 @@ public function saveKueriRespond(Request $request, int $id): JsonResponse
return
response
()
->
json
([
return
response
()
->
json
([
'success'
=>
true
,
'success'
=>
true
,
'message'
=>
'Respon
d berjaya disimpan
.'
,
'message'
=>
'Respon
se saved 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