Minor fixes (#4091)
* Fix old urls. Still had some /admin/ urls floating around, which was causing bad redirects in some instances. Should fix #4085 * The modal seems to be confusing license upload. be more explicit in the route we redirect to. * Fix #4039. Use proper methods for location assets. This also fixes a bunch of n+1 issues in the transformer. Also: curious to know what Location::assets() does, because it doesn't do what I want it to :)
This commit is contained in:
@@ -38,8 +38,8 @@ class LocationsTransformer
|
||||
'state' => e($location->state),
|
||||
'country' => e($location->country),
|
||||
'zip' => e($location->zip),
|
||||
'assets_checkedout' => $location->assets()->count(),
|
||||
'assets_default' => $location->assignedassets()->count(),
|
||||
'assets_checkedout' => $location->location_assets_count,
|
||||
'assets_default' => $location->assigned_assets_count,
|
||||
|
||||
'created_at' => Helper::getFormattedDateObject($location->created_at, 'datetime'),
|
||||
'updated_at' => Helper::getFormattedDateObject($location->updated_at, 'datetime'),
|
||||
|
||||
Reference in New Issue
Block a user