Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type and bidding table issues #17

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/app/components/BiddingTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ const BiddingTable: React.FC<BiddingList> = ({user, userBids, refetchUserBids, b
<DialogTitle>Biddings for Number {selectedNumber}</DialogTitle>
</DialogHeader>
<h1> Your Points : {userBids.info.points}</h1>
{selectedNumber && biddings && biddings[selectedNumber] && (
{ biddings && biddings[selectedNumber] && (
<div className="flex flex-row justify-between">
<div>Quota M: {biddings[selectedNumber].quota.male}</div>
<div>Quota F: {biddings[selectedNumber].quota.female}</div>
Expand All @@ -314,15 +314,15 @@ const BiddingTable: React.FC<BiddingList> = ({user, userBids, refetchUserBids, b
</TableRow>
</TableHeader>
<TableBody>
{selectedNumber &&
{
biddings[selectedNumber] &&
biddings[selectedNumber].male.map((bid, index) => (
<TableRow key={index}>
<TableCell>{bid.user} (M)</TableCell>
<TableCell>${bid.amount.toFixed(2)}</TableCell>
</TableRow>
))}
{selectedNumber &&
{
biddings[selectedNumber] &&
biddings[selectedNumber].female.map((bid, index) => {
return (
Expand Down
10 changes: 0 additions & 10 deletions src/app/dashboard/jersey/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,30 @@ export interface UserInfo {
points: number;
isAllocated: boolean;
jersey?: JerseyType; // Only present if isAllocated is true
<<<<<<< HEAD
teams: Team[];
=======
teams: TeamContainer[];
>>>>>>> 81df05bbaae3cbaa3ef923043f4dd1a0af505bbf
}

export interface JerseyType {
number: number;
quota: Quota;
}

<<<<<<< HEAD
=======
export interface EligibleBids {
jerseys: number[];
}

>>>>>>> 81df05bbaae3cbaa3ef923043f4dd1a0af505bbf
export interface Quota {
male: number;
female: number;
}

interface Team {
name: string;
<<<<<<< HEAD
=======
shareable: boolean;
}

interface TeamContainer {
team: Team;
>>>>>>> 81df05bbaae3cbaa3ef923043f4dd1a0af505bbf
}

interface Bid {
Expand Down
Loading