Skip to content

Commit

Permalink
Configurable Session timeout for Community (#2186)
Browse files Browse the repository at this point in the history
* completed session timeout for Admin: component to change timeout and session management hook

* updated test files and made adjustments based on github

* update based on github suggestion

* added comments

* test updates

* made enhancements to session management

* fixed tests for session

* final adjustments for tests and new feature of session management

* adjusted tests again

* moved version back to 16.0.0

* fixed lint issues from previous merge

* added packages

* fixed svg lint issues and onlclick lint issue

* modified packages due to linting errors

* fixing schema issues

* updated mocks for updated create mutation of action item catergory
  • Loading branch information
JordanCampbell1 authored Oct 16, 2024
1 parent 6467ea1 commit 025bc1d
Show file tree
Hide file tree
Showing 124 changed files with 11,603 additions and 20,789 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/ban-types": "error",
"@typescript-eslint/no-unsafe-function-type": "error",
"@typescript-eslint/no-wrapper-object-types": "error",
"@typescript-eslint/no-empty-object-type": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/consistent-type-assertions": "error",
Expand Down
16,350 changes: 1,223 additions & 15,127 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@
"react-redux": "^9.1.2",
"react-router-dom": "^6.27.0",
"react-toastify": "^10.0.6",
"react-tooltip": "^5.27.1",
"react-tooltip": "^5.28.0",
"redux": "^5.0.1",
"redux-thunk": "^3.1.0",
"sanitize-html": "^2.13.0",
"typedoc": "^0.26.7",
"typedoc-plugin-markdown": "^4.2.1",
Expand Down
13 changes: 3 additions & 10 deletions public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,7 @@
"updatedSuccessfully": "{{item}} updated Successfully",
"removedSuccessfully": "{{item}} removed Successfully",
"successfullyUpdated": "Successfully Updated",
"sort": "Sort",
"all": "All",
"active": "Active",
"disabled": "Disabled",
"pending": "Pending",
"completed": "Completed",
"late": "Late",
"createdLatest": "Created Latest",
"createdEarliest": "Created Earliest",
"searchBy": "Search by {{item}}"
"sessionWarning": "Your session will expire soon due to inactivity. Please interact with the page to extend your session.",
"sessionLogOut": "Your session has expired due to inactivity. Please log in again to continue.",
"sort": "Sort"
}
10 changes: 7 additions & 3 deletions public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,9 @@
"assignmentDate": "Assignment Date",
"active": "Active",
"clearFilters": "Clear Filters",
"completed": "Completed",
"completionDate": "Completion Date",
"createActionItem": "Create Action Item",
"createActionItem": "Create Action Items",
"deleteActionItem": "Delete Action Item",
"deleteActionItemMsg": "Do you want to remove this action item?",
"details": "Details",
Expand Down Expand Up @@ -766,7 +767,10 @@
"otherSettings": "Other Settings",
"changeLanguage": "Change Language",
"manageCustomFields": "Manage Custom Fields",
"agendaItemCategories": "Agenda Item Categories"
"pageName": "Settings",
"updateYourDetails": "Update Your Details",
"updateYourPassword": "Update Your Password",
"settings": "Settings"
},
"deleteOrg": {
"deleteOrganization": "Delete Organization",
Expand Down Expand Up @@ -1188,7 +1192,7 @@
"disableButton": "Disable",
"updateActionItemCategory": "Update",
"actionItemCategoryName": "Name",
"categoryDetails": "Category Details",
"actionItemCategoryDetails": "Action Item Category Details",
"enterName": "Enter Name",
"successfulCreation": "Action Item Category created successfully",
"successfulUpdation": "Action Item Category updated successfully",
Expand Down
11 changes: 2 additions & 9 deletions public/locales/fr/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,6 @@
"updatedSuccessfully": "{{item}} mis à jour avec succès",
"removedSuccessfully": "{{item}} supprimé avec succès",
"successfullyUpdated": "Mis à jour avec succès",
"all": "Tous",
"active": "Actif",
"disabled": "Désactivé",
"pending": "En attente",
"completed": "Complété",
"late": "En retard",
"createdLatest": "Créé le plus récemment",
"createdEarliest": "Créé le plus tôt",
"searchBy": "Rechercher par {{item}}"
"sessionWarning": "Votre session expirera bientôt en raison de l'inactivité. Veuillez interagir avec la page pour prolonger votre session.",
"sessionLogOut": "Votre session a expiré en raison de l'inactivité. Veuillez vous reconnecter pour continuer."
}
12 changes: 8 additions & 4 deletions public/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@
"assignmentDate": "Date d'affectation",
"active": "Actif",
"clearFilters": "Effacer les filtres",
"completed": "Complété",
"completionDate": "Date d'achèvement",
"createActionItem": "Créer un élément d'action",
"deleteActionItem": "Supprimer l'élément d'action",
Expand Down Expand Up @@ -762,11 +763,14 @@
"actionItemCategories": "Catégories d'éléments d'action",
"updateOrganization": "Mettre à jour l'organisation",
"seeRequest": "Voir la demande",
"noData": "Aucune donnée",
"otherSettings": "Autres paramètres",
"noData": "Pas de données",
"otherSettings": "Autres réglages",
"changeLanguage": "Changer de langue",
"manageCustomFields": "Gérer les champs personnalisés",
"agendaItemCategories": "Catégories d'éléments d'agenda"
"pageName": "Paramètres",
"updateYourDetails": "Mettre à jour vos détails",
"updateYourPassword": "Mettre à jour votre mot de passe",
"settings": "Paramètres"
},
"deleteOrg": {
"deleteOrganization": "Supprimer l'organisation",
Expand Down Expand Up @@ -1188,7 +1192,7 @@
"disableButton": "Désactiver",
"updateActionItemCategory": "Mise à jour",
"actionItemCategoryName": "Nom",
"categoryDetails": "Détails de la catégorie",
"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": "Catégorie d'élément d'action mise à jour avec succès",
Expand Down
11 changes: 2 additions & 9 deletions public/locales/hi/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,6 @@
"updatedSuccessfully": "{{item}} सफलतापूर्वक अपडेट किया गया",
"removedSuccessfully": "{{item}} सफलतापूर्वक हटाया गया",
"successfullyUpdated": "सफलतापूर्वक अपडेट किया गया",
"all": "सभी",
"active": "सक्रिय",
"disabled": "अक्षम",
"pending": "लंबित",
"completed": "पूरा हुआ",
"late": "देर से",
"createdLatest": "नवीनतम बनाया गया",
"createdEarliest": "सबसे पहले बनाया गया",
"searchBy": "के द्वारा खोजें {{item}}"
"sessionWarning": "आपका सत्र निष्क्रियता के कारण जल्द ही समाप्त हो जाएगा। कृपया अपने सत्र को बढ़ाने के लिए पृष्ठ के साथ बातचीत करें।",
"sessionLogOut": "निष्क्रियता के कारण आपका सत्र समाप्त हो गया है। कृपया जारी रखने के लिए पुनः लॉगिन करें।"
}
16 changes: 10 additions & 6 deletions public/locales/hi/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@
"assignmentDate": "असाइनमेंट दिनांक",
"active": "सक्रिय",
"clearFilters": "फ़िल्टर साफ़ करें",
"completed": "पुरा होना।",
"completionDate": "पूरा करने की तिथि",
"createActionItem": "कार्रवाई आइटम बनाएं",
"deleteActionItem": "क्रिया आइटम हटाएँ",
Expand Down Expand Up @@ -757,16 +758,19 @@
"amount": "मात्रा"
},
"orgSettings": {
"title": "सेटिंग्स",
"title": "समायोजन",
"general": "सामान्य",
"actionItemCategories": "कार्य आइटम श्रेणियाँ",
"updateOrganization": "संगठन अपडेट करें",
"actionItemCategories": "कार्रवाई आइटम श्रेणियाँ",
"updateOrganization": "संगठन अद्यतन करें",
"seeRequest": "अनुरोध देखें",
"noData": "कोई डेटा नहीं",
"otherSettings": "अन्य सेटिंग्स",
"otherSettings": "अन्य सेटिंग",
"changeLanguage": "भाषा बदलें",
"manageCustomFields": "कस्टम फ़ील्ड प्रबंधित करें",
"agendaItemCategories": "एजेंडा आइटम श्रेणियाँ"
"pageName": "सेटिंग्स",
"updateYourDetails": "अपनी जानकारी अपडेट करें",
"updateYourPassword": "अपना पासवर्ड अपडेट करें",
"settings": "सेटिंग्स"
},
"deleteOrg": {
"deleteOrganization": "संगठन हटाएँ",
Expand Down Expand Up @@ -1188,7 +1192,7 @@
"disableButton": "अक्षम करना",
"updateActionItemCategory": "अद्यतन",
"actionItemCategoryName": "नाम",
"categoryDetails": "श्रेणी विवरण",
"actionItemCategoryDetails": "कार्य आइटम श्रेणी विवरण",
"enterName": "नाम दर्ज करें",
"successfulCreation": "कार्रवाई आइटम श्रेणी सफलतापूर्वक बनाई गई",
"successfulUpdation": "कार्रवाई आइटम श्रेणी सफलतापूर्वक अपडेट की गई",
Expand Down
11 changes: 2 additions & 9 deletions public/locales/sp/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,6 @@
"updatedSuccessfully": "{{item}} actualizado con éxito",
"removedSuccessfully": "{{item}} eliminado con éxito",
"successfullyUpdated": "Actualizado con éxito",
"all": "Todos",
"active": "Activo",
"disabled": "Deshabilitado",
"pending": "Pendiente",
"completed": "Completado",
"late": "Tarde",
"createdLatest": "Creado más reciente",
"createdEarliest": "Creado más temprano",
"searchBy": "Buscar por {{item}}"
"sessionWarning": "Su sesión expirará pronto debido a la inactividad. Por favor, interactúe con la página para extender su sesión.",
"sessionLogOut": "Su sesión ha expirado debido a la inactividad. Por favor, inicie sesión nuevamente para continuar."
}
34 changes: 19 additions & 15 deletions public/locales/sp/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@
"active": "Activo",
"clearFilters": "Borrar filtros",
"close": "Cerrar",
"completed": "Completado",
"completionDate": "Fecha de finalización",
"createActionItem": "Crear ítem de acción",
"deleteActionItem": "Eliminar ítem de acción",
Expand Down Expand Up @@ -437,12 +438,12 @@
"title": "Ítems de acción",
"yes": "",
"category": "Categoría",
"allotedHours": "Horas asignadas",
"latestDueDate": "Fecha de vencimiento más reciente",
"earliestDueDate": "Fecha de vencimiento más antigua",
"updateActionItem": "Actualizar elemento de acción",
"noneUpdated": "Ninguno de los campos se actualizó",
"updateStatusMsg": "¿Está seguro de que desea marcar este elemento de acción como pendiente?"
"allotedHours": "Horas Asignadas",
"latestDueDate": "Fecha de Vencimiento Más Reciente",
"earliestDueDate": "Fecha de Vencimiento Más Temprana",
"updateActionItem": "Actualizar Elemento de Acción",
"noneUpdated": "Ninguno de los campos fue actualizado",
"updateStatusMsg": "¿Estás seguro de que deseas marcar este elemento de acción como pendiente?"
},
"organizationAgendaCategory": {
"agendaCategoryDetails": "Detalles de la categoría de la agenda",
Expand Down Expand Up @@ -758,16 +759,19 @@
"amount": "Monto"
},
"orgSettings": {
"title": "Configuración",
"title": "Configuración Talawa",
"pageName": "Configuración",
"general": "General",
"actionItemCategories": "Categorías de elementos de acción",
"updateOrganization": "Actualizar organización",
"seeRequest": "Ver solicitud",
"updateYourDetails": "Actualiza tus datos",
"updateYourPassword": "Actualice su contraseña",
"updateOrganization": "Actualizar Organización",
"seeRequest": "Ver Solicitud",
"settings": "Ajustes",
"noData": "Sin datos",
"otherSettings": "Otras configuraciones",
"changeLanguage": "Cambiar idioma",
"manageCustomFields": "Administrar campos personalizados",
"agendaItemCategories": "Categorías de elementos de agenda"
"otherSettings": "Otras Configuraciones",
"changeLanguage": "Cambiar Idioma",
"manageCustomFields": "Gestionar Campos Personalizados"
},
"deleteOrg": {
"deleteOrganization": "Eliminar organización",
Expand Down Expand Up @@ -1191,7 +1195,7 @@
"disableButton": "Inhabilitar",
"updateActionItemCategory": "Actualizar",
"actionItemCategoryName": "Nombre",
"categoryDetails": "Detalles de la categoría",
"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",
Expand All @@ -1200,7 +1204,7 @@
"categoryDisabled": "Categoría de elemento de acción deshabilitada",
"noActionItemCategories": "No hay categorías de elementos de acción",
"status": "Estado",
"categoryDeleted": "Categoría de elemento de acción eliminada con éxito",
"categoryDeleted": "Categoría de elemento de acción eliminada",
"deleteCategory": "Eliminar categoría",
"deleteCategoryMsg": "¿Está seguro de que desea eliminar esta categoría de elemento de acción?"
},
Expand Down
11 changes: 2 additions & 9 deletions public/locales/zh/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,6 @@
"updatedSuccessfully": "{{item}} 更新成功",
"removedSuccessfully": "{{item}} 删除成功",
"successfullyUpdated": "更新成功",
"all": "全部",
"active": "活跃",
"disabled": "禁用",
"pending": "待处理",
"completed": "已完成",
"late": "迟到",
"createdLatest": "最近创建",
"createdEarliest": "最早创建",
"searchBy": "搜索依据 {{item}}"
"sessionWarning": "由于不活动,您的会话即将过期。请与页面互动以延长您的会话。",
"sessionLogOut": "由于不活动,您的会话已过期。请重新登录以继续。"
}
14 changes: 9 additions & 5 deletions public/locales/zh/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@
"assignmentDate": "分配日期",
"active": "积极的",
"clearFilters": "清除过滤器",
"completed": "完全的",
"completionDate": "完成日期",
"createActionItem": "创建操作项",
"deleteActionItem": "删除操作项",
Expand Down Expand Up @@ -758,15 +759,18 @@
},
"orgSettings": {
"title": "设置",
"general": "一般",
"actionItemCategories": "操作项目类别",
"general": "一般的",
"actionItemCategories": "行动项目类别",
"updateOrganization": "更新组织",
"seeRequest": "查看请求",
"noData": "没有数据",
"otherSettings": "其他设置",
"changeLanguage": "更改语言",
"changeLanguage": "改变语言",
"manageCustomFields": "管理自定义字段",
"agendaItemCategories": "议程项目类别"
"pageName": "设置",
"updateYourDetails": "更新您的详细信息",
"updateYourPassword": "更新您的密码",
"settings": "设置"
},
"deleteOrg": {
"deleteOrganization": "删除组织",
Expand Down Expand Up @@ -1188,7 +1192,7 @@
"disableButton": "禁用",
"updateActionItemCategory": "更新",
"actionItemCategoryName": "姓名",
"categoryDetails": "类别详情",
"actionItemCategoryDetails": "行动项目类别详细信息",
"enterName": "输入名字",
"successfulCreation": "操作项类别创建成功",
"successfulUpdation": "行动项目类别已成功更新",
Expand Down
11 changes: 11 additions & 0 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,15 @@ input CommentInput {
text: String!
}

type Community {
_id: ID!
logoUrl: String
name: String!
socialMediaUrls: SocialMediaUrls
timeout: Int
websiteLink: String
}

union ConnectionError = InvalidCursor | MaximumValueError

type ConnectionPageInfo {
Expand Down Expand Up @@ -641,6 +650,7 @@ type Mutation {
data: CreateActionItemInput!
): ActionItem!
createActionItemCategory(
isDisabled: Boolean!
name: String!
organizationId: ID!
): ActionItemCategory!
Expand Down Expand Up @@ -769,6 +779,7 @@ type Mutation {
): Organization!
updatePluginStatus(id: ID!, orgId: ID!): Plugin!
updatePost(data: PostUpdateInput, id: ID!): Post!
updateSessionTimeout(timeout: Int!): Boolean!
updateUserPassword(data: UpdateUserPasswordInput!): UserData!
updateUserProfile(data: UpdateUserInput, file: String): User!
updateUserRoleInOrganization(
Expand Down
6 changes: 6 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 All @@ -36,6 +37,7 @@ import Posts from 'screens/UserPortal/Posts/Posts';
import Organizations from 'screens/UserPortal/Organizations/Organizations';
import People from 'screens/UserPortal/People/People';
import Settings from 'screens/UserPortal/Settings/Settings';
// import UserLoginPage from 'screens/UserPortal/UserLoginPage/UserLoginPage';
import Chat from 'screens/UserPortal/Chat/Chat';
import { useQuery } from '@apollo/client';
import { CHECK_AUTH } from 'GraphQl/Queries/Queries';
Expand Down Expand Up @@ -162,6 +164,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
Loading

0 comments on commit 025bc1d

Please sign in to comment.