update controllers logic
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Services\Administrator;
|
||||
|
||||
use App\Services\ApplicationUrlService;
|
||||
use App\Services\Staff\StaffTimeOffLinkService;
|
||||
use App\Models\StaffAttendance;
|
||||
use App\Models\User;
|
||||
@@ -18,6 +19,7 @@ class AdministratorAbsenceService
|
||||
protected StaffAttendance $staffAttendanceModel,
|
||||
protected SemesterRangeService $semesterRangeService,
|
||||
protected StaffTimeOffLinkService $staffTimeOffLinkService,
|
||||
protected ApplicationUrlService $urls,
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -209,7 +211,7 @@ class AdministratorAbsenceService
|
||||
'origin' => 'administrator portal',
|
||||
]);
|
||||
|
||||
$notifyUrl = url('/timeoff/notify/' . rawurlencode($token));
|
||||
$notifyUrl = $this->urls->timeoffNotifyUrl($token);
|
||||
|
||||
$body .= '<p style="margin-top:16px;">Click <a href="' . e($notifyUrl) . '">Send confirmation email to '
|
||||
. e($fullName)
|
||||
|
||||
@@ -3,10 +3,16 @@
|
||||
namespace App\Services\Administrator;
|
||||
|
||||
use App\Models\Invoice;
|
||||
use App\Services\ApplicationUrlService;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
|
||||
class AdministratorEnrollmentEventService
|
||||
{
|
||||
public function __construct(
|
||||
private ApplicationUrlService $urls,
|
||||
) {
|
||||
}
|
||||
|
||||
public function dispatchGroupedEvents(
|
||||
array $groupsByParentStatus,
|
||||
array $parentInfo,
|
||||
@@ -57,7 +63,7 @@ class AdministratorEnrollmentEventService
|
||||
'firstname' => $p['firstname'],
|
||||
'lastname' => $p['lastname'],
|
||||
'school_year' => $schoolYear,
|
||||
'portalLink' => url('/login'),
|
||||
'portalLink' => $this->urls->webLoginUrl(),
|
||||
];
|
||||
|
||||
if ($status === 'payment pending' && $invoice) {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Services\Administrator;
|
||||
|
||||
use App\Mail\TeacherSubmissionReminderMail;
|
||||
use App\Services\ApplicationUrlService;
|
||||
use App\Models\ClassSection;
|
||||
use App\Models\TeacherSubmissionNotificationHistory;
|
||||
use App\Models\User;
|
||||
@@ -14,7 +15,8 @@ class TeacherSubmissionNotificationService
|
||||
{
|
||||
public function __construct(
|
||||
protected AdministratorSharedService $shared,
|
||||
protected TeacherSubmissionSupportService $support
|
||||
protected TeacherSubmissionSupportService $support,
|
||||
protected ApplicationUrlService $urls,
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -58,7 +60,7 @@ class TeacherSubmissionNotificationService
|
||||
$adminUser = User::find($adminId);
|
||||
$adminName = trim(($adminUser->firstname ?? '') . ' ' . ($adminUser->lastname ?? '')) ?: 'Administrator';
|
||||
|
||||
$scoreUrl = url('/');
|
||||
$scoreUrl = $this->urls->docsHomeUrl();
|
||||
$sentCount = 0;
|
||||
$failCount = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user