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 count = asNumber(attributes.content_count);
|
||||||
const itemCode = asString(attributes.code).toLowerCase().trim();
|
const itemCode = asString(attributes.code).toLowerCase().trim();
|
||||||
const rawTitleLower = rawTitle.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 =
|
const isClickable =
|
||||||
count !== 0 &&
|
!isSpecialDisabled &&
|
||||||
!["diseases_after_childbirth", "other"].includes(itemCode) &&
|
(hasNavigableLink || (count !== null && count > 0) || count === null);
|
||||||
!["diseases after childbirth", "other"].includes(rawTitleLower);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Pressable
|
<Pressable
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,7 @@ const MODULE_VISUALS: Record<string, ModuleVisualConfig> = {
|
||||||
color: "#10B981",
|
color: "#10B981",
|
||||||
isDefaultFree: false,
|
isDefaultFree: false,
|
||||||
planCode: "PATTERN_CORE",
|
planCode: "PATTERN_CORE",
|
||||||
|
entryTemplateCode: "m0015_ct0007",
|
||||||
},
|
},
|
||||||
m0016: {
|
m0016: {
|
||||||
icon: "trending-up-outline",
|
icon: "trending-up-outline",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue