@extends('layout.app')
@section('content')

<div class="flex flex-col mt-2">
    <div class=" bg-white p-2 rounded-lg">
        <div class="card">


                <div class="row">
                    <div class="form-group col-md-6">

                            <div class="card-body">

                                <h3>Customer Info</h3>
                                    <table class="table no-border">
                                        <tbody >
                                            <tr>
                                                <td>Client Name</td>
                                                <td>:</td>
                                                <td>{{$token->clients->clientsinfo->clients_name ?? "Name yet to Add "}}</td>
                                            </tr>
                                            <tr>
                                                <td>User Id</td>
                                                <td>:</td>
                                                <td>{{$token->clients->userid }}</td>
                                            </tr>
                                            <tr>
                                                <td>Pop</td>
                                                <td>:</td>
                                                <td>{{$token->clients->pop->popname }}</td>
                                            </tr>
                                            <tr>
                                                <td>Reporter Contact No</td>
                                                <td>:</td>
                                                <td>{{$token->reporterContact }}</td>
                                            </tr>
                                        </tbody>
                                    </table>
                            </div>


                    </div>

                    <div class="form-group col-md-6">

                        <div class="card-body">

                            <h3>Token Info</h3>
                                <table class="table no-border">
                                    <tbody >
                                        <tr>
                                            <td>Token Code</td>
                                            <td>:</td>
                                            <td>{{$token->Code->tokenCode}}</td>
                                        </tr>
                                        <tr>
                                            <td>Token Category</td>
                                            <td>:</td>
                                            <td>{{$token->category->tokenCategory }}</td>
                                        </tr>
                                        <tr>
                                            <td>Token Description</td>
                                            <td>:</td>
                                            <td>{{$token->description }}</td>
                                        </tr>
                                        <tr>
                                            <td>Assign To </td>
                                            <td>:</td>
                                            <td>{{$token->employees->name }}</td>
                                        </tr>
                                        <tr>
                                            <td>Assign Time </td>
                                            <td>:</td>
                                            <td>{{$token->assign_time }}</td>
                                        </tr>
                                        <tr>
                                            <td>Close Time </td>
                                            <td>:</td>
                                            <td>{{$token->close_time }}</td>
                                        </tr>
                                    </tbody>
                                </table>
                        </div>


                    </div>

                    <div class="form-group col-md-6">

                        <div class="card-body">

                            <h3>Token Notes</h3>
                                <table class="table no-border">
                                    <thead>
                                        <tr>
                                            <th>Created At</th>
                                            <th>Created By</th>
                                            <th>Not for</th>
                                            <th>Notes</th>
                                        </tr>
                                    </thead>
                                    <tbody >
                                        @foreach ($token->notes as $note)
                                            <tr>
                                                <td>{{$note->created_at }}</td>
                                                <td>{{$note->user->name }}</td>
                                                <td>{{$note->note_type }}</td>
                                                <td>{{$note->note }}</td>
                                            </tr>
                                        @endforeach

                                    </tbody>
                                </table>
                        </div>


                    </div>

                </div>

        </div>

    </div>
</div>


@endsection
