Merge remote-tracking branch 'origin/develop'

This commit is contained in:
snipe 2022-06-23 16:16:04 -07:00
commit dd8d90aa39
19 changed files with 1786 additions and 1455 deletions

View file

@ -1147,6 +1147,31 @@ class Asset extends Depreciable
}
/**
* Query builder scope for Archived assets counting
*
* This is primarily used for the tab counters so that IF the admin
* has chosen to not display archived assets in their regular lists
* and views, it will return the correct number.
*
* @param \Illuminate\Database\Query\Builder $query Query builder instance
*
* @return \Illuminate\Database\Query\Builder Modified query builder
*/
public function scopeAssetsForShow($query)
{
if (Setting::getSettings()->show_archived_in_list!=1) {
return $query->whereHas('assetstatus', function ($query) {
$query->where('archived', '=', 0);
});
} else {
return $query;
}
}
/**
* Query builder scope for Archived assets
*

3066
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -14,10 +14,10 @@
},
"devDependencies": {
"@fortawesome/fontawesome-free": "^5.15.4",
"axios": "^0.20.0",
"axios": "^0.27.2",
"babel-preset-latest": "^6.24.1",
"jquery": "<3.6.0",
"laravel-mix": "^6.0.39",
"laravel-mix": "^6.0.49",
"lodash": "^4.17.20",
"postcss": "^8.4.5",
"vue": "2.4.4",
@ -34,7 +34,7 @@
"bootstrap-colorpicker": "^2.5.3",
"bootstrap-datepicker": "^1.9.0",
"bootstrap-less": "^3.3.8",
"bootstrap-table": "1.20.0",
"bootstrap-table": "1.20.2",
"chart.js": "^2.9.4",
"css-loader": "^3.6.0",
"ekko-lightbox": "^5.1.1",
@ -46,7 +46,7 @@
"jquery-ui": "^1.13.1",
"jquery-ui-bundle": "^1.12.1",
"jquery.iframe-transport": "^1.0.0",
"jspdf-autotable": "^3.5.23",
"jspdf-autotable": "^3.5.24",
"less": "^4.1.2",
"less-loader": "^5.0.0",
"list.js": "^1.5.0",

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,45 +1,45 @@
{
"/js/build/app.js": "/js/build/app.js?id=8b75d505c1bee38e1557",
"/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=f577ce74b0dc04d0ec2b",
"/css/build/overrides.css": "/css/build/overrides.css?id=2921802af70bd9f0c247",
"/css/build/app.css": "/css/build/app.css?id=6c9a6e04ac7d56ee6fdb",
"/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=65ca7a34198fa16ba846",
"/css/dist/skins/skin-orange.css": "/css/dist/skins/skin-orange.css?id=0715caf11a30f0756768",
"/css/dist/skins/skin-orange-dark.css": "/css/dist/skins/skin-orange-dark.css?id=c17de79571bc6dc42112",
"/css/dist/skins/skin-blue-dark.css": "/css/dist/skins/skin-blue-dark.css?id=d7326fc67c3ca143b923",
"/css/dist/skins/skin-yellow-dark.css": "/css/dist/skins/skin-yellow-dark.css?id=8b9d88179519a78562f0",
"/css/dist/skins/skin-yellow.css": "/css/dist/skins/skin-yellow.css?id=47021aa27f4112d4abb6",
"/css/dist/skins/skin-purple-dark.css": "/css/dist/skins/skin-purple-dark.css?id=d8ff93a7b6938b2bf01c",
"/css/dist/skins/skin-purple.css": "/css/dist/skins/skin-purple.css?id=73bb57f917efb3289548",
"/css/dist/skins/skin-red-dark.css": "/css/dist/skins/skin-red-dark.css?id=25b72081b75e2769b506",
"/css/dist/skins/skin-black-dark.css": "/css/dist/skins/skin-black-dark.css?id=81f5e6c7216d0fe56425",
"/css/dist/skins/skin-black.css": "/css/dist/skins/skin-black.css?id=10507e47aacfe3d0b8dd",
"/css/dist/skins/skin-green-dark.css": "/css/dist/skins/skin-green-dark.css?id=ad668346fb0a97b86491",
"/css/dist/skins/skin-green.css": "/css/dist/skins/skin-green.css?id=407f83d58689706f303a",
"/css/dist/skins/skin-contrast.css": "/css/dist/skins/skin-contrast.css?id=6a9d0ac448c28b88e5d6",
"/css/dist/skins/skin-red.css": "/css/dist/skins/skin-red.css?id=c17879493dcd86dbb6c1",
"/css/dist/all.css": "/css/dist/all.css?id=9a1a8d0959114dcf722a",
"/css/blue.png": "/css/blue.png?id=e83a6c29e04fe851f212",
"/css/blue@2x.png": "/css/blue@2x.png?id=51135dd4d24f88f5de0b",
"/css/dist/signature-pad.css": "/css/dist/signature-pad.css?id=6a89d3cd901305e66ced",
"/css/dist/signature-pad.min.css": "/css/dist/signature-pad.min.css?id=6a89d3cd901305e66ced",
"/css/dist/bootstrap-table.css": "/css/dist/bootstrap-table.css?id=e45be9555cc66bf80749",
"/js/build/vendor.js": "/js/build/vendor.js?id=47ecbb4bb3b0e02315f3",
"/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=8b909f5a1792dcc78a4b",
"/js/dist/all.js": "/js/dist/all.js?id=448ec9994dee0c281e8b",
"/css/dist/skins/skin-green.min.css": "/css/dist/skins/skin-green.min.css?id=407f83d58689706f303a",
"/css/dist/skins/skin-green-dark.min.css": "/css/dist/skins/skin-green-dark.min.css?id=ad668346fb0a97b86491",
"/css/dist/skins/skin-black.min.css": "/css/dist/skins/skin-black.min.css?id=10507e47aacfe3d0b8dd",
"/css/dist/skins/skin-black-dark.min.css": "/css/dist/skins/skin-black-dark.min.css?id=81f5e6c7216d0fe56425",
"/css/dist/skins/skin-blue.min.css": "/css/dist/skins/skin-blue.min.css?id=f577ce74b0dc04d0ec2b",
"/css/dist/skins/skin-blue-dark.min.css": "/css/dist/skins/skin-blue-dark.min.css?id=d7326fc67c3ca143b923",
"/css/dist/skins/skin-yellow.min.css": "/css/dist/skins/skin-yellow.min.css?id=47021aa27f4112d4abb6",
"/css/dist/skins/skin-yellow-dark.min.css": "/css/dist/skins/skin-yellow-dark.min.css?id=8b9d88179519a78562f0",
"/css/dist/skins/skin-red.min.css": "/css/dist/skins/skin-red.min.css?id=c17879493dcd86dbb6c1",
"/css/dist/skins/skin-red-dark.min.css": "/css/dist/skins/skin-red-dark.min.css?id=25b72081b75e2769b506",
"/css/dist/skins/skin-purple.min.css": "/css/dist/skins/skin-purple.min.css?id=73bb57f917efb3289548",
"/css/dist/skins/skin-purple-dark.min.css": "/css/dist/skins/skin-purple-dark.min.css?id=d8ff93a7b6938b2bf01c",
"/css/dist/skins/skin-orange.min.css": "/css/dist/skins/skin-orange.min.css?id=0715caf11a30f0756768",
"/css/dist/skins/skin-orange-dark.min.css": "/css/dist/skins/skin-orange-dark.min.css?id=c17de79571bc6dc42112",
"/css/dist/skins/skin-contrast.min.css": "/css/dist/skins/skin-contrast.min.css?id=6a9d0ac448c28b88e5d6"
"/js/build/app.js": "/js/build/app.js?id=8b75d505c1bee38e15573e394b96f249",
"/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=f577ce74b0dc04d0ec2bdc31b6b57e54",
"/css/build/overrides.css": "/css/build/overrides.css?id=2921802af70bd9f0c247e5dd4e23c442",
"/css/build/app.css": "/css/build/app.css?id=6c9a6e04ac7d56ee6fdb027488627b3c",
"/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=dc383f8560a8d4adb51d44fb4043e03b",
"/css/dist/skins/skin-orange.css": "/css/dist/skins/skin-orange.css?id=0715caf11a30f0756768c093ee3a5a8f",
"/css/dist/skins/skin-orange-dark.css": "/css/dist/skins/skin-orange-dark.css?id=c17de79571bc6dc421127b87cab2e2dc",
"/css/dist/skins/skin-blue-dark.css": "/css/dist/skins/skin-blue-dark.css?id=d7326fc67c3ca143b9233b7a43051840",
"/css/dist/skins/skin-yellow-dark.css": "/css/dist/skins/skin-yellow-dark.css?id=8b9d88179519a78562f039983f31e093",
"/css/dist/skins/skin-yellow.css": "/css/dist/skins/skin-yellow.css?id=47021aa27f4112d4abb6ba9ca371ded3",
"/css/dist/skins/skin-purple-dark.css": "/css/dist/skins/skin-purple-dark.css?id=d8ff93a7b6938b2bf01c12d3c11d1a76",
"/css/dist/skins/skin-purple.css": "/css/dist/skins/skin-purple.css?id=73bb57f917efb32895488cef3d92b42a",
"/css/dist/skins/skin-red-dark.css": "/css/dist/skins/skin-red-dark.css?id=25b72081b75e2769b5064681c158f099",
"/css/dist/skins/skin-black-dark.css": "/css/dist/skins/skin-black-dark.css?id=81f5e6c7216d0fe56425e158a5446ce0",
"/css/dist/skins/skin-black.css": "/css/dist/skins/skin-black.css?id=924fd5e1d5d41ffc483841a628eb9c58",
"/css/dist/skins/skin-green-dark.css": "/css/dist/skins/skin-green-dark.css?id=ad668346fb0a97b86491ce33d995c9b6",
"/css/dist/skins/skin-green.css": "/css/dist/skins/skin-green.css?id=407f83d58689706f303a83e195f6c041",
"/css/dist/skins/skin-contrast.css": "/css/dist/skins/skin-contrast.css?id=6a9d0ac448c28b88e5d6fcff8c440044",
"/css/dist/skins/skin-red.css": "/css/dist/skins/skin-red.css?id=c17879493dcd86dbb6c1701082bec9f7",
"/css/dist/all.css": "/css/dist/all.css?id=a183b0847d54643c0936b906d72cef13",
"/css/blue.png": "/css/blue.png?id=e83a6c29e04fe851f2122815b2e4b150",
"/css/blue@2x.png": "/css/blue@2x.png?id=51135dd4d24f88f5de0b2414bd51dac5",
"/css/dist/signature-pad.css": "/css/dist/signature-pad.css?id=6a89d3cd901305e66ced1cf5f13147f7",
"/css/dist/signature-pad.min.css": "/css/dist/signature-pad.min.css?id=6a89d3cd901305e66ced1cf5f13147f7",
"/css/dist/bootstrap-table.css": "/css/dist/bootstrap-table.css?id=ee4896df8b8f008ce73a9a0c2549aefd",
"/js/build/vendor.js": "/js/build/vendor.js?id=47ecbb4bb3b0e02315f391caadbdf971",
"/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=14d9a2affec7b066d20fcba2e6e67ad2",
"/js/dist/all.js": "/js/dist/all.js?id=448ec9994dee0c281e8b4bc59fd4cfc6",
"/css/dist/skins/skin-green.min.css": "/css/dist/skins/skin-green.min.css?id=407f83d58689706f303a83e195f6c041",
"/css/dist/skins/skin-green-dark.min.css": "/css/dist/skins/skin-green-dark.min.css?id=ad668346fb0a97b86491ce33d995c9b6",
"/css/dist/skins/skin-black.min.css": "/css/dist/skins/skin-black.min.css?id=924fd5e1d5d41ffc483841a628eb9c58",
"/css/dist/skins/skin-black-dark.min.css": "/css/dist/skins/skin-black-dark.min.css?id=81f5e6c7216d0fe56425e158a5446ce0",
"/css/dist/skins/skin-blue.min.css": "/css/dist/skins/skin-blue.min.css?id=f577ce74b0dc04d0ec2bdc31b6b57e54",
"/css/dist/skins/skin-blue-dark.min.css": "/css/dist/skins/skin-blue-dark.min.css?id=d7326fc67c3ca143b9233b7a43051840",
"/css/dist/skins/skin-yellow.min.css": "/css/dist/skins/skin-yellow.min.css?id=47021aa27f4112d4abb6ba9ca371ded3",
"/css/dist/skins/skin-yellow-dark.min.css": "/css/dist/skins/skin-yellow-dark.min.css?id=8b9d88179519a78562f039983f31e093",
"/css/dist/skins/skin-red.min.css": "/css/dist/skins/skin-red.min.css?id=c17879493dcd86dbb6c1701082bec9f7",
"/css/dist/skins/skin-red-dark.min.css": "/css/dist/skins/skin-red-dark.min.css?id=25b72081b75e2769b5064681c158f099",
"/css/dist/skins/skin-purple.min.css": "/css/dist/skins/skin-purple.min.css?id=73bb57f917efb32895488cef3d92b42a",
"/css/dist/skins/skin-purple-dark.min.css": "/css/dist/skins/skin-purple-dark.min.css?id=d8ff93a7b6938b2bf01c12d3c11d1a76",
"/css/dist/skins/skin-orange.min.css": "/css/dist/skins/skin-orange.min.css?id=0715caf11a30f0756768c093ee3a5a8f",
"/css/dist/skins/skin-orange-dark.min.css": "/css/dist/skins/skin-orange-dark.min.css?id=c17de79571bc6dc421127b87cab2e2dc",
"/css/dist/skins/skin-contrast.min.css": "/css/dist/skins/skin-contrast.min.css?id=6a9d0ac448c28b88e5d6fcff8c440044"
}

View file

@ -59,12 +59,12 @@
.btn, .btn:hover {
color: #000 ;
text-decoration: none;
&.btn-primary, .btn-primary:link {
background-color: @dark-gray;
border-color: darken(@gray, 10%);
color: #fff;
border-color: #FFF;
color: #FFF;
}
@ -89,13 +89,13 @@
a {
color: @black;
text-decoration: underline;
color: var(--link);
&:hover {
color: darken(@black, 20%);
color: var(--hover-link);
}
&:visited {
color: @black;
color: var(--visited-link);
}
}
@ -109,18 +109,24 @@ a {
--header: @black; /* Use same as Header picker */
--text-main: #BBB;
--text-sub: #9b9b9b;
--link: #AAA; /* Use same as Header picker, lighten by 70% */
--visited-link: lighten(@black, 40%); /* Use same as Header picker, lighten by 70% */
--hover-link: lighten(@black, 45%); /* Use same as Header picker, lighten by 70% */
--link: #black; /* Use same as Header picker, lighten by 70% */
--visited-link: @black; /* Use same as Header picker, lighten by 70% */
--hover-link: lighten(#000, 60%); /* Use same as Header picker, lighten by 70% */
--nav-link: #FFF; /* Use same as Header picker */
--light-link: #fff; /* Use same as Header picker */
}
a:link {
color: var(--link);
a.btn-info:link, a.btn-warning:link, a.btn-danger:link{
color: #FFF;
}
&a.btn-info:visited, a.btn-warning:visited, a.btn-danger:visited{
color: #FFF;
}
.btn-danger.btn-sm.disabled{
color: #FFF;
}
a:visited {
color: var(--visited-link);
.sidebar-toggle-mobile {
color: #FFF !important;
}
.skin-black .main-header .navbar .nav>li>a, .skin-black .main-header .navbar .nav>li>a {

View file

@ -39,7 +39,7 @@
<li class="active">
<a href="#items" data-toggle="tab" title="{{ trans('general.items') }}"> {{ ucwords($category_type_route) }}
@if ($category->category_type=='asset')
<badge class="badge badge-secondary"> {{ $category->assets->count() }}</badge>
<badge class="badge badge-secondary"> {{ $category->assets()->AssetsForShow()->count() }}</badge>
@endif
</a>
</li>

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">'.number_format($company->assets->count()).'</badge>' : '' !!}
{!! (($company->assets) && ($company->assets()->AssetsForShow()->count() > 0 )) ? '<badge class="badge badge-secondary">'.number_format($company->assets()->AssetsForShow()->count()).'</badge>' : '' !!}
</span>
</a>

View file

@ -33,7 +33,7 @@
<!-- small box -->
<div class="small-box bg-teal">
<div class="inner">
<h3>{{ number_format($counts['asset']) }}</h3>
<h3>{{ number_format(\App\Models\Asset::AssetsForShow()->count()) }}</h3>
<p>{{ strtolower(trans('general.assets')) }}</p>
</div>
<div class="icon" aria-hidden="true">

View file

@ -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">'.number_format($location->assets->count()).'</badge>' : '' !!}
{!! (($location->assets) && ($location->assets()->AssetsForShow()->count() > 0 )) ? '<badge class="badge badge-secondary">'.number_format($location->assets()->AssetsForShow()->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">'.number_format($manufacturer->assets->count()).'</badge>' : '' !!}
{!! (($manufacturer->assets) && ($manufacturer->assets()->AssetsForShow()->count() > 0 )) ? '<badge class="badge badge-secondary">'.number_format($manufacturer->assets()->AssetsForShow()->count()).'</badge>' : '' !!}
</span>
</a>

View file

@ -92,7 +92,7 @@
},
exportOptions: export_options,
exportTypes: ['csv', 'excel', 'doc', 'txt','json', 'xml', 'pdf'],
exportTypes: ['xlsx', 'excel', 'csv', 'pdf','json', 'xml', 'txt', 'sql', 'doc' ],
onLoadSuccess: function () {
$('[data-toggle="tooltip"]').tooltip(); // Needed to attach tooltips after ajax call
}

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">'.number_format($supplier->assets->count()).'</badge>' : '' !!}
{!! (($supplier->assets) && ($supplier->assets()->AssetsForShow()->count() > 0 )) ? '<badge class="badge badge-secondary">'.number_format($supplier->assets()->AssetsForShow()->count()).'</badge>' : '' !!}
</span>
</a>

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">'.number_format($user->assets->count()).'</badge>' : '' !!}
{!! ($user->assets()->AssetsForShow()->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($user->assets()->AssetsForShow()->count()).'</badge>' : '' !!}
</span>
</a>
</li>