Отслеживаем компоненты без материала и техпроцесса
All checks were successful
Deploy MES Core / deploy (push) Successful in 12s
All checks were successful
Deploy MES Core / deploy (push) Successful in 12s
This commit is contained in:
@@ -564,6 +564,49 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if missing_material_rows %}
|
||||
<div class="modal fade" id="missingMaterialModal" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content border-secondary">
|
||||
<div class="modal-header border-secondary">
|
||||
<h5 class="modal-title">Нельзя запустить: нет материала</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Закрыть"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="text-muted mb-2">Заполни material в паспорте(ах) деталей ниже и повтори запуск.</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm table-hover mb-0 align-middle">
|
||||
<thead>
|
||||
<tr class="table-custom-header">
|
||||
<th style="width:110px;">Тип</th>
|
||||
<th style="width:180px;">Обозначение</th>
|
||||
<th>Наименование</th>
|
||||
<th data-sort="false" class="text-end" style="width:140px;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for r in missing_material_rows %}
|
||||
<tr>
|
||||
<td class="small text-muted">{{ r.entity.get_entity_type_display }}</td>
|
||||
<td class="fw-bold">{{ r.entity.drawing_number|default:"—" }}</td>
|
||||
<td>{{ r.entity.name }}</td>
|
||||
<td class="text-end">
|
||||
<a class="btn btn-outline-secondary btn-sm" href="{{ r.url }}" target="_blank">Открыть</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer border-secondary">
|
||||
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Закрыть</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- productInfoModal удалён: паспорт компонента открывается отдельной страницей -->
|
||||
<div class="d-none" id="productInfoModal" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl">
|
||||
@@ -1119,5 +1162,17 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
{% if missing_material_autoshow and missing_material_rows %}
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const el = document.getElementById('missingMaterialModal');
|
||||
if (!el) return;
|
||||
try {
|
||||
const m = new bootstrap.Modal(el);
|
||||
m.show();
|
||||
} catch (e) {
|
||||
}
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user