<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>
            {{$title}} - SIDIA Jakarta
        </title>
        <meta name="description" content="Marketing Dashboard">
        <meta name="csrf-token" content="{{ csrf_token() }}">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=no, minimal-ui">
        <!-- Call App Mode on ios devices -->
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <!-- Remove Tap Highlight on Windows Phone IE -->
        <meta name="msapplication-tap-highlight" content="no">

        <link rel="stylesheet" media="screen, print" href="{{asset('assets/css/vendors.bundle.css')}}">
        <link rel="stylesheet" media="screen, print" href="{{asset('assets/css/app.bundle.css')}}">
        <link rel="apple-touch-icon" sizes="180x180" href="{{ asset('assets/logo-dinas.ico') }}">
        <link rel="icon" type="image/png" sizes="32x32" href="{{ asset('assets/logo-dinas.ico') }}">
        <link rel="mask-icon" href="{{ asset('assets/logo-dinas.ico') }}" color="#5bbad5">
        <link rel="stylesheet" media="screen, print" href="{{asset('assets/css/fa-brands.css')}}">
        <link rel="stylesheet" type="text/css" href="{{asset('assets/css/bootstrap-table.min.css')}}">
        <link rel="stylesheet" href="{{asset('assets/css/sweetalert.min.css')}}">
        <link rel="stylesheet" href="{{asset('assets/css/toast.min.css')}}">
        <link rel="stylesheet" href="{{asset('assets/css/formplugins/select2/select2.bundle.css')}}">
        <link rel="stylesheet" href="{{asset('assets/css/custom.css')}}">
        <style type="text/css">
            .table-nobordered td,.table-nobordered th{
                border: none;
            }
            .info-card .info-card-text{
                text-shadow:none;
                color: #333!important;
                margin: 0px;
            }

            
        </style>
        @yield('page-css')
    </head>
    <body class="mod-bg-1 ">
      
        <div class="page-wrapper">
            <div class="page-inner">
                <!-- BEGIN Left Aside -->
                @include('include.sidebar')
                <!-- END Left Aside -->
                <div class="page-content-wrapper">
                    <!-- BEGIN Page Header -->
                    @include('include.header')
                    <!-- END Page Header -->
                    <!-- BEGIN Page Content -->
                    <!-- the #js-page-content id is needed for some plugins to initialize -->
                    <main id="js-page-content" role="main" class="page-content">
                        @include('include.alert')
                        @include('include.breadcrumbs')
                        @yield('content')
                    </main>
                    <!-- this overlay is activated only when mobile menu is triggered -->
                    <div class="page-content-overlay" data-action="toggle" data-class="mobile-nav-on"></div> <!-- END Page Content -->
                    <!-- BEGIN Page Footer -->
                    <footer class="page-footer" role="contentinfo">
                        <div class="d-flex align-items-center flex-1 text-muted">
                            <span class="hidden-md-down fw-700">{{date('Y')}} © Sekolah Adiwiyata by&nbsp;Dinas Lingkungan Hidup Provinsi DKI Jakarta</span>
                        </div>
                    </footer>
                </div>
            </div>
        </div>

        <script src="{{asset('assets/js/vendors.bundle.js')}}"></script>
        <script src="{{asset('assets/js/app.bundle.js')}}"></script>
        <script type="text/javascript" src="{{asset('assets/js/bootstrap-table.min.js')}}"></script>
        <script src="{{ asset('assets/js/sweetalert.min.js') }}"></script>
        <script src="{{asset('assets/js/toast.min.js')}}"></script>
        <script src="{{asset('assets/js/formplugins/select2/select2.bundle.js')}}"></script>
        
        <script>
            $(document).ready(function() {
                $('.select2').select2();
                $('.numberInput').on('input', function() {
                    this.value = this.value.replace(/[^0-9]/g, ''); // Hanya angka 0-9
                });
            });

            $('#changeYear').on('change',function(){
                var key = 'currYear';
                var val = $(this).val();
                $.ajax({
                    url: "{{route('modules.dashboard.session')}}", // replace with your URL endpoint
                    method: 'POST',
                    data: {
                    _token:'{{csrf_token()}}',
                    key: key, 
                    val: val
                    },
                    success: function(response) {
                    window.location.reload()
                    },
                });
                
        });

            @if (Session::get('message_type')=='invalid')
              toastr.error("{{ Session::get('message') }}", 'Error!', {positionClass: 'toast-bottom-right', containerId: 'toast-bottom-right'});
          @endif
          @if (Session::get('message_type')=='success')
              toastr.success("{{ Session::get('message') }}", 'Berhasil!', {positionClass: 'toast-bottom-right', containerId: 'toast-bottom-right'});
          @endif
          @if (Session::get('message_type')=='warning')
              toastr.warning("{{ Session::get('message') }}", 'Whoopss!', {positionClass: 'toast-bottom-right', containerId: 'toast-bottom-right'});
          @endif
          @if (Session::get('message_type')=='info')
              toastr.info("{{ Session::get('message') }}", 'Info!', {positionClass: 'toast-bottom-right', containerId: 'toast-bottom-right'});
          @endif

        </script>
        @yield('page-js')
    </body>
</html>
