@extends('voyager::master') @section('page_title', 'Merchant') @section('page_header') @stop @section('content') @include('_partials.alerts')
@if (isset($agents['params']) && $agents['params']->pluck('walletId')->filter()->isNotEmpty()) @endif @foreach ($agents['params'] as $index => $agent) @if ($agent['walletId'] ?? false) @else @endif @endforeach
{{ __('datatable.sn') }} {{ __('merchant.name') }} {{ __('merchant.type')}} {{ __('datatable.cr_number') }} {{ __('datatable.auth_person') }} {{ __('form.dob') }} {{ __('voyager::form.mobile_number') }} {{ __('datatable.registration_date') }}{{ __('datatable.wallet_id') }}{{ __('datatable.current_balance') }} {{ __('datatable.status') }} {{ __('voyager::generic.actions') }}
{{ $index + 1 }} {{ checkAndReturnValue($agent, 'company_name') }} {{ checkAndReturnValue($agent, 'company_sector_type') }} {{ checkAndReturnValue($agent, 'commercial_reg_number') }} {{ checkAndReturnValue($agent, 'ar_name') }} {{ checkAndReturnValue($agent, 'dob') }} {{ checkAndReturnValue($agent, 'mobile_number') }} {{ formatTimestamp(checkAndReturnValue($agent, 'registration_date'), 'd-m-Y H:i:s') }} {{ checkAndReturnValue($agent, 'walletId') }} {{ checkAndReturnValue($agent, 'wallet_id') }} {{ format_number(checkAndReturnValue($agent, 'current_balance')) }} @php $statusKey = strtolower( \App\Enums\Status::getStr(checkAndReturnValue($agent, 'status')), ); @endphp {{ __('datatable.' . $statusKey) }} @if (hasPermission('read', 'Merchant')) {{ __('voyager::generic.view') }} @endif @if (hasPermission('edit', 'Merchant')) @if (!in_array(strtoupper($statusKey), ['ACTIVE', 'VERIFIED'])) {{ __('voyager::generic.edit') }} @endif @endif
@stop @section('javascript') @stop