@extends('layouts.app')

@section('content')
    <section class="page-header row">
        <h2> Payout Methods Fees </h2>
        <ol class="breadcrumb">
            <li><a href="{{ url('') }}"> Dashboard </a></li>
            <li class="active"> Payout Methods Fees</li>
        </ol>
    </section>

    <div class="page-content row">
        <div class="page-content-wrapper no-margin">
            <h3 class="section-title"> All Records </h3>
            <div class="sbox">

                <div class="sbox-content">
                    <!-- Toolbar Top -->
                    <div class="toolbar-top">
                        <div class="row">
                            <div class="col-lg-7 col-md-6">
                                <a href="{{ url('/manage/payoutmethodfees/create') }}" class="btn btn-primary btn-sm"
                                   title="{{ __('core.btn_create') }}"><i class=" fa fa-plus "></i> Create New </a>

                                @if($access['is_excel'] ==1)
                                    <div style="display: inline-flex">
                                        <button type="button" id="exportBtn" class="btn btn-success" onclick="moduleExport()" style="display: inline-flex; margin-left: 20px">Export CSV</button>
                                        <div id="exportError" class="text-danger" style="margin: auto 15px; display: none">Error while Exporting Data!</div>
                                    </div>
                                @endif
                            </div>

                            <div class="col-lg-5 col-md-6 text-right toolbar-right"></div>
                        </div>
                    </div>
                <!-- End Toolbar Top -->

                    <div class="row">
                        {!! (isset($search_map) ? $search_map : '') !!}
                    </div>

                    <!-- Table Grid -->
                    <div class="table-responsive">
                        <table class="table table-striped table-hover " id="storeDealsTable">
                            <thead>
                            <tr>
                                <th style="width: 3% !important;" class="number"> ID</th>
                                <th style="width: 10% !important;">{{ __('core.btn_action') }}</th>
                                <th> Payout Method Code</th>
                                <th> Type</th>
                                <th> Amount ($)</th>
                                <th> Min Amount ($)</th>
                                <th> Enabled</th>
                            </tr>
                            </thead>

                            <tbody>
                            @foreach ($rowData as $row)
                                <tr>
                                    <td> {{ $row['id'] }} </td>
                                    <td>
                                        <div class="actions">
                                            <ul class="actions-menu"
                                                style="list-style-type: none; margin: 0; padding-left: 0;">
                                                @if($access['is_edit'] ==1)
                                                    <li>
                                                        <a href="{{ url('/manage/payoutmethodfees/'.$row['id'].'/edit') }}"
                                                           data-toggle="tooltip"
                                                           class="tips action-edit  btn btn-sm btn-success btn-fs"
                                                           title="{{ __('core.btn_edit') }}"> <i class="fa fa-edit"></i>
                                                        </a>
                                                    </li>
                                                @endif
                                                {{--                                                <li>--}}
                                                {{--                                                    <a onclick="DeleteI('{{ $row->id }}');"--}}
                                                {{--                                                       class="tips action-delete btn btn-sm btn-danger btn-fs"--}}
                                                {{--                                                       data-toggle="tooltip" title="{{ __('core.btn_remove') }}"> <i class="fa fa-trash"></i>--}}
                                                {{--                                                    </a>--}}
                                                {{--                                                </li>--}}
                                            </ul>
                                        </div>
                                    </td>
                                    <td>{{$row['payout_method_code']}}</td>
                                    <td>{{$row['type']}}</td>
                                    <td>{{$row['amount']}}</td>
                                    <td>{{$row['min_amount']}}</td>
                                    <td>{{($row['enabled']) ? 'Yes' : 'No'}}</td>
                                </tr>
                            @endforeach
                            </tbody>
                        </table>
                        <input type="hidden" name="action_task" value=""/>
                    </div>
                </div>
            </div>
        </div>
    </div>

    {{--    <script>--}}
    {{--        function DeleteI(chkid) {--}}
    {{--            if (confirm('are u sure you want to delete this row?')) {--}}
    {{--                $.ajax({--}}
    {{--                    type: "DELETE",--}}
    {{--                    url: "/manage/payoutmethodfees" + chkid,--}}
    {{--                    success: function () {--}}
    {{--                        window.location.reload();--}}
    {{--                    }--}}
    {{--                });--}}
    {{--            }--}}
    {{--        }--}}
    {{--    </script>--}}
@stop
