Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Jun 18, 2024
2 parents 04560b4 + 9380c9e commit d0299de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/AssetModelsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ public function getRestore($id)
public function show($modelId = null)
{
$this->authorize('view', AssetModel::class);
$model = AssetModel::withTrashed()->withCount('assets')->find($modelId);
$model = AssetModel::withTrashed()->find($modelId);

if (isset($model->id)) {
return view('models/view', compact('model'));
Expand Down
4 changes: 2 additions & 2 deletions resources/views/models/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
<i class="fas fa-barcode fa-2x"></i>
</span>
<span class="hidden-xs hidden-sm">
{{ trans('general.assets') }}
{!! ($model->assets_count > 0 ) ? '<badge class="badge badge-secondary">'.number_format($model->assets_count).'</badge>' : '' !!}
{{ trans('general.assets') }}
{!! ($model->assets()->AssetsForShow()->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($model->assets()->AssetsForShow()->count()).'</badge>' : '' !!}
</span>
</a>
</li>
Expand Down

0 comments on commit d0299de

Please sign in to comment.