Working on the Actionlog and ReportsController - still having issues getting data back the way I want
This commit is contained in:
@@ -592,12 +592,12 @@ class ReportsController extends AdminController
|
||||
->get()
|
||||
->toArray(), 'id' );
|
||||
|
||||
|
||||
$assetsCheckedOutThatRequireAcceptance = Asset::deployed()
|
||||
->inModelList( $modelsInCategoriesThatRequireAcceptance )
|
||||
->list( 'id', 'assigned_to' )
|
||||
->get()
|
||||
->toArray();
|
||||
|
||||
$assetMaintenances = AssetMaintenance::with( 'asset', 'supplier' )
|
||||
->orderBy( 'created_at', 'DESC' )
|
||||
->get();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Eloquent\SoftDeletingTrait;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class Actionlog extends Eloquent
|
||||
@@ -69,8 +70,6 @@
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get the parent category name
|
||||
*/
|
||||
@@ -85,6 +84,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
public function getListingOfActionLogsChronologicalOrder()
|
||||
{
|
||||
|
||||
return DB::table( 'asset_logs' )
|
||||
->select( '*' )
|
||||
->orderBy( 'asset_id', 'asc' )
|
||||
->orderBy( 'created_at', 'asc' )
|
||||
->get();
|
||||
}
|
||||
|
||||
public function getLatestCheckoutActionForAssets()
|
||||
{
|
||||
|
||||
@@ -108,4 +117,5 @@
|
||||
return $query->where( 'action_type', '=', 'checkout' )
|
||||
->where( 'accepted_id', '=', null );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user