@extends('layouts.app')

@section('title')
    Perhitungan
@endsection

@section('content')

<div class="content px-3">

    @include('flash::message')

    <div class="clearfix"></div>

    {{-- Hasil Akhir --}}
    <div class="card mt-4">
        <div class="card-header">
            <h5>Hasil Akhir</h5>
        </div>
        <div class="card-body px-4">
            <div class="table-responsive">
                <table id="tabel_data" class="table table-striped table-bordered" width="100%">
                    <thead>
                        <tr>
                            <th>Nama</th>
                            <th>Nilai</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            @foreach ($hasilTopsis as $item)
                                <tr>
                                    <td>{{ $item->name }} ({{ $item->code }})</td>
                                    <td>{{ round($item->nilai, 3) }}</td>
                                </tr>
                            @endforeach
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>

</div>
@endsection