From 3c7d455ee31a13862f1dab0ff2b236188c1128e9 Mon Sep 17 00:00:00 2001 From: snipe Date: Sat, 31 Aug 2024 13:38:38 +0100 Subject: [PATCH 1/2] Added employee number to asset view Signed-off-by: snipe --- app/Helpers/IconHelper.php | 9 +++++++ resources/views/hardware/view.blade.php | 36 +++++++++++++++++-------- 2 files changed, 34 insertions(+), 11 deletions(-) diff --git a/app/Helpers/IconHelper.php b/app/Helpers/IconHelper.php index 21132845dd..2ffe3c5232 100644 --- a/app/Helpers/IconHelper.php +++ b/app/Helpers/IconHelper.php @@ -64,14 +64,19 @@ class IconHelper case 'kits': return 'fas fa-object-group'; case 'assets': + case 'asset': return 'fas fa-barcode'; case 'accessories': + case 'accessory': return 'far fa-keyboard'; case 'components': + case 'component': return 'far fa-hdd'; case 'consumables': + case 'consumable': return 'fas fa-tint'; case 'licenses': + case 'license': return 'far fa-save'; case 'requestable': return 'fas fa-laptop'; @@ -141,6 +146,8 @@ class IconHelper return 'fas fa-lock'; case 'locations': return 'fas fa-map-marker-alt'; + case 'location': + return 'fas fa-map-marker-alt'; case 'superadmin': return 'fas fa-crown'; case 'print': @@ -173,6 +180,8 @@ class IconHelper return 'fas fa-crosshairs'; case 'oauth': return 'fas fa-user-secret'; + case 'employee_num' : + return 'fa-regular fa-id-card'; } } diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index 2d232df752..d1d7f4623b 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -277,26 +277,40 @@

{{ trans('admin/hardware/form.checkedout_to') }} +

-

+ +

    + @if (($asset->checkedOutToUser()) && ($asset->assignedTo->present()->gravatar())) - {{ $asset->assignedTo->present()->fullName() }} +
  • + {{ $asset->assignedTo->present()->fullName() }} + {!! $asset->assignedTo->present()->nameUrl() !!} +
  • + @else +
  • + + {!! $asset->assignedTo->present()->nameUrl() !!} +
  • @endif -

    - {!! $asset->assignedTo->present()->glyph() . ' ' .$asset->assignedTo->present()->nameUrl() !!} -
      + @if ((isset($asset->assignedTo->employee_num)) && ($asset->assignedTo->employee_num!='')) +
    • + + {{ $asset->assignedTo->employee_num }} +
    • + @endif @if ((isset($asset->assignedTo->email)) && ($asset->assignedTo->email!=''))
    • - + {{ $asset->assignedTo->email }}
    • @endif @if ((isset($asset->assignedTo)) && ($asset->assignedTo->phone!=''))
    • - + {{ $asset->assignedTo->phone }}
    • @endif @@ -307,7 +321,7 @@ @if (isset($asset->location))
    • - + {{ $asset->location->name }}
    • {{ $asset->location->address }} @if ($asset->location->address2!='') @@ -323,12 +337,12 @@
    • @endif
    • - + {{ trans('admin/hardware/form.checkout_date') }}: {{ Helper::getFormattedDateObject($asset->last_checkout, 'date', false) }}
    • @if (isset($asset->expected_checkin))
    • - + {{ trans('admin/hardware/form.expected_checkin') }}: {{ Helper::getFormattedDateObject($asset->expected_checkin, 'date', false) }}
    • @endif @@ -397,7 +411,7 @@ - {!! $asset->assignedTo->present()->glyph() !!} + {!! $asset->assignedTo->present()->nameUrl() !!} @else @if (($asset->assetstatus) && ($asset->assetstatus->deployable=='1')) From 13dbf9ee747832fbececfc1618b0abd64cac4f22 Mon Sep 17 00:00:00 2001 From: snipe Date: Sat, 31 Aug 2024 13:48:42 +0100 Subject: [PATCH 2/2] Added icon for dept Signed-off-by: snipe --- app/Helpers/IconHelper.php | 2 ++ resources/views/hardware/view.blade.php | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Helpers/IconHelper.php b/app/Helpers/IconHelper.php index 2ffe3c5232..b56871f832 100644 --- a/app/Helpers/IconHelper.php +++ b/app/Helpers/IconHelper.php @@ -182,6 +182,8 @@ class IconHelper return 'fas fa-user-secret'; case 'employee_num' : return 'fa-regular fa-id-card'; + case 'department' : + return 'fa-solid fa-building-user'; } } diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index d1d7f4623b..42144fc20c 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -316,7 +316,9 @@ @endif @if((isset($asset->assignedTo)) && ($asset->assignedTo->department)) -
    • {{ trans('admin/hardware/general.user_department') }}: {{ $asset->assignedTo->department->name}}
    • +
    • + + {{ $asset->assignedTo->department->name}}
    • @endif @if (isset($asset->location))