From c0074baa266ae0bb15d81e7b9dc62757eef8200d Mon Sep 17 00:00:00 2001 From: akemidx Date: Tue, 7 Feb 2023 17:27:39 -0500 Subject: [PATCH 1/2] functionality to Apple Warranty link --- resources/views/hardware/view.blade.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index b4cd6d4988..d8adad00d8 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -595,10 +595,12 @@ {{ $asset->warranty_months }} {{ trans('admin/hardware/form.months') }} - @if (($asset->serial && $asset->model->manufacturer) && $asset->model->manufacturer->name == 'Apple') + @if ($asset->serial) + @if ((strtolower($asset->model->manufacturer->name) == "apple") || (str_starts_with(str_replace(' ','',strtolower($asset->model->manufacturer->name)),"appleinc"))) + @endif @endif From 75f3cb30790d6140cbd8a8fb34b6193134849d16 Mon Sep 17 00:00:00 2001 From: akemidx Date: Tue, 7 Feb 2023 19:02:12 -0500 Subject: [PATCH 2/2] fixing external if statement --- resources/views/hardware/view.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index d8adad00d8..933392d8e9 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -595,7 +595,7 @@ {{ $asset->warranty_months }} {{ trans('admin/hardware/form.months') }} - @if ($asset->serial) + @if ($asset->serial && $asset->model->manufacturer) @if ((strtolower($asset->model->manufacturer->name) == "apple") || (str_starts_with(str_replace(' ','',strtolower($asset->model->manufacturer->name)),"appleinc")))