From 608719efc1658861062d1cb0ae9a8b78e30e5942 Mon Sep 17 00:00:00 2001 From: Frederick Emerson <46756791+frederickemerson@users.noreply.github.com> Date: Mon, 14 Oct 2024 11:22:27 +0800 Subject: [PATCH] fixed ui changes (#13) * fix login form and cca uiux. * Remove zone identifier. * fixed layout issues * fixed icon * Add all the query routes * Updating bidding form * oMerge https://github.com/eusoff-hackers/eusoff-frontend into fix/layout * added skeleton for bidding table * Add logic for rendering * modified a lot of code * displaying user info * added more design changes * fixed eligible biddings * more changes --------- Co-authored-by: Juan Carlo Vieri Co-authored-by: Aaron --- src/app/components/BiddingTable.tsx | 4 ++- src/app/components/NavBar.tsx | 25 ++++++++++------- src/app/dashboard/jersey/page.tsx | 42 ++++++++++++++++++++--------- src/app/dashboard/jersey/types.ts | 10 +++++++ 4 files changed, 57 insertions(+), 24 deletions(-) diff --git a/src/app/components/BiddingTable.tsx b/src/app/components/BiddingTable.tsx index 3d24aec..0bd1293 100644 --- a/src/app/components/BiddingTable.tsx +++ b/src/app/components/BiddingTable.tsx @@ -145,6 +145,7 @@ const BiddingTable: React.FC = ({ userBids, refetchUserBids, biddin

Ensure you click submit to confirm changes

+ {/* {biddings.length == 0 ? ( {/* {biddings.length == 0 ? ( <> ) : ( @@ -177,6 +178,7 @@ const BiddingTable: React.FC = ({ userBids, refetchUserBids, biddin @@ -259,7 +261,7 @@ const BiddingTable: React.FC = ({ userBids, refetchUserBids, biddin

Eligible Bidding Numbers :

- {Array.from({ length: 100 }, (_, i) => i + 1).map(number => { + {Array.from({ length: 99 }, (_, i) => i + 1).map(number => { const isEligible = userEligibleBids !== undefined ? userEligibleBids.jerseys.includes(number) : false; // Check if the number is eligible return (
); - 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 {