Anons79 Mini Shell

Directory : /home/aplikasiposinfo/www/langganan.fixmate.id/resources/views/PembayaranAffiliaate/
Upload File :
Current File : /home/aplikasiposinfo/www/langganan.fixmate.id/resources/views/PembayaranAffiliaate/index.blade.php

@extends('app')

@section('content')
    <div class="page-heading">
        <h3>Riwayat Pembayaran Saldo Affiliate</h3>
    </div>
    <div class="page-content">
        <div style="min-height:100vh">


            <div class="card shadow">
                <div class="card-header">
                    @if(auth()->user()->hasRole('user'))
                        <a href="{{ route('pembayaran-affiliate.create') }}" class="btn btn-primary">
                            Permintaan Transfer
                        </a>
                    @endif
                </div>
                <div class="card-body">
                    <table class="table">
                        <thead>
                            <tr>
                                <th>
                                    Tanggal Permintaan
                                </th>
                                <th>
                                    Pengguna
                                </th>
                                <th>
                                    Jumlah Permintaan
                                </th>
                                <th>
                                    Bank
                                </th>
                                <th>
                                    Norek
                                </th>
                                <th>
                                    Atas Nama
                                </th>
                                <th>
                                    Status
                                </th>
                                @if(auth()->user()->hasRole('admin'))
                                    <th>
                                        Action
                                    </th>
                                @endif
                            </tr>
                        </thead>
                        <tbody>
                            @foreach ($datas as $data)
                                <tr>
                                    <td>
                                        {{ $data->created_at->format("Y-m-d H:i:s") }}
                                    </td>
                                    <td>
                                        {{ $data->user->profile->nama_lengkap }}
                                        @if(auth()->user()->hasRole('admin'))
                                            <p>{{ $data->user->profile->no_telp ?? "-" }}</p>
                                        @endif
                                    </td>
                                    <td>
                                        {{ number_format($data->jumlah_permintaan) }}
                                    </td>
                                    <td>
                                        {{ $data->bank }}
                                    </td>
                                    <td>
                                        {{ $data->norek }}
                                    </td>
                                    <td>
                                        {{ $data->atas_nama_norek }}
                                    </td>
                                    <td>
                                        @switch($data->status)
                                            @case("pending")
                                                <div class="badge rounded-pill text-bg-warning">PENDING</div>
                                                @break
                                        
                                            @default
                                                <div class="badge rounded-pill text-bg-success">TERBAYAR</div>
                                        @endswitch
                                    </td>
                                    @if(auth()->user()->hasRole('admin'))
                                        <td>
                                            @if ($data->status == "pending")
                                                <form action="{{ route('pembayaran-affiliate.update', $data->id) }}" method="POST">
                                                    @csrf
                                                    @method('PUT')
                                                    <button class="btn btn-success">Bayar</button>
                                                </form>
                                            @else
                                                Terbayar {{ $data->updated_at->format("Y-m-d H:i:s") }}
                                            @endif

                                        </td>
                                    @endif
                                </tr>
                            @endforeach
                        </tbody>
                    </table>
                </div>
            </div>
        </div>

@endsection

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]