gynecology-fix #114

Merged
amit merged 11 commits from gynecology-fix into main 2026-11-05 10:26:06 +00:00
2 changed files with 10 additions and 3 deletions
Showing only changes of commit 2082af2d26 - Show all commits

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",