CaCu Indicadores as the old page: its cards and words, the route, cytology and biopsy donuts, results by clinical scenario, confirmation rates; the page test compares with the capture; the guard injects before it waits

This commit is contained in:
Roberto Treviño
2026-11-28 10:03:31 -06:00
parent 198aae59da
commit 9a15ac6fcb
8 changed files with 720 additions and 67 deletions
+2 -3
View File
@@ -67,10 +67,9 @@ export class Auth {
/** Pages show only to someone signed in; the others go to the sign-in page and come back. */
export const signedIn: CanActivateFn = async (_route, state) => {
const auth = inject(Auth);
const router = inject(Router); // before any await: inject works only in the guard's first turn
const user = auth.user() === undefined ? await auth.load() : auth.user();
return user
? true
: inject(Router).createUrlTree(['/login'], { queryParams: { next: state.url } });
return user ? true : router.createUrlTree(['/login'], { queryParams: { next: state.url } });
};
/** A domain's pages show only to whom may see it. */