mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-19 00:12:18 +00:00
feat(02-12): route scoped records to granted domains
- keep shared navigation independent of actor module preferences\n- open scoped records at their first allowed destination\n- announce record access and kind in doorway names
This commit is contained in:
1 parent
34073cf8dc
commit
6c4dd2d96b
6 files changed
+77
-15
No files matched your search
@@ -18,7 +18,7 @@ export const SHARED_RECORD_DOMAIN_ROUTE_FAMILIES = {
|
||||
measurements: ["/measurements"],
|
||||
medications: ["/medications"],
|
||||
labs: ["/labs"],
|
||||
profile: ["/settings/anamnesis"],
|
||||
profile: ["/profile"],
|
||||
illness: ["/illness"],
|
||||
mind: ["/mood", "/mental-wellbeing"],
|
||||
cycle: ["/cycle"],
|
||||
@@ -87,6 +87,13 @@ export function resolveSharedRecordNavigation(
|
||||
};
|
||||
}
|
||||
|
||||
/** The first scope-presentable location to load after a record switch. */
|
||||
export function sharedRecordLandingHref(
|
||||
sections: readonly ShareDomain[] | null,
|
||||
): string {
|
||||
return resolveSharedRecordNavigation(sections).destinationHrefs[0] ?? "/";
|
||||
}
|
||||
|
||||
/**
|
||||
* Does the server-resolved scope make this browser route presentable?
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user