Showing AI reviews for crm-dashbaord
Project AI Score ?
73%
Quality Avg ?
74%
Security Avg ?
74%
Reviews ?
130

Review Result ?

solutionbowl/crm-dashbaord · 59b148fe
This commit adds new dependencies for drag-and-drop functionality, updates package files, and includes a new percentage-based odds calculation feature with UI input handling on the AdminRacePage. The changes improve functionality by supporting percentage input for odds adjustment, although some minor UI and code clarity improvements remain. The commit message is vague and could be improved for clarity.
Quality ?
80%
Security ?
60%
Business Value ?
70%
Maintainability ?
75%
Issues & Suggested Fixes ?
1AI detects the issue
2Shows file, line, or evidence
3Suggests the fix to apply
Low Clarity
Where commit message
Issue / Evidence low clarity
Suggested Fix improve commit message to clearly describe the feature/fix purpose and scope
Minor Syntax Typo
Where src/modules/horse/pages/Race/AdminRacepage.tsx:140
Issue / Evidence minor syntax typo
Suggested Fix remove extra semicolon after function definition
Code Clarity
Where src/modules/horse/pages/Race/AdminRacepage.tsx:1150
Issue / Evidence code clarity
Suggested Fix update initial state logic to make intent clearer, e.g., clarify why use back_odd string when not winner
1190
Where src/modules/horse/pages/Race/AdminRacepage.tsx:1161
Issue / Evidence 1190
Suggested Fix input validation
1315
Where src/modules/horse/pages/Race/AdminRacepage.tsx:1266
Issue / Evidence 1315
Suggested Fix UI feedback
Dependency Update
Where package-lock.json:11-458
Issue / Evidence dependency update
Suggested Fix verify compatibility and run dependency audit to assess security and performance impacts
Code Change Preview · package-lock.json ?
Removed / Before Commit
- diff --git a/package-lock.json b/package-lock.json
- index d25dcf7..54199df 100644
- "name": "zynix-ts",
- "version": "0.0.0",
- "dependencies": {
- "@emotion/react": "^11.14.0",
- "@emotion/styled": "^11.14.0",
- "@fortawesome/fontawesome-free": "^7.2.0",
- "node": ">=6.9.0"
- }
- },
- "node_modules/@emotion/babel-plugin": {
- "version": "11.13.5",
- "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.13.5.tgz",
- "integrity": "sha512-TDDkd5DkaZxZFM8p+1I3yAlvM3rSr1wbrOliG4yJiwinMZN8z/iGL7BTlDkrJcYTmgUSb4ywVCc3ZaUtOtC76w==",
- "license": "MIT"
- },
-     "node_modules/d3-array": {
Added / After Commit
+ diff --git a/package-lock.json b/package-lock.json
+ index d25dcf7..54199df 100644
+ "name": "zynix-ts",
+ "version": "0.0.0",
+ "dependencies": {
+         "@dnd-kit/core": "^6.3.1",
+         "@dnd-kit/sortable": "^10.0.0",
+         "@dnd-kit/utilities": "^3.2.2",
+ "@emotion/react": "^11.14.0",
+ "@emotion/styled": "^11.14.0",
+ "@fortawesome/fontawesome-free": "^7.2.0",
+ "node": ">=6.9.0"
+ }
+ },
+     "node_modules/@dnd-kit/accessibility": {
+       "version": "3.1.1",
+       "resolved": "https://registry.npmjs.org/@dnd-kit/accessibility/-/accessibility-3.1.1.tgz",
+       "integrity": "sha512-2P+YgaXF+gRsIihwwY1gCsQSYnu9Zyj2py8kY5fFvUM1qm2WA2u639R6YNVfU4GWr+ZM5mqEsfHZZLoRONbemw==",
Removed / Before Commit
- diff --git a/package.json b/package.json
- index 45ffee2..66163b8 100644
- "sass-min": "sass ./src/assets/scss/:./src/assets/css/ --style compressed"
- },
- "dependencies": {
- "@emotion/react": "^11.14.0",
- "@emotion/styled": "^11.14.0",
- "@fortawesome/fontawesome-free": "^7.2.0",
Added / After Commit
+ diff --git a/package.json b/package.json
+ index 45ffee2..66163b8 100644
+ "sass-min": "sass ./src/assets/scss/:./src/assets/css/ --style compressed"
+ },
+ "dependencies": {
+     "@dnd-kit/core": "^6.3.1",
+     "@dnd-kit/sortable": "^10.0.0",
+     "@dnd-kit/utilities": "^3.2.2",
+ "@emotion/react": "^11.14.0",
+ "@emotion/styled": "^11.14.0",
+ "@fortawesome/fontawesome-free": "^7.2.0",
Removed / Before Commit
- diff --git a/src/modules/horse/pages/Race/AdminRacepage.tsx b/src/modules/horse/pages/Race/AdminRacepage.tsx
- index 3ec68f0..f3c15a6 100644
- import { toast } from "react-toastify";
- import { useParams } from "react-router-dom";
- import Pageheader from "../../components/pageheader/pageheader";
- import { tenantServiceInstance as axiosInstance } from "../../../../services/api/axiosConfig";
- import useRaceOddsSocket from "../../hooks/useRaceOddsSocket";
- 
- 
- type GlobalState = { active: boolean; suspended: boolean; inactive: boolean };
- type StatusField = keyof GlobalState;
- type OddsField = keyof Pick<OddsRow, "back_odd" | "lay_odd">;
- 
- type UpdateOddsPayload = {
- marketsData: Array<{
- return false;
- };
- 
Added / After Commit
+ diff --git a/src/modules/horse/pages/Race/AdminRacepage.tsx b/src/modules/horse/pages/Race/AdminRacepage.tsx
+ index 3ec68f0..f3c15a6 100644
+ import { toast } from "react-toastify";
+ import { useParams } from "react-router-dom";
+ import Pageheader from "../../components/pageheader/pageheader";
+ 
+ import { tenantServiceInstance as axiosInstance } from "../../../../services/api/axiosConfig";
+ import useRaceOddsSocket from "../../hooks/useRaceOddsSocket";
+ 
+ 
+ type GlobalState = { active: boolean; suspended: boolean; inactive: boolean };
+ type StatusField = keyof GlobalState;
+ 
+ type UpdateOddsPayload = {
+ marketsData: Array<{
+ return false;
+ };
+ 
Removed / Before Commit
- diff --git a/src/modules/horse/pages/Race/RaceDetail.tsx b/src/modules/horse/pages/Race/RaceDetail.tsx
- index a12abef..a40e2f2 100644
- });
- 
- toast.success(`Position saved as ${position}`);
-       // Refetch race details to ensure data is up to date
-       fetchRaceDetail(id);
- } catch (error: any) {
- setRunnerPositions((prev) => {
- const updated = { ...prev };
- </Card>
- </Col>
- </Row>
- 
-       {/* Horse Runners Panel */}
- <Row className="mb-4">
- <Col xl={12}>
- <Card className="custom-card">
Added / After Commit
+ diff --git a/src/modules/horse/pages/Race/RaceDetail.tsx b/src/modules/horse/pages/Race/RaceDetail.tsx
+ index a12abef..a40e2f2 100644
+ });
+ 
+ toast.success(`Position saved as ${position}`);
+ } catch (error: any) {
+ setRunnerPositions((prev) => {
+ const updated = { ...prev };
+ </Card>
+ </Col>
+ </Row>
+      {/* Horse Runners Panel */}
+ <Row className="mb-4">
+ <Col xl={12}>
+ <Card className="custom-card">
+ {horse.status ? "Active" : "Inactive"}
+ </Badge>
+ </td>
Removed / Before Commit
- diff --git a/src/pages/Casino/CasinoCategory.tsx b/src/pages/Casino/CasinoCategory.tsx
- index 605d1e6..f64cfae 100644
- import { Fragment, useState } from "react";
- import { Card, Col, Row, Button, Form, Modal } from "react-bootstrap";
- import Pageheader from "../../components/pageheader/pageheader";
- 
- const LS_KEY = "casino_categories";
- 
- </span>
- </Card.Header>
- <Card.Body className="p-0">
-               <div className="table-responsive">
-                 <table className="table table-hover mb-0">
-                   <thead className="table-light">
-                     <tr>
-                       <th style={{ fontWeight: "400" }}>Sr No.</th>
-                       <th style={{ fontWeight: "400" }}>Name</th>
-                       <th style={{ fontWeight: "400" }}>Position</th>
Added / After Commit
+ diff --git a/src/pages/Casino/CasinoCategory.tsx b/src/pages/Casino/CasinoCategory.tsx
+ index 605d1e6..f64cfae 100644
+ import { Fragment, useState } from "react";
+ import { Card, Col, Row, Button, Form, Modal } from "react-bootstrap";
+ import Pageheader from "../../components/pageheader/pageheader";
+ import DataTable from "react-data-table-component";
+ 
+ 
+ const LS_KEY = "casino_categories";
+ 
+ </span>
+ </Card.Header>
+ <Card.Body className="p-0">
+               <DataTable
+                 columns={[
+                   { name: "Sr No.", selector: (_: Category, i?: number) => (i ?? 0) + 1, width: "80px" },
+                   { name: "Name",         selector: (r: Category) => r.name,     sortable: true, cell: (r: Category) => <span className="fw-medium">{r.name}</span> },
+                   { name: "Position",     selector: (r: Category) => r.position, sortable: true },
Removed / Before Commit
- diff --git a/src/pages/Casino/LiveCasino.tsx b/src/pages/Casino/LiveCasino.tsx
- index b3c44ad..9853089 100644
- const [show, setShow] = useState(false);
- const [search, setSearch] = useState("");
- const [deleteId, setDeleteId] = useState<string | null>(null);
- 
- const games = ["Poker", "Blackjack", "Baccarat"];
Added / After Commit
+ diff --git a/src/pages/Casino/LiveCasino.tsx b/src/pages/Casino/LiveCasino.tsx
+ index b3c44ad..9853089 100644
+ const [show, setShow] = useState(false);
+ const [search, setSearch] = useState("");
+ const [deleteId, setDeleteId] = useState<string | null>(null);
+   
+ 
+ const games = ["Poker", "Blackjack", "Baccarat"];
Removed / Before Commit
- diff --git a/src/pages/Platforms/AdminMarketPage.tsx b/src/pages/Platforms/AdminMarketPage.tsx
- index 0d37d7a..8d5dbcf 100644
- 
- type GlobalState = { active: boolean; suspended: boolean; inactive: boolean };
- type StatusField = keyof GlobalState;
- type OddsField = keyof Pick<OddsRow, "back_odd" | "lay_odd">;
- 
- type UpdateOddsPayload = {
- marketsData: Array<{
- return false;
- };
- 
- const calculatePercentAdjustedOdd = (baseOdd: number, percent: number) => {
-   const adjusted = (baseOdd * percent) / 100;
-   return Number(adjusted.toFixed(2));
- };
- 
- const getRunnerRowKey = (marketId: string, index: number, runner?: OddsRow["runner"]) =>
Added / After Commit
+ diff --git a/src/pages/Platforms/AdminMarketPage.tsx b/src/pages/Platforms/AdminMarketPage.tsx
+ index 0d37d7a..8d5dbcf 100644
+ 
+ type GlobalState = { active: boolean; suspended: boolean; inactive: boolean };
+ type StatusField = keyof GlobalState;
+ 
+ type UpdateOddsPayload = {
+ marketsData: Array<{
+ return false;
+ };
+ 
+ const calculatePercentAdjustedOdd = (winnerOdd: number, pct: number): number => {
+   if (winnerOdd <= 0 || pct <= 0) return 0;
+   return Number(((winnerOdd * pct) / 100).toFixed(2));
+ };;
+ 
+ const getRunnerRowKey = (marketId: string, index: number, runner?: OddsRow["runner"]) =>
+ runner?.runnerId
Removed / Before Commit
- diff --git a/src/services/api/casinoService.ts b/src/services/api/casinoService.ts
- new file mode 100644
- index 0000000..e69de29
Added / After Commit
+ diff --git a/src/services/api/casinoService.ts b/src/services/api/casinoService.ts
+ new file mode 100644
+ index 0000000..e69de29