Skip to content

Commit

Permalink
feat: Deprecates the Project & Task Feature for Events (#1362)
Browse files Browse the repository at this point in the history
* feat: deprecate project and task feature in events

* feat: deprecate mutations of project & task feature in events

* fix: reverted package-lock.json changes

* feat: deprecate event project & tasks feature from user portal
  • Loading branch information
rishabhbizzle authored Jan 20, 2024
1 parent 0ddbe1e commit 9c58d1b
Show file tree
Hide file tree
Showing 44 changed files with 9 additions and 3,329 deletions.
17 changes: 0 additions & 17 deletions public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,6 @@
"events": "Events",
"chat": "Chat",
"donate": "Donate",
"myTasks": "My Tasks",
"settings": "Settings",
"language": "Language",
"logout": "Logout",
Expand Down Expand Up @@ -674,22 +673,6 @@
"alreadyRegistered": "Already registered",
"register": "Register"
},
"userTasks": {
"yourAssignedTasks": "Your assigned tasks",
"nothingToShow": "Nothing to show here."
},
"userTaskCard": {
"description": "Description",
"deadline": "Deadline",
"created": "Created",
"assignees": "Assignees",
"completed": "Completed",
"incomplete": "Incomplete",
"taskCompleted": "The task has been completed",
"taskNotCompleted": "The task has not been completed yet",
"event": "Event",
"organization": "Organization"
},
"advertisement": {
"title": "Advertisements",
"pHeading": "Manage Ads",
Expand Down
17 changes: 0 additions & 17 deletions public/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,6 @@
"events": "Événements",
"chat": "Discuter",
"donate": "Donner",
"myTasks": "Mes tâches",
"settings": "Paramètres",
"language": "Langue",
"logout": "Se déconnecter",
Expand Down Expand Up @@ -670,22 +669,6 @@
"alreadyRegistered": "Déjà enregistré",
"register": "Registre"
},
"userTasks": {
"yourAssignedTasks": "Vos tâches assignées",
"nothingToShow": "Rien à montrer ici."
},
"userTaskCard": {
"description": "Description",
"deadline": "Date limite",
"created": "Créé",
"assignees": "Destinataires",
"completed": "Complété",
"incomplete": "Incomplète",
"taskCompleted": "La tâche est terminée",
"taskNotCompleted": "La tâche n'est pas encore terminée",
"event": "Événement",
"organization": "Organisation"
},
"advertisement": {
"title": "Publicités",
"pHeading": "Gérer les publicités",
Expand Down
17 changes: 0 additions & 17 deletions public/locales/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,6 @@
"events": "आयोजन",
"chat": "बातचीत",
"donate": "दान देना",
"myTasks": "मेरा काम",
"settings": "समायोजन",
"language": "भाषा",
"logout": "लॉग आउट",
Expand Down Expand Up @@ -670,22 +669,6 @@
"alreadyRegistered": "पहले से ही पंजीकृत",
"register": "पंजीकरण करवाना"
},
"userTasks": {
"yourAssignedTasks": "आपके असाइन किए गए कार्य",
"nothingToShow": "यहां दिखाने के लिए कुछ भी नहीं है."
},
"userTaskCard": {
"description": "विवरण",
"deadline": "अंतिम तारीख",
"created": "बनाया",
"assignees": "असाइनी",
"completed": "पुरा",
"incomplete": "अधूरा",
"taskCompleted": "काम पूरा हो गया",
"taskNotCompleted": "कार्य अभी तक पूरा नहीं हुआ है",
"event": "आयोजन",
"organization": "संगठन"
},
"advertisement": {
"title": "विज्ञापन",
"pHeading": "विज्ञापन प्रबंधन",
Expand Down
17 changes: 0 additions & 17 deletions public/locales/sp.json
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,6 @@
"events": "Eventos",
"chat": "Charlar",
"donate": "Donar",
"myTasks": "Mis tareas",
"settings": "Ajustes",
"language": "Idioma",
"logout": "Cerrar sesión",
Expand Down Expand Up @@ -670,22 +669,6 @@
"alreadyRegistered": "Ya registrado",
"register": "Registro"
},
"userTasks": {
"yourAssignedTasks": "Tus tareas asignadas",
"nothingToShow": "No hay nada que mostrar aquí."
},
"userTaskCard": {
"description": "Descripción",
"deadline": "Fecha límite",
"created": "Creado",
"assignees": "Cesionarias",
"completed": "Terminada",
"incomplete": "Incompleta",
"taskCompleted": "La tarea ha sido completada",
"taskNotCompleted": "La tarea aún no se ha completado",
"event": "Evento",
"organization": "Organización"
},
"advertisement": {
"title": "Anuncios",
"pHeading": "Gestionar anuncios",
Expand Down
17 changes: 0 additions & 17 deletions public/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,6 @@
"events": "活動",
"chat": "聊天",
"donate": "",
"myTasks": "我的任務",
"settings": "設置",
"language": "語言",
"logout": "登出",
Expand Down Expand Up @@ -670,22 +669,6 @@
"alreadyRegistered": "已經註冊",
"register": "登記"
},
"userTasks": {
"yourAssignedTasks": "您指派的任務",
"nothingToShow": "這裡沒有什麼可顯示的。"
},
"userTaskCard": {
"description": "描述",
"deadline": "最後期限",
"created": "已創建",
"assignees": "受讓人",
"completed": "完全的",
"incomplete": "不完整",
"taskCompleted": "任務已完成",
"taskNotCompleted": "任務還沒完成",
"event": "事件",
"organization": "組織"
},
"advertisement": {
"title": "广告",
"pHeading": "管理广告",
Expand Down
64 changes: 0 additions & 64 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ type Event {
location: String
longitude: Longitude
organization: Organization
projects: [EventProject]
recurrance: Recurrance
recurring: Boolean!
startDate: Date!
Expand Down Expand Up @@ -223,19 +222,7 @@ enum EventOrderByInput {
title_DESC
}

type EventProject {
_id: ID!
description: String!
event: Event!
tasks: [Task]
title: String!
}

input EventProjectInput {
description: String!
eventId: ID!
title: String!
}

input EventWhereInput {
description: String
Expand Down Expand Up @@ -451,7 +438,6 @@ type Mutation {
userId: ID!
): Donation!
createEvent(data: EventInput): Event!
createEventProject(data: EventProjectInput!): EventProject!
createGroupChat(data: createGroupChatInput!): GroupChat!
createMember(input: UserAndOrganizationInput!): Organization!
createMessageChat(data: MessageChatInput!): MessageChat!
Expand All @@ -463,7 +449,6 @@ type Mutation {
uninstalledOrgs: [ID!]
): Plugin!
createPost(data: PostInput!, file: String): Post
createTask(data: TaskInput!, eventProjectId: ID!): Task!
createUserTag(input: CreateUserTagInput!): UserTag
deleteAdvertisementById(id: ID!): DeletePayload!
deleteDonationById(id: ID!): DeletePayload!
Expand All @@ -486,13 +471,11 @@ type Mutation {
removeDirectChat(chatId: ID!, organizationId: ID!): DirectChat!
removeEvent(id: ID!): Event!
removeEventAttendee(data: EventAttendeeInput!): User!
removeEventProject(id: ID!): EventProject!
removeGroupChat(chatId: ID!): GroupChat!
removeMember(data: UserAndOrganizationInput!): Organization!
removeOrganization(id: ID!): User!
removeOrganizationImage(organizationId: String!): Organization!
removePost(id: ID!): Post
removeTask(id: ID!): Task
removeUserFromGroupChat(chatId: ID!, userId: ID!): GroupChat!
removeUserImage: User!
removeUserTag(id: ID!): UserTag
Expand All @@ -507,7 +490,6 @@ type Mutation {
chatId: ID!
messageContent: String!
): GroupChatMessage!
setTaskVolunteers(id: ID!, volunteers: [ID]!): Task
signUp(data: UserInput!, file: String): AuthData!
togglePostPin(id: ID!): Post!
unassignUserTag(input: ToggleUserTagAssignInput!): User
Expand All @@ -516,7 +498,6 @@ type Mutation {
unlikePost(id: ID!): Post
unregisterForEventByUser(id: ID!): Event!
updateEvent(data: UpdateEventInput, id: ID!): Event!
updateEventProject(data: UpdateEventProjectInput!, id: ID!): EventProject!
updateLanguage(languageCode: String!): User!
updateOrganization(
data: UpdateOrganizationInput
Expand All @@ -525,7 +506,6 @@ type Mutation {
): Organization!
updatePluginStatus(id: ID!, orgId: ID!): Plugin!
updatePost(data: PostUpdateInput, id: ID!): Post!
updateTask(data: UpdateTaskInput!, id: ID!): Task
updateUserPassword(data: UpdateUserPasswordInput!): User!
updateUserProfile(data: UpdateUserInput, file: String): User!
updateUserTag(input: UpdateUserTagInput!): UserTag
Expand Down Expand Up @@ -865,37 +845,6 @@ type Subscription {
onPluginUpdate: Plugin
}

type Task {
_id: ID!
completed: Boolean
createdAt: DateTime!
creator: User!
deadline: DateTime
description: String
event: Event!
title: String!
volunteers: [User]
}

input TaskInput {
deadline: DateTime!
description: String!
title: String!
}

enum TaskOrderByInput {
createdAt_ASC
createdAt_DESC
deadline_ASC
deadline_DESC
description_ASC
description_DESC
id_ASC
id_DESC
title_ASC
title_DESC
}

scalar Time

input ToggleUserTagAssignInput {
Expand Down Expand Up @@ -942,11 +891,6 @@ input UpdateEventInput {
title: String
}

input UpdateEventProjectInput {
description: String
title: String
}

input UpdateOrganizationInput {
description: String
userRegistrationRequired: Boolean
Expand All @@ -955,13 +899,6 @@ input UpdateOrganizationInput {
visibleInSearch: Boolean
}

input UpdateTaskInput {
completed: Boolean
deadline: DateTime
description: String
title: String
}

input UpdateUserInput {
email: EmailAddress
firstName: String
Expand Down Expand Up @@ -991,7 +928,6 @@ type User {
adminApproved: Boolean
adminFor: [Organization]
appLanguageCode: String!
assignedTasks: [Task]
createdAt: DateTime
createdEvents: [Event]
createdOrganizations: [Organization]
Expand Down
2 changes: 0 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import People from 'screens/UserPortal/People/People';
import Settings from 'screens/UserPortal/Settings/Settings';
import Donate from 'screens/UserPortal/Donate/Donate';
import Events from 'screens/UserPortal/Events/Events';
import Tasks from 'screens/UserPortal/Tasks/Tasks';
// import Chat from 'screens/UserPortal/Chat/Chat';
import Advertisements from 'components/Advertisements/Advertisements';

Expand Down Expand Up @@ -126,7 +125,6 @@ function app(): JSX.Element {
<SecuredRouteForUser path="/user/settings" component={Settings} />
<SecuredRouteForUser path="/user/donate" component={Donate} />
<SecuredRouteForUser path="/user/events" component={Events} />
<SecuredRouteForUser path="/user/tasks" component={Tasks} />
{/* <SecuredRouteForUser path="/user/chat" component={Chat} /> */}

<Route exact path="*" component={PageNotFound} />
Expand Down
49 changes: 0 additions & 49 deletions src/GraphQl/Mutations/mutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -550,55 +550,6 @@ export const REGISTER_EVENT = gql`
}
}
`;

export const ADD_EVENT_PROJECT_MUTATION = gql`
mutation AddEventProject(
$title: String!
$description: String!
$eventId: ID!
) {
createEventProject(
data: { title: $title, description: $description, eventId: $eventId }
) {
_id
}
}
`;

export const UPDATE_EVENT_PROJECT_MUTATION = gql`
mutation UpdateEventProject($title: String, $description: String, $id: ID!) {
updateEventProject(
id: $id
data: { title: $title, description: $description }
) {
_id
}
}
`;

export const DELETE_EVENT_PROJECT_MUTATION = gql`
mutation DeleteEventProject($id: ID!) {
removeEventProject(id: $id) {
_id
}
}
`;

export const ADD_EVENT_PROJECT_TASK_MUTATION = gql`
mutation AddEventTask(
$title: String!
$description: String!
$projectId: ID!
$deadline: DateTime!
) {
createTask(
eventProjectId: $projectId
data: { title: $title, description: $description, deadline: $deadline }
) {
_id
}
}
`;
// Changes the role of a event in an organization and add and remove the event from the organization
export { UPDATE_EVENT_PROJECT_TASK_MUTATION } from './EventTaskMutations';
export { DELETE_EVENT_TASK_MUTATION } from './EventTaskMutations';
Expand Down
Loading

0 comments on commit 9c58d1b

Please sign in to comment.