mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
get rid of physical
This commit is contained in:
parent
88b6a541ee
commit
68d85385a2
|
@ -545,7 +545,6 @@ class AssetsController extends Controller
|
||||||
// @todo: verify eol is working as expected - move to request? or do I want this at all?
|
// @todo: verify eol is working as expected - move to request? or do I want this at all?
|
||||||
// might just remove this and then use the method from here https://github.com/snipe/snipe-it/pull/13846
|
// might just remove this and then use the method from here https://github.com/snipe/snipe-it/pull/13846
|
||||||
$asset->asset_eol_date = $request->validated()['asset_eol_date'] ?? $asset->present()->eol_date(); // so this isn't really necessary, because it's happening on the observer - but that might change?
|
$asset->asset_eol_date = $request->validated()['asset_eol_date'] ?? $asset->present()->eol_date(); // so this isn't really necessary, because it's happening on the observer - but that might change?
|
||||||
$asset->physical = '1';
|
|
||||||
$asset->depreciate = '0';
|
$asset->depreciate = '0';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -131,7 +131,6 @@ class AssetsController extends Controller
|
||||||
$asset->order_number = $request->input('order_number');
|
$asset->order_number = $request->input('order_number');
|
||||||
$asset->notes = $request->input('notes');
|
$asset->notes = $request->input('notes');
|
||||||
$asset->user_id = Auth::id();
|
$asset->user_id = Auth::id();
|
||||||
$asset->physical = '1';
|
|
||||||
$asset->depreciate = '0';
|
$asset->depreciate = '0';
|
||||||
$asset->status_id = request('status_id');
|
$asset->status_id = request('status_id');
|
||||||
$asset->warranty_months = request('warranty_months', null);
|
$asset->warranty_months = request('warranty_months', null);
|
||||||
|
@ -364,7 +363,6 @@ class AssetsController extends Controller
|
||||||
$asset->order_number = $request->input('order_number');
|
$asset->order_number = $request->input('order_number');
|
||||||
$asset->asset_tag = $asset_tag[1];
|
$asset->asset_tag = $asset_tag[1];
|
||||||
$asset->notes = $request->input('notes');
|
$asset->notes = $request->input('notes');
|
||||||
$asset->physical = '1';
|
|
||||||
|
|
||||||
$asset = $request->handleImages($asset);
|
$asset = $request->handleImages($asset);
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,6 @@ class Asset extends Depreciable
|
||||||
protected $injectUniqueIdentifier = true;
|
protected $injectUniqueIdentifier = true;
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'physical' => 'boolean',
|
|
||||||
'purchase_date' => 'date',
|
'purchase_date' => 'date',
|
||||||
'eol_explicit' => 'boolean',
|
'eol_explicit' => 'boolean',
|
||||||
'last_checkout' => 'datetime',
|
'last_checkout' => 'datetime',
|
||||||
|
@ -96,7 +95,6 @@ class Asset extends Depreciable
|
||||||
'name' => 'nullable|max:255',
|
'name' => 'nullable|max:255',
|
||||||
'company_id' => 'nullable|integer|exists:companies,id',
|
'company_id' => 'nullable|integer|exists:companies,id',
|
||||||
'warranty_months' => 'nullable|numeric|digits_between:0,240',
|
'warranty_months' => 'nullable|numeric|digits_between:0,240',
|
||||||
'physical' => 'nullable|boolean',
|
|
||||||
'last_checkout' => 'nullable|date_format:Y-m-d H:i:s',
|
'last_checkout' => 'nullable|date_format:Y-m-d H:i:s',
|
||||||
'expected_checkin' => 'nullable|date',
|
'expected_checkin' => 'nullable|date',
|
||||||
'location_id' => 'nullable|exists:locations,id',
|
'location_id' => 'nullable|exists:locations,id',
|
||||||
|
|
|
@ -66,7 +66,6 @@ class AssetStoreTest extends TestCase
|
||||||
|
|
||||||
$this->assertTrue($asset->adminuser->is($user));
|
$this->assertTrue($asset->adminuser->is($user));
|
||||||
|
|
||||||
$this->assertTrue($asset->physical);
|
|
||||||
// @todo: This isn't in the docs but it's in the controller
|
// @todo: This isn't in the docs but it's in the controller
|
||||||
$this->assertEquals('2024-06-02', $asset->asset_eol_date);
|
$this->assertEquals('2024-06-02', $asset->asset_eol_date);
|
||||||
$this->assertEquals('random_string', $asset->asset_tag);
|
$this->assertEquals('random_string', $asset->asset_tag);
|
||||||
|
|
Loading…
Reference in a new issue