Aman-Mittal opened a new issue, #264:
URL: https://github.com/apache/fineract-backoffice-ui/issues/264
## Summary
Opening `/calendars` or `/meetings` leaves you on a page with the header and
sidebar drawn and **nothing at all** in the content area. No table, no message,
no error. The URL stays put, so it does not look like a failed navigation — it
looks like a screen that failed to load.
Every other unknown URL in the app is handled: `path: '**'` in
`src/app/app.routes.ts` redirects to the dashboard.
Measured on a running app, content area character count in brackets:
| URL | Lands on | Content |
|---|---|---|
| `/zzz-does-not-exist` | `/dashboard` | 482 chars |
| `/clients/zzz-nope` | `/dashboard` | 482 chars |
| `/calendars` | `/calendars` | **0 chars** |
| `/meetings` | `/meetings` | **0 chars** |
## Cause
`src/app/features/calendars/calendars.routes.ts` and
`src/app/features/meetings/meetings.routes.ts` define only entity-scoped routes:
```ts
export const CALENDARS_ROUTES: Routes = [
{ path: ':entityType/:entityId', ... },
{ path: ':entityType/:entityId/create', ... },
{ path: ':entityType/:entityId/edit/:id', ... },
];
```
There is no `''` route. The parent route in `app.routes.ts` still matches
`/calendars` and lazy-loads this list, so the router considers the URL handled
and never reaches the app-level `'**'`. It then has no child to render, and
draws nothing.
## Fix
Give each file an index route so the URL resolves the same way every other
unmatched URL does:
```ts
export const CALENDARS_ROUTES: Routes = [
{
path: '',
pathMatch: 'full',
redirectTo: '/dashboard',
},
{ path: ':entityType/:entityId', ... },
...
];
```
**Verified**: applied to `calendars.routes.ts` only, with
`meetings.routes.ts` left untouched as a control. `/calendars` then redirects
to the dashboard on load, and `/meetings` still shows the blank page. Apply the
same change to both files.
Note when testing: navigating there from inside the app can reuse the router
config already in memory, so load the URL fresh (or hard-reload) rather than
clicking through.
## Context, not part of this issue
While confirming this I found that **nothing in the app links to these
routes at all** — no sidebar entry, no `routerLink` anywhere. The four
components behind them (`calendars-list`, `calendar-form`, `meetings-list`,
`meeting-form`) currently have no way in. Giving them an entry point is a
separate, larger question that overlaps the detail-view work in #180 and #181,
so please do not take it on here. This issue is only about the dead end.
## Business Value
A blank screen is the worst thing a URL can do, because it gives the user
nothing to act on — they cannot tell whether the page is broken, whether they
lack permission, or whether they mistyped. Anyone landing here from a stale
bookmark, a shared link, or a typed URL is simply stuck, and the natural next
step is to report the app as broken. Redirecting costs nothing and puts them
somewhere they can carry on from.
It also closes an inconsistency: the app already decided what an unknown URL
should do, and these two are the only paths that quietly opt out of it.
## How to check your work
1. `npm start`, sign in, then load `https://localhost:4200/calendars` and
`https://localhost:4200/meetings` directly in the address bar. Both should land
on the dashboard.
2. `/calendars/groups/1` and `/meetings/groups/1` should still open their
screens.
3. `npm test` and `npm run lint` still pass.
## Good first issue
Two files, four lines each, no logic and no API involved, and the result is
visible in the address bar.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]