From 84f8eb307d6b9c2842bad685d73dfeda5d5e3869 Mon Sep 17 00:00:00 2001 From: Elmoataz Abdellah <147349819+mezosauce@users.noreply.github.com> Date: Wed, 27 May 2026 00:40:30 +0000 Subject: [PATCH 1/2] Linter fix/ error clean new version --- .husky/pre-push | 4 +- client/src/app/makeuc-2025.css | 10 ++-- client/src/app/stats/page.tsx | 2 +- .../judging/generated/graphql/graphql.ts | 56 +++++++++++++++-- .../registration/generated/graphql/gql.ts | 13 +++- .../registration/generated/graphql/graphql.ts | 60 ++++++++++++++++++- client/src/generated/graphql/graphql.ts | 50 +++++++++++++++- server/admin/pages/utilities.tsx | 13 ++-- server/package.json | 6 +- server/schema.graphql | 2 + server/src/graphql/helpers/geography.ts | 17 ++++-- 11 files changed, 204 insertions(+), 29 deletions(-) diff --git a/.husky/pre-push b/.husky/pre-push index 5e0db94..5f966d6 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,5 +1,5 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -# yarn lint -# yarn build + yarn lint + yarn build diff --git a/client/src/app/makeuc-2025.css b/client/src/app/makeuc-2025.css index 49f7e55..45732a3 100644 --- a/client/src/app/makeuc-2025.css +++ b/client/src/app/makeuc-2025.css @@ -402,6 +402,12 @@ body { padding-left: 10px; } + +[type="button"]:not([role="checkbox"]) span{ + color: var(--foreground) !important; + opacity: 0.825 !important; +} + #title span { background: linear-gradient(white, #38495a); background-clip: text; @@ -480,10 +486,6 @@ textarea::placeholder, opacity: 0.65 !important; } -[type="button"]:not([role="checkbox"]) span:not(#title span) { - color: var(--foreground) !important; - opacity: 0.825 !important; -} .bg-destructive { color: white !important; diff --git a/client/src/app/stats/page.tsx b/client/src/app/stats/page.tsx index 3191828..e255e1e 100644 --- a/client/src/app/stats/page.tsx +++ b/client/src/app/stats/page.tsx @@ -3,7 +3,7 @@ import { PageTitle } from "~/components/general/typography"; import { Config } from "~/constants/config"; -export const revalidate = Config.RevalidationFrequency; +export const dynamic = "force-dynamic"; export default function StatsPage() { const year = new Date().getFullYear() - 1; diff --git a/client/src/features/judging/generated/graphql/graphql.ts b/client/src/features/judging/generated/graphql/graphql.ts index 034ead4..9829cdd 100644 --- a/client/src/features/judging/generated/graphql/graphql.ts +++ b/client/src/features/judging/generated/graphql/graphql.ts @@ -886,6 +886,8 @@ export type ProjectWhereUniqueInput = { export type Query = { __typename?: 'Query'; + cities: Array>; + countries: Array>; discordScheduledMessage?: Maybe; discordScheduledMessages?: Maybe>; discordScheduledMessagesCount?: Maybe; @@ -914,6 +916,10 @@ export type Query = { usersCount?: Maybe; }; +export type QueryCitiesArgs = { + countryId?: InputMaybe; +}; + export type QueryDiscordScheduledMessageArgs = { where: DiscordScheduledMessageWhereUniqueInput; @@ -1078,6 +1084,7 @@ export enum QueryMode { export type Registrant = { __typename?: 'Registrant'; + acceptAllAuthorization?: Maybe; acceptPhotoRelease?: Maybe; age?: Maybe; country?: Maybe; @@ -1089,24 +1096,33 @@ export type Registrant = { ethnicity?: Maybe; expectedGraduationYear?: Maybe; firstName?: Maybe; + foodAllergy?: Maybe; + foodSuggestions?: Maybe; gender?: Maybe; hackathonsAttended?: Maybe; id: Scalars['ID']['output']; invitedInPerson?: Maybe; lastName?: Maybe; major?: Maybe; + makeucCodeOfConduct?: Maybe; + makeucHackathonRules?: Maybe; + makeucLiabilityRelease?: Maybe; mlhCodeOfConductAgreement?: Maybe; mlhEmailAgreement?: Maybe; mlhPrivacyPolicyAgreement?: Maybe; notes?: Maybe; + participationPreference?: Maybe; + phoneNumber?: Maybe; registrationYear?: Maybe; resume?: Maybe; school?: Maybe; + tshirtSize?: Maybe; user?: Maybe; verified?: Maybe; }; export type RegistrantCreateInput = { + acceptAllAuthorization?: InputMaybe; age?: InputMaybe; country?: InputMaybe; createdAt?: InputMaybe; @@ -1115,16 +1131,24 @@ export type RegistrantCreateInput = { ethnicity?: InputMaybe; expectedGraduationYear?: InputMaybe; firstName?: InputMaybe; + foodAllergy?: InputMaybe; + foodSuggestions?: InputMaybe; gender?: InputMaybe; hackathonsAttended?: InputMaybe; lastName?: InputMaybe; major?: InputMaybe; + makeucCodeOfConduct?: InputMaybe; + makeucHackathonRules?: InputMaybe; + makeucLiabilityRelease?: InputMaybe; mlhCodeOfConductAgreement?: InputMaybe; mlhEmailAgreement?: InputMaybe; mlhPrivacyPolicyAgreement?: InputMaybe; notes?: InputMaybe; + participationPreference?: InputMaybe; + phoneNumber?: InputMaybe; resume?: InputMaybe; school?: InputMaybe; + tshirtSize?: InputMaybe; user?: InputMaybe; }; @@ -1135,6 +1159,7 @@ export type RegistrantManyRelationFilter = { }; export type RegistrantOrderByInput = { + acceptAllAuthorization?: InputMaybe; acceptPhotoRelease?: InputMaybe; age?: InputMaybe; country?: InputMaybe; @@ -1146,17 +1171,23 @@ export type RegistrantOrderByInput = { ethnicity?: InputMaybe; expectedGraduationYear?: InputMaybe; firstName?: InputMaybe; + foodAllergy?: InputMaybe; + foodSuggestions?: InputMaybe; gender?: InputMaybe; hackathonsAttended?: InputMaybe; id?: InputMaybe; invitedInPerson?: InputMaybe; lastName?: InputMaybe; major?: InputMaybe; + makeucCodeOfConduct?: InputMaybe; + makeucHackathonRules?: InputMaybe; + makeucLiabilityRelease?: InputMaybe; mlhCodeOfConductAgreement?: InputMaybe; mlhEmailAgreement?: InputMaybe; mlhPrivacyPolicyAgreement?: InputMaybe; notes?: InputMaybe; registrationYear?: InputMaybe; + tshirtSize?: InputMaybe; verified?: InputMaybe; }; @@ -1178,6 +1209,7 @@ export type RegistrantUpdateArgs = { }; export type RegistrantUpdateInput = { + acceptAllAuthorization?: InputMaybe; age?: InputMaybe; country?: InputMaybe; createdAt?: InputMaybe; @@ -1186,16 +1218,23 @@ export type RegistrantUpdateInput = { ethnicity?: InputMaybe; expectedGraduationYear?: InputMaybe; firstName?: InputMaybe; + foodAllergy?: InputMaybe; + foodSuggestions?: InputMaybe; gender?: InputMaybe; hackathonsAttended?: InputMaybe; lastName?: InputMaybe; major?: InputMaybe; + makeucCodeOfConduct?: InputMaybe; + makeucHackathonRules?: InputMaybe; + makeucLiabilityRelease?: InputMaybe; mlhCodeOfConductAgreement?: InputMaybe; mlhEmailAgreement?: InputMaybe; mlhPrivacyPolicyAgreement?: InputMaybe; notes?: InputMaybe; + participationPreference?: InputMaybe; resume?: InputMaybe; school?: InputMaybe; + tshirtSize?: InputMaybe; user?: InputMaybe; }; @@ -1203,6 +1242,7 @@ export type RegistrantWhereInput = { AND?: InputMaybe>; NOT?: InputMaybe>; OR?: InputMaybe>; + acceptAllAuthorization?: InputMaybe; acceptPhotoRelease?: InputMaybe; age?: InputMaybe; country?: InputMaybe; @@ -1214,18 +1254,26 @@ export type RegistrantWhereInput = { ethnicity?: InputMaybe; expectedGraduationYear?: InputMaybe; firstName?: InputMaybe; + foodAllergy?: InputMaybe; + foodSuggestions?: InputMaybe; gender?: InputMaybe; hackathonsAttended?: InputMaybe; id?: InputMaybe; invitedInPerson?: InputMaybe; lastName?: InputMaybe; major?: InputMaybe; + makeucCodeOfConduct?: InputMaybe; + makeucHackathonRules?: InputMaybe; + makeucLiabilityRelease?: InputMaybe; mlhCodeOfConductAgreement?: InputMaybe; mlhEmailAgreement?: InputMaybe; mlhPrivacyPolicyAgreement?: InputMaybe; notes?: InputMaybe; + participantionPreference?: InputMaybe; + phoneNumber?: InputMaybe; registrationYear?: InputMaybe; school?: InputMaybe; + tshirtSize?: InputMaybe; user?: InputMaybe; verified?: InputMaybe; }; @@ -1544,7 +1592,7 @@ export type GetTracksQueryVariables = Exact<{ export type GetTracksQuery = { __typename?: 'Query', tracks?: Array<{ __typename?: 'Track', name?: string | null }> | null }; -export const SubmitJudgementDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SubmitJudgement"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"data"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"JudgementCreateInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createJudgement"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"data"},"value":{"kind":"Variable","name":{"kind":"Name","value":"data"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode; -export const DisqualifyProjectDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DisqualifyProject"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"reason"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"disqualifyProject"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"projectId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}}},{"kind":"Argument","name":{"kind":"Name","value":"reason"},"value":{"kind":"Variable","name":{"kind":"Name","value":"reason"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode; -export const GetProjectsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetProjects"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"where"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ProjectWhereInput"}}},"defaultValue":{"kind":"ObjectValue","fields":[]}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"skip"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},"defaultValue":{"kind":"IntValue","value":"0"}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"take"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}},"defaultValue":{"kind":"IntValue","value":"100"}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ProjectOrderByInput"}}}}},"defaultValue":{"kind":"ListValue","values":[]}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"ProjectWhereUniqueInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"projects"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"Variable","name":{"kind":"Name","value":"where"}}},{"kind":"Argument","name":{"kind":"Name","value":"skip"},"value":{"kind":"Variable","name":{"kind":"Name","value":"skip"}}},{"kind":"Argument","name":{"kind":"Name","value":"take"},"value":{"kind":"Variable","name":{"kind":"Name","value":"take"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderBy"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}}},{"kind":"Argument","name":{"kind":"Name","value":"cursor"},"value":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"url"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"countJudgements"}},{"kind":"Field","name":{"kind":"Name","value":"judgingGroup"}},{"kind":"Field","name":{"kind":"Name","value":"year"}},{"kind":"Field","name":{"kind":"Name","value":"score"}},{"kind":"Field","name":{"kind":"Name","value":"disqualified"}},{"kind":"Field","name":{"kind":"Name","value":"applicableTracks"}}]}},{"kind":"Field","name":{"kind":"Name","value":"projectsCount"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"Variable","name":{"kind":"Name","value":"where"}}}]}]}}]} as unknown as DocumentNode; -export const GetTracksDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTracks"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"where"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"TrackWhereInput"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"skip"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},"defaultValue":{"kind":"IntValue","value":"0"}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"take"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}},"defaultValue":{"kind":"IntValue","value":"20"}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"TrackOrderByInput"}}}}},"defaultValue":{"kind":"ListValue","values":[]}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"TrackWhereUniqueInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"tracks"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"Variable","name":{"kind":"Name","value":"where"}}},{"kind":"Argument","name":{"kind":"Name","value":"skip"},"value":{"kind":"Variable","name":{"kind":"Name","value":"skip"}}},{"kind":"Argument","name":{"kind":"Name","value":"take"},"value":{"kind":"Variable","name":{"kind":"Name","value":"take"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderBy"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}}},{"kind":"Argument","name":{"kind":"Name","value":"cursor"},"value":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const SubmitJudgementDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "SubmitJudgement" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "data" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "JudgementCreateInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "createJudgement" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "data" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "data" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }] } }] } as unknown as DocumentNode; +export const DisqualifyProjectDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "DisqualifyProject" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "projectId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ID" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "reason" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "disqualifyProject" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "projectId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "projectId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "reason" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "reason" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }] } }] } as unknown as DocumentNode; +export const GetProjectsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetProjects" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "where" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ProjectWhereInput" } } }, "defaultValue": { "kind": "ObjectValue", "fields": [] } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "skip" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, "defaultValue": { "kind": "IntValue", "value": "0" } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "take" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } }, "defaultValue": { "kind": "IntValue", "value": "100" } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "orderBy" } }, "type": { "kind": "NonNullType", "type": { "kind": "ListType", "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ProjectOrderByInput" } } } } }, "defaultValue": { "kind": "ListValue", "values": [] } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "cursor" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ProjectWhereUniqueInput" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "projects" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "where" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "where" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "skip" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "skip" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "take" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "take" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "orderBy" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "orderBy" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "cursor" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "cursor" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "url" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "countJudgements" } }, { "kind": "Field", "name": { "kind": "Name", "value": "judgingGroup" } }, { "kind": "Field", "name": { "kind": "Name", "value": "year" } }, { "kind": "Field", "name": { "kind": "Name", "value": "score" } }, { "kind": "Field", "name": { "kind": "Name", "value": "disqualified" } }, { "kind": "Field", "name": { "kind": "Name", "value": "applicableTracks" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "projectsCount" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "where" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "where" } } }] }] } }] } as unknown as DocumentNode; +export const GetTracksDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetTracks" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "where" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "TrackWhereInput" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "skip" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, "defaultValue": { "kind": "IntValue", "value": "0" } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "take" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } }, "defaultValue": { "kind": "IntValue", "value": "20" } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "orderBy" } }, "type": { "kind": "NonNullType", "type": { "kind": "ListType", "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "TrackOrderByInput" } } } } }, "defaultValue": { "kind": "ListValue", "values": [] } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "cursor" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "TrackWhereUniqueInput" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "tracks" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "where" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "where" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "skip" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "skip" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "take" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "take" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "orderBy" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "orderBy" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "cursor" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "cursor" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }] } }] } as unknown as DocumentNode; \ No newline at end of file diff --git a/client/src/features/registration/generated/graphql/gql.ts b/client/src/features/registration/generated/graphql/gql.ts index ca239c4..d81ee90 100644 --- a/client/src/features/registration/generated/graphql/gql.ts +++ b/client/src/features/registration/generated/graphql/gql.ts @@ -13,8 +13,9 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/ * Therefore it is highly recommended to use the babel or swc plugin for production. */ const documents = { - "mutation CreateRegistrant($data: RegistrantCreateInput!) {\n createRegistrant(data: $data) {\n id\n }\n}\n\nmutation VerifyRegistrant($id: ID!) {\n verifyRegistrant(id: $id) {\n id\n }\n}": types.CreateRegistrantDocument, - "query GetSchools($where: SchoolWhereInput!, $orderBy: [SchoolOrderByInput!]!, $skip: Int!, $take: Int!) {\n schools(where: $where, orderBy: $orderBy, skip: $skip, take: $take) {\n id\n name\n }\n}": types.GetSchoolsDocument, + "query GetCountries {\n schools(orderBy: {country: asc}, take: 1000) {\n country\n }\n}\n\nquery GetCities($countryId: Int) {\n cities(countryId: $countryId)\n}": types.GetCountriesDocument, + "mutation CreateRegistrant($data: RegistrantCreateInput!) {\n createRegistrant(data: $data) {\n id\n }\n}\n\nmutation VerifyRegistrant($id: ID!) {\n verifyRegistrant(id: $id) {\n id\n }\n}": types.CreateRegistrantDocument, + "query GetSchools($where: SchoolWhereInput!, $orderBy: [SchoolOrderByInput!]!, $skip: Int!, $take: Int!) {\n schools(where: $where, orderBy: $orderBy, skip: $skip, take: $take) {\n id\n name\n }\n}": types.GetSchoolsDocument, }; /** @@ -31,6 +32,12 @@ const documents = { */ export function graphql(source: string): unknown; + +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "query GetCountries {\n schools(orderBy: {country: asc}, take: 1000) {\n country\n }\n}\n\nquery GetCities($countryId: Int) {\n cities(countryId: $countryId)\n}"): (typeof documents)["query GetCountries {\n schools(orderBy: {country: asc}, take: 1000) {\n country\n }\n}\n\nquery GetCities($countryId: Int) {\n cities(countryId: $countryId)\n}"]; + /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -44,4 +51,4 @@ export function graphql(source: string) { return (documents as any)[source] ?? {}; } -export type DocumentType> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never; \ No newline at end of file +export type DocumentType> = TDocumentNode extends DocumentNode ? TType : never; \ No newline at end of file diff --git a/client/src/features/registration/generated/graphql/graphql.ts b/client/src/features/registration/generated/graphql/graphql.ts index 989e2fa..6b514d9 100644 --- a/client/src/features/registration/generated/graphql/graphql.ts +++ b/client/src/features/registration/generated/graphql/graphql.ts @@ -886,6 +886,8 @@ export type ProjectWhereUniqueInput = { export type Query = { __typename?: 'Query'; + cities: Array>; + countries: Array>; discordScheduledMessage?: Maybe; discordScheduledMessages?: Maybe>; discordScheduledMessagesCount?: Maybe; @@ -915,6 +917,10 @@ export type Query = { }; +export type QueryCitiesArgs = { + countryId?: InputMaybe; +}; + export type QueryDiscordScheduledMessageArgs = { where: DiscordScheduledMessageWhereUniqueInput; }; @@ -1078,6 +1084,7 @@ export enum QueryMode { export type Registrant = { __typename?: 'Registrant'; + acceptAllAuthorization?: Maybe; acceptPhotoRelease?: Maybe; age?: Maybe; country?: Maybe; @@ -1089,24 +1096,33 @@ export type Registrant = { ethnicity?: Maybe; expectedGraduationYear?: Maybe; firstName?: Maybe; + foodAllergy?: Maybe; + foodSuggestions?: Maybe; gender?: Maybe; hackathonsAttended?: Maybe; id: Scalars['ID']['output']; invitedInPerson?: Maybe; lastName?: Maybe; major?: Maybe; + makeucCodeOfConduct?: Maybe; + makeucHackathonRules?: Maybe; + makeucLiabilityRelease?: Maybe; mlhCodeOfConductAgreement?: Maybe; mlhEmailAgreement?: Maybe; mlhPrivacyPolicyAgreement?: Maybe; notes?: Maybe; + participationPreference?: Maybe; + phoneNumber?: Maybe; registrationYear?: Maybe; resume?: Maybe; school?: Maybe; + tshirtSize?: Maybe; user?: Maybe; verified?: Maybe; }; export type RegistrantCreateInput = { + acceptAllAuthorization?: InputMaybe; age?: InputMaybe; country?: InputMaybe; createdAt?: InputMaybe; @@ -1115,16 +1131,24 @@ export type RegistrantCreateInput = { ethnicity?: InputMaybe; expectedGraduationYear?: InputMaybe; firstName?: InputMaybe; + foodAllergy?: InputMaybe; + foodSuggestions?: InputMaybe; gender?: InputMaybe; hackathonsAttended?: InputMaybe; lastName?: InputMaybe; major?: InputMaybe; + makeucCodeOfConduct?: InputMaybe; + makeucHackathonRules?: InputMaybe; + makeucLiabilityRelease?: InputMaybe; mlhCodeOfConductAgreement?: InputMaybe; mlhEmailAgreement?: InputMaybe; mlhPrivacyPolicyAgreement?: InputMaybe; notes?: InputMaybe; + participationPreference?: InputMaybe; + phoneNumber?: InputMaybe; resume?: InputMaybe; school?: InputMaybe; + tshirtSize?: InputMaybe; user?: InputMaybe; }; @@ -1178,6 +1202,7 @@ export type RegistrantUpdateArgs = { }; export type RegistrantUpdateInput = { + acceptAllAuthorization?: InputMaybe; age?: InputMaybe; country?: InputMaybe; createdAt?: InputMaybe; @@ -1186,16 +1211,24 @@ export type RegistrantUpdateInput = { ethnicity?: InputMaybe; expectedGraduationYear?: InputMaybe; firstName?: InputMaybe; + foodAllergy?: InputMaybe; + foodSuggestions?: InputMaybe; gender?: InputMaybe; hackathonsAttended?: InputMaybe; lastName?: InputMaybe; major?: InputMaybe; + makeucCodeOfConduct?: InputMaybe; + makeucHackathonRules?: InputMaybe; + makeucLiabilityRelease?: InputMaybe; mlhCodeOfConductAgreement?: InputMaybe; mlhEmailAgreement?: InputMaybe; mlhPrivacyPolicyAgreement?: InputMaybe; notes?: InputMaybe; + participationPreference?: InputMaybe; + phoneNumber?: InputMaybe; resume?: InputMaybe; school?: InputMaybe; + tshirtSize?: InputMaybe; user?: InputMaybe; }; @@ -1203,6 +1236,7 @@ export type RegistrantWhereInput = { AND?: InputMaybe>; NOT?: InputMaybe>; OR?: InputMaybe>; + acceptAllAuthorization?: InputMaybe; acceptPhotoRelease?: InputMaybe; age?: InputMaybe; country?: InputMaybe; @@ -1214,16 +1248,21 @@ export type RegistrantWhereInput = { ethnicity?: InputMaybe; expectedGraduationYear?: InputMaybe; firstName?: InputMaybe; + foodAllergy?: InputMaybe; + foodSuggestions?: InputMaybe; gender?: InputMaybe; hackathonsAttended?: InputMaybe; id?: InputMaybe; invitedInPerson?: InputMaybe; lastName?: InputMaybe; major?: InputMaybe; + participationPreference?: InputMaybe; + phoneNumber?: InputMaybe; mlhCodeOfConductAgreement?: InputMaybe; mlhEmailAgreement?: InputMaybe; mlhPrivacyPolicyAgreement?: InputMaybe; notes?: InputMaybe; + tshirtSize?: InputMaybe; registrationYear?: InputMaybe; school?: InputMaybe; user?: InputMaybe; @@ -1506,6 +1545,19 @@ export type UserWhereUniqueInput = { id?: InputMaybe; }; +export type GetCountriesQueryVariables = Exact<{ [key: string]: never; }>; + + +export type GetCountriesQuery = { __typename?: 'Query', schools?: Array<{ __typename?: 'School', country?: string | null }> | null }; + +export type GetCitiesQueryVariables = Exact<{ + countryId?: InputMaybe; +}>; + + +export type GetCitiesQuery = { __typename?: 'Query', cities: Array }; + + export type CreateRegistrantMutationVariables = Exact<{ data: RegistrantCreateInput; }>; @@ -1531,6 +1583,8 @@ export type GetSchoolsQueryVariables = Exact<{ export type GetSchoolsQuery = { __typename?: 'Query', schools?: Array<{ __typename?: 'School', id: string, name?: string | null }> | null }; -export const CreateRegistrantDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateRegistrant"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"data"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"RegistrantCreateInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createRegistrant"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"data"},"value":{"kind":"Variable","name":{"kind":"Name","value":"data"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode; -export const VerifyRegistrantDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"VerifyRegistrant"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"verifyRegistrant"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode; -export const GetSchoolsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSchools"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"where"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SchoolWhereInput"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SchoolOrderByInput"}}}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"skip"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"take"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"schools"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"Variable","name":{"kind":"Name","value":"where"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderBy"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}}},{"kind":"Argument","name":{"kind":"Name","value":"skip"},"value":{"kind":"Variable","name":{"kind":"Name","value":"skip"}}},{"kind":"Argument","name":{"kind":"Name","value":"take"},"value":{"kind":"Variable","name":{"kind":"Name","value":"take"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const GetCountriesDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetCountries" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "schools" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "orderBy" }, "value": { "kind": "ObjectValue", "fields": [{ "kind": "ObjectField", "name": { "kind": "Name", "value": "country" }, "value": { "kind": "EnumValue", "value": "asc" } }] } }, { "kind": "Argument", "name": { "kind": "Name", "value": "take" }, "value": { "kind": "IntValue", "value": "1000" } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "country" } }] } }] } }] } as unknown as DocumentNode; +export const GetCitiesDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetCities" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "countryId" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "cities" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "countryId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "countryId" } } }] }] } }] } as unknown as DocumentNode; +export const CreateRegistrantDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateRegistrant" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "data" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "RegistrantCreateInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "createRegistrant" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "data" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "data" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }] } }] } as unknown as DocumentNode; +export const VerifyRegistrantDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "VerifyRegistrant" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ID" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "verifyRegistrant" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }] } }] } as unknown as DocumentNode; +export const GetSchoolsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetSchools" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "where" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "SchoolWhereInput" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "orderBy" } }, "type": { "kind": "NonNullType", "type": { "kind": "ListType", "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "SchoolOrderByInput" } } } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "skip" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "take" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "schools" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "where" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "where" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "orderBy" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "orderBy" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "skip" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "skip" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "take" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "take" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }] } }] } as unknown as DocumentNode; \ No newline at end of file diff --git a/client/src/generated/graphql/graphql.ts b/client/src/generated/graphql/graphql.ts index 9890f28..cfba0d1 100644 --- a/client/src/generated/graphql/graphql.ts +++ b/client/src/generated/graphql/graphql.ts @@ -886,6 +886,8 @@ export type ProjectWhereUniqueInput = { export type Query = { __typename?: 'Query'; + cities: Array>; + countries: Array>; discordScheduledMessage?: Maybe; discordScheduledMessages?: Maybe>; discordScheduledMessagesCount?: Maybe; @@ -914,6 +916,9 @@ export type Query = { usersCount?: Maybe; }; +export type QueryCitiesArgs = { + countryId?: InputMaybe; +}; export type QueryDiscordScheduledMessageArgs = { where: DiscordScheduledMessageWhereUniqueInput; @@ -1078,6 +1083,7 @@ export enum QueryMode { export type Registrant = { __typename?: 'Registrant'; + acceptAllAuthorization?: Maybe; acceptPhotoRelease?: Maybe; age?: Maybe; country?: Maybe; @@ -1089,24 +1095,33 @@ export type Registrant = { ethnicity?: Maybe; expectedGraduationYear?: Maybe; firstName?: Maybe; + foodAllergy?: Maybe; + foodSuggestions?: Maybe; gender?: Maybe; hackathonsAttended?: Maybe; id: Scalars['ID']['output']; invitedInPerson?: Maybe; lastName?: Maybe; major?: Maybe; + makeucCodeOfConduct?: Maybe; + makeucHackathonRules?: Maybe; + makeucLiabilityRelease?: Maybe; mlhCodeOfConductAgreement?: Maybe; mlhEmailAgreement?: Maybe; mlhPrivacyPolicyAgreement?: Maybe; notes?: Maybe; + participationPreference?: Maybe; + phoneNumber?: Maybe; registrationYear?: Maybe; resume?: Maybe; school?: Maybe; + tshirtSize?: Maybe; user?: Maybe; verified?: Maybe; }; export type RegistrantCreateInput = { + acceptAllAuthorization?: InputMaybe; age?: InputMaybe; country?: InputMaybe; createdAt?: InputMaybe; @@ -1115,16 +1130,24 @@ export type RegistrantCreateInput = { ethnicity?: InputMaybe; expectedGraduationYear?: InputMaybe; firstName?: InputMaybe; + foodAllergy?: InputMaybe; + foodSuggestions?: InputMaybe; gender?: InputMaybe; hackathonsAttended?: InputMaybe; lastName?: InputMaybe; major?: InputMaybe; + makeucCodeOfConduct?: InputMaybe; + makeucHackathonRules?: InputMaybe; + makeucLiabilityRelease?: InputMaybe; mlhCodeOfConductAgreement?: InputMaybe; mlhEmailAgreement?: InputMaybe; mlhPrivacyPolicyAgreement?: InputMaybe; notes?: InputMaybe; + participationPreference?: InputMaybe; + phoneNumber?: InputMaybe; resume?: InputMaybe; school?: InputMaybe; + tshirtSize?: InputMaybe; user?: InputMaybe; }; @@ -1135,6 +1158,7 @@ export type RegistrantManyRelationFilter = { }; export type RegistrantOrderByInput = { + acceptAllAuthorization?: InputMaybe; acceptPhotoRelease?: InputMaybe; age?: InputMaybe; country?: InputMaybe; @@ -1146,17 +1170,25 @@ export type RegistrantOrderByInput = { ethnicity?: InputMaybe; expectedGraduationYear?: InputMaybe; firstName?: InputMaybe; + foodAllergy?: InputMaybe; + foodSuggestions?: InputMaybe; gender?: InputMaybe; hackathonsAttended?: InputMaybe; id?: InputMaybe; invitedInPerson?: InputMaybe; lastName?: InputMaybe; major?: InputMaybe; + makeucCodeOfConduct?: InputMaybe; + makeucHackathonRules?: InputMaybe; + makeucLiabilityRelease?: InputMaybe; mlhCodeOfConductAgreement?: InputMaybe; mlhEmailAgreement?: InputMaybe; mlhPrivacyPolicyAgreement?: InputMaybe; notes?: InputMaybe; + participationPreference?: InputMaybe; + phoneNumber?: InputMaybe; registrationYear?: InputMaybe; + tshirtSize?: InputMaybe; verified?: InputMaybe; }; @@ -1178,6 +1210,7 @@ export type RegistrantUpdateArgs = { }; export type RegistrantUpdateInput = { + acceptAllAuthorization?: InputMaybe; age?: InputMaybe; country?: InputMaybe; createdAt?: InputMaybe; @@ -1186,16 +1219,22 @@ export type RegistrantUpdateInput = { ethnicity?: InputMaybe; expectedGraduationYear?: InputMaybe; firstName?: InputMaybe; + foodAllergy?: InputMaybe; + foodSuggestions?: InputMaybe; gender?: InputMaybe; hackathonsAttended?: InputMaybe; lastName?: InputMaybe; major?: InputMaybe; + makeucCodeOfConduct?: InputMaybe; + makeucHackathonRules?: InputMaybe; + makeucLiabilityRelease?: InputMaybe; mlhCodeOfConductAgreement?: InputMaybe; mlhEmailAgreement?: InputMaybe; mlhPrivacyPolicyAgreement?: InputMaybe; notes?: InputMaybe; resume?: InputMaybe; school?: InputMaybe; + tshirtSize?: InputMaybe; user?: InputMaybe; }; @@ -1203,6 +1242,7 @@ export type RegistrantWhereInput = { AND?: InputMaybe>; NOT?: InputMaybe>; OR?: InputMaybe>; + acceptAllAuthorization?: InputMaybe; acceptPhotoRelease?: InputMaybe; age?: InputMaybe; country?: InputMaybe; @@ -1214,18 +1254,26 @@ export type RegistrantWhereInput = { ethnicity?: InputMaybe; expectedGraduationYear?: InputMaybe; firstName?: InputMaybe; + foodAllergy?: InputMaybe; + foodSuggestions?: InputMaybe; gender?: InputMaybe; hackathonsAttended?: InputMaybe; id?: InputMaybe; invitedInPerson?: InputMaybe; lastName?: InputMaybe; major?: InputMaybe; + makeucCodeOfConduct?: InputMaybe; + makeucHackathonRules?: InputMaybe; + makeucLiabilityRelease?: InputMaybe; mlhCodeOfConductAgreement?: InputMaybe; mlhEmailAgreement?: InputMaybe; mlhPrivacyPolicyAgreement?: InputMaybe; notes?: InputMaybe; + participationPreference?: InputMaybe; + phoneNumber?: InputMaybe; registrationYear?: InputMaybe; school?: InputMaybe; + tshirtSize?: InputMaybe; user?: InputMaybe; verified?: InputMaybe; }; @@ -1514,4 +1562,4 @@ export type GetStatisticsQueryVariables = Exact<{ export type GetStatisticsQuery = { __typename?: 'Query', statistics?: string | null }; -export const GetStatisticsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetStatistics"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"year"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"statistics"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"year"},"value":{"kind":"Variable","name":{"kind":"Name","value":"year"}}}]}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const GetStatisticsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetStatistics" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "year" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "statistics" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "year" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "year" } } }] }] } }] } as unknown as DocumentNode; \ No newline at end of file diff --git a/server/admin/pages/utilities.tsx b/server/admin/pages/utilities.tsx index 26f8ecc..5f9c5b0 100644 --- a/server/admin/pages/utilities.tsx +++ b/server/admin/pages/utilities.tsx @@ -4,25 +4,26 @@ import { Heading, H1, H3 } from "@keystone-ui/core"; import type { FormEventHandler } from "react"; + export const gql = ([content]: TemplateStringsArray) => content; // eslint-disable-next-line @typescript-eslint/no-explicit-any export async function fetchGraphQL( query: string, - variables?: Record + variables?: Record ) { return fetch("/api/graphql", { method: "POST", body: JSON.stringify({ query, variables }), headers: { "Content-Type": "application/json" }, }) - .then((x) => x.json()) + .then(x => x.json()) .then(({ data, errors }) => { if (errors) { throw new Error( // eslint-disable-next-line @typescript-eslint/no-explicit-any `GraphQL errors occurred:\n${errors - .map((x: any) => x.message) + .map((x: { message: string }) => x.message) .join("\n")}` ); } @@ -38,7 +39,7 @@ async function seedIndiaSchools() { `); } -const importRegistrants: FormEventHandler = (event) => { +const importRegistrants: FormEventHandler = event => { event.preventDefault(); const formData = new FormData(event.target as HTMLFormElement); @@ -49,7 +50,7 @@ const importRegistrants: FormEventHandler = (event) => { }); }; -const importProjects: FormEventHandler = (event) => { +const importProjects: FormEventHandler = event => { event.preventDefault(); const formData = new FormData(event.target as HTMLFormElement); @@ -134,7 +135,7 @@ export default function UtilitiesPage() { } const blob = await resp.blob(); const disposition = resp.headers.get("content-disposition") || ""; - let filename = `judgements_export_${new Date().toISOString().slice(0,19).replace("T","_").replace(/:/g, "-")}.zip`; + let filename = `judgements_export_${new Date().toISOString().slice(0, 19).replace("T", "_").replace(/:/g, "-")}.zip`; const match = disposition.match(/filename="?([^";]+)"?/); if (match) filename = match[1]; const link = document.createElement("a"); diff --git a/server/package.json b/server/package.json index 2b123c0..20565aa 100644 --- a/server/package.json +++ b/server/package.json @@ -37,6 +37,10 @@ "typescript": "^4.9.5", "zod": "^3.22.3" }, + "optionalDependencies": { + "@esbuild/darwin-arm64": "0.20.2", + "@esbuild/darwin-x64": "0.20.2" + }, "devDependencies": { "@types/archiver": "^5.1.1", "@types/express-fileupload": "^1.4.1", @@ -54,4 +58,4 @@ "npm": "please-use-yarn", "yarn": ">= 1.19.1" } -} +} \ No newline at end of file diff --git a/server/schema.graphql b/server/schema.graphql index 6d30901..53fd22b 100644 --- a/server/schema.graphql +++ b/server/schema.graphql @@ -913,6 +913,8 @@ type Query { passportStrategyStorage(where: PassportStrategyStorageWhereUniqueInput!): PassportStrategyStorage passportStrategyStoragesCount(where: PassportStrategyStorageWhereInput! = {}): Int keystone: KeystoneMeta! + counties: [JSON]! + cities(countyId: Int): [JSON]! statistics(year: Int!): String } diff --git a/server/src/graphql/helpers/geography.ts b/server/src/graphql/helpers/geography.ts index f0651fe..f811a0e 100644 --- a/server/src/graphql/helpers/geography.ts +++ b/server/src/graphql/helpers/geography.ts @@ -105,10 +105,19 @@ export const initializeGeographyState = async (): Promise // First pass: Initialize countries for (const country of countriesData) { - countries.set(country.id, { - ...country, - states: country.hasStates ? new Map() : undefined, - }); + if (country.hasStates) { + countries.set(country.id, { + ...country, + hasStates: true, + states: new Map(), + }); + } else { + countries.set(country.id, { + ...country, + hasStates: false, + cities: new Map(), + }); + } } // Second pass: Link states to countries From 066f4a4ddbcbe8670bf7243bbeb300e2f41d7a4a Mon Sep 17 00:00:00 2001 From: Elmoataz Abdellah <147349819+mezosauce@users.noreply.github.com> Date: Wed, 27 May 2026 00:56:48 +0000 Subject: [PATCH 2/2] Dummy --- server/schema.graphql | 4 ++-- server/src/graphql/index.ts | 19 ++++++++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/server/schema.graphql b/server/schema.graphql index 53fd22b..9918a75 100644 --- a/server/schema.graphql +++ b/server/schema.graphql @@ -913,8 +913,8 @@ type Query { passportStrategyStorage(where: PassportStrategyStorageWhereUniqueInput!): PassportStrategyStorage passportStrategyStoragesCount(where: PassportStrategyStorageWhereInput! = {}): Int keystone: KeystoneMeta! - counties: [JSON]! - cities(countyId: Int): [JSON]! + countries: [JSON]! + cities(countryId: Int): [JSON]! statistics(year: Int!): String } diff --git a/server/src/graphql/index.ts b/server/src/graphql/index.ts index 7bbe981..6e7990e 100644 --- a/server/src/graphql/index.ts +++ b/server/src/graphql/index.ts @@ -3,15 +3,15 @@ import { graphql } from "@keystone-6/core"; import { sendEmailToRegistrant, sendRegistrantConfirmationEmail, sendRegistrantEmail } from "../schema/registrant"; import { getSchoolIndiaData } from "../scripts/seed/schoolIndia"; -import type { Context } from ".keystone/types"; -/*import { +import { initializeGeographyState, } from "./helpers/geography"; import type { GeographyState, } from "./helpers/geography"; +import type { Context } from ".keystone/types"; // Initialize the geography state const initializeState = async () => { @@ -26,16 +26,21 @@ const initializeState = async () => { let state: GeographyState | null = null; initializeState().then(result => { state = result; -});*/ +}); export const extendGraphqlSchema = graphql.extend(base => ({ query: { - /* + countries: graphql.field({ type: graphql.nonNull(graphql.list(graphql.JSON)), - async resolve() { + //eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any + async resolve(): Promise { if (!state) return []; - return Array.from(state.countries.values()).map(country => ({ ...country })); + return Array.from(state.countries.values()).map(country => { + // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any + const { states, cities, ...rest } = country as any; + return rest; + }); }, }), cities: graphql.field({ @@ -68,7 +73,7 @@ export const extendGraphqlSchema = graphql.extend(base => ({ return []; }, - }),*/ + }), // Fill in statistics statistics: graphql.field({ type: graphql.String, //Undefined --> Change in the future