feat(frontend): Loss Prevention module and store risk scoring (#124, #125)#152
Merged
Conversation
Adds LossPrevention.jsx — a full LP incident dashboard with: - KPI stat cards (open incidents, total exposure, high-risk stores, portfolio avg risk) - Filterable LP incident feed (by rule ID and severity) with clickable slide-in detail panel showing timeline, auto-defence, and recommendations - Store Risk Leaderboard with animated risk bars, trend indicators, and highest detection signal per store (covers issue #125) Wires the module into App.jsx (route 'lp') and activates Loss Prevention in Portal.jsx module grid. Depends on LP_INCIDENTS and LP_STORE_RISK exports from data.js (PR #150). Closes #124 Closes #125
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…x Vercel build Vercel builds this branch in isolation — importing LP_INCIDENTS and LP_STORE_RISK from LossPrevention.jsx failed at bundle time because those exports were only present on the feature/lp-demo-data branch (PR #150), not here. Adding them directly to data.js on this branch so the preview deployment can build successfully.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
frontend/src/modules/LossPrevention.jsx— full LP incident dashboardlp)case 'lp'into App.jsx routerMerge order: Merge PR #150 (LP demo data) before this PR, otherwise
LP_INCIDENTSandLP_STORE_RISKimports will be missing.Features
KPI section
LP Incident feed
Store Risk Leaderboard (issue #125)
How to test
cd frontend && npm run devCloses #124
Closes #125