fix(m0041): ensure m_p and s_p display as Main Points and Supplementary Points

This commit is contained in:
ShivaniKhaire 2026-10-30 12:44:20 +05:30
parent 08e954bba0
commit a3af361419
1 changed files with 9 additions and 1 deletions

View File

@ -11,6 +11,11 @@ import { SectionCard } from "./shared/SectionCard";
const RESERVED_KEYS = new Set(["code", "id", "slug", "sort_order", "link"]);
const ATTRIBUTE_LABEL_OVERRIDES: Record<string, string> = {
m_p: "Main Points",
s_p: "Supplementary Points",
};
/**
* Generic detail renderer for modules and catalog items.
*
@ -60,7 +65,10 @@ export function GenericDetailRenderer({
!(isTherapeutic && key.toLowerCase() === "name"),
)
.map(([key, value]) => {
const rawLabel = definitionMap.get(key) || key;
const rawLabel =
ATTRIBUTE_LABEL_OVERRIDES[key.toLowerCase()] ||
definitionMap.get(key) ||
key;
const label = humanizeKey(rawLabel);
return (
<SectionCard key={key} title={label}>