Merge pull request #12477 from akemidx/apple_warranty_link

Added functionality to Apple Warranty link
This commit is contained in:
snipe 2023-02-13 13:02:33 -08:00 committed by GitHub
commit 2bbbc8158b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -595,10 +595,12 @@
{{ $asset->warranty_months }} {{ $asset->warranty_months }}
{{ trans('admin/hardware/form.months') }} {{ trans('admin/hardware/form.months') }}
@if (($asset->serial && $asset->model->manufacturer) && $asset->model->manufacturer->name == 'Apple') @if ($asset->serial && $asset->model->manufacturer)
@if ((strtolower($asset->model->manufacturer->name) == "apple") || (str_starts_with(str_replace(' ','',strtolower($asset->model->manufacturer->name)),"appleinc")))
<a href="https://checkcoverage.apple.com/us/{{ \App\Models\Setting::getSettings()->locale }}/?sn={{ $asset->serial }}" target="_blank"> <a href="https://checkcoverage.apple.com/us/{{ \App\Models\Setting::getSettings()->locale }}/?sn={{ $asset->serial }}" target="_blank">
<i class="fa-brands fa-apple" aria-hidden="true"><span class="sr-only">Applecare Status Lookup</span></i> <i class="fa-brands fa-apple" aria-hidden="true"><span class="sr-only">Applecare Status Lookup</span></i>
</a> </a>
@endif
@endif @endif
</div> </div>
</div> </div>