Files
HealthLog/src/lib/onboarding/disclaimer.ts
T
Marc-André Bombeck fea1d1e0b5 chore: strip planning tags from comments and enable the rule
Output of `node scripts/strip-planning-tags.mjs --write`: 3,157 comment
lines in 1,308 files lose the work-item identifier at their head. Release
versions and issue references stay; nothing outside comment text
changes, which the script checks per file against a comment-free
printout. healthlog/no-planning-tags is enabled at error level with this
commit, so the tree it lands on is clean.
2026-10-20 09:08:40 +02:00

25 lines
1004 B
TypeScript

/**
* v1.18.6 — the one-time medical-disclaimer acknowledgment version.
*
* The user row stores exactly which copy was acknowledged, so a future
* material wording change can bump this constant to re-prompt. Keep it in lockstep with the
* `onboarding.disclaimer.*` i18n copy — bump on a substantive text change,
* not on a typo fix.
*/
export const DISCLAIMER_VERSION = "2026-06-18";
/**
* Whether a stored acknowledgment covers the CURRENT disclaimer text.
*
* The welcome gate pre-checks its checkbox (and skips the re-record) only
* when this holds. Until v1.37.19 the gate looked at the timestamp alone,
* which meant the version column was written but never compared — bumping
* `DISCLAIMER_VERSION` could not re-prompt anyone.
*/
export function isDisclaimerAcknowledgmentCurrent(
acknowledgedAt: string | Date | null | undefined,
acknowledgedVersion: string | null | undefined,
): boolean {
return acknowledgedAt != null && acknowledgedVersion === DISCLAIMER_VERSION;
}