fix: use MinIO paths for default images instead of local paths
Some checks failed
ci/woodpecker/push/ci Pipeline failed

- Upload dispensary.svg and placeholder-product.svg to MinIO
- Update stores/index.blade.php to use Storage::disk('minio')->url()
- Update stores/show.blade.php to use MinIO for dispensary icon and placeholder
- Update stores/orders.blade.php to use MinIO dispensary icon
- Update Filament ProductsTable to use MinIO placeholder

Fixes missing images on production where local paths don't exist.
This commit is contained in:
kelly
2025-12-16 09:35:07 -07:00
parent 8c4b424eb6
commit 0d38f6dc5e
5 changed files with 16 additions and 6 deletions

View File

@@ -25,7 +25,7 @@ class ProductsTable
ImageColumn::make('image_path')
->label('Image')
->circular()
->defaultImageUrl(url('/images/placeholder-product.png'))
->defaultImageUrl(\Storage::disk('minio')->url('defaults/placeholder-product.svg'))
->toggleable(),
TextColumn::make('name')

View File

@@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="none" stroke="#9ca3af" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="background:#f3f4f6">
<!-- Outer box -->
<rect x="15" y="15" width="70" height="70" rx="8" fill="#e5e7eb" stroke="#d1d5db"/>
<!-- Inner cannabis leaf silhouette -->
<g transform="translate(50, 50)">
<path d="M0 15 L0 5" stroke="#9ca3af"/>
<path d="M0 5 Q-10 -5 -8 -12 Q0 -8 0 -6 Q0 -8 8 -12 Q10 -5 0 5" fill="#d1d5db" stroke="#9ca3af"/>
<path d="M0 0 Q-15 -8 -14 -16 Q-6 -10 0 -6 Q6 -10 14 -16 Q15 -8 0 0" fill="#d1d5db" stroke="#9ca3af"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 635 B

View File

@@ -154,7 +154,7 @@
<template x-if="store.business_type === 'dispensary'">
<div class="avatar">
<div class="w-10 rounded-lg bg-base-200">
<img src="/images/defaults/dispensary.svg" alt="Dispensary" class="p-1">
<img src="{{ Storage::disk('minio')->url('defaults/dispensary.svg') }}" alt="Dispensary" class="p-1">
</div>
</div>
</template>

View File

@@ -195,7 +195,7 @@
<template x-if="store.business_type === 'dispensary'">
<div class="avatar">
<div class="w-10 rounded-lg bg-base-200">
<img src="/images/defaults/dispensary.svg" alt="Dispensary" class="p-1">
<img src="{{ Storage::disk('minio')->url('defaults/dispensary.svg') }}" alt="Dispensary" class="p-1">
</div>
</div>
</template>

View File

@@ -25,7 +25,7 @@
@if($store->business_type === 'dispensary')
<div class="avatar">
<div class="w-10 h-10 rounded-lg bg-base-200">
<img src="/images/defaults/dispensary.svg" alt="Dispensary" class="p-1">
<img src="{{ Storage::disk('minio')->url('defaults/dispensary.svg') }}" alt="Dispensary" class="p-1">
</div>
</div>
@else
@@ -68,7 +68,7 @@
<template x-if="s.business_type === 'dispensary'">
<div class="avatar flex-shrink-0">
<div class="w-9 h-9 rounded-lg bg-base-200">
<img src="/images/defaults/dispensary.svg" alt="Dispensary" class="p-0.5">
<img src="{{ Storage::disk('minio')->url('defaults/dispensary.svg') }}" alt="Dispensary" class="p-0.5">
</div>
</div>
</template>
@@ -185,7 +185,7 @@
<div class="flex items-center gap-3">
<div class="avatar">
<div class="w-10 h-10 rounded">
<img :src="product.image_url || '/images/placeholder-product.png'"
<img :src="product.image_url || '{{ Storage::disk('minio')->url('defaults/placeholder-product.svg') }}'"
:alt="product.name"
class="object-cover">
</div>