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

new commit #2

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 0 additions & 4 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,13 @@ type AuthData {

type CheckIn {
_id: ID!
allotedRoom: String
allotedSeat: String
event: Event!
feedbackSubmitted: Boolean!
time: DateTime!
user: User!
}

input CheckInInput {
allotedRoom: String
allotedSeat: String
eventId: ID!
userId: ID!
}
Expand Down
18 changes: 2 additions & 16 deletions src/GraphQl/Mutations/EventAttendeeMutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,12 @@ export const REMOVE_EVENT_ATTENDEE = gql`
*
* @param userId - The ID of the user checking in.
* @param eventId - The ID of the event at which the user is checking in.
* @param allotedRoom - The room assigned to the user during check-in (optional).
* @param allotedSeat - The seat assigned to the user during check-in (optional).
* @returns The updated event object with the user's check-in information.
*/

export const MARK_CHECKIN = gql`
mutation checkIn(
$userId: ID!
$eventId: ID!
$allotedRoom: String
$allotedSeat: String
) {
checkIn(
data: {
userId: $userId
eventId: $eventId
allotedRoom: $allotedRoom
allotedSeat: $allotedSeat
}
) {
mutation checkIn($userId: ID!, $eventId: ID!) {
checkIn(data: { userId: $userId, eventId: $eventId }) {
_id
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/GraphQl/Queries/Queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,6 @@ export const EVENT_CHECKINS = gql`
checkIn {
_id
time
allotedRoom
allotedSeat
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/components/CheckIn/TableRow.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ describe('Testing Table Row for CheckIn Table', () => {
checkIn: {
_id: '123',
time: '12:00:00',
allotedRoom: '',
allotedSeat: '',
},
eventId: `event123`,
},
Expand Down
2 changes: 0 additions & 2 deletions src/components/CheckIn/TableRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ export const TableRow = ({
variables: {
userId: data.userId,
eventId: data.eventId,
allotedSeat: '',
allotedRoom: '',
},
})
.then(() => {
Expand Down
6 changes: 0 additions & 6 deletions src/components/CheckIn/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ const checkInQueryData: InterfaceAttendeeQueryResponse = {
checkIn: {
_id: 'checkin1',
time: '08:00:00',
allotedRoom: 'Room 1',
allotedSeat: 'Seat 1',
},
},
],
Expand All @@ -52,8 +50,6 @@ export const checkInMutationSuccess = [
variables: {
userId: 'user123',
eventId: 'event123',
allotedSeat: '',
allotedRoom: '',
},
},
result: {
Expand All @@ -73,8 +69,6 @@ export const checkInMutationUnsuccess = [
variables: {
userId: 'user123',
eventId: 'event123',
allotedSeat: '',
allotedRoom: '',
},
},
error: new Error('Oops'),
Expand Down
4 changes: 0 additions & 4 deletions src/components/CheckIn/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ export interface InterfaceAttendeeCheckIn {
checkIn: null | {
_id: string;
time: string;
allotedRoom: string;
allotedSeat: string;
};
}

Expand All @@ -35,8 +33,6 @@ export interface InterfaceTableCheckIn {
checkIn: null | {
_id: string;
time: string;
allotedRoom: string;
allotedSeat: string;
};
eventId: string;
}
Expand Down
Loading