@extends('admin.index')
@section('content')


<!-- Responsive Datatable -->
<section id="responsive-datatable">
    <div class="row">
        <div class="col-12">
            <div class="notes">
                <h4 style="margin: 10px"> {{trans('general.todays_notes')}}</h4>
                <div class="card">
                    <table class="table table-hover">
                        <thead>
                        <tr>
                            <th scope="col">#</th>
                            <th scope="col">{{trans('general.responsible')}}</th>
                            <th scope="col">{{trans('general.student')}}</th>
                            <th scope="col">{{trans('general.type')}}</th>
                            <th scope="col">{{trans('general.title')}}</th>
                        </tr>
                        </thead>
                        <tbody>
                            @foreach ($notes as $note)
                            <tr>
                                <th scope="row">{{ $loop->iteration }}</th>
                                <td>{{ $note->user->first_name . '' . $note->user->last_name }}</td>
                                <td>{{ $note->student->first_name ." ". $note->student->last_name }}</td>
                                <td>{{ trans('general.'.$note->type->code) }}</td>
                                <td>{{ $note->type->title }}</td>
                            </tr>
                            @endforeach
                        </tbody>
                    </table>
                </div>
        </div>

        <div class="exams">
            <h4 style="margin: 10px"> {{trans('general.todays_exams')}}</h4>
            <div class="card">
                <table class="table table-hover">
                    <thead>
                    <tr>
                        <th scope="col">#</th>
                        <th scope="col">{{trans('general.responsible')}}</th>
                        <th scope="col">{{trans('general.title')}}</th>
                        <th scope="col">{{trans('general.division')}}</th>
                        <th scope="col">{{trans('general.level')}}</th>
                        <th scope="col">{{trans('general.material')}}</th>
                    </tr>
                    </thead>
                    <tbody>
                        @foreach ($exams as $exam)
                        <tr>
                            <th scope="row">{{ $loop->iteration }}</th>
                            <td>{{ $note->user->first_name . '' . $note->user->last_name }}</td>
                            <td>{{ $exam->title }}</td>
                            <td>{{ $exam->division->title }}</td>
                            <td>{{ $exam->studyMaterial->level->title }}</td>
                            <td>{{ $exam->studyMaterial->title }}</td>
                        </tr>
                        @endforeach
                    </tbody>
                </table>
            </div>
        </div>

        <div class="exams">
            <h4 style="margin: 10px"> {{trans('general.todays_work_sheet')}}</h4>
            <div class="card">
                <table class="table table-hover">
                    <thead>
                    <tr>
                        <th scope="col">#</th>
                        <th scope="col">{{trans('general.responsible')}}</th>
                        <th scope="col">{{trans('general.title')}}</th>
                        <th scope="col">{{trans('general.division')}}</th>
                        <th scope="col">{{trans('general.work_sheet')}}</th>
                    </tr>
                    </thead>
                    <tbody>
                        @foreach ($workSheets as $workSheet)
                        <tr>
                            <th scope="row">{{ $loop->iteration }}</th>
                            <td>{{ $workSheet->user->first_name . '' . $workSheet->user->last_name }}</td>
                            <td>{{ $workSheet->title }}</td>
                            <td>{{ $workSheet->division->title }}</td>
                           <td> <a class="action-row" target="_blank" title="تحميل" href="https://sama-alashrafia.net/portal/{{ $workSheet->attachments }}">
                                <i class="fas fa-cloud-download-alt"></i> تحميل
                                </a>
                           </td>
                        </tr>
                        @endforeach
                    </tbody>
                </table>
            </div>
    </div>
        </div>
    </div>
</section>
<!--/ Responsive Datatable -->


@push('scripts')

<script src="{{ url('design') }}/app-assets/vendors/js/tables/datatable/jquery.dataTables.min.js"></script>
<script src="{{ url('design') }}/app-assets/vendors/js/tables/datatable/dataTables.bootstrap5.min.js"></script>
<script src="{{ url('design') }}/app-assets/vendors/js/tables/datatable/dataTables.responsive.min.js"></script>
<script src="{{ url('design') }}/app-assets/vendors/js/tables/datatable/responsive.bootstrap5.js"></script>
@endpush

@push('header')


<link rel="stylesheet" type="text/css" href="{{ url('design') }}/app-assets/vendors/css/vendors-rtl.min.css">
<link rel="stylesheet" type="text/css" href="{{ url('design') }}/app-assets/vendors/css/tables/datatable/dataTables.bootstrap5.min.css">
<link rel="stylesheet" type="text/css" href="{{ url('design') }}/app-assets/vendors/css/tables/datatable/responsive.bootstrap5.min.css">
<link rel="stylesheet" type="text/css" href="{{ url('design') }}/app-assets/vendors/css/pickers/flatpickr/flatpickr.min.css">



<link rel="stylesheet" type="text/css" href="{{ url('design') }}/app-assets/css-rtl/bootstrap.css">
<link rel="stylesheet" type="text/css" href="{{ url('design') }}/app-assets/css-rtl/bootstrap-extended.css">
<link rel="stylesheet" type="text/css" href="{{ url('design') }}/app-assets/css-rtl/colors.css">
<link rel="stylesheet" type="text/css" href="{{ url('design') }}/app-assets/css-rtl/components.css">
<link rel="stylesheet" type="text/css" href="{{ url('design') }}/app-assets/css-rtl/themes/dark-layout.css">
<link rel="stylesheet" type="text/css" href="{{ url('design') }}/app-assets/css-rtl/themes/bordered-layout.css">
<link rel="stylesheet" type="text/css" href="{{ url('design') }}/app-assets/css-rtl/themes/semi-dark-layout.css">


<style>
    table.dataTable>thead .sorting:before, table.dataTable>thead .sorting_asc:before, table.dataTable>thead .sorting_desc:before, table.dataTable>thead .sorting_asc_disabled:before, table.dataTable>thead .sorting_desc_disabled:before {
    right: 0.45rem;
}
</style>
@endpush
@endsection