fix: better default naming of relationships

This commit is contained in:
Per Stark
2025-10-27 20:45:53 +01:00
parent 75c200b2ba
commit f13791cfcf
4 changed files with 159 additions and 35 deletions

View File

@@ -9,7 +9,8 @@
</tr>
</thead>
<tbody>
{% for relationship in relationships %}
{% for row in relationships %}
{% set relationship = row.relationship %}
<tr>
<!-- Origin column -->
<td>
@@ -30,7 +31,7 @@
{{ relationship.out }}
{% endfor %}
</td>
<td class="uppercase tracking-wide text-xs">{{ relationship.metadata.relationship_type }}</td>
<td class="uppercase tracking-wide text-xs">{{ row.relationship_type_label }}</td>
<td>
<button class="nb-btn btn-xs" hx-delete="/knowledge-relationship/{{ relationship.id }}"
hx-target="#relationship_table_section" hx-swap="outerHTML">
@@ -61,7 +62,7 @@
</td>
<td>
<input id="relationship_type_input" name="relationship_type" type="text" placeholder="RelatedTo"
class="nb-input w-full new_relationship_input" />
class="nb-input w-full new_relationship_input" value="{{ default_relationship_type }}" />
</td>
<td>
<button id="save_relationship_button" type="button" class="nb-btn btn-sm" hx-post="/knowledge-relationship"
@@ -80,4 +81,4 @@
document.getElementById('save_relationship_button').click();
}
});
</script>
</script>