@extends('mobile.layouts.app')

@section('content')
<div id="interest" class="container-fluid">
    <h5>대출 금리</h5>
    <hr/>

    <dl>
        <dd>한국수출입은행이 제공하는 대출 금리입니다.</dd>
    </dl>

    <div class="row mb-3">
        <div class="col-auto">
            <form name="f_service_interest" id="fServiceInterest" action="{{ route('service.financial.interest') }}" method="get" accept-charset="UTF-8">
                @csrf
                <div class="row g-2">
                    <label for="date" class="col-auto col-form-label">기준일</label>
                    <div class="col">
                        <input type="text" name="date" id="date" class="form-control date-picker" value="{{ $date }}" />
                    </div>
                    <div class="col-auto">
                        <button type="submit" class="btn btn-dark">검색</button>
                    </div>
                </div>
            </form>
        </div>
    </div>

    <div class="table-responsive">
        <table class="table table-hover table-bordered table-nowrap w-auto">
            <thead>
                <tr>
                    <th>No</th>
                    <th>대출기간</th>
                    <th>고정기준금리</th>
                </tr>
            </thead>
            <tbody>
                @if($total > 0)
                    @foreach($list as $row)
                    <tr>
                        <td>{{ $loop->iteration }}</td>
                        <td>{{ $row->sfln_intrc_nm }}</td>
                        <td>{{ $row->int_r }}</td>
                    </tr>
                    @endforeach
                @else
                    <tr>
                        <td colspan="3">
                            No data.
                        </td>
                    </tr>
                @endif
            </tbody>
        </table>
    </div>
</div>
@endsection
