mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-11 08:04:09 -08:00
Merge branch 'develop'
This commit is contained in:
commit
463d9513e2
|
@ -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) {
|
$factory->defineAs(Actionlog::class, 'asset-checkout-user', function (Faker\Generator $faker) {
|
||||||
$target = User::inRandomOrder()->first();
|
$target = User::inRandomOrder()->first();
|
||||||
|
|
|
@ -41,25 +41,30 @@
|
||||||
$totalCost = 0;
|
$totalCost = 0;
|
||||||
?>
|
?>
|
||||||
@foreach ($assetMaintenances as $assetMaintenance)
|
@foreach ($assetMaintenances as $assetMaintenance)
|
||||||
|
<?php $assetMaintenanceTime = intval($assetMaintenance->asset_maintenance_time); ?>
|
||||||
@if ($assetMaintenance->asset)
|
@if ($assetMaintenance->asset)
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ ($assetMaintenance->asset->company) ? $assetMaintenance->asset->company->name : '' }}</td>
|
<td>{{ ($assetMaintenance->asset->company) ? $assetMaintenance->asset->company->name : '' }}</td>
|
||||||
<td>{{ $assetMaintenance->asset->asset_tag }}</td>
|
<td>{{ $assetMaintenance->asset->asset_tag }}</td>
|
||||||
<td>{{ $assetMaintenance->asset->name }}</td>
|
<td>{{ $assetMaintenance->asset->name }}</td>
|
||||||
<td>{{ $assetMaintenance->supplier->name }}</td>
|
<td>
|
||||||
|
@if ($assetMaintenance->supplier)
|
||||||
|
{{ $assetMaintenance->supplier->name }}
|
||||||
|
@else
|
||||||
|
(deleted supplier)
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
<td>{{ $assetMaintenance->asset_maintenance_type }}</td>
|
<td>{{ $assetMaintenance->asset_maintenance_type }}</td>
|
||||||
<td>{{ $assetMaintenance->title }}</td>
|
<td>{{ $assetMaintenance->title }}</td>
|
||||||
<td>{{ $assetMaintenance->start_date }}</td>
|
<td>{{ $assetMaintenance->start_date }}</td>
|
||||||
<td>{{ is_null($assetMaintenance->completion_date) ? trans('admin/asset_maintenances/message.asset_maintenance_incomplete') : $assetMaintenance->completion_date }}</td>
|
<td>{{ is_null($assetMaintenance->completion_date) ? trans('admin/asset_maintenances/message.asset_maintenance_incomplete') : $assetMaintenance->completion_date }}</td>
|
||||||
@if (is_null($assetMaintenance->asset_maintenance_time))
|
<?php
|
||||||
<?php
|
|
||||||
$assetMaintenanceTime = intval(Carbon::now()->diffInDays(Carbon::parse($assetMaintenance->start_date)));
|
if (is_null($assetMaintenance->asset_maintenance_time)) {
|
||||||
?>
|
$assetMaintenanceTime = intval(Carbon::now()->diffInDays(Carbon::parse($assetMaintenance->start_date)));
|
||||||
@else
|
}
|
||||||
<?php
|
|
||||||
$assetMaintenanceTime = intval($assetMaintenance->asset_maintenance_time);
|
?>
|
||||||
?>
|
|
||||||
@endif
|
|
||||||
<td>{{ $assetMaintenanceTime }}</td>
|
<td>{{ $assetMaintenanceTime }}</td>
|
||||||
<td>
|
<td>
|
||||||
{{ $snipeSettings->default_currency }}
|
{{ $snipeSettings->default_currency }}
|
||||||
|
|
Loading…
Reference in a new issue