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
e7b1cc02
Commit
e7b1cc02
authored
Jan 05, 2023
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Email notification for staff when rejected by hod pm pmhod and bod
parent
bf22482b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
118 additions
and
12 deletions
+118
-12
app/Mail/BodRejectProject.php
+45
-0
app/Mail/PmRejectProject.php
+5
-1
packages/portal/timesheet/resources/views/dashboard/dashboardpmhod.blade.php
+2
-2
packages/portal/timesheet/resources/views/dashboard/selectverificationpage.blade.php
+1
-1
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
+0
-0
packages/portal/timesheet/src/Http/Controllers/MaintenanceController.php
+2
-2
packages/portal/timesheet/src/Model/ts_master.php
+5
-0
resources/views/mail/content/PmRejectProject.blade.php
+58
-6
No files found.
app/Mail/BodRejectProject.php
0 → 100644
View file @
e7b1cc02
<?php
namespace
App\Mail
;
use
Illuminate\Bus\Queueable
;
use
Illuminate\Mail\Mailable
;
use
Illuminate\Queue\SerializesModels
;
use
Illuminate\Contracts\Queue\ShouldQueue
;
class
BodRejectProject
extends
Mailable
{
use
Queueable
,
SerializesModels
;
public
$data_email
;
public
$data_timesheet
;
public
$data_project
;
public
$data_overheads
;
public
$emailcc
;
/**
* Create a new message instance.
*
* @return void
*/
public
function
__construct
(
$data_email
,
$data_timesheet
,
$data_project
,
$data_overheads
,
$emailcc
)
{
$this
->
data_email
=
$data_email
;
$this
->
data_timesheet
=
$data_timesheet
;
$this
->
data_project
=
$data_project
;
$this
->
data_overheads
=
$data_overheads
;
$this
->
emailcc
=
$emailcc
;
}
/**
* Build the message.
*
* @return $this
*/
public
function
build
()
{
return
$this
->
subject
(
$this
->
data_email
[
'subject'
])
->
from
(
$this
->
data_email
[
'sender_name'
])
->
markdown
(
'mail.content.BodRejectProject'
);
}
}
app/Mail/PmRejectProject.php
View file @
e7b1cc02
...
...
@@ -13,16 +13,20 @@ class PmRejectProject extends Mailable
public
$data_email
;
public
$data_timesheet
;
public
$data_project
;
public
$data_overheads
;
/**
* Create a new message instance.
*
* @return void
*/
public
function
__construct
(
$data_email
,
$data_timesheet
)
public
function
__construct
(
$data_email
,
$data_timesheet
,
$data_project
,
$data_overheads
)
{
$this
->
data_email
=
$data_email
;
$this
->
data_timesheet
=
$data_timesheet
;
$this
->
data_project
=
$data_project
;
$this
->
data_overheads
=
$data_overheads
;
}
/**
...
...
packages/portal/timesheet/resources/views/dashboard/dashboardpmhod.blade.php
View file @
e7b1cc02
...
...
@@ -467,10 +467,10 @@
</td>
<td style="
width
:
12
%
;
" class="
text
-
center
single
line
">
@if(data_get(
$tp
, 'tp_timesheet_sts') == 2)
<button class="
center
aligned
ui
green
icon
button
" onclick="
window
.
location
.
href
=
'{{route('
timesheet
::
dashboard
.
revaction
', ['
tpid
'=>data_get($tp, '
id
'), '
phase
'=>data_get($tp, '
tp_phase
'), '
month
'=>data_get($tp, '
tp_month
'), '
year
'=>data_get($tp, '
tp_year
') ]) }}'
;
">Verify | Reject</button>
<button class="
center
aligned
ui
green
icon
button
" onclick="
window
.
location
.
href
=
'{{route('
timesheet
::
dashboard
.
revaction
', ['
tpid
'=>data_get($tp, '
id
'), '
phase
'=>data_get($tp, '
tp_phase
'), '
month
'=>data_get($tp, '
tp_month
'), '
year
'=>data_get($tp, '
tp_year
') ]) }}'
;
"
type="
button
"
>Verify | Reject</button>
@else
<!-- <button class="
center
aligned
ui
green
icon
button
disabled
">Verify | Reject</button> -->
<a class="
center
aligned
ui
blue
icon
button
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
dashboard
.
timesheetViewer
', [ '
user
'=>data_get($staff,'
staff_id
') ,'
phase
' => data_get($staff,'
phase
'), '
month
' => data_get($staff,'
month
'), '
year
' => data_get($staff,'
year
')]) }}'
;
" target='_blank'>View</a>
<a class="
center
aligned
ui
blue
icon
button
" onclick="
window
.
location
.
href
=
'{{ route('
timesheet
::
dashboard
.
timesheetViewer
', [ '
user
'=>data_get($staff,'
staff_id
') ,'
phase
' => data_get($staff,'
phase
'), '
month
' => data_get($staff,'
month
'), '
year
' => data_get($staff,'
year
')]) }}'
;
" t
ype="
button
" t
arget='_blank'>View</a>
@endif
</td>
...
...
packages/portal/timesheet/resources/views/dashboard/selectverificationpage.blade.php
View file @
e7b1cc02
...
...
@@ -350,7 +350,7 @@
@endforeach
<div class="
two
fields
">
<div class="
field
">
<input type="
hidden
" name="
approval
" value="
{{
data_get
(
$pm
,
'id'
)
}}
">
<input type="
hidden
" name="
verifier
" value="
{{
data_get
(
$pm
,
'id'
)
}}
">
<label>Verifier</label>
<input type="
text
" readonly="
readonly
" value="
{{
data_get
(
$pm
,
'name'
)
}}
">
</div>
...
...
packages/portal/timesheet/src/Http/Controllers/DashboardController.php
View file @
e7b1cc02
This diff is collapsed.
Click to expand it.
packages/portal/timesheet/src/Http/Controllers/MaintenanceController.php
View file @
e7b1cc02
...
...
@@ -1132,8 +1132,8 @@ class MaintenanceController extends Controller
'status'
=>
data_get
(
$project
,
'p_project_sts'
),
];
Mail
::
to
(
$mailTo
)
->
send
(
new
AddProjectTeam
(
$data_email
,
$data_staffs
));
//
return new AddProjectTeam($data_email, $data_staffs);
//
Mail::to($mailTo)->send(new AddProjectTeam($data_email, $data_staffs));
return
new
AddProjectTeam
(
$data_email
,
$data_staffs
);
return
redirect
()
->
route
(
'timesheet::maintenance.senaraiProjectTeam'
,
compact
(
'id'
))
->
withSuccess
(
'You have successfully added all project team. The list of project team have been forwarded to the Project Director.'
);
}
...
...
packages/portal/timesheet/src/Model/ts_master.php
View file @
e7b1cc02
...
...
@@ -34,4 +34,9 @@ class Ts_master extends Model
return
$this
->
belongsTo
(
'Portal\Timesheet\Model\Staff_info'
,
'staff_id'
,
'tm_staff_id'
);
}
public
function
staffs
()
{
return
$this
->
hasOne
(
'Portal\Timesheet\Model\Staff_info'
,
'staff_id'
,
'tm_staff_id'
);
}
}
resources/views/mail/content/PmRejectProject.blade.php
View file @
e7b1cc02
@
component
(
'mail::message'
)
@
if
(
count
(
$data_overheads
)
>
0
&&
count
(
$data_project
)
==
0
)
# Your overhead has been rejected!
@
elseif
(
count
(
$data_overheads
)
==
0
&&
count
(
$data_project
)
>
0
)
# Your project has been rejected!
@
else
# Your projects & overhead has been rejected!
@
endif
Assalamualaikum
w
.
b
.
t
Dato
' /Datin /En /Pn / Cik
{!! ucwords(strtolower($data_email['
staffname
'])) !!}
We would like to inform you as one of your timesheet project namely, {!! $data_email['
projectname
'] !!}, has been rejected.
We would like to inform you as your
@if(count($data_overheads) > 0 && count($data_project) == 0)
overhead has been rejected.
@elseif(count($data_overheads) == 0 && count($data_project) > 0)
timesheet @if(count($data_project) == 1) project has @else projects have @endif been rejected.
@else
projects & overhead has been rejected.
@endif
The details of timesheet submission is as below: <br>
<table style="border: black 1px solid; font-size: 16px; text-align: center; width: 150%;" id="project">
...
...
@@ -27,6 +44,9 @@ The details of timesheet submission is as below: <br>
</tbody>
</table>
<br>
@if(count($data_project) > 0)
The details of the project rejection is as below: <br>
<table style="border: black 1px solid; font-size: 16px; text-align: center; width: 150%;" id="project">
<thead>
...
...
@@ -38,17 +58,49 @@ The details of the project rejection is as below: <br>
</tr>
</thead>
<tbody>
@foreach($data_project as $key => $project)
<tr>
<td style="border: black 1px solid;">{!! $project['
pcode
'] !!} </td>
<td style="border: black 1px solid;">{!! $project['
projectname
'] !!}</td>
@if($key==0)
<td style="border: black 1px solid;" rowspan="{{count($data_project)}}">{!! ucwords(strtolower($project['
projectmanager
'])) !!}</td>
<td style="border: black 1px solid;" rowspan="{{count($data_project)}}">{!! ucwords(strtolower($project['
remarks
'])) !!}</td>
@endif
</tr>
@endforeach
</tbody>
</table>
<br>
@endif
@if(count($data_overheads) > 0)
The details of the rejected overhead is as below: <br>
<table style="border: black 1px solid; font-size: 16px; text-align: center; width: 150%;" id="project">
<thead>
<tr>
<td style="border: black 1px solid;">{!! $data_email['
pcode
'] !!} </td>
<td style="border: black 1px solid;">{!! ucwords(strtolower($data_email['
projectname
'])) !!}</td>
<td style="border: black 1px solid;">{!! ucwords(strtolower($data_email['
projectmanager
'])) !!}</td>
<td style="border: black 1px solid;">{!! ucwords(strtolower($data_email['
remarks
'])) !!}</td>
<th style="border: black 1px solid;">Overhead</th>
<th style="border: black 1px solid;">Rejected By</th>
<th style="border: black 1px solid;">Remarks</th>
</tr>
</thead>
<tbody>
@foreach($data_overheads as $key => $overhead)
<tr>
<td style="border: black 1px solid;">{!! $overhead['
projectname
'] !!}</td>
@if($key==0)
<td style="border: black 1px solid;" rowspan="{{count($data_overheads)}}">{!! ucwords(strtolower($overhead['
hod
'])) !!}</td>
<td style="border: black 1px solid;" rowspan="{{count($data_overheads)}}">{!! ucwords(strtolower($overhead['
remarks
'])) !!}</td>
@endif
</tr>
@endforeach
</tbody>
</table>
<br>
Thank you. <br>
@endif
Thank you. <br>
<!-- <br> -->
---
<br>
...
...
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