Skip to content

Commit

Permalink
Merge branch 'action-item-category' into action-items
Browse files Browse the repository at this point in the history
  • Loading branch information
meetulr committed Feb 3, 2024
2 parents 0b4f452 + a79fa35 commit 21b4c19
Show file tree
Hide file tree
Showing 18 changed files with 1,168 additions and 44 deletions.
17 changes: 17 additions & 0 deletions public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,8 @@
"orgSettings": {
"title": "Talawa Setting",
"pageName": "Settings",
"general": "General",
"actionItemCategories": "Action Item Categories",
"updateOrganization": "Update Organization",
"seeRequest": "See Request",
"settings": "Settings",
Expand Down Expand Up @@ -745,5 +747,20 @@
"Remove Custom Field": "Remove Custom Field",
"fieldSuccessMessage": "Field added successfully",
"fieldRemovalSuccess": "Field removed successfully"
},
"orgActionItemCategories": {
"createButton": "Create",
"editButton": "Edit",
"enableButton": "Enable",
"disableButton": "Disable",
"updateActionItemCategory": "Update",
"actionItemCategoryName": "Name",
"actionItemCategoryDetails": "Action Item Category Details",
"enterName": "Enter Name",
"successfulCreation": "Action Item Category created successfully",
"successfulUpdation": "Action Item Category updated successfully",
"sameNameConflict": "Please change the name to make an update",
"categoryEnabled": "Action Item Category Enabled",
"categoryDisabled": "Action Item Category Disabled"
}
}
17 changes: 17 additions & 0 deletions public/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,8 @@
"orgSettings": {
"title": "Paramètre Talawa",
"pageName": "Paramètres",
"general": "Général",
"actionItemCategories": "Catégories d’éléments d’action",
"updateYourDetails": "Mettre à jour vos informations",
"updateYourPassword": "Mettez à jour votre mot de passe",
"updateOrganization": "Mettre à jour l'organisation",
Expand Down Expand Up @@ -724,5 +726,20 @@
"Supprimer le champ personnalisé": "Supprimer le champ personnalisé",
"fieldSuccessMessage": "Champ ajouté avec succès",
"fieldRemovalSuccess": "Champ supprimé avec succès"
},
"orgActionItemCategories": {
"createButton": "Créez",
"editButton": "Éditez",
"enableButton": "Activez",
"disableButton": "Désactivez",
"updateActionItemCategory": "Mettre à jour",
"actionItemCategoryName": "Nom",
"actionItemCategoryDetails": "Détails de la catégorie d’élément d’action",
"enterName": "Entrez le nom",
"successfulCreation": "Catégorie d’élément d’action créée avec succès",
"successfulUpdation": "La catégorie d’élément d’action a été mise à jour avec succès",
"sameNameConflict": "Veuillez modifier le nom pour effectuer une mise à jour",
"categoryEnabled": "Catégorie d’action activée",
"categoryDisabled": "Catégorie d’action désactivée"
}
}
17 changes: 17 additions & 0 deletions public/locales/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,8 @@
"orgSettings": {
"title": "तलावा सेटिंग",
"pageName": "सेटिंग्स",
"general": "सामान्य",
"actionItemCategories": "कार्रवाई आइटम श्रेणियाँ",
"updateYourDetails": "अपना विवरण अपडेट करें",
"updateYourPassword": "अपना पासवर्ड अपडेट करें",
"updateOrganization": "अद्यतन संगठन",
Expand Down Expand Up @@ -725,5 +727,20 @@
"Remove Custom Field": "कस्टम फ़ील्ड हटाएँ",
"fieldSuccessMessage": "फ़ील्ड सफलतापूर्वक जोड़ा गया",
"fieldRemovalSuccess": "फ़ील्ड सफलतापूर्वक हटा दिया गया"
},
"orgActionItemCategories": {
"createButton": "बनाएं",
"editButton": "संपादित करें",
"enableButton": "सक्षम करें",
"disableButton": "अक्षम करें",
"updateActionItemCategory": "अद्यतन करें",
"actionItemCategoryName": "नाम",
"actionItemCategoryDetails": "कार्रवाई आइटम श्रेणी विवरण",
"enterName": "नाम दर्ज करें",
"successfulCreation": "कार्रवाई आइटम श्रेणी सफलतापूर्वक बनाई गई",
"successfulUpdation": "क्रिया आइटम श्रेणी सफलतापूर्वक अद्यतन की गई",
"sameNameConflict": "अपडेट करने के लिए कृपया नाम बदलें",
"categoryEnabled": "कार्रवाई आइटम श्रेणी सक्षम",
"categoryDisabled": "क्रिया आइटम श्रेणी अक्षम की गई"
}
}
17 changes: 17 additions & 0 deletions public/locales/sp.json
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,8 @@
"orgSettings": {
"title": "Configuración Talawa",
"pageName": "Configuración",
"general": "General",
"actionItemCategories": "Categorías de elementos de acción",
"updateYourDetails": "Actualiza tus datos",
"updateYourPassword": "Actualice su contraseña",
"updateOrganization": "Actualizar Organización",
Expand Down Expand Up @@ -724,5 +726,20 @@
"Remove Custom Field": "Eliminar Campo Personalizado",
"fieldSuccessMessage": "Campo añadido exitosamente",
"fieldRemovalSuccess": "Campo eliminado exitosamente"
},
"orgActionItemCategories": {
"createButton": "Crear",
"editButton": "Editar",
"enableButton": "Habilitar",
"disableButton": "Inhabilitar",
"updateActionItemCategory": "Actualizar",
"actionItemCategoryName": "Nombre",
"actionItemCategoryDetails": "Detalles de la categoría de elemento de acción",
"enterName": "Introduzca el nombre",
"successfulCreation": "Categoría de elemento de acción creada correctamente",
"successfulUpdation": "Categoría de elemento de acción actualizada correctamente",
"sameNameConflict": "Cambie el nombre para realizar una actualización",
"categoryEnabled": "Categoría de elemento de acción habilitada",
"categoryDisabled": "Categoría de elemento de acción deshabilitada"
}
}
17 changes: 17 additions & 0 deletions public/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,8 @@
"orgSettings": {
"title": "塔拉瓦設置",
"pageName": "设置",
"general": "一般",
"actionItemCategories": "措施项类别",
"updateYourDetails": "更新您的詳細信息",
"updateYourPassword": "更新您的密碼",
"updateOrganization": "更新組織",
Expand Down Expand Up @@ -725,5 +727,20 @@
"删除自定义字段": "删除自定义字段",
"fieldSuccessMessage": "字段添加成功",
"fieldRemovalSuccess": "字段删除成功"
},
"orgActionItemCategories": {
"createButton": "创建",
"editButton": "编辑",
"enableButton": "启用",
"disableButton": "禁用",
"updateActionItemCategory": "更新",
"actionItemCategoryName": "名称",
"actionItemCategoryDetails": "措施项类别详细信息",
"enterName": "输入名称",
"successfulCreation": "已成功创建措施项类别",
"successfulUpdation": "措施项类别已成功更新",
"sameNameConflict": "请更改名称以进行更新",
"categoryEnabled": "已启用措施项类别",
"categoryDisabled": "措施项类别已禁用"
}
}
39 changes: 39 additions & 0 deletions src/GraphQl/Mutations/ActionItemCategoryMutations.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import gql from 'graphql-tag';

