diff --git a/components/Organizer/ApplicantsTab/ApplicantsTab.tsx b/components/Organizer/ApplicantsTab/ApplicantsTab.tsx index 1ec1d4e0..1fd0b0de 100644 --- a/components/Organizer/ApplicantsTab/ApplicantsTab.tsx +++ b/components/Organizer/ApplicantsTab/ApplicantsTab.tsx @@ -415,10 +415,13 @@ export const ApplicantsTab = () => { visible={isAppModalOpen} onOk={handleAppCloseModal} onCancel={handleAppCloseModal}> - {selectedApplicant && - Object.entries(selectedApplicant.application!) + {selectedApplicant?.application ? ( + Object.entries(selectedApplicant.application) .filter(([field, _]) => field in APPLICATION_KEY_MAP) - .map(createSingleApplicantEntry)} + .map(createSingleApplicantEntry) + ) : ( +
Application details are not available.
+ )} )} {isCheckinModalOpen && ( diff --git a/components/judges/TeamSelect.tsx b/components/judges/TeamSelect.tsx index 03fe84f9..4dca5d2a 100644 --- a/components/judges/TeamSelect.tsx +++ b/components/judges/TeamSelect.tsx @@ -20,6 +20,18 @@ function withCheckMark(value: string) { ); } + +const optionComparator = (input: string, option: string) => { + let searchPosition = 0; + const cin = input.toLowerCase(); + const opt = option.toLowerCase(); + for (let i = 0; i < opt.length; ++i) { + if (opt[i] === cin[searchPosition]) ++searchPosition; + else break; + } + return searchPosition === input.length; +}; + export default function TeamSelect(props: TeamSelectProps) { const { teamsData, currentTeamID, handleChange } = props; const { data: session } = useSession(); @@ -34,10 +46,12 @@ export default function TeamSelect(props: TeamSelectProps) { Team: