<style type="text/css">
.new-bill {
    width: 95px !important;
    height: auto !important;
    line-height: 1.5 !important;
    padding: 0.275rem 0.5rem !important;
}
</style>
<div class="table-responsive">
    <table id="example" class="table table-bordered align-middle" style="width:100%">
        <thead class="table-light">
            <tr>

                <th class="thbutton">Sl No.</th>
                <th>Task Name</th>
                <th>Account</th>
                <th>Role</th>
                <th>Responsibility</th>
                <th>Reject Reason</th>
                <th class="thbutton"> Task Accepted Status</th>
                <th class="thbutton"> Edit</th>
                <th class="thbutton"> Delete</th>
            </tr>
        </thead>
        <tbody>
            @php $i=1;@endphp
            @if($task_teams->count() > 0)
            @foreach($task_teams as $list)
            <tr>
                <td class="text-center">{{$i++}}</td>
                <td class="text-left">{{$list->task_title}}</td>
                <td class="text-left">{{$list->name}}</td>
                <td class="text-left">{{$list->role}}</td>
                <td class="text-left">{{$list->responsibility}}</td>
                <td class="text-left">{{$list->reject_reason ?? 'N/A'}}</td>
                <td class="text-center">
                    <select class="form-select task_accepted_status" aria-label="task_accepted_status" name="task_accepted_status" id="task_accepted_status" data-id="{{ $list->id }}">
                        <option value="0" {{ $list->task_accepted_status == 0 ? 'selected' : '' }}>Pending</option>
                        <option value="1" {{ $list->task_accepted_status == 1 ? 'selected' : '' }}>Accepted</option>
                        <option value="2" {{ $list->task_accepted_status == 2 ? 'selected' : '' }}>Rejected</option>
                    </select>
                </td>

                <td class="thbutton">
                    <a data-id="{{ $list->id }}" class="btn btn-warning edit edit_task_teams" type="button"
                        data-bs-toggle="modal" data-bs-target="#commonModal" id="edit_task_teams">
                        <i class="bi bi-pencil-square text-white"></i>
                    </a>
                </td>

                <td class="thbutton">
                    <a data-url="{{ route('task-teams.destroy', $list->id) }}"
                        class="btn btn-danger deleteDataCustom" class="text-danger" data-bs-toggle="tooltip"
                        data-bs-placement="bottom" title="Delete">
                        <i class="bi bi-trash text-white"></i>
                    </a>
                </td>

            </tr>
            @endforeach
            @else
            <tr>
                <td colspan="10">No Data Found</td>
            </tr>
            @endif
        </tbody>

    </table>
</div>
<nav class="mt-2 row">
    <div class="col-lg-10 col-md-10 col-10 float-start">
    </div>
    <div class="col-lg-2 col-md-2 col-2 dataTables_length" id="example_length" style="text-align: right;">
        <i class="bi bi-funnel" style=" top: 11px;left: 20px;"></i>
        <select class="form-select sorting sorting-box" id="" name="example_length" aria-controls="example"
            style="padding-left: 30px;">
            <option value="10">Show: 10</option>
            <option value="30">Show: 30</option>
            <option value="50">Show: 50</option>
        </select>
    </div>
</nav>
</div>