some notes and a little progress

This commit is contained in:
spencerrlongg
2024-03-20 00:07:52 -05:00
parent 1e810d2426
commit 0ffceb9691
2 changed files with 7 additions and 5 deletions
@@ -633,8 +633,9 @@ class AssetsController extends Controller
$asset->model()->associate(AssetModel::find($request->validated()['model_id'])) : null;
($request->has('company_id')) ?
$asset->company_id = Company::getIdForCurrentUser($request->validated()['company_id']) : null;
($request->has('rtd_location_id')) ?
$asset->location_id = $request->validated()['rtd_location_id'] : null;
// TODO: this seems like bad logic maybe? it means that if you submit an rtd_location_id and a location_id in the same request location_id is overwritten with rtd_location_id. seems wrong.
//($request->has('rtd_location_id')) ?
// $asset->location_id = $request->validated()['rtd_location_id'] : null;
/**
* this is here just legacy reasons. Api\AssetController