Skip to content

Commit b769177

Browse files
committed
Second fixe /issues/443
1 parent 0c886f5 commit b769177

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

resources/views/dashboard.blade.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -372,18 +372,23 @@
372372
<x-adminlte-card title="{{ __('general_content.latest_products_trans_key') }}" theme="dark" icon="fas fa-chart-bar text-white" collapsible removable maximizable>
373373
<div class="row">
374374
@forelse ($LastProducts as $LastProduct)
375+
@php
376+
if($LastProduct->picture)
377+
$picture = asset('/images/products/'. $LastProduct->picture);
378+
else {
379+
$picture = Avatar::create($LastProduct->code)->toBase64();
380+
}
381+
@endphp
375382
<div class="col-md-2">
376-
@if($LastProduct->picture)
377383
<x-adminlte-profile-widget name="{{ $LastProduct->label }} {{ $LastProduct->ind }}" desc="{{ $LastProduct->family->label }}" theme="lightblue"
378-
img=" {{ asset('/images/products/'. $LastProduct->picture) }}" layout-type="classic">
379-
@endif
384+
img="{{ $picture }}"
385+
layout-type="classic">
386+
380387
<x-adminlte-profile-row-item icon="fas fa-cash-register " title="{{ __('general_content.purchased_price_trans_key') }}" text=" {{ $LastProduct->purchased_price }} {{ $Factory->curency }}"
381388
url="#" badge="teal"/>
382389
<x-adminlte-profile-row-item icon="fas fa-shopping-cart" title="{{ __('general_content.price_trans_key') }}"
383390
text="{{ $LastProduct->selling_price }} {{ $Factory->curency }}" url="#" badge="lightblue"/>
384391
</x-adminlte-profile-widget>
385-
386-
387392
</div>
388393
<!-- /.item -->
389394
@empty

0 commit comments

Comments
 (0)