show.blade.php 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. @extends('seller.layouts.app')
  2. @section('panel_content')
  3. <div class="col-lg-12">
  4. <div class="card">
  5. <div class="card-header">
  6. <h5 class="card-title">
  7. {{ $query->product->getTranslation('name') }}
  8. </h5>
  9. </div>
  10. <div class="card-body">
  11. <ul class="list-group list-group-flush">
  12. <li class="list-group-item px-0">
  13. <div class="media mb-2">
  14. <img class="avatar avatar-xs mr-3"
  15. @if ($query->user != null) src="{{ uploaded_asset($query->user->avatar_original) }}" @endif
  16. onerror="this.onerror=null;this.src='{{ static_asset('assets/img/avatar-place.png') }}';">
  17. <div class="media-body">
  18. <h6 class="mb-0 fw-600">
  19. @if ($query->user != null)
  20. {{ $query->user->name }}
  21. @endif
  22. </h6>
  23. <p class="opacity-50">{{ $query->created_at->diffForHumans() }}</p>
  24. </div>
  25. </div>
  26. <p>
  27. {{ strip_tags($query->question) }}
  28. </p>
  29. </li>
  30. </ul>
  31. @if (Auth::user()->id == $query->seller_id)
  32. <form action="{{ route('seller.product_query.reply',$query->id) }}" method="POST">
  33. @method('put')
  34. @csrf
  35. <input type="hidden" name="conversation_id" value="{{ $query->id }}">
  36. <div class="row">
  37. <div class="col-md-12">
  38. <textarea class="form-control" rows="4" name="reply" placeholder="{{ translate('Type your reply') }}"
  39. required></textarea>
  40. </div>
  41. </div>
  42. <br>
  43. <div class="text-right">
  44. <button type="submit" class="btn btn-info">{{ translate('Send') }}</button>
  45. </div>
  46. </form>
  47. @endif
  48. </div>
  49. </div>
  50. </div>
  51. @endsection