Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
f39c902ace | |||
ff26644f06 | |||
5f63092a67 |
@ -154,12 +154,12 @@ function updateTotalNutrition() {
|
||||
|
||||
// Durchlaufen aller Zeilen in der Haupttabelle und Addition der Werte
|
||||
Array.from(document.getElementById('nutrition-table').rows).slice(1).forEach(row => {
|
||||
totalKcal += parseFloat(row.cells[2].innerText);
|
||||
totalEw += parseFloat(row.cells[3].innerText);
|
||||
totalFett += parseFloat(row.cells[4].innerText);
|
||||
totalKh += parseFloat(row.cells[5].innerText);
|
||||
totalBst += parseFloat(row.cells[6].innerText);
|
||||
totalCa += parseFloat(row.cells[7].innerText);
|
||||
totalKcal += parseFloat(row.cells[4].innerText);
|
||||
totalEw += parseFloat(row.cells[4].innerText);
|
||||
totalFett += parseFloat(row.cells[5].innerText);
|
||||
totalKh += parseFloat(row.cells[6].innerText);
|
||||
totalBst += parseFloat(row.cells[7].innerText);
|
||||
totalCa += parseFloat(row.cells[8].innerText);
|
||||
});
|
||||
|
||||
// Rundung und Aktualisierung der Gesamtwerte
|
||||
@ -220,8 +220,8 @@ function updateTotalNutrition() {
|
||||
<th>CA</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<t>Gesamtwerte</td>
|
||||
<td></td>-</td>
|
||||
<td>Gesamtwerte</td>
|
||||
<td>-</td>
|
||||
<td id="total-kcal">0</td>
|
||||
<td id="total-ew">0</td>
|
||||
<td id="total-fett">0</td>
|
||||
|
@ -25,7 +25,7 @@
|
||||
}
|
||||
|
||||
function addNutritionEntry() {
|
||||
|
||||
getBearerToken(token => {
|
||||
const form = document.getElementById('nutrition-form');
|
||||
const formData = new FormData(form);
|
||||
|
||||
@ -52,6 +52,7 @@
|
||||
|
||||
// Deaktiviere den "Hinzufügen"-Button wieder
|
||||
document.getElementById('submit-button').disabled = true;
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user