Commit a3fabee3 by Azhan Hannan

edit project -> mail ke bod

parent 9202bc15
...@@ -328,8 +328,8 @@ class MaintenanceController extends Controller ...@@ -328,8 +328,8 @@ class MaintenanceController extends Controller
'status' => data_get($project,'p_project_sts'), 'status' => data_get($project,'p_project_sts'),
'editor' => ucwords(data_get($project,'editor.fullname')), 'editor' => ucwords(data_get($project,'editor.fullname')),
]; ];
// Mail::to($mailTo)->send(new EditProject($data_email, $old_data)); Mail::to($mailTo)->send(new EditProject($data_email, $old_data));
return new EditProject($data_email, $old_data); // return new EditProject($data_email, $old_data);
// email end // email end
...@@ -775,6 +775,11 @@ class MaintenanceController extends Controller ...@@ -775,6 +775,11 @@ class MaintenanceController extends Controller
->with('editor') ->with('editor')
->first(); ->first();
$project = Project::where('id', $pid)
->with('projectDirector')
->first();
// dd(data_get($project,'projectDirector.email'));
if (env('EMAIL_ENV') == 'local') if (env('EMAIL_ENV') == 'local')
{ {
$mailTo = '143hannan@gmail.com'; $mailTo = '143hannan@gmail.com';
...@@ -800,7 +805,6 @@ class MaintenanceController extends Controller ...@@ -800,7 +805,6 @@ class MaintenanceController extends Controller
'role' => data_get($team,'toRole.role'), 'role' => data_get($team,'toRole.role'),
'teamstatus' => data_get($team,'pt_project_task_sts'), 'teamstatus' => data_get($team,'pt_project_task_sts'),
'editor' => data_get($team,'editor.fullname'), 'editor' => data_get($team,'editor.fullname'),
]; ];
// dd($mailTo); // dd($mailTo);
...@@ -1166,20 +1170,25 @@ class MaintenanceController extends Controller ...@@ -1166,20 +1170,25 @@ class MaintenanceController extends Controller
// $currmonth = 1; // $currmonth = 1;
// $curryear = 2022; // $curryear = 2022;
if ($currday > 15) { if ($currday > 15)
{
$checkphase = 1; $checkphase = 1;
$checkyear = $curryear; $checkyear = $curryear;
$checkmonth = $currmonth; $checkmonth = $currmonth;
}
} else { else
{
$checkphase = 2; $checkphase = 2;
$checkmonth = $currmonth-1; if ($currmonth == 1)
$checkyear = $curryear; {
if ($currmonth == 1 && $checkphase == 1) {
$checkmonth = 12; $checkmonth = 12;
$checkyear = $curryear-1; $checkyear = $curryear-1;
} }
else
{
$checkmonth = $currmonth-1;
$checkyear = $curryear;
}
} }
$timesheets = Ts_master::select('tm_staff_id') $timesheets = Ts_master::select('tm_staff_id')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment