Use number_format on badges

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2022-06-15 14:59:06 -07:00
parent a758e825ed
commit a111482217
7 changed files with 32 additions and 32 deletions

View file

@ -21,7 +21,7 @@
<i class="fas fa-barcode" aria-hidden="true"></i>
</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>' : '' !!}
{!! (($company->assets) && ($company->assets->count() > 0 )) ? '<badge class="badge badge-secondary">'.number_format($company->assets->count()).'</badge>' : '' !!}
</span>
</a>
@ -33,7 +33,7 @@
<i class="far fa-save"></i>
</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>' : '' !!}
{!! (($company->licenses) && ($company->licenses->count() > 0 )) ? '<badge class="badge badge-secondary">'.number_format($company->licenses->count()).'</badge>' : '' !!}
</span>
</a>
</li>
@ -43,7 +43,7 @@
<span class="hidden-lg hidden-md">
<i class="far fa-keyboard"></i>
</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>' : '' !!}
{!! (($company->accessories) && ($company->accessories->count() > 0 )) ? '<badge class="badge badge-secondary">'.number_format($company->accessories->count()).'</badge>' : '' !!}
</span>
</a>
</li>
@ -53,7 +53,7 @@
<span class="hidden-lg hidden-md">
<i class="fas fa-tint"></i></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>' : '' !!}
{!! (($company->consumables) && ($company->consumables->count() > 0 )) ? '<badge class="badge badge-secondary">'.number_format($company->consumables->count()).'</badge>' : '' !!}
</span>
</a>
</li>
@ -63,7 +63,7 @@
<span class="hidden-lg hidden-md">
<i class="far fa-hdd"></i></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>' : '' !!}
{!! (($company->components) && ($company->components->count() > 0 )) ? '<badge class="badge badge-secondary">'.number_format($company->components->count()).'</badge>' : '' !!}
</span>
</a>
</li>
@ -73,7 +73,7 @@
<span class="hidden-lg hidden-md">
<i class="fas fa-users"></i></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>' : '' !!}
{!! (($company->users) && ($company->users->count() > 0 )) ? '<badge class="badge badge-secondary">'.number_format($company->users->count()).'</badge>' : '' !!}
</span>
</a>
</li>

View file

