Merge pull request #12669 from akemidx/feature/sc-20178

#20178: Added Dell and Lenovo to warranty link function
This commit is contained in:
snipe 2023-03-22 00:54:40 -07:00 committed by GitHub
commit e8e1ada776
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

View file

@ -42,5 +42,6 @@ return [
'error_messages' => 'Error messages:',
'success_messages' => 'Success messages:',
'alert_details' => 'Please see below for details.',
'custom_export' => 'Custom Export'
'custom_export' => 'Custom Export',
'mfg_warranty_lookup' => ':manufacturer Warranty Status Lookup',
];

View file

@ -598,7 +598,15 @@
@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">
<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">{{ trans('hardware/general.mfg_warranty_lookup') }}</span></i>
</a>
@elseif ((strtolower($asset->model->manufacturer->name) == "dell") || (str_starts_with(str_replace(' ','',strtolower($asset->model->manufacturer->name)),"dellinc")))
<a href="https://www.dell.com/support/home/en-us?app=warranty" target="_blank">
<img src="/img/demo/manufacturers/dellicon.png" style="width:25px;height:25px;"><span class="sr-only">{{ trans('hardware/general.mfg_warranty_lookup') }}</span></i>
</a>
@elseif ((strtolower($asset->model->manufacturer->name) == "lenovo") || (str_starts_with(str_replace(' ','',strtolower($asset->model->manufacturer->name)),"lenovoinc")))
<a href="https://pcsupport.lenovo.com/us/en/warrantylookup#/" target="_blank">
<img src="/img/demo/manufacturers/lenovoicon.png" style="width:25px;height:25px;"><span class="sr-only">{{ trans('hardware/general.mfg_warranty_lookup') }}</span></i>
</a>
@endif
@endif