mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-13 05:39:33 +00:00
JSON Importer mit Minimaldaten weiterentwickeln. Validierung mit Violations einführen und beim Import-Versuch zusätzlich mit ausgeben
This commit is contained in:
parent
b227bacdb0
commit
23e4b00e77
16 changed files with 984 additions and 98 deletions
|
|
@ -3,16 +3,27 @@
|
|||
{% block title %}{% trans %}assembly.import_bom{% endtrans %}{% endblock %}
|
||||
|
||||
{% block before_card %}
|
||||
{% if errors %}
|
||||
{% if validationErrors or importerErrors %}
|
||||
<div class="alert alert-danger">
|
||||
<h4><i class="fa-solid fa-exclamation-triangle fa-fw"></i> {% trans %}parts.import.errors.title{% endtrans %}</h4>
|
||||
<ul>
|
||||
{% for violation in errors %}
|
||||
<li>
|
||||
<b>{{ violation.propertyPath }}: </b>
|
||||
{{ violation.message|trans(violation.parameters, 'validators') }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% if validationErrors %}
|
||||
{% for violation in validationErrors %}
|
||||
<li>
|
||||
<b>{{ violation.propertyPath }}: </b>
|
||||
{{ violation.message|trans(violation.parameters, 'validators') }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if importerErrors %}
|
||||
{% for violation in importerErrors %}
|
||||
<li>
|
||||
<b>{{ violation.propertyPath }}: </b>
|
||||
{{ violation.message|trans(violation.parameters, 'validators')|raw }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue