HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhost/disk-apps/demo.sports-crowd.com/resources/views/academy/academy_reports.blade.php
@extends('modules.head') @section('contenido')
<style>
  a:hover,
  a:active,
  a:focus {
    outline: none;
    text-decoration: none;
    color: #797D7F !important;
  }
</style>


<div class="box-header">

</div>
<h3>
  <a class="ruta" class="" href="{{ url('/academy_user') }}">{{ Lang::get('messages.academy_users.title') }} </a>
  <span class="separador-ruta">|</span>
  <a class="ruta" class="" href="{{ url('/academy_user/performance_reports/' . $academyUser->id) }}">{{ Lang::get('messages.academy_reports.title_1') }}</a>
</h3>

<!-- List Data -->
<div class="box">
  <div class="box-header">
    <h3 class="box-title">{{ Lang::get('messages.academy_reports.title_1')}} ➜ {{ $academyUser->student_name . ' ' . $academyUser->student_last_name }}</h3>
  </div>

  <!-- /.box-header -->
  <div class="box-body table-responsive ">
    <table id="example2" class="table table-bordered table-hover dataTable" role="grid" aria-describedby="example2_info">
      <thead>
        <tr role="row">
          <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ Lang::get('messages.academy_reports.title_3') }}</th>
          <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ Lang::get('messages.academy_reports.title_4') }}</th>
          <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ Lang::get('messages.academy_reports.title_5') }}</th>
          <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending"></th>
        </tr>
      </thead>
    </table>
  </div>
  <!-- /.box-body -->
</div>
@endsection
<script src="{{ asset('js/jQuery/jquery-2.2.3.min.js') }}"></script>
<script src="{{ asset('js/crud.js') . '?v=' . time() }}"></script>
<script src="{{ asset('js/academy_document.js') . '?v=' . time() }}"></script>
<script src="{{ asset('js/bootstrap/js/bootstrap.min.js') }}"></script>
<script type="text/javascript">
  $(document).ready(function() {
    _table = $('#example2').DataTable({
      responsive: true,
      processing: true,
      serverSide: true,
      order: [],
      language: {
        url: window.DATATABLES_LANGUAGE_URL,
      },
      ajax: '/academy_user/filter/{{$academyUser->id}}',
      columns: [
        {
          data: 'link',
          fnCreatedCell: function(nTd, sData, oData, iRow, iCol) {
            return sData ? $(nTd).html("<a href='" + sData + "' target='_blank'>Ver documento</a>") : "";
          },
          name: 'link'
        },
        {
          data: 'period',
          name: 'period'
        },
        {
          data: 'admin_id',
          render: function(data, type, row) {
            return row.admin.first_name + ' ' + row.admin.last_name;
          },
        },
        {
          data: 'actions',
          name: 'actions'
        },
      ]
    });

    $('#btn-info-busqueda').on('click', function() {
      $('#menuBusqueda').toggle();
    });
  });

  var deleteReport = function (idUser, idReport) {
    var info = {
        "id": idReport
    };
    swal(Lang.get("messagesClient.academy_reports.delete_question"), {
        buttons: {
            cancel: "No",
            Ok: true,
        }
    }).then((val) => {
      if (val == "Ok") {
        $.ajax({
          url: `/academy_user/${idUser}/performance_reports/${idReport}`,
          type: "DELETE",
          contentType: 'application/json',
          headers: {
            'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content'),
            'Content-Type': 'application/json'
          },
          success: function (data, status, xhr) {
            console.log(data, status, xhr);
            if (xhr.status === 204) {
              swal("borrado", {
                closeOnClickOutside: false,
                icon: "success",
                buttons: {
                  Ok: true,
                }
              }).then((val) => {
                if (val == "Ok") {
                  location.reload();
                }
              });
            } else {
                swal("Error", Lang.get("messagesClient.user_admin_tag9"), "error");
            }
          }, error: function (e) {
              swal("Error", Lang.get("messagesClient.user_admin_tag9"), "error");
          }
        });
      }
    });
  }
</script>