feat: implement SMS notification service and integrate with existing services

This commit is contained in:
2026-09-21 02:47:12 +03:30
parent 51b13631a3
commit 1e599b917b
9 changed files with 153 additions and 48 deletions
+7 -1
View File
@@ -14,6 +14,7 @@ use App\Models\Report;
use App\Models\User;
use App\Services\FileStorageService;
use App\Services\Shift\ShiftScheduleService;
use App\Services\Sms\SmsNotificationService;
use App\Services\Wallet\WalletService;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Facades\DB;
@@ -27,11 +28,14 @@ class CaseService
protected ShiftScheduleService $shiftScheduleService;
public function __construct(FileStorageService $fileStorageService, WalletService $walletService, ShiftScheduleService $shiftScheduleService)
protected SmsNotificationService $smsNotificationService;
public function __construct(FileStorageService $fileStorageService, WalletService $walletService, ShiftScheduleService $shiftScheduleService, SmsNotificationService $smsNotificationService)
{
$this->fileStorageService = $fileStorageService;
$this->walletService = $walletService;
$this->shiftScheduleService = $shiftScheduleService;
$this->smsNotificationService = $smsNotificationService;
}
public function pendingForUser(User $user): Builder
@@ -95,6 +99,8 @@ class CaseService
'finalized_by' => $doctor->id,
]);
$this->smsNotificationService->reportReady($document);
return $report;
});
}