Commit a3fabee3 by Azhan Hannan

edit project -> mail ke bod

parent 9202bc15
......@@ -328,8 +328,8 @@ class MaintenanceController extends Controller
'status' => data_get($project,'p_project_sts'),
'editor' => ucwords(data_get($project,'editor.fullname')),
];
// Mail::to($mailTo)->send(new EditProject($data_email, $old_data));
return new EditProject($data_email, $old_data);
Mail::to($mailTo)->send(new EditProject($data_email, $old_data));
// return new EditProject($data_email, $old_data);
// email end
......@@ -775,6 +775,11 @@ class MaintenanceController extends Controller
->with('editor')
->first();
$project = Project::where('id', $pid)
->with('projectDirector')
->first();
// dd(data_get($project,'projectDirector.email'));
if (env('EMAIL_ENV') == 'local')
{
$mailTo = '143hannan@gmail.com';
......@@ -800,7 +805,6 @@ class MaintenanceController extends Controller
'role' => data_get($team,'toRole.role'),
'teamstatus' => data_get($team,'pt_project_task_sts'),
'editor' => data_get($team,'editor.fullname'),
];
// dd($mailTo);
......@@ -1166,21 +1170,26 @@ class MaintenanceController extends Controller
// $currmonth = 1;
// $curryear = 2022;
if ($currday > 15) {
$checkphase = 1;
$checkyear = $curryear;
$checkmonth = $currmonth;
} else {
$checkphase = 2;
$checkmonth = $currmonth-1;
$checkyear = $curryear;
if ($currmonth == 1 && $checkphase == 1) {
$checkmonth = 12;
$checkyear = $curryear-1;
if ($currday > 15)
{
$checkphase = 1;
$checkyear = $curryear;
$checkmonth = $currmonth;
}
else
{
$checkphase = 2;
if ($currmonth == 1)
{
$checkmonth = 12;
$checkyear = $curryear-1;
}
else
{
$checkmonth = $currmonth-1;
$checkyear = $curryear;
}
}
}
$timesheets = Ts_master::select('tm_staff_id')
->where('tm_year', $checkyear)
......
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