This commit is contained in:
Filip Rojek 2025-01-31 16:21:18 +01:00
parent 60423d37ce
commit cfceee1ede

View File

@ -5,6 +5,14 @@
<section class="dashboard"> <section class="dashboard">
<h1>Welcome, <?= htmlspecialchars($_SESSION['user']['username']) ?>!</h1> <h1>Welcome, <?= htmlspecialchars($_SESSION['user']['username']) ?>!</h1>
<?php if(!isset($data['default_car'])) { ?>
<div id="intro">
<a href="/vehicles/create">Create your first vehicle</a>
</div>
<?php } else { ?>
<div id="actions"> <div id="actions">
<a href="/refuel/create" class="btn-green">Add new refuel record!</a> <a href="/refuel/create" class="btn-green">Add new refuel record!</a>
<a href="/vehicles" class="btn-primary">List all vehicles</a> <a href="/vehicles" class="btn-primary">List all vehicles</a>
@ -55,6 +63,7 @@
<b id="avg-fl-cnsmp"></b> <b id="avg-fl-cnsmp"></b>
</section> </section>
</div> </div>
<?php } ?>
</section> </section>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script> <script>