codigo actual del servidor, con avances de joan
This commit is contained in:
68
resources/views/seller/product_query/index.blade.php
Normal file
68
resources/views/seller/product_query/index.blade.php
Normal file
@@ -0,0 +1,68 @@
|
||||
@extends('seller.layouts.app')
|
||||
|
||||
@section('panel_content')
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{ translate('Product Queries') }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table aiz-table mb-0" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-breakpoints="lg">#</th>
|
||||
<th>{{ translate('User Name') }}</th>
|
||||
<th>{{ translate('Product Name') }}</th>
|
||||
<th data-breakpoints="lg">{{ translate('Question') }}</th>
|
||||
<th data-breakpoints="lg">{{ translate('Reply') }}</th>
|
||||
<th>{{ translate('status') }}</th>
|
||||
<th class="text-right">{{ translate('Options') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($queries as $key => $query)
|
||||
<tr>
|
||||
<td>{{ $queries->firstItem() + $key }}</td>
|
||||
<td>
|
||||
|
||||
@if(isset($query->user->name))
|
||||
{{ $query->user->name }}
|
||||
@else
|
||||
{{ translate('Product Not found') }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if(isset($query->product->name))
|
||||
{{ $query->product->name }}
|
||||
@else
|
||||
{{ translate('Product Not found') }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ Str::limit($query->question, 100) }}</td>
|
||||
<td>{{ Str::limit($query->reply, 100) }}</td>
|
||||
<td>
|
||||
<span
|
||||
class="badge badge-inline {{ $query->reply == null ? 'badge-warning' : 'badge-success' }}">
|
||||
{{ $query->reply == null ? translate('Not Replied') : translate('Replied') }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<a class="btn btn-soft-primary btn-icon btn-circle btn-sm"
|
||||
href="{{ route('seller.product_query.show', encrypt($query->id)) }}"
|
||||
title="{{ translate('View') }}">
|
||||
<i class="las la-eye"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="aiz-pagination">
|
||||
{{ $queries->appends(request()->input())->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
@include('modals.delete_modal')
|
||||
@endsection
|
||||
53
resources/views/seller/product_query/show.blade.php
Normal file
53
resources/views/seller/product_query/show.blade.php
Normal file
@@ -0,0 +1,53 @@
|
||||
@extends('seller.layouts.app')
|
||||
|
||||
@section('panel_content')
|
||||
<div class="col-lg-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title">
|
||||
{{ $query->product->getTranslation('name') }}
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item px-0">
|
||||
<div class="media mb-2">
|
||||
<img class="avatar avatar-xs mr-3"
|
||||
@if ($query->user != null) src="{{ uploaded_asset($query->user->avatar_original) }}" @endif
|
||||
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/avatar-place.png') }}';">
|
||||
<div class="media-body">
|
||||
<h6 class="mb-0 fw-600">
|
||||
@if ($query->user != null)
|
||||
{{ $query->user->name }}
|
||||
@endif
|
||||
</h6>
|
||||
<p class="opacity-50">{{ $query->created_at->diffForHumans() }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
{{ strip_tags($query->question) }}
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
@if (Auth::user()->id == $query->seller_id)
|
||||
<form action="{{ route('seller.product_query.reply',$query->id) }}" method="POST">
|
||||
@method('put')
|
||||
@csrf
|
||||
<input type="hidden" name="conversation_id" value="{{ $query->id }}">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<textarea class="form-control" rows="4" name="reply" placeholder="{{ translate('Type your reply') }}"
|
||||
required></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="text-right">
|
||||
<button type="submit" class="btn btn-info">{{ translate('Send') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user