@ -116,7 +116,7 @@
<i class="far fa-save fa-2x" aria-hidden="true"></i>
</span>
<span class="hidden-xs hidden-sm">{{ trans('general.licenses') }}
{!! ($asset->licenses->count() > 0 ) ? '<badge class="badge badge-secondary">'.$asset->licenses->count().'</badge>' : '' !!}
{!! ($asset->licenses->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($asset->licenses->count()).'</badge>' : '' !!}
</span>
</a>
</li>
@ -127,7 +127,7 @@
<i class="far fa-hdd fa-2x" aria-hidden="true"></i>
</span>
<span class="hidden-xs hidden-sm">{{ trans('general.components') }}
{!! ($asset->components->count() > 0 ) ? '<badge class="badge badge-secondary">'.$asset->components->count().'</badge>' : '' !!}
{!! ($asset->components->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($asset->components->count()).'</badge>' : '' !!}
</span>
</a>
</li>
@ -138,7 +138,7 @@
<i class="fas fa-barcode fa-2x" aria-hidden="true"></i>
</span>
<span class="hidden-xs hidden-sm">{{ trans('general.assets') }}
{!! ($asset->assignedAssets()->count() > 0 ) ? '<badge class="badge badge-secondary">'.$asset->assignedAssets()->count().'</badge>' : '' !!}
{!! ($asset->assignedAssets()->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($asset->assignedAssets()->count()).'</badge>' : '' !!}
</span>
</a>
@ -161,7 +161,7 @@
<i class="fas fa-wrench fa-2x" aria-hidden="true"></i>
</span>
<span class="hidden-xs hidden-sm">{{ trans('general.maintenances') }}
{!! ($asset->assetmaintenances()->count() > 0 ) ? '<badge class="badge badge-secondary">'.$asset->assetmaintenances()->count().'</badge>' : '' !!}
{!! ($asset->assetmaintenances()->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($asset->assetmaintenances()->count()).'</badge>' : '' !!}
</span>
</a>
</li>
@ -172,7 +172,7 @@
<i class="far fa-file fa-2x" aria-hidden="true"></i>
</span>
<span class="hidden-xs hidden-sm">{{ trans('general.files') }}
{!! ($asset->uploads->count() > 0 ) ? '<badge class="badge badge-secondary">'.$asset->uploads->count().'</badge>' : '' !!}
{!! ($asset->uploads->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($asset->uploads->count()).'</badge>' : '' !!}
</span>
</a>
</li>

View file

@ -47,7 +47,7 @@
<i class="far fa-list-alt fa-2x" aria-hidden="true"></i>
</span>
<span class="hidden-xs hidden-sm">{{ trans('admin/licenses/form.seats') }}</span>
<span class="badge badge-secondary">{{ $license->availCount()->count() }} / {{ $license->seats }}</span>
<span class="badge badge-secondary">{{ number_format($license->availCount()->count()) }} / {{ number_format($license->seats) }}</span>
</a>
</li>
@ -57,7 +57,7 @@
<span class="hidden-lg hidden-md">
<i class="far fa-file fa-2x" aria-hidden="true"></i></span>
<span class="hidden-xs hidden-sm">{{ trans('general.file_uploads') }}
{!! ($license->uploads->count() > 0 ) ? '<badge class="badge badge-secondary">'.$license->uploads->count().'</badge>' : '' !!}
{!! ($license->uploads->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($license->uploads->count()).'</badge>' : '' !!}
</span>
</a>
</li>

View file

@ -25,7 +25,7 @@
</span>
<span class="hidden-xs hidden-sm">
{{ trans('general.users') }}
{!! (($location->users) && ($location->users->count() > 0 )) ? '<badge class="badge badge-secondary">'.$location->users->count().'</badge>' : '' !!}
{!! (($location->users) && ($location->users->count() > 0 )) ? '<badge class="badge badge-secondary">'.number_format($location->users->count()).'</badge>' : '' !!}
</span>
</a>
@ -38,7 +38,7 @@
</span>
<span class="hidden-xs hidden-sm">
{{ trans('general.assets') }}
{!! (($location->assets) && ($location->assets->count() > 0 )) ? '<badge class="badge badge-secondary">'.$location->assets->count().'</badge>' : '' !!}
{!! (($location->assets) && ($location->assets->count() > 0 )) ? '<badge class="badge badge-secondary">'.number_format($location->assets->count()).'</badge>' : '' !!}
</span>
</a>
</li>
@ -50,7 +50,7 @@
</span>
<span class="hidden-xs hidden-sm">
{{ trans('general.accessories') }}
{!! (($location->accessories) && ($location->accessories->count() > 0 )) ? '<badge class="badge badge-secondary">'.$location->accessories->count().'</badge>' : '' !!}
{!! (($location->accessories) && ($location->accessories->count() > 0 )) ? '<badge class="badge badge-secondary">'.number_format($location->accessories->count()).'</badge>' : '' !!}
</span>
</a>
</li>
@ -62,7 +62,7 @@
</span>
<span class="hidden-xs hidden-sm">
{{ trans('general.consumables') }}
{!! (($location->consumables) && ($location->consumables->count() > 0 )) ? '<badge class="badge badge-secondary">'.$location->consumables->count().'</badge>' : '' !!}
{!! (($location->consumables) && ($location->consumables->count() > 0 )) ? '<badge class="badge badge-secondary">'.number_format($location->consumables->count()).'</badge>' : '' !!}
</span>
</a>
</li>
@ -74,7 +74,7 @@
</span>
<span class="hidden-xs hidden-sm">
{{ trans('general.components') }}
{!! (($location->components) && ($location->components->count() > 0 )) ? '<badge class="badge badge-secondary">'.$location->components->count().'</badge>' : '' !!}
{!! (($location->components) && ($location->components->count() > 0 )) ? '<badge class="badge badge-secondary">'.number_format($location->components->count()).'</badge>' : '' !!}
</span>
</a>
</li>

View file

@ -41,7 +41,7 @@
</span>
<span class="hidden-xs hidden-sm">
{{ trans('general.assets') }}
{!! (($manufacturer->assets) && ($manufacturer->assets->count() > 0 )) ? '<badge class="badge badge-secondary">'.$manufacturer->assets->count().'</badge>' : '' !!}
{!! (($manufacturer->assets) && ($manufacturer->assets->count() > 0 )) ? '<badge class="badge badge-secondary">'.number_format($manufacturer->assets->count()).'</badge>' : '' !!}
</span>
</a>
@ -55,7 +55,7 @@
</span>
<span class="hidden-xs hidden-sm">
{{ trans('general.licenses') }}
{!! (($manufacturer->licenses) && ($manufacturer->licenses->count() > 0 )) ? '<badge class="badge badge-secondary">'.$manufacturer->licenses->count().'</badge>' : '' !!}
{!! (($manufacturer->licenses) && ($manufacturer->licenses->count() > 0 )) ? '<badge class="badge badge-secondary">'.number_format($manufacturer->licenses->count()).'</badge>' : '' !!}
</span>
</a>
@ -68,7 +68,7 @@
</span>
<span class="hidden-xs hidden-sm">
{{ trans('general.accessories') }}
{!! (($manufacturer->accessories) && ($manufacturer->accessories->count() > 0 )) ? '<badge class="badge badge-secondary">'.$manufacturer->accessories->count().'</badge>' : '' !!}
{!! (($manufacturer->accessories) && ($manufacturer->accessories->count() > 0 )) ? '<badge class="badge badge-secondary">'.number_format($manufacturer->accessories->count()).'</badge>' : '' !!}
</span>
</a>
@ -81,7 +81,7 @@
</span>
<span class="hidden-xs hidden-sm">
{{ trans('general.consumables') }}
{!! (($manufacturer->consumables) && ($manufacturer->consumables->count() > 0 )) ? '<badge class="badge badge-secondary">'.$manufacturer->consumables->count().'</badge>' : '' !!}
{!! (($manufacturer->consumables) && ($manufacturer->consumables->count() > 0 )) ? '<badge class="badge badge-secondary">'.number_format($manufacturer->consumables->count()).'</badge>' : '' !!}
</span>
</a>

View file

@ -35,7 +35,7 @@
</span>
<span class="hidden-xs hidden-sm">
{{ trans('general.assets') }}
{!! (($supplier->assets) && ($supplier->assets->count() > 0 )) ? '<badge class="badge badge-secondary">'.$supplier->assets->count().'</badge>' : '' !!}
{!! (($supplier->assets) && ($supplier->assets->count() > 0 )) ? '<badge class="badge badge-secondary">'.number_format($supplier->assets->count()).'</badge>' : '' !!}
</span>
</a>
@ -48,7 +48,7 @@
</span>
<span class="hidden-xs hidden-sm">
{{ trans('general.accessories') }}
{!! (($supplier->accessories) && ($supplier->accessories->count() > 0 )) ? '<badge class="badge badge-secondary">'.$supplier->accessories->count().'</badge>' : '' !!}
{!! (($supplier->accessories) && ($supplier->accessories->count() > 0 )) ? '<badge class="badge badge-secondary">'.number_format($supplier->accessories->count()).'</badge>' : '' !!}
</span>
</a>
</li>
@ -60,7 +60,7 @@
</span>
<span class="hidden-xs hidden-sm">
{{ trans('general.licenses') }}
{!! (($supplier->licenses) && ($supplier->licenses->count() > 0 )) ? '<badge class="badge badge-secondary">'.$supplier->licenses->count().'</badge>' : '' !!}
{!! (($supplier->licenses) && ($supplier->licenses->count() > 0 )) ? '<badge class="badge badge-secondary">'.number_format($supplier->licenses->count()).'</badge>' : '' !!}
</span>
</a>
</li>
@ -72,7 +72,7 @@
</span>
<span class="hidden-xs hidden-sm">
{{ trans('admin/asset_maintenances/general.asset_maintenances') }}
{!! (($supplier->asset_maintenances) && ($supplier->asset_maintenances->count() > 0 )) ? '<badge class="badge badge-secondary">'.$supplier->asset_maintenances->count().'</badge>' : '' !!}
{!! (($supplier->asset_maintenances) && ($supplier->asset_maintenances->count() > 0 )) ? '<badge class="badge badge-secondary">'.number_format($supplier->asset_maintenances->count()).'</badge>' : '' !!}
</span>
</a>
</li>

View file

@ -31,7 +31,7 @@
<i class="fas fa-barcode fa-2x" aria-hidden="true"></i>
</span>
<span class="hidden-xs hidden-sm">{{ trans('general.assets') }}
{!! ($user->assets->count() > 0 ) ? '<badge class="badge badge-secondary">'.$user->assets->count().'</badge>' : '' !!}
{!! ($user->assets->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($user->assets->count()).'</badge>' : '' !!}
</span>
</a>
</li>
@ -42,7 +42,7 @@
<i class="far fa-save fa-2x"></i>
</span>
<span class="hidden-xs hidden-sm">{{ trans('general.licenses') }}
{!! ($user->licenses->count() > 0 ) ? '<badge class="badge badge-secondary">'.$user->licenses->count().'</badge>' : '' !!}
{!! ($user->licenses->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($user->licenses->count()).'</badge>' : '' !!}
</span>
</a>
</li>
@ -53,7 +53,7 @@
<i class="far fa-keyboard fa-2x"></i>
</span>
<span class="hidden-xs hidden-sm">{{ trans('general.accessories') }}
{!! ($user->accessories->count() > 0 ) ? '<badge class="badge badge-secondary">'.$user->accessories->count().'</badge>' : '' !!}
{!! ($user->accessories->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($user->accessories->count()).'</badge>' : '' !!}
</span>
</a>
</li>
@ -64,7 +64,7 @@
<i class="fas fa-tint fa-2x"></i>
</span>
<span class="hidden-xs hidden-sm">{{ trans('general.consumables') }}
{!! ($user->consumables->count() > 0 ) ? '<badge class="badge badge-secondary">'.$user->consumables->count().'</badge>' : '' !!}
{!! ($user->consumables->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($user->consumables->count()).'</badge>' : '' !!}
</span>
</a>
</li>
@ -75,7 +75,7 @@
<i class="far fa-file fa-2x"></i>
</span>
<span class="hidden-xs hidden-sm">{{ trans('general.file_uploads') }}
{!! ($user->uploads->count() > 0 ) ? '<badge class="badge badge-secondary">'.$user->uploads->count().'</badge>' : '' !!}
{!! ($user->uploads->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($user->uploads->count()).'</badge>' : '' !!}
</span>
</a>
</li>
@ -95,7 +95,7 @@
<span class="hidden-lg hidden-md">
<i class="fas fa-map-marker-alt fa-2x"></i></span>
<span class="hidden-xs hidden-sm">{{ trans('admin/users/table.managed_locations') }}
{!! ($user->managedLocations->count() > 0 ) ? '<badge class="badge badge-secondary">'.$user->managedLocations->count().'</badge>' : '' !!}
{!! ($user->managedLocations->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($user->managedLocations->count()).'</badge>' : '' !!}
</a>
</li>
@endif