fix: capacity check ignores physically-ended slots; feat: ha_poll_interval setting (default 60s)
Deploy via Portainer / deploy (push) Successful in 0s
Deploy via Portainer / deploy (push) Successful in 0s
This commit is contained in:
@@ -14,9 +14,15 @@
|
||||
<div class="card-header py-3">Ajouter une exception</div>
|
||||
<div class="card-body">
|
||||
<form method="POST">
|
||||
<div class="mb-3">
|
||||
<label class="form-label fw-semibold">Date</label>
|
||||
<input type="date" name="date" class="form-control" required>
|
||||
<div class="row g-2 mb-3">
|
||||
<div class="col">
|
||||
<label class="form-label fw-semibold">Date de début</label>
|
||||
<input type="date" name="date_start" id="dateStart" class="form-control" required>
|
||||
</div>
|
||||
<div class="col">
|
||||
<label class="form-label fw-semibold">Date de fin <span class="text-muted fw-normal small">(optionnel)</span></label>
|
||||
<input type="date" name="date_end" id="dateEnd" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label fw-semibold">Type</label>
|
||||
@@ -55,12 +61,17 @@
|
||||
{% if blocks %}
|
||||
<table class="table table-hover mb-0">
|
||||
<thead class="table-light">
|
||||
<tr><th>Date</th><th>Type</th><th>Machine</th><th>Note</th><th></th></tr>
|
||||
<tr><th>Période</th><th>Type</th><th>Machine</th><th>Note</th><th></th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for b in blocks %}
|
||||
<tr>
|
||||
<td class="fw-semibold">{{ b.date }}</td>
|
||||
<td class="fw-semibold" style="white-space:nowrap">
|
||||
{{ b.date }}
|
||||
{% if b.date_end and b.date_end != b.date %}
|
||||
<span class="text-muted fw-normal">→</span> {{ b.date_end }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if b.type == 'off' %}<span class="badge bg-danger">Off</span>
|
||||
{% elif b.type == 'tt' %}<span class="badge bg-primary">TT</span>
|
||||
@@ -89,3 +100,14 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script>
|
||||
const dateStart = document.getElementById('dateStart');
|
||||
const dateEnd = document.getElementById('dateEnd');
|
||||
dateStart.addEventListener('change', () => {
|
||||
dateEnd.min = dateStart.value;
|
||||
if (dateEnd.value && dateEnd.value < dateStart.value) dateEnd.value = dateStart.value;
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user