diff --git a/database/factories/ActionLogFactory.php b/database/factories/ActionLogFactory.php index 3cf6b408db..a49d56b852 100644 --- a/database/factories/ActionLogFactory.php +++ b/database/factories/ActionLogFactory.php @@ -14,6 +14,17 @@ $factory->define(Actionlog::class, function (Faker\Generator $faker) { }); +$factory->defineAs(App\Models\Actionlog::class, 'asset-upload', function ($faker) { + $asset = factory(App\Models\Asset::class)->create(); + return [ + 'item_type' => get_class($asset), + 'item_id' => 1, + 'user_id' => 1, + 'filename' => $faker->word, + 'action_type' => 'uploaded' + ]; +}); + $factory->defineAs(Actionlog::class, 'asset-checkout-user', function (Faker\Generator $faker) { $target = User::inRandomOrder()->first(); diff --git a/resources/views/reports/asset_maintenances.blade.php b/resources/views/reports/asset_maintenances.blade.php index 79dbb806cd..31d61e0b76 100644 --- a/resources/views/reports/asset_maintenances.blade.php +++ b/resources/views/reports/asset_maintenances.blade.php @@ -41,25 +41,30 @@ $totalCost = 0; ?> @foreach ($assetMaintenances as $assetMaintenance) + asset_maintenance_time); ?> @if ($assetMaintenance->asset)