@extends('layouts.app')

@section('content')
    <div class="container">
        <div class="row justify-content">
            <div class="col">
                <table class="table table-bordered table-hover table-sm table-striped">
                    <tbody>
                    <tr>
                        <th>名稱</th>
                        <td>{{ $client->name }}</td>
                    </tr>
                    <tr>
                        <th>專案
                            <a href="{{ route('adm.project.index', ['client_id' => $client->id]) }}" class="btn btn-sm btn-outline-primary">
                                <i class="bi bi-eye"></i>
                            </a>
                        </th>
                        <td>
                            <table class="table table-striped">
                                <thead>
                                <tr>
                                    <th>名稱</th>
                                    <th>金額</th>
                                </tr>
                                </thead>
                                <tbody>
                                @foreach($client->projects as $project)
                                    <tr>
                                        <td>{{ $project->title }}</td>
                                        <td>{{ $project->price }}</td>
                                    </tr>
                                @endforeach
                                </tbody>
                            </table>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
@endsection
