feat: implement SMS notification service and integrate with existing services
This commit is contained in:
@@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user