Allow updating asset default location when checking in asset via api

This commit is contained in:
Marcus Moore 2024-02-22 12:40:14 -08:00
parent 3ae8adfbf9
commit 2df026bcb5
No known key found for this signature in database
2 changed files with 4 additions and 2 deletions

View file

@ -890,6 +890,10 @@ class AssetsController extends Controller
if ($request->filled('location_id')) {
$asset->location_id = $request->input('location_id');
if ($request->get('update_default_location') == 0){
$asset->rtd_location_id = $request->get('location_id');
}
}
if ($request->has('status_id')) {

View file

@ -89,8 +89,6 @@ class AssetCheckinTest extends TestCase
public function testDefaultLocationCanBeUpdatedUponCheckin()
{
$this->markTestIncomplete('Not currently in controller');
$location = Location::factory()->create();
$asset = Asset::factory()->assignedToUser()->create();