update
This commit is contained in:
@@ -190,28 +190,28 @@
|
||||
<div class="d-flex justify-content-start mb-2">
|
||||
<!-- "Go to Clients" button at top-left -->
|
||||
<a href="{% url 'clients_list' %}" class="btn btn-outline-primary">
|
||||
⇦ Go to Clients
|
||||
⇦ Zur Startseite
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<h2>LHe Dewar Output</h2>
|
||||
|
||||
<div class="table-container">
|
||||
<button class="add-row-btn" id="add-row-two">Add Output</button>
|
||||
<button class="add-row-btn" id="add-row-two">Eingabe hinzufügen</button>
|
||||
<table id="table-two">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>ID</th>
|
||||
<th>Institute</th>
|
||||
<th>Client</th>
|
||||
<th>Date</th>
|
||||
<th>Institut</th>
|
||||
<th>Kunde</th>
|
||||
<th>Datum</th>
|
||||
<th>Warm</th>
|
||||
<th>LHe Delivery</th>
|
||||
<th>LHe Anlieferung</th>
|
||||
<th>Vor</th>
|
||||
<th>Nach</th>
|
||||
<th>LHe Output</th>
|
||||
<th>Notes</th>
|
||||
<th>LHe Ausgabe</th>
|
||||
<th>Notizen</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -230,8 +230,8 @@
|
||||
<td>{% if entry.lhe_output is not None %}{{ entry.lhe_output|floatformat:1 }}{% endif %}</td>
|
||||
<td>{{ entry.notes }}</td>
|
||||
<td class="actions">
|
||||
<button class="edit-btn-two">Edit</button>
|
||||
<button class="delete-btn-two">Delete</button>
|
||||
<button class="edit-btn-two">Bearbeiten</button>
|
||||
<button class="delete-btn-two">Löschen</button>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
@@ -245,24 +245,24 @@
|
||||
<h3>LHe Dewar Output</h3>
|
||||
|
||||
<!-- Institute Selection -->
|
||||
<label for="add-institute-id">Institute:</label>
|
||||
<label for="add-institute-id">Institut:</label>
|
||||
<select id="add-institute-id">
|
||||
<option value="">Select Institute</option>
|
||||
<option value="">Institut auswählen</option>
|
||||
{% for institute in institutes %}
|
||||
<option value="{{ institute.id }}">{{ institute.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
<!-- Client Selection (will be populated based on institute) -->
|
||||
<label for="add-client-id">Client:</label>
|
||||
<label for="add-client-id">Kunde:</label>
|
||||
<select id="add-client-id" disabled>
|
||||
<option value="">Select Institute first</option>
|
||||
<option value="">Institut erstaml auswählen</option>
|
||||
{% for client in clients %}
|
||||
<option value="{{ client.id }}" data-institute="{{ client.institute.id }}">{{ client.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
<label for="add-date">Date:</label>
|
||||
<label for="add-date">Datum:</label>
|
||||
<input type="date" id="add-date">
|
||||
|
||||
<!-- Changed from checkbox to number input -->
|
||||
@@ -273,7 +273,7 @@
|
||||
|
||||
<div class="input-with-label">
|
||||
<label for="add-lhe-delivery">LHe Anlieferung:</label>
|
||||
<input type="text" id="add-lhe-delivery" placeholder="Enter delivery amount">
|
||||
<input type="text" id="add-lhe-delivery" placeholder="Wert eingeben">
|
||||
</div>
|
||||
|
||||
<div class="input-with-label">
|
||||
@@ -291,8 +291,8 @@
|
||||
<input type="number" id="add-lhe-output" readonly>
|
||||
</div>
|
||||
|
||||
<label for="add-notes">Notes:</label>
|
||||
<textarea id="add-notes" placeholder="Additional notes"></textarea>
|
||||
<label for="add-notes">Notizen:</label>
|
||||
<textarea id="add-notes" placeholder="Notizen"></textarea>
|
||||
|
||||
<div class="popup-buttons">
|
||||
<button class="save-btn" id="save-add-two">Save</button>
|
||||
@@ -310,16 +310,16 @@
|
||||
<!-- Institute Selection -->
|
||||
<label for="edit-institute-id">Institute:</label>
|
||||
<select id="edit-institute-id">
|
||||
<option value="">Select Institute</option>
|
||||
<option value="">Institut Auswälen</option>
|
||||
{% for institute in institutes %}
|
||||
<option value="{{ institute.id }}">{{ institute.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
<!-- Client Selection (will be populated based on institute) -->
|
||||
<label for="edit-client-id">Client:</label>
|
||||
<label for="edit-client-id">Kunde:</label>
|
||||
<select id="edit-client-id" disabled>
|
||||
<option value="">Select Institute first</option>
|
||||
<option value="">Institut erstmal Auswälen</option>
|
||||
{% for client in clients %}
|
||||
<option value="{{ client.id }}" data-institute="{{ client.institute.id }}">{{ client.name }}</option>
|
||||
{% endfor %}
|
||||
@@ -336,7 +336,7 @@
|
||||
|
||||
<div class="input-with-label">
|
||||
<label for="edit-lhe-delivery">LHe Anlieferung:</label>
|
||||
<input type="text" id="edit-lhe-delivery" placeholder="Enter delivery amount">
|
||||
<input type="text" id="edit-lhe-delivery" placeholder="Wert eingeben">
|
||||
</div>
|
||||
|
||||
<div class="input-with-label">
|
||||
@@ -399,7 +399,7 @@
|
||||
function filterClients(instituteId, targetSelect, allOptions) {
|
||||
if (!instituteId) {
|
||||
// Show only the default option if no institute selected
|
||||
targetSelect.html('<option value="">Select Institute first</option>');
|
||||
targetSelect.html('<option value="">erstmal Institut auswählen</option>');
|
||||
targetSelect.prop('disabled', true);
|
||||
} else {
|
||||
// Restore all options first
|
||||
@@ -412,7 +412,7 @@
|
||||
targetSelect.find('option').hide();
|
||||
|
||||
// Always show the "Select Client" option
|
||||
targetSelect.find('option[value=""]').show().text('Select Client');
|
||||
targetSelect.find('option[value=""]').show().text('Kunde Auswählen');
|
||||
|
||||
// Show only clients from selected institute
|
||||
const clientsFromInstitute = targetSelect.find(`option[data-institute="${instituteId}"]`);
|
||||
@@ -473,7 +473,7 @@
|
||||
$('#add-row-two').on('click', function () {
|
||||
// Reset form
|
||||
$('#add-institute-id').val('');
|
||||
$('#add-client-id').html('<option value="">Select Institute first</option>');
|
||||
$('#add-client-id').html('<option value="">Erstaml institut auswählen</option>');
|
||||
$('#add-client-id').prop('disabled', true);
|
||||
$('#add-date').val('');
|
||||
$('#add-is-warm').val('0');
|
||||
@@ -645,12 +645,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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user