¨4.0.1¨

This commit is contained in:
¨NW¨
2023-12-03 14:07:47 +00:00
parent c08b36d1b6
commit f35052522d
1112 changed files with 43019 additions and 24987 deletions

View File

@@ -7,18 +7,20 @@
@endsection
@section('panel')
<div class="panel">
<div class="panel-header">
<h4>{{ trans('storefront::account.pages.my_reviews') }}</h4>
</div>
<my-reviews inline-template>
<div class="panel">
<div class="panel-header">
<h4>{{ trans('storefront::account.pages.my_reviews') }}</h4>
</div>
<div class="panel-body">
@if ($reviews->isEmpty())
<div class="empty-message">
<h3>{{ trans('storefront::account.reviews.no_reviews') }}</h3>
<div class="panel-body" :class="{ loading: fetchingReviews }" v-cloak>
<div class="empty-message" v-if="reviewIsEmpty">
<h3 v-if="!fetchingReviews">
{{ trans('storefront::account.reviews.no_reviews') }}
</h3>
</div>
@else
<div class="table-responsive">
<div class="table-responsive" v-else>
<table class="table table-borderless my-reviews-table">
<thead>
<tr>
@@ -31,47 +33,57 @@
</thead>
<tbody>
@foreach ($reviews as $review)
<tr>
<td>
<div class="product-image">
@if ($review->product->base_image->exists)
<img src="{{ $review->product->base_image->path }}" alt="{{ $review->product->name }}">
@else
<img src="{{ asset('themes/storefront/public/images/image-placeholder.png') }}" class="image-placeholder">
@endif
</div>
</td>
<tr v-for="review in reviews.data" :key="review.id">
<td>
<div class="product-image">
<img
:src="baseImage(review.product)"
:class="{ 'image-placeholder': ! hasBaseImage(review.product) }"
:alt="review.product.name"
>
</div>
</td>
<td>
<a href="{{ route('products.show', ['slug' => $review->product->slug]) }}" class="product-name">
{{ $review->product->name }}
</a>
</td>
<td>
<a :href="productUrl(review.product)" class="product-name">
@{{ review.product.name }}
</a>
</td>
<td>
<span class="badge {{ $review->is_approved ? 'badge-success' : 'badge-secondary' }}">
{{ $review->status() }}
</span>
</td>
<td>
<span
class="badge"
:class="review.is_approved ? 'badge-success' : 'badge-warning'"
>
@{{ review.status }}
</span>
</td>
<td>
{{ $review->created_at->toFormattedDateString() }}
</td>
<td>
@{{ review.created_at_formatted }}
</td>
<td>
@include('public.account.reviews.partials.product_rating')
</td>
</tr>
@endforeach
<td>
<product-rating
:rating-percent="review.rating_percent"
>
</product-rating>
</td>
</tr>
</tbody>
</table>
</div>
@endif
</div>
</div>
<div class="panel-footer">
{!! $reviews->links() !!}
<div class="panel-footer">
<v-pagination
:total-page="totalPage"
:current-page="currentPage"
@page-changed="changePage"
v-if="reviews.total > 10"
>
</v-pagination>
</div>
</div>
</div>
</my-reviews>
@endsection