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

Agenda category CRUD operations #2030

Merged
merged 14 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from 7 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
17 changes: 17 additions & 0 deletions public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,23 @@
"successfulDeletion": "Action Item deleted successfully",
"title": "Action Items"
},
"organizationAgendaCategory": {
"agendaCategoryDetails": "Agenda Category Details",
"updateAgendaCategory": "Update Agenda Category",
"title": "Agenda Categories",
"name": "Category",
"description": "Description",
"createdBy": "Created By",
"options": "Options",
"createAgendaCategory": "Create Agenda Category",
"noAgendaCategories": "No Agenda Categories",
"update": "Update",
"agendaCategoryCreated": "Agenda Category created successfully",
"agendaCategoryUpdated": "Agenda Category updated successfully",
"agendaCategoryDeleted": "Agenda Category deleted successfully",
"deleteAgendaCategory": "Delete Agenda Category",
"deleteAgendaCategoryMsg": "Do you want to remove this agenda category?"
},
"eventListCard": {
"deleteEvent": "Delete Event",
"deleteEventMsg": "Do you want to remove this event?",
Expand Down
17 changes: 17 additions & 0 deletions public/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,23 @@
"successfulDeletion": "Élément d'action supprimé avec succès",
"title": "Éléments d'action"
},
"organizationAgendaCategory": {
"agendaCategoryDetails": "Détails de la catégorie d'ordre du jour",
"updateAgendaCategory": "Mettre à jour la catégorie d'ordre du jour",
"title": "Catégories d'ordre du jour",
"name": "Catégorie",
"description": "Description",
"createdBy": "Créé par",
"options": "Options",
"createAgendaCategory": "Créer une catégorie d'ordre du jour",
"noAgendaCategories": "Aucune catégorie d'ordre du jour",
"update": "Mettre à jour",
"agendaCategoryCreated": "Catégorie d'ordre du jour créée avec succès",
"agendaCategoryUpdated": "Catégorie d'ordre du jour mise à jour avec succès",
"agendaCategoryDeleted": "Catégorie d'ordre du jour supprimée avec succès",
"deleteAgendaCategory": "Supprimer la catégorie d'ordre du jour",
"deleteAgendaCategoryMsg": "Souhaitez-vous supprimer cette catégorie d'ordre du jour ?"
},
"eventListCard": {
"deleteEvent": "Supprimer l'événement",
"deleteEventMsg": "Voulez-vous supprimer cet événement ?",
Expand Down
17 changes: 17 additions & 0 deletions public/locales/hi/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,23 @@
"successfulDeletion": "कार्रवाई आइटम सफलतापूर्वक हटा दिया गया",
"title": "एक्शन आइटम्स"
},
"organizationAgendaCategory": {
"agendaCategoryDetails": "एजेंडा श्रेणी विवरण",
"updateAgendaCategory": "एजेंडा श्रेणी अपडेट करें",
"title": "एजेंडा श्रेणियाँ",
"name": "श्रेणी",
"description": "विवरण",
"createdBy": "द्वारा बनाया गया",
"options": "विकल्प",
"createAgendaCategory": "एजेंडा श्रेणी बनाएं",
"noAgendaCategories": "कोई एजेंडा श्रेणी नहीं",
"update": "अपडेट करें",
"agendaCategoryCreated": "एजेंडा श्रेणी सफलतापूर्वक बनाई गई",
"agendaCategoryUpdated": "एजेंडा श्रेणी सफलतापूर्वक अपडेट की गई",
"agendaCategoryDeleted": "एजेंडा श्रेणी सफलतापूर्वक हटा दी गई",
"deleteAgendaCategory": "एजेंडा श्रेणी हटाएं",
"deleteAgendaCategoryMsg": "क्या आप इस एजेंडा श्रेणी को हटाना चाहते हैं?"
},
"eventListCard": {
"deleteEvent": "ईवेंट हटाएँ",
"deleteEventMsg": "क्या आप इस ईवेंट को हटाना चाहते हैं?",
Expand Down
17 changes: 17 additions & 0 deletions public/locales/sp/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,23 @@
"title": "Ítems de acción",
"yes": "Sí"
},
"organizationAgendaCategory": {
"agendaCategoryDetails": "Detalles de la categoría de la agenda",
"updateAgendaCategory": "Actualizar categoría de la agenda",
"title": "Categorías de la agenda",
"name": "Categoría",
"description": "Descripción",
"createdBy": "Creado por",
"options": "Opciones",
"createAgendaCategory": "Crear categoría de la agenda",
"noAgendaCategories": "No hay categorías de la agenda",
"update": "Actualizar",
"agendaCategoryCreated": "Categoría de la agenda creada exitosamente",
"agendaCategoryUpdated": "Categoría de la agenda actualizada exitosamente",
"agendaCategoryDeleted": "Categoría de la agenda eliminada exitosamente",
"deleteAgendaCategory": "Eliminar categoría de la agenda",
"deleteAgendaCategoryMsg": "¿Desea eliminar esta categoría de la agenda?"
},
"eventListCard": {
"location": "Lugar del evento",
"deleteEvent": "Eliminar evento",
Expand Down
17 changes: 17 additions & 0 deletions public/locales/zh/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,23 @@
"successfulDeletion": "操作项已成功删除",
"title": "行动项目"
},
"organizationAgendaCategory": {
"agendaCategoryDetails": "议程类别详情",
"updateAgendaCategory": "更新议程类别",
"title": "议程类别",
"name": "类别",
"description": "描述",
"createdBy": "创建人",
"options": "选项",
"createAgendaCategory": "创建议程类别",
"noAgendaCategories": "没有议程类别",
"update": "更新",
"agendaCategoryCreated": "议程类别创建成功",
"agendaCategoryUpdated": "议程类别更新成功",
"agendaCategoryDeleted": "议程类别删除成功",
"deleteAgendaCategory": "删除议程类别",
"deleteAgendaCategoryMsg": "是否要删除此议程类别?"
},
"eventListCard": {
"deleteEvent": "删除事件",
"deleteEventMsg": "您想删除此事件吗?",
Expand Down
5 changes: 5 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import OrgList from 'screens/OrgList/OrgList';
import OrgPost from 'screens/OrgPost/OrgPost';
import OrgSettings from 'screens/OrgSettings/OrgSettings';
import OrganizationActionItems from 'screens/OrganizationActionItems/OrganizationActionItems';
import OrganizationAgendaCategory from 'screens/OrganizationAgendaCategory/OrganizationAgendaCategory';
import OrganizationDashboard from 'screens/OrganizationDashboard/OrganizationDashboard';
import OrganizationEvents from 'screens/OrganizationEvents/OrganizationEvents';
import OrganizaitionFundCampiagn from 'screens/OrganizationFundCampaign/OrganizationFundCampagins';
Expand Down Expand Up @@ -135,6 +136,10 @@ function app(): JSX.Element {
path="/orgactionitems/:orgId"
element={<OrganizationActionItems />}
/>
<Route
path="/orgagendacategory/:orgId"
element={<OrganizationAgendaCategory />}
/>
<Route path="/orgfunds/:orgId" element={<OrganizationFunds />} />
<Route
path="/orgfundcampaign/:orgId/:fundId"
Expand Down
45 changes: 45 additions & 0 deletions src/GraphQl/Mutations/AgendaCategoryMutations.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import gql from 'graphql-tag';

/**
* GraphQL mutation to create an agenda category.
*
* @param input - Name, Description, OrganizationID of the AgendaCategory.
*/

export const CREATE_AGENDA_ITEM_CATEGORY_MUTATION = gql`
mutation CreateAgendaCategory($input: CreateAgendaCategoryInput!) {
createAgendaCategory(input: $input) {
_id
}
}
`;

/**
* GraphQL mutation to delete an agenda category.
*
* @param deleteAgendaCategoryId - The ID of the AgendaCategory to be deleted.
*/

export const DELETE_AGENDA_ITEM_CATEGORY_MUTATION = gql`
mutation DeleteAgendaCategory($deleteAgendaCategoryId: ID!) {
deleteAgendaCategory(id: $deleteAgendaCategoryId)
}
`;

/**
* GraphQL mutation to update an agenda category.
*
* @param updateAgendaCategoryId - The ID of the AgendaCategory to be updated.
* @param input - Updated Name, Description, OrganizationID of the AgendaCategory.
*/

export const UPDATE_AGENDA_ITEM_CATEGORY_MUTATION = gql`
mutation UpdateAgendaCategory(
$updateAgendaCategoryId: ID!
$input: UpdateAgendaCategoryInput!
) {
updateAgendaCategory(id: $updateAgendaCategoryId, input: $input) {
_id
}
}
`;
6 changes: 6 additions & 0 deletions src/GraphQl/Mutations/mutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,12 @@ export {
UPDATE_ACTION_ITEM_MUTATION,
} from './ActionItemMutations';

export {
CREATE_AGENDA_ITEM_CATEGORY_MUTATION,
DELETE_AGENDA_ITEM_CATEGORY_MUTATION,
UPDATE_AGENDA_ITEM_CATEGORY_MUTATION,
} from './AgendaCategoryMutations';

// Changes the role of a event in an organization and add and remove the event from the organization
export {
ADD_EVENT_ATTENDEE,
Expand Down
23 changes: 23 additions & 0 deletions src/GraphQl/Queries/AgendaCategoryQueries.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import gql from 'graphql-tag';

/**
* GraphQL query to retrieve agenda category by id.
*
* @param agendaCategoryId - The ID of the category which is being retrieved.
* @returns Agenda category associated with the id.
*/

export const AGENDA_ITEM_CATEGORY_LIST = gql`
query AgendaItemCategoriesByOrganization($organizationId: ID!) {
agendaItemCategoriesByOrganization(organizationId: $organizationId) {
_id
name
description
createdBy {
_id
firstName
lastName
}
}
}
`;
1 change: 1 addition & 0 deletions src/GraphQl/Queries/Queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,7 @@ export { ACTION_ITEM_CATEGORY_LIST } from './ActionItemCategoryQueries';
// get the list of Action Items
export { ACTION_ITEM_LIST } from './ActionItemQueries';

export { AGENDA_ITEM_CATEGORY_LIST } from './AgendaCategoryQueries';
// to take the list of the blocked users
export {
ADVERTISEMENTS_GET,
Expand Down
1 change: 1 addition & 0 deletions src/assets/svgs/agenda-category-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions src/components/AgendaCategory/AgendaCategoryContainer.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.createModal {
margin-top: 20vh;
margin-left: 13vw;
max-width: 80vw;
}

.titlemodal {
color: var(--bs-gray-600);
font-weight: 600;
font-size: 20px;
margin-bottom: 20px;
padding-bottom: 5px;
border-bottom: 3px solid var(--bs-primary);
width: 65%;
}

.agendaCategoryOptionsButton {
width: 24px;
height: 24px;
}
Loading
Loading