mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
7d7d58769c
|
@ -213,7 +213,7 @@ class ConsumablesController extends Controller
|
|||
$consumable = Consumable::with(['consumableAssignments'=> function ($query) {
|
||||
$query->orderBy($query->getModel()->getTable().'.created_at', 'DESC');
|
||||
},
|
||||
'consumableAssignments.admin'=> function ($query) {
|
||||
'consumableAssignments.adminuser'=> function ($query) {
|
||||
},
|
||||
'consumableAssignments.user'=> function ($query) {
|
||||
},
|
||||
|
@ -231,8 +231,8 @@ class ConsumablesController extends Controller
|
|||
'name' => ($consumable_assignment->user) ? $consumable_assignment->user->present()->nameUrl() : 'Deleted User',
|
||||
'created_at' => Helper::getFormattedDateObject($consumable_assignment->created_at, 'datetime'),
|
||||
'note' => ($consumable_assignment->note) ? e($consumable_assignment->note) : null,
|
||||
'admin' => ($consumable_assignment->admin) ? $consumable_assignment->admin->present()->nameUrl() : null, // legacy, so we don't change the shape of the response
|
||||
'created_by' => ($consumable_assignment->admin) ? $consumable_assignment->admin->present()->nameUrl() : null,
|
||||
'admin' => ($consumable_assignment->adminuser) ? $consumable_assignment->adminuser->present()->nameUrl() : null, // legacy, so we don't change the shape of the response
|
||||
'created_by' => ($consumable_assignment->adminuser) ? $consumable_assignment->adminuser->present()->nameUrl() : null,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ class AssetSeeder extends Seeder
|
|||
$this->ensureLocationsSeeded();
|
||||
$this->ensureSuppliersSeeded();
|
||||
|
||||
$this->admin = User::where('permissions->superuser', '1')->first() ?? User::factory()->firstAdmin()->create();
|
||||
$this->adminuser = User::where('permissions->superuser', '1')->first() ?? User::factory()->firstAdmin()->create();
|
||||
$this->locationIds = Location::all()->pluck('id');
|
||||
$this->supplierIds = Supplier::all()->pluck('id');
|
||||
|
||||
|
|
Loading…
Reference in a new issue