Compare commits
5 Commits
be9c056ada
...
e7662f19e8
| Author | SHA1 | Date | |
|---|---|---|---|
| e7662f19e8 | |||
| 69b78e0014 | |||
| f71fe513d2 | |||
| 313b2c4895 | |||
| 55248873c5 |
@@ -108,16 +108,29 @@ 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 "";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -137,4 +150,7 @@ function getCellValue(userstory: Userstory, header: TableHeader): string | numbe
|
||||
table thead tr th {
|
||||
font-weight: bold;
|
||||
}
|
||||
table thead tr th:hover {
|
||||
background-color: var(--vt-c-black-soft);
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user