@extends('layouts.front-end.app') @section('title') {{ Request::is('chat/vendor') ? translate('chat_with_vendor') : translate('chat_with_delivery_man')}} @endsection @section('content')
@include('web-views.partials._profile-aside')
{{translate('inbox')}}
@if(isset($allChattingUsers) && count($allChattingUsers) > 0) @foreach($allChattingUsers as $key => $chatting) @php($userId = !is_null($chatting->admin_id) ? 0 : ($chatting?->seller_id ?? $chatting?->delivery_man_id) ) @php($seenMessage = !is_null($chatting->admin_id) ? $chatting->sent_by_admin : ($chatting?->seller_id ? $chatting->sent_by_seller : $chatting->sent_by_delivery_man) ) @php($userName = !is_null($chatting->admin_id) ? getWebConfig('company_name') : ($chatting?->seller_id ? $chatting?->seller?->shop->name : $chatting?->deliveryMan?->f_name ))
@if($chatting->delivery_man_id) @elseif($chatting?->seller_id) @else @endif
{{$userName}}
{{$chatting->created_at->diffForHumans()}}
@if($chatting->message) {{ $chatting->message }} @elseif(json_decode($chatting['attachment'], true) !=null) {{ translate('sent_attachments') }} @endif @if($chatting->unseen_message_count >0) {{ $chatting->unseen_message_count }} @endif
@endForeach @endif
@if(isset($chattingMessages) && count($chattingMessages) > 0)
{{ translate('sorry') }} ! {{ translate('currently_we_are_not_available.') }} {{ translate('but_you_can_ask_or_still_message_us.') }} {{ translate('We_will_get_back_to_you_soon.') }} {{ translate('Thank_you_for_your_patience.') }}.
@else

{{translate('you_have_not_any_conversation_yet')}}

@endif
@endsection @push('script') @endpush