FIX: #10898 (invalid consumable date time info in user view)

This commit is contained in:
Achmad Fienan Rahardianto 2022-04-05 15:31:27 +07:00
parent d55c176199
commit 231a34ace3
2 changed files with 2 additions and 2 deletions

View file

@ -308,7 +308,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
*/
public function consumables()
{
return $this->belongsToMany(\App\Models\Consumable::class, 'consumables_users', 'assigned_to', 'consumable_id')->withPivot('id')->withTrashed();
return $this->belongsToMany(\App\Models\Consumable::class, 'consumables_users', 'assigned_to', 'consumable_id')->withPivot('id','created_at')->withTrashed();
}
/**

View file

@ -738,7 +738,7 @@
<td>
{!! Helper::formatCurrencyOutput($consumable->purchase_cost) !!}
</td>
<td>{{ $consumable->created_at }}</td>
<td>{{ $consumable->pivot->created_at }}</td>
</tr>
@endforeach
</tbody>