@@ -113,24 +127,24 @@
@if (($asset->assignedTo) && ($asset->deleted_at==''))
-
- {{ $asset->assetstatus->name }}
-
+
+ {{ $asset->assetstatus->name }}
+
-
- {!! $asset->assignedTo->present()->glyph() !!}
- {!! $asset->assignedTo->present()->nameUrl() !!}
+
+ {!! $asset->assignedTo->present()->glyph() !!}
+ {!! $asset->assignedTo->present()->nameUrl() !!}
@else
- @if (($asset->assetstatus) && ($asset->assetstatus->deployable=='1'))
-
- @elseif (($asset->assetstatus) && ($asset->assetstatus->pending=='1'))
-
- @elseif (($asset->assetstatus) && ($asset->assetstatus->archived=='1'))
-
- @endif
-
- {{ $asset->assetstatus->name }}
-
+ @if (($asset->assetstatus) && ($asset->assetstatus->deployable=='1'))
+
+ @elseif (($asset->assetstatus) && ($asset->assetstatus->pending=='1'))
+
+ @elseif (($asset->assetstatus) && ($asset->assetstatus->archived=='1'))
+
+ @endif
+
+ {{ $asset->assetstatus->name }}
+
@endif
|
@@ -158,16 +172,19 @@
@endif
@if ((isset($audit_log)) && ($audit_log->created_at))
-
- {{ trans('general.last_audit') }} |
- {{ \App\Helpers\Helper::getFormattedDateObject($audit_log->created_at, 'date', false) }} (by {{ link_to_route('users.show', $audit_log->user->present()->fullname(), [$audit_log->user->id]) }}) |
-
+
+ {{ trans('general.last_audit') }} |
+ {{ \App\Helpers\Helper::getFormattedDateObject($audit_log->created_at, 'date', false) }} (by
+ {{ link_to_route('users.show', $audit_log->user->present()->fullname(), [$audit_log->user->id]) }})
+ |
+
@endif
@if ($asset->next_audit_date)
-
- {{ trans('general.next_audit_date') }} |
- {{ \App\Helpers\Helper::getFormattedDateObject($asset->next_audit_date, 'date', false) }} |
-
+
+ {{ trans('general.next_audit_date') }} |
+ {{ \App\Helpers\Helper::getFormattedDateObject($asset->next_audit_date, 'date', false) }}
+ |
+
@endif
@if (($asset->model) && ($asset->model->manufacturer))
@@ -175,32 +192,39 @@
{{ trans('admin/hardware/form.manufacturer') }} |
|
@@ -212,37 +236,37 @@
@if (($asset->model) && ($asset->model->category))
- @can('view', \App\Models\Category::class)
+ @can('view', \App\Models\Category::class)
-
- {{ $asset->model->category->name }}
-
- @else
- {{ $asset->model->category->name }}
- @endcan
+
+ {{ $asset->model->category->name }}
+
+ @else
+ {{ $asset->model->category->name }}
+ @endcan
@else
- Invalid category
+ Invalid category
@endif
|
-
+
{{ trans('admin/hardware/form.model') }}
|
- @if ($asset->model)
+ @if ($asset->model)
- @can('view', \App\Models\AssetModel::class)
-
- {{ $asset->model->name }}
-
- @else
- {{ $asset->model->name }}
- @endcan
+ @can('view', \App\Models\AssetModel::class)
+
+ {{ $asset->model->name }}
+
+ @else
+ {{ $asset->model->name }}
+ @endcan
@endif
|
@@ -258,91 +282,98 @@
@if (($asset->model) && ($asset->model->fieldset))
- @foreach($asset->model->fieldset->fields as $field)
-
-
- {{ $field->name }}
- |
-
- @if ($field->field_encrypted=='1')
-
- @endif
-
- @if ($field->isFieldDecryptable($asset->{$field->db_column_name()} ))
- @can('superuser')
- @if (($field->format=='URL') && ($asset->{$field->db_column_name()}!=''))
- {{ \App\Helpers\Helper::gracefulDecrypt($field, $asset->{$field->db_column_name()}) }}
- @else
- {{ \App\Helpers\Helper::gracefulDecrypt($field, $asset->{$field->db_column_name()}) }}
- @endif
- @else
- {{ strtoupper(trans('admin/custom_fields/general.encrypted')) }}
- @endcan
-
- @else
- @if (($field->format=='URL') && ($asset->{$field->db_column_name()}!=''))
- {{ $asset->{$field->db_column_name()} }}
- @else
- {!! nl2br(e($asset->{$field->db_column_name()})) !!}
- @endif
- @endif
- |
-
- @endforeach
+ @foreach($asset->model->fieldset->fields as $field)
+
+
+ {{ $field->name }}
+ |
+
+ @if ($field->field_encrypted=='1')
+
+ @endif
+
+ @if ($field->isFieldDecryptable($asset->{$field->db_column_name()} ))
+ @can('superuser')
+ @if (($field->format=='URL') && ($asset->{$field->db_column_name()}!=''))
+ {{ \App\Helpers\Helper::gracefulDecrypt($field, $asset->{$field->db_column_name()}) }}
+ @else
+ {{ \App\Helpers\Helper::gracefulDecrypt($field, $asset->{$field->db_column_name()}) }}
+ @endif
+ @else
+ {{ strtoupper(trans('admin/custom_fields/general.encrypted')) }}
+ @endcan
+
+ @else
+ @if (($field->format=='URL') && ($asset->{$field->db_column_name()}!=''))
+ {{ $asset->{$field->db_column_name()} }}
+ @elseif (($field->format=='NUMERIC') && ($asset->{$field->db_column_name()}!='') &&
+ ($field->name== 'Ticket'))
+ {{ $asset->{$field->db_column_name()} }}
+ @else
+ {!! nl2br(e($asset->{$field->db_column_name()})) !!}
+ @endif
+ @endif
+ |
+
+ @endforeach
@endif
@if ($asset->purchase_date)
-
- {{ trans('admin/hardware/form.date') }} |
-
- {{ \App\Helpers\Helper::getFormattedDateObject($asset->purchase_date, 'date', false) }}
- |
-
+
+ {{ trans('admin/hardware/form.date') }} |
+
+ {{ \App\Helpers\Helper::getFormattedDateObject($asset->purchase_date, 'date', false) }}
+ |
+
@endif
@if ($asset->purchase_cost)
-
- {{ trans('admin/hardware/form.cost') }} |
-
- @if (($asset->id) && ($asset->location))
- {{ $asset->location->currency }}
- @elseif (($asset->id) && ($asset->location))
- {{ $asset->location->currency }}
- @else
- {{ $snipeSettings->default_currency }}
- @endif
- {{ \App\Helpers\Helper::formatCurrencyOutput($asset->purchase_cost)}}
+ |
+ {{ trans('admin/hardware/form.cost') }} |
+
+ @if (($asset->id) && ($asset->location))
+ {{ $asset->location->currency }}
+ @elseif (($asset->id) && ($asset->location))
+ {{ $asset->location->currency }}
+ @else
+ {{ $snipeSettings->default_currency }}
+ @endif
+ {{ \App\Helpers\Helper::formatCurrencyOutput($asset->purchase_cost)}}
- |
-
+
+
@endif
@if ($asset->order_number)
-
- {{ trans('general.order_number') }} |
-
- #{{ $asset->order_number }}
- |
-
+
+ {{ trans('general.order_number') }} |
+
+ #{{ $asset->order_number }}
+ |
+
@endif
@if ($asset->supplier)
-
- {{ trans('general.supplier') }} |
-
- @can ('superuser')
-
- {{ $asset->supplier->name }}
-
- @else
- {{ $asset->supplier->name }}
- @endcan
- |
-
+
+ {{ trans('general.supplier') }} |
+
+ @can ('superuser')
+
+ {{ $asset->supplier->name }}
+
+ @else
+ {{ $asset->supplier->name }}
+ @endcan
+ |
+
@endif
@if ($asset->warranty_months)
- present()->warrantee_expires() < date("Y-m-d") ? ' class="warning"' : '' !!}>
+
present()->warrantee_expires() < date("Y-m-d") ? ' class="warning"' : '' !!}>
{{ trans('admin/hardware/form.warranty') }} |
{{ $asset->warranty_months }}
@@ -351,69 +382,70 @@
({{ trans('admin/hardware/form.expires') }}
{{ $asset->present()->warrantee_expires() }})
|
-
+
@endif
@if (($asset->model) && ($asset->depreciation))
-
- {{ trans('general.depreciation') }} |
-
- {{ $asset->depreciation->name }}
- ({{ $asset->depreciation->months }}
- {{ trans('admin/hardware/form.months') }}
- )
- |
-
-
-
- {{ trans('admin/hardware/form.fully_depreciated') }}
- |
-
- @if ($asset->time_until_depreciated()->y > 0)
- {{ $asset->time_until_depreciated()->y }}
- {{ trans('admin/hardware/form.years') }},
- @endif
- {{ $asset->time_until_depreciated()->m }}
- {{ trans('admin/hardware/form.months') }}
- ({{ $asset->depreciated_date()->format('Y-m-d') }})
- |
-
+
+ {{ trans('general.depreciation') }} |
+
+ {{ $asset->depreciation->name }}
+ ({{ $asset->depreciation->months }}
+ {{ trans('admin/hardware/form.months') }}
+ )
+ |
+
+
+
+ {{ trans('admin/hardware/form.fully_depreciated') }}
+ |
+
+ @if ($asset->time_until_depreciated()->y > 0)
+ {{ $asset->time_until_depreciated()->y }}
+ {{ trans('admin/hardware/form.years') }},
+ @endif
+ {{ $asset->time_until_depreciated()->m }}
+ {{ trans('admin/hardware/form.months') }}
+ ({{ $asset->depreciated_date()->format('Y-m-d') }})
+ |
+
@endif
@if (($asset->model) && ($asset->model->eol))
-
- {{ trans('admin/hardware/form.eol_rate') }} |
-
- {{ $asset->model->eol }}
- {{ trans('admin/hardware/form.months') }}
+ |
+ {{ trans('admin/hardware/form.eol_rate') }} |
+
+ {{ $asset->model->eol }}
+ {{ trans('admin/hardware/form.months') }}
+
+ (
+ {{ trans('admin/hardware/form.eol_date') }}:
+ {{ $asset->present()->eol_date() }}
+ @if ($asset->present()->months_until_eol())
+ (
+ @if ($asset->present()->months_until_eol()->y > 0)
+ {{ $asset->present()->months_until_eol()->y }}
+ {{ trans('general.years') }},
+ @endif
- (
- {{ trans('admin/hardware/form.eol_date') }}:
- {{ $asset->present()->eol_date() }}
- @if ($asset->present()->months_until_eol())
- (
- @if ($asset->present()->months_until_eol()->y > 0) {{ $asset->present()->months_until_eol()->y }}
- {{ trans('general.years') }},
- @endif
-
- {{ $asset->present()->months_until_eol()->m }}
- {{ trans('general.months') }}
- )
- @endif
+ {{ $asset->present()->months_until_eol()->m }}
+ {{ trans('general.months') }}
+ )
+ @endif
- |
-
+
+
@endif
@if ($asset->expected_checkin!='')
-
- {{ trans('admin/hardware/form.expected_checkin') }} |
-
- {{ \App\Helpers\Helper::getFormattedDateObject($asset->expected_checkin, 'date', false) }}
- |
-
+
+ {{ trans('admin/hardware/form.expected_checkin') }} |
+
+ {{ \App\Helpers\Helper::getFormattedDateObject($asset->expected_checkin, 'date', false) }}
+ |
+
@endif
@@ -422,57 +454,57 @@
@if ($asset->location)
-
- {{ trans('general.location') }} |
-
- @can('superuser')
-
- {{ $asset->location->name }}
-
- @else
- {{ $asset->location->name }}
- @endcan
- |
-
+
+ {{ trans('general.location') }} |
+
+ @can('superuser')
+
+ {{ $asset->location->name }}
+
+ @else
+ {{ $asset->location->name }}
+ @endcan
+ |
+
@endif
@if ($asset->defaultLoc)
-
- {{ trans('admin/hardware/form.default_location') }} |
-
- @can('superuser')
-
- {{ $asset->defaultLoc->name }}
-
- @else
- {{ $asset->defaultLoc->name }}
- @endcan
- |
-
+
+ {{ trans('admin/hardware/form.default_location') }} |
+
+ @can('superuser')
+
+ {{ $asset->defaultLoc->name }}
+
+ @else
+ {{ $asset->defaultLoc->name }}
+ @endcan
+ |
+
@endif
@if ($asset->created_at!='')
-
- {{ trans('general.created_at') }} |
-
- {{ \App\Helpers\Helper::getFormattedDateObject($asset->created_at, 'datetime', false) }}
- |
-
+
+ {{ trans('general.created_at') }} |
+
+ {{ \App\Helpers\Helper::getFormattedDateObject($asset->created_at, 'datetime', false) }}
+ |
+
@endif
@if ($asset->updated_at!='')
-
- {{ trans('general.updated_at') }} |
-
- {{ \App\Helpers\Helper::getFormattedDateObject($asset->updated_at, 'datetime', false) }}
- |
-
+
+ {{ trans('general.updated_at') }} |
+
+ {{ \App\Helpers\Helper::getFormattedDateObject($asset->updated_at, 'datetime', false) }}
+ |
+
@endif
{{ trans('general.checkouts_count') }} |
- {{ ($asset->checkouts) ? (int) $asset->checkouts->count() : '0' }}
+ {{ ($asset->checkouts) ? (int) $asset->checkouts->count() : '0' }}
|
@@ -498,58 +530,64 @@
@if ($asset->image)
-
-
-
+
+
+
@elseif (($asset->model) && ($asset->model->image!=''))
-
-
-
+
+
+
@endif
- @if ($snipeSettings->qr_code=='1')
-
+ @if ($snipeSettings->qr_code=='1')
+
@endif
@if (($asset->assignedTo) && ($asset->deleted_at==''))
-
{{ trans('admin/hardware/form.checkedout_to') }}
-
- @if($asset->checkedOutToUser())
-
- @endif
- {!! $asset->assignedTo->present()->glyph() . ' ' .$asset->assignedTo->present()->nameUrl() !!}
-
+
{{ trans('admin/hardware/form.checkedout_to') }}
+
+ @if($asset->checkedOutToUser())
+
+
+ @endif
+ {!! $asset->assignedTo->present()->glyph() . ' ' .$asset->assignedTo->present()->nameUrl() !!}
+
-
- @if ((isset($asset->assignedTo->email)) && ($asset->assignedTo->email!=''))
- - {{ $asset->assignedTo->email }}
- @endif
+
+ @if ((isset($asset->assignedTo->email)) && ($asset->assignedTo->email!=''))
+ - {{ $asset->assignedTo->email }}
+ @endif
- @if ((isset($asset->assignedTo)) && ($asset->assignedTo->phone!=''))
- -
-
- {{ $asset->assignedTo->phone }}
-
- @endif
+ @if ((isset($asset->assignedTo)) && ($asset->assignedTo->phone!=''))
+ -
+
+ {{ $asset->assignedTo->phone }}
+
+ @endif
- @if (isset($asset->location))
- - {{ $asset->location->name }}
- - {{ $asset->location->address }}
- @if ($asset->location->address2!='')
- {{ $asset->location->address2 }}
- @endif
-
+ @if (isset($asset->location))
+ - {{ $asset->location->name }}
+ - {{ $asset->location->address }}
+ @if ($asset->location->address2!='')
+ {{ $asset->location->address2 }}
+ @endif
+
- - {{ $asset->location->city }}
- @if (($asset->location->city!='') && ($asset->location->state!=''))
- ,
- @endif
- {{ $asset->location->state }} {{ $asset->location->zip }}
-
- @endif
-
+ - {{ $asset->location->city }}
+ @if (($asset->location->city!='') && ($asset->location->state!=''))
+ ,
+ @endif
+ {{ $asset->location->state }} {{ $asset->location->zip }}
+
+ @endif
+
- @endif
+ @endif