diff --git a/app/Helpers/IconHelper.php b/app/Helpers/IconHelper.php new file mode 100644 index 0000000000..fec9517913 --- /dev/null +++ b/app/Helpers/IconHelper.php @@ -0,0 +1,179 @@ +restore()) { $logaction = new Actionlog(); - $logaction->item_type = User::class; + $logaction->item_type = AssetModel::class; $logaction->item_id = $model->id; $logaction->created_at = date('Y-m-d H:i:s'); $logaction->user_id = auth()->id(); diff --git a/app/Http/Controllers/LocationsController.php b/app/Http/Controllers/LocationsController.php index c498f09926..f32e6b8489 100755 --- a/app/Http/Controllers/LocationsController.php +++ b/app/Http/Controllers/LocationsController.php @@ -3,6 +3,7 @@ namespace App\Http\Controllers; use App\Http\Requests\ImageUploadRequest; +use App\Models\Actionlog; use App\Models\Asset; use App\Models\Location; use App\Models\User; @@ -193,7 +194,13 @@ class LocationsController extends Controller */ public function show($id = null) : View | RedirectResponse { - $location = Location::find($id); + $location = Location::withCount('assignedAssets as assigned_assets_count') + ->withCount('assets as assets_count') + ->withCount('rtd_assets as rtd_assets_count') + ->withCount('children as children_count') + ->withCount('users as users_count') + ->withTrashed() + ->find($id); if (isset($location->id)) { return view('locations/view', compact('location')); @@ -249,6 +256,41 @@ class LocationsController extends Controller } + /** + * Restore a given Asset Model (mark as un-deleted) + * + * @author [A. Gianotto] [] + * @since [v1.0] + * @param int $id + */ + public function postRestore($id) : RedirectResponse + { + $this->authorize('create', Location::class); + + if ($location = Location::withTrashed()->find($id)) { + + if ($location->deleted_at == '') { + return redirect()->back()->with('error', trans('general.not_deleted', ['item_type' => trans('general.location')])); + } + + if ($location->restore()) { + $logaction = new Actionlog(); + $logaction->item_type = Location::class; + $logaction->item_id = $location->id; + $logaction->created_at = date('Y-m-d H:i:s'); + $logaction->user_id = auth()->id(); + $logaction->logaction('restore'); + + return redirect()->route('locations.index')->with('success', trans('admin/locations/message.restore.success')); + } + + // Check validation + return redirect()->back()->with('error', trans('general.could_not_restore', ['item_type' => trans('general.location'), 'error' => $location->getErrors()->first()])); + } + + return redirect()->back()->with('error', trans('admin/models/message.does_not_exist')); + + } public function print_all_assigned($id) : View | RedirectResponse { if ($location = Location::where('id', $id)->first()) { diff --git a/app/Presenters/AssetPresenter.php b/app/Presenters/AssetPresenter.php index b86135f33b..e55cb00c2e 100644 --- a/app/Presenters/AssetPresenter.php +++ b/app/Presenters/AssetPresenter.php @@ -579,6 +579,6 @@ class AssetPresenter extends Presenter public function glyph() { - return ''; + return ''; } } diff --git a/app/Presenters/CompanyPresenter.php b/app/Presenters/CompanyPresenter.php index 7603191fc1..bcb77c7eba 100644 --- a/app/Presenters/CompanyPresenter.php +++ b/app/Presenters/CompanyPresenter.php @@ -65,40 +65,46 @@ class CompanyPresenter extends Presenter 'field' => 'users_count', 'searchable' => false, 'sortable' => true, - 'title' => '', + 'title' => trans('general.users'), 'visible' => true, + 'class' => 'css-users', ], [ 'field' => 'assets_count', 'searchable' => false, 'sortable' => true, - 'title' => '', + 'title' => trans('general.assets'), 'visible' => true, + 'class' => 'css-barcode', ], [ 'field' => 'licenses_count', 'searchable' => false, 'sortable' => true, + 'title' => trans('general.licenses'), 'visible' => true, - 'title' => ' ', + 'class' => 'css-license', ], [ 'field' => 'accessories_count', 'searchable' => false, 'sortable' => true, + 'title' => trans('general.accessories'), 'visible' => true, - 'title' => ' ', + 'class' => 'css-accessory', ], [ 'field' => 'consumables_count', 'searchable' => false, 'sortable' => true, + 'title' => trans('general.consumables'), 'visible' => true, - 'title' => ' ', + 'class' => 'css-consumable', ], [ 'field' => 'components_count', 'searchable' => false, 'sortable' => true, + 'title' => trans('general.components'), 'visible' => true, - 'title' => ' ', + 'class' => 'css-component', ], [ 'field' => 'updated_at', 'searchable' => false, diff --git a/app/Presenters/DepreciationReportPresenter.php b/app/Presenters/DepreciationReportPresenter.php index 50a8b73b54..6905385615 100644 --- a/app/Presenters/DepreciationReportPresenter.php +++ b/app/Presenters/DepreciationReportPresenter.php @@ -394,6 +394,6 @@ class DepreciationReportPresenter extends Presenter public function glyph() { - return ''; + return ''; } } diff --git a/app/Presenters/LocationPresenter.php b/app/Presenters/LocationPresenter.php index 56d710ac96..d6bbe0db11 100644 --- a/app/Presenters/LocationPresenter.php +++ b/app/Presenters/LocationPresenter.php @@ -235,7 +235,7 @@ class LocationPresenter extends Presenter public function glyph() { - return ''; + return ''; } public function fullName() diff --git a/app/Presenters/ManufacturerPresenter.php b/app/Presenters/ManufacturerPresenter.php index 3e36cbcde0..07a22c9ea4 100644 --- a/app/Presenters/ManufacturerPresenter.php +++ b/app/Presenters/ManufacturerPresenter.php @@ -94,36 +94,36 @@ class ManufacturerPresenter extends Presenter 'searchable' => false, 'sortable' => true, 'switchable' => true, - 'title' => ' ' - .'', + 'title' => trans('general.assets'), 'visible' => true, + 'class' => 'css-barcode', ], [ 'field' => 'licenses_count', 'searchable' => false, 'sortable' => true, 'switchable' => true, - 'title' => ' ' - .'', + 'title' => trans('general.licenses'), 'visible' => true, + 'class' => 'css-license', ], [ 'field' => 'consumables_count', 'searchable' => false, 'sortable' => true, 'switchable' => true, - 'title' => ' ' - .'', + 'title' => trans('general.consumables'), 'visible' => true, + 'class' => 'css-consumable', ], [ 'field' => 'accessories_count', 'searchable' => false, 'sortable' => true, 'switchable' => true, - 'title' => ' ' - .'', + 'title' => trans('general.accessories'), 'visible' => true, + 'class' => 'css-accessory', ], [ 'field' => 'created_at', diff --git a/app/Presenters/UserPresenter.php b/app/Presenters/UserPresenter.php index 7054676a93..635eaa86aa 100644 --- a/app/Presenters/UserPresenter.php +++ b/app/Presenters/UserPresenter.php @@ -492,6 +492,6 @@ class UserPresenter extends Presenter public function glyph() { - return ''; + return ''; } } diff --git a/config/app.php b/config/app.php index 060d82d525..bc74b4dd05 100755 --- a/config/app.php +++ b/config/app.php @@ -372,7 +372,9 @@ return [ 'Google2FA' => PragmaRX\Google2FALaravel\Facade::class, 'Image' => Intervention\Image\ImageServiceProvider::class, 'Carbon' => Carbon\Carbon::class, - 'Helper' => App\Helpers\Helper::class, // makes it much easier to use 'Helper::blah' in blades (which is where we usually use this) + 'Helper' => App\Helpers\Helper::class, + // makes it much easier to use 'Helper::blah' in blades (which is where we usually use this) + 'Icon' => App\Helpers\IconHelper::class, 'Socialite' => Laravel\Socialite\Facades\Socialite::class, diff --git a/public/css/build/app.css b/public/css/build/app.css index f703469050..7f575c30ea 100644 Binary files a/public/css/build/app.css and b/public/css/build/app.css differ diff --git a/public/css/build/overrides.css b/public/css/build/overrides.css index d8169245b6..8062628551 100644 Binary files a/public/css/build/overrides.css and b/public/css/build/overrides.css differ diff --git a/public/css/dist/all.css b/public/css/dist/all.css index 8957c00995..9b24bf7bb8 100644 Binary files a/public/css/dist/all.css and b/public/css/dist/all.css differ diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 547cbd7f5c..3ccb348cbb 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -2,8 +2,8 @@ "/js/build/app.js": "/js/build/app.js?id=5030f4cb69d0d0b87b7fe6ba1b9eece9", "/css/dist/skins/skin-black-dark.css": "/css/dist/skins/skin-black-dark.css?id=f0b08873a06bb54daeee176a9459f4a9", "/css/dist/skins/_all-skins.css": "/css/dist/skins/_all-skins.css?id=f4397c717b99fce41a633ca6edd5d1f4", - "/css/build/overrides.css": "/css/build/overrides.css?id=e83697e14b9cd1478ea2bda8fb50f30c", - "/css/build/app.css": "/css/build/app.css?id=ff82b7edca60f7276504bde91568f6d1", + "/css/build/overrides.css": "/css/build/overrides.css?id=cfbc06b0e0ebd9ee7294c4950dcc4933", + "/css/build/app.css": "/css/build/app.css?id=bcb566c8a13855e85053527728126d07", "/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=4ea0068716c1bb2434d87a16d51b98c9", "/css/dist/skins/skin-yellow.css": "/css/dist/skins/skin-yellow.css?id=7b315b9612b8fde8f9c5b0ddb6bba690", "/css/dist/skins/skin-yellow-dark.css": "/css/dist/skins/skin-yellow-dark.css?id=393aaa7b368b0670fc42434c8cca7dc7", @@ -19,7 +19,7 @@ "/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=f677207c6cf9678eb539abecb408c374", "/css/dist/skins/skin-blue-dark.css": "/css/dist/skins/skin-blue-dark.css?id=0640e45bad692dcf62873c6e85904899", "/css/dist/skins/skin-black.css": "/css/dist/skins/skin-black.css?id=76482123f6c70e866d6b971ba91de7bb", - "/css/dist/all.css": "/css/dist/all.css?id=053e0f8c49e8cf1b903c80c8f67639eb", + "/css/dist/all.css": "/css/dist/all.css?id=2e2e514b7e7fd63a0c6a882749ef2b13", "/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", "/js/select2/i18n/af.js": "/js/select2/i18n/af.js?id=4f6fcd73488ce79fae1b7a90aceaecde", diff --git a/public/sounds/lock.mp3 b/public/sounds/lock.mp3 new file mode 100644 index 0000000000..8628f2fd3c Binary files /dev/null and b/public/sounds/lock.mp3 differ diff --git a/resources/assets/less/overrides.less b/resources/assets/less/overrides.less index a6a2347d41..3358e55632 100644 --- a/resources/assets/less/overrides.less +++ b/resources/assets/less/overrides.less @@ -718,6 +718,7 @@ th.css-consumable > .th-inner, th.css-envelope > .th-inner, th.css-users > .th-inner, th.css-location > .th-inner, +th.css-component > .th-inner, th.css-accessory > .th-inner { font-size: 0px; @@ -736,6 +737,7 @@ th.css-consumable > .th-inner::before, th.css-envelope > .th-inner::before, th.css-users > .th-inner::before, th.css-location > .th-inner::before, +th.css-component > .th-inner::before, th.css-accessory > .th-inner::before { @@ -791,6 +793,11 @@ th.css-location > .th-inner::before { content: "\f3c5"; font-family: "Font Awesome 5 Free"; font-size: 19px; margin-bottom: 0px; } +th.css-component > .th-inner::before +{ + content: "\f0a0"; font-family: "Font Awesome 5 Free"; font-weight: 500; +} + .small-box .inner { padding-left: 15px; diff --git a/resources/lang/en-US/admin/locations/message.php b/resources/lang/en-US/admin/locations/message.php index 6226c71ab6..488ec9c670 100644 --- a/resources/lang/en-US/admin/locations/message.php +++ b/resources/lang/en-US/admin/locations/message.php @@ -8,6 +8,7 @@ return array( 'assoc_child_loc' => 'This location is currently the parent of at least one child location and cannot be deleted. Please update your locations to no longer reference this location and try again. ', 'assigned_assets' => 'Assigned Assets', 'current_location' => 'Current Location', + 'open_map' => 'Open in :map_provider_icon Maps', 'create' => array( @@ -20,6 +21,11 @@ return array( 'success' => 'Location updated successfully.' ), + 'restore' => array( + 'error' => 'Location was not restored, please try again', + 'success' => 'Location restored successfully.' + ), + 'delete' => array( 'confirm' => 'Are you sure you wish to delete this location?', 'error' => 'There was an issue deleting the location. Please try again.', diff --git a/resources/views/accessories/view.blade.php b/resources/views/accessories/view.blade.php index f3add91d40..41e8d1c41b 100644 --- a/resources/views/accessories/view.blade.php +++ b/resources/views/accessories/view.blade.php @@ -25,7 +25,7 @@
  • @@ -34,7 +34,8 @@
  • + +
  • @@ -43,11 +44,12 @@ @can('accessories.files', $accessory)
  • - + +
  • @endcan @@ -55,7 +57,13 @@ @can('update', $accessory)
  • - {{ trans('button.upload') }} + +
  • @endcan @@ -186,6 +194,7 @@ @foreach ($accessory->uploads as $file) + {{ Helper::filetype_icon($file->filename) }} @@ -217,7 +226,7 @@ - + @endif @@ -320,33 +329,46 @@
    + + @can('update', \App\Models\Accessory::class) + + @endcan + @can('checkout', \App\Models\Accessory::class) @endcan - @can('update', \App\Models\Accessory::class) - - @endcan + @can('create', \App\Models\Accessory::class) @endcan @can('delete', $accessory) @if ($accessory->checkouts_count == 0)
    -
    @else
    - + + {{ trans('general.delete') }} diff --git a/resources/views/account/change-password.blade.php b/resources/views/account/change-password.blade.php index 9899a9734e..57509e5fab 100755 --- a/resources/views/account/change-password.blade.php +++ b/resources/views/account/change-password.blade.php @@ -59,7 +59,7 @@
    diff --git a/resources/views/account/profile.blade.php b/resources/views/account/profile.blade.php index aecd8a4c12..d27367192a 100755 --- a/resources/views/account/profile.blade.php +++ b/resources/views/account/profile.blade.php @@ -174,7 +174,7 @@ {{ Form::close() }} diff --git a/resources/views/account/view-assets.blade.php b/resources/views/account/view-assets.blade.php index a4ffa16ec7..b973ad2bd0 100755 --- a/resources/views/account/view-assets.blade.php +++ b/resources/views/account/view-assets.blade.php @@ -42,7 +42,7 @@
  • diff --git a/resources/views/auth/passwords/email.blade.php b/resources/views/auth/passwords/email.blade.php index 5077b36f9a..0328058184 100644 --- a/resources/views/auth/passwords/email.blade.php +++ b/resources/views/auth/passwords/email.blade.php @@ -37,7 +37,7 @@
    - + {!! trans('auth/general.username_help_top') !!}
    @@ -55,7 +55,7 @@
    - + {!! $errors->first('username', ' :message') !!}
    @@ -67,13 +67,13 @@
    - + {{ trans('general.show_help') }} diff --git a/resources/views/auth/passwords/reset.blade.php b/resources/views/auth/passwords/reset.blade.php index 1be653fe0a..0e529d3f52 100644 --- a/resources/views/auth/passwords/reset.blade.php +++ b/resources/views/auth/passwords/reset.blade.php @@ -11,8 +11,6 @@
    - -
  • + diff --git a/resources/views/components/view.blade.php b/resources/views/components/view.blade.php index bbb9b67097..287b0b23a8 100644 --- a/resources/views/components/view.blade.php +++ b/resources/views/components/view.blade.php @@ -61,7 +61,7 @@
  • @@ -83,7 +83,7 @@ @can('components.files', $component)
  • - {{ trans('button.upload') }} + {{ trans('button.upload') }}
  • @endcan @@ -203,15 +203,15 @@ @if ($file->filename) - - + + {{ trans('general.download') }} - + - + @endif {{ $file->created_at }} @@ -284,7 +284,26 @@ @endif - + @can('update', $component) + + @endcan + + @can('checkout', Component::class) + + @endcan + + + @can('components.files', Component::class) diff --git a/resources/views/consumables/view.blade.php b/resources/views/consumables/view.blade.php index f6ea14042e..7cfbef2445 100644 --- a/resources/views/consumables/view.blade.php +++ b/resources/views/consumables/view.blade.php @@ -38,7 +38,7 @@
  • - {{ trans('button.upload') }} + {{ trans('button.upload') }}
  • @endcan @@ -97,39 +97,51 @@ @can('update', $consumable) @endcan - @can('create', Consumable::class) + @can('checkout', $consumable) + @if ($consumable->numRemaining() > 0) + + @else +
    + +
    + @endif + @endif + + + @can('create', Consumable::class) @endcan - @can('checkout', $consumable) - @if ($consumable->numRemaining() > 0) - - @else -
    - -
    - @endif - @endif @can('delete', $consumable)
    @if ($consumable->deleted_at=='') - {{ trans('general.delete') }} @endif @@ -487,7 +499,7 @@ - + @endif diff --git a/resources/views/custom_fields/fields/edit.blade.php b/resources/views/custom_fields/fields/edit.blade.php index 0ffc6f5d43..12c3a3fb73 100644 --- a/resources/views/custom_fields/fields/edit.blade.php +++ b/resources/views/custom_fields/fields/edit.blade.php @@ -143,7 +143,7 @@
    @endif diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index 2339122072..39a5d8b751 100755 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -37,10 +37,12 @@

    {{ strtolower(trans('general.assets')) }}

    @can('index', \App\Models\Asset::class) - {{ trans('general.view_all') }} + {{ trans('general.view_all') }} + + @endcan @@ -55,10 +57,12 @@

    {{ strtolower(trans('general.licenses')) }}

    @can('view', \App\Models\License::class) - {{ trans('general.view_all') }} + {{ trans('general.view_all') }} + + @endcan @@ -74,10 +78,12 @@

    {{ strtolower(trans('general.accessories')) }}

    @can('index', \App\Models\Accessory::class) - {{ trans('general.view_all') }} + {{ trans('general.view_all') }} + + @endcan @@ -93,10 +99,12 @@

    {{ strtolower(trans('general.consumables')) }}

    @can('index', \App\Models\Consumable::class) - {{ trans('general.view_all') }} + {{ trans('general.view_all') }} + + @endcan @@ -110,10 +118,12 @@

    {{ strtolower(trans('general.components')) }}

    @can('view', \App\Models\License::class) - {{ trans('general.view_all') }} + {{ trans('general.view_all') }} + + @endcan @@ -128,10 +138,12 @@

    {{ strtolower(trans('general.people')) }}

    @can('view', \App\Models\License::class) - {{ trans('general.view_all') }} + {{ trans('general.view_all') }} + + @endcan @@ -201,7 +213,7 @@

    {{ trans('general.recent_activity') }}

    @@ -253,7 +265,7 @@
    @@ -282,7 +294,7 @@

    {{ trans('general.companies') }}

    @@ -307,27 +319,27 @@ {{ trans('general.name') }} - + {{ trans('general.people') }} - + {{ trans('general.asset_count') }} - + {{ trans('general.accessories_count') }} - + {{ trans('general.consumables_count') }} - + {{ trans('general.components_count') }} - + {{ trans('general.licenses_count') }} @@ -350,7 +362,7 @@

    {{ trans('general.locations') }}

    @@ -376,7 +388,7 @@ {{ trans('general.name') }} - + {{ trans('general.asset_count') }} @@ -384,7 +396,7 @@ {{ trans('general.assigned') }} - + {{ trans('general.people') }} @@ -413,7 +425,7 @@

    {{ trans('general.asset') }} {{ trans('general.categories') }}

    @@ -441,23 +453,23 @@ {{ trans('general.type') }} - + {{ trans('general.asset_count') }} - + {{ trans('general.accessories_count') }} - + {{ trans('general.consumables_count') }} - + {{ trans('general.components_count') }} - + {{ trans('general.licenses_count') }} diff --git a/resources/views/errors/403.blade.php b/resources/views/errors/403.blade.php index e2a8642ca6..1196f69994 100644 --- a/resources/views/errors/403.blade.php +++ b/resources/views/errors/403.blade.php @@ -18,7 +18,7 @@
    -

    403 Forbidden.

    +

    403 Forbidden.

    {!! trans('general.sad_panda', ['link' => config('app.url')]) !!}

    diff --git a/resources/views/errors/404.blade.php b/resources/views/errors/404.blade.php index 77d7c32521..021897922e 100644 --- a/resources/views/errors/404.blade.php +++ b/resources/views/errors/404.blade.php @@ -18,7 +18,7 @@
    -

    404 Page not found.

    +

    404 Page not found.

    Sad panda. We could not find the page you were looking for. You should maybe return to the dashboard. diff --git a/resources/views/errors/503.blade.php b/resources/views/errors/503.blade.php index 4adb020d4e..c3af4644a2 100644 --- a/resources/views/errors/503.blade.php +++ b/resources/views/errors/503.blade.php @@ -20,7 +20,7 @@

    - + {{ trans('general.maintenance_mode_title') }}

    diff --git a/resources/views/groups/index.blade.php b/resources/views/groups/index.blade.php index 49d7d768b9..5f96551d31 100755 --- a/resources/views/groups/index.blade.php +++ b/resources/views/groups/index.blade.php @@ -43,7 +43,7 @@ {{ trans('general.id') }} {{ trans('admin/groups/table.name') }} - {{ trans('admin/groups/table.users') }} + {{ trans('admin/groups/table.users') }} {{ trans('general.created_at') }} {{ trans('general.created_by') }} {{ trans('table.actions') }} diff --git a/resources/views/hardware/audit.blade.php b/resources/views/hardware/audit.blade.php index 9659371071..2a88e171bc 100644 --- a/resources/views/hardware/audit.blade.php +++ b/resources/views/hardware/audit.blade.php @@ -44,7 +44,7 @@ {{ $asset->model->name }} @else - + {{ trans('admin/hardware/general.model_invalid')}} {{ trans('admin/hardware/general.model_invalid_fix')}} @@ -109,7 +109,7 @@
    - +
    {!! $errors->first('next_audit_date', '') !!}

    {!! trans('general.next_audit_date_help') !!}

    @@ -136,7 +136,7 @@ diff --git a/resources/views/hardware/bulk-checkout.blade.php b/resources/views/hardware/bulk-checkout.blade.php index 562a27154e..465336563d 100644 --- a/resources/views/hardware/bulk-checkout.blade.php +++ b/resources/views/hardware/bulk-checkout.blade.php @@ -42,7 +42,7 @@
    - +
    {!! $errors->first('checkout_at', '') !!}
    @@ -56,7 +56,7 @@
    - +
    {!! $errors->first('expected_checkin', '') !!}
    @@ -86,7 +86,7 @@
    diff --git a/resources/views/hardware/bulk-delete.blade.php b/resources/views/hardware/bulk-delete.blade.php index df988f5ad2..f72e7e4d1b 100644 --- a/resources/views/hardware/bulk-delete.blade.php +++ b/resources/views/hardware/bulk-delete.blade.php @@ -59,7 +59,7 @@
    diff --git a/resources/views/hardware/bulk-restore.blade.php b/resources/views/hardware/bulk-restore.blade.php index e4bfb6e4dd..a998642685 100644 --- a/resources/views/hardware/bulk-restore.blade.php +++ b/resources/views/hardware/bulk-restore.blade.php @@ -53,7 +53,7 @@
    diff --git a/resources/views/hardware/bulk.blade.php b/resources/views/hardware/bulk.blade.php index f621d88fa8..d36513e889 100755 --- a/resources/views/hardware/bulk.blade.php +++ b/resources/views/hardware/bulk.blade.php @@ -60,7 +60,7 @@
    - +
    {!! $errors->first('purchase_date', ' :message') !!}
    @@ -78,7 +78,7 @@
    - +
    {!! $errors->first('expected_checkin', '') !!} @@ -178,7 +178,7 @@
    - +
    {!! $errors->first('next_audit_date', '
    diff --git a/resources/views/hardware/checkin.blade.php b/resources/views/hardware/checkin.blade.php index 12a0627aec..5686e74dd4 100755 --- a/resources/views/hardware/checkin.blade.php +++ b/resources/views/hardware/checkin.blade.php @@ -53,7 +53,7 @@ {{ $asset->model->name }} @else - + {{ trans('admin/hardware/general.model_invalid')}} {{ trans('admin/hardware/general.model_invalid_fix')}} diff --git a/resources/views/hardware/checkout.blade.php b/resources/views/hardware/checkout.blade.php index 17b971a5ba..a067a5a11d 100755 --- a/resources/views/hardware/checkout.blade.php +++ b/resources/views/hardware/checkout.blade.php @@ -50,7 +50,7 @@ {{ $asset->model->name }} @else - + {{ trans('admin/hardware/general.model_invalid')}} @@ -109,8 +109,8 @@ - + +
    {!! $errors->first('checkout_at', '') !!} @@ -128,8 +128,9 @@ - + + + {!! $errors->first('expected_checkin', '') !!} @@ -153,13 +154,13 @@
    @if ($asset->requireAcceptance()) - + {{ trans('admin/categories/general.required_acceptance') }}
    @endif @if ($asset->getEula()) - + {{ trans('admin/categories/general.required_eula') }}
    @endif diff --git a/resources/views/hardware/edit.blade.php b/resources/views/hardware/edit.blade.php index f31326cc4d..bdbc3c3c2e 100755 --- a/resources/views/hardware/edit.blade.php +++ b/resources/views/hardware/edit.blade.php @@ -44,7 +44,7 @@
    @endif @@ -103,7 +103,7 @@
    - + {{ trans('admin/hardware/form.optional_infos') }} @@ -124,7 +124,7 @@
    - +
    @@ -153,7 +153,7 @@
    - + {{ trans('admin/hardware/form.order_details') }} @@ -255,17 +255,15 @@ $("#assigned_user").show(); $("#selected_status_status").removeClass('text-danger'); - $("#selected_status_status").removeClass('text-warning'); $("#selected_status_status").addClass('text-success'); - $("#selected_status_status").html(' {{ trans('admin/hardware/form.asset_deployable')}}'); + $("#selected_status_status").html(' {{ trans('admin/hardware/form.asset_deployable')}}'); } else { $("#assignto_selector").hide(); - $("#selected_status_status").removeClass('text-danger'); $("#selected_status_status").removeClass('text-success'); - $("#selected_status_status").addClass('text-warning'); - $("#selected_status_status").html(' {{ trans('admin/hardware/form.asset_not_deployable')}} '); + $("#selected_status_status").addClass('text-danger'); + $("#selected_status_status").html(' {{ trans('admin/hardware/form.asset_not_deployable')}} '); } } }); @@ -324,7 +322,7 @@ box_html += ''; box_html += '
    '; box_html += '
    '; - box_html += ''; + box_html += ''; box_html += '
    '; box_html += '
    '; box_html += '
    '; diff --git a/resources/views/hardware/quickscan-checkin.blade.php b/resources/views/hardware/quickscan-checkin.blade.php index ec6ef5719f..de892399cc 100644 --- a/resources/views/hardware/quickscan-checkin.blade.php +++ b/resources/views/hardware/quickscan-checkin.blade.php @@ -69,7 +69,7 @@
    @@ -99,7 +99,7 @@ - {{ trans('general.processing') }}... + {{ trans('general.processing') }}... diff --git a/resources/views/hardware/quickscan.blade.php b/resources/views/hardware/quickscan.blade.php index e4f6c8a55e..867eeaa2b0 100644 --- a/resources/views/hardware/quickscan.blade.php +++ b/resources/views/hardware/quickscan.blade.php @@ -51,12 +51,9 @@ - - - @@ -67,7 +64,7 @@
    - +
    {!! $errors->first('next_audit_date', '') !!}
    @@ -83,16 +80,14 @@ - - - - - @@ -116,7 +111,8 @@ - {{ trans('admin/hardware/form.processing_spinner') }} + + {{ trans('admin/hardware/form.processing_spinner') }} diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index 4961cfce25..2da4038340 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -44,7 +44,7 @@
  • @@ -53,7 +53,7 @@
  • @@ -98,7 +98,7 @@
  • +
  • - - {{ trans('button.upload') }} + +
  • @endcan @@ -150,7 +155,7 @@ @if ($asset->deleted_at!='')
    - + {{ trans('admin/users/message.user_deleted_warning') }}
    @@ -172,24 +177,36 @@ + @if ($asset->deleted_at=='') + @can('update', $asset) + + @endcan + @if (($asset->assetstatus) && ($asset->assetstatus->deployable=='1')) @if (($asset->assigned_to != '') && ($asset->deleted_at=='')) @can('checkin', \App\Models\Asset::class) -
    +
    model ? ' data-tooltip="true" title="'.trans('admin/hardware/general.model_invalid_fix').'"' : '') !!}> - - {{ trans('admin/hardware/general.checkin') }} - + + + {{ trans('admin/hardware/general.checkin') }} +
    @endcan @elseif (($asset->assigned_to == '') && ($asset->deleted_at=='')) - @can('checkout', \App\Models\Asset::class) + @can('checkout', Asset::class)
    model ? ' data-tooltip="true" title="'.trans('admin/hardware/general.model_invalid_fix').'"' : '') !!}> - - {{ trans('admin/hardware/general.checkout') }} + + + {{ trans('admin/hardware/general.checkout') }}
    @@ -197,19 +214,13 @@ @endif @endif - @if ($asset->deleted_at=='') - @can('update', $asset) - - @endcan + @can('audit', \App\Models\Asset::class)
    model ? ' data-tooltip="true" title="'.trans('admin/hardware/general.model_invalid_fix').'"' : '') !!}> - + + {{ trans('general.audit') }} @@ -219,7 +230,8 @@ @can('create', $asset) @@ -228,13 +240,19 @@ @can('delete', $asset)
    @if ($asset->deleted_at=='') - {{ trans('general.delete') }} @else
    @csrf - +
    @endif
    @@ -256,14 +274,14 @@
      @if ((isset($asset->assignedTo->email)) && ($asset->assignedTo->email!=''))
    • - + {{ $asset->assignedTo->email }}
    • @endif @if ((isset($asset->assignedTo)) && ($asset->assignedTo->phone!=''))
    • - + {{ $asset->assignedTo->phone }}
    • @endif @@ -273,7 +291,9 @@ @endif @if (isset($asset->location)) -
    • {{ $asset->location->name }}
    • +
    • + + {{ $asset->location->name }}
    • {{ $asset->location->address }} @if ($asset->location->address2!='') {{ $asset->location->address2 }} @@ -288,11 +308,13 @@
    • @endif
    • - {{ trans('admin/hardware/form.checkout_date') }}: {{ Helper::getFormattedDateObject($asset->last_checkout, 'date', false) }} + + {{ trans('admin/hardware/form.checkout_date') }}: {{ Helper::getFormattedDateObject($asset->last_checkout, 'date', false) }}
    • @if (isset($asset->expected_checkin))
    • - {{ trans('admin/hardware/form.expected_checkin') }}: {{ Helper::getFormattedDateObject($asset->expected_checkin, 'date', false) }} + + {{ trans('admin/hardware/form.expected_checkin') }}: {{ Helper::getFormattedDateObject($asset->expected_checkin, 'date', false) }}
    • @endif
    @@ -354,20 +376,22 @@
    @if (($asset->assignedTo) && ($asset->deleted_at=='')) - + {{ $asset->assetstatus->name }} - + - + {!! $asset->assignedTo->present()->glyph() !!} {!! $asset->assignedTo->present()->nameUrl() !!} @else @if (($asset->assetstatus) && ($asset->assetstatus->deployable=='1')) - + @elseif (($asset->assetstatus) && ($asset->assetstatus->pending=='1')) - + @else - + @endif {{ $asset->assetstatus->name }} @@ -484,38 +508,39 @@ @if (($asset->model) && ($asset->model->manufacturer) && ($asset->model->manufacturer->url!=''))
  • - + {{ $asset->present()->dynamicUrl($asset->model->manufacturer->url) }} - +
  • @endif @if (($asset->model) && ($asset->model->manufacturer) && ($asset->model->manufacturer->support_url!=''))
  • - + {{ $asset->present()->dynamicUrl($asset->model->manufacturer->support_url) }} - +
  • @endif @if (($asset->model) && ($asset->model->manufacturer) && ($asset->model->manufacturer->warranty_lookup_url!=''))
  • - + {{ $asset->present()->dynamicUrl($asset->model->manufacturer->warranty_lookup_url) }} - + + {{ trans('admin/hardware/general.mfg_warranty_lookup', ['manufacturer' => $asset->model->manufacturer->name]) }}
  • @endif @if (($asset->model) && ($asset->model->manufacturer->support_phone))
  • - + {{ $asset->model->manufacturer->support_phone }} @@ -524,7 +549,7 @@ @if (($asset->model) && ($asset->model->manufacturer->support_email))
  • - + {{ $asset->model->manufacturer->support_email }} @@ -612,6 +637,7 @@
  • @if (($field->field_encrypted=='1') && ($asset->{$field->db_column_name()}!='')) + @endif @@ -783,7 +809,8 @@ @if (($asset->model) && ($asset->model->manufacturer) && ($asset->model->manufacturer->warranty_lookup_url!='')) - + + {{ trans('admin/hardware/general.mfg_warranty_lookup', ['manufacturer' => $asset->model->manufacturer->name]) }} @endif
    @@ -876,14 +903,13 @@ @else {{ trans('general.na_no_purchase_date') }} @endif - @if ($asset->eol_explicit) - + @if ($asset->eol_explicit =='1') + + + @endif
    @@ -1041,7 +1067,9 @@ 'id' => 'bulkForm']) }} - + {{ Form::close() }} @@ -1093,7 +1121,7 @@ @else
    - + {{ trans('general.no_results') }}
    @endif @@ -1148,7 +1176,7 @@ @else
    - + {{ trans('general.no_results') }}
    @endif @@ -1212,7 +1240,7 @@ @else
    - + {{ trans('general.no_results') }}
    @endif @@ -1372,11 +1400,11 @@ @if (($file->filename) && (Storage::exists('private_uploads/assets/'.$file->filename))) - + - + @endif @@ -1387,7 +1415,9 @@ @can('update', \App\Models\Asset::class) - + + + @endcan @@ -1398,7 +1428,7 @@ @else
    - + {{ trans('general.no_results') }}
    @endif @@ -1474,11 +1504,11 @@ @if (($file->filename) && (Storage::exists('private_uploads/assetmodels/'.$file->filename))) - + - + @endif @@ -1490,7 +1520,9 @@ @can('update', \App\Models\AssetModel::class) - + + + @endcan @@ -1501,7 +1533,7 @@ @else
    - + {{ trans('general.no_results') }}
    @endif diff --git a/resources/views/kits/checkout.blade.php b/resources/views/kits/checkout.blade.php index 265329259c..212f72c118 100644 --- a/resources/views/kits/checkout.blade.php +++ b/resources/views/kits/checkout.blade.php @@ -33,7 +33,7 @@
    - +
    {!! $errors->first('checkout_at', ' :message') !!}
    @@ -47,7 +47,7 @@
    - +
    {!! $errors->first('expected_checkin', ' :message') !!}
    @@ -68,7 +68,7 @@ diff --git a/resources/views/layouts/default.blade.php b/resources/views/layouts/default.blade.php index 2c38e59111..b303362ade 100644 --- a/resources/views/layouts/default.blade.php +++ b/resources/views/layouts/default.blade.php @@ -145,7 +145,7 @@ dir="{{ Helper::determineLanguageDirection() }}"> @can('index', \App\Models\Asset::class) @@ -153,7 +153,7 @@ dir="{{ Helper::determineLanguageDirection() }}"> @can('view', \App\Models\License::class) @@ -161,7 +161,7 @@ dir="{{ Helper::determineLanguageDirection() }}"> @can('index', \App\Models\Accessory::class) @@ -169,7 +169,7 @@ dir="{{ Helper::determineLanguageDirection() }}"> @can('index', \App\Models\Consumable::class) @@ -177,7 +177,7 @@ dir="{{ Helper::determineLanguageDirection() }}"> @can('view', \App\Models\Component::class) @@ -197,7 +197,7 @@ dir="{{ Helper::determineLanguageDirection() }}">
    @@ -216,7 +216,7 @@ dir="{{ Helper::determineLanguageDirection() }}"> @can('create', \App\Models\Asset::class)
  • - + {{ trans('general.asset') }}
  • @@ -224,7 +224,7 @@ dir="{{ Helper::determineLanguageDirection() }}"> @can('create', \App\Models\License::class)
  • - + {{ trans('general.license') }}
  • @@ -232,7 +232,7 @@ dir="{{ Helper::determineLanguageDirection() }}"> @can('create', \App\Models\Accessory::class)
  • - + {{ trans('general.accessory') }}
  • @@ -240,7 +240,7 @@ dir="{{ Helper::determineLanguageDirection() }}"> @can('create', \App\Models\Consumable::class)
  • - + {{ trans('general.consumable') }}
  • @@ -248,7 +248,7 @@ dir="{{ Helper::determineLanguageDirection() }}"> @can('create', \App\Models\Component::class)
  • - + {{ trans('general.component') }}
  • @@ -256,7 +256,7 @@ dir="{{ Helper::determineLanguageDirection() }}"> @can('create', \App\Models\User::class)
  • - + {{ trans('general.user') }}
  • @@ -272,7 +272,7 @@ dir="{{ Helper::determineLanguageDirection() }}">