12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- @extends('backend.layouts.app')
- @section('content')
- <div class="card">
- <div class="card-header">
- <h5 class="mb-0 h6">{{translate('Affiliate Logs')}}</h5>
- </div>
- <div class="card-body">
- <table class="table aiz-table mb-0">
- <thead>
- <tr>
- <th>#</th>
- <th data-breakpoints="lg">{{ translate('Referred By')}}</th>
- <th>{{ translate('Referral User')}}</th>
- <th>{{ translate('Amount')}}</th>
- <th data-breakpoints="lg">{{ translate('Order Id')}}</th>
- <th data-breakpoints="lg">{{ translate('Referral Type') }}</th>
- <th data-breakpoints="lg">{{ translate('Product') }}</th>
- <th data-breakpoints="lg">{{ translate('Note') }}</th>
- <th data-breakpoints="lg">{{ translate('Date') }}</th>
- </thead>
- <tbody>
- @foreach($affiliate_logs as $key => $affiliate_log)
- @if ($affiliate_log->user != null)
- <tr>
- <td>{{ ($key+1) + ($affiliate_logs->currentPage() - 1)*$affiliate_logs->perPage() }}</td>
- <td>
- {{ optional(\App\Models\User::where('id', $affiliate_log->referred_by_user)->first())->email }}
- </td>
- <td>
- @if($affiliate_log->user_id !== null)
- {{ optional($affiliate_log->user)->email }}
- @else
- {{ translate('Guest').' ('. $affiliate_log->guest_id.')' }}
- @endif
- </td>
- <td>{{ single_price($affiliate_log->amount) }}</td>
- <td>
- @if($affiliate_log->order_id != null)
- @if($affiliate_log->order != null)
- {{ optional($affiliate_log->order)->code }}
- @else
- {{ $affiliate_log->order_id }}
- @endif
- @else
- {{ optional($affiliate_log->order_detail->order)->code }}
- @endif
- </td>
- <td> {{ ucwords(str_replace('_',' ', $affiliate_log->affiliate_type)) }}</td>
- <td>
- @if($affiliate_log->order_detail_id != null && $affiliate_log->order_detail)
- {{ optional($affiliate_log->order_detail->product)->name }}
- @endif
- </td>
- <td>{{ $affiliate_log->note }} </td>
- <td>{{ $affiliate_log->created_at->format('d, F Y') }} </td>
- </tr>
- @endif
- @endforeach
- </tbody>
- </table>
- <div class="aiz-pagination">
- {{ $affiliate_logs->links() }}
- </div>
- </div>
- </div>
- @endsection
|