<?php
// index.php – Dashboard Startseite (lädt Teil-HTMLs wie die Auftragsliste, ohne Auto-Refresh)
require('../config.php');
require('../EpiApi.php');
?>
<!DOCTYPE html>
<html lang="de">
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
    <title>Dashboard - EpiWebview</title>

    <!-- Styles -->
    <link href="css/styles.css" rel="stylesheet" />
    <link href="https://cdn.datatables.net/1.10.20/css/dataTables.bootstrap4.min.css" rel="stylesheet" crossorigin="anonymous" />

    <!-- JS (nur 1x jQuery laden) -->
    <script src="js/jquery-3.5.1.min.js"></script>
    <script src="https://kit.fontawesome.com/93d71de8bc.js" crossorigin="anonymous"></script>

    <style>
      .opacity-50 { opacity: .5; }
      .card .h2, .card .display-4 { font-weight: 700; }
      .kpi-updated { font-size: .82rem; opacity: .85; }
    </style>

    <script>
      // Einmalige Loads – analog zur Auftragsliste
      $(function () {
        loadSidenav();
        loadFooter();
       
      });

      function loadSidenav() {
        $('#layoutSidenav_nav').load('../sources/getSidenav.php');
      }

      function loadFooter() {
        $('#footerholder').load('../sources/getFooter.php');
      }

     
    </script>
  </head>

  <body class="sb-nav-fixed">
    <nav class="sb-topnav navbar navbar-expand navbar-dark bg-dark">
      <a class="navbar-brand" href="index.php">Epi Webview</a>
      <button class="btn btn-link btn-sm order-1 order-lg-0" id="sidebarToggle"><i class="fas fa-bars"></i></button>
    </nav>

    <div id="layoutSidenav">
      <div id="layoutSidenav_nav"></div>
      <div id="layoutSidenav_content">
        <main>
          <div class="container-fluid">
            <h1 class="mt-4">Dashboard</h1>
            <ol class="breadcrumb mb-4">
              <li class="breadcrumb-item active">Dashboard</li>
            </ol>

          

            

          
          </div>
        </main>
        <div id="footerholder"></div>
      </div>
    </div>

    <!-- Bootstrap Bundle (Popper inkl.) -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
  </body>
</html>
