Change some styling. Fix undefined array_key in functions and show overview values in yearly view.
Some checks failed
Build power-consumtion image / Build-and-release-image (push) Failing after 22s

This commit is contained in:
2025-10-15 17:56:51 +02:00
parent 46e24640b5
commit 9f72a69347
4 changed files with 45 additions and 8 deletions

View File

@@ -45,11 +45,11 @@ $chosen_date_time = new DateTime($chosen_date);
<title>Consumption values</title>
<link rel="stylesheet" href="/css/layout.css"/>
</head>
<body>
<form id="date_form" style="align-self: center; width: 500px; display: grid; grid-template-columns: 20% 20% 20% 20% 20%; gap: 10px;" action="/production.php" method="post">
<body style="max-width: 1000px; align-self: center; margin: 0 auto;">
<form id="date_form" style="display: grid; grid-template-columns: 20% 20% 20% 20% 20%; gap: 10px;" action="/production.php" method="post">
<?php
if ($dates['first'] < $chosen_date_time) {
echo "<button type='button' onclick='submit_form(\"" . $chosen_date_time->modify('-1 month')->format('Y-m') . "\")'><</button>";
echo "<button type='button' onclick='submit_form(\"" . $chosen_date_time->modify('-1 month')->format('Y-m') . "\")'><</button>\n";
} else {
echo '<span></span>';
}
@@ -66,7 +66,7 @@ $chosen_date_time = new DateTime($chosen_date);
</form>
<form action="production.php" method="post"
style="display: grid; grid-template-columns: 15% 12% 10% 10% 12%; gap: 2px 10px; margin-top: 10px; font-size: 1.3rem;">
style="display: grid; grid-template-columns: 20% 20% 20% 20% 20%; gap: 2px 10px; margin-top: 10px; font-size: 1.3rem; border-top: 2px solid gray; padding-top: 20px;">
<?php
foreach ($production_values as $daily_production) {
?>