temp emails, reviews theming and form, minor change in checkout module, validation translations seeder

This commit is contained in:
elvira
2026-09-22 19:00:34 +03:00
parent a107184010
commit 24851184c4
19 changed files with 518 additions and 47 deletions
+15 -2
View File
@@ -149,7 +149,14 @@ class="absolute bottom-6 right-8 text-white text-sm"
{{ $product['name'] }}
</h1>
<x-reviews-stars :rating="$product['reviews']['average_rating'] ?? 0" :count="$product['reviews']['count']" :showCount="true" />
<x-reviews-stars
:rating="$product['reviews']['average_rating'] ?? 0"
:count="$product['reviews']['count']"
:showCount="true"
:linkable="true"
data-controller="review-count"
data-review-count-tabs-outlet="#product-tabs"
/>
@if($product['price'] !== null)
<p class="text-2xl font-bold" data-product-form-target="price">
@@ -196,7 +203,7 @@ class="flex items-stretch gap-10"
</div>
<x-ui.tabs class="mt-16" size="lg" :tabs="[
<x-ui.tabs id="product-tabs" class="mt-16 scroll-mt-28" size="lg" :active="request('tab')" :tabs="[
['id' => 'description', 'label' => __('storefront.product.description')],
['id' => 'reviews', 'label' => __('storefront.product.reviews') . ' (' . $product['reviews']['count'] . ')'],
]">
@@ -211,6 +218,10 @@ class="flex items-stretch gap-10"
</ul>
</x-slot>
<x-slot name="reviews">
@if(session('reviewSubmitted'))
<p class="mb-8 text-sm font-semibold" role="status">{{ __('storefront.review.thank_you') }}</p>
@endif
@if(!empty($product['reviews']['items']))
<div class="mb-10">
@foreach($product['reviews']['items'] as $review)
@@ -220,6 +231,8 @@ class="flex items-stretch gap-10"
'date' => $review['reviewed_at'] ? \Illuminate\Support\Carbon::createFromTimestamp($review['reviewed_at'])->translatedFormat('d M Y') : '',
'text' => $review['body'],
'image' => $review['media'][0]['url'] ?? null,
'reply' => $review['reply'] ?? null,
'replyDate' => $review['replied_at'] ? \Illuminate\Support\Carbon::createFromTimestamp($review['replied_at'])->translatedFormat('d M Y') : null,
]" />
@endforeach
</div>