This commit is contained in:
2025-10-30 14:41:15 +01:00
parent 86be6256a4
commit 67fd787a14
9 changed files with 23 additions and 60 deletions
+5 -5
View File
@@ -34,8 +34,8 @@ const resolveCorrespondents = (doc) => {
doc.correspondents.forEach((entry, index) => {
if (!entry) return;
const id = entry.id ?? entry.correspondent_id ?? null;
const name = (entry.name || entry.label || entry.slug || '').trim();
const id = entry.id;
const name = entry.name.trim();
if (!name) return;
if (id && seen.has(id)) {
@@ -951,7 +951,7 @@ const DocumentsTable = ({
</td>
<td>
{(() => {
const issuedAt = doc.issued_at || doc.updated_at || null;
const issuedAt = doc.issued_at || null;
if (!issuedAt) {
return '—';
}
@@ -974,13 +974,13 @@ const DocumentsTable = ({
event.stopPropagation();
const nextName = window.prompt(
'Rename document',
doc.title || doc.original_name || '',
doc.title
);
if (!nextName) {
return;
}
const trimmed = nextName.trim();
if (!trimmed || trimmed === (doc.title || doc.original_name)) {
if (!trimmed || trimmed === doc.title) {
return;
}
onDocumentRename(doc.id, trimmed);