mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
c52a1f94dc
|
@ -235,7 +235,7 @@ class ComponentsController extends Controller
|
|||
$this->authorize('checkout', $component);
|
||||
|
||||
$validator = Validator::make($request->all(), [
|
||||
'asset_id' => 'required|exists:assets,id',
|
||||
'assigned_to' => 'required|exists:assets,id',
|
||||
'assigned_qty' => "required|numeric|min:1|digits_between:1,".$component->numRemaining(),
|
||||
]);
|
||||
|
||||
|
|
|
@ -42,6 +42,11 @@ class LicenseSeatsController extends Controller
|
|||
|
||||
// Make sure the offset and limit are actually integers and do not exceed system limits
|
||||
$offset = ($request->input('offset') > $seats->count()) ? $seats->count() : abs($request->input('offset'));
|
||||
|
||||
if ($offset >= $total ){
|
||||
$offset = 0;
|
||||
}
|
||||
|
||||
$limit = app('api_limit_value');
|
||||
|
||||
$seats = $seats->skip($offset)->take($limit)->get();
|
||||
|
|
|
@ -774,7 +774,7 @@ class AssetsController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Retore a deleted asset.
|
||||
* Restore a deleted asset.
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @param int $assetId
|
||||
|
|
|
@ -639,10 +639,16 @@ class ReportsController extends Controller
|
|||
}
|
||||
|
||||
if (($request->filled('created_start')) && ($request->filled('created_end'))) {
|
||||
$assets->whereBetween('assets.created_at', [$request->input('created_start'), $request->input('created_end')]);
|
||||
$created_start = \Carbon::parse($request->input('created_start'))->startOfDay();
|
||||
$created_end = \Carbon::parse($request->input('created_end'))->endOfDay();
|
||||
|
||||
$assets->whereBetween('assets.created_at', [$created_start, $created_end]);
|
||||
}
|
||||
if (($request->filled('checkout_date_start')) && ($request->filled('checkout_date_end'))) {
|
||||
$assets->whereBetween('assets.last_checkout', [$request->input('checkout_date_start'), $request->input('checkout_date_end')]);
|
||||
$checkout_start = \Carbon::parse($request->input('checkout_date_start'))->startOfDay();
|
||||
$checkout_end = \Carbon::parse($request->input('checkout_date_end'))->endOfDay();
|
||||
|
||||
$assets->whereBetween('assets.last_checkout', [$checkout_start, $checkout_end]);
|
||||
}
|
||||
|
||||
if (($request->filled('expected_checkin_start')) && ($request->filled('expected_checkin_end'))) {
|
||||
|
@ -650,7 +656,10 @@ class ReportsController extends Controller
|
|||
}
|
||||
|
||||
if (($request->filled('last_audit_start')) && ($request->filled('last_audit_end'))) {
|
||||
$assets->whereBetween('assets.last_audit_date', [$request->input('last_audit_start'), $request->input('last_audit_end')]);
|
||||
$last_audit_start = \Carbon::parse($request->input('last_audit_start'))->startOfDay();
|
||||
$last_audit_end = \Carbon::parse($request->input('last_audit_end'))->endOfDay();
|
||||
|
||||
$assets->whereBetween('assets.last_audit_date', [$last_audit_start, $last_audit_end]);
|
||||
}
|
||||
|
||||
if (($request->filled('next_audit_start')) && ($request->filled('next_audit_end'))) {
|
||||
|
|
|
@ -102,10 +102,10 @@ class AssetsTransformer
|
|||
foreach ($asset->model->fieldset->fields as $field) {
|
||||
if ($field->isFieldDecryptable($asset->{$field->db_column})) {
|
||||
$decrypted = Helper::gracefulDecrypt($field, $asset->{$field->db_column});
|
||||
$value = (Gate::allows('superadmin')) ? $decrypted : strtoupper(trans('admin/custom_fields/general.encrypted'));
|
||||
$value = (Gate::allows('assets.view.encrypted_custom_fields')) ? $decrypted : strtoupper(trans('admin/custom_fields/general.encrypted'));
|
||||
|
||||
if ($field->format == 'DATE'){
|
||||
if (Gate::allows('superadmin')){
|
||||
if (Gate::allows('assets.view.encrypted_custom_fields')){
|
||||
$value = Helper::getFormattedDateObject($value, 'date', false);
|
||||
} else {
|
||||
$value = strtoupper(trans('admin/custom_fields/general.encrypted'));
|
||||
|
|
|
@ -146,6 +146,11 @@ class AuthServiceProvider extends ServiceProvider
|
|||
}
|
||||
});
|
||||
|
||||
Gate::define('assets.view.encrypted_custom_fields', function ($user) {
|
||||
if($user->hasAccess('assets.view.encrypted_custom_fields')){
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
// -----------------------------------------
|
||||
// Reports
|
||||
|
|
|
@ -106,6 +106,13 @@ return [
|
|||
'display' => true,
|
||||
],
|
||||
|
||||
[
|
||||
'permission' => 'assets.view.encrypted_custom_fields',
|
||||
'label' => 'View and Modify Encrypted Custom Fields',
|
||||
'note' => '',
|
||||
'display' => true,
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
'Accessories' => [
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class ChangeWebhookSettingsVariableType extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
$table->text('webhook_endpoint')->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
$table->varchar('webhook_endpoint')->change();
|
||||
});
|
||||
|
||||
}
|
||||
}
|
164
package-lock.json
generated
164
package-lock.json
generated
|
@ -1431,9 +1431,9 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"tslib": {
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
|
||||
"integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg=="
|
||||
"version": "2.6.1",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz",
|
||||
"integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig=="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2215,6 +2215,15 @@
|
|||
"picomatch": "^2.0.4"
|
||||
}
|
||||
},
|
||||
"array-buffer-byte-length": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz",
|
||||
"integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==",
|
||||
"requires": {
|
||||
"call-bind": "^1.0.2",
|
||||
"is-array-buffer": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"array-filter": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz",
|
||||
|
@ -3154,9 +3163,9 @@
|
|||
"integrity": "sha1-EQPWvADPv6jPyaJZmrUYxVZD2j8="
|
||||
},
|
||||
"bootstrap-table": {
|
||||
"version": "1.22.0",
|
||||
"resolved": "https://registry.npmjs.org/bootstrap-table/-/bootstrap-table-1.22.0.tgz",
|
||||
"integrity": "sha512-N1MLgPcIOa9cfwr7CaoLOekKJ9nHq/z8lk6LsC3mLUZq77VeMC/vTh+EqN7+iT8JADmoAsX7RqQbYfVxF9ZCig=="
|
||||
"version": "1.22.1",
|
||||
"resolved": "https://registry.npmjs.org/bootstrap-table/-/bootstrap-table-1.22.1.tgz",
|
||||
"integrity": "sha512-Nw8p+BmaiMDSfoer/p49YeI3vJQAWhudxhyKMuqnJBb3NRvCRewMk7JDgiN9SQO3YeSejOirKtcdWpM0dtddWg=="
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
|
@ -3555,9 +3564,9 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"core-js": {
|
||||
"version": "3.29.1",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.29.1.tgz",
|
||||
"integrity": "sha512-+jwgnhg6cQxKYIIjGtAHq2nwUOolo9eoFZ4sHfUH09BLXBgxnH4gA0zEd+t+BO2cNB8idaBtZFcFTRjQJRJmAw==",
|
||||
"version": "3.32.0",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.32.0.tgz",
|
||||
"integrity": "sha512-rd4rYZNlF3WuoYuRIDEmbR/ga9CeuWX9U05umAvgrrZoHY4Z++cp/xwPQMvUpBB4Ag6J8KfD80G0zwCyaSxDww==",
|
||||
"optional": true
|
||||
},
|
||||
"regenerator-runtime": {
|
||||
|
@ -4350,15 +4359,16 @@
|
|||
}
|
||||
},
|
||||
"deep-equal": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.0.tgz",
|
||||
"integrity": "sha512-RdpzE0Hv4lhowpIUKKMJfeH6C1pXdtT1/it80ubgWqwI3qpuxUBpC1S4hnHg+zjnuOoDkzUtUCEEkG+XG5l3Mw==",
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.2.tgz",
|
||||
"integrity": "sha512-xjVyBf0w5vH0I42jdAZzOKVldmPgSulmiyPRywoyq7HXC9qdgo17kxJE+rdnif5Tz6+pIrpJI8dCpMNLIGkUiA==",
|
||||
"requires": {
|
||||
"array-buffer-byte-length": "^1.0.0",
|
||||
"call-bind": "^1.0.2",
|
||||
"es-get-iterator": "^1.1.2",
|
||||
"get-intrinsic": "^1.1.3",
|
||||
"es-get-iterator": "^1.1.3",
|
||||
"get-intrinsic": "^1.2.1",
|
||||
"is-arguments": "^1.1.1",
|
||||
"is-array-buffer": "^3.0.1",
|
||||
"is-array-buffer": "^3.0.2",
|
||||
"is-date-object": "^1.0.5",
|
||||
"is-regex": "^1.1.4",
|
||||
"is-shared-array-buffer": "^1.0.2",
|
||||
|
@ -4366,7 +4376,7 @@
|
|||
"object-is": "^1.1.5",
|
||||
"object-keys": "^1.1.1",
|
||||
"object.assign": "^4.1.4",
|
||||
"regexp.prototype.flags": "^1.4.3",
|
||||
"regexp.prototype.flags": "^1.5.0",
|
||||
"side-channel": "^1.0.4",
|
||||
"which-boxed-primitive": "^1.0.2",
|
||||
"which-collection": "^1.0.1",
|
||||
|
@ -4388,12 +4398,13 @@
|
|||
}
|
||||
},
|
||||
"get-intrinsic": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz",
|
||||
"integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==",
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz",
|
||||
"integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==",
|
||||
"requires": {
|
||||
"function-bind": "^1.1.1",
|
||||
"has": "^1.0.3",
|
||||
"has-proto": "^1.0.1",
|
||||
"has-symbols": "^1.0.3"
|
||||
}
|
||||
},
|
||||
|
@ -4428,18 +4439,6 @@
|
|||
"has-tostringtag": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"is-typed-array": {
|
||||
"version": "1.1.10",
|
||||
"resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz",
|
||||
"integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==",
|
||||
"requires": {
|
||||
"available-typed-arrays": "^1.0.5",
|
||||
"call-bind": "^1.0.2",
|
||||
"for-each": "^0.3.3",
|
||||
"gopd": "^1.0.1",
|
||||
"has-tostringtag": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"isarray": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
|
||||
|
@ -4457,16 +4456,15 @@
|
|||
}
|
||||
},
|
||||
"which-typed-array": {
|
||||
"version": "1.1.9",
|
||||
"resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz",
|
||||
"integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==",
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz",
|
||||
"integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==",
|
||||
"requires": {
|
||||
"available-typed-arrays": "^1.0.5",
|
||||
"call-bind": "^1.0.2",
|
||||
"for-each": "^0.3.3",
|
||||
"gopd": "^1.0.1",
|
||||
"has-tostringtag": "^1.0.0",
|
||||
"is-typed-array": "^1.1.10"
|
||||
"has-tostringtag": "^1.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4645,9 +4643,9 @@
|
|||
}
|
||||
},
|
||||
"dompurify": {
|
||||
"version": "2.4.5",
|
||||
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.4.5.tgz",
|
||||
"integrity": "sha512-jggCCd+8Iqp4Tsz0nIvpcb22InKEBrGz5dw3EQJMs8HPJDsKbFIO3STYtAvCfDx26Muevn1MHVI0XxjgFfmiSA==",
|
||||
"version": "2.4.7",
|
||||
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.4.7.tgz",
|
||||
"integrity": "sha512-kxxKlPEDa6Nc5WJi+qRgPbOAbgTpSULL+vI3NUXsZMlkJxTqYI9wg5ZTay2sFrdZRWHPWNi+EdAhcJf81WtoMQ==",
|
||||
"optional": true
|
||||
},
|
||||
"domutils": {
|
||||
|
@ -4830,12 +4828,13 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"get-intrinsic": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz",
|
||||
"integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==",
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz",
|
||||
"integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==",
|
||||
"requires": {
|
||||
"function-bind": "^1.1.1",
|
||||
"has": "^1.0.3",
|
||||
"has-proto": "^1.0.1",
|
||||
"has-symbols": "^1.0.3"
|
||||
}
|
||||
},
|
||||
|
@ -14868,12 +14867,13 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"get-intrinsic": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz",
|
||||
"integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==",
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz",
|
||||
"integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==",
|
||||
"requires": {
|
||||
"function-bind": "^1.1.1",
|
||||
"has": "^1.0.3",
|
||||
"has-proto": "^1.0.1",
|
||||
"has-symbols": "^1.0.3"
|
||||
}
|
||||
},
|
||||
|
@ -14955,6 +14955,11 @@
|
|||
"get-intrinsic": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"has-proto": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz",
|
||||
"integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg=="
|
||||
},
|
||||
"has-symbols": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
|
||||
|
@ -15472,12 +15477,13 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"get-intrinsic": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz",
|
||||
"integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==",
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz",
|
||||
"integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==",
|
||||
"requires": {
|
||||
"function-bind": "^1.1.1",
|
||||
"has": "^1.0.3",
|
||||
"has-proto": "^1.0.1",
|
||||
"has-symbols": "^1.0.3"
|
||||
}
|
||||
},
|
||||
|
@ -15543,12 +15549,13 @@
|
|||
"integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw=="
|
||||
},
|
||||
"get-intrinsic": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz",
|
||||
"integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==",
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz",
|
||||
"integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==",
|
||||
"requires": {
|
||||
"function-bind": "^1.1.1",
|
||||
"has": "^1.0.3",
|
||||
"has-proto": "^1.0.1",
|
||||
"has-symbols": "^1.0.3"
|
||||
}
|
||||
},
|
||||
|
@ -15558,9 +15565,17 @@
|
|||
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="
|
||||
},
|
||||
"is-typed-array": {
|
||||
"version": "1.1.10",
|
||||
"resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz",
|
||||
"integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==",
|
||||
"version": "1.1.12",
|
||||
"resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz",
|
||||
"integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==",
|
||||
"requires": {
|
||||
"which-typed-array": "^1.1.11"
|
||||
}
|
||||
},
|
||||
"which-typed-array": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz",
|
||||
"integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==",
|
||||
"requires": {
|
||||
"available-typed-arrays": "^1.0.5",
|
||||
"call-bind": "^1.0.2",
|
||||
|
@ -15939,9 +15954,9 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"core-js": {
|
||||
"version": "3.29.1",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.29.1.tgz",
|
||||
"integrity": "sha512-+jwgnhg6cQxKYIIjGtAHq2nwUOolo9eoFZ4sHfUH09BLXBgxnH4gA0zEd+t+BO2cNB8idaBtZFcFTRjQJRJmAw==",
|
||||
"version": "3.32.0",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.32.0.tgz",
|
||||
"integrity": "sha512-rd4rYZNlF3WuoYuRIDEmbR/ga9CeuWX9U05umAvgrrZoHY4Z++cp/xwPQMvUpBB4Ag6J8KfD80G0zwCyaSxDww==",
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
|
@ -18337,13 +18352,24 @@
|
|||
}
|
||||
},
|
||||
"regexp.prototype.flags": {
|
||||
"version": "1.4.3",
|
||||
"resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz",
|
||||
"integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==",
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz",
|
||||
"integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==",
|
||||
"requires": {
|
||||
"call-bind": "^1.0.2",
|
||||
"define-properties": "^1.1.3",
|
||||
"functions-have-names": "^1.2.2"
|
||||
"define-properties": "^1.2.0",
|
||||
"functions-have-names": "^1.2.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"define-properties": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz",
|
||||
"integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==",
|
||||
"requires": {
|
||||
"has-property-descriptors": "^1.0.0",
|
||||
"object-keys": "^1.1.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"regexpu-core": {
|
||||
|
@ -18909,9 +18935,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"stackblur-canvas": {
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/stackblur-canvas/-/stackblur-canvas-2.5.0.tgz",
|
||||
"integrity": "sha512-EeNzTVfj+1In7aSLPKDD03F/ly4RxEuF/EX0YcOG0cKoPXs+SLZxDawQbexQDBzwROs4VKLWTOaZQlZkGBFEIQ==",
|
||||
"version": "2.6.0",
|
||||
"resolved": "https://registry.npmjs.org/stackblur-canvas/-/stackblur-canvas-2.6.0.tgz",
|
||||
"integrity": "sha512-8S1aIA+UoF6erJYnglGPug6MaHYGo1Ot7h5fuXx4fUPvcvQfcdw2o/ppCse63+eZf8PPidSu4v1JnmEVtEDnpg==",
|
||||
"optional": true
|
||||
},
|
||||
"statuses": {
|
||||
|
@ -19204,11 +19230,11 @@
|
|||
}
|
||||
},
|
||||
"tableexport.jquery.plugin": {
|
||||
"version": "1.27.0",
|
||||
"resolved": "https://registry.npmjs.org/tableexport.jquery.plugin/-/tableexport.jquery.plugin-1.27.0.tgz",
|
||||
"integrity": "sha512-aJ6XBeqtPqV8P2v8vvKNa54SGp9R4V4CIwaIhA1WTkflvoYaWqCyTmf/O6WH5kKBvDpva+RhLnYwsPHEPwdSsg==",
|
||||
"version": "1.28.0",
|
||||
"resolved": "https://registry.npmjs.org/tableexport.jquery.plugin/-/tableexport.jquery.plugin-1.28.0.tgz",
|
||||
"integrity": "sha512-ydDjOhw8A+LOu+801zPXDeMF8MoU1q2HtS2msphCuny0tdXgbXG9GJfA4ll1hBs0ABiAnOaVVZaRuxBmW/qHtw==",
|
||||
"requires": {
|
||||
"file-saver": ">=2.0.1",
|
||||
"file-saver": ">=2.0.4",
|
||||
"html2canvas": ">=1.0.0",
|
||||
"jquery": ">=3.2.1",
|
||||
"jspdf": ">=2.0.0",
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
"bootstrap-colorpicker": "^2.5.3",
|
||||
"bootstrap-datepicker": "^1.10.0",
|
||||
"bootstrap-less": "^3.3.8",
|
||||
"bootstrap-table": "1.22.0",
|
||||
"bootstrap-table": "1.22.1",
|
||||
"chart.js": "^2.9.4",
|
||||
"css-loader": "^4.0.0",
|
||||
"ekko-lightbox": "^5.1.1",
|
||||
|
@ -51,7 +51,7 @@
|
|||
"papaparse": "^4.3.3",
|
||||
"select2": "4.0.13",
|
||||
"sheetjs": "^2.0.0",
|
||||
"tableexport.jquery.plugin": "1.27.0",
|
||||
"tableexport.jquery.plugin": "1.28.0",
|
||||
"tether": "^1.4.0",
|
||||
"vue-resource": "^1.5.2",
|
||||
"webpack": "^5.87.0"
|
||||
|
|
|
@ -12,6 +12,7 @@ return [
|
|||
'clone' => 'Clone Asset',
|
||||
'deployable' => 'Deployable',
|
||||
'deleted' => 'This asset has been deleted.',
|
||||
'delete_confirm' => 'Are you sure you want to delete this asset?',
|
||||
'edit' => 'Edit Asset',
|
||||
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.',
|
||||
'model_invalid' => 'The Model of this Asset is invalid.',
|
||||
|
|
|
@ -264,7 +264,7 @@ return [
|
|||
'accept_eula' => 'Acceptance Agreement',
|
||||
'supplier' => 'Supplier',
|
||||
'suppliers' => 'Suppliers',
|
||||
'sure_to_delete' => 'Are you sure you wish to delete',
|
||||
'sure_to_delete' => 'Are you sure you wish to delete',
|
||||
'submit' => 'Submit',
|
||||
'target' => 'Target',
|
||||
'time_and_date_display' => 'Time and Date Display',
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
</span>
|
||||
</td>
|
||||
@endcan
|
||||
<td class="index">{{$field->pivot->order}}</td>
|
||||
<td class="index">{{$field->pivot->order + 1}}</td>
|
||||
<td>{{$field->name}}</td>
|
||||
<td>{{$field->format}}</td>
|
||||
<td>{{$field->element}}</td>
|
||||
|
|
|
@ -6,67 +6,6 @@
|
|||
@parent
|
||||
@stop
|
||||
|
||||
{{-- Right header --}}
|
||||
@section('header_right')
|
||||
|
||||
|
||||
@can('manage', \App\Models\Asset::class)
|
||||
@if ($asset->deleted_at=='')
|
||||
<div class="dropdown pull-right">
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">{{ trans('button.actions') }}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" role="menu">
|
||||
|
||||
@if (($asset->assetstatus) && ($asset->assetstatus->deployable=='1'))
|
||||
@if (($asset->assigned_to != '') && ($asset->deleted_at==''))
|
||||
@can('checkin', \App\Models\Asset::class)
|
||||
<li role="menuitem">
|
||||
<a href="{{ route('hardware.checkin.create', $asset->id) }}">
|
||||
{{ trans('admin/hardware/general.checkin') }}
|
||||
</a>
|
||||
</li>
|
||||
@endcan
|
||||
@elseif (($asset->assigned_to == '') && ($asset->deleted_at==''))
|
||||
@can('checkout', \App\Models\Asset::class)
|
||||
<li role="menuitem">
|
||||
<a href="{{ route('hardware.checkout.create', $asset->id) }}">
|
||||
{{ trans('admin/hardware/general.checkout') }}
|
||||
</a>
|
||||
</li>
|
||||
@endcan
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@can('update', \App\Models\Asset::class)
|
||||
<li role="menuitem">
|
||||
<a href="{{ route('hardware.edit', $asset->id) }}">
|
||||
{{ trans('admin/hardware/general.edit') }}
|
||||
</a>
|
||||
</li>
|
||||
@endcan
|
||||
|
||||
@can('create', \App\Models\Asset::class)
|
||||
<li role="menuitem">
|
||||
<a href="{{ route('clone/hardware', $asset->id) }}">
|
||||
{{ trans('admin/hardware/general.clone') }}
|
||||
</a>
|
||||
</li>
|
||||
@endcan
|
||||
|
||||
@can('audit', \App\Models\Asset::class)
|
||||
<li role="menuitem">
|
||||
<a href="{{ route('asset.audit.create', $asset->id) }}">
|
||||
{{ trans('general.audit') }}
|
||||
</a>
|
||||
</li>
|
||||
@endcan
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
@endcan
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
@ -471,7 +410,7 @@
|
|||
@endif
|
||||
|
||||
@if ($field->isFieldDecryptable($asset->{$field->db_column_name()} ))
|
||||
@can('superuser')
|
||||
@can('assets.view.encrypted_custom_fields')
|
||||
@if (($field->format=='URL') && ($asset->{$field->db_column_name()}!=''))
|
||||
<a href="{{ Helper::gracefulDecrypt($field, $asset->{$field->db_column_name()}) }}" target="_new">{{ Helper::gracefulDecrypt($field, $asset->{$field->db_column_name()}) }}</a>
|
||||
@elseif (($field->format=='DATE') && ($asset->{$field->db_column_name()}!=''))
|
||||
|
@ -884,17 +823,73 @@
|
|||
<div class="col-md-4">
|
||||
|
||||
@if (($asset->image) || (($asset->model) && ($asset->model->image!='')))
|
||||
|
||||
|
||||
<div class="text-center col-md-12" style="padding-bottom: 15px;">
|
||||
<a href="{{ ($asset->getImageUrl()) ? $asset->getImageUrl() : null }}" data-toggle="lightbox">
|
||||
<img src="{{ ($asset->getImageUrl()) ? $asset->getImageUrl() : null }}" class="assetimg img-responsive" alt="{{ $asset->getDisplayNameAttribute() }}">
|
||||
</a>
|
||||
</div>
|
||||
@else
|
||||
<!-- generic image goes here -->
|
||||
@endif
|
||||
|
||||
<!-- Start side button column -->
|
||||
|
||||
@if (($asset->assetstatus) && ($asset->assetstatus->deployable=='1'))
|
||||
@if (($asset->assigned_to != '') && ($asset->deleted_at==''))
|
||||
@can('checkin', \App\Models\Asset::class)
|
||||
<div class="col-md-12">
|
||||
<a href="{{ route('hardware.checkin.create', $asset->id) }}" style="width: 100%;" class="btn btn-sm btn-primary hidden-print">
|
||||
{{ trans('admin/hardware/general.checkin') }}
|
||||
</a>
|
||||
</div>
|
||||
@endcan
|
||||
@elseif (($asset->assigned_to == '') && ($asset->deleted_at==''))
|
||||
@can('checkout', \App\Models\Asset::class)
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
<a href="{{ route('hardware.checkout.create', $asset->id) }}" style="width: 100%;" class="btn btn-sm btn-primary hidden-print">
|
||||
{{ trans('admin/hardware/general.checkout') }}
|
||||
</a>
|
||||
</div>
|
||||
@endcan
|
||||
@endif
|
||||
@endif
|
||||
|
||||
|
||||
@can('update', $asset)
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
<a href="{{ route('hardware.edit', $asset->id) }}" style="width: 100%;" class="btn btn-sm btn-primary hidden-print">
|
||||
{{ trans('admin/hardware/general.edit') }}
|
||||
</a>
|
||||
</div>
|
||||
@endcan
|
||||
|
||||
@can('create', $asset)
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
<a href="{{ route('clone/hardware', $asset->id) }}" style="width: 100%;" class="btn btn-sm btn-primary hidden-print">
|
||||
{{ trans('admin/hardware/general.clone') }}
|
||||
</a>
|
||||
</div>
|
||||
@endcan
|
||||
|
||||
@can('audit', \App\Models\Asset::class)
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
<a href="{{ route('asset.audit.create', $asset->id) }}" style="width: 100%;" class="btn btn-sm btn-primary hidden-print">
|
||||
{{ trans('general.audit') }}
|
||||
</a>
|
||||
</div>
|
||||
@endcan
|
||||
|
||||
@can('delete', $asset)
|
||||
@if ($asset->deleted_at=='')
|
||||
<div class="col-md-12" style="padding-top: 30px; padding-bottom: 30px;">
|
||||
<button class="btn btn-block btn-danger delete-asset" data-toggle="modal" data-title="{{ trans('general.delete') }}" data-content="{{ trans('general.sure_to_delete', ['item' => $asset->asset_tag]) }}" data-target="#dataConfirmModal">{{ trans('general.delete') }} </button>
|
||||
<span class="sr-only">{{ trans('general.delete') }}</span>
|
||||
</div>
|
||||
@endif
|
||||
@endcan
|
||||
|
||||
@if ($asset->deleted_at!='')
|
||||
<div class="text-center col-md-12" style="padding-bottom: 15px;">
|
||||
<div class="text-center col-md-12" style="padding-top: 30px; padding-bottom: 30px;">
|
||||
<form method="POST" action="{{ route('restore/hardware', ['assetId' => $asset->id]) }}">
|
||||
@csrf
|
||||
<button class="btn btn-danger col-md-12">{{ trans('general.restore') }}</button>
|
||||
|
@ -907,11 +902,13 @@
|
|||
@endif
|
||||
|
||||
@if (($asset->assignedTo) && ($asset->deleted_at==''))
|
||||
<h2>{{ trans('admin/hardware/form.checkedout_to') }}</h2>
|
||||
<div style="text-align: left">
|
||||
<h2>{{ trans('admin/hardware/form.checkedout_to') }}</h2>
|
||||
<p>
|
||||
@if($asset->checkedOutToUser()) <!-- Only users have avatars currently-->
|
||||
<img src="{{ $asset->assignedTo->present()->gravatar() }}" class="user-image-inline" alt="{{ $asset->assignedTo->present()->fullName() }}">
|
||||
@endif
|
||||
</p>
|
||||
{!! $asset->assignedTo->present()->glyph() . ' ' .$asset->assignedTo->present()->nameUrl() !!}
|
||||
</p>
|
||||
|
||||
|
@ -958,6 +955,7 @@
|
|||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
</div> <!-- div.col-md-4 -->
|
||||
|
@ -1408,6 +1406,16 @@
|
|||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
<script>
|
||||
|
||||
$('#dataConfirmModal').on('show.bs.modal', function (event) {
|
||||
var content = $(event.relatedTarget).data('content');
|
||||
var title = $(event.relatedTarget).data('title');
|
||||
$(this).find(".modal-body").text(content);
|
||||
$(this).find(".modal-header").text(title);
|
||||
});
|
||||
|
||||
</script>
|
||||
@include ('partials.bootstrap-table')
|
||||
|
||||
@stop
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
|
||||
@else
|
||||
@if (($field->field_encrypted=='0') || (Gate::allows('admin')))
|
||||
@if (($field->field_encrypted=='0') || (Gate::allows('assets.view.encrypted_custom_fields')))
|
||||
<input type="text" value="{{ Request::old($field->db_column_name(),(isset($item) ? Helper::gracefulDecrypt($field, $item->{$field->db_column_name()}) : $field->defaultValue($model->id))) }}" id="{{ $field->db_column_name() }}" class="form-control" name="{{ $field->db_column_name() }}" placeholder="Enter {{ strtolower($field->format) }} text">
|
||||
@else
|
||||
<input type="text" value="{{ strtoupper(trans('admin/custom_fields/general.encrypted')) }}" class="form-control disabled" disabled>
|
||||
|
|
Loading…
Reference in a new issue