Skip to content

Commit

Permalink
Revert "Added Support for User Family Members (#1713)"
Browse files Browse the repository at this point in the history
This reverts commit 8707a9c.
  • Loading branch information
palisadoes authored Feb 3, 2024
1 parent 43d1bb9 commit dbc6669
Show file tree
Hide file tree
Showing 29 changed files with 704 additions and 2,518 deletions.
2 changes: 0 additions & 2 deletions codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ const config: CodegenConfig = {

EventAttendee: "../models/EventAttendee#InterfaceEventAttendee",

UserFamily: "../models/userFamily#InterfaceUserFamily",

Feedback: "../models/Feedback#InterfaceFeedback",

// File: '../models/File#InterfaceFile',
Expand Down
20 changes: 0 additions & 20 deletions sample_data/userFamilies.json

This file was deleted.

21 changes: 0 additions & 21 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -350,14 +350,6 @@ type ExtendSession {
refreshToken: String!
}

type UserFamily {
_id: ID!
title: String!
users: [User!]!
admins: [User!]!
creator: User!
}

type Feedback {
_id: ID!
createdAt: DateTime!
Expand Down Expand Up @@ -529,7 +521,6 @@ type Mutation {
addUserCustomData(dataName: String!, dataValue: Any!, organizationId: ID!): UserCustomData!
addUserImage(file: String!): User!
addUserToGroupChat(chatId: ID!, userId: ID!): GroupChat!
addUserToUserFamily(familyId: ID!, userId: ID!): UserFamily!
adminRemoveEvent(eventId: ID!): Event!
adminRemoveGroup(groupId: ID!): GroupChat!
assignUserTag(input: ToggleUserTagAssignInput!): User
Expand All @@ -546,7 +537,6 @@ type Mutation {
createDonation(amount: Float!, nameOfOrg: String!, nameOfUser: String!, orgId: ID!, payPalId: ID!, userId: ID!): Donation!
createEvent(data: EventInput): Event!
createGroupChat(data: createGroupChatInput!): GroupChat!
createUserFamily(data: createUserFamilyInput): UserFamily!
createMember(input: UserAndOrganizationInput!): Organization!
createMessageChat(data: MessageChatInput!): MessageChat!
createOrganization(data: OrganizationInput, file: String): Organization!
Expand Down Expand Up @@ -576,7 +566,6 @@ type Mutation {
removeDirectChat(chatId: ID!, organizationId: ID!): DirectChat!
removeEvent(id: ID!): Event!
removeEventAttendee(data: EventAttendeeInput!): User!
removeUserFamily(familyId: ID!): UserFamily!
removeGroupChat(chatId: ID!): GroupChat!
removeMember(data: UserAndOrganizationInput!): Organization!
removeOrganization(id: ID!): User!
Expand All @@ -586,7 +575,6 @@ type Mutation {
removeSampleOrganization: Boolean!
removeUserCustomData(organizationId: ID!): UserCustomData!
removeUserFromGroupChat(chatId: ID!, userId: ID!): GroupChat!
removeUserFromUserFamily(familyId: ID!, userId: ID!): UserFamily!
removeUserImage: User!
removeUserTag(id: ID!): UserTag
revokeRefreshTokenForUser: Boolean!
Expand Down Expand Up @@ -868,7 +856,6 @@ type Query {
event(id: ID!): Event
eventsByOrganization(id: ID, orderBy: EventOrderByInput): [Event]
eventsByOrganizationConnection(first: Int, orderBy: EventOrderByInput, skip: Int, where: EventWhereInput): [Event!]!
userFamily(id: ID!): [UserFamily]!
getAdvertisements: [Advertisement]
getDonationById(id: ID!): Donation!
getDonationByOrgId(orgId: ID!): [Donation]
Expand Down Expand Up @@ -1037,13 +1024,11 @@ type User {
address: Address
adminApproved: Boolean
adminFor: [Organization]
adminForUserFamily: [UserFamily]
appLanguageCode: String!
birthDate: Date
createdAt: DateTime!
createdEvents: [Event]
createdOrganizations: [Organization]
createdUserFamily: [UserFamily]
educationGrade: EducationGrade
email: EmailAddress!
employmentStatus: EmploymentStatus
Expand All @@ -1052,7 +1037,6 @@ type User {
gender: Gender
image: String
joinedOrganizations: [Organization]
joinedUserFamily: [UserFamily]
lastName: String!
maritalStatus: MaritalStatus
membershipRequests: [MembershipRequest]
Expand Down Expand Up @@ -1220,9 +1204,4 @@ input createGroupChatInput {
organizationId: ID!
title: String!
userIds: [ID!]!
}

input createUserFamilyInput {
title: String!
userIds: [ID!]!
}
12 changes: 0 additions & 12 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,24 +177,12 @@ export const LENGTH_VALIDATION_ERROR = {
PARAM: "stringValidation",
};

export const USER_FAMILY_MIN_MEMBERS_ERROR_CODE = {
MESSAGE: undefined,
CODE: "membersInUserFamilyLessThanOne",
PARAM: "membersInUserFamilyLessThanOne",
};

export const REGEX_VALIDATION_ERROR = {
MESSAGE: "Error: Entered value must be a valid string",
CODE: "string.notValid",
PARAM: "stringValidation",
};

export const USER_FAMILY_NOT_FOUND_ERROR = {
MESSAGE: "Error: User Family Not Found",
CODE: "userfamilyNotFound",
PARAM: "userfamilyNotFound",
};

export const USER_NOT_AUTHORIZED_SUPERADMIN = {
MESSAGE: "Error: Current user must be a SUPERADMIN",
CODE: "role.notValid.superadmin",
Expand Down
56 changes: 0 additions & 56 deletions src/models/userFamily.ts

This file was deleted.

82 changes: 0 additions & 82 deletions src/resolvers/Mutation/addUserToUserFamily.ts

This file was deleted.

81 changes: 0 additions & 81 deletions src/resolvers/Mutation/createUserFamily.ts

This file was deleted.

8 changes: 0 additions & 8 deletions src/resolvers/Mutation/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ import { removeComment } from "./removeComment";
import { removeDirectChat } from "./removeDirectChat";
import { removeEvent } from "./removeEvent";
import { removeEventAttendee } from "./removeEventAttendee";
import { addUserToUserFamily } from "./addUserToUserFamily";
import { removeUserFromUserFamily } from "./removeUserFromUserFamily";
import { removeUserFamily } from "./removeUserFamily";
import { createUserFamily } from "./createUserFamily";
import { removeGroupChat } from "./removeGroupChat";
import { removeAdvertisement } from "./removeAdvertisement";
import { removeMember } from "./removeMember";
Expand Down Expand Up @@ -108,10 +104,6 @@ export const Mutation: MutationResolvers = {
addUserToGroupChat,
adminRemoveEvent,
adminRemoveGroup,
addUserToUserFamily,
removeUserFamily,
removeUserFromUserFamily,
createUserFamily,
assignUserTag,
blockPluginCreationBySuperadmin,
blockUser,
Expand Down
Loading

0 comments on commit dbc6669

Please sign in to comment.