add new assessement v2
This commit is contained in:
294
app/javascript/__generated__/graphql-schema.ts
generated
294
app/javascript/__generated__/graphql-schema.ts
generated
@@ -3,37 +3,60 @@ export type InputMaybe<T> = Maybe<T>;
|
||||
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
|
||||
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
|
||||
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
|
||||
export type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };
|
||||
export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
|
||||
/** All built-in and custom scalars, mapped to their actual values */
|
||||
export type Scalars = {
|
||||
ID: string;
|
||||
String: string;
|
||||
Boolean: boolean;
|
||||
Int: number;
|
||||
Float: number;
|
||||
ID: { input: string; output: string; }
|
||||
String: { input: string; output: string; }
|
||||
Boolean: { input: boolean; output: boolean; }
|
||||
Int: { input: number; output: number; }
|
||||
Float: { input: number; output: number; }
|
||||
/** An ISO 8601-encoded date */
|
||||
ISO8601Date: any;
|
||||
ISO8601Date: { input: any; output: any; }
|
||||
/** An ISO 8601-encoded datetime */
|
||||
ISO8601DateTime: any;
|
||||
ISO8601DateTime: { input: any; output: any; }
|
||||
};
|
||||
|
||||
export type Axis = {
|
||||
__typename?: 'Axis';
|
||||
id: Scalars['ID'];
|
||||
name: Scalars['String'];
|
||||
id: Scalars['ID']['output'];
|
||||
name: Scalars['String']['output'];
|
||||
subjects: Array<Subject>;
|
||||
};
|
||||
|
||||
export type Category = {
|
||||
__typename?: 'Category';
|
||||
id: Scalars['ID'];
|
||||
name: Scalars['String'];
|
||||
id: Scalars['ID']['output'];
|
||||
name: Scalars['String']['output'];
|
||||
subjects: Array<Subject>;
|
||||
};
|
||||
|
||||
/** The connection type for Category. */
|
||||
export type CategoryConnection = {
|
||||
__typename?: 'CategoryConnection';
|
||||
/** A list of edges. */
|
||||
edges: Array<CategoryEdge>;
|
||||
/** A list of nodes. */
|
||||
nodes: Array<Category>;
|
||||
/** Information to aid in pagination. */
|
||||
pageInfo: PageInfo;
|
||||
totalCount: Scalars['Int']['output'];
|
||||
};
|
||||
|
||||
/** An edge in a connection. */
|
||||
export type CategoryEdge = {
|
||||
__typename?: 'CategoryEdge';
|
||||
/** A cursor for use in pagination. */
|
||||
cursor: Scalars['String']['output'];
|
||||
/** The item at the end of the edge. */
|
||||
node?: Maybe<Category>;
|
||||
};
|
||||
|
||||
/** Autogenerated input type of CreateQuestion */
|
||||
export type CreateQuestionInput = {
|
||||
/** A unique identifier for the client performing the mutation. */
|
||||
clientMutationId?: InputMaybe<Scalars['String']>;
|
||||
clientMutationId?: InputMaybe<Scalars['String']['input']>;
|
||||
question: QuestionCreateInput;
|
||||
};
|
||||
|
||||
@@ -41,16 +64,16 @@ export type CreateQuestionInput = {
|
||||
export type CreateQuestionPayload = {
|
||||
__typename?: 'CreateQuestionPayload';
|
||||
/** A unique identifier for the client performing the mutation. */
|
||||
clientMutationId?: Maybe<Scalars['String']>;
|
||||
clientMutationId?: Maybe<Scalars['String']['output']>;
|
||||
/** Errors encountered during execution of the mutation. */
|
||||
errors: Array<Scalars['String']>;
|
||||
errors: Array<Scalars['String']['output']>;
|
||||
question?: Maybe<Question>;
|
||||
};
|
||||
|
||||
/** Autogenerated input type of CreateReviewMessage */
|
||||
export type CreateReviewMessageInput = {
|
||||
/** A unique identifier for the client performing the mutation. */
|
||||
clientMutationId?: InputMaybe<Scalars['String']>;
|
||||
clientMutationId?: InputMaybe<Scalars['String']['input']>;
|
||||
message: ReviewMessageInput;
|
||||
};
|
||||
|
||||
@@ -58,48 +81,48 @@ export type CreateReviewMessageInput = {
|
||||
export type CreateReviewMessagePayload = {
|
||||
__typename?: 'CreateReviewMessagePayload';
|
||||
/** A unique identifier for the client performing the mutation. */
|
||||
clientMutationId?: Maybe<Scalars['String']>;
|
||||
clientMutationId?: Maybe<Scalars['String']['output']>;
|
||||
/** Errors encountered during execution of the mutation. */
|
||||
errors: Array<Scalars['String']>;
|
||||
errors: Array<Scalars['String']['output']>;
|
||||
reviewMessage?: Maybe<ReviewMessage>;
|
||||
};
|
||||
|
||||
export type DateRangeInput = {
|
||||
endAt: Scalars['ISO8601Date'];
|
||||
startAt: Scalars['ISO8601Date'];
|
||||
endAt: Scalars['ISO8601Date']['input'];
|
||||
startAt: Scalars['ISO8601Date']['input'];
|
||||
};
|
||||
|
||||
/** Autogenerated input type of DestroyQuestion */
|
||||
export type DestroyQuestionInput = {
|
||||
/** A unique identifier for the client performing the mutation. */
|
||||
clientMutationId?: InputMaybe<Scalars['String']>;
|
||||
questionId: Scalars['ID'];
|
||||
clientMutationId?: InputMaybe<Scalars['String']['input']>;
|
||||
questionId: Scalars['ID']['input'];
|
||||
};
|
||||
|
||||
/** Autogenerated return type of DestroyQuestion */
|
||||
export type DestroyQuestionPayload = {
|
||||
__typename?: 'DestroyQuestionPayload';
|
||||
/** A unique identifier for the client performing the mutation. */
|
||||
clientMutationId?: Maybe<Scalars['String']>;
|
||||
deletedQuestionId?: Maybe<Scalars['ID']>;
|
||||
clientMutationId?: Maybe<Scalars['String']['output']>;
|
||||
deletedQuestionId?: Maybe<Scalars['ID']['output']>;
|
||||
/** Errors encountered during execution of the mutation. */
|
||||
errors: Array<Scalars['String']>;
|
||||
errors: Array<Scalars['String']['output']>;
|
||||
};
|
||||
|
||||
/** Autogenerated input type of FinishQuestion */
|
||||
export type FinishQuestionInput = {
|
||||
/** A unique identifier for the client performing the mutation. */
|
||||
clientMutationId?: InputMaybe<Scalars['String']>;
|
||||
questionId: Scalars['ID'];
|
||||
clientMutationId?: InputMaybe<Scalars['String']['input']>;
|
||||
questionId: Scalars['ID']['input'];
|
||||
};
|
||||
|
||||
/** Autogenerated return type of FinishQuestion */
|
||||
export type FinishQuestionPayload = {
|
||||
__typename?: 'FinishQuestionPayload';
|
||||
/** A unique identifier for the client performing the mutation. */
|
||||
clientMutationId?: Maybe<Scalars['String']>;
|
||||
clientMutationId?: Maybe<Scalars['String']['output']>;
|
||||
/** Errors encountered during execution of the mutation. */
|
||||
errors: Array<Scalars['String']>;
|
||||
errors: Array<Scalars['String']['output']>;
|
||||
question?: Maybe<Question>;
|
||||
};
|
||||
|
||||
@@ -140,24 +163,25 @@ export type MutationUpdateQuestionArgs = {
|
||||
/** An object with an ID. */
|
||||
export type Node = {
|
||||
/** ID of the object. */
|
||||
id: Scalars['ID'];
|
||||
id: Scalars['ID']['output'];
|
||||
};
|
||||
|
||||
/** Information about pagination in a connection. */
|
||||
export type PageInfo = {
|
||||
__typename?: 'PageInfo';
|
||||
/** When paginating forwards, the cursor to continue. */
|
||||
endCursor?: Maybe<Scalars['String']>;
|
||||
endCursor?: Maybe<Scalars['String']['output']>;
|
||||
/** When paginating forwards, are there more items? */
|
||||
hasNextPage: Scalars['Boolean'];
|
||||
hasNextPage: Scalars['Boolean']['output'];
|
||||
/** When paginating backwards, are there more items? */
|
||||
hasPreviousPage: Scalars['Boolean'];
|
||||
hasPreviousPage: Scalars['Boolean']['output'];
|
||||
/** When paginating backwards, the cursor to continue. */
|
||||
startCursor?: Maybe<Scalars['String']>;
|
||||
startCursor?: Maybe<Scalars['String']['output']>;
|
||||
};
|
||||
|
||||
export type Query = {
|
||||
__typename?: 'Query';
|
||||
categories: CategoryConnection;
|
||||
currentUser?: Maybe<User>;
|
||||
/** Fetches an object given its ID. */
|
||||
node?: Maybe<Node>;
|
||||
@@ -170,81 +194,89 @@ export type Query = {
|
||||
};
|
||||
|
||||
|
||||
export type QueryCategoriesArgs = {
|
||||
after?: InputMaybe<Scalars['String']['input']>;
|
||||
before?: InputMaybe<Scalars['String']['input']>;
|
||||
first?: InputMaybe<Scalars['Int']['input']>;
|
||||
last?: InputMaybe<Scalars['Int']['input']>;
|
||||
};
|
||||
|
||||
|
||||
export type QueryNodeArgs = {
|
||||
id: Scalars['ID'];
|
||||
id: Scalars['ID']['input'];
|
||||
};
|
||||
|
||||
|
||||
export type QueryNodesArgs = {
|
||||
ids: Array<Scalars['ID']>;
|
||||
ids: Array<Scalars['ID']['input']>;
|
||||
};
|
||||
|
||||
|
||||
export type QueryQuestionsArgs = {
|
||||
after?: InputMaybe<Scalars['String']>;
|
||||
before?: InputMaybe<Scalars['String']>;
|
||||
first?: InputMaybe<Scalars['Int']>;
|
||||
last?: InputMaybe<Scalars['Int']>;
|
||||
after?: InputMaybe<Scalars['String']['input']>;
|
||||
before?: InputMaybe<Scalars['String']['input']>;
|
||||
first?: InputMaybe<Scalars['Int']['input']>;
|
||||
last?: InputMaybe<Scalars['Int']['input']>;
|
||||
where?: InputMaybe<QuestionWhereInput>;
|
||||
};
|
||||
|
||||
|
||||
export type QueryReviewersArgs = {
|
||||
after?: InputMaybe<Scalars['String']>;
|
||||
before?: InputMaybe<Scalars['String']>;
|
||||
first?: InputMaybe<Scalars['Int']>;
|
||||
last?: InputMaybe<Scalars['Int']>;
|
||||
after?: InputMaybe<Scalars['String']['input']>;
|
||||
before?: InputMaybe<Scalars['String']['input']>;
|
||||
first?: InputMaybe<Scalars['Int']['input']>;
|
||||
last?: InputMaybe<Scalars['Int']['input']>;
|
||||
};
|
||||
|
||||
|
||||
export type QuerySubjectsArgs = {
|
||||
after?: InputMaybe<Scalars['String']>;
|
||||
before?: InputMaybe<Scalars['String']>;
|
||||
first?: InputMaybe<Scalars['Int']>;
|
||||
last?: InputMaybe<Scalars['Int']>;
|
||||
after?: InputMaybe<Scalars['String']['input']>;
|
||||
before?: InputMaybe<Scalars['String']['input']>;
|
||||
first?: InputMaybe<Scalars['Int']['input']>;
|
||||
last?: InputMaybe<Scalars['Int']['input']>;
|
||||
};
|
||||
|
||||
export type Question = Node & {
|
||||
__typename?: 'Question';
|
||||
alternatives: Array<QuestionAlternative>;
|
||||
authorship?: Maybe<Scalars['String']>;
|
||||
authorshipYear?: Maybe<Scalars['String']>;
|
||||
authorship?: Maybe<Scalars['String']['output']>;
|
||||
authorshipYear?: Maybe<Scalars['String']['output']>;
|
||||
bloomTaxonomy?: Maybe<QuestionBloomTaxonomy>;
|
||||
body?: Maybe<Scalars['String']>;
|
||||
body?: Maybe<Scalars['String']['output']>;
|
||||
checkType?: Maybe<QuestionCheckType>;
|
||||
createdAt: Scalars['ISO8601DateTime'];
|
||||
createdAt: Scalars['ISO8601DateTime']['output'];
|
||||
difficulty?: Maybe<QuestionDifficulty>;
|
||||
explanation?: Maybe<Scalars['String']>;
|
||||
id: Scalars['ID'];
|
||||
instruction?: Maybe<Scalars['String']>;
|
||||
intention?: Maybe<Scalars['String']>;
|
||||
references?: Maybe<Scalars['String']>;
|
||||
explanation?: Maybe<Scalars['String']['output']>;
|
||||
id: Scalars['ID']['output'];
|
||||
instruction?: Maybe<Scalars['String']['output']>;
|
||||
intention?: Maybe<Scalars['String']['output']>;
|
||||
references?: Maybe<Scalars['String']['output']>;
|
||||
reviewMessages: ReviewMessageConnection;
|
||||
reviewer?: Maybe<User>;
|
||||
status: QuestionStatus;
|
||||
subject?: Maybe<Subject>;
|
||||
support?: Maybe<Scalars['String']>;
|
||||
updatedAt: Scalars['ISO8601DateTime'];
|
||||
support?: Maybe<Scalars['String']['output']>;
|
||||
updatedAt: Scalars['ISO8601DateTime']['output'];
|
||||
user: User;
|
||||
};
|
||||
|
||||
|
||||
export type QuestionReviewMessagesArgs = {
|
||||
after?: InputMaybe<Scalars['String']>;
|
||||
before?: InputMaybe<Scalars['String']>;
|
||||
first?: InputMaybe<Scalars['Int']>;
|
||||
last?: InputMaybe<Scalars['Int']>;
|
||||
after?: InputMaybe<Scalars['String']['input']>;
|
||||
before?: InputMaybe<Scalars['String']['input']>;
|
||||
first?: InputMaybe<Scalars['Int']['input']>;
|
||||
last?: InputMaybe<Scalars['Int']['input']>;
|
||||
};
|
||||
|
||||
export type QuestionAlternative = {
|
||||
__typename?: 'QuestionAlternative';
|
||||
correct: Scalars['Boolean'];
|
||||
text?: Maybe<Scalars['String']>;
|
||||
correct: Scalars['Boolean']['output'];
|
||||
text?: Maybe<Scalars['String']['output']>;
|
||||
};
|
||||
|
||||
export type QuestionAlternativeInput = {
|
||||
correct?: InputMaybe<Scalars['Boolean']>;
|
||||
text?: InputMaybe<Scalars['String']>;
|
||||
correct?: InputMaybe<Scalars['Boolean']['input']>;
|
||||
text?: InputMaybe<Scalars['String']['input']>;
|
||||
};
|
||||
|
||||
export enum QuestionBloomTaxonomy {
|
||||
@@ -278,25 +310,25 @@ export type QuestionConnection = {
|
||||
nodes: Array<Question>;
|
||||
/** Information to aid in pagination. */
|
||||
pageInfo: PageInfo;
|
||||
totalCount: Scalars['Int'];
|
||||
totalCount: Scalars['Int']['output'];
|
||||
};
|
||||
|
||||
export type QuestionCreateInput = {
|
||||
alternatives: Array<QuestionAlternativeInput>;
|
||||
authorship: Scalars['String'];
|
||||
authorshipYear: Scalars['String'];
|
||||
authorship: Scalars['String']['input'];
|
||||
authorshipYear: Scalars['String']['input'];
|
||||
bloomTaxonomy?: InputMaybe<QuestionBloomTaxonomy>;
|
||||
body: Scalars['String'];
|
||||
body: Scalars['String']['input'];
|
||||
checkType?: InputMaybe<QuestionCheckType>;
|
||||
difficulty?: InputMaybe<QuestionDifficulty>;
|
||||
explanation: Scalars['String'];
|
||||
instruction: Scalars['String'];
|
||||
intention?: InputMaybe<Scalars['String']>;
|
||||
references: Scalars['String'];
|
||||
reviewerUserId?: InputMaybe<Scalars['ID']>;
|
||||
explanation: Scalars['String']['input'];
|
||||
instruction: Scalars['String']['input'];
|
||||
intention?: InputMaybe<Scalars['String']['input']>;
|
||||
references: Scalars['String']['input'];
|
||||
reviewerUserId?: InputMaybe<Scalars['ID']['input']>;
|
||||
status: QuestionStatus;
|
||||
subjectId?: InputMaybe<Scalars['ID']>;
|
||||
support: Scalars['String'];
|
||||
subjectId?: InputMaybe<Scalars['ID']['input']>;
|
||||
support: Scalars['String']['input'];
|
||||
};
|
||||
|
||||
export enum QuestionDifficulty {
|
||||
@@ -309,14 +341,14 @@ export enum QuestionDifficulty {
|
||||
export type QuestionEdge = {
|
||||
__typename?: 'QuestionEdge';
|
||||
/** A cursor for use in pagination. */
|
||||
cursor: Scalars['String'];
|
||||
cursor: Scalars['String']['output'];
|
||||
/** The item at the end of the edge. */
|
||||
node?: Maybe<Question>;
|
||||
};
|
||||
|
||||
export type QuestionFilterOptions = {
|
||||
__typename?: 'QuestionFilterOptions';
|
||||
years: Array<Scalars['String']>;
|
||||
years: Array<Scalars['String']['output']>;
|
||||
};
|
||||
|
||||
export enum QuestionStatus {
|
||||
@@ -329,43 +361,43 @@ export enum QuestionStatus {
|
||||
|
||||
export type QuestionUpdateInput = {
|
||||
alternatives: Array<QuestionAlternativeInput>;
|
||||
authorship: Scalars['String'];
|
||||
authorshipYear: Scalars['String'];
|
||||
authorship: Scalars['String']['input'];
|
||||
authorshipYear: Scalars['String']['input'];
|
||||
bloomTaxonomy?: InputMaybe<QuestionBloomTaxonomy>;
|
||||
body: Scalars['String'];
|
||||
body: Scalars['String']['input'];
|
||||
checkType?: InputMaybe<QuestionCheckType>;
|
||||
difficulty?: InputMaybe<QuestionDifficulty>;
|
||||
explanation: Scalars['String'];
|
||||
id: Scalars['ID'];
|
||||
instruction: Scalars['String'];
|
||||
intention?: InputMaybe<Scalars['String']>;
|
||||
references: Scalars['String'];
|
||||
reviewerUserId?: InputMaybe<Scalars['ID']>;
|
||||
explanation: Scalars['String']['input'];
|
||||
id: Scalars['ID']['input'];
|
||||
instruction: Scalars['String']['input'];
|
||||
intention?: InputMaybe<Scalars['String']['input']>;
|
||||
references: Scalars['String']['input'];
|
||||
reviewerUserId?: InputMaybe<Scalars['ID']['input']>;
|
||||
status: QuestionStatus;
|
||||
subjectId?: InputMaybe<Scalars['ID']>;
|
||||
support: Scalars['String'];
|
||||
subjectId?: InputMaybe<Scalars['ID']['input']>;
|
||||
support: Scalars['String']['input'];
|
||||
};
|
||||
|
||||
export type QuestionWhereInput = {
|
||||
authorshipYear?: InputMaybe<Array<Scalars['String']>>;
|
||||
authorshipYear?: InputMaybe<Array<Scalars['String']['input']>>;
|
||||
bloomTaxonomy?: InputMaybe<Array<QuestionBloomTaxonomy>>;
|
||||
checkType?: InputMaybe<Array<QuestionCheckType>>;
|
||||
createDate?: InputMaybe<DateRangeInput>;
|
||||
difficulty?: InputMaybe<Array<QuestionDifficulty>>;
|
||||
status?: InputMaybe<Array<QuestionStatus>>;
|
||||
subjectId?: InputMaybe<Scalars['ID']>;
|
||||
unifesoAuthorship?: InputMaybe<Scalars['Boolean']>;
|
||||
userId?: InputMaybe<Scalars['ID']>;
|
||||
subjectId?: InputMaybe<Scalars['ID']['input']>;
|
||||
unifesoAuthorship?: InputMaybe<Scalars['Boolean']['input']>;
|
||||
userId?: InputMaybe<Scalars['ID']['input']>;
|
||||
};
|
||||
|
||||
export type ReviewMessage = {
|
||||
__typename?: 'ReviewMessage';
|
||||
createdAt: Scalars['ISO8601DateTime'];
|
||||
createdAt: Scalars['ISO8601DateTime']['output'];
|
||||
feedbackType: ReviewMessageFeedbackType;
|
||||
id: Scalars['ID'];
|
||||
id: Scalars['ID']['output'];
|
||||
question: Question;
|
||||
text: Scalars['String'];
|
||||
updatedAt: Scalars['ISO8601DateTime'];
|
||||
text: Scalars['String']['output'];
|
||||
updatedAt: Scalars['ISO8601DateTime']['output'];
|
||||
user: User;
|
||||
};
|
||||
|
||||
@@ -378,14 +410,14 @@ export type ReviewMessageConnection = {
|
||||
nodes: Array<ReviewMessage>;
|
||||
/** Information to aid in pagination. */
|
||||
pageInfo: PageInfo;
|
||||
totalCount: Scalars['Int'];
|
||||
totalCount: Scalars['Int']['output'];
|
||||
};
|
||||
|
||||
/** An edge in a connection. */
|
||||
export type ReviewMessageEdge = {
|
||||
__typename?: 'ReviewMessageEdge';
|
||||
/** A cursor for use in pagination. */
|
||||
cursor: Scalars['String'];
|
||||
cursor: Scalars['String']['output'];
|
||||
/** The item at the end of the edge. */
|
||||
node?: Maybe<ReviewMessage>;
|
||||
};
|
||||
@@ -398,14 +430,14 @@ export enum ReviewMessageFeedbackType {
|
||||
|
||||
export type ReviewMessageInput = {
|
||||
feedbackType: ReviewMessageFeedbackType;
|
||||
questionId: Scalars['ID'];
|
||||
text: Scalars['String'];
|
||||
questionId: Scalars['ID']['input'];
|
||||
text: Scalars['String']['input'];
|
||||
};
|
||||
|
||||
export type ReviewRequest = {
|
||||
__typename?: 'ReviewRequest';
|
||||
answered: Scalars['Boolean'];
|
||||
id: Scalars['ID'];
|
||||
answered: Scalars['Boolean']['output'];
|
||||
id: Scalars['ID']['output'];
|
||||
question: Question;
|
||||
user: User;
|
||||
};
|
||||
@@ -419,14 +451,14 @@ export type ReviewRequestConnection = {
|
||||
nodes: Array<ReviewRequest>;
|
||||
/** Information to aid in pagination. */
|
||||
pageInfo: PageInfo;
|
||||
totalCount: Scalars['Int'];
|
||||
totalCount: Scalars['Int']['output'];
|
||||
};
|
||||
|
||||
/** An edge in a connection. */
|
||||
export type ReviewRequestEdge = {
|
||||
__typename?: 'ReviewRequestEdge';
|
||||
/** A cursor for use in pagination. */
|
||||
cursor: Scalars['String'];
|
||||
cursor: Scalars['String']['output'];
|
||||
/** The item at the end of the edge. */
|
||||
node?: Maybe<ReviewRequest>;
|
||||
};
|
||||
@@ -435,17 +467,17 @@ export type Subject = {
|
||||
__typename?: 'Subject';
|
||||
axis: Axis;
|
||||
category: Category;
|
||||
id: Scalars['ID'];
|
||||
name: Scalars['String'];
|
||||
id: Scalars['ID']['output'];
|
||||
name: Scalars['String']['output'];
|
||||
questions: QuestionConnection;
|
||||
};
|
||||
|
||||
|
||||
export type SubjectQuestionsArgs = {
|
||||
after?: InputMaybe<Scalars['String']>;
|
||||
before?: InputMaybe<Scalars['String']>;
|
||||
first?: InputMaybe<Scalars['Int']>;
|
||||
last?: InputMaybe<Scalars['Int']>;
|
||||
after?: InputMaybe<Scalars['String']['input']>;
|
||||
before?: InputMaybe<Scalars['String']['input']>;
|
||||
first?: InputMaybe<Scalars['Int']['input']>;
|
||||
last?: InputMaybe<Scalars['Int']['input']>;
|
||||
where?: InputMaybe<QuestionWhereInput>;
|
||||
};
|
||||
|
||||
@@ -458,14 +490,14 @@ export type SubjectConnection = {
|
||||
nodes: Array<Subject>;
|
||||
/** Information to aid in pagination. */
|
||||
pageInfo: PageInfo;
|
||||
totalCount: Scalars['Int'];
|
||||
totalCount: Scalars['Int']['output'];
|
||||
};
|
||||
|
||||
/** An edge in a connection. */
|
||||
export type SubjectEdge = {
|
||||
__typename?: 'SubjectEdge';
|
||||
/** A cursor for use in pagination. */
|
||||
cursor: Scalars['String'];
|
||||
cursor: Scalars['String']['output'];
|
||||
/** The item at the end of the edge. */
|
||||
node?: Maybe<Subject>;
|
||||
};
|
||||
@@ -473,7 +505,7 @@ export type SubjectEdge = {
|
||||
/** Autogenerated input type of UpdateQuestion */
|
||||
export type UpdateQuestionInput = {
|
||||
/** A unique identifier for the client performing the mutation. */
|
||||
clientMutationId?: InputMaybe<Scalars['String']>;
|
||||
clientMutationId?: InputMaybe<Scalars['String']['input']>;
|
||||
question: QuestionUpdateInput;
|
||||
};
|
||||
|
||||
@@ -481,37 +513,37 @@ export type UpdateQuestionInput = {
|
||||
export type UpdateQuestionPayload = {
|
||||
__typename?: 'UpdateQuestionPayload';
|
||||
/** A unique identifier for the client performing the mutation. */
|
||||
clientMutationId?: Maybe<Scalars['String']>;
|
||||
clientMutationId?: Maybe<Scalars['String']['output']>;
|
||||
/** Errors encountered during execution of the mutation. */
|
||||
errors: Array<Scalars['String']>;
|
||||
errors: Array<Scalars['String']['output']>;
|
||||
question?: Maybe<Question>;
|
||||
};
|
||||
|
||||
export type User = {
|
||||
__typename?: 'User';
|
||||
activeReviewRequests: ReviewRequestConnection;
|
||||
avatarUrl?: Maybe<Scalars['String']>;
|
||||
email: Scalars['String'];
|
||||
id: Scalars['ID'];
|
||||
avatarUrl?: Maybe<Scalars['String']['output']>;
|
||||
email: Scalars['String']['output'];
|
||||
id: Scalars['ID']['output'];
|
||||
inactiveReviewRequests: ReviewRequestConnection;
|
||||
name: Scalars['String'];
|
||||
name: Scalars['String']['output'];
|
||||
roles: Array<UserRole>;
|
||||
};
|
||||
|
||||
|
||||
export type UserActiveReviewRequestsArgs = {
|
||||
after?: InputMaybe<Scalars['String']>;
|
||||
before?: InputMaybe<Scalars['String']>;
|
||||
first?: InputMaybe<Scalars['Int']>;
|
||||
last?: InputMaybe<Scalars['Int']>;
|
||||
after?: InputMaybe<Scalars['String']['input']>;
|
||||
before?: InputMaybe<Scalars['String']['input']>;
|
||||
first?: InputMaybe<Scalars['Int']['input']>;
|
||||
last?: InputMaybe<Scalars['Int']['input']>;
|
||||
};
|
||||
|
||||
|
||||
export type UserInactiveReviewRequestsArgs = {
|
||||
after?: InputMaybe<Scalars['String']>;
|
||||
before?: InputMaybe<Scalars['String']>;
|
||||
first?: InputMaybe<Scalars['Int']>;
|
||||
last?: InputMaybe<Scalars['Int']>;
|
||||
after?: InputMaybe<Scalars['String']['input']>;
|
||||
before?: InputMaybe<Scalars['String']['input']>;
|
||||
first?: InputMaybe<Scalars['Int']['input']>;
|
||||
last?: InputMaybe<Scalars['Int']['input']>;
|
||||
};
|
||||
|
||||
/** The connection type for User. */
|
||||
@@ -523,14 +555,14 @@ export type UserConnection = {
|
||||
nodes: Array<User>;
|
||||
/** Information to aid in pagination. */
|
||||
pageInfo: PageInfo;
|
||||
totalCount: Scalars['Int'];
|
||||
totalCount: Scalars['Int']['output'];
|
||||
};
|
||||
|
||||
/** An edge in a connection. */
|
||||
export type UserEdge = {
|
||||
__typename?: 'UserEdge';
|
||||
/** A cursor for use in pagination. */
|
||||
cursor: Scalars['String'];
|
||||
cursor: Scalars['String']['output'];
|
||||
/** The item at the end of the edge. */
|
||||
node?: Maybe<User>;
|
||||
};
|
||||
|
||||
57
app/javascript/__generated__/schema.graphql
generated
57
app/javascript/__generated__/schema.graphql
generated
@@ -10,6 +10,42 @@ type Category {
|
||||
subjects: [Subject!]!
|
||||
}
|
||||
|
||||
"""
|
||||
The connection type for Category.
|
||||
"""
|
||||
type CategoryConnection {
|
||||
"""
|
||||
A list of edges.
|
||||
"""
|
||||
edges: [CategoryEdge!]!
|
||||
|
||||
"""
|
||||
A list of nodes.
|
||||
"""
|
||||
nodes: [Category!]!
|
||||
|
||||
"""
|
||||
Information to aid in pagination.
|
||||
"""
|
||||
pageInfo: PageInfo!
|
||||
totalCount: Int!
|
||||
}
|
||||
|
||||
"""
|
||||
An edge in a connection.
|
||||
"""
|
||||
type CategoryEdge {
|
||||
"""
|
||||
A cursor for use in pagination.
|
||||
"""
|
||||
cursor: String!
|
||||
|
||||
"""
|
||||
The item at the end of the edge.
|
||||
"""
|
||||
node: Category
|
||||
}
|
||||
|
||||
"""
|
||||
Autogenerated input type of CreateQuestion
|
||||
"""
|
||||
@@ -202,6 +238,27 @@ type PageInfo {
|
||||
}
|
||||
|
||||
type Query {
|
||||
categories(
|
||||
"""
|
||||
Returns the elements in the list that come after the specified cursor.
|
||||
"""
|
||||
after: String
|
||||
|
||||
"""
|
||||
Returns the elements in the list that come before the specified cursor.
|
||||
"""
|
||||
before: String
|
||||
|
||||
"""
|
||||
Returns the first _n_ elements from the list.
|
||||
"""
|
||||
first: Int
|
||||
|
||||
"""
|
||||
Returns the last _n_ elements from the list.
|
||||
"""
|
||||
last: Int
|
||||
): CategoryConnection!
|
||||
currentUser: User
|
||||
|
||||
"""
|
||||
|
||||
@@ -1,93 +1,180 @@
|
||||
import React from "react";
|
||||
import { Button, Navigator } from '../../components'
|
||||
import { gql, useQuery } from "@apollo/client";
|
||||
import React, { useState } from "react";
|
||||
import { Controller, useForm } from "react-hook-form";
|
||||
import { Query } from "../../__generated__/graphql-schema";
|
||||
import { Button, Card, Input, Navigator } from '../../components';
|
||||
|
||||
type NewAssessementForm = {
|
||||
subjectWeights: Record<string, any>
|
||||
}
|
||||
|
||||
const NEW_ASSESSEMENT_DATA_QUERY = gql`
|
||||
query NewAssessementDataQuery {
|
||||
categories {
|
||||
nodes {
|
||||
id
|
||||
name
|
||||
subjects {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
export const NewAssessement = () => {
|
||||
const { data } = useQuery<Query>(NEW_ASSESSEMENT_DATA_QUERY)
|
||||
|
||||
const [subjectsIds, setSubjectsIds] = useState<string[]>([])
|
||||
const subjectForm = useForm<{ subjectId: string }>()
|
||||
const { register, control, watch } = useForm<NewAssessementForm>({
|
||||
mode: 'onBlur'
|
||||
})
|
||||
|
||||
const handleSubjectFormSubmit = (data: {
|
||||
subjectId: string
|
||||
}) => {
|
||||
setSubjectsIds(prev => [...prev, data.subjectId])
|
||||
subjectForm.reset();
|
||||
}
|
||||
|
||||
if (!data?.categories) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Navigator home />
|
||||
<div className="m-auto grid gap-4 mt-4 mx-6">
|
||||
<div
|
||||
className="mx-1 sm:mx-0 mb-4 sm:mb-0 border-l-8 border-primary-light flex bg-white rounded shadow group transition-all duration-500"
|
||||
>
|
||||
<div className="flex flex-row w-full px-3 py-2 justify-between">
|
||||
<h2>
|
||||
Ano de Criação
|
||||
</h2>
|
||||
|
||||
<div className="flex">
|
||||
<h3>Apenas inéditas?</h3>
|
||||
<input className="ml-3" type="radio" id="huey" name="drone" value="huey"
|
||||
checked />
|
||||
<label className="ml-1" htmlFor="huey">Sim</label>
|
||||
<input className="ml-3" type="radio" id="dewey" name="drone" value="dewey" />
|
||||
<label className="ml-1" htmlFor="dewey">Não</label>
|
||||
<Card title="Detalhes">
|
||||
<div className="flex flex-col">
|
||||
<p className="pr-2 my-auto">Titulo: </p>
|
||||
<div className="w-full">
|
||||
<Input></Input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div
|
||||
className="mx-1 sm:mx-0 mb-4 sm:mb-0 border-l-8 border-primary-light flex bg-white rounded shadow group transition-all duration-500"
|
||||
>
|
||||
<div className="flex flex-row w-full px-3 py-2 justify-between">
|
||||
<h2>
|
||||
Habilidade Cognitiva
|
||||
</h2>
|
||||
|
||||
<div className="flex">
|
||||
<select>
|
||||
<option>Cálculo</option>
|
||||
<option>Geometria Analítica</option>
|
||||
<option>Álgebra Linear</option>
|
||||
<option>Probabilidade e Estatística</option>
|
||||
<option>Matemática Discreta</option>
|
||||
<option>Lógica Matemática</option>
|
||||
<option>Pesquisa Operacional</option>
|
||||
<option>Cálculo Numérico</option>
|
||||
<option>Física</option>
|
||||
<option>Algoritmos e Estruturas de Dados</option>
|
||||
<option>Projeto e Análise de Algoritmos</option>
|
||||
<option>Programação Estruturada</option>
|
||||
<option>Programação Orientada a Objetos</option>
|
||||
<option>Programação Funcional</option>
|
||||
<option>Programação Web</option>
|
||||
<option>Programação para Dispositivos</option>
|
||||
<option>Engenharia de Software</option>
|
||||
<option>Banco de Dados</option>
|
||||
<option>Gerência de Projetos</option>
|
||||
<option>Arquitetura de Computadores</option>
|
||||
<option>Sistemas Digitais</option>
|
||||
<option>Sistemas Operacionais</option>
|
||||
<option>Redes de Computadores</option>
|
||||
<option>Compiladores</option>
|
||||
<option>Teoria da Computação</option>
|
||||
<option>Sistemas Inteligentes</option>
|
||||
<option>Robótica</option>
|
||||
<option>Computação Gráfica</option>
|
||||
<option>Processamento de Sinais</option>
|
||||
<div className="flex flex-col mt-3">
|
||||
<p className="pr-2 my-auto">Observações: </p>
|
||||
<div className="w-full">
|
||||
<Input></Input>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
<Card title="Assuntos e Pesos">
|
||||
<div className="mb-6">
|
||||
<form
|
||||
className="flex flex-row"
|
||||
onSubmit={subjectForm.handleSubmit(handleSubjectFormSubmit)}
|
||||
>
|
||||
<select
|
||||
className="w-full rounded p-1 border-gray-400 border shadow-sm"
|
||||
{...subjectForm.register('subjectId')}
|
||||
>
|
||||
{data.categories.nodes.map(category => (
|
||||
<optgroup label={category.name} key={`category-${category.id}`}>
|
||||
{category.subjects.map(subject =>
|
||||
subjectsIds.includes(subject.id) ? null : <option value={subject.id} key={`subject-${subject.id}`}>{subject.name}</option>
|
||||
)}
|
||||
</optgroup>
|
||||
))}
|
||||
</select>
|
||||
</div>
|
||||
<Button className="ml-4" htmlType="submit">Adicionar</Button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div
|
||||
className="mx-1 sm:mx-0 mb-4 sm:mb-0 border-l-8 border-primary-light flex bg-white rounded shadow group transition-all duration-500"
|
||||
>
|
||||
<div className="flex flex-row w-full px-3 py-2 justify-between">
|
||||
<h2>
|
||||
Habilidade Cognitiva
|
||||
</h2>
|
||||
<div>
|
||||
{data.categories.nodes.map(category => (
|
||||
category.subjects.find(subject => subjectsIds.includes(subject.id)) ?
|
||||
<div
|
||||
key={`list-category-${category.id}`}
|
||||
className="flex flex-col w-full border border-gray-300 rounded p-4 mt-4 shadow-sm"
|
||||
>
|
||||
<h5 className="text-xl">{category.name}</h5>
|
||||
{category.subjects.map(subject =>
|
||||
subjectsIds.includes(subject.id)
|
||||
? <div key={`list-subject-${subject.id}`} className="ml-4">
|
||||
<div className="text-lg">{subject.name}</div>
|
||||
<div className="ml-4 grid grid-cols-3">
|
||||
Fácil
|
||||
<span>
|
||||
{watch(`subjectWeights.easy.${subject.id}`) ?? 5}
|
||||
</span>
|
||||
<div>
|
||||
<Controller
|
||||
name={`subjectWeights.easy.${subject.id}`}
|
||||
control={control}
|
||||
defaultValue={5}
|
||||
render={({ field }) => (
|
||||
<input
|
||||
className="w-full"
|
||||
type="range"
|
||||
min={0}
|
||||
max={10}
|
||||
{...field}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
|
||||
<div className="flex">
|
||||
<select>
|
||||
<option>Algoritmos de Alto Desempenho</option>
|
||||
<option>Ciência, Tecnologia e Sociedade</option>
|
||||
<option>Sistemas de Software</option>
|
||||
<option>Infraestrutura de Sistemas Computacionais</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div className="ml-4 grid grid-cols-3">
|
||||
Médio
|
||||
<span>
|
||||
{watch(`subjectWeights.medium.${subject.id}`) ?? 5}
|
||||
</span>
|
||||
<div>
|
||||
<Controller
|
||||
name={`subjectWeights.medium.${subject.id}`}
|
||||
control={control}
|
||||
defaultValue={5}
|
||||
render={({ field }) => (
|
||||
<input
|
||||
className="w-full"
|
||||
type="range"
|
||||
min={0}
|
||||
max={10}
|
||||
{...field}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div className="ml-4 grid grid-cols-3">
|
||||
Difícil
|
||||
<span>
|
||||
{watch(`subjectWeights.hard.${subject.id}`) ?? 5}
|
||||
</span>
|
||||
<div>
|
||||
<Controller
|
||||
name={`subjectWeights.hard.${subject.id}`}
|
||||
control={control}
|
||||
defaultValue={5}
|
||||
render={({ field }) => (
|
||||
<input
|
||||
className="w-full"
|
||||
type="range"
|
||||
min={0}
|
||||
max={10}
|
||||
{...field}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
: null
|
||||
)}
|
||||
</div>
|
||||
: null
|
||||
))}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</Card>
|
||||
</div>
|
||||
<Button type="primary" className="ml-auto mr-6 mt-6">
|
||||
Gerar
|
||||
|
||||
Reference in New Issue
Block a user