@@ -147,8 +147,8 @@ class="snipe-table table table-striped inventory"
147147 <td >
148148 {{ Helper:: getFormattedDateObject ($asset -> last_checkout , ' datetime' , false ) } } </td >
149149 <td >
150- @if (( $asset -> assetlog -> firstWhere ( ' action_type ' , ' accepted ' )) && ( $asset -> assetlog -> firstWhere ( ' action_type ' , ' accepted ' ) -> accept_signature != ' ' ) )
151- <img style =" width :auto ;height :100px ;" src =" {{ asset (' /' ) } } display-sig/{{ $asset -> assetlog -> firstWhere ( ' action_type ' , ' accepted ' )-> accept_signature } }" >
150+ @if ($asset -> getLatestSignedAcceptance ( $show_user ) )
151+ <img style =" width :auto ;height :100px ;" src =" {{ asset (' /' ) } } display-sig/{{ $asset -> getLatestSignedAcceptance ( $show_user )-> accept_signature } }" >
152152 @endif
153153 </td >
154154 </tr >
@@ -175,8 +175,8 @@ class="snipe-table table table-striped inventory"
175175 {{ Helper:: getFormattedDateObject ($asset -> last_checkout , ' datetime' , false ) } }
176176 </td >
177177 <td >
178- @if (( $asset -> assetlog -> firstWhere ( ' action_type ' , ' accepted ' )) && ( $asset -> assetlog -> firstWhere ( ' action_type ' , ' accepted ' ) -> accept_signature != ' ' ) )
179- <img style =" width :auto ;height :100px ;" src =" {{ asset (' /' ) } } display-sig/{{ $asset -> assetlog -> firstWhere ( ' action_type ' , ' accepted ' )-> accept_signature } }" >
178+ @if ($asset -> getLatestSignedAcceptance ( $show_user ) )
179+ <img style =" width :auto ;height :100px ;" src =" {{ asset (' /' ) } } display-sig/{{ $asset -> getLatestSignedAcceptance ( $show_user )-> accept_signature } }" >
180180 @endif
181181 </td >
182182 </tr >
@@ -243,8 +243,8 @@ class="snipe-table table table-striped inventory"
243243 {{ Helper:: getFormattedDateObject ($license -> pivot -> updated_at , ' datetime' , false ) } }
244244 </td >
245245 <td >
246- @if (( $license -> assetlog -> firstWhere ( ' action_type ' , ' accepted ' )) && ( $license -> assetlog -> firstWhere ( ' action_type ' , ' accepted ' ) -> accept_signature != ' ' ) )
247- <img style =" width :auto ;height :100px ;" src =" {{ asset (' /' ) } } display-sig/{{ $license -> assetlog -> firstWhere ( ' action_type ' , ' accepted ' )-> accept_signature } }" >
246+ @if ($license -> getLatestSignedAcceptance ( $show_user ) )
247+ <img style =" width :auto ;height :100px ;" src =" {{ asset (' /' ) } } display-sig/{{ $license -> getLatestSignedAcceptance ( $show_user )-> accept_signature } }" >
248248 @endif
249249 </td >
250250 </tr >
@@ -308,8 +308,8 @@ class="snipe-table table table-striped inventory"
308308 </td >
309309
310310 <td >
311- @if (( $accessory -> assetlog -> first ()) && ( $accessory -> assetlog -> first () -> accept_signature != ' ' ) )
312- <img style =" width :auto ;height :100px ;" src =" {{ asset (' /' ) } } display-sig/{{ $accessory -> assetlog -> first ( )-> accept_signature } }" >
311+ @if ($accessory -> getLatestSignedAcceptance ( $show_user ) )
312+ <img style =" width :auto ;height :100px ;" src =" {{ asset (' /' ) } } display-sig/{{ $accessory -> getLatestSignedAcceptance ( $show_user )-> accept_signature } }" >
313313 @endif
314314 </td >
315315 </tr >
@@ -373,8 +373,8 @@ class="snipe-table table table-striped inventory"
373373 {{ Helper:: getFormattedDateObject ($consumable -> pivot -> created_at , ' datetime' , false ) } }
374374 </td >
375375 <td >
376- @if (( $consumable -> assetlog -> first ()) && ( $consumable -> assetlog -> first () -> accept_signature != ' ' ) )
377- <img style =" width :auto ;height :100px ;" src =" {{ asset (' /' ) } } display-sig/{{ $consumable -> assetlog -> first ( )-> accept_signature } }" >
376+ @if ($consumable -> getLatestSignedAcceptance ( $show_user ) )
377+ <img style =" width :auto ;height :100px ;" src =" {{ asset (' /' ) } } display-sig/{{ $consumable -> getLatestSignedAcceptance ( $show_user )-> accept_signature } }" >
378378 @endif
379379 </td >
380380 </tr >
0 commit comments