@extends('layouts.app_operasi')
@section('content')
@include('modal.hargaemas')


<div class="container">
    <div class="row justify-content-center">
        <div class="col-md-12">
            <div class="card">
               
                <nav aria-label="breadcrumb">
                    <ol class="breadcrumb pb-3">
                      <li class="breadcrumb-item"><a href="{{ url('/') }}">Home</a></li>
                      <li class="breadcrumb-item"><a href="{{ url('operasi/parameter') }}">Parameter</a></li>
                      <li class="breadcrumb-item active" aria-current="page">Margin Pembiayaan</li>
                    </ol>
                </nav>
                <div class="card-body text-center">
                    
                    <div class="mt-3">
                        
                        <table class='table table-striped table-hover' id='table-margin' style="width:100%;">
                            <thead class="thead-dark">
                                <tr>
                                    <th>Bil</th>
                                    <th>Taraf</th>
                                    <th>Margin</th>
                                    <th>Tindakan</th>
                                </tr>
                            </thead>
                            <tbody>
                                @foreach($margin_pembiayaan as $index=>$mp)
                                    <tr>
                                        <td>{{ $loop->iteration }}</td>
                                        <td>{{ strtoupper($mp['user_type']) }}</td>
                                        <td>{{ $mp['max'] . '%' }}</td>
                                        <td></td>
                                    </tr>
                                @endforeach
                            </tbody>
                        </table>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    var table_margin = $('#table-margin').DataTable();

    $.ajax({
        method:'GET',
        url: api_url + '/api/maxpinjaman',
        success:function(data){
            
        }
    });
</script>

@endsection
