mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 14:09:43 -08:00
Merge pull request #11329 from mikeroq/fixes/deprecations_pagination_missing
Fixed #11285 - Depreciation index table missing pagination
This commit is contained in:
commit
3b462ffadc
|
@ -9,14 +9,14 @@ use Illuminate\Database\Eloquent\Collection;
|
||||||
|
|
||||||
class DepreciationsTransformer
|
class DepreciationsTransformer
|
||||||
{
|
{
|
||||||
public function transformDepreciations(Collection $depreciations)
|
public function transformDepreciations(Collection $depreciations, $total)
|
||||||
{
|
{
|
||||||
$array = [];
|
$array = [];
|
||||||
foreach ($depreciations as $depreciation) {
|
foreach ($depreciations as $depreciation) {
|
||||||
$array[] = self::transformDepreciation($depreciation);
|
$array[] = self::transformDepreciation($depreciation);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (new DatatablesTransformer)->transformDatatables($array);
|
return (new DatatablesTransformer)->transformDatatables($array, $total);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function transformDepreciation(Depreciation $depreciation)
|
public function transformDepreciation(Depreciation $depreciation)
|
||||||
|
@ -27,8 +27,7 @@ class DepreciationsTransformer
|
||||||
'months' => $depreciation->months.' '.trans('general.months'),
|
'months' => $depreciation->months.' '.trans('general.months'),
|
||||||
'depreciation_min' => $depreciation->depreciation_min,
|
'depreciation_min' => $depreciation->depreciation_min,
|
||||||
'created_at' => Helper::getFormattedDateObject($depreciation->created_at, 'datetime'),
|
'created_at' => Helper::getFormattedDateObject($depreciation->created_at, 'datetime'),
|
||||||
'updated_at' => Helper::getFormattedDateObject($depreciation->updated_at, 'datetime'),
|
'updated_at' => Helper::getFormattedDateObject($depreciation->updated_at, 'datetime')
|
||||||
'depreciation_min' =>($depreciation->depreciation_min),
|
|
||||||
];
|
];
|
||||||
|
|
||||||
$permissions_array['available_actions'] = [
|
$permissions_array['available_actions'] = [
|
||||||
|
|
Loading…
Reference in a new issue