From 8f7b8200459a7aa2ddaa3e887875f463d9e9fbd1 Mon Sep 17 00:00:00 2001 From: Masroor Ehsan Date: Sat, 25 Jan 2025 15:51:03 +0600 Subject: [PATCH] misc --- app/Http/Controllers/Staff/DicomViewerController.php | 2 +- app/Services/AuditTrail/Activity.php | 2 +- composer.json | 1 + resources/views/staff/audit/popup.blade.php | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Staff/DicomViewerController.php b/app/Http/Controllers/Staff/DicomViewerController.php index e287ef6..c459659 100644 --- a/app/Http/Controllers/Staff/DicomViewerController.php +++ b/app/Http/Controllers/Staff/DicomViewerController.php @@ -27,7 +27,7 @@ private function loadViewer(Closure $callback) $url = $callback($study); abort_if(blank($url), 404); $title = Str::limit($study->getPatientDemographic(), 40); - audit()->on($study)->did(Activity::Image_View)->log(); + audit()->on($study)->did(Activity::Image_Download)->log(); return view('staff.studies.viewer', compact('url', 'title')); } diff --git a/app/Services/AuditTrail/Activity.php b/app/Services/AuditTrail/Activity.php index c9b1aad..c76e0dc 100644 --- a/app/Services/AuditTrail/Activity.php +++ b/app/Services/AuditTrail/Activity.php @@ -30,7 +30,7 @@ enum Activity: int case Attachment_Delete = 114; // image - case Image_View = 150; + case Image_Download = 150; // report diff --git a/composer.json b/composer.json index 2a1d020..b4ef141 100644 --- a/composer.json +++ b/composer.json @@ -15,6 +15,7 @@ "hashids/hashids": "^5.0", "hisorange/browser-detect": "^5.0", "laravel/framework": "^11.31", + "laravel/helpers": "*", "laravel/jetstream": "^5.3", "laravel/sanctum": "^4.0", "laravel/socialite": "^5.16", diff --git a/resources/views/staff/audit/popup.blade.php b/resources/views/staff/audit/popup.blade.php index 5fbc16e..d883444 100644 --- a/resources/views/staff/audit/popup.blade.php +++ b/resources/views/staff/audit/popup.blade.php @@ -19,7 +19,7 @@ {{ $log->activity_name }} $log->notes])> - {{ \Illuminate\Support\Str::limit($log->notes, 20) }} + {{ str_limit($log->notes, 18) }}