@php $u = auth()->user(); $cfg = $u?->current_workspace_id ? \App\Models\WaProviderConfig::query()->forWorkspace($u->current_workspace_id)->first() : null; $sf = $u?->current_workspace_id ? \App\Models\WaStorefront::where('workspace_id', $u->current_workspace_id)->first() : null; @endphp
@include('user.store._sidebar', ['current' => 'groups', 'cfg' => $cfg, 'sf' => $sf])
{{ __('Store / Groups') }}

{{ __('WhatsApp Groups') }}

{{ __('Groups your connected number belongs to. When an order is confirmed, :brand posts it into the customer\'s group and @mentions them. Add your number to a group on WhatsApp — it appears here automatically.', ['brand' => brand_name()]) }}

@if (session('status'))
{{ session('status') }}
@endif @error('group_code')
{{ $message }}
@enderror {{-- KPIs --}}
{{ __('Groups synced') }}
{{ number_format($total) }}
{{ __('With ordering code') }}
{{ number_format($coded) }}
{{ __('Bot number') }}
{{ $bot ? '+' . $bot : __('— connect a device') }}
@forelse ($groups as $g) @empty @endforelse
{{ __('Group') }} {{ __('Members') }} {{ __('Bot device') }} {{ __('Synced') }} {{ __('Ordering code') }}
{{ $g->subject ?: __('(unnamed group)') }}
{{ $g->group_jid }}
{{ number_format($g->size) }} {{ $g->device_phone ? '+' . $g->device_phone : '—' }} {{ $g->synced_at ? $g->synced_at->diffForHumans() : '—' }} @csrf @method('PUT') @if ($bot && $g->group_code) @php $link = 'https://wa.me/' . $bot . '?text=' . rawurlencode('ORDER G:' . $g->group_code); @endphp @endif
{{ __('No groups synced yet') }}

{{ __('Add your connected WhatsApp number to a group, then send any message in that group. :brand mirrors the group here within a minute (Unofficial API only).', ['brand' => brand_name()]) }}

@if ($groups->hasPages())
{{ $groups->links() }}
@endif
{{ __('How ordering codes work') }}
{{ __('Give a group a short code (e.g. ACME), then share its ordering link. When a customer taps it and confirms an order, :brand posts the order straight into that exact group and @mentions them — even if they belong to several groups.', ['brand' => brand_name()]) }}