mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 05:04:07 -08:00
Small fix for notifications checkout
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
7d858129d9
commit
b68805cf83
|
@ -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