@if(setting_item($row->type."_enable_review"))

{{__("Reviews")}}

@if($review_score)
{{$review_score['score_total']}}/5
{{$review_score['score_text']}}
{{__("Based on")}} @if($review_score['total_review'] > 1) {{ __(":number reviews",["number"=>$review_score['total_review'] ]) }} @else {{ __(":number review",["number"=>$review_score['total_review'] ]) }} @endif
@if($review_score['rate_score']) @foreach($review_score['rate_score'] as $item)
{{$item['title']}}
{{$item['total']}}
@endforeach @endif
@endif
@if($review_list) @foreach($review_list as $item) @php $userInfo = $item->author; $picture = $item->getReviewMetaPicture(); @endphp
@if($avatar_url = $userInfo->getAvatarUrl()) {{$userInfo->getDisplayName()}} @else {{ucfirst($userInfo->getDisplayName()[0])}} @endif

{{$userInfo->getDisplayName()}}

{{display_datetime($item->created_at)}}

{{$item->title}}

@if($item->rate_number)
    @for( $i = 0 ; $i < 5 ; $i++ ) @if($i < $item->rate_number)
  • @else
  • @endif @endfor
@endif
{{$item->content}}
@if(!empty($picture)) @php $listImages = json_decode($picture->val, true); @endphp
@foreach($listImages as $oneImages) @php $imagesData = json_decode($oneImages, true); @endphp
@endforeach
@endif
@endforeach @endif
@if($review_list->total() > 0)
{{$review_list->appends(request()->query())->fragment('review-list')->links()}}
{{ __("Showing :from - :to of :total total",["from"=>$review_list->firstItem(),"to"=>$review_list->lastItem(),"total"=>$review_list->total()]) }}
@else
{{__("No Review")}}
@endif
@if($row->check_enable_review_after_booking() and Auth::id())
{{__("Write a review")}}
@include('admin.message')
@csrf
{{__('Review title is required')}}
{{__('Review content has at least 10 character')}}
@if($tour_review_stats = setting_item($row->type."_review_stats")) @php $tour_review_stats = json_decode($tour_review_stats) @endphp
@foreach($tour_review_stats as $item)
@endforeach
@else
@endif
@if(setting_item('review_upload_picture'))
{{__('Add photo')}}
@endif
@endif @if(!Auth::id())
{!! __("You must log in to write review") !!}
@endif
@endif