/**
* GraphQL mutation to create an action item category.
*
* @param name - Name of the ActionItemCategory.
* @param organizationId - Organization to which the ActionItemCategory belongs.
*/

export const CREATE_ACTION_ITEM_CATEGORY_MUTATION = gql`
mutation CreateActionItemCategory($name: String!, $organizationId: ID!) {
createActionItemCategory(name: $name, organizationId: $organizationId) {
_id
}
}
`;

/**
* GraphQL mutation to update an action item category.
*
* @param actionItemCategoryId - The id of the ActionItemCategory to be updated.
* @param name - Updated name of the ActionItemCategory.
* @param isDisabled - Updated disabled status of the ActionItemCategory.
*/

export const UPDATE_ACTION_ITEM_CATEGORY_MUTATION = gql`
mutation UpdateActionItemCategory(
$actionItemCategoryId: ID!
$name: String
$isDisabled: Boolean
) {
updateActionItemCategory(
id: $actionItemCategoryId
data: { name: $name, isDisabled: $isDisabled }
) {
_id
}
}
`;
4 changes: 4 additions & 0 deletions src/GraphQl/Mutations/mutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,10 @@ export const REGISTER_EVENT = gql`
}
`;

// Create and Update an ActionItemCategory
export { CREATE_ACTION_ITEM_CATEGORY_MUTATION } from './ActionItemCategoryMutations';
export { UPDATE_ACTION_ITEM_CATEGORY_MUTATION } from './ActionItemCategoryMutations';

// Create, update and delete Action Items
export { CREATE_ACTION_ITEM_MUTATION } from './ActionItemMutations';
export { UPDATE_ACTION_ITEM_MUTATION } from './ActionItemMutations';
Expand Down
18 changes: 18 additions & 0 deletions src/GraphQl/Queries/ActionItemCategoryQueries.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import gql from 'graphql-tag';

/**
* GraphQL query to retrieve action item categories by organization.
*
* @param id - The ID of the organization for which action item categories are being retrieved.
* @returns The list of action item categories associated with the organization.
*/

export const ACTION_ITEM_CATEGORY_LIST = gql`
query ActionItemCategoriesByOrganization($organizationId: ID!) {
actionItemCategoriesByOrganization(organizationId: $organizationId) {
_id
name
isDisabled
}
}
`;
3 changes: 3 additions & 0 deletions src/GraphQl/Queries/Queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,9 @@ export const MEMBERSHIP_REQUEST = gql`
}
`;

// get the list of action item categories for an organization
export { ACTION_ITEM_CATEGORY_LIST } from './ActionItemCategoryQueries';

// to take the list of the blocked users
export { PLUGIN_GET } from './PlugInQueries';
export { ADVERTISEMENTS_GET } from './PlugInQueries';
Expand Down
2 changes: 1 addition & 1 deletion src/components/DeleteOrg/DeleteOrg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function deleteOrg(): JSX.Element {
return (
<>
{canDelete && (
<Card border="0" className="rounded-4 mb-4">
<Card className="rounded-4 shadow-sm mb-4 border border-light-subtle">
<div className={styles.cardHeader}>
<div className={styles.cardTitle}>{t('deleteOrganization')}</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.addButton {
width: 7em;
position: absolute;
right: 1rem;
top: 1rem;
}

.createModal {
margin-top: 20vh;
margin-left: 13vw;
max-width: 80vw;
}

.icon {
transform: scale(1.5);
color: var(--bs-danger);
margin-bottom: 1rem;
}

.message {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}

.titlemodal {
color: var(--bs-gray-600);
font-weight: 600;
font-size: 20px;
margin-top: 1rem;
width: 65%;
}
Loading

0 comments on commit 21b4c19

Please sign in to comment.