feat(console): portfolio-by-sector screen with real category icons
/officer/portfolio — sectors first, then the enterprises inside one. The existing enterprises screen is a flat ranked list. It answers 'who is worst' but not 'where is the problem', and a sector is the unit a shock actually arrives in: a feed price moves against poultry, a milk rate against dairy. So the count of high-risk enterprises per sector is the first thing on the page. Icons come from lucide-react rather than hand-drawn paths — a supervisor scans this grid before reading it, so the shape is doing the work. One literal icon per sector: milk, egg, wheat, scissors, storefront. Drill-down keeps the same shape as the rest of the console: band filter chips, a ranked table with a six-month trend line, and a detail panel with the score donut, the loan position and a link to the full risk file. Only the trend's endpoint dot is coloured; a fully coloured line would read as a severity gradient it does not mean. Reads /officer/enterprises with the house demo fallback and a Demo data pill. Verified against the live backend: 142 enterprises across five sectors, bands and six-month trends all present. tsc, oxlint and npm run build clean. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Generated
+10
@@ -11,6 +11,7 @@
|
||||
"@tanstack/react-query": "^5.101.2",
|
||||
"axios": "^1.18.1",
|
||||
"chart.js": "^4.5.1",
|
||||
"lucide-react": "^1.28.0",
|
||||
"react": "^19.2.7",
|
||||
"react-chartjs-2": "^5.3.1",
|
||||
"react-dom": "^19.2.7",
|
||||
@@ -1669,6 +1670,15 @@
|
||||
"url": "https://opencollective.com/parcel"
|
||||
}
|
||||
},
|
||||
"node_modules/lucide-react": {
|
||||
"version": "1.28.0",
|
||||
"resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-1.28.0.tgz",
|
||||
"integrity": "sha512-fARAFJULsGuDDydjp6+6blekG/sBIM29TerzLjc9bQUKAcEfrSc4ZQKb25KRz4OMKd87cZTb5dgq0w/T6KufVg==",
|
||||
"license": "ISC",
|
||||
"peerDependencies": {
|
||||
"react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/magic-string": {
|
||||
"version": "0.30.21",
|
||||
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz",
|
||||
|
||||
Reference in New Issue
Block a user