This commit is contained in:
2026-04-14 10:52:49 +02:00
parent 0a5f7be8a0
commit c453f617e8
6 changed files with 151 additions and 97 deletions
+25 -25
View File
@@ -286,21 +286,21 @@
<!-- This link should ONLY wrap the text below -->
<a href="{% url 'clients_list' %}" class="btn btn-outline-primary">
&#8678; Go to Clients
&#8678; Zur Startseite
</a>
<!-- 6-Month overview card (OUTSIDE any <a>) -->
<div class="overview-card">
<div class="overview-title">Helium Input 6 Month Overview</div>
<div class="overview-title">Heliumrückgabe Überblick über 6 Monate</div>
{% if overview %}
<div class="overview-subtitle">
Period:
Interval
<strong>
{{ overview.start_month }}/{{ overview.start_year }}
{{ overview.end_month }}/{{ overview.end_year }}
</strong>
(selected on the main page)
(ausgewählt am Start Seite)
</div>
<table class="overview-table">
@@ -310,7 +310,7 @@
{% for g in overview.groups %}
<th>{{ g.label }}</th>
{% endfor %}
<th>Month total</th>
<th>Monat total</th>
</tr>
</thead>
<tbody>
@@ -342,7 +342,7 @@
<h2>Helium Input</h2>
<div class="table-container">
<button class="add-row-btn" id="add-row-one">Add Row</button>
<button class="add-row-btn" id="add-row-one">Eingabe hinzufügen</button>
<table id="table-one">
<colgroup>
<col style="width: 3%"> <!-- # -->
@@ -367,7 +367,7 @@
<th>#</th>
<th>ID</th>
<th>Institute</th>
<th>Client</th>
<th>Kunde</th>
<th>Druck</th>
<th>Reinheit</th>
<th>Druckkorrektur</th>
@@ -377,8 +377,8 @@
<th>L-He</th>
<th>L-He zus.</th>
<th>L-He ges.</th>
<th>Date</th>
<th>Month</th>
<th>Datum</th>
<th>Monat</th>
<th>Actions</th>
</tr>
</thead>
@@ -409,8 +409,8 @@
{% endif %}
</td>
<td class="actions">
<button class="edit-btn-one">Edit</button>
<button class="delete-btn-one">Delete</button>
<button class="edit-btn-one">Bearbeiten</button>
<button class="delete-btn-one">Löschen</button>
</td>
</tr>
{% endfor %}
@@ -522,7 +522,7 @@
<!-- Client Selection -->
<label for="edit-client-id">Kunde:</label>
<select id="edit-client-id" disabled>
<option value="">Select Institute first</option>
<option value="">Institut erstmal auswählen</option>
{% for client in clients %}
<option value="{{ client.id }}" data-institute="{{ client.institute.id }}">{{ client.name }}</option>
{% endfor %}
@@ -708,19 +708,19 @@
const instituteId = $('#add-institute-id').val();
if (!instituteId) {
alert('Please select an institute');
alert('Institut erstmal auswählen');
return;
}
if (!clientId) {
alert('Please select a client');
alert('Kunde erstmal auswählen');
return;
}
// Validate date first
let dateInput = $('#add-date').val();
if (!dateInput) {
alert('Please select a date');
alert('Datum erstmal auswählen');
return;
}
@@ -732,17 +732,17 @@
let gesFlaschInhalt = parseFloat($('#add-constant-300').val()) || 300.0;
if (isNaN(pressure) || pressure < 0) {
alert('Please enter a valid pressure value');
alert('Bitte geben Sie einen gültigen Druckwert ein.');
return;
}
if (isNaN(purity) || purity < 0 || purity > 100) {
alert('Please enter a valid purity value (0-100)');
alert('Bitte geben Sie einen gültigen Reinheitswert ein (0-100).');
return;
}
if (isNaN(druckkorrektur) || druckkorrektur < 0) {
alert('Please enter a valid Druckkorrektur value');
alert('Bitte geben Sie einen gültigen Druckkorrekturwert ein');
return;
}
@@ -875,12 +875,12 @@
const instituteId = $('#edit-institute-id').val();
if (!instituteId) {
alert('Please select an institute');
alert('Institut erstmal auswählen');
return;
}
if (!clientId) {
alert('Please select a client');
alert('Kunde erstmal auswählen');
return;
}
@@ -892,17 +892,17 @@
let gesFlaschInhalt = parseFloat($('#edit-constant-300').val()) || 300.0;
if (isNaN(pressure) || pressure < 0) {
alert('Please enter a valid pressure value');
alert('Bitte geben Sie einen gültigen Druckwert ein.');
return;
}
if (isNaN(purity) || purity < 0 || purity > 100) {
alert('Please enter a valid purity value (0-100)');
alert('Bitte geben Sie einen gültigen Reinheitswert ein (0-100).');
return;
}
if (isNaN(druckkorrektur) || druckkorrektur < 0) {
alert('Please enter a valid Druckkorrektur value');
alert('Bitte geben Sie einen gültigen Druckkorrekturwert ein');
return;
}
@@ -937,7 +937,7 @@
// Validate inputs
if (!formData.date) {
alert('Please select a date');
alert('Bitte wählen Sie ein Datum.');
return;
}
@@ -993,7 +993,7 @@
}
},
error: function () {
alert('Failed to delete entry. Please try again.');
alert('Eintrag konnte nicht gelöscht werden. Bitte versuchen Sie es erneut.');
}
});
});