From 80dcd79e06107a2834c1584d8f9b3bd6747be25f Mon Sep 17 00:00:00 2001 From: Aaron Jackson Date: Tue, 18 Mar 2025 22:59:42 +0000 Subject: [PATCH 1/4] Tools: Add column with induction status icons This is to make it clearer whether a tool requires an induction or not. We'd like to add some of the higher contention tools to HMS so that they can be booked (the wood lathe currently). --- resources/views/tools/tool/index.blade.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/resources/views/tools/tool/index.blade.php b/resources/views/tools/tool/index.blade.php index 2b76833d..0149faf7 100644 --- a/resources/views/tools/tool/index.blade.php +++ b/resources/views/tools/tool/index.blade.php @@ -17,6 +17,7 @@   Tool + Inducted Status Cost per hour Next booking @@ -29,6 +30,17 @@  {{ $tool->getDisplayName() }} + + @if ($tool->isRestricted()) + @can('tools.' . $tool->getPermissionName() . '.use') + + @else + + @endcan + @else + + @endif + {{ $tool->getStatusString() }} @if ($tool->getStatus() == \HMS\Entities\Tools\ToolState::DISABLED && ! is_null($tool->getStatusText())) From 165c41ab8aea57a01b14f6d7c3a9c5f6649f7cdf Mon Sep 17 00:00:00 2001 From: Aaron Jackson Date: Tue, 18 Mar 2025 23:11:33 +0000 Subject: [PATCH 2/4] Tools: Add icon to indicate hidden tools --- resources/views/tools/tool/index.blade.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/views/tools/tool/index.blade.php b/resources/views/tools/tool/index.blade.php index 0149faf7..909eed30 100644 --- a/resources/views/tools/tool/index.blade.php +++ b/resources/views/tools/tool/index.blade.php @@ -42,6 +42,9 @@ @endif + @if ($tool->isHidden()) + + @endif {{ $tool->getStatusString() }} @if ($tool->getStatus() == \HMS\Entities\Tools\ToolState::DISABLED && ! is_null($tool->getStatusText()))
{{ $tool->getStatusText() }} From f77789c1f60e8db7b3603a55d87a15a1b9bffc26 Mon Sep 17 00:00:00 2001 From: Aaron Jackson Date: Tue, 18 Mar 2025 23:14:43 +0000 Subject: [PATCH 3/4] Tools: Add missing hidden checkbox. Fixes #620 --- resources/views/tools/tool/create.blade.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/resources/views/tools/tool/create.blade.php b/resources/views/tools/tool/create.blade.php index 9f4f8f28..ad2dd537 100644 --- a/resources/views/tools/tool/create.blade.php +++ b/resources/views/tools/tool/create.blade.php @@ -94,6 +94,13 @@ @enderror +
+ + +
+ From d3524fc54af83b68abaea4655994f0d3ba22277a Mon Sep 17 00:00:00 2001 From: Aaron Jackson Date: Thu, 20 Mar 2025 20:08:46 +0000 Subject: [PATCH 4/4] Tools: Replace fixed hex colour with text-primary --- resources/views/tools/tool/index.blade.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/resources/views/tools/tool/index.blade.php b/resources/views/tools/tool/index.blade.php index 909eed30..0681feaf 100644 --- a/resources/views/tools/tool/index.blade.php +++ b/resources/views/tools/tool/index.blade.php @@ -6,7 +6,7 @@
@content('tools.tool.index', 'main')

- To book a tool click on the or name.
+ To book a tool click on the or name.
Use of some tools is restricted and needs an induction first.

@foreach ($tools as $tool) @@ -28,22 +28,22 @@ @endif @if (! $tool->isHidden() || \Auth::user()->can('tools.edit')) - -  {{ $tool->getDisplayName() }} + +  {{ $tool->getDisplayName() }} @if ($tool->isRestricted()) @can('tools.' . $tool->getPermissionName() . '.use') - + @else - + @endcan @else - + @endif @if ($tool->isHidden()) - + @endif {{ $tool->getStatusString() }} @if ($tool->getStatus() == \HMS\Entities\Tools\ToolState::DISABLED && ! is_null($tool->getStatusText()))