@extends('layouts.app')

@section('title')

{{ Auth::user()->name }}

@parent

@stop

@section('header_styles')

<meta name="csrf_token" content="{{ csrf_token() }}">

<link href="{{ asset('assets/vendors/jasny-bootstrap/css/jasny-bootstrap.css') }}" rel="stylesheet"/>

<link href="{{ asset('assets/vendors/x-editable/css/bootstrap-editable.css') }}" rel="stylesheet"/>

<link href="{{ asset('assets/css/pages/user_profile.css') }}" rel="stylesheet"/>

<!-- custom styling -->
<link rel="stylesheet" href="{{ asset('dashboard/css/style.css') }}">

@stop





{{-- Page content --}}

@section('content')

<main id="users_ac"> 

  

  <!--section ends-->

            @if($user_consortia_counter->count() > 0)
      @include('includes.home-agent') 
            @else
      @include('includes.home-user')
               @endif

</main>

@stop



{{-- page level scripts --}}

@section('footer_scripts') 

<!-- Bootstrap WYSIHTML5 --> 

<script  src="{{ asset('assets/vendors/jasny-bootstrap/js/jasny-bootstrap.js') }}" type="text/javascript"></script> 

    <!-- bootstrap javascript cdn -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
        integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
        crossorigin="anonymous"></script>
    <!-- ApexChar cdn -->
    <script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>
    <!-- javascript file -->
    <script src="{{ asset('dashboard/js/app.js') }}"></script>

  <?php  
/*
        $customer = ''; $submissions=''; $published=''; $open_access='';
        foreach($data as $key => $value )
        {
          $customer = $customer."'".$key."' , ";
          $submissions = $submissions."'".$value['submissions']."' , ";
          $published = $published."'".$value['institute_content']."' , ";
          $open_access = $published."'".$value['openaccess_article']."' , ";
        }
          $customer = rtrim($customer, ' , ');
          $submissions = rtrim($submissions, ' , ');
          $published = rtrim($published, ' , ');
          $open_access = rtrim($open_access, ' , ');
          */
  ?>      

    <script type="text/javascript">
<?php /*

      var repeat_customer = {
    colors: ["#3346D3", "#F99C4E", "#F94F58"],
    series: [{
        name: 'Submissions',
        data: [<?=$submissions?>]
    }, {
        name: 'Published',
        data: [<?=$published?>]
    }, {
        name: 'Open Access',
        data: [<?=$open_access?>]
    }],
    chart: {
        type: 'bar',
        height: 350
    },
    plotOptions: {
        bar: {
            horizontal: false,
            columnWidth: '55%',
            endingShape: 'rounded'
        },
    },
    dataLabels: {
        enabled: false,
    },
    stroke: {
        show: true,
        width: 2,
        colors: ['transparent']
    },
    xaxis: {
        categories: [<?=$customer?>],
    },
    yaxis: {
        title: {
            text: 'No. of Submissions'
        }
    },
    fill: {
        opacity: 1
    },
    tooltip: {
        y: {
            formatter: function (val) {
               // return "$ " + val + " thousands"
                return val
            }
        }
    }
};
new ApexCharts(document.querySelector("#basic_column_chart"), repeat_customer).render();    
*/?>
    </script>

@stop

