Aman-Mittal opened a new issue, #421:
URL: https://github.com/apache/fineract-backoffice-ui/issues/421

   Good first issue. Self-contained, one file, no backend needed. There is a 
worked example in this repo — see below.
   
   ## What is wrong
   
   `src/app/features/organization/organization.routes.ts` declares **21 
routes**, of which only one has a `title`. Two consequences, both visible 
without setup:
   
   1. **No breadcrumb.** The trail added in #419 is built from each activated 
route's `title`. Without one on the child route only the section contributes a 
crumb, and a one-crumb trail is hidden — so Organization screens render with no 
breadcrumb at all.
   2. **One tab title for the whole section.** `TranslatedTitleStrategy` falls 
back to the nearest titled ancestor, so Offices, Staff, Funds, Payment Types 
and the rest all title the browser tab `Organization · Fineract`.
   
   ## Evidence
   
   Offices — no breadcrumb above the content, tab title `Organization · 
Fineract`:
   
   ![Offices with no 
breadcrumb](https://raw.githubusercontent.com/Aman-Mittal/fineract-backoffice-ui/assets/issue-screenshots/gap-offices.png)
   
   ## Worked example
   
   The one route in this file that *does* have a title is 
`loan-portfolio-summary`, and it renders correctly:
   
   ![Loan portfolio summary with a 
breadcrumb](https://raw.githubusercontent.com/Aman-Mittal/fineract-backoffice-ui/assets/issue-screenshots/ok-portfolio-summary.png)
   
   ```ts
   {
     path: 'loan-portfolio-summary',
     canActivate: [authGuard, permissionGuard],
     data: { permissions: 'READ_LOAN' },
     title: 'ORGANIZATION.LOAN_PORTFOLIO_SUMMARY',   // <-- this line is the 
whole fix
     loadComponent: () => ...
   }
   ```
   
   Apply the same one line to the other 20 routes in the file.
   
   ## Notes
   
   Point each `title` at a translation key — reuse the key the screen's own 
heading already uses where one exists. If a key is missing, add it to 
`src/assets/i18n/en.json`; `npm run i18n:check` fails on a 
referenced-but-missing key, so it will tell you which.
   
   `src/app/features/system/system.routes.ts` (49 routes, all titled) is a 
larger reference.
   
   ## Verifying
   
   ```bash
   npm start
   ```
   
   Open an Organization screen: the breadcrumb should appear above the content 
and the tab should name the screen. Keep `npm run lint && npm run i18n:check` 
green.
   
   ## Scope
   
   Only `organization.routes.ts`. Other untitled route files are separate 
issues so several people can work in parallel; the full list is on #355.
   


-- 
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]

Reply via email to