Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added number_format() to tab badges #11326

Merged
merged 1 commit into from
Jun 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions resources/views/companies/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand Down
10 changes: 5 additions & 5 deletions resources/views/hardware/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/licenses/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down
10 changes: 5 additions & 5 deletions resources/views/locations/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand Down
8 changes: 4 additions & 4 deletions resources/views/manufacturers/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand Down
8 changes: 4 additions & 4 deletions resources/views/suppliers/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand Down
12 changes: 6 additions & 6 deletions resources/views/users/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand All @@ -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
Expand Down