AI Review Center
Commit Review Workspace ?
Select a commit on the left to inspect quality, security, business value, findings, and suggested code changes.
Project AI Score
?
73%
Quality Avg
?
74%
Security Avg
?
74%
Reviews
?
130
Review Result ?
solutionbowl/crm-dashbaord · 3f3baf2c
The commit adds a comprehensive feature for settling 'fancy' markets and reports for horse racing, integrating new UI components, API calls, and status indicators. The implementation is clear and mostly structured, but contains several debugging console.logs and lacks error boundary handling or input validation. It improves business capabilities by supporting betting settlement procedures, but bug risk and security could be improved by reducing console output and enhancing error resilience.
Quality
?
75%
Security
?
40%
Business Value
?
80%
Maintainability
?
75%
Issues & Suggested Fixes
?
1AI detects the issue
2Shows file, line, or evidence
3Suggests the fix to apply
Excess Console.log
Where
src/modules/horse/pages/Race/RaceDetail.tsx:269
Issue / Evidence
excess console.log
Suggested Fix
remove or replace with proper logging
Excess Console.log
Where
src/modules/horse/pages/Race/RaceDetail.tsx:275
Issue / Evidence
excess console.log
Suggested Fix
remove or replace with proper logging
Excess Console.log
Where
src/modules/horse/pages/Race/RaceDetail.tsx:299
Issue / Evidence
excess console.log
Suggested Fix
remove or replace with proper logging
Excess Console.log
Where
src/modules/horse/pages/Race/RaceDetail.tsx:339
Issue / Evidence
excess console.log
Suggested Fix
remove or replace with proper logging
Excess Console.log
Where
src/modules/horse/pages/Race/RaceDetail.tsx:340
Issue / Evidence
excess console.log
Suggested Fix
remove or replace with proper logging
Missing Detailed Error Handling
Where
src/modules/horse/pages/Race/RaceDetail.tsx:353
Issue / Evidence
missing detailed error handling
Suggested Fix
add detailed error handling to improve robustness
Missing Detailed Error Handling
Where
src/modules/horse/pages/Race/RaceDetail.tsx:382
Issue / Evidence
missing detailed error handling
Suggested Fix
add detailed error handling to improve robustness
Excess Console.log
Where
src/modules/horse/pages/Race/RaceDetail.tsx:753
Issue / Evidence
excess console.log
Suggested Fix
remove or replace with proper logging
Excess Console.log
Where
src/modules/horse/pages/Race/RaceDetail.tsx:757
Issue / Evidence
excess console.log
Suggested Fix
remove or replace with proper logging
Excess Console.log
Where
src/modules/horse/pages/Race/RaceDetail.tsx:759
Issue / Evidence
excess console.log
Suggested Fix
remove or replace with proper logging
Code Change Preview · src/main.tsx
?
Removed / Before Commit
- diff --git a/src/main.tsx b/src/main.tsx - index adbf3dd..6d5cf4d 100644 - import RaceStats from './modules/horse/pages/Race/stats.tsx'; - import EventInfoPage from './modules/horse/pages/Market/EventInfoPage.tsx'; - import MarketPage from './modules/horse/pages/Market/MarketPage.tsx'; - - authService.initializeAuth(); - - <Route path="event/create" element={<CreateEvent />} /> - <Route path="event/edit/:id" element={<CreateEvent />} /> - <Route path="races" element={<AllRaces />} /> - <Route path="races/create" element={<CreateRace />} /> - <Route path="races/edit/:id" element={<CreateRace />} /> - <Route path="races/detail/:id" element={<RaceDetail />} />
Added / After Commit
+ diff --git a/src/main.tsx b/src/main.tsx + index adbf3dd..6d5cf4d 100644 + import RaceStats from './modules/horse/pages/Race/stats.tsx'; + import EventInfoPage from './modules/horse/pages/Market/EventInfoPage.tsx'; + import MarketPage from './modules/horse/pages/Market/MarketPage.tsx'; + import AllReport from './modules/horse/pages/Report/AllReport.tsx'; + + authService.initializeAuth(); + + <Route path="event/create" element={<CreateEvent />} /> + <Route path="event/edit/:id" element={<CreateEvent />} /> + <Route path="races" element={<AllRaces />} /> + <Route path="reports" element={<AllReport />} /> + <Route path="races/create" element={<CreateRace />} /> + <Route path="races/edit/:id" element={<CreateRace />} /> + <Route path="races/detail/:id" element={<RaceDetail />} />
Removed / Before Commit
- diff --git a/src/modules/horse/layout/HorseSidebar.tsx b/src/modules/horse/layout/HorseSidebar.tsx - index a6767e5..833cc62 100644 - { title: "Update Platform Country", path: "/horse/platform/update-country" }, - ], - }, - ]; - - return (
Added / After Commit
+ diff --git a/src/modules/horse/layout/HorseSidebar.tsx b/src/modules/horse/layout/HorseSidebar.tsx + index a6767e5..833cc62 100644 + { title: "Update Platform Country", path: "/horse/platform/update-country" }, + ], + }, + { + title: "Report", + icon: " ri-book-open-line", + children: [ + { title: "All Reports", path: "/horse/reports" }, + + ], + }, + ]; + + return (
Removed / Before Commit
- diff --git a/src/modules/horse/pages/Race/RaceDetail.tsx b/src/modules/horse/pages/Race/RaceDetail.tsx - index a40e2f2..25d1335 100644 - }>; - } - - const getPositionLabel = (position: number) => { - const remainderTen = position % 10; - const remainderHundred = position % 100; - verticalAlign: "middle", - }; - - const parsePositionValue = (position: string) => { - const numericPosition = parseInt(position, 10); - return Number.isNaN(numericPosition) ? null : numericPosition; - if (typeof position === "number") { - return getPositionLabel(position); - } -
Added / After Commit
+ diff --git a/src/modules/horse/pages/Race/RaceDetail.tsx b/src/modules/horse/pages/Race/RaceDetail.tsx + index a40e2f2..25d1335 100644 + }>; + } + + + const getPositionLabel = (position: number) => { + const remainderTen = position % 10; + const remainderHundred = position % 100; + verticalAlign: "middle", + }; + + + const parsePositionValue = (position: string) => { + const numericPosition = parseInt(position, 10); + return Number.isNaN(numericPosition) ? null : numericPosition; + if (typeof position === "number") { + return getPositionLabel(position);
Removed / Before Commit
- diff --git a/src/modules/horse/pages/Report/AllReport.tsx b/src/modules/horse/pages/Report/AllReport.tsx - new file mode 100644 - index 0000000..3b254af
Added / After Commit
+ diff --git a/src/modules/horse/pages/Report/AllReport.tsx b/src/modules/horse/pages/Report/AllReport.tsx + new file mode 100644 + index 0000000..3b254af + import { Fragment } from "react"; + import { Button, Card, Col, Row,Form } from "react-bootstrap"; + import Pageheader from "../../components/pageheader/pageheader"; + import "../../styles/horsespages.css"; + + type ReportMetric = { + turnover: string; + userNetWin: string; + userComm: string; + userPL: string; + agentWin: string; + agentComm: string; + agentPL: string; + upline: string; + };
Removed / Before Commit
- diff --git a/src/modules/horse/styles/horsespages.css b/src/modules/horse/styles/horsespages.css - index 601aaa1..5acf99e 100644 - padding: 2px 6px; - } - - @media (max-width: 767.98px) { - .horse-page-card-header, - .horse-page-toolbar, - - .horse-page-search, - .horse-inline-readonly, - .horse-form-submit { - width: 100%; - } - - .horse-form-actions-group {
Added / After Commit
+ diff --git a/src/modules/horse/styles/horsespages.css b/src/modules/horse/styles/horsespages.css + index 601aaa1..5acf99e 100644 + padding: 2px 6px; + } + + .horse-report-body { + padding: 1.5rem; + background: #ffffff; + } + + .horse-report-filter { + min-height: 38px; + min-width: 280px; + padding: 0.55rem 0.9rem; + border: 1px solid var(--default-border, #dee2e6); + border-radius: 0.5rem; + background: #ffffff; + color: var(--default-text-color);
Removed / Before Commit
- diff --git a/src/pages/Casino/CasinoLobby.tsx b/src/pages/Casino/CasinoLobby.tsx - index 42d7efd..a619d4a 100644 - import { Fragment, useState, useEffect } from "react"; - import { Card, Col, Row, Button, Form, Modal } from "react-bootstrap"; - import Pageheader from "../../components/pageheader/pageheader"; - - - const LS_KEY = "casino_lobby"; - const [search, setSearch] = useState(""); - const [deleteId, setDeleteId] = useState<string | null>(null); - - const games = ["Poker", "Blackjack", "Baccarat"]; - - // Load from localStorage - useEffect(() => { - const stored = localStorage.getItem(LS_KEY); - if (stored) setItems(JSON.parse(stored)); - }, []);
Added / After Commit
+ diff --git a/src/pages/Casino/CasinoLobby.tsx b/src/pages/Casino/CasinoLobby.tsx + index 42d7efd..a619d4a 100644 + import { Fragment, useState, useEffect, useRef } from "react"; + import { Card, Col, Row, Button, Form, Modal } from "react-bootstrap"; + import Pageheader from "../../components/pageheader/pageheader"; + import dragula from "dragula"; + import "dragula/dist/dragula.css"; + + + + const LS_KEY = "casino_lobby"; + const [search, setSearch] = useState(""); + const [deleteId, setDeleteId] = useState<string | null>(null); + + const containerRef = useRef<HTMLDivElement | null>(null); + const dragulaInstance = useRef<any>(null); + + const games = ["Poker", "Blackjack", "Baccarat"];
Removed / Before Commit
- diff --git a/src/pages/Casino/LiveCasino.tsx b/src/pages/Casino/LiveCasino.tsx - index 9853089..aa88157 100644 - import { Fragment, useState, useEffect } from "react"; - import { Card, Col, Row, Button, Form, Modal } from "react-bootstrap"; - import Pageheader from "../../components/pageheader/pageheader"; - - const LS_KEY = "Live"; - - const [search, setSearch] = useState(""); - const [deleteId, setDeleteId] = useState<string | null>(null); - - - const games = ["Poker", "Blackjack", "Baccarat"]; - - if (stored) setItems(JSON.parse(stored)); - }, []); - - // Filter dropdown games
Added / After Commit
+ diff --git a/src/pages/Casino/LiveCasino.tsx b/src/pages/Casino/LiveCasino.tsx + index 9853089..aa88157 100644 + import { Fragment, useState, useEffect, useRef } from "react"; + import { Card, Col, Row, Button, Form, Modal } from "react-bootstrap"; + import Pageheader from "../../components/pageheader/pageheader"; + import dragula from "dragula"; + import "dragula/dist/dragula.css"; + + const LS_KEY = "Live"; + + const [search, setSearch] = useState(""); + const [deleteId, setDeleteId] = useState<string | null>(null); + + const containerRef = useRef<HTMLDivElement | null>(null); + const dragulaInstance = useRef<any>(null); + + const games = ["Poker", "Blackjack", "Baccarat"]; +