diff --git a/src/app/components/BiddingTable.tsx b/src/app/components/BiddingTable.tsx index 0bd1293..4ba6fca 100644 --- a/src/app/components/BiddingTable.tsx +++ b/src/app/components/BiddingTable.tsx @@ -18,6 +18,7 @@ import type { ToastMessage } from "@/src/app/dashboard/jersey/page"; import { BiddingData, EligibleBids, UserBid } from "../dashboard/jersey/types"; interface BiddingList { + user:any, userBids: UserBid; refetchUserBids: () => Promise>; biddings: BiddingData; @@ -31,7 +32,7 @@ interface BiddingList { axios.defaults.withCredentials = true; // User submit bid form -const BiddingTable: React.FC = ({ userBids, refetchUserBids, biddings, userEligibleBids }) => { +const BiddingTable: React.FC = ({user, userBids, refetchUserBids, biddings, userEligibleBids }) => { const [open, setOpen] = useState(false); const [selectedNumber, setSelectedNumber] = useState(null); const priority = userBids ? userBids.bids.length : 0; @@ -50,7 +51,6 @@ const BiddingTable: React.FC = ({ userBids, refetchUserBids, biddin setSelectedNumber(number); }; - console.log("userBids", userBids); const handlePlaceBid = async (number: number) => { try { const newBids = { @@ -194,17 +194,21 @@ const BiddingTable: React.FC = ({ userBids, refetchUserBids, biddin */

Bidding Table

- {userBids && ( - + - Your Bids - View and manage your current bids + {user.username} + Year: {user.year}, Gender: {user.gender}
-

Status: {canBid ? "Can Bid" : "Cannot Bid"}

+

Round To Bid: {userBids.info.round}

+

Current Round: {userBids.system.bidRound}

+
+
+

Status:

+

{canBid ? "Can Bid" : "Cannot Bid"}

Points:

@@ -214,14 +218,26 @@ const BiddingTable: React.FC = ({ userBids, refetchUserBids, biddin

Teams :

{userBids.info.teams.map(team => ( - + {team.team.name} ))}
-

Bids :

+
+
+
+
+ + {userBids && ( + + + Your Bids + View and manage your current bids + + +
@@ -261,7 +277,7 @@ const BiddingTable: React.FC = ({ userBids, refetchUserBids, biddin

Eligible Bidding Numbers :

- {Array.from({ length: 99 }, (_, i) => i + 1).map(number => { + {Array.from({ length: 100 }, (_, i) => i ).map(number => { const isEligible = userEligibleBids !== undefined ? userEligibleBids.jerseys.includes(number) : false; // Check if the number is eligible return (
); - + }; export default Jersey; diff --git a/src/app/dashboard/jersey/types.ts b/src/app/dashboard/jersey/types.ts index 7009bcb..21a69f1 100644 --- a/src/app/dashboard/jersey/types.ts +++ b/src/app/dashboard/jersey/types.ts @@ -3,7 +3,11 @@ export interface UserInfo { points: number; isAllocated: boolean; jersey?: JerseyType; // Only present if isAllocated is true +<<<<<<< HEAD + teams: Team[]; +======= teams: TeamContainer[]; +>>>>>>> 81df05bbaae3cbaa3ef923043f4dd1a0af505bbf } export interface JerseyType { @@ -11,10 +15,13 @@ export interface JerseyType { quota: Quota; } +<<<<<<< HEAD +======= export interface EligibleBids { jerseys: number[]; } +>>>>>>> 81df05bbaae3cbaa3ef923043f4dd1a0af505bbf export interface Quota { male: number; female: number; @@ -22,11 +29,14 @@ export interface Quota { interface Team { name: string; +<<<<<<< HEAD +======= shareable: boolean; } interface TeamContainer { team: Team; +>>>>>>> 81df05bbaae3cbaa3ef923043f4dd1a0af505bbf } interface Bid {