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

Added display of allocated jersey #18

Merged
merged 23 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3e4b9df
fix login form and cca uiux.
juancarlovieri Aug 12, 2024
dbcee4f
Remove zone identifier.
juancarlovieri Aug 13, 2024
2b36d3b
fixed layout issues
frederickemerson Aug 13, 2024
a387bb1
fixed icon
frederickemerson Aug 15, 2024
27366e3
Add all the query routes
Kb-Tay Sep 30, 2024
e2085a1
Updating bidding form
Kb-Tay Sep 30, 2024
84e2913
oMerge https://github.com/eusoff-hackers/eusoff-frontend into fix/layout
frederickemerson Oct 7, 2024
96b5035
Merge branch 'jersey-bidding/aaron' of https://github.com/eusoff-hack…
frederickemerson Oct 7, 2024
b7879f6
added skeleton for bidding table
frederickemerson Oct 8, 2024
90da65d
Add logic for rendering
Kb-Tay Oct 13, 2024
35ffc34
modified a lot of code
frederickemerson Oct 13, 2024
2967f70
displaying user info
frederickemerson Oct 13, 2024
e548db2
added more design changes
frederickemerson Oct 13, 2024
a36b071
fixed eligible biddings
frederickemerson Oct 14, 2024
3b7a06b
Merge branch 'master' of https://github.com/eusoff-hackers/eusoff-fro…
frederickemerson Oct 14, 2024
7f3578d
more changes
frederickemerson Oct 14, 2024
2683f4f
Merge branch 'master' of https://github.com/eusoff-hackers/eusoff-fro…
frederickemerson Oct 14, 2024
869cef5
re-routed login, added user info, fixed number issue
frederickemerson Oct 14, 2024
9701850
final changes
frederickemerson Oct 14, 2024
fbd437d
Merge branch 'master' of https://github.com/eusoff-hackers/eusoff-fro…
frederickemerson Oct 15, 2024
4dd63de
final changes i hope so im ded
frederickemerson Oct 15, 2024
023cb68
Merge branch 'master' into jersey-bidding/fred
juancarlovieri Oct 15, 2024
6768821
Update types.ts
juancarlovieri Oct 15, 2024
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
63 changes: 34 additions & 29 deletions src/app/components/BiddingTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,35 +190,40 @@ const BiddingTable: React.FC<BiddingList> = ({ user, userBids, refetchUserBids,
<div className="container mx-auto p-4">
<h1 className="mb-4 text-2xl font-bold">Bidding Table</h1>
<Card className="mx-auto mb-2 w-full">
<CardHeader className="space-y-1 sm:space-y-1">
<CardTitle className="text-l sm:text-l font-bold">{user.username}</CardTitle>
<CardDescription className="text-sm sm:text-base">
Year: {user.year}, Gender: {user.gender}
</CardDescription>
</CardHeader>
<CardContent>
<div className="overflow-x-auto">
<div className="space-y-6">
<div className="flex items-center justify-between">
<h2 className="text-lg font-semibold">Round To Bid: {userBids.info.round} </h2>
<p className="text-lg font-bold text-primary">Current Round: {userBids.system.bidRound}</p>
</div>
<div className="flex items-center justify-between">
<h2 className="text-lg font-semibold">Status: </h2>
<p className="text-lg font-bold text-primary">{canBid ? "Can Bid" : "Cannot Bid"}</p>
</div>
<div className="flex items-center justify-between">
<h2 className="text-lg font-semibold">Points:</h2>
<p className="text-lg font-bold text-primary">{userBids.info.points.toLocaleString()}</p>
</div>
<div>
<h2 className="mb-2 text-lg font-semibold">Teams : </h2>
<div className="flex flex-wrap gap-2">
{userBids.info.teams.map(team => (
<Badge key={team.team.name} variant="outline" className={`bg-green-500 text-white`}>
{team.team.name}
</Badge>
))}
<CardHeader className="space-y-1 sm:space-y-1">
<CardTitle className="text-l sm:text-l font-bold">{user.username}</CardTitle>
<CardDescription className="text-sm sm:text-base">Year: {user.year}, Gender: {user.gender}</CardDescription>
</CardHeader>
<CardContent>
<div className="overflow-x-auto">
<div className="space-y-6">
{userBids.info.isAllocated && (
<div className="flex items-center justify-between">
<h2 className="text-lg font-semibold">Allocated Jersey: </h2>
<p className="text-lg font-bold text-primary">{userBids.info.jersey.number}</p>
</div>
)}
<div className="flex items-center justify-between">
<h2 className="text-lg font-semibold">Round To Bid: {userBids.info.round} </h2>
<p className="text-lg font-bold text-primary">Current Round: {userBids.system.bidRound}</p>
</div>
<div className="flex items-center justify-between">
<h2 className="text-lg font-semibold">Status: </h2>
<p className="text-lg font-bold text-primary">{canBid ? "Can Bid" : "Cannot Bid"}</p>
</div>
<div className="flex items-center justify-between">
<h2 className="text-lg font-semibold">Points:</h2>
<p className="text-lg font-bold text-primary">{userBids.info.points.toLocaleString()}</p>
</div>
<div>
<h2 className="mb-2 text-lg font-semibold">Teams : </h2>
<div className="flex flex-wrap gap-2">
{userBids.info.teams.map(team => (
<Badge key={team.team.name} variant="outline" className={`bg-green-500 text-white`}>
{team.team.name}
</Badge>
))}
</div>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/dashboard/jersey/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const Jersey: React.FC = () => {
try {
const response = await axios.get(`${process.env.NEXT_PUBLIC_BACKEND_URL}/jersey/list`);

console.log("response", response.data.data);
//console.log("response", response.data.data);

if (response.data.success) {
// console.log("This is eligible bids" + JSON.stringify(response.data.data));
Expand Down
Loading