Added tab badges to company detail view

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2022-06-15 11:37:44 -07:00
parent 872600a7a7
commit 677e5a8cf1

View file

@ -20,7 +20,10 @@
<span class="hidden-lg hidden-md">
<i class="fas fa-barcode" aria-hidden="true"></i>
</span>
<span class="hidden-xs hidden-sm">{{ trans('general.assets') }}</span>
<span class="hidden-xs hidden-sm">{{ trans('general.assets') }}
{!! (($company->assets) && ($company->assets->count() > 0 )) ? '<badge class="badge badge-secondary">'.$company->assets->count().'</badge>' : '' !!}
</span>
</a>
</li>
@ -29,7 +32,9 @@
<span class="hidden-lg hidden-md">
<i class="far fa-save"></i>
</span>
<span class="hidden-xs hidden-sm">{{ trans('general.licenses') }}</span>
<span class="hidden-xs hidden-sm">{{ trans('general.licenses') }}
{!! (($company->licenses) && ($company->licenses->count() > 0 )) ? '<badge class="badge badge-secondary">'.$company->licenses->count().'</badge>' : '' !!}
</span>
</a>
</li>
@ -37,7 +42,9 @@
<a href="#accessories_tab" data-toggle="tab">
<span class="hidden-lg hidden-md">
<i class="far fa-keyboard"></i>
</span> <span class="hidden-xs hidden-sm">{{ trans('general.accessories') }}</span>
</span> <span class="hidden-xs hidden-sm">{{ trans('general.accessories') }}
{!! (($company->accessories) && ($company->accessories->count() > 0 )) ? '<badge class="badge badge-secondary">'.$company->accessories->count().'</badge>' : '' !!}
</span>
</a>
</li>
@ -45,7 +52,9 @@
<a href="#consumables_tab" data-toggle="tab">
<span class="hidden-lg hidden-md">
<i class="fas fa-tint"></i></span>
<span class="hidden-xs hidden-sm">{{ trans('general.consumables') }}</span>
<span class="hidden-xs hidden-sm">{{ trans('general.consumables') }}
{!! (($company->consumables) && ($company->consumables->count() > 0 )) ? '<badge class="badge badge-secondary">'.$company->consumables->count().'</badge>' : '' !!}
</span>
</a>
</li>
@ -53,7 +62,9 @@
<a href="#components_tab" data-toggle="tab">
<span class="hidden-lg hidden-md">
<i class="far fa-hdd"></i></span>
<span class="hidden-xs hidden-sm">{{ trans('general.components') }}</span>
<span class="hidden-xs hidden-sm">{{ trans('general.components') }}
{!! (($company->components) && ($company->components->count() > 0 )) ? '<badge class="badge badge-secondary">'.$company->components->count().'</badge>' : '' !!}
</span>
</a>
</li>
@ -61,7 +72,9 @@
<a href="#users_tab" data-toggle="tab">
<span class="hidden-lg hidden-md">
<i class="fas fa-users"></i></span>
<span class="hidden-xs hidden-sm">{{ trans('general.people') }}</span>
<span class="hidden-xs hidden-sm">{{ trans('general.people') }}
{!! (($company->users) && ($company->users->count() > 0 )) ? '<badge class="badge badge-secondary">'.$company->users->count().'</badge>' : '' !!}
</span>
</a>
</li>