diff --git a/src/views/Project.vue b/src/views/Project.vue index 33fd55b..dfc267c 100644 --- a/src/views/Project.vue +++ b/src/views/Project.vue @@ -108,16 +108,30 @@ function getCellValue(userstory: Userstory, header: TableHeader): string | numbe if (header.key === "status") { return userstory.status_extra_info?.name || userstory.status.toString(); } - return userstory[header.key as keyof Userstory] ?? ""; + const value = userstory[header.key as keyof Userstory]; + + if (value === null) return null; + if (typeof value === "string" || typeof value === "number") return value; + if (value === undefined) return ""; + return String(value); } else { if (header.attributeId === undefined) return "N/A (no attr ID)"; const attributes = dataStore.userstoryAttributesMap.get(userstory.id); if (attributes) { // Ключи для кастомных полей приходят как строки - return attributes[header.attributeId.toString()] ?? ""; + const attrValue = attributes[header.attributeId.toString()]; + + if (attrValue === null) return null; + if (typeof attrValue === "string" || typeof attrValue === "number") return attrValue; + if (attrValue === undefined) return ""; + return String(attrValue); } - return isLoadingAttributesForAnyStory.value ? "..." : ""; + + if (isLoadingAttributesForAnyStory.value && !dataStore.userstoryAttributesMap.has(userstory.id)) { + return "..."; + } + return ""; } }