@extends('layouts.master')

@section('title', __('Deposits'))
@push('styles')
    <link href="{{ asset('frontend/styles/css/deposit-index.css') }}" rel="stylesheet">
@endpush


@section('content')

<div class="card">
    <div class="card-header p-0 d-flex justify-content-between" style="padding: 0px !important;">
        <ul class="nav nav-pills profile-nav" id="myTab" role="tablist" style="border-bottom:none !important;">
            @foreach($depositCurrency as $key => $row)
                <li class="nav-item">
                    <button class="btn nav-link currency_tab {{ $key === 0 ? 'active bg-primary text-white' : '' }}" id="tab_{{$row->abbreviation}}" data-id="{{$row->id}}" data-type="{{$row->type}}" data-abbreviation="{{$row->abbreviation}}" href="" data-toggle="tab" role="tab" aria-controls="" aria-selected="{{ $key === 0 ? 'true' : 'false' }}" style="border:1px solid;margin:5px;line-height:10px;">
                        {{ $row->abbreviation }}
                    </button>
                </li>
            @endforeach
        </ul>
    </div>
    <div class="card-body">
        <div class="row">
            <div id="normal-table user_tables_ajax">
                <div id="custom_toolbar_user" class="d-flex justify-content-between align-items-center">
                    <a class="btn btn-secondary text-white mr-1 btnNewRecord" data-toggle="tooltip" id="btnNewOption" data-placement="top" title="Add New" href="javascript:void(0);"> {!! renderIconHtml('add') !!}{{ __('Add New') }}</a>
                </div>
                <div class="table-responsive user_tables">
                    <table class="table table-bordered table-striped" id="bstable" data-toggle="table" table-for="deposit"
                        data-ajax="ajaxRequest" data-side-pagination="server" data-pagination="true" data-show-button-text="true"
                        data-total-field="count" data-data-field="items" data-show-columns="true"
                        data-show-toggle="false" data-show-export="false" data-filter-control="true"
                        data-show-columns-toggle-all="false" data-sticky-header="true" data-sticky-header-offset-y="170"
                        data-icons="icons"
                        data-icons-prefix="bi" data-show-search-clear-button="true"
                        data-toolbar="#custom_toolbar_user" data-loading-template="DataTaleLoadingTemplate" data-search-on-enter-key="true">
                        <thead>
                            <tr>
                                <th data-field="counter" data-width-unit="px">{{ __('#') }}</th>
                                <th data-field="reference_no" data-filter-control="input"  data-sortable="false"  data-filter-control-placeholder="Reference No">{{ __('Reference No') }}</th>
                                <th data-field="amount" data-filter-control="input" data-sortable="true"  data-filter-control-placeholder="Amount">{{ __('Amount') }}</th>
                                <th data-field="exchange_amount" data-filter-control="input" data-sortable="false"  data-filter-control-placeholder="Euro Amount">{{ __('Euro Amount') }}</th>
                                <th data-field="transfer_to" data-filter-control="select" data-filter-data="var:depositoption" data-sortable="false"  data-filter-control-placeholder="Transfer To">{{ __('Transfer To') }}</th>
                                <th data-field="transaction_id" data-filter-control="input" data-sortable="false"  data-filter-control-placeholder="Transaction Id">{{ __('Transaction Id') }}</th>
                                <th data-field="sender_address" data-filter-control="input" data-sortable="false"  data-filter-control-placeholder="Sender Address">{{ __('Sender Address') }}</th>
                                <th data-field="receiver_address" data-filter-control="input" data-sortable="false"  data-filter-control-placeholder="Receiver Address">{{ __('Receiver Address') }}</th>
                                <th data-field="image" class="text-center" data-sortable="false">{{ __('Proof Of Payment') }}</th>
                                <th data-field="status" data-filter-control="select" data-sortable="true"  data-filter-data="var:deposit_status" data-formatter="depositStatusFormat" data-filter-control-placeholder="Status">{{ __('Status') }}</th>
                                <th data-field="reason" data-filter-control="input" data-sortable="true"  data-filter-control-placeholder="Reason">{{ __('Reason') }}</th>
                                <th data-field="created_at" data-filter-control="input" data-sortable="true"  data-filter-control-placeholder="Created Date">{{ __('Created Date') }}</th>
                            </tr>
                        </thead>
                        <tbody>

                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<input type="hidden" value="{{ route('member.deposit.allDeposit') }}" id="depositAll">

@endsection
@push('scripts')
    <script>
        var depositCurrency =  JSON.parse('{!! json_encode($currency ?? []) !!}');
        var depositoption =  JSON.parse('{!! json_encode($depositoption ?? []) !!}');
    </script>
    <script src="{{ asset('frontend/js/web3.min.js') }}"></script>
    <script src="{{ asset('frontend/js/page-js/deposit-index-blade.js') }}"></script>
@endpush
