fix(six-stages): enable navigation and add entry template for m0015
This commit is contained in:
parent
719de15b4a
commit
2082af2d26
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in New Issue