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

Feature: Addition of Venue for Events #1763

Merged
merged 44 commits into from
Mar 3, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
7ef1b7c
added Venue model, added create, fetch and edit venue controllers
wingman47 Jan 30, 2024
bd0f02e
added delete venue controller
wingman47 Jan 30, 2024
526459f
added tests for create, edit, delete and fetch (venuesInOrganization)
wingman47 Jan 30, 2024
3a69a19
fixed type errors
wingman47 Jan 30, 2024
2228687
removed unnecessary changes
wingman47 Jan 30, 2024
3aee01f
Merge branch 'develop' of https://github.com/PalisadoesFoundation/tal…
wingman47 Feb 1, 2024
e39cfde
removed venue property from Organization model, modified create, dele…
wingman47 Feb 1, 2024
a50e9a3
added field based query for venues
wingman47 Feb 1, 2024
0fe62bd
merge develop branch
wingman47 Feb 10, 2024
2c4467d
updated tests
wingman47 Feb 10, 2024
dfc0ae3
fixed lint
wingman47 Feb 10, 2024
47d1981
removed unused imports
wingman47 Feb 10, 2024
069ebec
fixed type imports
wingman47 Feb 10, 2024
7fc5548
fixed lint error
wingman47 Feb 10, 2024
c392313
fixed formatting
wingman47 Feb 10, 2024
bba70d0
Merge branch 'develop' of https://github.com/PalisadoesFoundation/tal…
wingman47 Feb 12, 2024
ce938db
Merge branch 'develop' of https://github.com/PalisadoesFoundation/tal…
wingman47 Feb 13, 2024
b3dd6d5
fixed formatting error
wingman47 Feb 13, 2024
53ef49b
increased code cov
wingman47 Feb 13, 2024
d4cc808
added required changes
wingman47 Feb 14, 2024
ec6fe8d
Merge branch 'develop' of https://github.com/PalisadoesFoundation/tal…
wingman47 Feb 14, 2024
5ed2e92
removed requirement for orgId in editVenue
wingman47 Feb 14, 2024
e9e34d8
Merge branch 'develop' of https://github.com/PalisadoesFoundation/tal…
wingman47 Feb 15, 2024
8617bcd
added query resolver for venue
wingman47 Feb 15, 2024
c6b6970
fixed import types
wingman47 Feb 15, 2024
4d3accb
fixed import
wingman47 Feb 15, 2024
6ba50ce
renamed organizationId to organization
wingman47 Feb 16, 2024
5a8f902
Merge branch 'develop' of https://github.com/PalisadoesFoundation/tal…
wingman47 Feb 16, 2024
7cf7757
changes in editVenue
wingman47 Feb 16, 2024
ccf3e39
upgraded prettier to perform merge
wingman47 Feb 16, 2024
166702e
Merge branch 'develop' of https://github.com/PalisadoesFoundation/tal…
wingman47 Feb 16, 2024
f5a24c4
Merge branch 'develop' of https://github.com/PalisadoesFoundation/tal…
wingman47 Feb 17, 2024
4b76327
Merge branch 'develop' of https://github.com/PalisadoesFoundation/tal…
wingman47 Feb 18, 2024
345e735
Merge branch 'develop' of https://github.com/PalisadoesFoundation/tal…
wingman47 Feb 18, 2024
b554d49
Merge branch 'develop' into venue-CRUD
EshaanAgg Feb 19, 2024
2c6b86b
updated input fields
wingman47 Feb 19, 2024
55c267d
Merge branch 'develop' of https://github.com/PalisadoesFoundation/tal…
wingman47 Feb 19, 2024
93384a6
Merge branch 'venue-CRUD' of https://github.com/wingman47/talawa-api …
wingman47 Feb 19, 2024
9893977
renamed field
wingman47 Feb 19, 2024
69adb9e
removed venue from event
wingman47 Feb 19, 2024
94cd929
Merge branch 'develop' of https://github.com/PalisadoesFoundation/tal…
wingman47 Feb 20, 2024
49be8de
Merge branch 'develop' of https://github.com/PalisadoesFoundation/tal…
wingman47 Feb 24, 2024
c014682
renamed _id to id
wingman47 Feb 24, 2024
4033c6c
Merge branch 'develop' of https://github.com/PalisadoesFoundation/tal…
wingman47 Mar 3, 2024
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
191 changes: 164 additions & 27 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -481,9 +481,17 @@ type Mutation {
addEventAttendee(data: EventAttendeeInput!): User!
addFeedback(data: FeedbackInput!): Feedback!
addLanguageTranslation(data: LanguageInput!): Language!
addOrganizationCustomField(name: String!, organizationId: ID!, type: String!): OrganizationCustomField!
addOrganizationCustomField(
name: String!
organizationId: ID!
type: String!
): OrganizationCustomField!
addOrganizationImage(file: String!, organizationId: String!): Organization!
addUserCustomData(dataName: String!, dataValue: Any!, organizationId: ID!): UserCustomData!
addUserCustomData(
dataName: String!
dataValue: Any!
organizationId: ID!
): UserCustomData!
addUserImage(file: String!): User!
addUserToGroupChat(chatId: ID!, userId: ID!): GroupChat!
adminRemoveEvent(eventId: ID!): Event!
Expand All @@ -494,21 +502,43 @@ type Mutation {
cancelMembershipRequest(membershipRequestId: ID!): MembershipRequest!
checkIn(data: CheckInInput!): CheckIn!
createAdmin(data: UserAndOrganizationInput!): User!
createAdvertisement(endDate: Date!, link: String!, name: String!, orgId: ID!, startDate: Date!, type: String!): Advertisement!
createAdvertisement(
endDate: Date!
link: String!
name: String!
orgId: ID!
startDate: Date!
type: String!
): Advertisement!
createComment(data: CommentInput!, postId: ID!): Comment
createDirectChat(data: createChatInput!): DirectChat!
createDonation(amount: Float!, nameOfOrg: String!, nameOfUser: String!, orgId: ID!, payPalId: ID!, userId: ID!): Donation!
createDonation(
amount: Float!
nameOfOrg: String!
nameOfUser: String!
orgId: ID!
payPalId: ID!
userId: ID!
): Donation!
createEvent(data: EventInput): Event!
createGroupChat(data: createGroupChatInput!): GroupChat!
createMember(input: UserAndOrganizationInput!): Organization!
createMessageChat(data: MessageChatInput!): MessageChat!
createOrganization(data: OrganizationInput, file: String): Organization!
createPlugin(pluginCreatedBy: String!, pluginDesc: String!, pluginName: String!, uninstalledOrgs: [ID!]): Plugin!
createPlugin(
pluginCreatedBy: String!
pluginDesc: String!
pluginName: String!
uninstalledOrgs: [ID!]
): Plugin!
createPost(data: PostInput!, file: String): Post
createSampleOrganization: Boolean!
createUserTag(input: CreateUserTagInput!): UserTag
createVenue(data: VenueInput!, file: String): Venue!
deleteAdvertisementById(id: ID!): DeletePayload!
deleteDonationById(id: ID!): DeletePayload!
deleteVenue(venueId: ID!, organizationId: ID!): Venue
editVenue(data: EditVenueInput!, file: String): Venue!
forgotPassword(data: ForgotPasswordData!): Boolean!
joinPublicOrganization(organizationId: ID!): User!
leaveOrganization(organizationId: ID!): User!
Expand All @@ -531,7 +561,10 @@ type Mutation {
removeGroupChat(chatId: ID!): GroupChat!
removeMember(data: UserAndOrganizationInput!): Organization!
removeOrganization(id: ID!): User!
removeOrganizationCustomField(customFieldId: ID!, organizationId: ID!): OrganizationCustomField!
removeOrganizationCustomField(
customFieldId: ID!
organizationId: ID!
): OrganizationCustomField!
removeOrganizationImage(organizationId: String!): Organization!
removePost(id: ID!): Post
removeSampleOrganization: Boolean!
Expand All @@ -542,24 +575,40 @@ type Mutation {
revokeRefreshTokenForUser: Boolean!
saveFcmToken(token: String): Boolean!
sendMembershipRequest(organizationId: ID!): MembershipRequest!
sendMessageToDirectChat(chatId: ID!, messageContent: String!): DirectChatMessage!
sendMessageToGroupChat(chatId: ID!, messageContent: String!): GroupChatMessage!
sendMessageToDirectChat(
chatId: ID!
messageContent: String!
): DirectChatMessage!
sendMessageToGroupChat(
chatId: ID!
messageContent: String!
): GroupChatMessage!
signUp(data: UserInput!, file: String): AuthData!
togglePostPin(id: ID!): Post!
unassignUserTag(input: ToggleUserTagAssignInput!): User
unblockUser(organizationId: ID!, userId: ID!): User!
unlikeComment(id: ID!): Comment
unlikePost(id: ID!): Post
unregisterForEventByUser(id: ID!): Event!
updateAdvertisement(input: UpdateAdvertisementInput!): UpdateAdvertisementPayload
updateAdvertisement(
input: UpdateAdvertisementInput!
): UpdateAdvertisementPayload
updateEvent(data: UpdateEventInput, id: ID!): Event!
updateLanguage(languageCode: String!): User!
updateOrganization(data: UpdateOrganizationInput, file: String, id: ID!): Organization!
updateOrganization(
data: UpdateOrganizationInput
file: String
id: ID!
): Organization!
updatePluginStatus(id: ID!, orgId: ID!): Plugin!
updatePost(data: PostUpdateInput, id: ID!): Post!
updateUserPassword(data: UpdateUserPasswordInput!): User!
updateUserProfile(data: UpdateUserInput, file: String): User!
updateUserRoleInOrganization(organizationId: ID!, role: String!, userId: ID!): Organization!
updateUserRoleInOrganization(
organizationId: ID!
role: String!
userId: ID!
): Organization!
updateUserTag(input: UpdateUserTagInput!): UserTag
updateUserType(data: UpdateUserTypeInput!): Boolean!
}
Expand All @@ -585,7 +634,12 @@ type Organization {
pinnedPosts: [Post]
updatedAt: DateTime!
userRegistrationRequired: Boolean!
userTags(after: String, before: String, first: PositiveInt, last: PositiveInt): UserTagsConnection
userTags(
after: String
before: String
first: PositiveInt
last: PositiveInt
): UserTagsConnection
visibleInSearch: Boolean!
}

Expand Down Expand Up @@ -664,14 +718,20 @@ type OtpData {
otpToken: String!
}

"""Information about pagination in a connection."""
"""
Information about pagination in a connection.
"""
type PageInfo {
currPageNo: Int

"""When paginating forwards, are there more items?"""
"""
When paginating forwards, are there more items?
"""
hasNextPage: Boolean!

"""When paginating backwards, are there more items?"""
"""
When paginating backwards, are there more items?
"""
hasPreviousPage: Boolean!
nextPageNo: Int
prevPageNo: Int
Expand Down Expand Up @@ -732,14 +792,20 @@ type Post {
videoUrl: URL
}

"""A connection to a list of items."""
"""
A connection to a list of items.
"""
type PostConnection {
aggregate: AggregatePost!

"""A list of edges."""
"""
A list of edges.
"""
edges: [Post]!

"""Information to aid in pagination."""
"""
Information to aid in pagination.
"""
pageInfo: PageInfo!
}

Expand Down Expand Up @@ -809,11 +875,21 @@ type Query {
directChatsMessagesByChatID(id: ID!): [DirectChatMessage]
event(id: ID!): Event
eventsByOrganization(id: ID, orderBy: EventOrderByInput): [Event]
eventsByOrganizationConnection(first: Int, orderBy: EventOrderByInput, skip: Int, where: EventWhereInput): [Event!]!
eventsByOrganizationConnection(
first: Int
orderBy: EventOrderByInput
skip: Int
where: EventWhereInput
): [Event!]!
getAdvertisements: [Advertisement]
getDonationById(id: ID!): Donation!
getDonationByOrgId(orgId: ID!): [Donation]
getDonationByOrgIdConnection(first: Int, orgId: ID!, skip: Int, where: DonationWhereInput): [Donation!]!
getDonationByOrgIdConnection(
first: Int
orgId: ID!
skip: Int
where: DonationWhereInput
): [Donation!]!
getPlugins: [Plugin]
getlanguage(lang_code: String!): [Translation]
hasSubmittedFeedback(eventId: ID!, userId: ID!): Boolean
Expand All @@ -822,18 +898,48 @@ type Query {
me: User!
myLanguage: String
organizations(id: ID, orderBy: OrganizationOrderByInput): [Organization]
organizationsConnection(first: Int, orderBy: OrganizationOrderByInput, skip: Int, where: OrganizationWhereInput): [Organization]!
organizationsMemberConnection(first: Int, orderBy: UserOrderByInput, orgId: ID!, skip: Int, where: UserWhereInput): UserConnection!
organizationsConnection(
first: Int
orderBy: OrganizationOrderByInput
skip: Int
where: OrganizationWhereInput
): [Organization]!
organizationsMemberConnection(
first: Int
orderBy: UserOrderByInput
orgId: ID!
skip: Int
where: UserWhereInput
): UserConnection!
plugin(orgId: ID!): [Plugin]
post(id: ID!): Post
postsByOrganization(id: ID!, orderBy: PostOrderByInput): [Post]
postsByOrganizationConnection(first: Int, id: ID!, orderBy: PostOrderByInput, skip: Int, where: PostWhereInput): PostConnection
postsByOrganizationConnection(
first: Int
id: ID!
orderBy: PostOrderByInput
skip: Int
where: PostWhereInput
): PostConnection
registeredEventsByUser(id: ID, orderBy: EventOrderByInput): [Event]
registrantsByEvent(id: ID!): [User]
user(id: ID!): User!
userLanguage(userId: ID!): String
users(adminApproved: Boolean, first: Int, orderBy: UserOrderByInput, skip: Int, userType: String, where: UserWhereInput): [User]
usersConnection(first: Int, orderBy: UserOrderByInput, skip: Int, where: UserWhereInput): [User]!
users(
adminApproved: Boolean
first: Int
orderBy: UserOrderByInput
skip: Int
userType: String
where: UserWhereInput
): [User]
usersConnection(
first: Int
orderBy: UserOrderByInput
skip: Int
where: UserWhereInput
): [User]!
venuesInOrganization(id: ID!): [Venue]
}

input RecaptchaVerification {
Expand All @@ -854,6 +960,22 @@ enum Status {
DELETED
}

type Venue {
_id: ID!
capacity: Int!
description: String
imageUrl: URL
name: String!
}

input VenueInput {
capacity: Int!
description: String
imageUrl: URL
name: String!
organizationId: ID!
}

type Subscription {
directMessageChat: MessageChat
messageSentToDirectChat: DirectChatMessage
Expand All @@ -875,6 +997,15 @@ type Translation {
verified: Boolean
}

input EditVenueInput {
_id: ID!
capacity: Int!
description: String
imageUrl: URL
name: String!
organizationId: ID!
}

enum Type {
PRIVATE
UNIVERSAL
Expand Down Expand Up @@ -984,7 +1115,13 @@ type User {
phone: UserPhone
pluginCreationAllowed: Boolean!
registeredEvents: [Event]
tagsAssignedWith(after: String, before: String, first: PositiveInt, last: PositiveInt, organizationId: ID): UserTagsConnection
tagsAssignedWith(
after: String
before: String
first: PositiveInt
last: PositiveInt
organizationId: ID
): UserTagsConnection
tokenVersion: Int!
updatedAt: DateTime!
userType: UserType!
Expand Down Expand Up @@ -1144,4 +1281,4 @@ input createGroupChatInput {
organizationId: ID!
title: String!
userIds: [ID!]!
}
}
29 changes: 29 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,21 @@ export const CHAT_NOT_FOUND_ERROR = {
MESSAGE: "chat.notFound",
PARAM: "chat",
};

export const VENUE_ALREADY_EXISTS_ERROR = {
DESC: "Venue already exists",
CODE: "venue.alreadyExists",
MESSAGE: "venue.alreadyExists",
PARAM: "venue",
};

export const VENUE_NOT_FOUND_ERROR = {
DESC: "Venue does not exist",
CODE: "venue.NotFound",
MESSAGE: "venue.NotFound",
PARAM: "venue",
};

export const COMMENT_NOT_FOUND_ERROR = {
DESC: "Comment not found",
CODE: "comment.notFound",
Expand Down Expand Up @@ -90,6 +105,20 @@ export const ORGANIZATION_NOT_FOUND_ERROR = {
MESSAGE: "organization.notFound",
PARAM: "organization",
};
export const VENUE_NAME_MISSING_ERROR = {
DESC: "Venue name not found",
CODE: "venueName.notFound",
MESSAGE: "venueName.notFound",
PARAM: "venueName",
};

export const VENUE_ALREADY_SCHEDULED = {
DESC: "Venue is already scheduled",
CODE: "venue.alreadySchduled",
MESSAGE: "venue.alreadySchduled",
PARAM: "venue",
};

export const ORGANIZATION_IMAGE_NOT_FOUND_ERROR = {
DESC: "OrganizationImage not found",
CODE: "organizationImage.notFound",
Expand Down
Loading
Loading