@extends('layouts.app', ['title' => __tr('WhatsApp Chat')]) @section('content') {{-- @include('users.partials.header', [ // 'title' => __tr('WhatsApp Chat'), 'description' => '', // 'class' => 'col-lg-7' ]) --}} @push('head') {!! __yesset('dist/css/whatsapp-chat.css', true) !!} @endpush
{{-- @if ($contact) --}}
@if (!getVendorSettings('current_phone_number_number'))
{{ __tr('Phone number does not configured yet.') }}
@endif
@if (isset($allLabels) && count($allLabels) > 0) @endif
{{--

{{ __tr('WhatsApp Chat') }}

--}} @php use App\Yantrana\Components\Vendor\Repositories\VendorRepository; $vendorUid = getVendorUid(); $basicSettings = [ 'title' => null, 'id' => null, 'uid' => null, 'slug' => null, 'logo_image' => null, 'logo_url' => null, ]; if ($vendorUid) { $vendorRepository = app(VendorRepository::class); $vendorData = $vendorRepository->fetchIt($vendorUid); if (!__isEmpty($vendorData)) { $basicSettings = [ 'title' => $vendorData->title, 'id' => $vendorData->_id, 'uid' => $vendorData->_uid, 'slug' => $vendorData->slug, 'logo_image' => $vendorData->logo_image, 'logo_url' => $vendorData->logo_url, ]; } } $selectedPhoneNumberId = getVendorSettings('current_phone_number_id'); $whatsappNumbers = getVendorSettings('whatsapp_phone_numbers') ?? []; $selectedPhoneNumber = null; foreach ($whatsappNumbers as $number) { if ($number['id'] == $selectedPhoneNumberId) { $selectedPhoneNumber = $number['display_phone_number']; break; } } if (!$selectedPhoneNumber) { $selectedPhoneNumber = getVendorSettings('current_phone_number_number') ?? ''; } $rawPhone = $selectedPhoneNumber ?? ''; $isHashed = Str::startsWith($rawPhone, 'eyJ') && strlen($rawPhone) > 40; @endphp
Avatar
@if (!empty($basicSettings['title'])) {{ $basicSettings['title'] }} @endif
@if (!empty($rawPhone) && !$isHashed) {{ $rawPhone }} @endif
{{--
--}}

{{--

?

--}} {{--
@if (isset($allLabels) && count($allLabels) > 0) @endif
?
--}}
@include('whatsapp.chat_module.contacts_list')
{{--
--}}
{{--

{{ __tr('Chat') }}

--}}
{{--
--}}
@foreach ($vendorContactGroups as $vendorContactGroup) @endforeach
@foreach ($allLabels as $label) @endforeach
@if(isAiBotAvailable())
@endif
{{--
{{ __tr('Language') }}
--}} {{--
{{ __tr('Last Seen') }}
--}}
{{--
{{ __tr('Team Assignment') }}
@if(isAiBotAvailable())
@endif
--}} {{-- --}} {{-- check if stack has content --}} @if ($__env->yieldPushContent('chatRightSidebarAdditionalLinksAndButtons'))
{{ __tr('Links and buttons') }} @stack('chatRightSidebarAdditionalLinksAndButtons')
@endif {{-- stack the items in right sidebar at bottom --}} @stack('chatRightSidebarFooter')