From 708496ea7e1f14158d3a35f44739fbbeb39aedcf Mon Sep 17 00:00:00 2001 From: Dr Masroor Ehsan Date: Tue, 21 Jan 2025 12:28:48 +0600 Subject: [PATCH] misc --- app/DataTables/WorklistDataTable.php | 5 +- app/Services/ACL/WorklistButton.php | 1 + app/Services/ACL/WorklistGuard.php | 2 + .../views/staff/worklist/index.blade.php | 77 +++++-------------- .../worklist/partials/_modal-js.blade.php | 2 +- .../staff/worklist/partials/_modal.blade.php | 14 +++- 6 files changed, 39 insertions(+), 62 deletions(-) diff --git a/app/DataTables/WorklistDataTable.php b/app/DataTables/WorklistDataTable.php index 761d819..d1b7d56 100644 --- a/app/DataTables/WorklistDataTable.php +++ b/app/DataTables/WorklistDataTable.php @@ -579,7 +579,7 @@ private function generateActionButtons(Study $study): string foreach (WorklistGuard::worklistButtons($study) as $button) { switch ($button) { case WorklistButton::StudyMetadata: - $btns[] = $this->renderImageLink($study->hash, 'info.png', 'showStudy', 'Info'); + $btns[] = $this->renderImageLink($study->hash, 'info.png', 'show-study', 'Info'); break; case WorklistButton::Assign: $btns[] = $this->renderImageLink($study->hash, 'assign.png', 'show-assign', 'Assign'); @@ -587,6 +587,9 @@ private function generateActionButtons(Study $study): string case WorklistButton::Notes: $btns[] = $this->renderImageLink($study->hash, 'chat.png', 'show-notes', 'Chat'); break; + case WorklistButton::Audit: + $btns[] = $this->renderImageLink($study->hash, 'audit.png', 'show-audit', 'Audit Trail'); + break; } } diff --git a/app/Services/ACL/WorklistButton.php b/app/Services/ACL/WorklistButton.php index b9e9ec7..0825814 100644 --- a/app/Services/ACL/WorklistButton.php +++ b/app/Services/ACL/WorklistButton.php @@ -10,4 +10,5 @@ enum WorklistButton: string case Attachment = 'attachment'; case Assign = 'assign'; case Report = 'report'; + case Audit = 'audit'; } diff --git a/app/Services/ACL/WorklistGuard.php b/app/Services/ACL/WorklistGuard.php index e54080e..9c5a146 100644 --- a/app/Services/ACL/WorklistGuard.php +++ b/app/Services/ACL/WorklistGuard.php @@ -51,6 +51,7 @@ public static function worklistButtons(Study $study, User|int|null $usr = null): return collect([ WorklistButton::StudyMetadata, WorklistButton::Notes, + WorklistButton::Audit, ]); } @@ -63,6 +64,7 @@ public static function worklistButtons(Study $study, User|int|null $usr = null): if ($study->canAssignRad()) { $buttons->push(WorklistButton::Assign); } + $buttons->push(WorklistButton::Audit); return $buttons; } diff --git a/resources/views/staff/worklist/index.blade.php b/resources/views/staff/worklist/index.blade.php index 946ed46..2a92650 100644 --- a/resources/views/staff/worklist/index.blade.php +++ b/resources/views/staff/worklist/index.blade.php @@ -69,7 +69,7 @@