mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Squashed commit of the following:
commitd55c176199
Merge:93ff9524d
c0451fe17
Author: snipe <snipe@snipe.net> Date: Wed Mar 16 18:35:42 2022 +0000 Merge pull request #10831 from snipe/merges/master_down_to_develop_march_16 v6.0.0-RC-5 - Merges master down to develop commitc0451fe17a
Author: snipe <snipe@snipe.net> Date: Wed Mar 16 18:10:17 2022 +0000 Bumped version to v6.0.0-RC-5 Signed-off-by: snipe <snipe@snipe.net> commit0f95802699
Author: snipe <snipe@snipe.net> Date: Wed Mar 16 18:05:47 2022 +0000 Fixed mis-automerge Signed-off-by: snipe <snipe@snipe.net> commit9db8bd782d
Author: snipe <snipe@snipe.net> Date: Wed Mar 16 18:02:07 2022 +0000 Merging master down into develop Signed-off-by: snipe <snipe@snipe.net> commit93ff9524d6
Merge:40a947077
89ddbddad
Author: snipe <snipe@snipe.net> Date: Wed Mar 16 10:04:58 2022 -0700 Merge pull request #10829 from snipe/features/add_statuslabel_filter_by_type_in_api Added filter by status_type in StatusLabels API index endpoint commit89ddbddada
Author: snipe <snipe@snipe.net> Date: Wed Mar 16 16:53:18 2022 +0000 Fixed comment Signed-off-by: snipe <snipe@snipe.net> commit7498fe36e9
Author: snipe <snipe@snipe.net> Date: Wed Mar 16 16:45:03 2022 +0000 Removed extra space because pedantry Signed-off-by: snipe <snipe@snipe.net> commitbabf7c064b
Author: snipe <snipe@snipe.net> Date: Wed Mar 16 16:38:45 2022 +0000 Added ability to filter status label index endpoint by status type Signed-off-by: snipe <snipe@snipe.net> commit40a9470770
Merge:f499dcf7c
781b42601
Author: snipe <snipe@snipe.net> Date: Wed Mar 16 08:54:10 2022 -0700 Merge pull request #10828 from snipe/fixes/10826_parse_error_on_print_all Fixed #10826 - parse error on translation string for print all assets commit781b426018
Author: snipe <snipe@snipe.net> Date: Wed Mar 16 08:50:47 2022 -0700 Fixed #10826 - parse error on translation string for print all assets Signed-off-by: snipe <snipe@snipe.net> commitf499dcf7c3
Merge:84aa26dd5
54d6a4d97
Author: snipe <snipe@snipe.net> Date: Wed Mar 16 08:25:29 2022 -0700 Merge pull request #10827 from snipe/fixes/modal_dropdowns_broken Fixed #10825 - selectlists in modals b0rked commit54d6a4d978
Author: snipe <snipe@snipe.net> Date: Wed Mar 16 08:23:50 2022 -0700 Fixed #10825 - selectlists in modals b0rked Signed-off-by: snipe <snipe@snipe.net> commit84aa26dd50
Merge:8984b3a59
14bd07e97
Author: snipe <snipe@snipe.net> Date: Thu Mar 10 13:02:45 2022 -0800 Merge pull request #10728 from Godmartinz/gh10191-css-dropdownmenu Fixed #10191 - font color contrast on mobile menu commit8984b3a59d
Merge:d06ef4bde
cdc0805fc
Author: snipe <snipe@snipe.net> Date: Thu Mar 10 10:40:33 2022 -0800 Merge pull request #10812 from inietov/fixes/CarbonExceptions_InvalidFormatException_DateTime_develop Fixes Carbon\Exceptions\InvalidFormatException: DateTime::__construct(): Failed to parse time string develop commitcdc0805fc4
Author: Ivan Nieto Vivanco <inietov@gmail.com> Date: Thu Mar 10 12:07:07 2022 -0600 Sanitize dates input in the importer before saving commit14bd07e97d
Merge:4435ea95f
16fd10954
Author: Godfrey M <godmartinz@gmail.com> Date: Thu Mar 3 10:14:30 2022 -0800 gerge branchevelop' into gh10191-css-dropdownmenu commit4435ea95fd
Author: Godfrey M <godmartinz@gmail.com> Date: Thu Mar 3 09:47:11 2022 -0800 removes changes to mix-manifest commitf115385243
Author: Godfrey M <godmartinz@gmail.com> Date: Thu Mar 3 09:32:05 2022 -0800 C&P mix-manifest to be tracked commit708dc08b4f
Author: Godfrey M <godmartinz@gmail.com> Date: Wed Feb 23 11:17:44 2022 -0800 mixes color contrast on dropdown menu from navbar on file Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
9ae2d17579
commit
73acf6e5e8
59
app/Console/Commands/KillAllSessions.php
Normal file
59
app/Console/Commands/KillAllSessions.php
Normal file
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class KillAllSessions extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'snipeit:global-logout {--force : Skip the danger prompt; assuming you enter "y"} ';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'This command will destroy all web sessions on disk and will force a re-login for all users.';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
|
||||
if (!$this->option('force') && !$this->confirm("****************************************************\nTHIS WILL FORCE A LOGIN FOR ALL LOGGED IN USERS.\n\nAre you SURE you wish to continue? ")) {
|
||||
return $this->error("Session loss not confirmed");
|
||||
}
|
||||
|
||||
$session_files = glob(storage_path("framework/sessions/*"));
|
||||
|
||||
$count = 0;
|
||||
foreach ($session_files as $file) {
|
||||
|
||||
if (is_file($file))
|
||||
unlink($file);
|
||||
$count++;
|
||||
}
|
||||
\DB::table('users')->update(['remember_token' => null]);
|
||||
|
||||
$this->info($count. ' sessions cleared!');
|
||||
|
||||
}
|
||||
}
|
|
@ -82,6 +82,7 @@ class RestoreFromBackup extends Command
|
|||
return $this->error('Could not access file: '.$filename.' - '.array_key_exists($errcode, $errors) ? $errors[$errcode] : " Unknown reason: $errcode");
|
||||
}
|
||||
|
||||
|
||||
$private_dirs = [
|
||||
'storage/private_uploads/assets', // these are asset _files_, not the pictures.
|
||||
'storage/private_uploads/audits',
|
||||
|
@ -245,19 +246,21 @@ class RestoreFromBackup extends Command
|
|||
return false;
|
||||
}
|
||||
$bytes_read = 0;
|
||||
|
||||
while (($buffer = fgets($sql_contents, self::$buffer_size)) !== false) {
|
||||
$bytes_read += strlen($buffer);
|
||||
// \Log::debug("Buffer is: '$buffer'");
|
||||
$bytes_written = fwrite($pipes[0], $buffer);
|
||||
|
||||
if ($bytes_written === false) {
|
||||
$stdout = fgets($pipes[1]);
|
||||
$this->info($stdout);
|
||||
$stderr = fgets($pipes[2]);
|
||||
$this->info($stderr);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!feof($sql_contents) || $bytes_read == 0) {
|
||||
return $this->error("Not at end of file for sql file, or zero bytes read. aborting!");
|
||||
}
|
||||
|
|
|
@ -30,6 +30,20 @@ class StatuslabelsController extends Controller
|
|||
$statuslabels = $statuslabels->TextSearch($request->input('search'));
|
||||
}
|
||||
|
||||
|
||||
// if a status_type is passed, filter by that
|
||||
if ($request->filled('status_type')) {
|
||||
if (strtolower($request->input('status_type'))== 'pending') {
|
||||
$statuslabels = $statuslabels->Pending();
|
||||
} elseif (strtolower($request->input('status_type'))== 'archived') {
|
||||
$statuslabels = $statuslabels->Archived();
|
||||
} elseif (strtolower($request->input('status_type'))== 'deployable') {
|
||||
$statuslabels = $statuslabels->Deployable();
|
||||
} elseif (strtolower($request->input('status_type'))== 'undeployable') {
|
||||
$statuslabels = $statuslabels->Undeployable();
|
||||
}
|
||||
}
|
||||
|
||||
// Set the offset to the API call's offset, unless the offset is higher than the actual count of items in which
|
||||
// case we override with the actual count, so we should return 0 items.
|
||||
$offset = (($statuslabels) && ($request->get('offset') > $statuslabels->count())) ? $statuslabels->count() : $request->get('offset', 0);
|
||||
|
|
|
@ -235,6 +235,7 @@ class AssetsController extends Controller
|
|||
->with('statuslabel_types', Helper::statusTypeList());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a view that presents information about an asset for detail view.
|
||||
*
|
||||
|
@ -309,6 +310,7 @@ class AssetsController extends Controller
|
|||
$asset->location_id = $request->input('rtd_location_id', null);
|
||||
}
|
||||
|
||||
|
||||
if ($request->filled('image_delete')) {
|
||||
try {
|
||||
unlink(public_path().'/uploads/assets/'.$asset->image);
|
||||
|
@ -401,6 +403,24 @@ class AssetsController extends Controller
|
|||
return redirect()->route('hardware.index')->with('success', trans('admin/hardware/message.delete.success'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Searches the assets table by serial, and redirects if it finds one
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v3.0]
|
||||
* @return Redirect
|
||||
*/
|
||||
public function getAssetBySerial(Request $request)
|
||||
{
|
||||
$topsearch = ($request->get('topsearch')=="true");
|
||||
|
||||
if (!$asset = Asset::where('serial', '=', $request->get('serial'))->first()) {
|
||||
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.does_not_exist'));
|
||||
}
|
||||
$this->authorize('view', $asset);
|
||||
return redirect()->route('hardware.show', $asset->id)->with('topsearch', $topsearch);
|
||||
}
|
||||
|
||||
/**
|
||||
* Searches the assets table by asset tag, and redirects if it finds one
|
||||
*
|
||||
|
@ -420,6 +440,7 @@ class AssetsController extends Controller
|
|||
return redirect()->route('hardware.show', $asset->id)->with('topsearch', $topsearch);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return a QR code for the asset
|
||||
*
|
||||
|
@ -792,6 +813,7 @@ class AssetsController extends Controller
|
|||
return view('hardware/audit-overdue');
|
||||
}
|
||||
|
||||
|
||||
public function auditStore(Request $request, $id)
|
||||
{
|
||||
$this->authorize('audit', Asset::class);
|
||||
|
@ -822,6 +844,7 @@ class AssetsController extends Controller
|
|||
$asset->location_id = $request->input('location_id');
|
||||
}
|
||||
|
||||
|
||||
if ($asset->save()) {
|
||||
$file_name = '';
|
||||
// Upload an image, if attached
|
||||
|
|
|
@ -4,6 +4,7 @@ namespace App\Http\Transformers;
|
|||
|
||||
use App\Helpers\Helper;
|
||||
use App\Models\Asset;
|
||||
use App\Models\Setting;
|
||||
use Gate;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
|
||||
|
@ -21,6 +22,9 @@ class AssetsTransformer
|
|||
|
||||
public function transformAsset(Asset $asset)
|
||||
{
|
||||
// This uses the getSettings() method so we're pulling from the cache versus querying the settings on single asset
|
||||
$setting = Setting::getSettings();
|
||||
|
||||
$array = [
|
||||
'id' => (int) $asset->id,
|
||||
'name' => e($asset->name),
|
||||
|
@ -65,6 +69,8 @@ class AssetsTransformer
|
|||
'name'=> e($asset->defaultLoc->name),
|
||||
] : null,
|
||||
'image' => ($asset->getImageUrl()) ? $asset->getImageUrl() : null,
|
||||
'qr' => ($setting->qr_code=='1') ? config('app.url').'/uploads/barcodes/qr-'.str_slug($asset->asset_tag).'-'.str_slug($asset->id).'.png' : null,
|
||||
'alt_barcode' => ($setting->alt_barcode_enabled=='1') ? config('app.url').'/uploads/barcodes/'.str_slug($setting->alt_barcode).'-'.str_slug($asset->asset_tag).'.png' : null,
|
||||
'assigned_to' => $this->transformAssignedTo($asset),
|
||||
'warranty_months' => ($asset->warranty_months > 0) ? e($asset->warranty_months.' '.trans('admin/hardware/form.months')) : null,
|
||||
'warranty_expires' => ($asset->warranty_months > 0) ? Helper::getFormattedDateObject($asset->warranty_expires, 'date') : null,
|
||||
|
|
|
@ -97,10 +97,12 @@ class AssetImporter extends ItemImporter
|
|||
$item['rtd_location_id'] = $this->item['location_id'];
|
||||
}
|
||||
|
||||
$item['last_audit_date'] = null;
|
||||
if (isset($this->item['last_audit_date'])) {
|
||||
$item['last_audit_date'] = $this->item['last_audit_date'];
|
||||
}
|
||||
|
||||
$item['next_audit_date'] = null;
|
||||
if (isset($this->item['next_audit_date'])) {
|
||||
$item['next_audit_date'] = $this->item['next_audit_date'];
|
||||
}
|
||||
|
|
|
@ -47,14 +47,22 @@ class LicenseImporter extends ItemImporter
|
|||
$license = new License;
|
||||
}
|
||||
$asset_tag = $this->item['asset_tag'] = $this->findCsvMatch($row, 'asset_tag'); // used for checkout out to an asset.
|
||||
$this->item['expiration_date'] = $this->findCsvMatch($row, 'expiration_date');
|
||||
|
||||
$this->item["expiration_date"] = null;
|
||||
if ($this->findCsvMatch($row, "expiration_date")!='') {
|
||||
$this->item["expiration_date"] = date("Y-m-d 00:00:01", strtotime($this->findCsvMatch($row, "expiration_date")));
|
||||
}
|
||||
$this->item['license_email'] = $this->findCsvMatch($row, 'license_email');
|
||||
$this->item['license_name'] = $this->findCsvMatch($row, 'license_name');
|
||||
$this->item['maintained'] = $this->findCsvMatch($row, 'maintained');
|
||||
$this->item['purchase_order'] = $this->findCsvMatch($row, 'purchase_order');
|
||||
$this->item['reassignable'] = $this->findCsvMatch($row, 'reassignable');
|
||||
$this->item['seats'] = $this->findCsvMatch($row, 'seats');
|
||||
$this->item['termination_date'] = $this->findCsvMatch($row, 'termination_date');
|
||||
|
||||
$this->item["termination_date"] = null;
|
||||
if ($this->findCsvMatch($row, "termination_date")!='') {
|
||||
$this->item["termination_date"] = date("Y-m-d 00:00:01", strtotime($this->findCsvMatch($row, "termination_date")));
|
||||
}
|
||||
|
||||
if ($editingLicense) {
|
||||
$license->update($this->sanitizeItemForUpdating($license));
|
||||
|
|
|
@ -120,6 +120,18 @@ class Statuslabel extends SnipeModel
|
|||
->where('deployable', '=', 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query builder scope for undeployable status types
|
||||
*
|
||||
* @return \Illuminate\Database\Query\Builder Modified query builder
|
||||
*/
|
||||
public function scopeUndeployable()
|
||||
{
|
||||
return $this->where('pending', '=', 0)
|
||||
->where('archived', '=', 0)
|
||||
->where('deployable', '=', 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to determine type attributes
|
||||
*
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
return array (
|
||||
'app_version' => 'v6.0.0-RC-4',
|
||||
'full_app_version' => 'v6.0.0-RC-4 - build 6754-gafd83311a',
|
||||
'build_version' => '6754',
|
||||
'app_version' => 'v6.0.0-RC-5',
|
||||
'full_app_version' => 'v6.0.0-RC-5 - build 6772-g7cbcd2d95',
|
||||
'build_version' => '6772',
|
||||
'prerelease_version' => '',
|
||||
'hash_version' => 'gafd83311a',
|
||||
'full_hash' => 'v6.0.0-RC-4-1-gafd83311a',
|
||||
'branch' => 'develop',
|
||||
'hash_version' => 'g7cbcd2d95',
|
||||
'full_hash' => 'v6.0.0-RC-5-19-g7cbcd2d95',
|
||||
'branch' => 'merges/master_down_to_develop_march_16',
|
||||
);
|
|
@ -13,20 +13,22 @@ class CreateCheckoutAcceptancesTable extends Migration
|
|||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('checkout_acceptances', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
if (!Schema::hasTable('checkout_acceptances')) {
|
||||
Schema::create('checkout_acceptances', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
|
||||
$table->morphs('checkoutable');
|
||||
$table->integer('assigned_to_id')->nullable();
|
||||
$table->morphs('checkoutable');
|
||||
$table->integer('assigned_to_id')->nullable();
|
||||
|
||||
$table->string('signature_filename')->nullable();
|
||||
$table->string('signature_filename')->nullable();
|
||||
|
||||
$table->timestamp('accepted_at')->nullable();
|
||||
$table->timestamp('declined_at')->nullable();
|
||||
$table->timestamp('accepted_at')->nullable();
|
||||
$table->timestamp('declined_at')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -36,6 +38,8 @@ class CreateCheckoutAcceptancesTable extends Migration
|
|||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('checkout_acceptances');
|
||||
if (Schema::hasTable('checkout_acceptances')) {
|
||||
Schema::dropIfExists('checkout_acceptances');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
|
||||
class AddKitsLicensesTable extends Migration
|
||||
{
|
||||
|
@ -12,15 +14,16 @@ class AddKitsLicensesTable extends Migration
|
|||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
Schema::create('kits_licenses', function ($table) {
|
||||
$table->increments('id');
|
||||
$table->integer('kit_id')->nullable()->default(null);
|
||||
$table->integer('license_id')->nullable()->default(null);
|
||||
$table->integer('quantity')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
if (!Schema::hasTable('kits_licenses')) {
|
||||
Schema::create('kits_licenses', function ($table) {
|
||||
$table->increments('id');
|
||||
$table->integer('kit_id')->nullable()->default(null);
|
||||
$table->integer('license_id')->nullable()->default(null);
|
||||
$table->integer('quantity')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
|
@ -29,7 +32,9 @@ class AddKitsLicensesTable extends Migration
|
|||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
Schema::drop('kits_licenses');
|
||||
}
|
||||
if (Schema::hasTable('kits_licenses')) {
|
||||
Schema::drop('kits_licenses');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddKitsTable extends Migration
|
||||
{
|
||||
|
@ -12,14 +13,16 @@ class AddKitsTable extends Migration
|
|||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
Schema::create('kits', function ($table) {
|
||||
$table->increments('id');
|
||||
$table->string('name')->nullable()->default(null);
|
||||
$table->timestamps();
|
||||
$table->engine = 'InnoDB';
|
||||
});
|
||||
}
|
||||
if (!Schema::hasTable('kits')) {
|
||||
Schema::create('kits', function ($table) {
|
||||
$table->increments('id');
|
||||
$table->string('name')->nullable()->default(null);
|
||||
$table->timestamps();
|
||||
$table->engine = 'InnoDB';
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
|
@ -28,7 +31,9 @@ class AddKitsTable extends Migration
|
|||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
Schema::drop('kits');
|
||||
}
|
||||
if (Schema::hasTable('kits')) {
|
||||
Schema::drop('kits');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
|
||||
class AddKitsModelsTable extends Migration
|
||||
{
|
||||
|
@ -12,15 +14,16 @@ class AddKitsModelsTable extends Migration
|
|||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
Schema::create('kits_models', function ($table) {
|
||||
$table->increments('id');
|
||||
$table->integer('kit_id')->nullable()->default(null);
|
||||
$table->integer('model_id')->nullable()->default(null);
|
||||
$table->integer('quantity')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
if (!Schema::hasTable('kits_models')) {
|
||||
Schema::create('kits_models', function ($table) {
|
||||
$table->increments('id');
|
||||
$table->integer('kit_id')->nullable()->default(null);
|
||||
$table->integer('model_id')->nullable()->default(null);
|
||||
$table->integer('quantity')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
|
@ -29,7 +32,8 @@ class AddKitsModelsTable extends Migration
|
|||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
Schema::drop('kits_models');
|
||||
if (Schema::hasTable('kits_models')) {
|
||||
Schema::drop('kits_models');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddKitsConsumablesTable extends Migration
|
||||
{
|
||||
|
@ -13,14 +13,15 @@ class AddKitsConsumablesTable extends Migration
|
|||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
Schema::create('kits_consumables', function ($table) {
|
||||
$table->increments('id');
|
||||
$table->integer('kit_id')->nullable()->default(null);
|
||||
$table->integer('consumable_id')->nullable()->default(null);
|
||||
$table->integer('quantity')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
if (!Schema::hasTable('kits_consumables')) {
|
||||
Schema::create('kits_consumables', function ($table) {
|
||||
$table->increments('id');
|
||||
$table->integer('kit_id')->nullable()->default(null);
|
||||
$table->integer('consumable_id')->nullable()->default(null);
|
||||
$table->integer('quantity')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -30,7 +31,8 @@ class AddKitsConsumablesTable extends Migration
|
|||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
Schema::drop('kits_consumables');
|
||||
if (Schema::hasTable('kits_consumables')) {
|
||||
Schema::drop('kits_consumables');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddKitsAccessoriesTable extends Migration
|
||||
{
|
||||
|
@ -13,14 +13,15 @@ class AddKitsAccessoriesTable extends Migration
|
|||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
Schema::create('kits_accessories', function ($table) {
|
||||
$table->increments('id');
|
||||
$table->integer('kit_id')->nullable()->default(null);
|
||||
$table->integer('accessory_id')->nullable()->default(null);
|
||||
$table->integer('quantity')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
if (!Schema::hasTable('kits_accessories')) {
|
||||
Schema::create('kits_accessories', function ($table) {
|
||||
$table->increments('id');
|
||||
$table->integer('kit_id')->nullable()->default(null);
|
||||
$table->integer('accessory_id')->nullable()->default(null);
|
||||
$table->integer('quantity')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -30,7 +31,8 @@ class AddKitsAccessoriesTable extends Migration
|
|||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
Schema::drop('kits_accessories');
|
||||
if (Schema::hasTable('kits_accessories')) {
|
||||
Schema::drop('kits_accessories');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -15662,7 +15662,7 @@
|
|||
"jquery": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz",
|
||||
"integrity": "sha1-xyoJ8Vwb3OFC9J2/EXC9+K2sJHA="
|
||||
"integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw=="
|
||||
},
|
||||
"jquery-form-validator": {
|
||||
"version": "2.3.79",
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
$(function () {
|
||||
|
||||
|
||||
var baseUrl = $('meta[name="baseUrl"]').attr('content');
|
||||
//handle modal-add-interstitial calls
|
||||
var model, select, refreshSelector;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
color: #fff;
|
||||
}
|
||||
a {
|
||||
color: #fff;
|
||||
color: #333;
|
||||
&:hover {
|
||||
background: darken(@black, 5%);
|
||||
color: #fff;
|
||||
|
@ -36,6 +36,11 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
@media (max-width: 991px) {
|
||||
.navbar-custom-menu > .navbar-nav > li > .dropdown-menu {
|
||||
background-color: var(--back-sub);
|
||||
}
|
||||
}
|
||||
//Logo
|
||||
|
||||
li.user-header {
|
||||
|
@ -245,10 +250,6 @@ body {
|
|||
#details>div>div>div>table {
|
||||
background-color: transparent;
|
||||
}
|
||||
.dropdown-menu, .dropdown-menu>li>a {
|
||||
background-color: var(--back-sub);
|
||||
color: var(--text-main) !important;
|
||||
}
|
||||
.dropdown-menu>li>a:hover {
|
||||
background-color: var(--back-main);
|
||||
color: var(--nav-link);
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
a {
|
||||
color: #fff;
|
||||
color: #333;
|
||||
&:hover {
|
||||
background: darken(@black, 5%);
|
||||
}
|
||||
|
|
|
@ -232,10 +232,6 @@ body {
|
|||
#details>div>div>div>table {
|
||||
background-color: transparent;
|
||||
}
|
||||
.dropdown-menu, .dropdown-menu>li>a {
|
||||
background-color: var(--back-sub);
|
||||
color: var(--text-main) !important;
|
||||
}
|
||||
.dropdown-menu>li>a:hover {
|
||||
background-color: var(--back-main);
|
||||
color: var(--nav-link);
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
a {
|
||||
color: #fff;
|
||||
color: #333;
|
||||
&:hover {
|
||||
background: darken(@light-blue, 5%);
|
||||
}
|
||||
|
|
|
@ -232,10 +232,6 @@ body {
|
|||
#details>div>div>div>table {
|
||||
background-color: transparent;
|
||||
}
|
||||
.dropdown-menu, .dropdown-menu>li>a {
|
||||
background-color: var(--back-sub);
|
||||
color: var(--text-main) !important;
|
||||
}
|
||||
.dropdown-menu>li>a:hover {
|
||||
background-color: var(--back-main);
|
||||
color: var(--nav-link);
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
a {
|
||||
color: #fff;
|
||||
color: #333;
|
||||
&:hover {
|
||||
background: darken(@green, 5%);
|
||||
}
|
||||
|
|
|
@ -234,10 +234,6 @@ a:link.btn-default{
|
|||
#details>div>div>div>table {
|
||||
background-color: transparent;
|
||||
}
|
||||
.dropdown-menu, .dropdown-menu>li>a {
|
||||
background-color: var(--back-sub);
|
||||
color: var(--text-main) !important;
|
||||
}
|
||||
.dropdown-menu>li>a:hover {
|
||||
background-color: var(--back-main);
|
||||
color: var(--nav-link);
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
a {
|
||||
color: #fff;
|
||||
color: #333;
|
||||
&:hover {
|
||||
background: darken(@orange, 5%);
|
||||
}
|
||||
|
|
|
@ -234,10 +234,6 @@ body {
|
|||
#details>div>div>div>table {
|
||||
background-color: transparent;
|
||||
}
|
||||
.dropdown-menu, .dropdown-menu>li>a {
|
||||
background-color: var(--back-sub);
|
||||
color: var(--text-main) !important;
|
||||
}
|
||||
.dropdown-menu>li>a:hover {
|
||||
background-color: var(--back-main);
|
||||
color: var(--nav-link);
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
a {
|
||||
color: #fff;
|
||||
color: #333;
|
||||
&:hover {
|
||||
background: darken(@purple, 5%);
|
||||
}
|
||||
|
|
|
@ -233,10 +233,6 @@ body {
|
|||
#details>div>div>div>table {
|
||||
background-color: transparent;
|
||||
}
|
||||
.dropdown-menu, .dropdown-menu>li>a {
|
||||
background-color: var(--back-sub);
|
||||
color: var(--text-main) !important;
|
||||
}
|
||||
.dropdown-menu>li>a:hover {
|
||||
background-color: var(--back-main);
|
||||
color: var(--nav-link);
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
a {
|
||||
color: #fff;
|
||||
color: #333;
|
||||
&:hover {
|
||||
background: darken(@red, 5%);
|
||||
}
|
||||
|
|
|
@ -234,10 +234,6 @@ body {
|
|||
#details>div>div>div>table {
|
||||
background-color: transparent;
|
||||
}
|
||||
.dropdown-menu, .dropdown-menu>li>a {
|
||||
background-color: var(--back-sub);
|
||||
color: var(--text-main) !important;
|
||||
}
|
||||
.dropdown-menu>li>a:hover {
|
||||
background-color: var(--back-main);
|
||||
color: var(--nav-link);
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
a {
|
||||
color: #fff;
|
||||
color: #333;
|
||||
&:hover {
|
||||
background: darken(@yellow, 5%);
|
||||
}
|
||||
|
|
|
@ -459,6 +459,7 @@
|
|||
@else
|
||||
{!! nl2br(e($asset->{$field->db_column_name()})) !!}
|
||||
@endif
|
||||
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
paginationLastText: "{{ trans('general.last') }}",
|
||||
paginationPreText: "{{ trans('general.previous') }}",
|
||||
paginationNextText: "{{ trans('general.next') }}",
|
||||
pageList: ['10','20', '30','50','100','150','200', '500', '1000'],
|
||||
pageList: ['10','20', '30','50','100','150','200'{!! ((config('app.max_results') > 200) ? ",'500'" : '') !!}{!! ((config('app.max_results') > 500) ? ",'".config('app.max_results')."'" : '') !!}],
|
||||
pageSize: {{ (($snipeSettings->per_page!='') && ($snipeSettings->per_page > 0)) ? $snipeSettings->per_page : 20 }},
|
||||
paginationVAlign: 'both',
|
||||
queryParams: function (params) {
|
||||
|
|
|
@ -230,7 +230,7 @@
|
|||
{{ ($consumable->manufacturer) ? $consumable->manufacturer->name : '' }} {{ $consumable->name }} {{ $consumable->model_number }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ ($consumable->category) ? $consumable->category->name : '{{ trans('general.invalid_category') }}' }} </td>
|
||||
<td>{{ ($consumable->category) ? $consumable->category->name : trans('general.invalid_category') }} </td>
|
||||
<td>{{ $consumable->assetlog->first()->created_at }}</td>
|
||||
</tr>
|
||||
@php
|
||||
|
|
Loading…
Reference in a new issue