fix(six-stages): enable navigation and add entry template for m0015

This commit is contained in:
ShivaniKhaire 2026-11-05 12:12:34 +05:30
parent 719de15b4a
commit 2082af2d26
2 changed files with 10 additions and 3 deletions

View File

@ -381,10 +381,16 @@ export function ModuleCatalogCardRenderer({
const count = asNumber(attributes.content_count);
const itemCode = asString(attributes.code).toLowerCase().trim();
const rawTitleLower = rawTitle.toLowerCase().trim();
const rawLink = attributes.link as { type?: unknown; target?: unknown } | undefined;
const hasNavigableLink = Boolean(
rawLink && typeof rawLink === "object" && rawLink.type && rawLink.target,
);
const isSpecialDisabled =
["diseases_after_childbirth", "other"].includes(itemCode) ||
["diseases after childbirth", "other"].includes(rawTitleLower);
const isClickable =
count !== 0 &&
!["diseases_after_childbirth", "other"].includes(itemCode) &&
!["diseases after childbirth", "other"].includes(rawTitleLower);
!isSpecialDisabled &&
(hasNavigableLink || (count !== null && count > 0) || count === null);
return (
<Pressable

View File

@ -75,6 +75,7 @@ const MODULE_VISUALS: Record<string, ModuleVisualConfig> = {
color: "#10B981",
isDefaultFree: false,
planCode: "PATTERN_CORE",
entryTemplateCode: "m0015_ct0007",
},
m0016: {
icon: "trending-up-outline",