From e4bfc6c5ae1672c754dd769b9fc6ef8018fa6fd9 Mon Sep 17 00:00:00 2001 From: 36864 <109086466+36864@users.noreply.github.com> Date: Fri, 11 Apr 2025 16:24:06 +0000 Subject: [PATCH] Fix signatures for accessories and consumables Also unifies the way these things are fetched. --- resources/views/users/print.blade.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/resources/views/users/print.blade.php b/resources/views/users/print.blade.php index d251d3c3d3..8bc36ce97b 100644 --- a/resources/views/users/print.blade.php +++ b/resources/views/users/print.blade.php @@ -147,8 +147,8 @@ {{ Helper::getFormattedDateObject($asset->last_checkout, 'datetime', false) }} - @if (($asset->assetlog->firstWhere('action_type', 'accepted')) && ($asset->assetlog->firstWhere('action_type', 'accepted')->accept_signature!='')) - + @if ($asset->getLatestSignedAcceptance($show_user)) + @endif @@ -175,8 +175,8 @@ {{ Helper::getFormattedDateObject($asset->last_checkout, 'datetime', false) }} - @if (($asset->assetlog->firstWhere('action_type', 'accepted')) && ($asset->assetlog->firstWhere('action_type', 'accepted')->accept_signature!='')) - + @if ($asset->getLatestSignedAcceptance($show_user)) + @endif @@ -243,8 +243,8 @@ {{ Helper::getFormattedDateObject($license->pivot->updated_at, 'datetime', false) }} - @if (($license->assetlog->firstWhere('action_type', 'accepted')) && ($license->assetlog->firstWhere('action_type', 'accepted')->accept_signature!='')) - + @if ($license->getLatestSignedAcceptance($show_user)) + @endif @@ -308,8 +308,8 @@ - @if (($accessory->assetlog->first()) && ($accessory->assetlog->first()->accept_signature!='')) - + @if ($accessory->getLatestSignedAcceptance($show_user)) + @endif @@ -373,8 +373,8 @@ {{ Helper::getFormattedDateObject($consumable->pivot->created_at, 'datetime', false) }} - @if (($consumable->assetlog->first()) && ($consumable->assetlog->first()->accept_signature!='')) - + @if ($consumable->getLatestSignedAcceptance($show_user)) + @endif