From 46d4d21b7c771aec08690642b740cd10a26e7d8e Mon Sep 17 00:00:00 2001 From: Nitya Pasrija <97171261+Nitya-Pasrija@users.noreply.github.com> Date: Wed, 23 Aug 2023 00:13:26 +0530 Subject: [PATCH 1/9] Admin workflow completed with updated package.json (#960) --- .github/workflows/push.yml | 78 ++++++++++++++++++++++++++++++++++++++ README.md | 6 +-- package.json | 2 + talawa-admin-docs/xyz.md | 1 + 4 files changed, 83 insertions(+), 4 deletions(-) create mode 100644 talawa-admin-docs/xyz.md diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 054f91cfc8..ac5b81cd19 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -35,4 +35,82 @@ jobs: verbose: true fail_ci_if_error: false name: '${{env.CODECOV_UNIQUE_NAME}}' + + Generate-Documentation: + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/automated-docs' + steps: + - name: Checkout the Repository + uses: actions/checkout@v3 + + - name: Install Dependencies + run: yarn install --legacy-peer-deps + + - name: Install TypeScript Globally and add GraphQL tag + run: yarn global add typescript + - run: yarn add graphql-tag + + - name: Update Dependencies + run: yarn upgrade + + - name: Generate Documentation of Markdown pages + run: | + yarn global add typedoc + yarn add typedoc-plugin-markdown + yarn typedoc --entryPoints src/components src/screens --out talawa-admin-docs --plugin typedoc-plugin-markdown --theme markdown --entryPointStrategy expand --exclude "**/*.test.ts" --exclude "**/*.css" + + - name: Checking doc updated + id: DocUpdated + run: | + if [ -n "$(git status --porcelain)" ]; then + echo "updateDoc=true" >> $GITHUB_OUTPUT + echo -e "Documentation has been updated!!" + else + Green='0;32' + NoColor='\033[0m' + echo -e "${Green}No documentation updated${NoColor}" + fi + + - name: Set env variables + if: steps.DocUpdated.outputs.updateDoc + run: | + echo "commit_id=$(echo $(git rev-parse HEAD))" >> $GITHUB_ENV + echo "email=$(echo $(git log --pretty=format:"%ae" $commit_id))" >> $GITHUB_ENV + + - name: Update Doc + if: steps.DocUpdated.outputs.updateDoc + run: | + Green='0;32' + NoColor='\033[0m' + git config --global user.name "${{github.actor}}" + git config --global user.email "${{env.email}}" + git add . + git commit -m "Update documentation" + git push + echo -e "🚀${Green} Hurrah! doc updated${NoColor}" + + - name: Create Documentation Artifact + uses: actions/upload-artifact@v2 + with: + name: documentation-admin + path: talawa-admin-docs + + Copy-docs-to-talawa-docs: + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/automated-docs' + needs: Generate-Documentation + steps: + - uses: actions/checkout@v3 + - uses: dmnemec/copy_file_to_another_repo_action@v1.1.1 + env: + API_TOKEN_GITHUB: ${{ secrets.TALAWA_DOCS_SYNC }} + with: + source_file: 'talawa-admin-docs/' + destination_repo: 'PalisadoesFoundation/talawa-docs' + destination_branch: 'develop' + destination_folder: 'docs/' + user_email: '${{env.email}}' + user_name: '${{github.actor}}' + commit_message: 'Talawa Admin docs updated' + diff --git a/README.md b/README.md index 1fdb69e3a5..aebc481244 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # Talawa Admin 💬 Join the community on Slack. The link can be found in the `Talawa` [README.md](https://github.com/PalisadoesFoundation/talawa) file. -[![N|Solid](src/assets/images/talawa-logo-lite-200x200.png)](https://github.com/PalisadoesFoundation/talawa-admin) - [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![GitHub stars](https://img.shields.io/github/stars/PalisadoesFoundation/talawa-admin.svg?style=social&label=Star&maxAge=2592000)](https://github.com/PalisadoesFoundation/talawa-admin) [![GitHub forks](https://img.shields.io/github/forks/PalisadoesFoundation/talawa-admin.svg?style=social&label=Fork&maxAge=2592000)](https://github.com/PalisadoesFoundation/talawa-admin) @@ -32,9 +30,9 @@ Core features include: # Documentation - The `talawa` documentation can be found [here](https://docs.talawa.io). -- Want to contribute? Look at [CONTRIBUTING.md](CONTRIBUTING.md) to get started. +- Want to contribute? Look at [CONTRIBUTING.md](https://github.com/PalisadoesFoundation/talawa-admin/blob/develop/CONTRIBUTING.md) to get started. - Visit the [Talawa-Docs GitHub](https://github.com/PalisadoesFoundation/talawa-docs) to see the code. # Installation -[Follow this guide](./INSTALLATION.md) +[Follow this guide](https://github.com/PalisadoesFoundation/talawa-admin/blob/develop/INSTALLATION.md) diff --git a/package.json b/package.json index 6ce2624f54..f9d201110b 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,8 @@ "react-toastify": "^9.0.3", "redux": "^4.1.1", "redux-thunk": "^2.3.0", + "typedoc": "^0.24.8", + "typedoc-plugin-markdown": "^3.15.4", "typescript": "^4.3.5", "web-vitals": "^1.0.1", "yarn": "^1.22.17" diff --git a/talawa-admin-docs/xyz.md b/talawa-admin-docs/xyz.md new file mode 100644 index 0000000000..8aae74caca --- /dev/null +++ b/talawa-admin-docs/xyz.md @@ -0,0 +1 @@ +file will be overwritten \ No newline at end of file From b619a0dbf902c16c823ad055f191d17c82b65692 Mon Sep 17 00:00:00 2001 From: Rishav Jha <76212518+rishav-jha-mech@users.noreply.github.com> Date: Tue, 29 Aug 2023 17:39:41 +0530 Subject: [PATCH 2/9] Merge latest AdminUI Redesign into develop (#956) * Initial Organizations screen done * Removed yellow scrollbar * Linting fixed * Replaced images with svgs for logos * Styling done for btnsContainer * Better typechecking and readability * Animated Drawer working * Responsive page ready * OrgCard responsive * Fixed navbar issue and added webkit keyframes * LeftDrawer ready * Translations added * Added shimmer loading effect * Styling issue fixed * Failing tests fixed for OrgList * Removed unused vars * Tests done for LeftDrawer * Succesfully made component without causing any breaking change * 100% Code coverage achieved for Requests Screen * Fix alignment * Roles screen UI done * Role screen fixed with 100% test coverage * Changing screen activeness fixed * Unused vars and Typos fixed * Language support added * Linting and typos fixed * Fixed failing tests for LeftDrawer * Completed tests of AdminDashListCard with 100% code coverage * OrgListCard done * Finalised tests * Requests user search made functional again ! * Fixed loading on refetch and UX on all screens * OrgList failing errors fixed * Fixed all failing tests * Achieved 100% code coverage for OrgList.tsx * Wrote tests and mod LeftDrawer for admins * Minor ui issue fixed * Fixed failing test * UI bug dropdown * Frontend insync with Backend attempt 1 * Introspection fail fix 1 * Introspection error fix 3 * Introspection error fix another attempt * Another attempt * Fixed Default Animation on Organizations Screen * Fixed typo * Loading data from localstorage functional * Fixed name conventions * Fixed typo * UI Fix * Changed screen name * Table Loader added * Added LeftOrg drawer and Organization screen comp to Screens * routesReducer tests fixed * Redundant adminNavbar removed from project * MemberDetail issue fixed * Achieved 100% code coverage for LeftDrawerOrg, Added Empty div in images * Fixed failing tests * Fix tests * Fixed warnings * Linting fixes * Linting issues fixed * Achieved 100% code coverage for CollapsibleDropdown * Achieved 100% CC on IconComponent and removed useless imports * Achieved 100% cc for LeftDrawer Component * Achieved 100% CC on SuperAdminScreen Component * Fixed typo * Integrated Event Dashboard * Failing tests for LeftDrawer LeftDrawerOrg OrgList screen fixed * Removed redundant code * Removed useless imports * Linting fixed * Removed LeftDrawerOrg --- package-lock.json | 147 +++++ public/locales/en.json | 55 +- public/locales/fr.json | 55 +- public/locales/hi.json | 55 +- public/locales/sp.json | 55 +- public/locales/zh.json | 55 +- src/App.tsx | 8 +- src/assets/svgs/icons/blockUser.svg | 3 + src/assets/svgs/icons/dashboard.svg | 3 + src/assets/svgs/icons/events.svg | 3 + src/assets/svgs/icons/people.svg | 4 + src/assets/svgs/icons/plugins.svg | 7 + src/assets/svgs/icons/posts.svg | 3 + src/assets/svgs/icons/settings.svg | 4 + src/assets/svgs/icons/tags.svg | 4 + src/components/AddOn/AddOn.tsx | 6 - .../AddOn/core/AddOnStore/AddOnStore.tsx | 352 ++++++------ .../AdminNavbar/AdminNavbar.module.css | 236 -------- .../AdminNavbar/AdminNavbar.test.tsx | 212 ------- src/components/AdminNavbar/AdminNavbar.tsx | 193 ------- .../AdminNavbar/AdminNavbarMocks.ts | 145 ----- .../ChangeLanguageDropdown.test.tsx | 2 - src/components/CheckIn/CheckInModal.tsx | 6 +- src/components/CheckIn/CheckInWrapper.tsx | 4 +- .../CollapsibleDropdown.module.css | 14 + .../CollapsibleDropdown.test.tsx | 77 +++ .../CollapsibleDropdown.tsx | 91 +++ .../EventListCard/EventListCard.tsx | 4 +- .../AddEventProjectModal.tsx | 4 +- .../UpdateEventProjectModal.tsx | 4 +- .../EventRegistrantsModal.tsx | 8 +- .../EventRegistrantsWrapper.tsx | 4 +- .../IconComponent/IconComponent.test.tsx | 99 ++++ .../IconComponent/IconComponent.tsx | 69 +++ .../LeftDrawer/LeftDrawer.module.css | 5 + src/components/LeftDrawer/LeftDrawer.test.tsx | 110 ++-- src/components/LeftDrawer/LeftDrawer.tsx | 99 ++-- .../LeftDrawerOrg/LeftDrawerOrg.module.css | 290 ++++++++++ .../LeftDrawerOrg/LeftDrawerOrg.test.tsx | 390 +++++++++++++ .../LeftDrawerOrg/LeftDrawerOrg.tsx | 227 ++++++++ .../ListNavbar/ListNavbar.module.css | 134 ----- src/components/ListNavbar/ListNavbar.test.tsx | 83 --- src/components/ListNavbar/ListNavbar.tsx | 108 ---- src/components/Loader/Loader.test.tsx | 1 - .../OrgListCard/OrgListCard.module.css | 18 +- .../OrgListCard/OrgListCard.test.tsx | 12 +- src/components/OrgListCard/OrgListCard.tsx | 13 +- .../OrganizationScreen.module.css | 60 ++ .../OrganizationScreen.test.tsx | 39 ++ .../OrganizationScreen/OrganizationScreen.tsx | 67 +++ .../SuperAdminScreen.test.tsx | 13 +- .../SuperAdminScreen/SuperAdminScreen.tsx | 18 +- .../TableLoader/TableLoader.module.css | 3 + .../TableLoader/TableLoader.test.tsx | 36 ++ src/components/TableLoader/TableLoader.tsx | 50 ++ src/components/TaskListItem/TaskListItem.tsx | 4 +- src/components/TaskModals/AddTaskModal.tsx | 6 +- .../TaskModals/ManageVolunteerModal.tsx | 6 +- src/components/TaskModals/UpdateTaskModal.tsx | 38 +- src/screens/BlockUser/BlockUser.tsx | 319 ++++++----- src/screens/EventDashboard/EventDashboard.tsx | 25 +- .../MemberDetail/MemberDetail.test.tsx | 2 +- src/screens/MemberDetail/MemberDetail.tsx | 416 +++++++------- .../OrgContribution/OrgContribution.tsx | 13 +- src/screens/OrgList/OrgList.tsx | 6 +- src/screens/OrgList/OrgListMocks.ts | 1 - src/screens/OrgPost/OrgPost.tsx | 245 ++++---- src/screens/OrgSettings/OrgSettings.tsx | 268 +++++---- .../OrganizationDashboard.tsx | 423 +++++++------- .../OrganizationEvents/OrganizationEvents.tsx | 71 ++- .../OrganizationPeople/OrganizationPeople.tsx | 527 +++++++++--------- src/screens/Requests/Requests.tsx | 143 ++--- .../Users.module.css} | 0 .../Roles.test.tsx => Users/Users.test.tsx} | 28 +- .../{Roles/Roles.tsx => Users/Users.tsx} | 145 ++--- src/state/reducers/routesReducer.test.ts | 36 +- src/state/reducers/routesReducer.ts | 41 +- src/utils/interfaces.ts | 39 ++ 78 files changed, 3578 insertions(+), 2991 deletions(-) create mode 100644 src/assets/svgs/icons/blockUser.svg create mode 100644 src/assets/svgs/icons/dashboard.svg create mode 100644 src/assets/svgs/icons/events.svg create mode 100644 src/assets/svgs/icons/people.svg create mode 100644 src/assets/svgs/icons/plugins.svg create mode 100644 src/assets/svgs/icons/posts.svg create mode 100644 src/assets/svgs/icons/settings.svg create mode 100644 src/assets/svgs/icons/tags.svg delete mode 100644 src/components/AdminNavbar/AdminNavbar.module.css delete mode 100644 src/components/AdminNavbar/AdminNavbar.test.tsx delete mode 100644 src/components/AdminNavbar/AdminNavbar.tsx delete mode 100644 src/components/AdminNavbar/AdminNavbarMocks.ts create mode 100644 src/components/CollapsibleDropdown/CollapsibleDropdown.module.css create mode 100644 src/components/CollapsibleDropdown/CollapsibleDropdown.test.tsx create mode 100644 src/components/CollapsibleDropdown/CollapsibleDropdown.tsx create mode 100644 src/components/IconComponent/IconComponent.test.tsx create mode 100644 src/components/IconComponent/IconComponent.tsx create mode 100644 src/components/LeftDrawerOrg/LeftDrawerOrg.module.css create mode 100644 src/components/LeftDrawerOrg/LeftDrawerOrg.test.tsx create mode 100644 src/components/LeftDrawerOrg/LeftDrawerOrg.tsx delete mode 100644 src/components/ListNavbar/ListNavbar.module.css delete mode 100644 src/components/ListNavbar/ListNavbar.test.tsx delete mode 100644 src/components/ListNavbar/ListNavbar.tsx create mode 100644 src/components/OrganizationScreen/OrganizationScreen.module.css create mode 100644 src/components/OrganizationScreen/OrganizationScreen.test.tsx create mode 100644 src/components/OrganizationScreen/OrganizationScreen.tsx create mode 100644 src/components/TableLoader/TableLoader.module.css create mode 100644 src/components/TableLoader/TableLoader.test.tsx create mode 100644 src/components/TableLoader/TableLoader.tsx rename src/screens/{Roles/Roles.module.css => Users/Users.module.css} (100%) rename src/screens/{Roles/Roles.test.tsx => Users/Users.test.tsx} (96%) rename src/screens/{Roles/Roles.tsx => Users/Users.tsx} (65%) diff --git a/package-lock.json b/package-lock.json index 1795dfa860..d8a291c684 100644 --- a/package-lock.json +++ b/package-lock.json @@ -61,6 +61,8 @@ "react-toastify": "^9.0.3", "redux": "^4.1.1", "redux-thunk": "^2.3.0", + "typedoc": "^0.24.8", + "typedoc-plugin-markdown": "^3.15.4", "typescript": "^4.3.5", "web-vitals": "^1.0.1", "yarn": "^1.22.17" @@ -5896,6 +5898,11 @@ "node": ">=8" } }, + "node_modules/ansi-sequence-parser": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz", + "integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==" + }, "node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -11465,6 +11472,34 @@ "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==" }, + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/handlebars/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -15686,6 +15721,11 @@ "node": ">=6" } }, + "node_modules/jsonc-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==" + }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -16053,6 +16093,11 @@ "yallist": "^3.0.2" } }, + "node_modules/lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==" + }, "node_modules/lz-string": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", @@ -16186,6 +16231,17 @@ "node": ">=0.10.0" } }, + "node_modules/marked": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 12" + } + }, "node_modules/mdn-data": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", @@ -21707,6 +21763,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/shiki": { + "version": "0.14.3", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.3.tgz", + "integrity": "sha512-U3S/a+b0KS+UkTyMjoNojvTgrBHjgp7L6ovhFVZsXmBGnVdQ4K4U9oK0z63w538S91ATngv1vXigHCSWOwnr+g==", + "dependencies": { + "ansi-sequence-parser": "^1.1.0", + "jsonc-parser": "^3.2.0", + "vscode-oniguruma": "^1.7.0", + "vscode-textmate": "^8.0.0" + } + }, "node_modules/side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -23433,6 +23500,59 @@ "is-typedarray": "^1.0.0" } }, + "node_modules/typedoc": { + "version": "0.24.8", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.24.8.tgz", + "integrity": "sha512-ahJ6Cpcvxwaxfu4KtjA8qZNqS43wYt6JL27wYiIgl1vd38WW/KWX11YuAeZhuz9v+ttrutSsgK+XO1CjL1kA3w==", + "dependencies": { + "lunr": "^2.3.9", + "marked": "^4.3.0", + "minimatch": "^9.0.0", + "shiki": "^0.14.1" + }, + "bin": { + "typedoc": "bin/typedoc" + }, + "engines": { + "node": ">= 14.14" + }, + "peerDependencies": { + "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x" + } + }, + "node_modules/typedoc-plugin-markdown": { + "version": "3.15.4", + "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-3.15.4.tgz", + "integrity": "sha512-KpjFL/NDrQAbY147oIoOgob2vAdEchsMcTVd6+e6H2lC1l5xhi48bhP/fMJI7qYQ8th5nubervgqw51z7gY66A==", + "dependencies": { + "handlebars": "^4.7.7" + }, + "peerDependencies": { + "typedoc": ">=0.24.0" + } + }, + "node_modules/typedoc/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/typedoc/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/typescript": { "version": "4.9.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", @@ -23445,6 +23565,18 @@ "node": ">=4.2.0" } }, + "node_modules/uglify-js": { + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", + "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/unbox-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", @@ -23902,6 +24034,16 @@ "node": ">=0.10.0" } }, + "node_modules/vscode-oniguruma": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==" + }, + "node_modules/vscode-textmate": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", + "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==" + }, "node_modules/w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", @@ -24378,6 +24520,11 @@ "node": ">=0.10.0" } }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==" + }, "node_modules/workbox-background-sync": { "version": "6.6.0", "resolved": "https://registry.npmjs.org/workbox-background-sync/-/workbox-background-sync-6.6.0.tgz", diff --git a/public/locales/en.json b/public/locales/en.json index 3ab250aca1..bf232e2bdd 100644 --- a/public/locales/en.json +++ b/public/locales/en.json @@ -39,9 +39,33 @@ "menu": "Menu", "organizations": "Organizations", "requests": "Requests", - "roles": "Roles", + "users": "Users", "logout": "Logout" }, + "leftDrawerOrg": { + "talawaAdminPortal": "Talawa Admin Portal", + "menu": "Menu", + "logout": "Logout", + "talawa_portal": "Talawa Admin Portal", + "Dashboard": "Dashboard", + "People": "People", + "Events": "Events", + "Contributions": "Contributions", + "Posts": "Posts", + "Block/Unblock": "Block/Unblock", + "Plugins": "Plugins", + "Plugin Store": "Plugin Store", + "allOrganizations": "All Organizations", + "yourOrganization": "Your Organization", + "notification": "Notification", + "settings": "Settings", + "language": "Language", + "notifications": "Notifications", + "spamsThe": "spams the", + "group": "group", + "noNotifications": "No Notifications", + "close": "Close" + }, "orgList": { "title": "Talawa Organizations", "you": "You", @@ -73,10 +97,10 @@ "rowsPerPage": "rows per page", "all": "All" }, - "roles": { + "users": { "title": "Talawa Roles", "searchByName": "Search By Name", - "usersList": "Users List", + "users": "Users", "name": "Name", "email": "Email", "roles_userType": "Role/User-Type", @@ -112,30 +136,8 @@ "noResultsFoundFor": "No results found for ", "talawaApiUnavailable": "Talawa-API service is unavailable. Is it running? Check your network connectivity too." }, - "adminNavbar": { - "talawa_portal": "Talawa Admin Portal", - "Dashboard": "Dashboard", - "People": "People", - "Events": "Events", - "Contributions": "Contributions", - "Posts": "Posts", - "Block/Unblock": "Block/Unblock", - "Plugins": "Plugins", - "Plugin Store": "Plugin Store", - "allOrganizations": "All Organizations", - "yourOrganization": "Your Organization", - "notification": "Notification", - "settings": "Settings", - "language": "Language", - "logout": "Logout", - "notifications": "Notifications", - "spamsThe": "spams the", - "group": "group", - "noNotifications": "No Notifications", - "close": "Close" - }, "dashboard": { - "title": "Talawa Dashboard", + "title": "Dashboard", "location": "Location", "about": "About", "deleteThisOrganization": "Delete This Organization", @@ -426,6 +428,7 @@ "pDesc": "This Plugin enables UI for" }, "addOnStore": { + "title": "Add On Store", "searchName": "Ex: Donations", "enable": "Enabled", "disable": "Disabled", diff --git a/public/locales/fr.json b/public/locales/fr.json index 82a494117c..6d501840ac 100644 --- a/public/locales/fr.json +++ b/public/locales/fr.json @@ -39,9 +39,33 @@ "menu": "Menu", "organizations": "Organisations", "requests": "Demandes", - "roles": "Rôles", + "users": "Utilisateurs", "logout": "Déconnexion" }, + "leftDrawerOrg": { + "talawaAdminPortal": "Portail d'administration Talawa", + "menu": "Menu", + "talawa_portal": "Portail D'Administrateur Talawa", + "Dashboard": "Tableau de bord", + "People": "Personnes", + "Events": "Événements", + "Contributions": "Contributions", + "Posts": "Des postes", + "Block/Unblock": "Bloquer/Débloquer", + "Plugins": "Plugins", + "Plugin Store": "Magasin de plugins", + "allOrganizations": "Toutes les organisations", + "yourOrganization": "Votre organisation", + "notification": "Notification", + "settings": "Réglages", + "language": "Langue", + "logout": "Se déconnecter", + "notifications": "Notifications", + "spamsThe": "spam le", + "group": "groupe", + "noNotifications": "Aucune notification", + "close": "Proche" + }, "orgList": { "title": "Organisations Talawa", "you": "Tu", @@ -73,10 +97,10 @@ "rowsPerPage": "lignes par page", "all": "Tout" }, - "roles": { + "users": { "title": "Rôles Talawa", "searchByName": "Recherche par nom", - "usersList": "Liste des utilisateurs", + "users": "Utilisateurs", "name": "Nom", "email": "E-mail", "roles_userType": "Rôle/Type d'utilisateur", @@ -110,30 +134,8 @@ "noResultsFoundFor": "Aucun résultat trouvé pour ", "talawaApiUnavailable": "Le service Talawa-API n'est pas disponible. Est-il en cours d'exécution ? Vérifiez également votre connectivité réseau." }, - "adminNavbar": { - "talawa_portal": "Portail D'Administrateur Talawa", - "Dashboard": "Tableau de bord", - "People": "Personnes", - "Events": "Événements", - "Contributions": "Contributions", - "Posts": "Des postes", - "Block/Unblock": "Bloquer/Débloquer", - "Plugins": "Plugins", - "Plugin Store": "Magasin de plugins", - "allOrganizations": "Toutes les organisations", - "yourOrganization": "Votre organisation", - "notification": "Notification", - "settings": "Réglages", - "language": "Langue", - "logout": "Se déconnecter", - "notifications": "Notifications", - "spamsThe": "spam le", - "group": "groupe", - "noNotifications": "Aucune notification", - "close": "Proche" - }, "dashboard": { - "title": "Tableau de bord Talawa", + "title": "Tableau de bord", "location": "Emplacement", "about": "À propos de", "deleteThisOrganization": "Supprimer cette organisation", @@ -422,6 +424,7 @@ "pDesc": "Ce plugin active l'interface utilisateur pour" }, "addOnStore": { + "title": "Add-On Store", "searchName": "Ex:Des dons ", "enable": "Activé", "disable": "Désactivé", diff --git a/public/locales/hi.json b/public/locales/hi.json index 6fc8725f4a..d376cb1107 100644 --- a/public/locales/hi.json +++ b/public/locales/hi.json @@ -39,9 +39,33 @@ "menu": "मेन्यू", "organizations": "संगठन", "requests": "अनुरोध", - "roles": "भूमिकाएँ", + "users": "उपयोगकर्ता", "logout": "लॉग आउट" }, + "leftDrawerOrg": { + "talawaAdminPortal": "तलावा व्यवस्थापक पोर्टल", + "menu": "मेन्यू", + "talawa_portal": "तलावा प्रशासन पोर्टल", + "Dashboard": "डैशबोर्ड", + "People": "लोग", + "Events": "आयोजन", + "Contributions": "योगदान", + "Posts": "पोस्ट", + "Block/Unblock": "ब्लॉक/अनब्लॉक करें", + "Plugins": "प्लगइन्स", + "Plugin Store": "प्लगइन स्टोर", + "allOrganizations": "सभी संगठन", + "yourOrganization": "आपका संगठन", + "notification": "अधिसूचना", + "settings": "समायोजन", + "language": "भाषा", + "logout": "लॉग आउट", + "notifications": "सूचनाएं", + "spamsThe": "स्पैम द", + "group": "समूह", + "noNotifications": "कोई सूचनाएं नहीं", + "close": "बंद करना" + }, "orgList": { "title": "तलवा संगठन", "you": "आप", @@ -73,10 +97,10 @@ "rowsPerPage": "प्रति पृष्ठ पंक्तियाँ", "all": "सभी" }, - "roles": { + "users": { "title": "तलावा भूमिकाएं", "searchByName": "नाम से खोजें", - "usersList": "उपयोगकर्ता सूची", + "users": "उपयोगकर्ता", "name": "नाम", "email": "ईमेल", "roles_userType": "भूमिका/उपयोगकर्ता-प्रकार", @@ -110,30 +134,8 @@ "noResultsFoundFor": "के लिए कोई परिणाम नहीं मिला ", "talawaApiUnavailable": "तलवा-एपीआई सेवा उपलब्ध नहीं है। क्या यह चल रहा है? अपनी नेटवर्क कनेक्टिविटी भी जांचें।" }, - "adminNavbar": { - "talawa_portal": "तलावा प्रशासन पोर्टल", - "Dashboard": "डैशबोर्ड", - "People": "लोग", - "Events": "आयोजन", - "Contributions": "योगदान", - "Posts": "पोस्ट", - "Block/Unblock": "ब्लॉक/अनब्लॉक करें", - "Plugins": "प्लगइन्स", - "Plugin Store": "प्लगइन स्टोर", - "allOrganizations": "सभी संगठन", - "yourOrganization": "आपका संगठन", - "notification": "अधिसूचना", - "settings": "समायोजन", - "language": "भाषा", - "logout": "लॉग आउट", - "notifications": "सूचनाएं", - "spamsThe": "स्पैम द", - "group": "समूह", - "noNotifications": "कोई सूचनाएं नहीं", - "close": "बंद करना" - }, "dashboard": { - "title": "तलावा डैशबोर्ड", + "title": "डैशबोर्ड", "location": "स्थान", "about": "के बारे में", "deleteThisOrganization": "इस संगठन को हटाएं", @@ -422,6 +424,7 @@ "pDesc": "यह प्लगइन यूआई को सक्षम बनाता है" }, "addOnStore": { + "title": "प्लगइन स्टोर", "searchName": "जैसे: दान", "enable": "सक्रिय", "disable": "अक्षम", diff --git a/public/locales/sp.json b/public/locales/sp.json index 6ee06204cb..af9a7f5686 100644 --- a/public/locales/sp.json +++ b/public/locales/sp.json @@ -39,9 +39,33 @@ "menu": "Menú", "organizations": "Organizaciones", "requests": "Solicitudes", - "roles": "Roles", + "users": "Usuarios", "logout": "Cerrar sesión" }, + "leftDrawerOrg": { + "talawaAdminPortal": "Portal de administración de Talawa", + "menu": "Menú", + "talawa_portal": "Portal De Administración Talawa", + "Dashboard": "Tablero", + "People": "Gente", + "Events": "Eventos", + "Contributions": "Contribuciones", + "Posts": "Publicaciones", + "Block/Unblock": "Bloquear/Desbloquear", + "Plugins": "Complementos", + "Plugin Store": "Tienda de complementos", + "allOrganizations": "Todas las organizaciones", + "yourOrganization": "Tu organización", + "notification": "Notificación", + "settings": "Ajustes", + "language": "Idioma", + "logout": "Cerrar sesión", + "notifications": "Notificaciones", + "spamsThe": "envía correo no deseado", + "group": "grupo", + "noNotifications": "No Notificaciones", + "close": "Cerca" + }, "orgList": { "title": "Organizaciones Talawa", "you": "Tú", @@ -73,10 +97,10 @@ "rowsPerPage": "filas por página", "all": "Todos" }, - "roles": { + "users": { "title": "Roles Talawa", "searchByName": "Buscar por nombre", - "usersList": "Lista de usuarios", + "users": "Usuarios", "name": "Nombre", "email": "Correo electrónico", "roles_userType": "Rol/Tipo de usuario", @@ -110,30 +134,8 @@ "noResultsFoundFor": "No se encontraron resultados para ", "talawaApiUnavailable": "El servicio Talawa-API no está disponible. ¿Está funcionando? Compruebe también la conectividad de su red." }, - "adminNavbar": { - "talawa_portal": "Portal De Administración Talawa", - "Dashboard": "Tablero", - "People": "Gente", - "Events": "Eventos", - "Contributions": "Contribuciones", - "Posts": "Publicaciones", - "Block/Unblock": "Bloquear/Desbloquear", - "Plugins": "Complementos", - "Plugin Store": "Tienda de complementos", - "allOrganizations": "Todas las organizaciones", - "yourOrganization": "Tu organización", - "notification": "Notificación", - "settings": "Ajustes", - "language": "Idioma", - "logout": "Cerrar sesión", - "notifications": "Notificaciones", - "spamsThe": "envía correo no deseado", - "group": "grupo", - "noNotifications": "No Notificaciones", - "close": "Cerca" - }, "dashboard": { - "title": "Panel de Talawa", + "title": "Panel de", "location": "Ubicación", "about": "Sobre", "deleteThisOrganization": "Eliminar esta organización", @@ -422,6 +424,7 @@ "pDesc": "Este complemento habilita la interfaz de usuario para" }, "addOnStore": { + "title": "Tienda de complementos", "searchName": "Ej: Donaciones", "enable": "Activada", "disable": "Desactivada", diff --git a/public/locales/zh.json b/public/locales/zh.json index b762f994b2..e91c57c531 100644 --- a/public/locales/zh.json +++ b/public/locales/zh.json @@ -39,9 +39,33 @@ "menu": "菜单", "organizations": "组织", "requests": "请求", - "roles": "角色", + "users": "用户", "logout": "退出登录" }, + "leftDrawerOrg": { + "talawaAdminPortal": "塔拉瓦管理门户", + "menu": "菜单", + "talawa_portal": "塔拉瓦管理門戶", + "Dashboard": "儀表板", + "People": "人們", + "Events": "事件", + "Contributions": "貢獻", + "Posts": "帖子", + "Block/Unblock": "阻止/解除阻止", + "Plugins": "插件", + "Plugin Store": "插件商店", + "allOrganizations": "所有组织", + "yourOrganization": "您的组织", + "notification": "通知", + "settings": "設置", + "language": "語", + "logout": "登出", + "notifications": "通知", + "spamsThe": "垃圾郵件", + "group": "團體", + "noNotifications": "沒有通知", + "close": "關" + }, "orgList": { "title": "塔拉瓦組織", "you": "你", @@ -73,10 +97,10 @@ "rowsPerPage": "每頁行數", "all": "全部" }, - "roles": { + "users": { "title": "塔拉瓦角色", "searchByName": "按名稱搜索", - "usersList": "用戶列表", + "users": "用户", "name": "姓名", "email": "電子郵件", "roles_userType": "角色/用戶類型", @@ -110,30 +134,8 @@ "noResultsFoundFor": "未找到结果 ", "talawaApiUnavailable": "服務不可用。它在運行嗎?還要檢查您的網絡連接。" }, - "adminNavbar": { - "talawa_portal": "塔拉瓦管理門戶", - "Dashboard": "儀表板", - "People": "人們", - "Events": "事件", - "Contributions": "貢獻", - "Posts": "帖子", - "Block/Unblock": "阻止/解除阻止", - "Plugins": "插件", - "Plugin Store": "插件商店", - "allOrganizations": "所有组织", - "yourOrganization": "您的组织", - "notification": "通知", - "settings": "設置", - "language": "語", - "logout": "登出", - "notifications": "通知", - "spamsThe": "垃圾郵件", - "group": "團體", - "noNotifications": "沒有通知", - "close": "關" - }, "dashboard": { - "title": "塔拉瓦儀表板", + "title": "儀表板", "location": "地點", "about": "關於", "deleteThisOrganization": "刪除此組織", @@ -422,6 +424,7 @@ "pDesc": "此插件启用 UI" }, "addOnStore": { + "title": "插件商店", "searchName": "例如:捐赠", "enable": "启用", "disable": "残疾人", diff --git a/src/App.tsx b/src/App.tsx index 0d8cb059e8..517b6eebc7 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -16,7 +16,7 @@ import OrgSettings from 'screens/OrgSettings/OrgSettings'; import PageNotFound from 'screens/PageNotFound/PageNotFound'; import AddOnStore from 'components/AddOn/core/AddOnStore/AddOnStore'; import ForgotPassword from 'screens/ForgotPassword/ForgotPassword'; -import Roles from 'screens/Roles/Roles'; +import Users from 'screens/Users/Users'; import Requests from 'screens/Requests/Requests'; import BlockUser from 'screens/BlockUser/BlockUser'; import EventDashboard from 'screens/EventDashboard/EventDashboard'; @@ -85,6 +85,10 @@ function app(): JSX.Element { localStorage.setItem('email', data.checkAuth.email); localStorage.setItem('IsLoggedIn', 'TRUE'); localStorage.setItem('UserType', data.checkAuth.userType); + localStorage.setItem('FirstName', data.checkAuth.firstName); + localStorage.setItem('LastName', data.checkAuth.lastName); + localStorage.setItem('UserImage', data.checkAuth.image); + localStorage.setItem('Email', data.checkAuth.email); } else { localStorage.clear(); } @@ -102,7 +106,7 @@ function app(): JSX.Element { - + diff --git a/src/assets/svgs/icons/blockUser.svg b/src/assets/svgs/icons/blockUser.svg new file mode 100644 index 0000000000..f9aef51775 --- /dev/null +++ b/src/assets/svgs/icons/blockUser.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/svgs/icons/dashboard.svg b/src/assets/svgs/icons/dashboard.svg new file mode 100644 index 0000000000..12e8b0fe63 --- /dev/null +++ b/src/assets/svgs/icons/dashboard.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/svgs/icons/events.svg b/src/assets/svgs/icons/events.svg new file mode 100644 index 0000000000..95b8a3b587 --- /dev/null +++ b/src/assets/svgs/icons/events.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/svgs/icons/people.svg b/src/assets/svgs/icons/people.svg new file mode 100644 index 0000000000..17c62eb14e --- /dev/null +++ b/src/assets/svgs/icons/people.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/svgs/icons/plugins.svg b/src/assets/svgs/icons/plugins.svg new file mode 100644 index 0000000000..7da1701dc1 --- /dev/null +++ b/src/assets/svgs/icons/plugins.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/assets/svgs/icons/posts.svg b/src/assets/svgs/icons/posts.svg new file mode 100644 index 0000000000..181e25855a --- /dev/null +++ b/src/assets/svgs/icons/posts.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/svgs/icons/settings.svg b/src/assets/svgs/icons/settings.svg new file mode 100644 index 0000000000..064f6c9001 --- /dev/null +++ b/src/assets/svgs/icons/settings.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/svgs/icons/tags.svg b/src/assets/svgs/icons/tags.svg new file mode 100644 index 0000000000..32cb76851a --- /dev/null +++ b/src/assets/svgs/icons/tags.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/AddOn/AddOn.tsx b/src/components/AddOn/AddOn.tsx index 7ac6466979..4e73c52b7c 100644 --- a/src/components/AddOn/AddOn.tsx +++ b/src/components/AddOn/AddOn.tsx @@ -1,8 +1,5 @@ import React from 'react'; import PropTypes from 'prop-types'; -import AdminNavbar from 'components/AdminNavbar/AdminNavbar'; -import { useSelector } from 'react-redux'; -import type { RootState } from 'state/reducers'; interface InterfaceAddOnProps { extras: any; @@ -12,11 +9,8 @@ interface InterfaceAddOnProps { // Validate Extras function addOn({ children }: InterfaceAddOnProps): JSX.Element { - const appRoutes = useSelector((state: RootState) => state.appRoutes); - const { targets, configUrl } = appRoutes; return ( <> -
{children}
diff --git a/src/components/AddOn/core/AddOnStore/AddOnStore.tsx b/src/components/AddOn/core/AddOnStore/AddOnStore.tsx index 148eea7cb4..1a6eaad34d 100644 --- a/src/components/AddOn/core/AddOnStore/AddOnStore.tsx +++ b/src/components/AddOn/core/AddOnStore/AddOnStore.tsx @@ -2,7 +2,6 @@ import React, { useEffect, useState } from 'react'; import PropTypes from 'react'; import styles from './AddOnStore.module.css'; -import AdminNavbar from 'components/AdminNavbar/AdminNavbar'; import AddOnEntry from '../AddOnEntry/AddOnEntry'; import Action from '../../support/components/Action/Action'; import SidePanel from 'components/AddOn/support/components/SidePanel/SidePanel'; @@ -16,15 +15,17 @@ import { } from 'GraphQl/Queries/Queries'; // PLUGIN_LIST import { useSelector } from 'react-redux'; import type { RootState } from '../../../../state/reducers'; -import { Form, Tab, Tabs } from 'react-bootstrap'; +import { Col, Form, Row, Tab, Tabs } from 'react-bootstrap'; import AddOnRegister from '../AddOnRegister/AddOnRegister'; import PluginHelper from 'components/AddOn/support/services/Plugin.helper'; import { store } from './../../../../state/store'; import { useTranslation } from 'react-i18next'; import Loader from 'components/Loader/Loader'; +import OrganizationScreen from 'components/OrganizationScreen/OrganizationScreen'; function addOnStore(): JSX.Element { const { t } = useTranslation('translation', { keyPrefix: 'addOnStore' }); + document.title = t('title'); const [isStore, setIsStore] = useState(true); const [showEnabled, setShowEnabled] = useState(true); @@ -106,115 +107,69 @@ function addOnStore(): JSX.Element { } return ( <> -
- -
-
- - - setSearchText(e.target.value)} - /> - - {!isStore && ( - -
-
- - -
-
+ + + + + setSearchText(e.target.value)} + /> - )} -
- -
-

{t('pHeading')}

- {searchText ? ( -

- Search results for {searchText} -

- ) : null} - - - - {console.log( - data.getPlugins.filter( - (val: { - _id: string; - pluginName: string | undefined; - pluginDesc: string | undefined; - pluginCreatedBy: string; - pluginInstallStatus: boolean | undefined; - getInstalledPlugins: () => any; - }) => { - if (searchText == '') { - return val; - } else if ( - val.pluginName - ?.toLowerCase() - .includes(searchText.toLowerCase()) - ) { - return val; - } - } - ) - )} - {data.getPlugins.filter( - (val: { - _id: string; - pluginName: string | undefined; - pluginDesc: string | undefined; - pluginCreatedBy: string; - pluginInstallStatus: boolean | undefined; - getInstalledPlugins: () => any; - }) => { - if (searchText == '') { - return val; - } else if ( - val.pluginName - ?.toLowerCase() - .includes(searchText.toLowerCase()) - ) { - return val; - } - } - ).length === 0 ? ( -

{t('pMessage')}

- ) : ( - data.getPlugins - .filter( + {!isStore && ( + +
+
+ + +
+
+
+ )} + + +
+

{t('pHeading')}

+ {searchText ? ( +

+ Search results for {searchText} +

+ ) : null} + + + + {console.log( + data.getPlugins.filter( (val: { _id: string; pluginName: string | undefined; @@ -234,40 +189,8 @@ function addOnStore(): JSX.Element { } } ) - .map( - ( - plug: { - _id: string; - pluginName: string | undefined; - pluginDesc: string | undefined; - pluginCreatedBy: string; - pluginInstallStatus: boolean | undefined; - getInstalledPlugins: () => any; - }, - i: React.Key | null | undefined - ): JSX.Element => ( - { - console.log('Plugin is modified'); - }} - getInstalledPlugins={getInstalledPlugins} - /> - ) - ) - )} - - - {data.getPlugins - .filter((plugin: any) => plugin.pluginInstallStatus == true) - .filter( + )} + {data.getPlugins.filter( (val: { _id: string; pluginName: string | undefined; @@ -287,9 +210,61 @@ function addOnStore(): JSX.Element { } } ).length === 0 ? ( -

{t('pMessage')}

// eslint-disable-line - ) : ( - data.getPlugins +

{t('pMessage')}

+ ) : ( + data.getPlugins + .filter( + (val: { + _id: string; + pluginName: string | undefined; + pluginDesc: string | undefined; + pluginCreatedBy: string; + pluginInstallStatus: boolean | undefined; + getInstalledPlugins: () => any; + }) => { + if (searchText == '') { + return val; + } else if ( + val.pluginName + ?.toLowerCase() + .includes(searchText.toLowerCase()) + ) { + return val; + } + } + ) + .map( + ( + plug: { + _id: string; + pluginName: string | undefined; + pluginDesc: string | undefined; + pluginCreatedBy: string; + pluginInstallStatus: boolean | undefined; + getInstalledPlugins: () => any; + }, + i: React.Key | null | undefined + ): JSX.Element => ( + { + console.log('Plugin is modified'); + }} + getInstalledPlugins={getInstalledPlugins} + /> + ) + ) + )} +
+ + {data.getPlugins .filter((plugin: any) => plugin.pluginInstallStatus == true) .filter( (val: { @@ -310,41 +285,68 @@ function addOnStore(): JSX.Element { return val; } } - ) - .map( - ( - plug: { + ).length === 0 ? ( +

{t('pMessage')}

// eslint-disable-line + ) : ( + data.getPlugins + .filter( + (plugin: any) => plugin.pluginInstallStatus == true + ) + .filter( + (val: { _id: string; pluginName: string | undefined; pluginDesc: string | undefined; pluginCreatedBy: string; pluginInstallStatus: boolean | undefined; getInstalledPlugins: () => any; - }, - i: React.Key | null | undefined - ): JSX.Element => ( - { - console.log('Plugin is modified'); - }} - getInstalledPlugins={getInstalledPlugins} - /> + }) => { + if (searchText == '') { + return val; + } else if ( + val.pluginName + ?.toLowerCase() + .includes(searchText.toLowerCase()) + ) { + return val; + } + } ) - ) - )} -
-
-
- -
+ .map( + ( + plug: { + _id: string; + pluginName: string | undefined; + pluginDesc: string | undefined; + pluginCreatedBy: string; + pluginInstallStatus: boolean | undefined; + getInstalledPlugins: () => any; + }, + i: React.Key | null | undefined + ): JSX.Element => ( + { + console.log('Plugin is modified'); + }} + getInstalledPlugins={getInstalledPlugins} + /> + ) + ) + )} + + +
+ + + ); } diff --git a/src/components/AdminNavbar/AdminNavbar.module.css b/src/components/AdminNavbar/AdminNavbar.module.css deleted file mode 100644 index 8210a80337..0000000000 --- a/src/components/AdminNavbar/AdminNavbar.module.css +++ /dev/null @@ -1,236 +0,0 @@ -.navbarbg { - position: relative !important; - margin-bottom: 1.5rem; - z-index: 1; - box-shadow: 0px 0px 8px 2px #c8c8c8; - padding-top: 0px; - padding-bottom: 0px; -} - -.logo { - color: #707070; - margin: 0.5rem 0; - display: flex; - align-items: center; - text-decoration: none !important; -} - -.logo img { - margin-top: 0px; - margin-left: 10px; -} - -.logo > strong { - text-decoration: none; - line-height: 1.5rem; - margin-left: 10px; - font-family: sans-serif; - font-size: 24px; - color: #707070; -} -.userimage { - align-items: right; - float: right; - text-align: right; - justify-content: right; - margin-right: 25px; -} -.roundedcircle { - margin-right: 5px; - border-radius: 50px; - height: 45px; - width: 45px; - object-fit: cover; -} -.navitems > .navlinks { - margin-top: 11px; - cursor: pointer; - margin-left: 28px; - line-height: 1rem; - font-size: 16px; - color: #707070; - z-index: 1; - flex-direction: row; - display: flex; - text-align: center; -} -.navlinks_active { - border-bottom: 3px solid #31bb6b; -} -.navitem { - text-decoration: none; - color: #707070 !important; - transition: smooth; - padding-bottom: 10px; -} -.navlinks_dropdown { - margin-top: 5px !important; - color: rgba(0, 0, 0, 0.5) !important; - border-radius: 0px; -} -.navlinks:hover, -.navlinks_dropdown:hover { - text-decoration: none; - border-bottom: 3px solid #31bb6b; -} - -.navlinks_dropdown:hover { - border-bottom: 3px solid #31bb6b; - padding-bottom: 4px; -} -/* -.navlinks.focus { - border-bottom: 3px solid #31bb6b; -} -.navitems.focus { - border-bottom: 3px solid #31bb6b; -} -:target{ - border-bottom: 3px solid #31bb6b; -} */ -.dropdowns { - text-decoration: none; - margin-bottom: 8px; -} -.dropdownMenu { - transform: scale(0.85); - cursor: pointer; - transform: translateX(-9vw) scale(0.9); -} -#dropdown-basic, -.dropdowns.btn, -.btn:focus, -.btn.focus { - box-shadow: none !important; -} - -.dropdowntoggle { - display: flex !important; - align-items: center !important; - margin-top: 10px; - margin-left: 15px; -} - -.dropdownitem i { - margin-right: 8px; -} - -.languageDropdown { - margin-left: 11px; -} - -@media screen and (max-width: 1024px) { - .logo > strong { - display: none; - } - .navitems { - margin-left: 20px; - } - .navitems > a { - margin-right: 20px; - } -} -.sidebar { - z-index: 0; - padding-top: 50px; - position: fixed; - min-width: 160px; - width: 10%; - background-color: #f7f7f7; - margin: 0; - height: 100%; -} -.sidebarsticky { - padding-top: 40%; -} -/* .notificationIcon { - position: relative; - top: 12px; - right: 14px; -} */ -.notificationList:hover { - background-color: #dfe2e4; - cursor: pointer; -} - -@media screen and (max-width: 768px) { - .sidebar { - width: 15%; - } -} -@media screen and (max-width: 680px) { - body { - overflow-x: hidden; - } - .logo { - margin-left: 0%; - } -} - -@media screen and (max-width: 1199px) { - /* .navbarbg { - height: auto; - } */ - .navitems > .navlinks { - margin-left: 0; - } - .dropdowntoggle { - margin-left: -12px; - } - .dropdownMenu { - transform: translateX(0px) scale(0.9); - } - .notificationIcon { - top: 0px; - right: -8px; - } -} - -.navbarBrandLogo { - padding: 0; -} - -.allOrgBtn { - margin: 0 10px; - background-color: #31bb6b; - padding: 5px 10px; - color: white; - border-radius: 10px; - font-weight: 600; - white-space: nowrap; - display: flex; - justify-content: center; - margin: auto; - min-width: 10rem; - max-width: 30%; -} - -.allOrgBtn:hover { - color: #fff; - background-color: #1e7e34; - border-color: #1c7430; -} - -.navitems > .navlinks { - justify-content: center; -} - -.dropdowns { - display: flex; - justify-content: center; -} - -/* .dropdowns, -#dropdown-basic::after { - content: none; -} */ - -.dropdown-toggle:after { - display: none; -} - -.dropdowns, -.navbar-toggler-icon { - margin-top: 0.2rem; - margin-right: 58px; -} diff --git a/src/components/AdminNavbar/AdminNavbar.test.tsx b/src/components/AdminNavbar/AdminNavbar.test.tsx deleted file mode 100644 index 4a034d92f0..0000000000 --- a/src/components/AdminNavbar/AdminNavbar.test.tsx +++ /dev/null @@ -1,212 +0,0 @@ -// eslint-disable-next-line @typescript-eslint/no-unused-vars -import React from 'react'; -import { MockedProvider } from '@apollo/react-testing'; -import { act, fireEvent, render, screen } from '@testing-library/react'; -import userEvent from '@testing-library/user-event'; -import 'jest-localstorage-mock'; -import 'jest-location-mock'; -import { I18nextProvider } from 'react-i18next'; -import { Provider } from 'react-redux'; -import { BrowserRouter } from 'react-router-dom'; - -import { store } from 'state/store'; -import { StaticMockLink } from 'utils/StaticMockLink'; -import i18nForTest from 'utils/i18nForTest'; -import AdminNavbar from './AdminNavbar'; -import { MOCKS } from './AdminNavbarMocks'; -const link1 = new StaticMockLink(MOCKS, true); -async function wait(ms = 100): Promise { - await act(() => { - return new Promise((resolve) => { - setTimeout(resolve, ms); - }); - }); -} - -describe('Testing Admin Navbar', () => { - // eslint-disable-next-line jest/expect-expect - - const targets = [ - { - name: 'Dashboard', - comp_id: 'orgdash', - component: 'OrganizationDashboard', - }, - { name: 'Posts', comp_id: 'orgpost', component: 'OrgPost' }, - { name: 'People', comp_id: 'orgpeople', component: 'OrganizationPeople' }, - { name: 'Events', comp_id: 'orgevents', component: 'OrganizationEvents' }, - { name: 'Block/Unblock', comp_id: 'blockuser', component: 'BlockUser' }, - { - name: 'Contributions', - comp_id: 'orgcontribution', - component: 'OrgContribution', - }, - { - name: 'Plugins', - comp_id: 'plugin', - component: 'AddOnStore', - subTargets: [ - { - name: 'Plugin Store', - comp_id: 'orgstore', - url: '/plugin', - component: 'AddOnStore', - icon: 'fa-store', - }, - ], - }, - ]; - - const props = { - targets, - url_1: 'string', - }; - - test('should render following text elements', async () => { - render( - - - - - - - - - - ); - - await wait(); - - fireEvent.click(screen.getByText('Plugins')); - fireEvent.click(screen.getByTestId('logoutDropdown')); - - expect(screen.getByText('Dashboard')).toBeInTheDocument(); - expect(screen.getByText('Posts')).toBeInTheDocument(); - expect(screen.getByText('People')).toBeInTheDocument(); - expect(screen.getByText('Events')).toBeInTheDocument(); - expect(screen.getByText('Contributions')).toBeInTheDocument(); - expect(screen.getByText('Plugins')).toBeInTheDocument(); - expect(screen.getByTestId('dropdownIcon')).toBeTruthy(); - expect(screen.getByText('Plugin Store')).toBeInTheDocument(); - expect(screen.getByTestId('logoutDropdown')).toBeTruthy(); - expect(screen.getByText('Settings')).toBeInTheDocument(); - expect(screen.getByText('Logout')).toBeInTheDocument(); - - userEvent.click(screen.getByText('Logout')); - }); - - test('Testing the notification functionality', async () => { - render( - - - - - - - - - - ); - - await wait(); - }); - - test('Testing, if spam id is present in local storage', async () => { - localStorage.setItem('spamId', '6954'); - - render( - - - - - - - - - - ); - - await wait(); - }); - - test('Testing, if no mock data provided', async () => { - window.location.assign('/orglist'); - - render( - - - - - - - - - - ); - - await wait(); - expect(window.location).toBeAt('/orglist'); - }); - - test('Testing change language functionality', async () => { - render( - - - - - - - - - - ); - - await wait(); - - userEvent.click(screen.getByTestId('logoutDropdown')); - userEvent.click(screen.getByTestId('languageDropdown')); - userEvent.click(screen.getByTestId('changeLanguageBtn1')); - userEvent.click(screen.getByTestId('changeLanguageBtn2')); - userEvent.click(screen.getByTestId('changeLanguageBtn3')); - userEvent.click(screen.getByTestId('changeLanguageBtn4')); - }); - - test('Testing when language cookie is not set', async () => { - Object.defineProperty(window.document, 'cookie', { - writable: true, - value: 'i18next=', - }); - - render( - - - - - - - - - - ); - - await wait(); - }); - test('Should check if organisation image is not present', async () => { - const { container } = render( - - - - - - - - - - ); - - expect(container.textContent).not.toBe('Loading data...'); - await wait(); - const imageLogo = screen.getByTestId(/orgLogoAbsent/i); - expect(imageLogo).toBeInTheDocument(); - }); -}); diff --git a/src/components/AdminNavbar/AdminNavbar.tsx b/src/components/AdminNavbar/AdminNavbar.tsx deleted file mode 100644 index 2a6ac7c78b..0000000000 --- a/src/components/AdminNavbar/AdminNavbar.tsx +++ /dev/null @@ -1,193 +0,0 @@ -import React from 'react'; -import Navbar from 'react-bootstrap/Navbar'; -import Dropdown from 'react-bootstrap/Dropdown'; -import Button from 'react-bootstrap/Button'; -import { Nav } from 'react-bootstrap'; -import { Link, NavLink } from 'react-router-dom'; -import { useQuery } from '@apollo/client'; -import { useTranslation } from 'react-i18next'; -import Cookies from 'js-cookie'; -import i18next from 'i18next'; -import MenuIcon from '@mui/icons-material/Menu'; -import styles from './AdminNavbar.module.css'; -import AboutImg from 'assets/images/defaultImg.png'; -import { - ORGANIZATIONS_LIST, - USER_ORGANIZATION_LIST, -} from 'GraphQl/Queries/Queries'; -import { languages } from 'utils/languages'; - -interface InterfaceNavbarProps { - targets: { - url?: string; - name: string; - subTargets?: { - url: string; - name: string; - icon?: string; - }[]; - }[]; - url1: string; -} - -function adminNavbar({ targets, url1 }: InterfaceNavbarProps): JSX.Element { - const { t } = useTranslation('translation', { keyPrefix: 'adminNavbar' }); - const currentUrl = window.location.href.split('=')[1]; - - const { data: orgData, error: orgError } = useQuery(ORGANIZATIONS_LIST, { - variables: { id: currentUrl }, - }); - - const { data: data2 } = useQuery(USER_ORGANIZATION_LIST, { - variables: { id: localStorage.getItem('id') }, - }); - - const isSuperAdmin = data2?.user.userType === 'SUPERADMIN'; - const currentLanguageCode = Cookies.get('i18next') || 'en'; - - /* istanbul ignore next */ - if (orgError) { - window.location.replace('/orglist'); - } - - let orgName; - if (orgData) { - orgName = orgData?.organizations[0].name; - } - - return ( - <> - - -
- {orgData?.organizations[0].image ? ( - - ) : ( - - )} - {orgName} -
-
- - - - - {isSuperAdmin ? t('allOrganizations') : t('yourOrganization')} - - - -
- - ); -} - -export default adminNavbar; diff --git a/src/components/AdminNavbar/AdminNavbarMocks.ts b/src/components/AdminNavbar/AdminNavbarMocks.ts deleted file mode 100644 index 1717807ddc..0000000000 --- a/src/components/AdminNavbar/AdminNavbarMocks.ts +++ /dev/null @@ -1,145 +0,0 @@ -import { ORGANIZATIONS_LIST } from 'GraphQl/Queries/Queries'; - -// Has no placeholder image -export const MOCKS = [ - { - request: { - query: ORGANIZATIONS_LIST, - }, - result: { - data: { - organizations: [ - { - _id: 1, - image: '', - name: 'Dummy Organization', - description: 'This is a Dummy Organization', - creator: { - firstName: '', - lastName: '', - email: '', - }, - location: 'New Delhi', - apiUrl: 'www.dummyWebsite.com', - members: { - _id: '123', - firstName: 'John', - lastName: 'Doe', - email: 'johndoe@gmail.com', - }, - admins: { - _id: '123', - firstName: 'John', - lastName: 'Doe', - email: 'johndoe@gmail.com', - }, - membershipRequests: { - _id: '456', - user: { - firstName: 'Sam', - lastName: 'Smith', - email: 'samsmith@gmail.com', - }, - }, - blockedUsers: { - _id: '789', - firstName: 'Steve', - lastName: 'Smith', - email: 'stevesmith@gmail.com', - }, - isPublic: true, - visibleInSearch: false, - spamCount: [ - { - _id: '6954', - user: { - _id: '878', - firstName: 'Joe', - lastName: 'Root', - email: 'joeroot@gmail.com', - }, - isReaded: false, - groupchat: { - _id: '321', - title: 'Dummy', - }, - }, - ], - }, - ], - }, - }, - }, -]; - -// Has a placeholder image -export const MOCKS_WITH_IMAGE = [ - { - request: { - query: ORGANIZATIONS_LIST, - }, - result: { - data: { - organizations: [ - { - _id: 1, - image: 'https://via.placeholder.com/45x45', - name: 'Dummy Organization', - description: 'This is a Dummy Organization', - creator: { - firstName: '', - lastName: '', - email: '', - }, - location: 'New Delhi', - apiUrl: 'www.dummyWebsite.com', - members: { - _id: '123', - firstName: 'John', - lastName: 'Doe', - email: 'johndoe@gmail.com', - }, - admins: { - _id: '123', - firstName: 'John', - lastName: 'Doe', - email: 'johndoe@gmail.com', - }, - membershipRequests: { - _id: '456', - user: { - firstName: 'Sam', - lastName: 'Smith', - email: 'samsmith@gmail.com', - }, - }, - blockedUsers: { - _id: '789', - firstName: 'Steve', - lastName: 'Smith', - email: 'stevesmith@gmail.com', - }, - isPublic: true, - visibleInSearch: false, - spamCount: [ - { - _id: '6954', - user: { - _id: '878', - firstName: 'Joe', - lastName: 'Root', - email: 'joeroot@gmail.com', - }, - isReaded: false, - groupchat: { - _id: '321', - title: 'Dummy', - }, - }, - ], - }, - ], - }, - }, - }, -]; diff --git a/src/components/ChangeLanguageDropdown/ChangeLanguageDropdown.test.tsx b/src/components/ChangeLanguageDropdown/ChangeLanguageDropdown.test.tsx index fb2921bf31..79209107fa 100644 --- a/src/components/ChangeLanguageDropdown/ChangeLanguageDropdown.test.tsx +++ b/src/components/ChangeLanguageDropdown/ChangeLanguageDropdown.test.tsx @@ -1,8 +1,6 @@ import React from 'react'; import { act, render } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import 'jest-localstorage-mock'; -import 'jest-location-mock'; import { I18nextProvider } from 'react-i18next'; import { BrowserRouter } from 'react-router-dom'; import i18nForTest from 'utils/i18nForTest'; diff --git a/src/components/CheckIn/CheckInModal.tsx b/src/components/CheckIn/CheckInModal.tsx index 280e213675..a370ebbb7e 100644 --- a/src/components/CheckIn/CheckInModal.tsx +++ b/src/components/CheckIn/CheckInModal.tsx @@ -9,7 +9,7 @@ import type { InterfaceModalProp, InterfaceTableData, } from './types'; -import type { GridColDef } from '@mui/x-data-grid'; +import type { GridColDef, GridRowHeightReturnValue } from '@mui/x-data-grid'; import { DataGrid } from '@mui/x-data-grid'; import TextField from '@mui/material/TextField'; @@ -90,7 +90,7 @@ export const CheckInModal = (props: InterfaceModalProp): JSX.Element => { label="Search Attendees" variant="outlined" value={userFilterQuery} - onChange={(e) => { + onChange={(e): void => { setUserFilterQuery(e.target.value); setFilterQueryModel({ items: [ @@ -108,7 +108,7 @@ export const CheckInModal = (props: InterfaceModalProp): JSX.Element => {
'auto'} + getRowHeight={(): GridRowHeightReturnValue => 'auto'} columns={columns} filterModel={filterQueryModel} /> diff --git a/src/components/CheckIn/CheckInWrapper.tsx b/src/components/CheckIn/CheckInWrapper.tsx index 132e7a02b1..a1dae1da42 100644 --- a/src/components/CheckIn/CheckInWrapper.tsx +++ b/src/components/CheckIn/CheckInWrapper.tsx @@ -16,7 +16,7 @@ export const CheckInWrapper = (props: PropType): JSX.Element => { className="mt-3" variant="success" aria-label="checkInAttendees" - onClick={() => { + onClick={(): void => { setShowModal(true); }} > @@ -25,7 +25,7 @@ export const CheckInWrapper = (props: PropType): JSX.Element => { {showModal && ( setShowModal(false)} + handleClose={(): void => setShowModal(false)} eventId={props.eventId} /> )} diff --git a/src/components/CollapsibleDropdown/CollapsibleDropdown.module.css b/src/components/CollapsibleDropdown/CollapsibleDropdown.module.css new file mode 100644 index 0000000000..4337742ecc --- /dev/null +++ b/src/components/CollapsibleDropdown/CollapsibleDropdown.module.css @@ -0,0 +1,14 @@ +.iconWrapper { + width: 36px; +} + +.collapseBtn { + height: 48px; +} + +.iconWrapperSm { + width: 36px; + display: flex; + justify-content: center; + align-items: center; +} diff --git a/src/components/CollapsibleDropdown/CollapsibleDropdown.test.tsx b/src/components/CollapsibleDropdown/CollapsibleDropdown.test.tsx new file mode 100644 index 0000000000..4f1916669a --- /dev/null +++ b/src/components/CollapsibleDropdown/CollapsibleDropdown.test.tsx @@ -0,0 +1,77 @@ +import React from 'react'; +import { render, screen } from '@testing-library/react'; +import { BrowserRouter } from 'react-router-dom'; + +import CollapsibleDropdown from './CollapsibleDropdown'; +import type { InterfaceCollapsibleDropdown } from './CollapsibleDropdown'; + +const props: InterfaceCollapsibleDropdown = { + screenName: 'SubCategory 1', + target: { + name: 'DropDown Category', + url: undefined, + subTargets: [ + { + name: 'SubCategory 1', + url: '/sub-category-1', + icon: 'fa fa-home', + }, + { + name: 'SubCategory 2', + url: '/sub-category-2', + icon: 'fa fa-home', + }, + ], + }, +}; + +describe('Testing CollapsibleDropdown component', () => { + test('Component should be rendered properly', () => { + render(); + expect(screen.getByText('DropDown Category')).toBeInTheDocument(); + expect(screen.getByText('SubCategory 1')).toBeInTheDocument(); + expect(screen.getByText('SubCategory 2')).toBeInTheDocument(); + }); + + test('Dropdown should be rendered and functioning correctly', () => { + render( + + + + ); + const parentDropdownBtn = screen.getByTestId('collapsible-dropdown'); + const activeDropdownBtn = screen.getByText('SubCategory 1'); + const nonActiveDropdownBtn = screen.getByText('SubCategory 2'); + + // Check if dropdown is rendered with correct classes + expect(parentDropdownBtn).toBeInTheDocument(); + expect(parentDropdownBtn).toHaveClass('text-white'); + expect(parentDropdownBtn).toHaveClass('btn-success'); + + // Check if active dropdown is rendered with correct classes + expect(activeDropdownBtn).toBeInTheDocument(); + expect(activeDropdownBtn).toHaveClass('text-white'); + expect(activeDropdownBtn).toHaveClass('btn-success'); + + // Check if inactive dropdown is rendered with correct classes + expect(nonActiveDropdownBtn).toBeInTheDocument(); + expect(nonActiveDropdownBtn).toHaveClass('text-secondary'); + expect(nonActiveDropdownBtn).toHaveClass('btn-light'); + + // Check if dropdown is expanded by default since the screenName prop passes + // the same value as the name prop of the subTarget + expect(parentDropdownBtn).toHaveAttribute('aria-expanded', 'true'); + + // Check if dropdown is collapsed after clicking on it + parentDropdownBtn.click(); + expect(parentDropdownBtn).toHaveAttribute('aria-expanded', 'false'); + + // Check if dropdown is expanded after clicking on it again + parentDropdownBtn.click(); + expect(parentDropdownBtn).toHaveAttribute('aria-expanded', 'true'); + + // Click on non active dropdown button and check if it navigates to the correct url + nonActiveDropdownBtn.click(); + expect(window.location.pathname).toBe('/sub-category-2'); + }); +}); diff --git a/src/components/CollapsibleDropdown/CollapsibleDropdown.tsx b/src/components/CollapsibleDropdown/CollapsibleDropdown.tsx new file mode 100644 index 0000000000..81b82e220d --- /dev/null +++ b/src/components/CollapsibleDropdown/CollapsibleDropdown.tsx @@ -0,0 +1,91 @@ +import React, { useEffect } from 'react'; +import { Button, Collapse } from 'react-bootstrap'; +import type { TargetsType } from 'state/reducers/routesReducer'; +import styles from './CollapsibleDropdown.module.css'; +import IconComponent from 'components/IconComponent/IconComponent'; +import { useHistory } from 'react-router-dom'; + +export interface InterfaceCollapsibleDropdown { + screenName: string; + target: TargetsType; +} + +const collapsibleDropdown = ({ + screenName, + target, +}: InterfaceCollapsibleDropdown): JSX.Element => { + const [showDropdown, setShowDropdown] = React.useState(false); + const [active, setActive] = React.useState(false); + const { name, subTargets } = target; + const history = useHistory(); + + useEffect(() => { + target.subTargets?.map(({ name }) => { + if (name === screenName) { + setActive(true); + setShowDropdown(true); + } + }); + }, [target.subTargets]); + + return ( + <> + + +
+ {subTargets && + subTargets.map(({ name, icon: stringIcon, url }, index) => { + return ( + + ); + })} +
+
+ + ); +}; + +export default collapsibleDropdown; diff --git a/src/components/EventListCard/EventListCard.tsx b/src/components/EventListCard/EventListCard.tsx index bee2558a88..7f817890de 100644 --- a/src/components/EventListCard/EventListCard.tsx +++ b/src/components/EventListCard/EventListCard.tsx @@ -12,6 +12,7 @@ import { } from 'GraphQl/Mutations/mutations'; import { Form } from 'react-bootstrap'; import { errorHandler } from 'utils/errorHandler'; +import { useHistory } from 'react-router-dom'; interface InterfaceEventListCardProps { key: string; @@ -37,6 +38,7 @@ function eventListCard(props: InterfaceEventListCardProps): JSX.Element { const [recurringchecked, setRecurringChecked] = useState(false); const [publicchecked, setPublicChecked] = useState(true); const [registrablechecked, setRegistrableChecked] = React.useState(false); + const history = useHistory(); const [formState, setFormState] = useState({ title: '', eventdescrip: '', @@ -125,7 +127,7 @@ function eventListCard(props: InterfaceEventListCardProps): JSX.Element { }; const openEventDashboard = (): void => { - window.location.assign(`/event/${props.id}`); + history.push(`/event/${props.id}`); }; return ( diff --git a/src/components/EventProjectModals/AddEventProjectModal.tsx b/src/components/EventProjectModals/AddEventProjectModal.tsx index b33faeb4a7..3da5043c51 100644 --- a/src/components/EventProjectModals/AddEventProjectModal.tsx +++ b/src/components/EventProjectModals/AddEventProjectModal.tsx @@ -74,7 +74,7 @@ export const AddEventProjectModal = ({ required placeholder="Enter title of the project" value={title} - onChange={(e) => setTitle(e.target.value)} + onChange={(e): void => setTitle(e.target.value)} /> @@ -86,7 +86,7 @@ export const AddEventProjectModal = ({ className="mb-3" required value={description} - onChange={(e) => setDescription(e.target.value)} + onChange={(e): void => setDescription(e.target.value)} /> diff --git a/src/components/EventProjectModals/UpdateEventProjectModal.tsx b/src/components/EventProjectModals/UpdateEventProjectModal.tsx index e2b98b6f6a..362d78645a 100644 --- a/src/components/EventProjectModals/UpdateEventProjectModal.tsx +++ b/src/components/EventProjectModals/UpdateEventProjectModal.tsx @@ -80,7 +80,7 @@ export const UpdateEventProjectModal = (props: ModalPropType): JSX.Element => { className="mb-3" placeholder="Enter title of the project" value={title} - onChange={(e) => setTitle(e.target.value)} + onChange={(e): void => setTitle(e.target.value)} /> @@ -91,7 +91,7 @@ export const UpdateEventProjectModal = (props: ModalPropType): JSX.Element => { className="mb-3" placeholder="A brief desciption of what the event is about!" value={description} - onChange={(e) => setDescription(e.target.value)} + onChange={(e): void => setDescription(e.target.value)} /> diff --git a/src/components/EventRegistrantsModal/EventRegistrantsModal.tsx b/src/components/EventRegistrantsModal/EventRegistrantsModal.tsx index 850d50e109..a75c9d942d 100644 --- a/src/components/EventRegistrantsModal/EventRegistrantsModal.tsx +++ b/src/components/EventRegistrantsModal/EventRegistrantsModal.tsx @@ -120,7 +120,7 @@ export const EventRegistrantsModal = (props: ModalPropType): JSX.Element => { label={`${attendee.firstName} ${attendee.lastName}`} variant="outlined" key={attendee._id} - onDelete={() => deleteRegistrant(attendee._id)} + onDelete={(): void => deleteRegistrant(attendee._id)} /> ))} @@ -128,14 +128,14 @@ export const EventRegistrantsModal = (props: ModalPropType): JSX.Element => { { + onChange={(_, newMember): void => { setMember(newMember); }} options={memberData.organizations[0].members} - getOptionLabel={(member: InterfaceUser) => + getOptionLabel={(member: InterfaceUser): string => `${member.firstName} ${member.lastName}` } - renderInput={(params) => ( + renderInput={(params): React.ReactNode => ( { className="mt-3" variant="success" aria-label="showAttendees" - onClick={() => { + onClick={(): void => { setShowModal(true); }} > @@ -26,7 +26,7 @@ export const EventRegistrantsWrapper = (props: PropType): JSX.Element => { {showModal ? ( { + handleClose={(): void => { setShowModal(false); }} eventId={props.eventId} diff --git a/src/components/IconComponent/IconComponent.test.tsx b/src/components/IconComponent/IconComponent.test.tsx new file mode 100644 index 0000000000..766a6576b8 --- /dev/null +++ b/src/components/IconComponent/IconComponent.test.tsx @@ -0,0 +1,99 @@ +import React from 'react'; +import { render, screen } from '@testing-library/react'; +import IconComponent from './IconComponent'; + +const screenTestIdMap = { + Dashboard: { + name: 'Dashboard', + testId: 'Icon-Component-DashboardIcon', + }, + People: { + name: 'People', + testId: 'Icon-Component-PeopleIcon', + }, + Events: { + name: 'Events', + testId: 'Icon-Component-EventsIcon', + }, + Posts: { + name: 'Posts', + testId: 'Icon-Component-PostsIcon', + }, + BlockUnblock: { + name: 'Block/Unblock', + testId: 'Block/Icon-Component-UnblockIcon', + }, + Plugins: { + name: 'Plugins', + testId: 'Icon-Component-PluginsIcon', + }, + Settings: { + name: 'Settings', + testId: 'Icon-Component-SettingsIcon', + }, + AllOrganizations: { + name: 'All Organizations', + testId: 'Icon-Component-AllOrganizationsIcon', + }, + default: { + name: 'default', + testId: 'Icon-Component-DefaultIcon', + }, +}; + +describe('Testing CollapsibleDropdown component', () => { + it('renders the Dashboard icon', () => { + render(); + expect( + screen.getByTestId(`${screenTestIdMap.Dashboard.testId}`) + ).toBeInTheDocument(); + }); + it('renders the People icon', () => { + render(); + expect( + screen.getByTestId(`${screenTestIdMap.People.testId}`) + ).toBeInTheDocument(); + }); + it('renders the Events icon', () => { + render(); + expect( + screen.getByTestId(`${screenTestIdMap.Events.testId}`) + ).toBeInTheDocument(); + }); + it('renders the Posts icon', () => { + render(); + expect( + screen.getByTestId(`${screenTestIdMap.Posts.testId}`) + ).toBeInTheDocument(); + }); + it('renders the Block/Unblock icon', () => { + render(); + expect( + screen.getByTestId(`${screenTestIdMap.BlockUnblock.testId}`) + ).toBeInTheDocument(); + }); + it('renders the Plugins icon', () => { + render(); + expect( + screen.getByTestId(`${screenTestIdMap.Plugins.testId}`) + ).toBeInTheDocument(); + }); + it('renders the Settings icon', () => { + render(); + expect( + screen.getByTestId(`${screenTestIdMap.Settings.testId}`) + ).toBeInTheDocument(); + }); + it('renders the All Organizations icon', () => { + render(); + expect( + screen.getByTestId(`${screenTestIdMap.AllOrganizations.testId}`) + ).toBeInTheDocument(); + }); + it('renders the default icon', () => { + render(); + expect( + screen.getByTestId(`${screenTestIdMap.default.testId}`) + ).toBeInTheDocument(); + }); +}); diff --git a/src/components/IconComponent/IconComponent.tsx b/src/components/IconComponent/IconComponent.tsx new file mode 100644 index 0000000000..5bbbf44334 --- /dev/null +++ b/src/components/IconComponent/IconComponent.tsx @@ -0,0 +1,69 @@ +import React from 'react'; +import { QuestionMarkOutlined } from '@mui/icons-material'; +import { ReactComponent as BlockUserIcon } from '../../assets/svgs/icons/blockUser.svg'; +import { ReactComponent as DashboardIcon } from '../../assets/svgs/icons/dashboard.svg'; +import { ReactComponent as EventsIcon } from '../../assets/svgs/icons/events.svg'; +import { ReactComponent as OrganizationsIcon } from '../../assets/svgs/icons/organizations.svg'; +import { ReactComponent as PeopleIcon } from '../../assets/svgs/icons/people.svg'; +import { ReactComponent as PluginsIcon } from '../../assets/svgs/icons/plugins.svg'; +import { ReactComponent as PostsIcon } from '../../assets/svgs/icons/posts.svg'; +import { ReactComponent as SettingsIcon } from '../../assets/svgs/icons/settings.svg'; + +export interface InterfaceIconComponent { + name: string; + fill?: string; + height?: string; + width?: string; +} + +const iconComponent = (props: InterfaceIconComponent): JSX.Element => { + switch (props.name) { + case 'Dashboard': + return ( + + ); + case 'People': + return ; + case 'Events': + return ; + case 'Posts': + return ; + case 'Block/Unblock': + return ( + + ); + case 'Plugins': + return ( + + ); + case 'Settings': + return ( + + ); + case 'All Organizations': + return ( + + ); + default: + return ( + + ); + } +}; + +export default iconComponent; diff --git a/src/components/LeftDrawer/LeftDrawer.module.css b/src/components/LeftDrawer/LeftDrawer.module.css index 379633fa5a..6818dc05fb 100644 --- a/src/components/LeftDrawer/LeftDrawer.module.css +++ b/src/components/LeftDrawer/LeftDrawer.module.css @@ -54,6 +54,7 @@ text-align: start; margin-bottom: 0.8rem; border-radius: 8px; + border: 1px solid var(--bs-gray-200); } .leftDrawer .optionList button .iconWrapper { @@ -112,6 +113,10 @@ /* For tablets */ @media (max-width: 820px) { + .hideElemByDefault { + display: none; + } + .leftDrawer { width: 100%; left: 0; diff --git a/src/components/LeftDrawer/LeftDrawer.test.tsx b/src/components/LeftDrawer/LeftDrawer.test.tsx index b6bbcd5755..2a64d72f95 100644 --- a/src/components/LeftDrawer/LeftDrawer.test.tsx +++ b/src/components/LeftDrawer/LeftDrawer.test.tsx @@ -11,46 +11,8 @@ import type { InterfaceLeftDrawerProps } from './LeftDrawer'; import LeftDrawer from './LeftDrawer'; const props = { - data: { - user: { - firstName: 'John', - lastName: 'Doe', - image: null, - email: 'johndoe@gmail.com', - userType: 'SUPERADMIN', - adminFor: [ - { - _id: '123', - name: 'Palisadoes', - image: null, - }, - ], - }, - }, - showDrawer: true, - setShowDrawer: jest.fn(), -}; - -const propsAdmin: InterfaceLeftDrawerProps = { - data: { - user: { - firstName: 'John', - lastName: 'Doe', - image: `https://api.dicebear.com/5.x/initials/svg?seed=John%20Doe`, - email: 'johndoe@gmail.com', - userType: 'ADMIN', - adminFor: [ - { - _id: '123', - name: 'Palisadoes', - image: null, - }, - ], - }, - }, - screenName: 'Organizations', - showDrawer: true, - setShowDrawer: jest.fn(), + hideDrawer: true, + setHideDrawer: jest.fn(), }; const propsOrg: InterfaceLeftDrawerProps = { @@ -59,12 +21,13 @@ const propsOrg: InterfaceLeftDrawerProps = { }; const propsReq: InterfaceLeftDrawerProps = { ...props, + hideDrawer: false, screenName: 'Requests', }; -const propsRoles: InterfaceLeftDrawerProps = { +const propsUsers: InterfaceLeftDrawerProps = { ...props, - screenName: 'Roles', - showDrawer: false, + hideDrawer: null, + screenName: 'Users', }; jest.mock('react-toastify', () => ({ @@ -75,6 +38,15 @@ jest.mock('react-toastify', () => ({ }, })); +beforeEach(() => { + localStorage.setItem('FirstName', 'John'); + localStorage.setItem('LastName', 'Doe'); + localStorage.setItem( + 'UserImage', + 'https://api.dicebear.com/5.x/initials/svg?seed=John%20Doe' + ); +}); + afterEach(() => { jest.clearAllMocks(); localStorage.clear(); @@ -82,6 +54,7 @@ afterEach(() => { describe('Testing Left Drawer component for SUPERADMIN', () => { test('Component should be rendered properly', () => { + localStorage.setItem('UserImage', ''); localStorage.setItem('UserType', 'SUPERADMIN'); render( @@ -93,7 +66,7 @@ describe('Testing Left Drawer component for SUPERADMIN', () => { expect(screen.getByText('Organizations')).toBeInTheDocument(); expect(screen.getByText('Requests')).toBeInTheDocument(); - expect(screen.getByText('Roles')).toBeInTheDocument(); + expect(screen.getByText('Users')).toBeInTheDocument(); expect(screen.getByText('Talawa Admin Portal')).toBeInTheDocument(); expect(screen.getByText(/John Doe/i)).toBeInTheDocument(); @@ -120,24 +93,7 @@ describe('Testing Left Drawer component for SUPERADMIN', () => { // Send to roles screen userEvent.click(rolesBtn); - expect(global.window.location.pathname).toContain('/roles'); - }); - - test('Testing when user data is undefined', () => { - localStorage.setItem('UserType', 'SUPERADMIN'); - const userUndefinedProps = { - ...props, - data: undefined, - screenName: 'Organizations', - }; - render( - - - - - - ); - expect(screen.getByTestId(/loadingProfile/i)).toBeInTheDocument(); + expect(global.window.location.pathname).toContain('/users'); }); test('Testing in requests screen', () => { @@ -174,7 +130,7 @@ describe('Testing Left Drawer component for SUPERADMIN', () => { render( - + ); @@ -211,7 +167,30 @@ describe('Testing Left Drawer component for SUPERADMIN', () => { userEvent.click(closeModalBtn); }); + test('Testing Drawer when hideDrawer is null', () => { + localStorage.setItem('UserType', 'SUPERADMIN'); + render( + + + + + + ); + }); + + test('Testing Drawer when hideDrawer is true', () => { + localStorage.setItem('UserType', 'SUPERADMIN'); + render( + + + + + + ); + }); + test('Testing logout functionality', async () => { + localStorage.setItem('UserType', 'SUPERADMIN'); render( @@ -219,8 +198,9 @@ describe('Testing Left Drawer component for SUPERADMIN', () => { ); - userEvent.click(screen.getByTestId('logoutBtn')); + expect(localStorage.clear).toHaveBeenCalled(); + expect(global.window.location.pathname).toBe('/'); }); }); @@ -230,7 +210,7 @@ describe('Testing Left Drawer component for ADMIN', () => { render( - + ); diff --git a/src/components/LeftDrawer/LeftDrawer.tsx b/src/components/LeftDrawer/LeftDrawer.tsx index f2f750ec85..87e37097e7 100644 --- a/src/components/LeftDrawer/LeftDrawer.tsx +++ b/src/components/LeftDrawer/LeftDrawer.tsx @@ -1,6 +1,8 @@ import React from 'react'; import Button from 'react-bootstrap/Button'; -import type { InterfaceUserType } from 'utils/interfaces'; +import { useTranslation } from 'react-i18next'; +import { useHistory } from 'react-router-dom'; +import { toast } from 'react-toastify'; import { ReactComponent as AngleRightIcon } from '../../assets/svgs/icons/angleRight.svg'; import { ReactComponent as LogoutIcon } from '../../assets/svgs/icons/logout.svg'; import { ReactComponent as OrganizationsIcon } from '../../assets/svgs/icons/organizations.svg'; @@ -8,26 +10,24 @@ import { ReactComponent as RequestsIcon } from '../../assets/svgs/icons/requests import { ReactComponent as RolesIcon } from '../../assets/svgs/icons/roles.svg'; import { ReactComponent as TalawaLogo } from '../../assets/svgs/talawa.svg'; import styles from './LeftDrawer.module.css'; -import { toast } from 'react-toastify'; -import { useHistory } from 'react-router-dom'; -import { useTranslation } from 'react-i18next'; export interface InterfaceLeftDrawerProps { - data: InterfaceUserType | undefined; - showDrawer: boolean; - setShowDrawer: React.Dispatch>; + hideDrawer: boolean | null; + setHideDrawer: React.Dispatch>; screenName: string; } const leftDrawer = ({ - data, screenName, - showDrawer, - setShowDrawer, + hideDrawer, + setHideDrawer, }: InterfaceLeftDrawerProps): JSX.Element => { const { t } = useTranslation('translation', { keyPrefix: 'leftDrawer' }); const userType = localStorage.getItem('UserType'); + const firstName = localStorage.getItem('FirstName'); + const lastName = localStorage.getItem('LastName'); + const userImage = localStorage.getItem('UserImage'); const history = useHistory(); @@ -40,7 +40,11 @@ const leftDrawer = ({ <>
@@ -48,7 +52,7 @@ const leftDrawer = ({ variant="danger" className={styles.closeModalBtn} onClick={(): void => { - setShowDrawer(!showDrawer); + setHideDrawer(false); }} data-testid="closeModalBtn" > @@ -104,63 +108,56 @@ const leftDrawer = ({ )} {userType === 'SUPERADMIN' && ( )}
- {data === undefined ? ( -
- ) : ( - - )} + + + {/* Branding Section */} +
+ + {t('talawaAdminPortal')} +
+ + {/* Organization Section */} +
+ {loading ? ( + <> + + + ) : ( + + )} +
+ + {/* Options List */} +
+
{t('menu')}
+ {targets.map(({ name, url }, index) => { + return url ? ( + + ) : ( + + ); + })} +
+ + {/* Profile Section & Logout Btn */} +
+ + +
+
+ + ); +}; + +export default leftDrawerOrg; diff --git a/src/components/ListNavbar/ListNavbar.module.css b/src/components/ListNavbar/ListNavbar.module.css deleted file mode 100644 index 091f6164a1..0000000000 --- a/src/components/ListNavbar/ListNavbar.module.css +++ /dev/null @@ -1,134 +0,0 @@ -.navbarbgOrglist { - position: relative !important; - padding: 0 1rem; - background-color: white; - display: flex; - margin-bottom: 30px; - z-index: 1; - position: relative; - flex-direction: row; - justify-content: space-between !important; - box-shadow: 0px 0px 8px 2px #c8c8c8; - position: fixed; - top: 0; - right: 0; - left: 0; - z-index: 1030; -} - -.navbarBrand { - padding-top: 0; - padding-bottom: 0; -} - -.titlemodal .logo { - color: #707070; - margin-left: 0; - display: flex; - align-items: center; - text-decoration: none !important; -} - -.logo img { - margin-top: 0px; - margin-left: 10px; - height: 64px; - width: 70px; -} - -.logo > strong { - line-height: 1.5rem; - margin-left: -5px; - font-family: sans-serif; - font-size: 19px; - color: #707070; -} - -.navitems > .navlinks { - cursor: pointer; - margin-left: 28px; - line-height: 1rem; - font-size: 16px; - color: #707070; - z-index: 1; - flex-direction: row; - display: flex; -} -.navlinks_active { - border-bottom: 3px solid #31bb6b; -} -.navitem { - text-decoration: none; - color: #707070 !important; - transition: smooth; - padding-bottom: 10px; -} -.navlinks:hover { - text-decoration: none; - border-bottom: 3px solid #31bb6b; - font-weight: 600; -} -.languageBtn { - font-size: 20px; - margin-right: 16px; - color: #31bb6b; -} -.languageBtn:hover { - color: #31bb6b; -} -.languageBtn:focus { - color: #31bb6b; -} -.logoutbtn { - border: 1px solid #e8e5e5; - box-shadow: 0 2px 2px #e8e5e5; - border-radius: 5px; - background-color: #31bb6b; - height: 40px; - font-size: 16px; - color: white; - outline: none; - font-weight: 600; - cursor: pointer; - transition: transform 0.2s, box-shadow 0.2s; - padding: 0 20px; - margin-right: 10px; -} -.logoutbtn:hover { - color: #fff; - background-color: #1e7e34; - border-color: #1c7430; -} - -@media only screen and (max-width: 600px) { - .navbarbgOrglist { - height: auto; - } - .navitems > .navlinks { - margin-top: 11px; - margin-left: 0; - } - .logoutbtn { - margin-top: 10px; - } -} - -@media only screen and (max-width: 1200px) { - .navitems > .navlinks { - display: flex; - justify-content: center; - margin: 0; - } - - .languageBtn { - display: flex; - justify-content: center; - width: 100%; - margin-left: 1rem; - } - - .logoutbtn { - margin: 10px auto; - min-width: 10rem; - } -} diff --git a/src/components/ListNavbar/ListNavbar.test.tsx b/src/components/ListNavbar/ListNavbar.test.tsx deleted file mode 100644 index 40612db985..0000000000 --- a/src/components/ListNavbar/ListNavbar.test.tsx +++ /dev/null @@ -1,83 +0,0 @@ -import React from 'react'; -import { act, render, screen } from '@testing-library/react'; -import { I18nextProvider } from 'react-i18next'; -import userEvent from '@testing-library/user-event'; -import { BrowserRouter } from 'react-router-dom'; -import 'jest-localstorage-mock'; - -import ListNavbar from './ListNavbar'; -import i18nForTest from 'utils/i18nForTest'; - -async function wait(ms = 100): Promise { - await act(() => { - return new Promise((resolve) => { - setTimeout(resolve, ms); - }); - }); -} - -describe('Testing List navbar component', () => { - test('Component should be rendered properly', () => { - localStorage.setItem('UserType', 'SUPERADMIN'); - render( - - - - - - ); - - expect(screen.getByText('Talawa Admin Portal')).toBeInTheDocument(); - expect(screen.getByText('Roles')).toBeInTheDocument(); - expect(screen.getByText('Requests')).toBeInTheDocument(); - }); - - test('Testing change language functionality', async () => { - render( - - - - - - ); - - await wait(); - - userEvent.click(screen.getByTestId('languageDropdownBtn')); - userEvent.click(screen.getByTestId('changeLanguageBtn1')); - userEvent.click(screen.getByTestId('changeLanguageBtn2')); - userEvent.click(screen.getByTestId('changeLanguageBtn3')); - userEvent.click(screen.getByTestId('changeLanguageBtn4')); - }); - - test('Testing when language cookie is not set', async () => { - Object.defineProperty(window.document, 'cookie', { - writable: true, - value: 'i18next=', - }); - - render( - - - - - - ); - - await wait(); - }); - - test('Testing logout functionality', async () => { - window.location.assign('/'); - - render( - - - - - - ); - - userEvent.click(screen.getByTestId('logoutBtn')); - }); -}); diff --git a/src/components/ListNavbar/ListNavbar.tsx b/src/components/ListNavbar/ListNavbar.tsx deleted file mode 100644 index a4842c3b15..0000000000 --- a/src/components/ListNavbar/ListNavbar.tsx +++ /dev/null @@ -1,108 +0,0 @@ -import React from 'react'; -import { Dropdown, Nav, Navbar } from 'react-bootstrap'; -import Button from 'react-bootstrap/Button'; -import { Link, NavLink } from 'react-router-dom'; -import i18next from 'i18next'; -import Cookies from 'js-cookie'; -import { useTranslation } from 'react-i18next'; - -import styles from './ListNavbar.module.css'; -import Logo from 'assets/images/talawa-logo-200x200.png'; -import { languages } from 'utils/languages'; - -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type -const ListNavbar = () => { - const { t } = useTranslation('translation', { keyPrefix: 'listNavbar' }); - - const isSuperAdmin = localStorage.getItem('UserType') !== 'SUPERADMIN'; - - const currentLanguageCode = Cookies.get('i18next') || 'en'; - - const logout = (): void => { - localStorage.clear(); - window.location.replace('/'); - }; - - return ( - - - - - {t('talawa_portal')} - - - - - - - - - ); -}; - -export default ListNavbar; diff --git a/src/components/Loader/Loader.test.tsx b/src/components/Loader/Loader.test.tsx index 77c15667a5..c182c73f4f 100644 --- a/src/components/Loader/Loader.test.tsx +++ b/src/components/Loader/Loader.test.tsx @@ -1,6 +1,5 @@ import React from 'react'; import { render, screen } from '@testing-library/react'; -import 'jest-localstorage-mock'; import { BrowserRouter } from 'react-router-dom'; import Loader from './Loader'; diff --git a/src/components/OrgListCard/OrgListCard.module.css b/src/components/OrgListCard/OrgListCard.module.css index 355b69d732..90be5a088f 100644 --- a/src/components/OrgListCard/OrgListCard.module.css +++ b/src/components/OrgListCard/OrgListCard.module.css @@ -21,24 +21,18 @@ border-radius: 4px; } -.orgCard .innerContainer .orgImgContainer .overlayTheme { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - background-color: var(--bs-primary); - opacity: 0.12; - z-index: 0; -} - .orgCard .innerContainer .orgImgContainer img { width: 125px; height: 120px; - z-index: 1; object-fit: contain; } +.orgCard .innerContainer .orgImgContainer .emptyImg { + width: 125px; + height: 120px; + background-color: var(--bs-gray-200); +} + .orgCard .innerContainer .content { flex: 1; margin-left: 1rem; diff --git a/src/components/OrgListCard/OrgListCard.test.tsx b/src/components/OrgListCard/OrgListCard.test.tsx index fd1a7417b7..b7ba9db776 100644 --- a/src/components/OrgListCard/OrgListCard.test.tsx +++ b/src/components/OrgListCard/OrgListCard.test.tsx @@ -5,7 +5,7 @@ import { I18nextProvider } from 'react-i18next'; import i18nForTest from 'utils/i18nForTest'; import type { InterfaceOrgListCardProps } from './OrgListCard'; -import AdminDashListCard from './OrgListCard'; +import OrgListCard from './OrgListCard'; import userEvent from '@testing-library/user-event'; import { BrowserRouter } from 'react-router-dom'; @@ -40,7 +40,7 @@ describe('Testing the Super Dash List', () => { render( - + ); @@ -58,7 +58,7 @@ describe('Testing the Super Dash List', () => { render( - + ); @@ -73,17 +73,17 @@ describe('Testing the Super Dash List', () => { }; render( - + ); - expect(screen.getByAltText(/default image/i)).toBeInTheDocument(); + expect(screen.getByTestId(/emptyContainerForImage/i)).toBeInTheDocument(); }); test('Testing if user is redirected to orgDash screen', () => { render( - + ); diff --git a/src/components/OrgListCard/OrgListCard.tsx b/src/components/OrgListCard/OrgListCard.tsx index 2f87e303f1..5568c78d30 100644 --- a/src/components/OrgListCard/OrgListCard.tsx +++ b/src/components/OrgListCard/OrgListCard.tsx @@ -3,7 +3,6 @@ import Button from 'react-bootstrap/Button'; import { useTranslation } from 'react-i18next'; import styles from './OrgListCard.module.css'; import { useHistory } from 'react-router-dom'; -import AboutImg from 'assets/images/defaultImg.png'; import type { InterfaceOrgConnectionInfoType } from 'utils/interfaces'; import LocationOnIcon from '@mui/icons-material/LocationOn'; @@ -11,7 +10,7 @@ export interface InterfaceOrgListCardProps { data: InterfaceOrgConnectionInfoType; } -function superDashListCard(props: InterfaceOrgListCardProps): JSX.Element { +function orgListCard(props: InterfaceOrgListCardProps): JSX.Element { const { _id, admins, image, location, members, name } = props.data; const history = useHistory(); @@ -33,7 +32,6 @@ function superDashListCard(props: InterfaceOrgListCardProps): JSX.Element {
-
{image ? ( {`${name} ) : ( - {`default )}
@@ -69,4 +66,4 @@ function superDashListCard(props: InterfaceOrgListCardProps): JSX.Element { ); } -export default superDashListCard; +export default orgListCard; diff --git a/src/components/OrganizationScreen/OrganizationScreen.module.css b/src/components/OrganizationScreen/OrganizationScreen.module.css new file mode 100644 index 0000000000..681ac8823d --- /dev/null +++ b/src/components/OrganizationScreen/OrganizationScreen.module.css @@ -0,0 +1,60 @@ +.pageContainer { + display: flex; + flex-direction: column; + min-height: 100vh; + padding: 1rem 1.5rem 0 calc(300px + 2rem + 1.5rem); +} + +.expand { + padding-left: 1.5rem; + animation: moveLeft 0.5s ease-in-out; +} + +.contract { + padding-left: calc(300px + 2rem + 1.5rem); + animation: moveRight 0.5s ease-in-out; +} + +@media (max-width: 1120px) { + .contract { + padding-left: calc(250px + 2rem + 1.5rem); + } +} + +/* For tablets */ +@media (max-width: 820px) { + .pageContainer { + padding-left: 1.5rem; + } + + .contract, + .expand { + animation: none; + } +} + +@media (max-width: 820px) { + .pageContainer { + padding: 1rem; + } +} + +@keyframes moveLeft { + from { + padding-left: calc(300px + 2rem + 1.5rem); + } + + to { + padding-left: 1.5rem; + } +} + +@keyframes moveRight { + from { + padding-left: 1.5rem; + } + + to { + padding-left: calc(300px + 2rem + 1.5rem); + } +} diff --git a/src/components/OrganizationScreen/OrganizationScreen.test.tsx b/src/components/OrganizationScreen/OrganizationScreen.test.tsx new file mode 100644 index 0000000000..8df2640990 --- /dev/null +++ b/src/components/OrganizationScreen/OrganizationScreen.test.tsx @@ -0,0 +1,39 @@ +import React from 'react'; +import { MockedProvider } from '@apollo/react-testing'; +import { render, screen } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; +import { I18nextProvider } from 'react-i18next'; +import { Provider } from 'react-redux'; +import { BrowserRouter } from 'react-router-dom'; +import { store } from 'state/store'; +import i18nForTest from 'utils/i18nForTest'; +import type { InterfaceOrganizationScreenProps } from './OrganizationScreen'; +import OrganizationScreen from './OrganizationScreen'; + +const props: InterfaceOrganizationScreenProps = { + title: 'Dashboard', + screenName: 'Dashboard', + children:
Testing ...
, +}; + +describe('Testing LeftDrawer in OrganizationScreen', () => { + test('Testing LeftDrawer in page functionality', async () => { + localStorage.setItem('UserType', 'SUPERADMIN'); + + render( + + + + + + + + + + ); + // sets hideDrawer to true + userEvent.click(screen.getByTestId('menuBtn')); + // sets hideDrawer to false + userEvent.click(screen.getByTestId('menuBtn')); + }); +}); diff --git a/src/components/OrganizationScreen/OrganizationScreen.tsx b/src/components/OrganizationScreen/OrganizationScreen.tsx new file mode 100644 index 0000000000..bc897ad1a6 --- /dev/null +++ b/src/components/OrganizationScreen/OrganizationScreen.tsx @@ -0,0 +1,67 @@ +import MenuIcon from '@mui/icons-material/Menu'; +import LeftDrawerOrg from 'components/LeftDrawerOrg/LeftDrawerOrg'; +import React, { useState } from 'react'; +import Button from 'react-bootstrap/Button'; +import styles from './OrganizationScreen.module.css'; +import { useSelector } from 'react-redux'; +import type { TargetsType } from 'state/reducers/routesReducer'; +import type { RootState } from 'state/reducers'; + +export interface InterfaceOrganizationScreenProps { + title: string; // Multilingual Page title + screenName: string; // Internal Screen name for developers + children: React.ReactNode; +} +const organizationScreen = ({ + title, + screenName, + children, +}: InterfaceOrganizationScreenProps): JSX.Element => { + const [hideDrawer, setHideDrawer] = useState(null); + + const appRoutes: { + targets: TargetsType[]; + configUrl: string; + } = useSelector((state: RootState) => state.appRoutes); + const { targets, configUrl } = appRoutes; + + return ( + <> + +
+
+
+

{title}

+
+ +
+ {children} +
+ + ); +}; + +export default organizationScreen; diff --git a/src/components/SuperAdminScreen/SuperAdminScreen.test.tsx b/src/components/SuperAdminScreen/SuperAdminScreen.test.tsx index 1dbb787c2a..e578b0bb4f 100644 --- a/src/components/SuperAdminScreen/SuperAdminScreen.test.tsx +++ b/src/components/SuperAdminScreen/SuperAdminScreen.test.tsx @@ -15,16 +15,6 @@ import SuperAdminScreen from './SuperAdminScreen'; const props: InterfaceSuperAdminScreenProps = { title: 'Organizations', screenName: 'Organizations', - data: { - user: { - firstName: 'test', - lastName: 'test', - email: 'JohnDoe@gmail.com', - adminFor: [], - image: null, - userType: 'SUPERADMIN', - }, - }, children:
Testing ...
, }; @@ -44,6 +34,9 @@ describe('Testing LeftDrawer in SuperAdminScreen', () => { ); + // Expand LeftDrawer + userEvent.click(screen.getByTestId('menuBtn')); + // Contract LeftDrawer userEvent.click(screen.getByTestId('menuBtn')); }); }); diff --git a/src/components/SuperAdminScreen/SuperAdminScreen.tsx b/src/components/SuperAdminScreen/SuperAdminScreen.tsx index 5664e8a61c..214b8bd1ed 100644 --- a/src/components/SuperAdminScreen/SuperAdminScreen.tsx +++ b/src/components/SuperAdminScreen/SuperAdminScreen.tsx @@ -2,34 +2,34 @@ import MenuIcon from '@mui/icons-material/Menu'; import LeftDrawer from 'components/LeftDrawer/LeftDrawer'; import React, { useState } from 'react'; import Button from 'react-bootstrap/Button'; -import type { InterfaceUserType } from 'utils/interfaces'; import styles from './SuperAdminScreen.module.css'; export interface InterfaceSuperAdminScreenProps { title: string; // Multilingual Page title screenName: string; // Internal Screen name for developers - data: InterfaceUserType | undefined; children: React.ReactNode; } const superAdminScreen = ({ title, screenName, - data, children, }: InterfaceSuperAdminScreenProps): JSX.Element => { - const [showDrawer, setShowDrawer] = useState(true); + const [hideDrawer, setHideDrawer] = useState(null); return ( <>
@@ -40,7 +40,7 @@ const superAdminScreen = ({ + ) : ( + + )} + + + ); + }) + } + + +
+ )} +
+ + + + + + +
- )} -
- - - - - - -
-
- - + + + ); }; diff --git a/src/screens/EventDashboard/EventDashboard.tsx b/src/screens/EventDashboard/EventDashboard.tsx index c94c4c8b8c..0c48f30f12 100644 --- a/src/screens/EventDashboard/EventDashboard.tsx +++ b/src/screens/EventDashboard/EventDashboard.tsx @@ -4,7 +4,6 @@ import Col from 'react-bootstrap/Col'; import { useQuery } from '@apollo/client'; import { Container } from 'react-bootstrap'; import styles from './EventDashboard.module.css'; -import ListNavbar from 'components/ListNavbar/ListNavbar'; import { AddEventProjectModal } from 'components/EventProjectModals/AddEventProjectModal'; import { UpdateEventProjectModal } from 'components/EventProjectModals/UpdateEventProjectModal'; import { DeleteEventProjectModal } from 'components/EventProjectModals/DeleteEventProjectModal'; @@ -15,6 +14,7 @@ import List from '@mui/material/List'; import { EventRegistrantsWrapper } from 'components/EventRegistrantsModal/EventRegistrantsWrapper'; import { TaskListItem } from 'components/TaskListItem/TaskListItem'; import { CheckInWrapper } from 'components/CheckIn/CheckInWrapper'; +import Loader from 'components/Loader/Loader'; interface InterfaceEventTask { _id: string; @@ -66,16 +66,11 @@ const EventDashboard = (): JSX.Element => { // Render the loading screen if (eventInfoLoading) { - return ( - <> -
- - ); + return ; } return ( <> -
@@ -111,7 +106,7 @@ const EventDashboard = (): JSX.Element => { className="mt-3" variant="success" aria-label="addEventProject" - onClick={() => { + onClick={(): void => { setShowAddEventProjectModal(true); }} > @@ -181,7 +176,7 @@ const EventDashboard = (): JSX.Element => { variant="success" className="m-2 ml-3" size="sm" - onClick={() => { + onClick={(): void => { setCurrentProject(project); setShowUpdateEventProjectModal(true); }} @@ -194,7 +189,7 @@ const EventDashboard = (): JSX.Element => { aria-label="deleteEventProject" className="m-1" size="sm" - onClick={() => { + onClick={(): void => { setCurrentProject(project); setShowDeleteEventProjectModal(true); }} @@ -207,7 +202,7 @@ const EventDashboard = (): JSX.Element => { aria-label="addTask" className="m-1 ml-8" size="sm" - onClick={() => { + onClick={(): void => { setCurrentProject(project); setShowAddTaskModal(true); }} @@ -228,7 +223,7 @@ const EventDashboard = (): JSX.Element => { {/* Wrapper for Different Modals */} { + handleClose={(): void => { setShowAddEventProjectModal(false); }} eventId={eventId} @@ -237,7 +232,7 @@ const EventDashboard = (): JSX.Element => { { + handleClose={(): void => { setShowUpdateEventProjectModal(false); }} refetchData={refetchEventData} @@ -246,7 +241,7 @@ const EventDashboard = (): JSX.Element => { { + handleClose={(): void => { setShowDeleteEventProjectModal(false); }} refetchData={refetchEventData} @@ -255,7 +250,7 @@ const EventDashboard = (): JSX.Element => { { + handleClose={(): void => { setShowAddTaskModal(false); }} refetchData={refetchEventData} diff --git a/src/screens/MemberDetail/MemberDetail.test.tsx b/src/screens/MemberDetail/MemberDetail.test.tsx index 772f39f24d..94fd20700e 100644 --- a/src/screens/MemberDetail/MemberDetail.test.tsx +++ b/src/screens/MemberDetail/MemberDetail.test.tsx @@ -168,7 +168,7 @@ describe('MemberDetail', () => { expect(screen.getAllByText(/Admin for events/i)).toBeTruthy(); expect(screen.getAllByText(/Created On/i)).toHaveLength(2); - expect(screen.getAllByText(/User Details/i)).toHaveLength(2); + expect(screen.getAllByText(/User Details/i)).toHaveLength(3); expect(screen.getAllByText(/Role/i)).toHaveLength(2); expect(screen.getAllByText(/Created/i)).toHaveLength(4); expect(screen.getAllByText(/Joined/i)).toHaveLength(2); diff --git a/src/screens/MemberDetail/MemberDetail.tsx b/src/screens/MemberDetail/MemberDetail.tsx index c898ae9b32..914996ce35 100644 --- a/src/screens/MemberDetail/MemberDetail.tsx +++ b/src/screens/MemberDetail/MemberDetail.tsx @@ -4,13 +4,11 @@ import Col from 'react-bootstrap/Col'; import Row from 'react-bootstrap/Row'; import Button from 'react-bootstrap/Button'; import { useTranslation } from 'react-i18next'; -import { useSelector } from 'react-redux'; import { useLocation } from 'react-router-dom'; import UserUpdate from 'components/UserUpdate/UserUpdate'; -import AdminNavbar from 'components/AdminNavbar/AdminNavbar'; +import OrganizationScreen from 'components/OrganizationScreen/OrganizationScreen'; import { USER_DETAILS } from 'GraphQl/Queries/Queries'; -import type { RootState } from 'state/reducers'; import styles from './MemberDetail.module.css'; import { languages } from 'utils/languages'; import { ADD_ADMIN_MUTATION } from 'GraphQl/Mutations/mutations'; @@ -33,9 +31,6 @@ const MemberDetail: React.FC = ({ id }): JSX.Element => { const currentUrl = window.location.href.split('=')[1]; document.title = t('title'); - const appRoutes = useSelector((state: RootState) => state.appRoutes); - const { targets, configUrl } = appRoutes; - const [adda] = useMutation(ADD_ADMIN_MUTATION); const { data: userData, @@ -78,218 +73,221 @@ const MemberDetail: React.FC = ({ id }): JSX.Element => { return ( <> - - - -
-
-
- -
-
- - - {state == 1 ? ( -
- -

{t('title')}

- + + + +
+
+
- - - -
- {userData?.user?.image ? ( - - ) : ( - - )} +
+
- - - {/* User section */} -
-

- - {userData?.user?.firstName} {userData?.user?.lastName} - -

-

- {t('role')} :{' '} - {userData?.user?.userType} -

-

- {t('email')} :{' '} - {userData?.user?.email} -

-

- {t('createdOn')} :{' '} - {prettyDate(userData?.user?.createdAt)} -

-
- - -
-
-
- {/* Main Section And Activity section */} -
+ {t('title')} + +
+
+ + + {state == 1 ? ( +
- {/* Main Section */} - -
-
-
- {t('main')} -
-
-
- - {t('firstName')} - {userData?.user?.firstName} - - - {t('lastName')} - {userData?.user?.lastName} - - - {t('role')} - {userData?.user?.userType} - - - {t('memberOfOrganization')} - - {userData?.user?.organizationUserBelongsTo ?? - 'None'} - - - - {t('language')} - - {getLanguageName(userData?.user?.appLanguageCode)} - - - - {t('adminApproved')} - - {userData?.user?.adminApproved ? 'Yes' : 'No'} - - - - {t('pluginCreationAllowed')} - - {userData?.user?.pluginCreationAllowed - ? 'Yes' - : 'No'} - - - - {t('createdOn')} - - {prettyDate(userData?.user?.createdAt)} - - -
+

{t('title')}

+ + + + + +
+ {userData?.user?.image ? ( + + ) : ( + + )}
- {/* Activity Section */} - - {/* Organizations */} -
-
-
- {t('organizations')} -
-
-
- - {t('created')} - - {userData?.user?.createdOrganizations?.length} - - - - {t('joined')} - - {userData?.user?.joinedOrganizations?.length} - - - - {t('adminForOrganizations')} - {userData?.user?.adminFor?.length} - - - {t('membershipRequests')} - - {userData?.user?.membershipRequests?.length} - - -
-
- {/* Events */} -
-
-
- {t('events')} -
-
-
- - {t('created')} - - {userData?.user?.createdEvents?.length} - - - - {t('joined')} - - {userData?.user?.registeredEvents?.length} - - - - {t('adminForEvents')} - {userData?.user?.eventAdmin?.length} - -
+ + {/* User section */} +
+

+ + {userData?.user?.firstName} {userData?.user?.lastName} + +

+

+ {t('role')} :{' '} + {userData?.user?.userType} +

+

+ {t('email')} :{' '} + {userData?.user?.email} +

+

+ {t('createdOn')} :{' '} + {prettyDate(userData?.user?.createdAt)} +

- -
- ) : ( - - )} - -
+
+
+
+ {/* Main Section And Activity section */} +
+ + {/* Main Section */} + +
+
+
+ {t('main')} +
+
+
+ + {t('firstName')} + {userData?.user?.firstName} + + + {t('lastName')} + {userData?.user?.lastName} + + + {t('role')} + {userData?.user?.userType} + + + {t('memberOfOrganization')} + + {userData?.user?.organizationUserBelongsTo ?? + 'None'} + + + + {t('language')} + + {getLanguageName(userData?.user?.appLanguageCode)} + + + + {t('adminApproved')} + + {userData?.user?.adminApproved ? 'Yes' : 'No'} + + + + {t('pluginCreationAllowed')} + + {userData?.user?.pluginCreationAllowed + ? 'Yes' + : 'No'} + + + + {t('createdOn')} + + {prettyDate(userData?.user?.createdAt)} + + +
+
+ + {/* Activity Section */} + + {/* Organizations */} +
+
+
+ {t('organizations')} +
+
+
+ + {t('created')} + + {userData?.user?.createdOrganizations?.length} + + + + {t('joined')} + + {userData?.user?.joinedOrganizations?.length} + + + + {t('adminForOrganizations')} + {userData?.user?.adminFor?.length} + + + {t('membershipRequests')} + + {userData?.user?.membershipRequests?.length} + + +
+
+ {/* Events */} +
+
+
+ {t('events')} +
+
+
+ + {t('created')} + + {userData?.user?.createdEvents?.length} + + + + {t('joined')} + + {userData?.user?.registeredEvents?.length} + + + + {t('adminForEvents')} + + {userData?.user?.eventAdmin?.length} + + +
+
+ +
+
+
+ ) : ( + + )} + +
+ ); }; diff --git a/src/screens/OrgContribution/OrgContribution.tsx b/src/screens/OrgContribution/OrgContribution.tsx index 27fbde4dd4..bcd8641609 100644 --- a/src/screens/OrgContribution/OrgContribution.tsx +++ b/src/screens/OrgContribution/OrgContribution.tsx @@ -1,15 +1,12 @@ import React from 'react'; -import Row from 'react-bootstrap/Row'; import Col from 'react-bootstrap/Col'; -import { useSelector } from 'react-redux'; +import Row from 'react-bootstrap/Row'; import { useTranslation } from 'react-i18next'; -import styles from './OrgContribution.module.css'; -import AdminNavbar from 'components/AdminNavbar/AdminNavbar'; -import OrgContriCards from 'components/OrgContriCards/OrgContriCards'; import ContriStats from 'components/ContriStats/ContriStats'; -import type { RootState } from 'state/reducers'; +import OrgContriCards from 'components/OrgContriCards/OrgContriCards'; import { Form } from 'react-bootstrap'; +import styles from './OrgContribution.module.css'; function orgContribution(): JSX.Element { const { t } = useTranslation('translation', { @@ -18,12 +15,8 @@ function orgContribution(): JSX.Element { document.title = t('title'); - const appRoutes = useSelector((state: RootState) => state.appRoutes); - const { targets, configUrl } = appRoutes; - return ( <> -
diff --git a/src/screens/OrgList/OrgList.tsx b/src/screens/OrgList/OrgList.tsx index 6bc6cfa1b0..702f8b2d3c 100644 --- a/src/screens/OrgList/OrgList.tsx +++ b/src/screens/OrgList/OrgList.tsx @@ -168,11 +168,7 @@ function orgList(): JSX.Element { const debouncedHandleSearchByName = debounce(handleSearchByName); return ( <> - + {/* Buttons Container */}
diff --git a/src/screens/OrgList/OrgListMocks.ts b/src/screens/OrgList/OrgListMocks.ts index 8958574e61..419af22036 100644 --- a/src/screens/OrgList/OrgListMocks.ts +++ b/src/screens/OrgList/OrgListMocks.ts @@ -2,7 +2,6 @@ import { ORGANIZATION_CONNECTION_LIST, USER_ORGANIZATION_LIST, } from 'GraphQl/Queries/Queries'; -import 'jest-localstorage-mock'; import 'jest-location-mock'; import type { InterfaceOrgConnectionInfoType, diff --git a/src/screens/OrgPost/OrgPost.tsx b/src/screens/OrgPost/OrgPost.tsx index 48b6a17020..2e897aede8 100644 --- a/src/screens/OrgPost/OrgPost.tsx +++ b/src/screens/OrgPost/OrgPost.tsx @@ -5,17 +5,14 @@ import Col from 'react-bootstrap/Col'; import Modal from 'react-bootstrap/Modal'; import { Form } from 'react-bootstrap'; import { useMutation, useQuery } from '@apollo/client'; -import { useSelector } from 'react-redux'; import Button from 'react-bootstrap/Button'; import { toast } from 'react-toastify'; import { useTranslation } from 'react-i18next'; import styles from './OrgPost.module.css'; -import AdminNavbar from 'components/AdminNavbar/AdminNavbar'; import OrgPostCard from 'components/OrgPostCard/OrgPostCard'; import { ORGANIZATION_POST_CONNECTION_LIST } from 'GraphQl/Queries/Queries'; import { CREATE_POST_MUTATION } from 'GraphQl/Mutations/mutations'; -import type { RootState } from 'state/reducers'; import PaginationList from 'components/PaginationList/PaginationList'; import debounce from 'utils/debounce'; import convertToBase64 from 'utils/convertToBase64'; @@ -23,6 +20,7 @@ import NotFound from 'components/NotFound/NotFound'; import { Form as StyleBox } from 'react-bootstrap'; import { errorHandler } from 'utils/errorHandler'; import Loader from 'components/Loader/Loader'; +import OrganizationScreen from 'components/OrganizationScreen/OrganizationScreen'; function orgPost(): JSX.Element { const { t } = useTranslation('translation', { @@ -45,8 +43,6 @@ function orgPost(): JSX.Element { const [rowsPerPage, setRowsPerPage] = useState(5); const currentUrl = window.location.href.split('=')[1]; - const appRoutes = useSelector((state: RootState) => state.appRoutes); - const { targets, configUrl } = appRoutes; const showInviteModal = (): void => { setPostModalIsOpen(true); @@ -144,134 +140,129 @@ function orgPost(): JSX.Element { const debouncedHandleSearch = debounce(handleSearch); - // let ReversedPostsList; - // //the above variable is defined to reverse the list of posts so the the most recently added posts should be displayed at the top. - // if (data) { - // ReversedPostsList = data.postsByOrganizationConnection.edges - // .slice() - // .reverse(); - // } return ( <> - - - -
-
-
{t('searchPost')}
-
-
- - + + + +
+
+
{t('searchPost')}
+
+
+ + +
+
- -
-
- - -
- -

{t('posts')}

- -
-
- {orgPostListData && - orgPostListData.postsByOrganizationConnection.edges.length > 0 ? ( - (rowsPerPage > 0 - ? orgPostListData.postsByOrganizationConnection.edges.slice( - page * rowsPerPage, - page * rowsPerPage + rowsPerPage - ) - : rowsPerPage > 0 - ? orgPostListData.postsByOrganizationConnection.edges.slice( - page * rowsPerPage, - page * rowsPerPage + rowsPerPage - ) - : orgPostListData.postsByOrganizationConnection.edges - ).map( - (datas: { - _id: string; - title: string; - text: string; - imageUrl: string; - videoUrl: string; - organizationId: string; - creator: { firstName: string; lastName: string }; - }) => { - return ( - - ); - } - ) - ) : ( - - )}
-
-
- - - - + +
+ +

{t('posts')}

+ +
+
+ {orgPostListData && + orgPostListData.postsByOrganizationConnection.edges.length > + 0 ? ( + (rowsPerPage > 0 + ? orgPostListData.postsByOrganizationConnection.edges.slice( + page * rowsPerPage, + page * rowsPerPage + rowsPerPage + ) + : rowsPerPage > 0 + ? orgPostListData.postsByOrganizationConnection.edges.slice( + page * rowsPerPage, + page * rowsPerPage + rowsPerPage + ) + : orgPostListData.postsByOrganizationConnection.edges + ).map( + (datas: { + _id: string; + title: string; + text: string; + imageUrl: string; + videoUrl: string; + organizationId: string; + creator: { firstName: string; lastName: string }; + }) => { + return ( + + ); } - rowsPerPage={rowsPerPage} - page={page} - onPageChange={handleChangePage} - onRowsPerPageChange={handleChangeRowsPerPage} - /> - - -
-
- - + ) + ) : ( + + )} +
+
+
+ + + + + + +
+
+ + +

{t('postDetails')}

diff --git a/src/screens/OrgSettings/OrgSettings.tsx b/src/screens/OrgSettings/OrgSettings.tsx index c6f5714052..ef707bf91f 100644 --- a/src/screens/OrgSettings/OrgSettings.tsx +++ b/src/screens/OrgSettings/OrgSettings.tsx @@ -1,21 +1,19 @@ -import React from 'react'; -import Row from 'react-bootstrap/Row'; -import Col from 'react-bootstrap/Col'; -import styles from './OrgSettings.module.css'; -import UserUpdate from 'components/UserUpdate/UserUpdate'; -import UserPasswordUpdate from 'components/UserPasswordUpdate/UserPasswordUpdate'; -import OrgUpdate from 'components/OrgUpdate/OrgUpdate'; -import OrgDelete from 'components/OrgDelete/OrgDelete'; -import AdminNavbar from 'components/AdminNavbar/AdminNavbar'; -import MemberRequestCard from 'components/MemberRequestCard/MemberRequestCard'; import { useQuery } from '@apollo/client'; import { MEMBERSHIP_REQUEST } from 'GraphQl/Queries/Queries'; -import { useSelector } from 'react-redux'; -import type { RootState } from 'state/reducers'; -import { useTranslation } from 'react-i18next'; import defaultImg from 'assets/images/blank.png'; -import Button from 'react-bootstrap/Button'; import Loader from 'components/Loader/Loader'; +import MemberRequestCard from 'components/MemberRequestCard/MemberRequestCard'; +import OrgDelete from 'components/OrgDelete/OrgDelete'; +import OrgUpdate from 'components/OrgUpdate/OrgUpdate'; +import OrganizationScreen from 'components/OrganizationScreen/OrganizationScreen'; +import UserPasswordUpdate from 'components/UserPasswordUpdate/UserPasswordUpdate'; +import UserUpdate from 'components/UserUpdate/UserUpdate'; +import React from 'react'; +import Button from 'react-bootstrap/Button'; +import Col from 'react-bootstrap/Col'; +import Row from 'react-bootstrap/Row'; +import { useTranslation } from 'react-i18next'; +import styles from './OrgSettings.module.css'; function orgSettings(): JSX.Element { const { t } = useTranslation('translation', { @@ -45,9 +43,6 @@ function orgSettings(): JSX.Element { } }; - const appRoutes = useSelector((state: RootState) => state.appRoutes); - const { targets, configUrl } = appRoutes; - const currentUrl = window.location.href.split('=')[1]; const { data, loading, error } = useQuery(MEMBERSHIP_REQUEST, { @@ -65,134 +60,135 @@ function orgSettings(): JSX.Element { return ( <> - - - -
-
-
- - - - - + + + +
+
+
+ + + + + +
-
- - -
- -
-

{t('settings')}

- {screenDisplayVariable != '' && ( -

- {t(screenDisplayVariable)} -

- )} - {/*

{t("abc")}

*/} -
+ + +
+ +
+

{t('settings')}

+ {screenDisplayVariable != '' && ( +

+ {t(screenDisplayVariable)} +

+ )} + {/*

{t("abc")}

*/} +
- {/*

{t('settings')}

*/} -
-
{screenVariable == 1 ? : null}
-
- {screenVariable == 5 ? : null} -
-
- {screenVariable == 2 ? ( - - ) : null} -
-
{screenVariable == 3 ? : null}
-
- {screenVariable == 4 ? ( - data?.organizations?.membershipRequests ? ( - /* istanbul ignore next */ - data.organizations.map( + {/*

{t('settings')}

*/} + +
{screenVariable == 1 ? : null}
+
+ {screenVariable == 5 ? : null} +
+
+ {screenVariable == 2 ? ( + + ) : null} +
+
{screenVariable == 3 ? : null}
+
+ {screenVariable == 4 ? ( + data?.organizations?.membershipRequests ? ( /* istanbul ignore next */ - (datas: { - _id: string; - membershipRequests: { + data.organizations.map( + /* istanbul ignore next */ + (datas: { _id: string; - user: { + membershipRequests: { _id: string; - firstName: string; - lastName: string; - email: string; + user: { + _id: string; + firstName: string; + lastName: string; + email: string; + }; }; - }; - }) => { - /* istanbul ignore next */ - return ( - - ); - } + }) => { + /* istanbul ignore next */ + return ( + + ); + } + ) + ) : ( +
{t('noData')}
) - ) : ( -
{t('noData')}
- ) - ) : null} + ) : null} +
-
- -
+ + + ); } diff --git a/src/screens/OrganizationDashboard/OrganizationDashboard.tsx b/src/screens/OrganizationDashboard/OrganizationDashboard.tsx index cdfebb31ca..9d31a5c535 100644 --- a/src/screens/OrganizationDashboard/OrganizationDashboard.tsx +++ b/src/screens/OrganizationDashboard/OrganizationDashboard.tsx @@ -10,7 +10,6 @@ import Button from 'react-bootstrap/Button'; import { Link } from 'react-router-dom'; import styles from './OrganizationDashboard.module.css'; -import AdminNavbar from 'components/AdminNavbar/AdminNavbar'; import AboutImg from 'assets/images/defaultImg.png'; import { ORGANIZATIONS_LIST, @@ -21,6 +20,7 @@ import { import { DELETE_ORGANIZATION_MUTATION } from 'GraphQl/Mutations/mutations'; import { errorHandler } from 'utils/errorHandler'; import Loader from 'components/Loader/Loader'; +import OrganizationScreen from 'components/OrganizationScreen/OrganizationScreen'; function organizationDashboard(): JSX.Element { const { t } = useTranslation('translation', { keyPrefix: 'dashboard' }); @@ -29,7 +29,7 @@ function organizationDashboard(): JSX.Element { const currentUrl = window.location.href.split('=')[1]; const appRoutes = useSelector((state: RootState) => state.appRoutes); - const { targets, configUrl } = appRoutes; + const { targets } = appRoutes; const { data, loading, error } = useQuery(ORGANIZATIONS_LIST, { variables: { id: currentUrl }, @@ -88,89 +88,61 @@ function organizationDashboard(): JSX.Element { return ( <> - - - -
-
-
{t('about')}
-

- {data?.organizations[0].description} -

-

- {t('location')} : {data?.organizations[0].location} -

- -

- {canDelete && ( - - )} -

+ + + +
+
+
{t('about')}
+

+ {data?.organizations[0].description} +

+

+ {t('location')} : {data?.organizations[0].location} +

+ +

+ {canDelete && ( + + )} +

+
-
- - - -
- -

{t('statistics')}

-
- - - { - const { name } = target; - return name == 'People'; - }) - .map((target: any) => { - return target.url; - })}`} - > -
-
- -
-
-

- {data?.organizations[0].members.length} -

-

{t('members')}

-
-
- - - - { - const { name } = target; - return name == 'People'; - }) - .map((target: any) => { - return target.url; - })}`} - > -
+ + + +
+ +

{t('statistics')}

+
+ + + { + const { name } = target; + return name == 'People'; + }) + .map((target: any) => { + return target.url; + })}`} + >

- {data?.organizations[0].admins.length} + {data?.organizations[0].members.length}

-

{t('admins')}

+

{t('members')}

-
- - - - { - const { name } = target; - return name == 'Posts'; - }) - .map((target: any) => { - return target.url; - })}`} - > -
-
- -
-
-

- {postData?.postsByOrganization.length} -

-

{t('posts')}

-
-
- - - - { - const { name } = target; - return name == 'Events'; - }) - .map((target: any) => { - return target.url; - })}`} - > -
-
- -
-
-

- {eventData?.eventsByOrganization.length} -

-

{t('events')}

+ + + + { + const { name } = target; + return name == 'People'; + }) + .map((target: any) => { + return target.url; + })}`} + > +
+
+
+ +
+
+

+ {data?.organizations[0].admins.length} +

+

{t('admins')}

+
+
-
- - - - { - const { name } = target; - return name == 'Block/Unblock'; - }) - .map((target: any) => { - return target.url; - })}`} - > -
-
- + + + + { + const { name } = target; + return name == 'Posts'; + }) + .map((target: any) => { + return target.url; + })}`} + > +
+
+ +
+
+

+ {postData?.postsByOrganization.length} +

+

{t('posts')}

+
-
-

- {data?.organizations[0].blockedUsers.length} -

-

- {t('blockedUsers')} -

+ + + + { + const { name } = target; + return name == 'Events'; + }) + .map((target: any) => { + return target.url; + })}`} + > +
+
+ +
+
+

+ {eventData?.eventsByOrganization.length} +

+

{t('events')}

+
-
- - - -
-
-
- + + + + { + const { name } = target; + return name == 'Block/Unblock'; + }) + .map((target: any) => { + return target.url; + })}`} + > +
+
+ +
+
+

+ {data?.organizations[0].blockedUsers.length} +

+

+ {t('blockedUsers')} +

+
-
-

- {data?.organizations[0].membershipRequests.length} -

-

- {t('membershipRequests')} -

+ + + +
+
+
+ +
+
+

+ {data?.organizations[0].membershipRequests.length} +

+

+ {t('membershipRequests')} +

+
-
- - -
- - - - - -
{t('deleteOrganization')}
- -
- {t('deleteMsg')} - - - - -
+ + +
+ + + + + +
{t('deleteOrganization')}
+ +
+ {t('deleteMsg')} + + + + +
+ ); } diff --git a/src/screens/OrganizationEvents/OrganizationEvents.tsx b/src/screens/OrganizationEvents/OrganizationEvents.tsx index d36a3f6ac4..566bda2e29 100644 --- a/src/screens/OrganizationEvents/OrganizationEvents.tsx +++ b/src/screens/OrganizationEvents/OrganizationEvents.tsx @@ -4,7 +4,6 @@ import Row from 'react-bootstrap/Row'; import Col from 'react-bootstrap/Col'; import Button from 'react-bootstrap/Button'; import Modal from 'react-bootstrap/Modal'; -import { useSelector } from 'react-redux'; import DatePicker from 'react-datepicker'; import { Form } from 'react-bootstrap'; import { useMutation, useQuery } from '@apollo/client'; @@ -15,16 +14,15 @@ import Calendar from 'react-calendar'; import './calendar.css'; import styles from './OrganizationEvents.module.css'; -import AdminNavbar from 'components/AdminNavbar/AdminNavbar'; import { ORGANIZATION_EVENT_CONNECTION_LIST, ORGANIZATIONS_LIST, } from 'GraphQl/Queries/Queries'; import { CREATE_EVENT_MUTATION } from 'GraphQl/Mutations/mutations'; -import type { RootState } from 'state/reducers'; import dayjs from 'dayjs'; import { errorHandler } from 'utils/errorHandler'; import Loader from 'components/Loader/Loader'; +import OrganizationScreen from 'components/OrganizationScreen/OrganizationScreen'; function organizationEvents(): JSX.Element { const { t } = useTranslation('translation', { @@ -53,9 +51,6 @@ function organizationEvents(): JSX.Element { }); const currentUrl = window.location.href.split('=')[1]; - const appRoutes = useSelector((state: RootState) => state.appRoutes); - const { targets, configUrl } = appRoutes; - const showInviteModal = (): void => { setEventModalIsOpen(true); }; @@ -138,38 +133,40 @@ function organizationEvents(): JSX.Element { return ( <> - - - -
-
-
Search Date
- + + + +
+
+
Search Date
+ +
+
+ + +
+ +

{t('events')}

+ +
-
- - -
- -

{t('events')}

- -
-
- - - + + + + +

{t('eventDetails')}

diff --git a/src/screens/OrganizationPeople/OrganizationPeople.tsx b/src/screens/OrganizationPeople/OrganizationPeople.tsx index 3576f12f2b..9d33ae2833 100644 --- a/src/screens/OrganizationPeople/OrganizationPeople.tsx +++ b/src/screens/OrganizationPeople/OrganizationPeople.tsx @@ -1,25 +1,23 @@ -import React, { useEffect, useState } from 'react'; -import Row from 'react-bootstrap/Row'; -import Col from 'react-bootstrap/Col'; import { useLazyQuery } from '@apollo/client'; -import { useSelector } from 'react-redux'; -import { Container, Form } from 'react-bootstrap'; import dayjs from 'dayjs'; +import React, { useEffect, useState } from 'react'; +import { Container, Form } from 'react-bootstrap'; +import Col from 'react-bootstrap/Col'; +import Row from 'react-bootstrap/Row'; -import styles from './OrganizationPeople.module.css'; -import AdminNavbar from 'components/AdminNavbar/AdminNavbar'; -import OrgPeopleListCard from 'components/OrgPeopleListCard/OrgPeopleListCard'; -import OrgAdminListCard from 'components/OrgAdminListCard/OrgAdminListCard'; -import UserListCard from 'components/UserListCard/UserListCard'; import { ORGANIZATIONS_MEMBER_CONNECTION_LIST, USER_LIST, } from 'GraphQl/Queries/Queries'; -import type { RootState } from '../../state/reducers'; +import NotFound from 'components/NotFound/NotFound'; +import OrgAdminListCard from 'components/OrgAdminListCard/OrgAdminListCard'; +import OrgPeopleListCard from 'components/OrgPeopleListCard/OrgPeopleListCard'; +import OrganizationScreen from 'components/OrganizationScreen/OrganizationScreen'; import PaginationList from 'components/PaginationList/PaginationList'; +import UserListCard from 'components/UserListCard/UserListCard'; import { useTranslation } from 'react-i18next'; import debounce from 'utils/debounce'; -import NotFound from 'components/NotFound/NotFound'; +import styles from './OrganizationPeople.module.css'; import { toast } from 'react-toastify'; @@ -32,9 +30,6 @@ function organizationPeople(): JSX.Element { const currentUrl = window.location.href.split('=')[1]; - const appRoutes = useSelector((state: RootState) => state.appRoutes); - const { targets, configUrl } = appRoutes; - const [state, setState] = useState(0); const [page, setPage] = useState(0); const [rowsPerPage, setRowsPerPage] = useState(5); @@ -151,270 +146,272 @@ function organizationPeople(): JSX.Element { return ( <> -
- -
- - -
-
-
{t('filterByName')}
- { - const { value } = e.target; - - const newFilterData = { - ...filterData, - firstName_contains: value?.trim(), - }; - - setFilterData(newFilterData); - debouncedHandleFirstNameSearchChange(newFilterData); - }} - /> - { - const { value } = e.target; + + + +
+
+
{t('filterByName')}
+ { + const { value } = e.target; - const newFilterData = { - ...filterData, - lastName_contains: value?.trim(), - }; + const newFilterData = { + ...filterData, + firstName_contains: value?.trim(), + }; - setFilterData(newFilterData); - debouncedHandleFirstNameSearchChange(newFilterData); - }} - /> -
- { - setState(2); + setFilterData(newFilterData); + debouncedHandleFirstNameSearchChange(newFilterData); }} /> - - { - setState(0); - }} - /> - - { - setState(1); + { + const { value } = e.target; + + const newFilterData = { + ...filterData, + lastName_contains: value?.trim(), + }; + + setFilterData(newFilterData); + debouncedHandleFirstNameSearchChange(newFilterData); }} /> - +
+ { + setState(2); + }} + /> + + { + setState(0); + }} + /> + + { + setState(1); + }} + /> + +
-
- - - -
- -

- {state == 0 - ? t('members') - : state == 1 - ? t('admins') - : t('users')} -

-
- {memberLoading || usersLoading || adminLoading ? ( - <> -
- - ) : ( -
- { - /* istanbul ignore next */ - state == 0 ? ( - memberData && - memberData.organizationsMemberConnection.edges.length > - 0 ? ( - (rowsPerPage > 0 - ? memberData.organizationsMemberConnection.edges.slice( - page * rowsPerPage, - page * rowsPerPage + rowsPerPage - ) - : memberData.organizationsMemberConnection.edges - ).map( - (datas: { - _id: string; - lastName: string; - firstName: string; - image: string; - email: string; - createdAt: string; - }) => { - return ( - - ); - } + + + +
+ +

+ {state == 0 + ? t('members') + : state == 1 + ? t('admins') + : t('users')} +

+
+ {memberLoading || usersLoading || adminLoading ? ( + <> +
+ + ) : ( +
+ { + /* istanbul ignore next */ + state == 0 ? ( + memberData && + memberData.organizationsMemberConnection.edges.length > + 0 ? ( + (rowsPerPage > 0 + ? memberData.organizationsMemberConnection.edges.slice( + page * rowsPerPage, + page * rowsPerPage + rowsPerPage + ) + : memberData.organizationsMemberConnection.edges + ).map( + (datas: { + _id: string; + lastName: string; + firstName: string; + image: string; + email: string; + createdAt: string; + }) => { + return ( + + ); + } + ) + ) : ( + ) - ) : ( - - ) - ) : state == 1 ? ( - adminData && - adminData.organizationsMemberConnection.edges.length > - 0 ? ( - (rowsPerPage > 0 - ? adminData.organizationsMemberConnection.edges.slice( - page * rowsPerPage, - page * rowsPerPage + rowsPerPage - ) - : adminData.organizationsMemberConnection.edges - ).map( - (datas: { - _id: string; - lastName: string; - firstName: string; - image: string; - email: string; - createdAt: string; - }) => { - return ( - - ); - } + ) : state == 1 ? ( + adminData && + adminData.organizationsMemberConnection.edges.length > + 0 ? ( + (rowsPerPage > 0 + ? adminData.organizationsMemberConnection.edges.slice( + page * rowsPerPage, + page * rowsPerPage + rowsPerPage + ) + : adminData.organizationsMemberConnection.edges + ).map( + (datas: { + _id: string; + lastName: string; + firstName: string; + image: string; + email: string; + createdAt: string; + }) => { + return ( + + ); + } + ) + ) : ( + ) - ) : ( - - ) - ) : state == 2 ? ( - usersData && usersData.users.length > 0 ? ( - (rowsPerPage > 0 - ? usersData.users.slice( - page * rowsPerPage, - page * rowsPerPage + rowsPerPage - ) - : usersData.users - ).map( - (datas: { - _id: string; - lastName: string; - firstName: string; - image: string; - email: string; - createdAt: string; - }) => { - return ( - - ); - } + ) : state == 2 ? ( + usersData && usersData.users.length > 0 ? ( + (rowsPerPage > 0 + ? usersData.users.slice( + page * rowsPerPage, + page * rowsPerPage + rowsPerPage + ) + : usersData.users + ).map( + (datas: { + _id: string; + lastName: string; + firstName: string; + image: string; + email: string; + createdAt: string; + }) => { + return ( + + ); + } + ) + ) : ( + ) ) : ( + /* istanbul ignore next */ ) - ) : ( - /* istanbul ignore next */ - - ) - } -
- )} -
-
- - - - <> - - - - -
-
-
- - + } +
+ )} +
+
+ + + + <> + + + + +
+
+
+ +
+
); } diff --git a/src/screens/Requests/Requests.tsx b/src/screens/Requests/Requests.tsx index 7a40b9e60a..4de82c71be 100644 --- a/src/screens/Requests/Requests.tsx +++ b/src/screens/Requests/Requests.tsx @@ -18,13 +18,14 @@ import { USER_ORGANIZATION_LIST, } from 'GraphQl/Queries/Queries'; import SuperAdminScreen from 'components/SuperAdminScreen/SuperAdminScreen'; +import debounce from 'utils/debounce'; import { errorHandler } from 'utils/errorHandler'; import type { InterfaceOrgConnectionType, InterfaceUserType, } from 'utils/interfaces'; import styles from './Requests.module.css'; -import debounce from 'utils/debounce'; +import TableLoader from 'components/TableLoader/TableLoader'; const Requests = (): JSX.Element => { const { t } = useTranslation('translation', { keyPrefix: 'requests' }); @@ -148,13 +149,17 @@ const Requests = (): JSX.Element => { const debouncedHandleSearchByName = debounce(handleSearchByName); + const headerTitles: string[] = [ + '#', + t('name'), + t('email'), + t('accept'), + t('reject'), + ]; + return ( <> - + {/* Buttons Container */}
@@ -212,77 +217,81 @@ const Requests = (): JSX.Element => {
- {loadingUsers ? ( -
-

{t('loadingRequests')}

-
- ) : usersData.length === 0 && searchByName.length > 0 ? ( + {loadingUsers == false && + usersData.length === 0 && + searchByName.length > 0 ? (

{t('noResultsFoundFor')} "{searchByName}"

- ) : usersData.length === 0 ? ( + ) : loadingUsers == false && usersData.length === 0 ? (

{t('noRequestFound')}

) : (
- - - - - - - - - - - - {usersData.map( - ( - user: { - _id: string; - firstName: string; - lastName: string; - email: string; - userType: string; - }, - index: number - ) => { - return ( - - - - - - - - ); - } - )} - -
#{t('name')}{t('email')}{t('accept')}{t('reject')}
{index + 1}{`${user.firstName} ${user.lastName}`}{user.email} - - - -
+ {loadingUsers ? ( + + ) : ( + + + + {headerTitles.map((title: string, index: number) => { + return ( + + ); + })} + + + + {usersData.map( + ( + user: { + _id: string; + firstName: string; + lastName: string; + email: string; + userType: string; + }, + index: number + ) => { + return ( + + + + + + + + ); + } + )} + +
+ {title} +
{index + 1}{`${user.firstName} ${user.lastName}`}{user.email} + + + +
+ )}
)} diff --git a/src/screens/Roles/Roles.module.css b/src/screens/Users/Users.module.css similarity index 100% rename from src/screens/Roles/Roles.module.css rename to src/screens/Users/Users.module.css diff --git a/src/screens/Roles/Roles.test.tsx b/src/screens/Users/Users.test.tsx similarity index 96% rename from src/screens/Roles/Roles.test.tsx rename to src/screens/Users/Users.test.tsx index a85ed9eda5..bc375bcc3d 100644 --- a/src/screens/Roles/Roles.test.tsx +++ b/src/screens/Users/Users.test.tsx @@ -18,8 +18,7 @@ import { import { store } from 'state/store'; import { StaticMockLink } from 'utils/StaticMockLink'; import i18nForTest from 'utils/i18nForTest'; -import Roles from './Roles'; -import { debug } from 'jest-preview'; +import Users from './Users'; const MOCKS = [ { @@ -215,7 +214,7 @@ async function wait(ms = 100): Promise { }); } -describe('Testing Roles screen', () => { +describe('Testing Users screen', () => { test('Component should be rendered properly', async () => { window.location.assign('/orglist'); @@ -224,7 +223,7 @@ describe('Testing Roles screen', () => { - + @@ -232,7 +231,7 @@ describe('Testing Roles screen', () => { ); await wait(); - expect(screen.getAllByText(/Users List/i)).toBeTruthy(); + expect(screen.getAllByText(/Users/i)).toBeTruthy(); expect(window.location).toBeAt('/orglist'); }); @@ -251,7 +250,7 @@ describe('Testing Roles screen', () => { - + @@ -278,7 +277,7 @@ describe('Testing Roles screen', () => { - + @@ -296,7 +295,7 @@ describe('Testing Roles screen', () => { - + @@ -328,7 +327,7 @@ describe('Testing Roles screen', () => { - + @@ -346,7 +345,7 @@ describe('Testing Roles screen', () => { - + @@ -364,7 +363,7 @@ describe('Testing Roles screen', () => { - + @@ -372,7 +371,6 @@ describe('Testing Roles screen', () => { ); await wait(200); - debug(); expect(container.textContent).toMatch( 'Organizations not found, please create an organization through dashboard' ); @@ -385,7 +383,7 @@ describe('Testing Roles screen', () => { - + @@ -419,7 +417,7 @@ describe('Testing Roles screen', () => { - + @@ -454,7 +452,7 @@ describe('Testing Roles screen', () => { - + diff --git a/src/screens/Roles/Roles.tsx b/src/screens/Users/Users.tsx similarity index 65% rename from src/screens/Roles/Roles.tsx rename to src/screens/Users/Users.tsx index 0fbb60a459..ccf70cb712 100644 --- a/src/screens/Roles/Roles.tsx +++ b/src/screens/Users/Users.tsx @@ -15,13 +15,14 @@ import { } from 'GraphQl/Queries/Queries'; import SuperAdminScreen from 'components/SuperAdminScreen/SuperAdminScreen'; import { errorHandler } from 'utils/errorHandler'; -import styles from './Roles.module.css'; +import styles from './Users.module.css'; import type { InterfaceUserType } from 'utils/interfaces'; import { UPDATE_USERTYPE_MUTATION } from 'GraphQl/Mutations/mutations'; import debounce from 'utils/debounce'; +import TableLoader from 'components/TableLoader/TableLoader'; -const Roles = (): JSX.Element => { - const { t } = useTranslation('translation', { keyPrefix: 'roles' }); +const Users = (): JSX.Element => { + const { t } = useTranslation('translation', { keyPrefix: 'users' }); document.title = t('title'); @@ -110,13 +111,16 @@ const Roles = (): JSX.Element => { const debouncedHandleSearchByName = debounce(handleSearchByName); + const headerTitles: string[] = [ + '#', + t('name'), + t('email'), + t('roles_userType'), + ]; + return ( <> - + {/* Buttons Container */}
@@ -175,75 +179,84 @@ const Roles = (): JSX.Element => {
- {loadingUsers ? ( -
-

{t('loadingUsers')}

-
- ) : dataUsers.users.length === 0 && searchByName.length > 0 ? ( + {loadingUsers == false && + dataUsers && + dataUsers.users.length === 0 && + searchByName.length > 0 ? (

{t('noResultsFoundFor')} "{searchByName}"

- ) : dataUsers && dataUsers.users.length === 0 ? ( + ) : loadingUsers == false && + dataUsers && + dataUsers.users.length === 0 ? ( + // eslint-disable-next-line react/jsx-indent

{t('noUserFound')}

) : (
- - - - - - - - - - - {dataUsers && - dataUsers?.users.map( - ( - user: { - _id: string; - firstName: string; - lastName: string; - email: string; - userType: string; - }, - index: number - ) => { + {loadingUsers ? ( + + ) : ( +
#{t('name')}{t('email')}{t('roles_userType')}
+ + + {headerTitles.map((title: string, index: number) => { return ( - - - - - - + ); - } - )} - -
{index + 1}{`${user.firstName} ${user.lastName}`}{user.email} - -
+ {title} +
+ })} + + + + {dataUsers && + dataUsers?.users.map( + ( + user: { + _id: string; + firstName: string; + lastName: string; + email: string; + userType: string; + }, + index: number + ) => { + return ( + + {index + 1} + {`${user.firstName} ${user.lastName}`} + {user.email} + + + + + ); + } + )} + + + )}
)}
@@ -251,4 +264,4 @@ const Roles = (): JSX.Element => { ); }; -export default Roles; +export default Users; diff --git a/src/state/reducers/routesReducer.test.ts b/src/state/reducers/routesReducer.test.ts index be7e1b41bf..89743a8508 100644 --- a/src/state/reducers/routesReducer.test.ts +++ b/src/state/reducers/routesReducer.test.ts @@ -13,7 +13,6 @@ describe('Testing Routes reducer', () => { { name: 'Dashboard', url: '/orgdash/id=undefined' }, { name: 'People', url: '/orgpeople/id=undefined' }, { name: 'Events', url: '/orgevents/id=undefined' }, - // { name: 'Contributions', url: '/orgcontribution/id=undefined' }, { name: 'Posts', url: '/orgpost/id=undefined' }, { name: 'Block/Unblock', @@ -29,6 +28,8 @@ describe('Testing Routes reducer', () => { }, ], }, + { name: 'Settings', url: '/orgsetting/id=undefined' }, + { name: 'All Organizations', url: '/orglist/id=undefined' }, ], configUrl: 'undefined', components: [ @@ -47,11 +48,6 @@ describe('Testing Routes reducer', () => { comp_id: 'orgevents', component: 'OrganizationEvents', }, - // { - // name: 'Contributions', - // comp_id: 'orgcontribution', - // component: 'OrgContribution', - // }, { name: 'Posts', comp_id: 'orgpost', component: 'OrgPost' }, { name: 'Block/Unblock', comp_id: 'blockuser', component: 'BlockUser' }, { @@ -67,8 +63,8 @@ describe('Testing Routes reducer', () => { }, ], }, - { name: '', comp_id: 'orglist', component: 'OrgList' }, - { name: '', comp_id: 'orgsetting', component: 'OrgSettings' }, + { name: 'Settings', comp_id: 'orgsetting', component: 'OrgSettings' }, + { name: 'All Organizations', comp_id: 'orglist', component: 'OrgList' }, { name: '', comp_id: 'member', component: 'MemberDetail' }, ], }); @@ -85,7 +81,6 @@ describe('Testing Routes reducer', () => { { name: 'Dashboard', url: '/orgdash/id=undefined' }, { name: 'People', url: '/orgpeople/id=undefined' }, { name: 'Events', url: '/orgevents/id=undefined' }, - // { name: 'Contributions', url: '/orgcontribution/id=undefined' }, { name: 'Posts', url: '/orgpost/id=undefined' }, { name: 'Block/Unblock', url: '/blockuser/id=undefined' }, { @@ -98,6 +93,8 @@ describe('Testing Routes reducer', () => { }, ], }, + { name: 'Settings', url: '/orgsetting/id=undefined' }, + { name: 'All Organizations', url: '/orglist/id=undefined' }, { test: 'testupdate' }, ], configUrl: 'undefined', @@ -117,11 +114,6 @@ describe('Testing Routes reducer', () => { comp_id: 'orgevents', component: 'OrganizationEvents', }, - // { - // name: 'Contributions', - // comp_id: 'orgcontribution', - // component: 'OrgContribution', - // }, { name: 'Posts', comp_id: 'orgpost', component: 'OrgPost' }, { name: 'Block/Unblock', comp_id: 'blockuser', component: 'BlockUser' }, { @@ -137,8 +129,8 @@ describe('Testing Routes reducer', () => { }, ], }, - { name: '', comp_id: 'orglist', component: 'OrgList' }, - { name: '', comp_id: 'orgsetting', component: 'OrgSettings' }, + { name: 'Settings', comp_id: 'orgsetting', component: 'OrgSettings' }, + { name: 'All Organizations', comp_id: 'orglist', component: 'OrgList' }, { name: '', comp_id: 'member', component: 'MemberDetail' }, ], }); @@ -155,12 +147,13 @@ describe('Testing Routes reducer', () => { { name: 'Dashboard', url: '/orgdash/id=undefined' }, { name: 'People', url: '/orgpeople/id=undefined' }, { name: 'Events', url: '/orgevents/id=undefined' }, - // { name: 'Contributions', url: '/orgcontribution/id=undefined' }, { name: 'Posts', url: '/orgpost/id=undefined' }, { name: 'Block/Unblock', url: '/blockuser/id=undefined', }, + { name: 'Settings', url: '/orgsetting/id=undefined' }, + { name: 'All Organizations', url: '/orglist/id=undefined' }, { comp_id: null, component: null, @@ -192,11 +185,6 @@ describe('Testing Routes reducer', () => { comp_id: 'orgevents', component: 'OrganizationEvents', }, - // { - // name: 'Contributions', - // comp_id: 'orgcontribution', - // component: 'OrgContribution', - // }, { name: 'Posts', comp_id: 'orgpost', component: 'OrgPost' }, { name: 'Block/Unblock', comp_id: 'blockuser', component: 'BlockUser' }, { @@ -212,8 +200,8 @@ describe('Testing Routes reducer', () => { }, ], }, - { name: '', comp_id: 'orglist', component: 'OrgList' }, - { name: '', comp_id: 'orgsetting', component: 'OrgSettings' }, + { name: 'Settings', comp_id: 'orgsetting', component: 'OrgSettings' }, + { name: 'All Organizations', comp_id: 'orglist', component: 'OrgList' }, { name: '', comp_id: 'member', component: 'MemberDetail' }, ], }); diff --git a/src/state/reducers/routesReducer.ts b/src/state/reducers/routesReducer.ts index fe06cd75b0..d0d5a7ab26 100644 --- a/src/state/reducers/routesReducer.ts +++ b/src/state/reducers/routesReducer.ts @@ -39,16 +39,33 @@ const reducer = ( } }; +export type ComponentType = { + name: string; + comp_id: string | null; + component: string | null; + subTargets?: { + name: string; + comp_id: string; + component: string; + icon?: string; + }[]; +}; + +export type TargetsType = { + name: string; + url?: string; + subTargets?: { + name: any; + url: string; + icon: any; + }[]; +}; + // Note: Routes with names appear on NavBar -const components = [ +const components: ComponentType[] = [ { name: 'Dashboard', comp_id: 'orgdash', component: 'OrganizationDashboard' }, { name: 'People', comp_id: 'orgpeople', component: 'OrganizationPeople' }, { name: 'Events', comp_id: 'orgevents', component: 'OrganizationEvents' }, - // { - // name: 'Contributions', - // comp_id: 'orgcontribution', - // component: 'OrgContribution', - // }, { name: 'Posts', comp_id: 'orgpost', component: 'OrgPost' }, { name: 'Block/Unblock', comp_id: 'blockuser', component: 'BlockUser' }, { @@ -64,20 +81,20 @@ const components = [ }, ], }, - { name: '', comp_id: 'orglist', component: 'OrgList' }, - { name: '', comp_id: 'orgsetting', component: 'OrgSettings' }, + { name: 'Settings', comp_id: 'orgsetting', component: 'OrgSettings' }, + { name: 'All Organizations', comp_id: 'orglist', component: 'OrgList' }, { name: '', comp_id: 'member', component: 'MemberDetail' }, ]; -const generateRoutes = (comps: any[]): any[] => { +const generateRoutes = (comps: ComponentType[]): TargetsType[] => { return comps .filter((comp) => comp.name && comp.name !== '') .map((comp) => { - const entry = comp.comp_id + const entry: TargetsType = comp.comp_id ? { name: comp.name, url: `/${comp.comp_id}/id=${currentOrg}` } : { name: comp.name, - subTargets: comp.subTargets.map((subTarget: any) => { + subTargets: comp.subTargets?.map((subTarget: any) => { return { name: subTarget.name, url: `/${subTarget.comp_id}/id=${currentOrg}`, @@ -89,7 +106,7 @@ const generateRoutes = (comps: any[]): any[] => { }); }; -const INITIAL_STATE: any = { +const INITIAL_STATE = { targets: generateRoutes(components), configUrl: `${currentOrg}`, components, diff --git a/src/utils/interfaces.ts b/src/utils/interfaces.ts index 4e5e9f98df..44994640f8 100644 --- a/src/utils/interfaces.ts +++ b/src/utils/interfaces.ts @@ -34,3 +34,42 @@ export interface InterfaceOrgConnectionInfoType { export interface InterfaceOrgConnectionType { organizationsConnection: InterfaceOrgConnectionInfoType[]; } + +export interface InterfaceQueryOrganizationsListObject { + _id: string; + image: string | null; + creator: { + firstName: string; + lastName: string; + email: string; + }; + name: string; + description: string; + location: string; + members: { + _id: string; + firstName: string; + lastName: string; + email: string; + }[]; + admins: { + _id: string; + firstName: string; + lastName: string; + email: string; + }[]; + membershipRequests: { + _id: string; + user: { + firstName: string; + lastName: string; + email: string; + }; + }[]; + blockedUsers: { + _id: string; + firstName: string; + lastName: string; + email: string; + }[]; +} From 861b1c5ff762cef0808798395751b24488bb0a91 Mon Sep 17 00:00:00 2001 From: tasneemkoushar <76212518+rishav-jha-mech@users.noreply.github.com> Date: Sun, 3 Sep 2023 12:49:29 +0000 Subject: [PATCH 3/9] Update documentation --- package.json | 2 +- talawa-admin-docs/.nojekyll | 1 + talawa-admin-docs/README.md | 40 ++++ ..._support_services_Plugin_helper.default.md | 71 +++++++ ..._support_services_Render_helper.default.md | 17 ++ ..._CheckIn_types.InterfaceAttendeeCheckIn.md | 43 +++++ ...In_types.InterfaceAttendeeQueryResponse.md | 28 +++ ...onents_CheckIn_types.InterfaceModalProp.md | 51 +++++ ...nts_CheckIn_types.InterfaceTableCheckIn.md | 65 +++++++ ...onents_CheckIn_types.InterfaceTableData.md | 43 +++++ .../components_CheckIn_types.InterfaceUser.md | 43 +++++ ...leDropdown.InterfaceCollapsibleDropdown.md | 32 ++++ ...nt_IconComponent.InterfaceIconComponent.md | 54 ++++++ ..._LeftDrawerOrg.InterfaceLeftDrawerProps.md | 65 +++++++ ...wer_LeftDrawer.InterfaceLeftDrawerProps.md | 43 +++++ ...d_OrgListCard.InterfaceOrgListCardProps.md | 21 ++ ...Screen.InterfaceOrganizationScreenProps.md | 43 +++++ ...inScreen.InterfaceSuperAdminScreenProps.md | 43 +++++ talawa-admin-docs/modules.md | 181 ++++++++++++++++++ .../modules/components_AddOn_AddOn.default.md | 48 +++++ .../modules/components_AddOn_AddOn.md | 33 ++++ .../modules/components_AddOn_AddOn_test.md | 3 + ...ddOn_core_AddOnEntry_AddOnEntry.default.md | 52 +++++ ...onents_AddOn_core_AddOnEntry_AddOnEntry.md | 33 ++++ ...s_AddOn_core_AddOnEntry_AddOnEntry_test.md | 3 + ...ore_AddOnRegister_AddOnRegister.default.md | 44 +++++ ..._AddOn_core_AddOnRegister_AddOnRegister.md | 33 ++++ ...n_core_AddOnRegister_AddOnRegister_test.md | 3 + ...ddOn_core_AddOnStore_AddOnStore.default.md | 32 ++++ ...onents_AddOn_core_AddOnStore_AddOnStore.md | 27 +++ ...s_AddOn_core_AddOnStore_AddOnStore_test.md | 3 + ..._AddOn_support_components_Action_Action.md | 29 +++ ...n_support_components_Action_Action_test.md | 3 + ...port_components_MainContent_MainContent.md | 29 +++ ...components_MainContent_MainContent_test.md | 3 + ..._support_components_SidePanel_SidePanel.md | 29 +++ ...ort_components_SidePanel_SidePanel_test.md | 3 + ...ts_AddOn_support_services_Plugin_helper.md | 9 + ...ts_AddOn_support_services_Render_helper.md | 9 + ...LanguageDropdown_ChangeLanguageDropDown.md | 50 +++++ ...ageDropdown_ChangeLanguageDropdown_test.md | 3 + .../components_CheckIn_CheckInModal.md | 29 +++ .../components_CheckIn_CheckInModal_test.md | 3 + .../components_CheckIn_CheckInWrapper.md | 29 +++ .../components_CheckIn_CheckInWrapper_test.md | 3 + .../modules/components_CheckIn_TableRow.md | 31 +++ .../components_CheckIn_TableRow_test.md | 3 + .../modules/components_CheckIn_mocks.md | 41 ++++ .../modules/components_CheckIn_tagTemplate.md | 19 ++ .../modules/components_CheckIn_types.md | 14 ++ ...CollapsibleDropdown_CollapsibleDropdown.md | 33 ++++ ...psibleDropdown_CollapsibleDropdown_test.md | 3 + .../components_ContriStats_ContriStats.md | 29 +++ ...components_ContriStats_ContriStats_test.md | 3 + .../components_EventCalendar_EventCalendar.md | 30 +++ ...onents_EventCalendar_EventCalendar_test.md | 3 + .../components_EventListCard_EventListCard.md | 29 +++ ...onents_EventListCard_EventListCard_test.md | 3 + ...EventProjectModals_AddEventProjectModal.md | 29 +++ ...ProjectModals_AddEventProjectModal_test.md | 3 + ...ntProjectModals_DeleteEventProjectModal.md | 29 +++ ...jectModals_DeleteEventProjectModal_test.md | 3 + ...ntProjectModals_UpdateEventProjectModal.md | 29 +++ ...jectModals_UpdateEventProjectModal_test.md | 3 + ...tRegistrantsModal_EventRegistrantsModal.md | 29 +++ ...strantsModal_EventRegistrantsModal_test.md | 3 + ...egistrantsModal_EventRegistrantsWrapper.md | 29 +++ ...rantsModal_EventRegistrantsWrapper_test.md | 3 + .../components_IconComponent_IconComponent.md | 33 ++++ ...onents_IconComponent_IconComponent_test.md | 3 + .../components_LandingPage_LandingPage.md | 23 +++ ...components_LandingPage_LandingPage_test.md | 3 + .../components_LeftDrawerOrg_LeftDrawerOrg.md | 33 ++++ ...onents_LeftDrawerOrg_LeftDrawerOrg_test.md | 3 + .../components_LeftDrawer_LeftDrawer.md | 33 ++++ .../components_LeftDrawer_LeftDrawer_test.md | 3 + .../modules/components_Loader_Loader.md | 23 +++ .../modules/components_Loader_Loader_test.md | 3 + ...nts_MemberRequestCard_MemberRequestCard.md | 29 +++ ...emberRequestCard_MemberRequestCard_test.md | 3 + .../modules/components_NotFound_NotFound.md | 29 +++ .../components_NotFound_NotFound_test.md | 3 + ...nents_OrgAdminListCard_OrgAdminListCard.md | 29 +++ ..._OrgAdminListCard_OrgAdminListCard_test.md | 3 + ...omponents_OrgContriCards_OrgContriCards.md | 29 +++ ...ents_OrgContriCards_OrgContriCards_test.md | 3 + .../modules/components_OrgDelete_OrgDelete.md | 23 +++ .../components_OrgDelete_OrgDelete_test.md | 3 + .../components_OrgListCard_OrgListCard.md | 33 ++++ ...components_OrgListCard_OrgListCard_test.md | 3 + ...nts_OrgPeopleListCard_OrgPeopleListCard.md | 29 +++ ...rgPeopleListCard_OrgPeopleListCard_test.md | 3 + .../components_OrgPostCard_OrgPostCard.md | 29 +++ ...components_OrgPostCard_OrgPostCard_test.md | 3 + .../modules/components_OrgUpdate_OrgUpdate.md | 29 +++ .../components_OrgUpdate_OrgUpdate_test.md | 3 + ...nizationCardStart_OrganizationCardStart.md | 29 +++ ...ionCardStart_OrganizationCardStart_test.md | 3 + ...nents_OrganizationCard_OrganizationCard.md | 29 +++ ..._OrganizationCard_OrganizationCard_test.md | 3 + ...s_OrganizationScreen_OrganizationScreen.md | 33 ++++ ...anizationScreen_OrganizationScreen_test.md | 3 + ...omponents_PaginationList_PaginationList.md | 29 +++ .../components_Pagination_Pagination.md | 29 +++ .../components_Pagination_Pagination_test.md | 3 + .../components_SecuredRoute_SecuredRoute.md | 29 +++ ...nents_SuperAdminScreen_SuperAdminScreen.md | 33 ++++ ..._SuperAdminScreen_SuperAdminScreen_test.md | 3 + .../components_TableLoader_TableLoader.md | 29 +++ ...components_TableLoader_TableLoader_test.md | 3 + .../components_TaskListItem_TaskListItem.md | 29 +++ ...mponents_TaskListItem_TaskListItem_test.md | 3 + .../components_TaskModals_AddTaskModal.md | 29 +++ ...components_TaskModals_AddTaskModal_test.md | 3 + .../components_TaskModals_DeleteTaskModal.md | 29 +++ ...ponents_TaskModals_DeleteTaskModal_test.md | 3 + ...ponents_TaskModals_ManageVolunteerModal.md | 29 +++ ...ts_TaskModals_ManageVolunteerModal_test.md | 3 + .../components_TaskModals_UpdateTaskModal.md | 55 ++++++ ...ponents_TaskModals_UpdateTaskModal_test.md | 3 + .../components_UserListCard_UserListCard.md | 29 +++ ...mponents_UserListCard_UserListCard_test.md | 3 + ...s_UserPasswordUpdate_UserPasswordUpdate.md | 30 +++ ...rPasswordUpdate_UserPasswordUpdate_test.md | 3 + ...ts_UserPortal_DonationCard_DonationCard.md | 29 +++ .../components_UserPortal_Login_Login.md | 29 +++ .../components_UserPortal_Login_Login_test.md | 3 + ...ortal_OrganizationCard_OrganizationCard.md | 29 +++ ..._OrganizationCard_OrganizationCard_test.md | 3 + ...l_OrganizationNavbar_OrganizationNavbar.md | 29 +++ ...anizationNavbar_OrganizationNavbar_test.md | 3 + ...OrganizationSidebar_OrganizationSidebar.md | 23 +++ ...izationSidebar_OrganizationSidebar_test.md | 3 + ...onents_UserPortal_PeopleCard_PeopleCard.md | 29 +++ ...s_UserPortal_PeopleCard_PeopleCard_test.md | 3 + ...components_UserPortal_PostCard_PostCard.md | 29 +++ ...nents_UserPortal_PostCard_PostCard_test.md | 3 + ...components_UserPortal_Register_Register.md | 29 +++ ...nents_UserPortal_Register_Register_test.md | 3 + ...SecuredRouteForUser_SecuredRouteForUser.md | 29 +++ ...onents_UserPortal_UserNavbar_UserNavbar.md | 23 +++ ...s_UserPortal_UserNavbar_UserNavbar_test.md | 3 + ...ents_UserPortal_UserSidebar_UserSidebar.md | 23 +++ ...UserPortal_UserSidebar_UserSidebar_test.md | 3 + .../components_UserUpdate_UserUpdate.md | 30 +++ .../components_UserUpdate_UserUpdate_test.md | 3 + .../modules/components_plugins.md | 22 +++ ...ugins_DummyPlugin2_DummyPlugin2.default.md | 32 ++++ ...nents_plugins_DummyPlugin2_DummyPlugin2.md | 27 +++ ..._plugins_DummyPlugin2_DummyPlugin2_test.md | 3 + ...plugins_DummyPlugin_DummyPlugin.default.md | 32 ++++ ...ponents_plugins_DummyPlugin_DummyPlugin.md | 27 +++ ...ts_plugins_DummyPlugin_DummyPlugin_test.md | 3 + .../modules/screens_BlockUser_BlockUser.md | 23 +++ .../screens_BlockUser_BlockUser_test.md | 3 + .../screens_EventDashboard_EventDashboard.md | 23 +++ ...ens_EventDashboard_EventDashboard_mocks.md | 52 +++++ ...eens_EventDashboard_EventDashboard_test.md | 3 + .../screens_ForgotPassword_ForgotPassword.md | 23 +++ ...eens_ForgotPassword_ForgotPassword_test.md | 3 + .../modules/screens_LoginPage_LoginPage.md | 23 +++ .../screens_LoginPage_LoginPage_test.md | 3 + .../screens_MemberDetail_MemberDetail.md | 72 +++++++ .../screens_MemberDetail_MemberDetail_test.md | 3 + ...screens_OrgContribution_OrgContribution.md | 23 +++ ...ns_OrgContribution_OrgContribution_test.md | 3 + .../modules/screens_OrgList_OrgList.md | 23 +++ .../modules/screens_OrgList_OrgListMocks.md | 41 ++++ .../modules/screens_OrgList_OrgList_test.md | 3 + .../modules/screens_OrgPost_OrgPost.md | 23 +++ .../modules/screens_OrgPost_OrgPost_test.md | 3 + .../screens_OrgSettings_OrgSettings.md | 23 +++ .../screens_OrgSettings_OrgSettings_test.md | 3 + ...nizationDashboard_OrganizationDashboard.md | 23 +++ ...ionDashboard_OrganizationDashboardMocks.md | 41 ++++ ...ionDashboard_OrganizationDashboard_test.md | 3 + ...s_OrganizationEvents_OrganizationEvents.md | 23 +++ ...anizationEvents_OrganizationEvents_test.md | 3 + ...s_OrganizationPeople_OrganizationPeople.md | 23 +++ ...anizationPeople_OrganizationPeople_test.md | 3 + .../screens_PageNotFound_PageNotFound.md | 23 +++ .../screens_PageNotFound_PageNotFound_test.md | 3 + .../modules/screens_Requests_Requests.md | 23 +++ .../modules/screens_Requests_Requests_test.md | 3 + .../screens_UserPortal_Donate_Donate.md | 23 +++ .../screens_UserPortal_Donate_Donate_test.md | 3 + .../modules/screens_UserPortal_Home_Home.md | 23 +++ .../screens_UserPortal_Home_Home_test.md | 3 + ..._UserPortal_Organizations_Organizations.md | 23 +++ ...Portal_Organizations_Organizations_test.md | 3 + .../screens_UserPortal_People_People.md | 23 +++ .../screens_UserPortal_People_People_test.md | 3 + .../screens_UserPortal_Settings_Settings.md | 23 +++ ...reens_UserPortal_Settings_Settings_test.md | 3 + ..._UserPortal_UserLoginPage_UserLoginPage.md | 23 +++ ...Portal_UserLoginPage_UserLoginPage_test.md | 3 + .../modules/screens_Users_Users.md | 23 +++ .../modules/screens_Users_Users_test.md | 3 + talawa-admin-docs/xyz.md | 1 - 199 files changed, 4022 insertions(+), 2 deletions(-) create mode 100644 talawa-admin-docs/.nojekyll create mode 100644 talawa-admin-docs/README.md create mode 100644 talawa-admin-docs/classes/components_AddOn_support_services_Plugin_helper.default.md create mode 100644 talawa-admin-docs/classes/components_AddOn_support_services_Render_helper.default.md create mode 100644 talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceAttendeeCheckIn.md create mode 100644 talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceAttendeeQueryResponse.md create mode 100644 talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceModalProp.md create mode 100644 talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceTableCheckIn.md create mode 100644 talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceTableData.md create mode 100644 talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceUser.md create mode 100644 talawa-admin-docs/interfaces/components_CollapsibleDropdown_CollapsibleDropdown.InterfaceCollapsibleDropdown.md create mode 100644 talawa-admin-docs/interfaces/components_IconComponent_IconComponent.InterfaceIconComponent.md create mode 100644 talawa-admin-docs/interfaces/components_LeftDrawerOrg_LeftDrawerOrg.InterfaceLeftDrawerProps.md create mode 100644 talawa-admin-docs/interfaces/components_LeftDrawer_LeftDrawer.InterfaceLeftDrawerProps.md create mode 100644 talawa-admin-docs/interfaces/components_OrgListCard_OrgListCard.InterfaceOrgListCardProps.md create mode 100644 talawa-admin-docs/interfaces/components_OrganizationScreen_OrganizationScreen.InterfaceOrganizationScreenProps.md create mode 100644 talawa-admin-docs/interfaces/components_SuperAdminScreen_SuperAdminScreen.InterfaceSuperAdminScreenProps.md create mode 100644 talawa-admin-docs/modules.md create mode 100644 talawa-admin-docs/modules/components_AddOn_AddOn.default.md create mode 100644 talawa-admin-docs/modules/components_AddOn_AddOn.md create mode 100644 talawa-admin-docs/modules/components_AddOn_AddOn_test.md create mode 100644 talawa-admin-docs/modules/components_AddOn_core_AddOnEntry_AddOnEntry.default.md create mode 100644 talawa-admin-docs/modules/components_AddOn_core_AddOnEntry_AddOnEntry.md create mode 100644 talawa-admin-docs/modules/components_AddOn_core_AddOnEntry_AddOnEntry_test.md create mode 100644 talawa-admin-docs/modules/components_AddOn_core_AddOnRegister_AddOnRegister.default.md create mode 100644 talawa-admin-docs/modules/components_AddOn_core_AddOnRegister_AddOnRegister.md create mode 100644 talawa-admin-docs/modules/components_AddOn_core_AddOnRegister_AddOnRegister_test.md create mode 100644 talawa-admin-docs/modules/components_AddOn_core_AddOnStore_AddOnStore.default.md create mode 100644 talawa-admin-docs/modules/components_AddOn_core_AddOnStore_AddOnStore.md create mode 100644 talawa-admin-docs/modules/components_AddOn_core_AddOnStore_AddOnStore_test.md create mode 100644 talawa-admin-docs/modules/components_AddOn_support_components_Action_Action.md create mode 100644 talawa-admin-docs/modules/components_AddOn_support_components_Action_Action_test.md create mode 100644 talawa-admin-docs/modules/components_AddOn_support_components_MainContent_MainContent.md create mode 100644 talawa-admin-docs/modules/components_AddOn_support_components_MainContent_MainContent_test.md create mode 100644 talawa-admin-docs/modules/components_AddOn_support_components_SidePanel_SidePanel.md create mode 100644 talawa-admin-docs/modules/components_AddOn_support_components_SidePanel_SidePanel_test.md create mode 100644 talawa-admin-docs/modules/components_AddOn_support_services_Plugin_helper.md create mode 100644 talawa-admin-docs/modules/components_AddOn_support_services_Render_helper.md create mode 100644 talawa-admin-docs/modules/components_ChangeLanguageDropdown_ChangeLanguageDropDown.md create mode 100644 talawa-admin-docs/modules/components_ChangeLanguageDropdown_ChangeLanguageDropdown_test.md create mode 100644 talawa-admin-docs/modules/components_CheckIn_CheckInModal.md create mode 100644 talawa-admin-docs/modules/components_CheckIn_CheckInModal_test.md create mode 100644 talawa-admin-docs/modules/components_CheckIn_CheckInWrapper.md create mode 100644 talawa-admin-docs/modules/components_CheckIn_CheckInWrapper_test.md create mode 100644 talawa-admin-docs/modules/components_CheckIn_TableRow.md create mode 100644 talawa-admin-docs/modules/components_CheckIn_TableRow_test.md create mode 100644 talawa-admin-docs/modules/components_CheckIn_mocks.md create mode 100644 talawa-admin-docs/modules/components_CheckIn_tagTemplate.md create mode 100644 talawa-admin-docs/modules/components_CheckIn_types.md create mode 100644 talawa-admin-docs/modules/components_CollapsibleDropdown_CollapsibleDropdown.md create mode 100644 talawa-admin-docs/modules/components_CollapsibleDropdown_CollapsibleDropdown_test.md create mode 100644 talawa-admin-docs/modules/components_ContriStats_ContriStats.md create mode 100644 talawa-admin-docs/modules/components_ContriStats_ContriStats_test.md create mode 100644 talawa-admin-docs/modules/components_EventCalendar_EventCalendar.md create mode 100644 talawa-admin-docs/modules/components_EventCalendar_EventCalendar_test.md create mode 100644 talawa-admin-docs/modules/components_EventListCard_EventListCard.md create mode 100644 talawa-admin-docs/modules/components_EventListCard_EventListCard_test.md create mode 100644 talawa-admin-docs/modules/components_EventProjectModals_AddEventProjectModal.md create mode 100644 talawa-admin-docs/modules/components_EventProjectModals_AddEventProjectModal_test.md create mode 100644 talawa-admin-docs/modules/components_EventProjectModals_DeleteEventProjectModal.md create mode 100644 talawa-admin-docs/modules/components_EventProjectModals_DeleteEventProjectModal_test.md create mode 100644 talawa-admin-docs/modules/components_EventProjectModals_UpdateEventProjectModal.md create mode 100644 talawa-admin-docs/modules/components_EventProjectModals_UpdateEventProjectModal_test.md create mode 100644 talawa-admin-docs/modules/components_EventRegistrantsModal_EventRegistrantsModal.md create mode 100644 talawa-admin-docs/modules/components_EventRegistrantsModal_EventRegistrantsModal_test.md create mode 100644 talawa-admin-docs/modules/components_EventRegistrantsModal_EventRegistrantsWrapper.md create mode 100644 talawa-admin-docs/modules/components_EventRegistrantsModal_EventRegistrantsWrapper_test.md create mode 100644 talawa-admin-docs/modules/components_IconComponent_IconComponent.md create mode 100644 talawa-admin-docs/modules/components_IconComponent_IconComponent_test.md create mode 100644 talawa-admin-docs/modules/components_LandingPage_LandingPage.md create mode 100644 talawa-admin-docs/modules/components_LandingPage_LandingPage_test.md create mode 100644 talawa-admin-docs/modules/components_LeftDrawerOrg_LeftDrawerOrg.md create mode 100644 talawa-admin-docs/modules/components_LeftDrawerOrg_LeftDrawerOrg_test.md create mode 100644 talawa-admin-docs/modules/components_LeftDrawer_LeftDrawer.md create mode 100644 talawa-admin-docs/modules/components_LeftDrawer_LeftDrawer_test.md create mode 100644 talawa-admin-docs/modules/components_Loader_Loader.md create mode 100644 talawa-admin-docs/modules/components_Loader_Loader_test.md create mode 100644 talawa-admin-docs/modules/components_MemberRequestCard_MemberRequestCard.md create mode 100644 talawa-admin-docs/modules/components_MemberRequestCard_MemberRequestCard_test.md create mode 100644 talawa-admin-docs/modules/components_NotFound_NotFound.md create mode 100644 talawa-admin-docs/modules/components_NotFound_NotFound_test.md create mode 100644 talawa-admin-docs/modules/components_OrgAdminListCard_OrgAdminListCard.md create mode 100644 talawa-admin-docs/modules/components_OrgAdminListCard_OrgAdminListCard_test.md create mode 100644 talawa-admin-docs/modules/components_OrgContriCards_OrgContriCards.md create mode 100644 talawa-admin-docs/modules/components_OrgContriCards_OrgContriCards_test.md create mode 100644 talawa-admin-docs/modules/components_OrgDelete_OrgDelete.md create mode 100644 talawa-admin-docs/modules/components_OrgDelete_OrgDelete_test.md create mode 100644 talawa-admin-docs/modules/components_OrgListCard_OrgListCard.md create mode 100644 talawa-admin-docs/modules/components_OrgListCard_OrgListCard_test.md create mode 100644 talawa-admin-docs/modules/components_OrgPeopleListCard_OrgPeopleListCard.md create mode 100644 talawa-admin-docs/modules/components_OrgPeopleListCard_OrgPeopleListCard_test.md create mode 100644 talawa-admin-docs/modules/components_OrgPostCard_OrgPostCard.md create mode 100644 talawa-admin-docs/modules/components_OrgPostCard_OrgPostCard_test.md create mode 100644 talawa-admin-docs/modules/components_OrgUpdate_OrgUpdate.md create mode 100644 talawa-admin-docs/modules/components_OrgUpdate_OrgUpdate_test.md create mode 100644 talawa-admin-docs/modules/components_OrganizationCardStart_OrganizationCardStart.md create mode 100644 talawa-admin-docs/modules/components_OrganizationCardStart_OrganizationCardStart_test.md create mode 100644 talawa-admin-docs/modules/components_OrganizationCard_OrganizationCard.md create mode 100644 talawa-admin-docs/modules/components_OrganizationCard_OrganizationCard_test.md create mode 100644 talawa-admin-docs/modules/components_OrganizationScreen_OrganizationScreen.md create mode 100644 talawa-admin-docs/modules/components_OrganizationScreen_OrganizationScreen_test.md create mode 100644 talawa-admin-docs/modules/components_PaginationList_PaginationList.md create mode 100644 talawa-admin-docs/modules/components_Pagination_Pagination.md create mode 100644 talawa-admin-docs/modules/components_Pagination_Pagination_test.md create mode 100644 talawa-admin-docs/modules/components_SecuredRoute_SecuredRoute.md create mode 100644 talawa-admin-docs/modules/components_SuperAdminScreen_SuperAdminScreen.md create mode 100644 talawa-admin-docs/modules/components_SuperAdminScreen_SuperAdminScreen_test.md create mode 100644 talawa-admin-docs/modules/components_TableLoader_TableLoader.md create mode 100644 talawa-admin-docs/modules/components_TableLoader_TableLoader_test.md create mode 100644 talawa-admin-docs/modules/components_TaskListItem_TaskListItem.md create mode 100644 talawa-admin-docs/modules/components_TaskListItem_TaskListItem_test.md create mode 100644 talawa-admin-docs/modules/components_TaskModals_AddTaskModal.md create mode 100644 talawa-admin-docs/modules/components_TaskModals_AddTaskModal_test.md create mode 100644 talawa-admin-docs/modules/components_TaskModals_DeleteTaskModal.md create mode 100644 talawa-admin-docs/modules/components_TaskModals_DeleteTaskModal_test.md create mode 100644 talawa-admin-docs/modules/components_TaskModals_ManageVolunteerModal.md create mode 100644 talawa-admin-docs/modules/components_TaskModals_ManageVolunteerModal_test.md create mode 100644 talawa-admin-docs/modules/components_TaskModals_UpdateTaskModal.md create mode 100644 talawa-admin-docs/modules/components_TaskModals_UpdateTaskModal_test.md create mode 100644 talawa-admin-docs/modules/components_UserListCard_UserListCard.md create mode 100644 talawa-admin-docs/modules/components_UserListCard_UserListCard_test.md create mode 100644 talawa-admin-docs/modules/components_UserPasswordUpdate_UserPasswordUpdate.md create mode 100644 talawa-admin-docs/modules/components_UserPasswordUpdate_UserPasswordUpdate_test.md create mode 100644 talawa-admin-docs/modules/components_UserPortal_DonationCard_DonationCard.md create mode 100644 talawa-admin-docs/modules/components_UserPortal_Login_Login.md create mode 100644 talawa-admin-docs/modules/components_UserPortal_Login_Login_test.md create mode 100644 talawa-admin-docs/modules/components_UserPortal_OrganizationCard_OrganizationCard.md create mode 100644 talawa-admin-docs/modules/components_UserPortal_OrganizationCard_OrganizationCard_test.md create mode 100644 talawa-admin-docs/modules/components_UserPortal_OrganizationNavbar_OrganizationNavbar.md create mode 100644 talawa-admin-docs/modules/components_UserPortal_OrganizationNavbar_OrganizationNavbar_test.md create mode 100644 talawa-admin-docs/modules/components_UserPortal_OrganizationSidebar_OrganizationSidebar.md create mode 100644 talawa-admin-docs/modules/components_UserPortal_OrganizationSidebar_OrganizationSidebar_test.md create mode 100644 talawa-admin-docs/modules/components_UserPortal_PeopleCard_PeopleCard.md create mode 100644 talawa-admin-docs/modules/components_UserPortal_PeopleCard_PeopleCard_test.md create mode 100644 talawa-admin-docs/modules/components_UserPortal_PostCard_PostCard.md create mode 100644 talawa-admin-docs/modules/components_UserPortal_PostCard_PostCard_test.md create mode 100644 talawa-admin-docs/modules/components_UserPortal_Register_Register.md create mode 100644 talawa-admin-docs/modules/components_UserPortal_Register_Register_test.md create mode 100644 talawa-admin-docs/modules/components_UserPortal_SecuredRouteForUser_SecuredRouteForUser.md create mode 100644 talawa-admin-docs/modules/components_UserPortal_UserNavbar_UserNavbar.md create mode 100644 talawa-admin-docs/modules/components_UserPortal_UserNavbar_UserNavbar_test.md create mode 100644 talawa-admin-docs/modules/components_UserPortal_UserSidebar_UserSidebar.md create mode 100644 talawa-admin-docs/modules/components_UserPortal_UserSidebar_UserSidebar_test.md create mode 100644 talawa-admin-docs/modules/components_UserUpdate_UserUpdate.md create mode 100644 talawa-admin-docs/modules/components_UserUpdate_UserUpdate_test.md create mode 100644 talawa-admin-docs/modules/components_plugins.md create mode 100644 talawa-admin-docs/modules/components_plugins_DummyPlugin2_DummyPlugin2.default.md create mode 100644 talawa-admin-docs/modules/components_plugins_DummyPlugin2_DummyPlugin2.md create mode 100644 talawa-admin-docs/modules/components_plugins_DummyPlugin2_DummyPlugin2_test.md create mode 100644 talawa-admin-docs/modules/components_plugins_DummyPlugin_DummyPlugin.default.md create mode 100644 talawa-admin-docs/modules/components_plugins_DummyPlugin_DummyPlugin.md create mode 100644 talawa-admin-docs/modules/components_plugins_DummyPlugin_DummyPlugin_test.md create mode 100644 talawa-admin-docs/modules/screens_BlockUser_BlockUser.md create mode 100644 talawa-admin-docs/modules/screens_BlockUser_BlockUser_test.md create mode 100644 talawa-admin-docs/modules/screens_EventDashboard_EventDashboard.md create mode 100644 talawa-admin-docs/modules/screens_EventDashboard_EventDashboard_mocks.md create mode 100644 talawa-admin-docs/modules/screens_EventDashboard_EventDashboard_test.md create mode 100644 talawa-admin-docs/modules/screens_ForgotPassword_ForgotPassword.md create mode 100644 talawa-admin-docs/modules/screens_ForgotPassword_ForgotPassword_test.md create mode 100644 talawa-admin-docs/modules/screens_LoginPage_LoginPage.md create mode 100644 talawa-admin-docs/modules/screens_LoginPage_LoginPage_test.md create mode 100644 talawa-admin-docs/modules/screens_MemberDetail_MemberDetail.md create mode 100644 talawa-admin-docs/modules/screens_MemberDetail_MemberDetail_test.md create mode 100644 talawa-admin-docs/modules/screens_OrgContribution_OrgContribution.md create mode 100644 talawa-admin-docs/modules/screens_OrgContribution_OrgContribution_test.md create mode 100644 talawa-admin-docs/modules/screens_OrgList_OrgList.md create mode 100644 talawa-admin-docs/modules/screens_OrgList_OrgListMocks.md create mode 100644 talawa-admin-docs/modules/screens_OrgList_OrgList_test.md create mode 100644 talawa-admin-docs/modules/screens_OrgPost_OrgPost.md create mode 100644 talawa-admin-docs/modules/screens_OrgPost_OrgPost_test.md create mode 100644 talawa-admin-docs/modules/screens_OrgSettings_OrgSettings.md create mode 100644 talawa-admin-docs/modules/screens_OrgSettings_OrgSettings_test.md create mode 100644 talawa-admin-docs/modules/screens_OrganizationDashboard_OrganizationDashboard.md create mode 100644 talawa-admin-docs/modules/screens_OrganizationDashboard_OrganizationDashboardMocks.md create mode 100644 talawa-admin-docs/modules/screens_OrganizationDashboard_OrganizationDashboard_test.md create mode 100644 talawa-admin-docs/modules/screens_OrganizationEvents_OrganizationEvents.md create mode 100644 talawa-admin-docs/modules/screens_OrganizationEvents_OrganizationEvents_test.md create mode 100644 talawa-admin-docs/modules/screens_OrganizationPeople_OrganizationPeople.md create mode 100644 talawa-admin-docs/modules/screens_OrganizationPeople_OrganizationPeople_test.md create mode 100644 talawa-admin-docs/modules/screens_PageNotFound_PageNotFound.md create mode 100644 talawa-admin-docs/modules/screens_PageNotFound_PageNotFound_test.md create mode 100644 talawa-admin-docs/modules/screens_Requests_Requests.md create mode 100644 talawa-admin-docs/modules/screens_Requests_Requests_test.md create mode 100644 talawa-admin-docs/modules/screens_UserPortal_Donate_Donate.md create mode 100644 talawa-admin-docs/modules/screens_UserPortal_Donate_Donate_test.md create mode 100644 talawa-admin-docs/modules/screens_UserPortal_Home_Home.md create mode 100644 talawa-admin-docs/modules/screens_UserPortal_Home_Home_test.md create mode 100644 talawa-admin-docs/modules/screens_UserPortal_Organizations_Organizations.md create mode 100644 talawa-admin-docs/modules/screens_UserPortal_Organizations_Organizations_test.md create mode 100644 talawa-admin-docs/modules/screens_UserPortal_People_People.md create mode 100644 talawa-admin-docs/modules/screens_UserPortal_People_People_test.md create mode 100644 talawa-admin-docs/modules/screens_UserPortal_Settings_Settings.md create mode 100644 talawa-admin-docs/modules/screens_UserPortal_Settings_Settings_test.md create mode 100644 talawa-admin-docs/modules/screens_UserPortal_UserLoginPage_UserLoginPage.md create mode 100644 talawa-admin-docs/modules/screens_UserPortal_UserLoginPage_UserLoginPage_test.md create mode 100644 talawa-admin-docs/modules/screens_Users_Users.md create mode 100644 talawa-admin-docs/modules/screens_Users_Users_test.md delete mode 100644 talawa-admin-docs/xyz.md diff --git a/package.json b/package.json index f9d201110b..a24962578a 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "redux": "^4.1.1", "redux-thunk": "^2.3.0", "typedoc": "^0.24.8", - "typedoc-plugin-markdown": "^3.15.4", + "typedoc-plugin-markdown": "^3.16.0", "typescript": "^4.3.5", "web-vitals": "^1.0.1", "yarn": "^1.22.17" diff --git a/talawa-admin-docs/.nojekyll b/talawa-admin-docs/.nojekyll new file mode 100644 index 0000000000..e2ac6616ad --- /dev/null +++ b/talawa-admin-docs/.nojekyll @@ -0,0 +1 @@ +TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. \ No newline at end of file diff --git a/talawa-admin-docs/README.md b/talawa-admin-docs/README.md new file mode 100644 index 0000000000..fb964eb868 --- /dev/null +++ b/talawa-admin-docs/README.md @@ -0,0 +1,40 @@ +talawa-admin / [Modules](modules.md) + +# Talawa Admin +💬 Join the community on Slack. The link can be found in the `Talawa` [README.md](https://github.com/PalisadoesFoundation/talawa) file. + +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![GitHub stars](https://img.shields.io/github/stars/PalisadoesFoundation/talawa-admin.svg?style=social&label=Star&maxAge=2592000)](https://github.com/PalisadoesFoundation/talawa-admin) +[![GitHub forks](https://img.shields.io/github/forks/PalisadoesFoundation/talawa-admin.svg?style=social&label=Fork&maxAge=2592000)](https://github.com/PalisadoesFoundation/talawa-admin) +[![codecov](https://codecov.io/gh/PalisadoesFoundation/talawa-admin/branch/develop/graph/badge.svg?token=II0R0RREES)](https://codecov.io/gh/PalisadoesFoundation/talawa-admin) + +Talawa is a modular open source project to manage group activities of both non-profit organizations and businesses. + +Core features include: + +1. Membership management +2. Groups management +3. Event registrations +4. Recurring meetings +5. Facilities registrations + +`talawa` is based on the original `quito` code created by the [Palisadoes Foundation][pfd] as part of its annual Calico Challenge program. Calico provides paid summer internships for Jamaican university students to work on selected open source projects. They are mentored by software professionals and receive stipends based on the completion of predefined milestones. Calico was started in 2015. Visit [The Palisadoes Foundation's website](http://www.palisadoes.org/) for more details on its origin and activities. + +# Talawa Components + +`talawa` has these major software components: + +1. **talawa**: [A mobile application with social media features](https://github.com/PalisadoesFoundation/talawa) +1. **talawa-api**: [An API providing access to user data and features](https://github.com/PalisadoesFoundation/talawa-api) +1. **talawa-admin**: [A web based administrative portal](https://github.com/PalisadoesFoundation/talawa-admin) +1. **talawa-docs**: [The online documentation website](https://github.com/PalisadoesFoundation/talawa-docs) + +# Documentation + +- The `talawa` documentation can be found [here](https://docs.talawa.io). +- Want to contribute? Look at [CONTRIBUTING.md](https://github.com/PalisadoesFoundation/talawa-admin/blob/develop/CONTRIBUTING.md) to get started. +- Visit the [Talawa-Docs GitHub](https://github.com/PalisadoesFoundation/talawa-docs) to see the code. + +# Installation + +[Follow this guide](https://github.com/PalisadoesFoundation/talawa-admin/blob/develop/INSTALLATION.md) diff --git a/talawa-admin-docs/classes/components_AddOn_support_services_Plugin_helper.default.md b/talawa-admin-docs/classes/components_AddOn_support_services_Plugin_helper.default.md new file mode 100644 index 0000000000..46b911318b --- /dev/null +++ b/talawa-admin-docs/classes/components_AddOn_support_services_Plugin_helper.default.md @@ -0,0 +1,71 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / [components/AddOn/support/services/Plugin.helper](../modules/components_AddOn_support_services_Plugin_helper.md) / default + +# Class: default + +[components/AddOn/support/services/Plugin.helper](../modules/components_AddOn_support_services_Plugin_helper.md).default + +## Table of contents + +### Constructors + +- [constructor](components_AddOn_support_services_Plugin_helper.default.md#constructor) + +### Methods + +- [fetchInstalled](components_AddOn_support_services_Plugin_helper.default.md#fetchinstalled) +- [fetchStore](components_AddOn_support_services_Plugin_helper.default.md#fetchstore) +- [generateLinks](components_AddOn_support_services_Plugin_helper.default.md#generatelinks) + +## Constructors + +### constructor + +• **new default**() + +## Methods + +### fetchInstalled + +▸ **fetchInstalled**(): `Promise`<`any`\> + +#### Returns + +`Promise`<`any`\> + +#### Defined in + +[src/components/AddOn/support/services/Plugin.helper.ts:7](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/AddOn/support/services/Plugin.helper.ts#L7) + +___ + +### fetchStore + +▸ **fetchStore**(): `Promise`<`any`\> + +#### Returns + +`Promise`<`any`\> + +#### Defined in + +[src/components/AddOn/support/services/Plugin.helper.ts:2](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/AddOn/support/services/Plugin.helper.ts#L2) + +___ + +### generateLinks + +▸ **generateLinks**(`plugins`): { `name`: `string` ; `url`: `string` }[] + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `plugins` | `any`[] | + +#### Returns + +{ `name`: `string` ; `url`: `string` }[] + +#### Defined in + +[src/components/AddOn/support/services/Plugin.helper.ts:12](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/AddOn/support/services/Plugin.helper.ts#L12) diff --git a/talawa-admin-docs/classes/components_AddOn_support_services_Render_helper.default.md b/talawa-admin-docs/classes/components_AddOn_support_services_Render_helper.default.md new file mode 100644 index 0000000000..5c184eb819 --- /dev/null +++ b/talawa-admin-docs/classes/components_AddOn_support_services_Render_helper.default.md @@ -0,0 +1,17 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / [components/AddOn/support/services/Render.helper](../modules/components_AddOn_support_services_Render_helper.md) / default + +# Class: default + +[components/AddOn/support/services/Render.helper](../modules/components_AddOn_support_services_Render_helper.md).default + +## Table of contents + +### Constructors + +- [constructor](components_AddOn_support_services_Render_helper.default.md#constructor) + +## Constructors + +### constructor + +• **new default**() diff --git a/talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceAttendeeCheckIn.md b/talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceAttendeeCheckIn.md new file mode 100644 index 0000000000..b3aff6bcbb --- /dev/null +++ b/talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceAttendeeCheckIn.md @@ -0,0 +1,43 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / [components/CheckIn/types](../modules/components_CheckIn_types.md) / InterfaceAttendeeCheckIn + +# Interface: InterfaceAttendeeCheckIn + +[components/CheckIn/types](../modules/components_CheckIn_types.md).InterfaceAttendeeCheckIn + +## Table of contents + +### Properties + +- [\_id](components_CheckIn_types.InterfaceAttendeeCheckIn.md#_id) +- [checkIn](components_CheckIn_types.InterfaceAttendeeCheckIn.md#checkin) +- [user](components_CheckIn_types.InterfaceAttendeeCheckIn.md#user) + +## Properties + +### \_id + +• **\_id**: `string` + +#### Defined in + +[src/components/CheckIn/types.ts:8](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CheckIn/types.ts#L8) + +___ + +### checkIn + +• **checkIn**: ``null`` \| { `_id`: `string` ; `allotedRoom`: `string` ; `allotedSeat`: `string` ; `time`: `string` } + +#### Defined in + +[src/components/CheckIn/types.ts:10](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CheckIn/types.ts#L10) + +___ + +### user + +• **user**: [`InterfaceUser`](components_CheckIn_types.InterfaceUser.md) + +#### Defined in + +[src/components/CheckIn/types.ts:9](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CheckIn/types.ts#L9) diff --git a/talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceAttendeeQueryResponse.md b/talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceAttendeeQueryResponse.md new file mode 100644 index 0000000000..fa7063e500 --- /dev/null +++ b/talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceAttendeeQueryResponse.md @@ -0,0 +1,28 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / [components/CheckIn/types](../modules/components_CheckIn_types.md) / InterfaceAttendeeQueryResponse + +# Interface: InterfaceAttendeeQueryResponse + +[components/CheckIn/types](../modules/components_CheckIn_types.md).InterfaceAttendeeQueryResponse + +## Table of contents + +### Properties + +- [event](components_CheckIn_types.InterfaceAttendeeQueryResponse.md#event) + +## Properties + +### event + +• **event**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `_id` | `string` | +| `attendeesCheckInStatus` | [`InterfaceAttendeeCheckIn`](components_CheckIn_types.InterfaceAttendeeCheckIn.md)[] | + +#### Defined in + +[src/components/CheckIn/types.ts:19](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CheckIn/types.ts#L19) diff --git a/talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceModalProp.md b/talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceModalProp.md new file mode 100644 index 0000000000..9091e555bb --- /dev/null +++ b/talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceModalProp.md @@ -0,0 +1,51 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / [components/CheckIn/types](../modules/components_CheckIn_types.md) / InterfaceModalProp + +# Interface: InterfaceModalProp + +[components/CheckIn/types](../modules/components_CheckIn_types.md).InterfaceModalProp + +## Table of contents + +### Properties + +- [eventId](components_CheckIn_types.InterfaceModalProp.md#eventid) +- [handleClose](components_CheckIn_types.InterfaceModalProp.md#handleclose) +- [show](components_CheckIn_types.InterfaceModalProp.md#show) + +## Properties + +### eventId + +• **eventId**: `string` + +#### Defined in + +[src/components/CheckIn/types.ts:27](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CheckIn/types.ts#L27) + +___ + +### handleClose + +• **handleClose**: () => `void` + +#### Type declaration + +▸ (): `void` + +##### Returns + +`void` + +#### Defined in + +[src/components/CheckIn/types.ts:28](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CheckIn/types.ts#L28) + +___ + +### show + +• **show**: `boolean` + +#### Defined in + +[src/components/CheckIn/types.ts:26](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CheckIn/types.ts#L26) diff --git a/talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceTableCheckIn.md b/talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceTableCheckIn.md new file mode 100644 index 0000000000..f44d4747f4 --- /dev/null +++ b/talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceTableCheckIn.md @@ -0,0 +1,65 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / [components/CheckIn/types](../modules/components_CheckIn_types.md) / InterfaceTableCheckIn + +# Interface: InterfaceTableCheckIn + +[components/CheckIn/types](../modules/components_CheckIn_types.md).InterfaceTableCheckIn + +## Table of contents + +### Properties + +- [checkIn](components_CheckIn_types.InterfaceTableCheckIn.md#checkin) +- [eventId](components_CheckIn_types.InterfaceTableCheckIn.md#eventid) +- [id](components_CheckIn_types.InterfaceTableCheckIn.md#id) +- [name](components_CheckIn_types.InterfaceTableCheckIn.md#name) +- [userId](components_CheckIn_types.InterfaceTableCheckIn.md#userid) + +## Properties + +### checkIn + +• **checkIn**: ``null`` \| { `_id`: `string` ; `allotedRoom`: `string` ; `allotedSeat`: `string` ; `time`: `string` } + +#### Defined in + +[src/components/CheckIn/types.ts:35](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CheckIn/types.ts#L35) + +___ + +### eventId + +• **eventId**: `string` + +#### Defined in + +[src/components/CheckIn/types.ts:41](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CheckIn/types.ts#L41) + +___ + +### id + +• **id**: `string` + +#### Defined in + +[src/components/CheckIn/types.ts:32](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CheckIn/types.ts#L32) + +___ + +### name + +• **name**: `string` + +#### Defined in + +[src/components/CheckIn/types.ts:33](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CheckIn/types.ts#L33) + +___ + +### userId + +• **userId**: `string` + +#### Defined in + +[src/components/CheckIn/types.ts:34](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CheckIn/types.ts#L34) diff --git a/talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceTableData.md b/talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceTableData.md new file mode 100644 index 0000000000..a7cbac4758 --- /dev/null +++ b/talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceTableData.md @@ -0,0 +1,43 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / [components/CheckIn/types](../modules/components_CheckIn_types.md) / InterfaceTableData + +# Interface: InterfaceTableData + +[components/CheckIn/types](../modules/components_CheckIn_types.md).InterfaceTableData + +## Table of contents + +### Properties + +- [checkInData](components_CheckIn_types.InterfaceTableData.md#checkindata) +- [id](components_CheckIn_types.InterfaceTableData.md#id) +- [userName](components_CheckIn_types.InterfaceTableData.md#username) + +## Properties + +### checkInData + +• **checkInData**: [`InterfaceTableCheckIn`](components_CheckIn_types.InterfaceTableCheckIn.md) + +#### Defined in + +[src/components/CheckIn/types.ts:47](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CheckIn/types.ts#L47) + +___ + +### id + +• **id**: `string` + +#### Defined in + +[src/components/CheckIn/types.ts:46](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CheckIn/types.ts#L46) + +___ + +### userName + +• **userName**: `string` + +#### Defined in + +[src/components/CheckIn/types.ts:45](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CheckIn/types.ts#L45) diff --git a/talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceUser.md b/talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceUser.md new file mode 100644 index 0000000000..eb26dccce1 --- /dev/null +++ b/talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceUser.md @@ -0,0 +1,43 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / [components/CheckIn/types](../modules/components_CheckIn_types.md) / InterfaceUser + +# Interface: InterfaceUser + +[components/CheckIn/types](../modules/components_CheckIn_types.md).InterfaceUser + +## Table of contents + +### Properties + +- [\_id](components_CheckIn_types.InterfaceUser.md#_id) +- [firstName](components_CheckIn_types.InterfaceUser.md#firstname) +- [lastName](components_CheckIn_types.InterfaceUser.md#lastname) + +## Properties + +### \_id + +• **\_id**: `string` + +#### Defined in + +[src/components/CheckIn/types.ts:2](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CheckIn/types.ts#L2) + +___ + +### firstName + +• **firstName**: `string` + +#### Defined in + +[src/components/CheckIn/types.ts:3](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CheckIn/types.ts#L3) + +___ + +### lastName + +• **lastName**: `string` + +#### Defined in + +[src/components/CheckIn/types.ts:4](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CheckIn/types.ts#L4) diff --git a/talawa-admin-docs/interfaces/components_CollapsibleDropdown_CollapsibleDropdown.InterfaceCollapsibleDropdown.md b/talawa-admin-docs/interfaces/components_CollapsibleDropdown_CollapsibleDropdown.InterfaceCollapsibleDropdown.md new file mode 100644 index 0000000000..8e2a4c5569 --- /dev/null +++ b/talawa-admin-docs/interfaces/components_CollapsibleDropdown_CollapsibleDropdown.InterfaceCollapsibleDropdown.md @@ -0,0 +1,32 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / [components/CollapsibleDropdown/CollapsibleDropdown](../modules/components_CollapsibleDropdown_CollapsibleDropdown.md) / InterfaceCollapsibleDropdown + +# Interface: InterfaceCollapsibleDropdown + +[components/CollapsibleDropdown/CollapsibleDropdown](../modules/components_CollapsibleDropdown_CollapsibleDropdown.md).InterfaceCollapsibleDropdown + +## Table of contents + +### Properties + +- [screenName](components_CollapsibleDropdown_CollapsibleDropdown.InterfaceCollapsibleDropdown.md#screenname) +- [target](components_CollapsibleDropdown_CollapsibleDropdown.InterfaceCollapsibleDropdown.md#target) + +## Properties + +### screenName + +• **screenName**: `string` + +#### Defined in + +[src/components/CollapsibleDropdown/CollapsibleDropdown.tsx:9](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CollapsibleDropdown/CollapsibleDropdown.tsx#L9) + +___ + +### target + +• **target**: `TargetsType` + +#### Defined in + +[src/components/CollapsibleDropdown/CollapsibleDropdown.tsx:10](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CollapsibleDropdown/CollapsibleDropdown.tsx#L10) diff --git a/talawa-admin-docs/interfaces/components_IconComponent_IconComponent.InterfaceIconComponent.md b/talawa-admin-docs/interfaces/components_IconComponent_IconComponent.InterfaceIconComponent.md new file mode 100644 index 0000000000..124a3ae0d2 --- /dev/null +++ b/talawa-admin-docs/interfaces/components_IconComponent_IconComponent.InterfaceIconComponent.md @@ -0,0 +1,54 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / [components/IconComponent/IconComponent](../modules/components_IconComponent_IconComponent.md) / InterfaceIconComponent + +# Interface: InterfaceIconComponent + +[components/IconComponent/IconComponent](../modules/components_IconComponent_IconComponent.md).InterfaceIconComponent + +## Table of contents + +### Properties + +- [fill](components_IconComponent_IconComponent.InterfaceIconComponent.md#fill) +- [height](components_IconComponent_IconComponent.InterfaceIconComponent.md#height) +- [name](components_IconComponent_IconComponent.InterfaceIconComponent.md#name) +- [width](components_IconComponent_IconComponent.InterfaceIconComponent.md#width) + +## Properties + +### fill + +• `Optional` **fill**: `string` + +#### Defined in + +[src/components/IconComponent/IconComponent.tsx:14](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/IconComponent/IconComponent.tsx#L14) + +___ + +### height + +• `Optional` **height**: `string` + +#### Defined in + +[src/components/IconComponent/IconComponent.tsx:15](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/IconComponent/IconComponent.tsx#L15) + +___ + +### name + +• **name**: `string` + +#### Defined in + +[src/components/IconComponent/IconComponent.tsx:13](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/IconComponent/IconComponent.tsx#L13) + +___ + +### width + +• `Optional` **width**: `string` + +#### Defined in + +[src/components/IconComponent/IconComponent.tsx:16](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/IconComponent/IconComponent.tsx#L16) diff --git a/talawa-admin-docs/interfaces/components_LeftDrawerOrg_LeftDrawerOrg.InterfaceLeftDrawerProps.md b/talawa-admin-docs/interfaces/components_LeftDrawerOrg_LeftDrawerOrg.InterfaceLeftDrawerProps.md new file mode 100644 index 0000000000..a087afb658 --- /dev/null +++ b/talawa-admin-docs/interfaces/components_LeftDrawerOrg_LeftDrawerOrg.InterfaceLeftDrawerProps.md @@ -0,0 +1,65 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / [components/LeftDrawerOrg/LeftDrawerOrg](../modules/components_LeftDrawerOrg_LeftDrawerOrg.md) / InterfaceLeftDrawerProps + +# Interface: InterfaceLeftDrawerProps + +[components/LeftDrawerOrg/LeftDrawerOrg](../modules/components_LeftDrawerOrg_LeftDrawerOrg.md).InterfaceLeftDrawerProps + +## Table of contents + +### Properties + +- [hideDrawer](components_LeftDrawerOrg_LeftDrawerOrg.InterfaceLeftDrawerProps.md#hidedrawer) +- [orgId](components_LeftDrawerOrg_LeftDrawerOrg.InterfaceLeftDrawerProps.md#orgid) +- [screenName](components_LeftDrawerOrg_LeftDrawerOrg.InterfaceLeftDrawerProps.md#screenname) +- [setHideDrawer](components_LeftDrawerOrg_LeftDrawerOrg.InterfaceLeftDrawerProps.md#sethidedrawer) +- [targets](components_LeftDrawerOrg_LeftDrawerOrg.InterfaceLeftDrawerProps.md#targets) + +## Properties + +### hideDrawer + +• **hideDrawer**: ``null`` \| `boolean` + +#### Defined in + +[src/components/LeftDrawerOrg/LeftDrawerOrg.tsx:22](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/LeftDrawerOrg/LeftDrawerOrg.tsx#L22) + +___ + +### orgId + +• **orgId**: `string` + +#### Defined in + +[src/components/LeftDrawerOrg/LeftDrawerOrg.tsx:19](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/LeftDrawerOrg/LeftDrawerOrg.tsx#L19) + +___ + +### screenName + +• **screenName**: `string` + +#### Defined in + +[src/components/LeftDrawerOrg/LeftDrawerOrg.tsx:20](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/LeftDrawerOrg/LeftDrawerOrg.tsx#L20) + +___ + +### setHideDrawer + +• **setHideDrawer**: `Dispatch`<`SetStateAction`<``null`` \| `boolean`\>\> + +#### Defined in + +[src/components/LeftDrawerOrg/LeftDrawerOrg.tsx:23](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/LeftDrawerOrg/LeftDrawerOrg.tsx#L23) + +___ + +### targets + +• **targets**: `TargetsType`[] + +#### Defined in + +[src/components/LeftDrawerOrg/LeftDrawerOrg.tsx:21](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/LeftDrawerOrg/LeftDrawerOrg.tsx#L21) diff --git a/talawa-admin-docs/interfaces/components_LeftDrawer_LeftDrawer.InterfaceLeftDrawerProps.md b/talawa-admin-docs/interfaces/components_LeftDrawer_LeftDrawer.InterfaceLeftDrawerProps.md new file mode 100644 index 0000000000..8150b80c64 --- /dev/null +++ b/talawa-admin-docs/interfaces/components_LeftDrawer_LeftDrawer.InterfaceLeftDrawerProps.md @@ -0,0 +1,43 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / [components/LeftDrawer/LeftDrawer](../modules/components_LeftDrawer_LeftDrawer.md) / InterfaceLeftDrawerProps + +# Interface: InterfaceLeftDrawerProps + +[components/LeftDrawer/LeftDrawer](../modules/components_LeftDrawer_LeftDrawer.md).InterfaceLeftDrawerProps + +## Table of contents + +### Properties + +- [hideDrawer](components_LeftDrawer_LeftDrawer.InterfaceLeftDrawerProps.md#hidedrawer) +- [screenName](components_LeftDrawer_LeftDrawer.InterfaceLeftDrawerProps.md#screenname) +- [setHideDrawer](components_LeftDrawer_LeftDrawer.InterfaceLeftDrawerProps.md#sethidedrawer) + +## Properties + +### hideDrawer + +• **hideDrawer**: ``null`` \| `boolean` + +#### Defined in + +[src/components/LeftDrawer/LeftDrawer.tsx:15](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/LeftDrawer/LeftDrawer.tsx#L15) + +___ + +### screenName + +• **screenName**: `string` + +#### Defined in + +[src/components/LeftDrawer/LeftDrawer.tsx:17](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/LeftDrawer/LeftDrawer.tsx#L17) + +___ + +### setHideDrawer + +• **setHideDrawer**: `Dispatch`<`SetStateAction`<``null`` \| `boolean`\>\> + +#### Defined in + +[src/components/LeftDrawer/LeftDrawer.tsx:16](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/LeftDrawer/LeftDrawer.tsx#L16) diff --git a/talawa-admin-docs/interfaces/components_OrgListCard_OrgListCard.InterfaceOrgListCardProps.md b/talawa-admin-docs/interfaces/components_OrgListCard_OrgListCard.InterfaceOrgListCardProps.md new file mode 100644 index 0000000000..3d9ac12569 --- /dev/null +++ b/talawa-admin-docs/interfaces/components_OrgListCard_OrgListCard.InterfaceOrgListCardProps.md @@ -0,0 +1,21 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / [components/OrgListCard/OrgListCard](../modules/components_OrgListCard_OrgListCard.md) / InterfaceOrgListCardProps + +# Interface: InterfaceOrgListCardProps + +[components/OrgListCard/OrgListCard](../modules/components_OrgListCard_OrgListCard.md).InterfaceOrgListCardProps + +## Table of contents + +### Properties + +- [data](components_OrgListCard_OrgListCard.InterfaceOrgListCardProps.md#data) + +## Properties + +### data + +• **data**: `InterfaceOrgConnectionInfoType` + +#### Defined in + +[src/components/OrgListCard/OrgListCard.tsx:10](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/OrgListCard/OrgListCard.tsx#L10) diff --git a/talawa-admin-docs/interfaces/components_OrganizationScreen_OrganizationScreen.InterfaceOrganizationScreenProps.md b/talawa-admin-docs/interfaces/components_OrganizationScreen_OrganizationScreen.InterfaceOrganizationScreenProps.md new file mode 100644 index 0000000000..3314985607 --- /dev/null +++ b/talawa-admin-docs/interfaces/components_OrganizationScreen_OrganizationScreen.InterfaceOrganizationScreenProps.md @@ -0,0 +1,43 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / [components/OrganizationScreen/OrganizationScreen](../modules/components_OrganizationScreen_OrganizationScreen.md) / InterfaceOrganizationScreenProps + +# Interface: InterfaceOrganizationScreenProps + +[components/OrganizationScreen/OrganizationScreen](../modules/components_OrganizationScreen_OrganizationScreen.md).InterfaceOrganizationScreenProps + +## Table of contents + +### Properties + +- [children](components_OrganizationScreen_OrganizationScreen.InterfaceOrganizationScreenProps.md#children) +- [screenName](components_OrganizationScreen_OrganizationScreen.InterfaceOrganizationScreenProps.md#screenname) +- [title](components_OrganizationScreen_OrganizationScreen.InterfaceOrganizationScreenProps.md#title) + +## Properties + +### children + +• **children**: `ReactNode` + +#### Defined in + +[src/components/OrganizationScreen/OrganizationScreen.tsx:13](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/OrganizationScreen/OrganizationScreen.tsx#L13) + +___ + +### screenName + +• **screenName**: `string` + +#### Defined in + +[src/components/OrganizationScreen/OrganizationScreen.tsx:12](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/OrganizationScreen/OrganizationScreen.tsx#L12) + +___ + +### title + +• **title**: `string` + +#### Defined in + +[src/components/OrganizationScreen/OrganizationScreen.tsx:11](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/OrganizationScreen/OrganizationScreen.tsx#L11) diff --git a/talawa-admin-docs/interfaces/components_SuperAdminScreen_SuperAdminScreen.InterfaceSuperAdminScreenProps.md b/talawa-admin-docs/interfaces/components_SuperAdminScreen_SuperAdminScreen.InterfaceSuperAdminScreenProps.md new file mode 100644 index 0000000000..d3258252bc --- /dev/null +++ b/talawa-admin-docs/interfaces/components_SuperAdminScreen_SuperAdminScreen.InterfaceSuperAdminScreenProps.md @@ -0,0 +1,43 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / [components/SuperAdminScreen/SuperAdminScreen](../modules/components_SuperAdminScreen_SuperAdminScreen.md) / InterfaceSuperAdminScreenProps + +# Interface: InterfaceSuperAdminScreenProps + +[components/SuperAdminScreen/SuperAdminScreen](../modules/components_SuperAdminScreen_SuperAdminScreen.md).InterfaceSuperAdminScreenProps + +## Table of contents + +### Properties + +- [children](components_SuperAdminScreen_SuperAdminScreen.InterfaceSuperAdminScreenProps.md#children) +- [screenName](components_SuperAdminScreen_SuperAdminScreen.InterfaceSuperAdminScreenProps.md#screenname) +- [title](components_SuperAdminScreen_SuperAdminScreen.InterfaceSuperAdminScreenProps.md#title) + +## Properties + +### children + +• **children**: `ReactNode` + +#### Defined in + +[src/components/SuperAdminScreen/SuperAdminScreen.tsx:10](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/SuperAdminScreen/SuperAdminScreen.tsx#L10) + +___ + +### screenName + +• **screenName**: `string` + +#### Defined in + +[src/components/SuperAdminScreen/SuperAdminScreen.tsx:9](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/SuperAdminScreen/SuperAdminScreen.tsx#L9) + +___ + +### title + +• **title**: `string` + +#### Defined in + +[src/components/SuperAdminScreen/SuperAdminScreen.tsx:8](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/SuperAdminScreen/SuperAdminScreen.tsx#L8) diff --git a/talawa-admin-docs/modules.md b/talawa-admin-docs/modules.md new file mode 100644 index 0000000000..803e9dfe69 --- /dev/null +++ b/talawa-admin-docs/modules.md @@ -0,0 +1,181 @@ +[talawa-admin](README.md) / Modules + +# talawa-admin + +## Table of contents + +### Modules + +- [components/AddOn/AddOn](modules/components_AddOn_AddOn.md) +- [components/AddOn/AddOn.test](modules/components_AddOn_AddOn_test.md) +- [components/AddOn/core/AddOnEntry/AddOnEntry](modules/components_AddOn_core_AddOnEntry_AddOnEntry.md) +- [components/AddOn/core/AddOnEntry/AddOnEntry.test](modules/components_AddOn_core_AddOnEntry_AddOnEntry_test.md) +- [components/AddOn/core/AddOnRegister/AddOnRegister](modules/components_AddOn_core_AddOnRegister_AddOnRegister.md) +- [components/AddOn/core/AddOnRegister/AddOnRegister.test](modules/components_AddOn_core_AddOnRegister_AddOnRegister_test.md) +- [components/AddOn/core/AddOnStore/AddOnStore](modules/components_AddOn_core_AddOnStore_AddOnStore.md) +- [components/AddOn/core/AddOnStore/AddOnStore.test](modules/components_AddOn_core_AddOnStore_AddOnStore_test.md) +- [components/AddOn/support/components/Action/Action](modules/components_AddOn_support_components_Action_Action.md) +- [components/AddOn/support/components/Action/Action.test](modules/components_AddOn_support_components_Action_Action_test.md) +- [components/AddOn/support/components/MainContent/MainContent](modules/components_AddOn_support_components_MainContent_MainContent.md) +- [components/AddOn/support/components/MainContent/MainContent.test](modules/components_AddOn_support_components_MainContent_MainContent_test.md) +- [components/AddOn/support/components/SidePanel/SidePanel](modules/components_AddOn_support_components_SidePanel_SidePanel.md) +- [components/AddOn/support/components/SidePanel/SidePanel.test](modules/components_AddOn_support_components_SidePanel_SidePanel_test.md) +- [components/AddOn/support/services/Plugin.helper](modules/components_AddOn_support_services_Plugin_helper.md) +- [components/AddOn/support/services/Render.helper](modules/components_AddOn_support_services_Render_helper.md) +- [components/ChangeLanguageDropdown/ChangeLanguageDropDown](modules/components_ChangeLanguageDropdown_ChangeLanguageDropDown.md) +- [components/ChangeLanguageDropdown/ChangeLanguageDropdown.test](modules/components_ChangeLanguageDropdown_ChangeLanguageDropdown_test.md) +- [components/CheckIn/CheckInModal](modules/components_CheckIn_CheckInModal.md) +- [components/CheckIn/CheckInModal.test](modules/components_CheckIn_CheckInModal_test.md) +- [components/CheckIn/CheckInWrapper](modules/components_CheckIn_CheckInWrapper.md) +- [components/CheckIn/CheckInWrapper.test](modules/components_CheckIn_CheckInWrapper_test.md) +- [components/CheckIn/TableRow](modules/components_CheckIn_TableRow.md) +- [components/CheckIn/TableRow.test](modules/components_CheckIn_TableRow_test.md) +- [components/CheckIn/mocks](modules/components_CheckIn_mocks.md) +- [components/CheckIn/tagTemplate](modules/components_CheckIn_tagTemplate.md) +- [components/CheckIn/types](modules/components_CheckIn_types.md) +- [components/CollapsibleDropdown/CollapsibleDropdown](modules/components_CollapsibleDropdown_CollapsibleDropdown.md) +- [components/CollapsibleDropdown/CollapsibleDropdown.test](modules/components_CollapsibleDropdown_CollapsibleDropdown_test.md) +- [components/ContriStats/ContriStats](modules/components_ContriStats_ContriStats.md) +- [components/ContriStats/ContriStats.test](modules/components_ContriStats_ContriStats_test.md) +- [components/EventCalendar/EventCalendar](modules/components_EventCalendar_EventCalendar.md) +- [components/EventCalendar/EventCalendar.test](modules/components_EventCalendar_EventCalendar_test.md) +- [components/EventListCard/EventListCard](modules/components_EventListCard_EventListCard.md) +- [components/EventListCard/EventListCard.test](modules/components_EventListCard_EventListCard_test.md) +- [components/EventProjectModals/AddEventProjectModal](modules/components_EventProjectModals_AddEventProjectModal.md) +- [components/EventProjectModals/AddEventProjectModal.test](modules/components_EventProjectModals_AddEventProjectModal_test.md) +- [components/EventProjectModals/DeleteEventProjectModal](modules/components_EventProjectModals_DeleteEventProjectModal.md) +- [components/EventProjectModals/DeleteEventProjectModal.test](modules/components_EventProjectModals_DeleteEventProjectModal_test.md) +- [components/EventProjectModals/UpdateEventProjectModal](modules/components_EventProjectModals_UpdateEventProjectModal.md) +- [components/EventProjectModals/UpdateEventProjectModal.test](modules/components_EventProjectModals_UpdateEventProjectModal_test.md) +- [components/EventRegistrantsModal/EventRegistrantsModal](modules/components_EventRegistrantsModal_EventRegistrantsModal.md) +- [components/EventRegistrantsModal/EventRegistrantsModal.test](modules/components_EventRegistrantsModal_EventRegistrantsModal_test.md) +- [components/EventRegistrantsModal/EventRegistrantsWrapper](modules/components_EventRegistrantsModal_EventRegistrantsWrapper.md) +- [components/EventRegistrantsModal/EventRegistrantsWrapper.test](modules/components_EventRegistrantsModal_EventRegistrantsWrapper_test.md) +- [components/IconComponent/IconComponent](modules/components_IconComponent_IconComponent.md) +- [components/IconComponent/IconComponent.test](modules/components_IconComponent_IconComponent_test.md) +- [components/LandingPage/LandingPage](modules/components_LandingPage_LandingPage.md) +- [components/LandingPage/LandingPage.test](modules/components_LandingPage_LandingPage_test.md) +- [components/LeftDrawer/LeftDrawer](modules/components_LeftDrawer_LeftDrawer.md) +- [components/LeftDrawer/LeftDrawer.test](modules/components_LeftDrawer_LeftDrawer_test.md) +- [components/LeftDrawerOrg/LeftDrawerOrg](modules/components_LeftDrawerOrg_LeftDrawerOrg.md) +- [components/LeftDrawerOrg/LeftDrawerOrg.test](modules/components_LeftDrawerOrg_LeftDrawerOrg_test.md) +- [components/Loader/Loader](modules/components_Loader_Loader.md) +- [components/Loader/Loader.test](modules/components_Loader_Loader_test.md) +- [components/MemberRequestCard/MemberRequestCard](modules/components_MemberRequestCard_MemberRequestCard.md) +- [components/MemberRequestCard/MemberRequestCard.test](modules/components_MemberRequestCard_MemberRequestCard_test.md) +- [components/NotFound/NotFound](modules/components_NotFound_NotFound.md) +- [components/NotFound/NotFound.test](modules/components_NotFound_NotFound_test.md) +- [components/OrgAdminListCard/OrgAdminListCard](modules/components_OrgAdminListCard_OrgAdminListCard.md) +- [components/OrgAdminListCard/OrgAdminListCard.test](modules/components_OrgAdminListCard_OrgAdminListCard_test.md) +- [components/OrgContriCards/OrgContriCards](modules/components_OrgContriCards_OrgContriCards.md) +- [components/OrgContriCards/OrgContriCards.test](modules/components_OrgContriCards_OrgContriCards_test.md) +- [components/OrgDelete/OrgDelete](modules/components_OrgDelete_OrgDelete.md) +- [components/OrgDelete/OrgDelete.test](modules/components_OrgDelete_OrgDelete_test.md) +- [components/OrgListCard/OrgListCard](modules/components_OrgListCard_OrgListCard.md) +- [components/OrgListCard/OrgListCard.test](modules/components_OrgListCard_OrgListCard_test.md) +- [components/OrgPeopleListCard/OrgPeopleListCard](modules/components_OrgPeopleListCard_OrgPeopleListCard.md) +- [components/OrgPeopleListCard/OrgPeopleListCard.test](modules/components_OrgPeopleListCard_OrgPeopleListCard_test.md) +- [components/OrgPostCard/OrgPostCard](modules/components_OrgPostCard_OrgPostCard.md) +- [components/OrgPostCard/OrgPostCard.test](modules/components_OrgPostCard_OrgPostCard_test.md) +- [components/OrgUpdate/OrgUpdate](modules/components_OrgUpdate_OrgUpdate.md) +- [components/OrgUpdate/OrgUpdate.test](modules/components_OrgUpdate_OrgUpdate_test.md) +- [components/OrganizationCard/OrganizationCard](modules/components_OrganizationCard_OrganizationCard.md) +- [components/OrganizationCard/OrganizationCard.test](modules/components_OrganizationCard_OrganizationCard_test.md) +- [components/OrganizationCardStart/OrganizationCardStart](modules/components_OrganizationCardStart_OrganizationCardStart.md) +- [components/OrganizationCardStart/OrganizationCardStart.test](modules/components_OrganizationCardStart_OrganizationCardStart_test.md) +- [components/OrganizationScreen/OrganizationScreen](modules/components_OrganizationScreen_OrganizationScreen.md) +- [components/OrganizationScreen/OrganizationScreen.test](modules/components_OrganizationScreen_OrganizationScreen_test.md) +- [components/Pagination/Pagination](modules/components_Pagination_Pagination.md) +- [components/Pagination/Pagination.test](modules/components_Pagination_Pagination_test.md) +- [components/PaginationList/PaginationList](modules/components_PaginationList_PaginationList.md) +- [components/SecuredRoute/SecuredRoute](modules/components_SecuredRoute_SecuredRoute.md) +- [components/SuperAdminScreen/SuperAdminScreen](modules/components_SuperAdminScreen_SuperAdminScreen.md) +- [components/SuperAdminScreen/SuperAdminScreen.test](modules/components_SuperAdminScreen_SuperAdminScreen_test.md) +- [components/TableLoader/TableLoader](modules/components_TableLoader_TableLoader.md) +- [components/TableLoader/TableLoader.test](modules/components_TableLoader_TableLoader_test.md) +- [components/TaskListItem/TaskListItem](modules/components_TaskListItem_TaskListItem.md) +- [components/TaskListItem/TaskListItem.test](modules/components_TaskListItem_TaskListItem_test.md) +- [components/TaskModals/AddTaskModal](modules/components_TaskModals_AddTaskModal.md) +- [components/TaskModals/AddTaskModal.test](modules/components_TaskModals_AddTaskModal_test.md) +- [components/TaskModals/DeleteTaskModal](modules/components_TaskModals_DeleteTaskModal.md) +- [components/TaskModals/DeleteTaskModal.test](modules/components_TaskModals_DeleteTaskModal_test.md) +- [components/TaskModals/ManageVolunteerModal](modules/components_TaskModals_ManageVolunteerModal.md) +- [components/TaskModals/ManageVolunteerModal.test](modules/components_TaskModals_ManageVolunteerModal_test.md) +- [components/TaskModals/UpdateTaskModal](modules/components_TaskModals_UpdateTaskModal.md) +- [components/TaskModals/UpdateTaskModal.test](modules/components_TaskModals_UpdateTaskModal_test.md) +- [components/UserListCard/UserListCard](modules/components_UserListCard_UserListCard.md) +- [components/UserListCard/UserListCard.test](modules/components_UserListCard_UserListCard_test.md) +- [components/UserPasswordUpdate/UserPasswordUpdate](modules/components_UserPasswordUpdate_UserPasswordUpdate.md) +- [components/UserPasswordUpdate/UserPasswordUpdate.test](modules/components_UserPasswordUpdate_UserPasswordUpdate_test.md) +- [components/UserPortal/DonationCard/DonationCard](modules/components_UserPortal_DonationCard_DonationCard.md) +- [components/UserPortal/Login/Login](modules/components_UserPortal_Login_Login.md) +- [components/UserPortal/Login/Login.test](modules/components_UserPortal_Login_Login_test.md) +- [components/UserPortal/OrganizationCard/OrganizationCard](modules/components_UserPortal_OrganizationCard_OrganizationCard.md) +- [components/UserPortal/OrganizationCard/OrganizationCard.test](modules/components_UserPortal_OrganizationCard_OrganizationCard_test.md) +- [components/UserPortal/OrganizationNavbar/OrganizationNavbar](modules/components_UserPortal_OrganizationNavbar_OrganizationNavbar.md) +- [components/UserPortal/OrganizationNavbar/OrganizationNavbar.test](modules/components_UserPortal_OrganizationNavbar_OrganizationNavbar_test.md) +- [components/UserPortal/OrganizationSidebar/OrganizationSidebar](modules/components_UserPortal_OrganizationSidebar_OrganizationSidebar.md) +- [components/UserPortal/OrganizationSidebar/OrganizationSidebar.test](modules/components_UserPortal_OrganizationSidebar_OrganizationSidebar_test.md) +- [components/UserPortal/PeopleCard/PeopleCard](modules/components_UserPortal_PeopleCard_PeopleCard.md) +- [components/UserPortal/PeopleCard/PeopleCard.test](modules/components_UserPortal_PeopleCard_PeopleCard_test.md) +- [components/UserPortal/PostCard/PostCard](modules/components_UserPortal_PostCard_PostCard.md) +- [components/UserPortal/PostCard/PostCard.test](modules/components_UserPortal_PostCard_PostCard_test.md) +- [components/UserPortal/Register/Register](modules/components_UserPortal_Register_Register.md) +- [components/UserPortal/Register/Register.test](modules/components_UserPortal_Register_Register_test.md) +- [components/UserPortal/SecuredRouteForUser/SecuredRouteForUser](modules/components_UserPortal_SecuredRouteForUser_SecuredRouteForUser.md) +- [components/UserPortal/UserNavbar/UserNavbar](modules/components_UserPortal_UserNavbar_UserNavbar.md) +- [components/UserPortal/UserNavbar/UserNavbar.test](modules/components_UserPortal_UserNavbar_UserNavbar_test.md) +- [components/UserPortal/UserSidebar/UserSidebar](modules/components_UserPortal_UserSidebar_UserSidebar.md) +- [components/UserPortal/UserSidebar/UserSidebar.test](modules/components_UserPortal_UserSidebar_UserSidebar_test.md) +- [components/UserUpdate/UserUpdate](modules/components_UserUpdate_UserUpdate.md) +- [components/UserUpdate/UserUpdate.test](modules/components_UserUpdate_UserUpdate_test.md) +- [components/plugins](modules/components_plugins.md) +- [components/plugins/DummyPlugin/DummyPlugin](modules/components_plugins_DummyPlugin_DummyPlugin.md) +- [components/plugins/DummyPlugin/DummyPlugin.test](modules/components_plugins_DummyPlugin_DummyPlugin_test.md) +- [components/plugins/DummyPlugin2/DummyPlugin2](modules/components_plugins_DummyPlugin2_DummyPlugin2.md) +- [components/plugins/DummyPlugin2/DummyPlugin2.test](modules/components_plugins_DummyPlugin2_DummyPlugin2_test.md) +- [screens/BlockUser/BlockUser](modules/screens_BlockUser_BlockUser.md) +- [screens/BlockUser/BlockUser.test](modules/screens_BlockUser_BlockUser_test.md) +- [screens/EventDashboard/EventDashboard](modules/screens_EventDashboard_EventDashboard.md) +- [screens/EventDashboard/EventDashboard.mocks](modules/screens_EventDashboard_EventDashboard_mocks.md) +- [screens/EventDashboard/EventDashboard.test](modules/screens_EventDashboard_EventDashboard_test.md) +- [screens/ForgotPassword/ForgotPassword](modules/screens_ForgotPassword_ForgotPassword.md) +- [screens/ForgotPassword/ForgotPassword.test](modules/screens_ForgotPassword_ForgotPassword_test.md) +- [screens/LoginPage/LoginPage](modules/screens_LoginPage_LoginPage.md) +- [screens/LoginPage/LoginPage.test](modules/screens_LoginPage_LoginPage_test.md) +- [screens/MemberDetail/MemberDetail](modules/screens_MemberDetail_MemberDetail.md) +- [screens/MemberDetail/MemberDetail.test](modules/screens_MemberDetail_MemberDetail_test.md) +- [screens/OrgContribution/OrgContribution](modules/screens_OrgContribution_OrgContribution.md) +- [screens/OrgContribution/OrgContribution.test](modules/screens_OrgContribution_OrgContribution_test.md) +- [screens/OrgList/OrgList](modules/screens_OrgList_OrgList.md) +- [screens/OrgList/OrgList.test](modules/screens_OrgList_OrgList_test.md) +- [screens/OrgList/OrgListMocks](modules/screens_OrgList_OrgListMocks.md) +- [screens/OrgPost/OrgPost](modules/screens_OrgPost_OrgPost.md) +- [screens/OrgPost/OrgPost.test](modules/screens_OrgPost_OrgPost_test.md) +- [screens/OrgSettings/OrgSettings](modules/screens_OrgSettings_OrgSettings.md) +- [screens/OrgSettings/OrgSettings.test](modules/screens_OrgSettings_OrgSettings_test.md) +- [screens/OrganizationDashboard/OrganizationDashboard](modules/screens_OrganizationDashboard_OrganizationDashboard.md) +- [screens/OrganizationDashboard/OrganizationDashboard.test](modules/screens_OrganizationDashboard_OrganizationDashboard_test.md) +- [screens/OrganizationDashboard/OrganizationDashboardMocks](modules/screens_OrganizationDashboard_OrganizationDashboardMocks.md) +- [screens/OrganizationEvents/OrganizationEvents](modules/screens_OrganizationEvents_OrganizationEvents.md) +- [screens/OrganizationEvents/OrganizationEvents.test](modules/screens_OrganizationEvents_OrganizationEvents_test.md) +- [screens/OrganizationPeople/OrganizationPeople](modules/screens_OrganizationPeople_OrganizationPeople.md) +- [screens/OrganizationPeople/OrganizationPeople.test](modules/screens_OrganizationPeople_OrganizationPeople_test.md) +- [screens/PageNotFound/PageNotFound](modules/screens_PageNotFound_PageNotFound.md) +- [screens/PageNotFound/PageNotFound.test](modules/screens_PageNotFound_PageNotFound_test.md) +- [screens/Requests/Requests](modules/screens_Requests_Requests.md) +- [screens/Requests/Requests.test](modules/screens_Requests_Requests_test.md) +- [screens/UserPortal/Donate/Donate](modules/screens_UserPortal_Donate_Donate.md) +- [screens/UserPortal/Donate/Donate.test](modules/screens_UserPortal_Donate_Donate_test.md) +- [screens/UserPortal/Home/Home](modules/screens_UserPortal_Home_Home.md) +- [screens/UserPortal/Home/Home.test](modules/screens_UserPortal_Home_Home_test.md) +- [screens/UserPortal/Organizations/Organizations](modules/screens_UserPortal_Organizations_Organizations.md) +- [screens/UserPortal/Organizations/Organizations.test](modules/screens_UserPortal_Organizations_Organizations_test.md) +- [screens/UserPortal/People/People](modules/screens_UserPortal_People_People.md) +- [screens/UserPortal/People/People.test](modules/screens_UserPortal_People_People_test.md) +- [screens/UserPortal/Settings/Settings](modules/screens_UserPortal_Settings_Settings.md) +- [screens/UserPortal/Settings/Settings.test](modules/screens_UserPortal_Settings_Settings_test.md) +- [screens/UserPortal/UserLoginPage/UserLoginPage](modules/screens_UserPortal_UserLoginPage_UserLoginPage.md) +- [screens/UserPortal/UserLoginPage/UserLoginPage.test](modules/screens_UserPortal_UserLoginPage_UserLoginPage_test.md) +- [screens/Users/Users](modules/screens_Users_Users.md) +- [screens/Users/Users.test](modules/screens_Users_Users_test.md) diff --git a/talawa-admin-docs/modules/components_AddOn_AddOn.default.md b/talawa-admin-docs/modules/components_AddOn_AddOn.default.md new file mode 100644 index 0000000000..1ae4e3dd2e --- /dev/null +++ b/talawa-admin-docs/modules/components_AddOn_AddOn.default.md @@ -0,0 +1,48 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / [components/AddOn/AddOn](components_AddOn_AddOn.md) / default + +# Namespace: default + +[components/AddOn/AddOn](components_AddOn_AddOn.md).default + +## Table of contents + +### Variables + +- [defaultProps](components_AddOn_AddOn.default.md#defaultprops) +- [propTypes](components_AddOn_AddOn.default.md#proptypes) + +## Variables + +### defaultProps + +• **defaultProps**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `children` | ``null`` | +| `extras` | {} | +| `name` | `string` | + +#### Defined in + +[src/components/AddOn/AddOn.tsx:21](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/AddOn/AddOn.tsx#L21) + +___ + +### propTypes + +• **propTypes**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `children` | `Requireable`<`any`\> | +| `extras` | `Requireable`<`InferProps`<{ `actions`: `Requireable`<`InferProps`<{}\>\> ; `components`: `Requireable`<`InferProps`<{}\>\> }\>\> | +| `name` | `Requireable`<`string`\> | + +#### Defined in + +[src/components/AddOn/AddOn.tsx:27](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/AddOn/AddOn.tsx#L27) diff --git a/talawa-admin-docs/modules/components_AddOn_AddOn.md b/talawa-admin-docs/modules/components_AddOn_AddOn.md new file mode 100644 index 0000000000..ad376d81f5 --- /dev/null +++ b/talawa-admin-docs/modules/components_AddOn_AddOn.md @@ -0,0 +1,33 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/AddOn/AddOn + +# Module: components/AddOn/AddOn + +## Table of contents + +### Namespaces + +- [default](components_AddOn_AddOn.default.md) + +### Functions + +- [default](components_AddOn_AddOn.md#default) + +## Functions + +### default + +▸ **default**(`«destructured»`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `«destructured»` | `InterfaceAddOnProps` | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/AddOn/AddOn.tsx:11](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/AddOn/AddOn.tsx#L11) diff --git a/talawa-admin-docs/modules/components_AddOn_AddOn_test.md b/talawa-admin-docs/modules/components_AddOn_AddOn_test.md new file mode 100644 index 0000000000..fc00b6659e --- /dev/null +++ b/talawa-admin-docs/modules/components_AddOn_AddOn_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/AddOn/AddOn.test + +# Module: components/AddOn/AddOn.test diff --git a/talawa-admin-docs/modules/components_AddOn_core_AddOnEntry_AddOnEntry.default.md b/talawa-admin-docs/modules/components_AddOn_core_AddOnEntry_AddOnEntry.default.md new file mode 100644 index 0000000000..a0331db813 --- /dev/null +++ b/talawa-admin-docs/modules/components_AddOn_core_AddOnEntry_AddOnEntry.default.md @@ -0,0 +1,52 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / [components/AddOn/core/AddOnEntry/AddOnEntry](components_AddOn_core_AddOnEntry_AddOnEntry.md) / default + +# Namespace: default + +[components/AddOn/core/AddOnEntry/AddOnEntry](components_AddOn_core_AddOnEntry_AddOnEntry.md).default + +## Table of contents + +### Variables + +- [defaultProps](components_AddOn_core_AddOnEntry_AddOnEntry.default.md#defaultprops) +- [propTypes](components_AddOn_core_AddOnEntry_AddOnEntry.default.md#proptypes) + +## Variables + +### defaultProps + +• **defaultProps**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `configurable` | `boolean` | +| `description` | `string` | +| `enabled` | `boolean` | +| `isInstalled` | `boolean` | +| `title` | `string` | + +#### Defined in + +[src/components/AddOn/core/AddOnEntry/AddOnEntry.tsx:190](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/AddOn/core/AddOnEntry/AddOnEntry.tsx#L190) + +___ + +### propTypes + +• **propTypes**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `configurable` | `Requireable`<`boolean`\> | +| `description` | `Requireable`<`string`\> | +| `enabled` | `Requireable`<`boolean`\> | +| `isInstalled` | `Requireable`<`boolean`\> | +| `title` | `Requireable`<`string`\> | + +#### Defined in + +[src/components/AddOn/core/AddOnEntry/AddOnEntry.tsx:198](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/AddOn/core/AddOnEntry/AddOnEntry.tsx#L198) diff --git a/talawa-admin-docs/modules/components_AddOn_core_AddOnEntry_AddOnEntry.md b/talawa-admin-docs/modules/components_AddOn_core_AddOnEntry_AddOnEntry.md new file mode 100644 index 0000000000..118b367b09 --- /dev/null +++ b/talawa-admin-docs/modules/components_AddOn_core_AddOnEntry_AddOnEntry.md @@ -0,0 +1,33 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/AddOn/core/AddOnEntry/AddOnEntry + +# Module: components/AddOn/core/AddOnEntry/AddOnEntry + +## Table of contents + +### Namespaces + +- [default](components_AddOn_core_AddOnEntry_AddOnEntry.default.md) + +### Functions + +- [default](components_AddOn_core_AddOnEntry_AddOnEntry.md#default) + +## Functions + +### default + +▸ **default**(`«destructured»`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `«destructured»` | `InterfaceAddOnEntryProps` | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/AddOn/core/AddOnEntry/AddOnEntry.tsx:26](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/AddOn/core/AddOnEntry/AddOnEntry.tsx#L26) diff --git a/talawa-admin-docs/modules/components_AddOn_core_AddOnEntry_AddOnEntry_test.md b/talawa-admin-docs/modules/components_AddOn_core_AddOnEntry_AddOnEntry_test.md new file mode 100644 index 0000000000..6190c7df8d --- /dev/null +++ b/talawa-admin-docs/modules/components_AddOn_core_AddOnEntry_AddOnEntry_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/AddOn/core/AddOnEntry/AddOnEntry.test + +# Module: components/AddOn/core/AddOnEntry/AddOnEntry.test diff --git a/talawa-admin-docs/modules/components_AddOn_core_AddOnRegister_AddOnRegister.default.md b/talawa-admin-docs/modules/components_AddOn_core_AddOnRegister_AddOnRegister.default.md new file mode 100644 index 0000000000..07f216c14c --- /dev/null +++ b/talawa-admin-docs/modules/components_AddOn_core_AddOnRegister_AddOnRegister.default.md @@ -0,0 +1,44 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / [components/AddOn/core/AddOnRegister/AddOnRegister](components_AddOn_core_AddOnRegister_AddOnRegister.md) / default + +# Namespace: default + +[components/AddOn/core/AddOnRegister/AddOnRegister](components_AddOn_core_AddOnRegister_AddOnRegister.md).default + +## Table of contents + +### Variables + +- [defaultProps](components_AddOn_core_AddOnRegister_AddOnRegister.default.md#defaultprops) +- [propTypes](components_AddOn_core_AddOnRegister_AddOnRegister.default.md#proptypes) + +## Variables + +### defaultProps + +• **defaultProps**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `createdBy` | `string` | + +#### Defined in + +[src/components/AddOn/core/AddOnRegister/AddOnRegister.tsx:151](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/AddOn/core/AddOnRegister/AddOnRegister.tsx#L151) + +___ + +### propTypes + +• **propTypes**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `createdBy` | `Requireable`<`string`\> | + +#### Defined in + +[src/components/AddOn/core/AddOnRegister/AddOnRegister.tsx:155](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/AddOn/core/AddOnRegister/AddOnRegister.tsx#L155) diff --git a/talawa-admin-docs/modules/components_AddOn_core_AddOnRegister_AddOnRegister.md b/talawa-admin-docs/modules/components_AddOn_core_AddOnRegister_AddOnRegister.md new file mode 100644 index 0000000000..810ecc9829 --- /dev/null +++ b/talawa-admin-docs/modules/components_AddOn_core_AddOnRegister_AddOnRegister.md @@ -0,0 +1,33 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/AddOn/core/AddOnRegister/AddOnRegister + +# Module: components/AddOn/core/AddOnRegister/AddOnRegister + +## Table of contents + +### Namespaces + +- [default](components_AddOn_core_AddOnRegister_AddOnRegister.default.md) + +### Functions + +- [default](components_AddOn_core_AddOnRegister_AddOnRegister.md#default) + +## Functions + +### default + +▸ **default**(`«destructured»`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `«destructured»` | `InterfaceAddOnRegisterProps` | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/AddOn/core/AddOnRegister/AddOnRegister.tsx:24](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/AddOn/core/AddOnRegister/AddOnRegister.tsx#L24) diff --git a/talawa-admin-docs/modules/components_AddOn_core_AddOnRegister_AddOnRegister_test.md b/talawa-admin-docs/modules/components_AddOn_core_AddOnRegister_AddOnRegister_test.md new file mode 100644 index 0000000000..2a3008d564 --- /dev/null +++ b/talawa-admin-docs/modules/components_AddOn_core_AddOnRegister_AddOnRegister_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/AddOn/core/AddOnRegister/AddOnRegister.test + +# Module: components/AddOn/core/AddOnRegister/AddOnRegister.test diff --git a/talawa-admin-docs/modules/components_AddOn_core_AddOnStore_AddOnStore.default.md b/talawa-admin-docs/modules/components_AddOn_core_AddOnStore_AddOnStore.default.md new file mode 100644 index 0000000000..5f9275d3b5 --- /dev/null +++ b/talawa-admin-docs/modules/components_AddOn_core_AddOnStore_AddOnStore.default.md @@ -0,0 +1,32 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / [components/AddOn/core/AddOnStore/AddOnStore](components_AddOn_core_AddOnStore_AddOnStore.md) / default + +# Namespace: default + +[components/AddOn/core/AddOnStore/AddOnStore](components_AddOn_core_AddOnStore_AddOnStore.md).default + +## Table of contents + +### Variables + +- [defaultProps](components_AddOn_core_AddOnStore_AddOnStore.default.md#defaultprops) +- [propTypes](components_AddOn_core_AddOnStore_AddOnStore.default.md#proptypes) + +## Variables + +### defaultProps + +• **defaultProps**: `Object` + +#### Defined in + +[src/components/AddOn/core/AddOnStore/AddOnStore.tsx:354](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/AddOn/core/AddOnStore/AddOnStore.tsx#L354) + +___ + +### propTypes + +• **propTypes**: `Object` + +#### Defined in + +[src/components/AddOn/core/AddOnStore/AddOnStore.tsx:356](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/AddOn/core/AddOnStore/AddOnStore.tsx#L356) diff --git a/talawa-admin-docs/modules/components_AddOn_core_AddOnStore_AddOnStore.md b/talawa-admin-docs/modules/components_AddOn_core_AddOnStore_AddOnStore.md new file mode 100644 index 0000000000..c0550d8a9b --- /dev/null +++ b/talawa-admin-docs/modules/components_AddOn_core_AddOnStore_AddOnStore.md @@ -0,0 +1,27 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/AddOn/core/AddOnStore/AddOnStore + +# Module: components/AddOn/core/AddOnStore/AddOnStore + +## Table of contents + +### Namespaces + +- [default](components_AddOn_core_AddOnStore_AddOnStore.default.md) + +### Functions + +- [default](components_AddOn_core_AddOnStore_AddOnStore.md#default) + +## Functions + +### default + +▸ **default**(): `JSX.Element` + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/AddOn/core/AddOnStore/AddOnStore.tsx:26](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/AddOn/core/AddOnStore/AddOnStore.tsx#L26) diff --git a/talawa-admin-docs/modules/components_AddOn_core_AddOnStore_AddOnStore_test.md b/talawa-admin-docs/modules/components_AddOn_core_AddOnStore_AddOnStore_test.md new file mode 100644 index 0000000000..81c941f51d --- /dev/null +++ b/talawa-admin-docs/modules/components_AddOn_core_AddOnStore_AddOnStore_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/AddOn/core/AddOnStore/AddOnStore.test + +# Module: components/AddOn/core/AddOnStore/AddOnStore.test diff --git a/talawa-admin-docs/modules/components_AddOn_support_components_Action_Action.md b/talawa-admin-docs/modules/components_AddOn_support_components_Action_Action.md new file mode 100644 index 0000000000..66bde03656 --- /dev/null +++ b/talawa-admin-docs/modules/components_AddOn_support_components_Action_Action.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/AddOn/support/components/Action/Action + +# Module: components/AddOn/support/components/Action/Action + +## Table of contents + +### Functions + +- [default](components_AddOn_support_components_Action_Action.md#default) + +## Functions + +### default + +▸ **default**(`props`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `InterfaceActionProps` | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/AddOn/support/components/Action/Action.tsx:10](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/AddOn/support/components/Action/Action.tsx#L10) diff --git a/talawa-admin-docs/modules/components_AddOn_support_components_Action_Action_test.md b/talawa-admin-docs/modules/components_AddOn_support_components_Action_Action_test.md new file mode 100644 index 0000000000..411e01b71c --- /dev/null +++ b/talawa-admin-docs/modules/components_AddOn_support_components_Action_Action_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/AddOn/support/components/Action/Action.test + +# Module: components/AddOn/support/components/Action/Action.test diff --git a/talawa-admin-docs/modules/components_AddOn_support_components_MainContent_MainContent.md b/talawa-admin-docs/modules/components_AddOn_support_components_MainContent_MainContent.md new file mode 100644 index 0000000000..2a0134ef66 --- /dev/null +++ b/talawa-admin-docs/modules/components_AddOn_support_components_MainContent_MainContent.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/AddOn/support/components/MainContent/MainContent + +# Module: components/AddOn/support/components/MainContent/MainContent + +## Table of contents + +### Functions + +- [default](components_AddOn_support_components_MainContent_MainContent.md#default) + +## Functions + +### default + +▸ **default**(`«destructured»`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `«destructured»` | `InterfaceMainContentProps` | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/AddOn/support/components/MainContent/MainContent.tsx:10](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/AddOn/support/components/MainContent/MainContent.tsx#L10) diff --git a/talawa-admin-docs/modules/components_AddOn_support_components_MainContent_MainContent_test.md b/talawa-admin-docs/modules/components_AddOn_support_components_MainContent_MainContent_test.md new file mode 100644 index 0000000000..9374ee4ed1 --- /dev/null +++ b/talawa-admin-docs/modules/components_AddOn_support_components_MainContent_MainContent_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/AddOn/support/components/MainContent/MainContent.test + +# Module: components/AddOn/support/components/MainContent/MainContent.test diff --git a/talawa-admin-docs/modules/components_AddOn_support_components_SidePanel_SidePanel.md b/talawa-admin-docs/modules/components_AddOn_support_components_SidePanel_SidePanel.md new file mode 100644 index 0000000000..ae5cb247c8 --- /dev/null +++ b/talawa-admin-docs/modules/components_AddOn_support_components_SidePanel_SidePanel.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/AddOn/support/components/SidePanel/SidePanel + +# Module: components/AddOn/support/components/SidePanel/SidePanel + +## Table of contents + +### Functions + +- [default](components_AddOn_support_components_SidePanel_SidePanel.md#default) + +## Functions + +### default + +▸ **default**(`«destructured»`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `«destructured»` | `InterfaceSidePanelProps` | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/AddOn/support/components/SidePanel/SidePanel.tsx:10](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/AddOn/support/components/SidePanel/SidePanel.tsx#L10) diff --git a/talawa-admin-docs/modules/components_AddOn_support_components_SidePanel_SidePanel_test.md b/talawa-admin-docs/modules/components_AddOn_support_components_SidePanel_SidePanel_test.md new file mode 100644 index 0000000000..7f2017c98d --- /dev/null +++ b/talawa-admin-docs/modules/components_AddOn_support_components_SidePanel_SidePanel_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/AddOn/support/components/SidePanel/SidePanel.test + +# Module: components/AddOn/support/components/SidePanel/SidePanel.test diff --git a/talawa-admin-docs/modules/components_AddOn_support_services_Plugin_helper.md b/talawa-admin-docs/modules/components_AddOn_support_services_Plugin_helper.md new file mode 100644 index 0000000000..07b4879af6 --- /dev/null +++ b/talawa-admin-docs/modules/components_AddOn_support_services_Plugin_helper.md @@ -0,0 +1,9 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/AddOn/support/services/Plugin.helper + +# Module: components/AddOn/support/services/Plugin.helper + +## Table of contents + +### Classes + +- [default](../classes/components_AddOn_support_services_Plugin_helper.default.md) diff --git a/talawa-admin-docs/modules/components_AddOn_support_services_Render_helper.md b/talawa-admin-docs/modules/components_AddOn_support_services_Render_helper.md new file mode 100644 index 0000000000..845a9a0e7d --- /dev/null +++ b/talawa-admin-docs/modules/components_AddOn_support_services_Render_helper.md @@ -0,0 +1,9 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/AddOn/support/services/Render.helper + +# Module: components/AddOn/support/services/Render.helper + +## Table of contents + +### Classes + +- [default](../classes/components_AddOn_support_services_Render_helper.default.md) diff --git a/talawa-admin-docs/modules/components_ChangeLanguageDropdown_ChangeLanguageDropDown.md b/talawa-admin-docs/modules/components_ChangeLanguageDropdown_ChangeLanguageDropDown.md new file mode 100644 index 0000000000..7ce929fecd --- /dev/null +++ b/talawa-admin-docs/modules/components_ChangeLanguageDropdown_ChangeLanguageDropDown.md @@ -0,0 +1,50 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/ChangeLanguageDropdown/ChangeLanguageDropDown + +# Module: components/ChangeLanguageDropdown/ChangeLanguageDropDown + +## Table of contents + +### Functions + +- [changeLanguage](components_ChangeLanguageDropdown_ChangeLanguageDropDown.md#changelanguage) +- [default](components_ChangeLanguageDropdown_ChangeLanguageDropDown.md#default) + +## Functions + +### changeLanguage + +▸ **changeLanguage**(`languageCode`): `Promise`<`void`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `languageCode` | `string` | + +#### Returns + +`Promise`<`void`\> + +#### Defined in + +[src/components/ChangeLanguageDropdown/ChangeLanguageDropDown.tsx:14](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/ChangeLanguageDropdown/ChangeLanguageDropDown.tsx#L14) + +___ + +### default + +▸ **default**(`props`): `Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `InterfaceChangeLanguageDropDownProps` | + +#### Returns + +`Element` + +#### Defined in + +[src/components/ChangeLanguageDropdown/ChangeLanguageDropDown.tsx:18](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/ChangeLanguageDropdown/ChangeLanguageDropDown.tsx#L18) diff --git a/talawa-admin-docs/modules/components_ChangeLanguageDropdown_ChangeLanguageDropdown_test.md b/talawa-admin-docs/modules/components_ChangeLanguageDropdown_ChangeLanguageDropdown_test.md new file mode 100644 index 0000000000..205cda0fc2 --- /dev/null +++ b/talawa-admin-docs/modules/components_ChangeLanguageDropdown_ChangeLanguageDropdown_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/ChangeLanguageDropdown/ChangeLanguageDropdown.test + +# Module: components/ChangeLanguageDropdown/ChangeLanguageDropdown.test diff --git a/talawa-admin-docs/modules/components_CheckIn_CheckInModal.md b/talawa-admin-docs/modules/components_CheckIn_CheckInModal.md new file mode 100644 index 0000000000..211a200bf0 --- /dev/null +++ b/talawa-admin-docs/modules/components_CheckIn_CheckInModal.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/CheckIn/CheckInModal + +# Module: components/CheckIn/CheckInModal + +## Table of contents + +### Functions + +- [CheckInModal](components_CheckIn_CheckInModal.md#checkinmodal) + +## Functions + +### CheckInModal + +▸ **CheckInModal**(`props`): `Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | [`InterfaceModalProp`](../interfaces/components_CheckIn_types.InterfaceModalProp.md) | + +#### Returns + +`Element` + +#### Defined in + +[src/components/CheckIn/CheckInModal.tsx:16](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CheckIn/CheckInModal.tsx#L16) diff --git a/talawa-admin-docs/modules/components_CheckIn_CheckInModal_test.md b/talawa-admin-docs/modules/components_CheckIn_CheckInModal_test.md new file mode 100644 index 0000000000..b1e389bc6f --- /dev/null +++ b/talawa-admin-docs/modules/components_CheckIn_CheckInModal_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/CheckIn/CheckInModal.test + +# Module: components/CheckIn/CheckInModal.test diff --git a/talawa-admin-docs/modules/components_CheckIn_CheckInWrapper.md b/talawa-admin-docs/modules/components_CheckIn_CheckInWrapper.md new file mode 100644 index 0000000000..dae7e45724 --- /dev/null +++ b/talawa-admin-docs/modules/components_CheckIn_CheckInWrapper.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/CheckIn/CheckInWrapper + +# Module: components/CheckIn/CheckInWrapper + +## Table of contents + +### Functions + +- [CheckInWrapper](components_CheckIn_CheckInWrapper.md#checkinwrapper) + +## Functions + +### CheckInWrapper + +▸ **CheckInWrapper**(`props`): `Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `PropType` | + +#### Returns + +`Element` + +#### Defined in + +[src/components/CheckIn/CheckInWrapper.tsx:9](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CheckIn/CheckInWrapper.tsx#L9) diff --git a/talawa-admin-docs/modules/components_CheckIn_CheckInWrapper_test.md b/talawa-admin-docs/modules/components_CheckIn_CheckInWrapper_test.md new file mode 100644 index 0000000000..ba4052472f --- /dev/null +++ b/talawa-admin-docs/modules/components_CheckIn_CheckInWrapper_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/CheckIn/CheckInWrapper.test + +# Module: components/CheckIn/CheckInWrapper.test diff --git a/talawa-admin-docs/modules/components_CheckIn_TableRow.md b/talawa-admin-docs/modules/components_CheckIn_TableRow.md new file mode 100644 index 0000000000..34921ffd77 --- /dev/null +++ b/talawa-admin-docs/modules/components_CheckIn_TableRow.md @@ -0,0 +1,31 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/CheckIn/TableRow + +# Module: components/CheckIn/TableRow + +## Table of contents + +### Functions + +- [TableRow](components_CheckIn_TableRow.md#tablerow) + +## Functions + +### TableRow + +▸ **TableRow**(`«destructured»`): `Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `«destructured»` | `Object` | +| › `data` | [`InterfaceTableCheckIn`](../interfaces/components_CheckIn_types.InterfaceTableCheckIn.md) | +| › `refetch` | () => `void` | + +#### Returns + +`Element` + +#### Defined in + +[src/components/CheckIn/TableRow.tsx:10](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CheckIn/TableRow.tsx#L10) diff --git a/talawa-admin-docs/modules/components_CheckIn_TableRow_test.md b/talawa-admin-docs/modules/components_CheckIn_TableRow_test.md new file mode 100644 index 0000000000..2d26732b41 --- /dev/null +++ b/talawa-admin-docs/modules/components_CheckIn_TableRow_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/CheckIn/TableRow.test + +# Module: components/CheckIn/TableRow.test diff --git a/talawa-admin-docs/modules/components_CheckIn_mocks.md b/talawa-admin-docs/modules/components_CheckIn_mocks.md new file mode 100644 index 0000000000..67d7a2b123 --- /dev/null +++ b/talawa-admin-docs/modules/components_CheckIn_mocks.md @@ -0,0 +1,41 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/CheckIn/mocks + +# Module: components/CheckIn/mocks + +## Table of contents + +### Variables + +- [checkInMutationSuccess](components_CheckIn_mocks.md#checkinmutationsuccess) +- [checkInMutationUnsuccess](components_CheckIn_mocks.md#checkinmutationunsuccess) +- [checkInQueryMock](components_CheckIn_mocks.md#checkinquerymock) + +## Variables + +### checkInMutationSuccess + +• `Const` **checkInMutationSuccess**: { `request`: { `query`: `DocumentNode` = MARK\_CHECKIN; `variables`: { `allotedRoom`: `string` = ''; `allotedSeat`: `string` = ''; `eventId`: `string` = 'event123'; `userId`: `string` = 'user123' } } ; `result`: { `data`: { `checkIn`: { `_id`: `string` = '123' } } } }[] + +#### Defined in + +[src/components/CheckIn/mocks.ts:48](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CheckIn/mocks.ts#L48) + +___ + +### checkInMutationUnsuccess + +• `Const` **checkInMutationUnsuccess**: { `error`: `Error` ; `request`: { `query`: `DocumentNode` = MARK\_CHECKIN; `variables`: { `allotedRoom`: `string` = ''; `allotedSeat`: `string` = ''; `eventId`: `string` = 'event123'; `userId`: `string` = 'user123' } } }[] + +#### Defined in + +[src/components/CheckIn/mocks.ts:69](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CheckIn/mocks.ts#L69) + +___ + +### checkInQueryMock + +• `Const` **checkInQueryMock**: { `request`: { `query`: `DocumentNode` = EVENT\_CHECKINS; `variables`: { `id`: `string` = 'event123' } } ; `result`: { `data`: [`InterfaceAttendeeQueryResponse`](../interfaces/components_CheckIn_types.InterfaceAttendeeQueryResponse.md) = checkInQueryData } }[] + +#### Defined in + +[src/components/CheckIn/mocks.ts:36](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CheckIn/mocks.ts#L36) diff --git a/talawa-admin-docs/modules/components_CheckIn_tagTemplate.md b/talawa-admin-docs/modules/components_CheckIn_tagTemplate.md new file mode 100644 index 0000000000..efb1198865 --- /dev/null +++ b/talawa-admin-docs/modules/components_CheckIn_tagTemplate.md @@ -0,0 +1,19 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/CheckIn/tagTemplate + +# Module: components/CheckIn/tagTemplate + +## Table of contents + +### Variables + +- [tagTemplate](components_CheckIn_tagTemplate.md#tagtemplate) + +## Variables + +### tagTemplate + +• `Const` **tagTemplate**: `Template` + +#### Defined in + +[src/components/CheckIn/tagTemplate.ts:3](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CheckIn/tagTemplate.ts#L3) diff --git a/talawa-admin-docs/modules/components_CheckIn_types.md b/talawa-admin-docs/modules/components_CheckIn_types.md new file mode 100644 index 0000000000..5b47904381 --- /dev/null +++ b/talawa-admin-docs/modules/components_CheckIn_types.md @@ -0,0 +1,14 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/CheckIn/types + +# Module: components/CheckIn/types + +## Table of contents + +### Interfaces + +- [InterfaceAttendeeCheckIn](../interfaces/components_CheckIn_types.InterfaceAttendeeCheckIn.md) +- [InterfaceAttendeeQueryResponse](../interfaces/components_CheckIn_types.InterfaceAttendeeQueryResponse.md) +- [InterfaceModalProp](../interfaces/components_CheckIn_types.InterfaceModalProp.md) +- [InterfaceTableCheckIn](../interfaces/components_CheckIn_types.InterfaceTableCheckIn.md) +- [InterfaceTableData](../interfaces/components_CheckIn_types.InterfaceTableData.md) +- [InterfaceUser](../interfaces/components_CheckIn_types.InterfaceUser.md) diff --git a/talawa-admin-docs/modules/components_CollapsibleDropdown_CollapsibleDropdown.md b/talawa-admin-docs/modules/components_CollapsibleDropdown_CollapsibleDropdown.md new file mode 100644 index 0000000000..249c1fc758 --- /dev/null +++ b/talawa-admin-docs/modules/components_CollapsibleDropdown_CollapsibleDropdown.md @@ -0,0 +1,33 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/CollapsibleDropdown/CollapsibleDropdown + +# Module: components/CollapsibleDropdown/CollapsibleDropdown + +## Table of contents + +### Interfaces + +- [InterfaceCollapsibleDropdown](../interfaces/components_CollapsibleDropdown_CollapsibleDropdown.InterfaceCollapsibleDropdown.md) + +### Functions + +- [default](components_CollapsibleDropdown_CollapsibleDropdown.md#default) + +## Functions + +### default + +▸ **default**(`«destructured»`): `Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `«destructured»` | [`InterfaceCollapsibleDropdown`](../interfaces/components_CollapsibleDropdown_CollapsibleDropdown.InterfaceCollapsibleDropdown.md) | + +#### Returns + +`Element` + +#### Defined in + +[src/components/CollapsibleDropdown/CollapsibleDropdown.tsx:13](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/CollapsibleDropdown/CollapsibleDropdown.tsx#L13) diff --git a/talawa-admin-docs/modules/components_CollapsibleDropdown_CollapsibleDropdown_test.md b/talawa-admin-docs/modules/components_CollapsibleDropdown_CollapsibleDropdown_test.md new file mode 100644 index 0000000000..e5eb033261 --- /dev/null +++ b/talawa-admin-docs/modules/components_CollapsibleDropdown_CollapsibleDropdown_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/CollapsibleDropdown/CollapsibleDropdown.test + +# Module: components/CollapsibleDropdown/CollapsibleDropdown.test diff --git a/talawa-admin-docs/modules/components_ContriStats_ContriStats.md b/talawa-admin-docs/modules/components_ContriStats_ContriStats.md new file mode 100644 index 0000000000..a7cc9e6d75 --- /dev/null +++ b/talawa-admin-docs/modules/components_ContriStats_ContriStats.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/ContriStats/ContriStats + +# Module: components/ContriStats/ContriStats + +## Table of contents + +### Functions + +- [default](components_ContriStats_ContriStats.md#default) + +## Functions + +### default + +▸ **default**(`props`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `InterfaceContriStatsProps` | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/ContriStats/ContriStats.tsx:14](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/ContriStats/ContriStats.tsx#L14) diff --git a/talawa-admin-docs/modules/components_ContriStats_ContriStats_test.md b/talawa-admin-docs/modules/components_ContriStats_ContriStats_test.md new file mode 100644 index 0000000000..b1faeb7015 --- /dev/null +++ b/talawa-admin-docs/modules/components_ContriStats_ContriStats_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/ContriStats/ContriStats.test + +# Module: components/ContriStats/ContriStats.test diff --git a/talawa-admin-docs/modules/components_EventCalendar_EventCalendar.md b/talawa-admin-docs/modules/components_EventCalendar_EventCalendar.md new file mode 100644 index 0000000000..a6d00af0cb --- /dev/null +++ b/talawa-admin-docs/modules/components_EventCalendar_EventCalendar.md @@ -0,0 +1,30 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/EventCalendar/EventCalendar + +# Module: components/EventCalendar/EventCalendar + +## Table of contents + +### Functions + +- [default](components_EventCalendar_EventCalendar.md#default) + +## Functions + +### default + +▸ **default**(`props`, `context?`): ``null`` \| `ReactElement`<`any`, `any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `PropsWithChildren`<`InterfaceCalendarProps`\> | +| `context?` | `any` | + +#### Returns + +``null`` \| `ReactElement`<`any`, `any`\> + +#### Defined in + +node_modules/@types/react/index.d.ts:543 diff --git a/talawa-admin-docs/modules/components_EventCalendar_EventCalendar_test.md b/talawa-admin-docs/modules/components_EventCalendar_EventCalendar_test.md new file mode 100644 index 0000000000..4a30c73ee9 --- /dev/null +++ b/talawa-admin-docs/modules/components_EventCalendar_EventCalendar_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/EventCalendar/EventCalendar.test + +# Module: components/EventCalendar/EventCalendar.test diff --git a/talawa-admin-docs/modules/components_EventListCard_EventListCard.md b/talawa-admin-docs/modules/components_EventListCard_EventListCard.md new file mode 100644 index 0000000000..d6c9251acf --- /dev/null +++ b/talawa-admin-docs/modules/components_EventListCard_EventListCard.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/EventListCard/EventListCard + +# Module: components/EventListCard/EventListCard + +## Table of contents + +### Functions + +- [default](components_EventListCard_EventListCard.md#default) + +## Functions + +### default + +▸ **default**(`props`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `InterfaceEventListCardProps` | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/EventListCard/EventListCard.tsx:32](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/EventListCard/EventListCard.tsx#L32) diff --git a/talawa-admin-docs/modules/components_EventListCard_EventListCard_test.md b/talawa-admin-docs/modules/components_EventListCard_EventListCard_test.md new file mode 100644 index 0000000000..768a6041a2 --- /dev/null +++ b/talawa-admin-docs/modules/components_EventListCard_EventListCard_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/EventListCard/EventListCard.test + +# Module: components/EventListCard/EventListCard.test diff --git a/talawa-admin-docs/modules/components_EventProjectModals_AddEventProjectModal.md b/talawa-admin-docs/modules/components_EventProjectModals_AddEventProjectModal.md new file mode 100644 index 0000000000..ca1dd3aa24 --- /dev/null +++ b/talawa-admin-docs/modules/components_EventProjectModals_AddEventProjectModal.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/EventProjectModals/AddEventProjectModal + +# Module: components/EventProjectModals/AddEventProjectModal + +## Table of contents + +### Functions + +- [AddEventProjectModal](components_EventProjectModals_AddEventProjectModal.md#addeventprojectmodal) + +## Functions + +### AddEventProjectModal + +▸ **AddEventProjectModal**(`«destructured»`): `Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `«destructured»` | `ModalPropType` | + +#### Returns + +`Element` + +#### Defined in + +[src/components/EventProjectModals/AddEventProjectModal.tsx:14](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/EventProjectModals/AddEventProjectModal.tsx#L14) diff --git a/talawa-admin-docs/modules/components_EventProjectModals_AddEventProjectModal_test.md b/talawa-admin-docs/modules/components_EventProjectModals_AddEventProjectModal_test.md new file mode 100644 index 0000000000..f690026c0a --- /dev/null +++ b/talawa-admin-docs/modules/components_EventProjectModals_AddEventProjectModal_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/EventProjectModals/AddEventProjectModal.test + +# Module: components/EventProjectModals/AddEventProjectModal.test diff --git a/talawa-admin-docs/modules/components_EventProjectModals_DeleteEventProjectModal.md b/talawa-admin-docs/modules/components_EventProjectModals_DeleteEventProjectModal.md new file mode 100644 index 0000000000..7c87827aa7 --- /dev/null +++ b/talawa-admin-docs/modules/components_EventProjectModals_DeleteEventProjectModal.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/EventProjectModals/DeleteEventProjectModal + +# Module: components/EventProjectModals/DeleteEventProjectModal + +## Table of contents + +### Functions + +- [DeleteEventProjectModal](components_EventProjectModals_DeleteEventProjectModal.md#deleteeventprojectmodal) + +## Functions + +### DeleteEventProjectModal + +▸ **DeleteEventProjectModal**(`props`): `Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `ModalPropType` | + +#### Returns + +`Element` + +#### Defined in + +[src/components/EventProjectModals/DeleteEventProjectModal.tsx:18](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/EventProjectModals/DeleteEventProjectModal.tsx#L18) diff --git a/talawa-admin-docs/modules/components_EventProjectModals_DeleteEventProjectModal_test.md b/talawa-admin-docs/modules/components_EventProjectModals_DeleteEventProjectModal_test.md new file mode 100644 index 0000000000..383f71341f --- /dev/null +++ b/talawa-admin-docs/modules/components_EventProjectModals_DeleteEventProjectModal_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/EventProjectModals/DeleteEventProjectModal.test + +# Module: components/EventProjectModals/DeleteEventProjectModal.test diff --git a/talawa-admin-docs/modules/components_EventProjectModals_UpdateEventProjectModal.md b/talawa-admin-docs/modules/components_EventProjectModals_UpdateEventProjectModal.md new file mode 100644 index 0000000000..b087f83aee --- /dev/null +++ b/talawa-admin-docs/modules/components_EventProjectModals_UpdateEventProjectModal.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/EventProjectModals/UpdateEventProjectModal + +# Module: components/EventProjectModals/UpdateEventProjectModal + +## Table of contents + +### Functions + +- [UpdateEventProjectModal](components_EventProjectModals_UpdateEventProjectModal.md#updateeventprojectmodal) + +## Functions + +### UpdateEventProjectModal + +▸ **UpdateEventProjectModal**(`props`): `Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `ModalPropType` | + +#### Returns + +`Element` + +#### Defined in + +[src/components/EventProjectModals/UpdateEventProjectModal.tsx:18](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/EventProjectModals/UpdateEventProjectModal.tsx#L18) diff --git a/talawa-admin-docs/modules/components_EventProjectModals_UpdateEventProjectModal_test.md b/talawa-admin-docs/modules/components_EventProjectModals_UpdateEventProjectModal_test.md new file mode 100644 index 0000000000..d4e38295c3 --- /dev/null +++ b/talawa-admin-docs/modules/components_EventProjectModals_UpdateEventProjectModal_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/EventProjectModals/UpdateEventProjectModal.test + +# Module: components/EventProjectModals/UpdateEventProjectModal.test diff --git a/talawa-admin-docs/modules/components_EventRegistrantsModal_EventRegistrantsModal.md b/talawa-admin-docs/modules/components_EventRegistrantsModal_EventRegistrantsModal.md new file mode 100644 index 0000000000..7f672723fd --- /dev/null +++ b/talawa-admin-docs/modules/components_EventRegistrantsModal_EventRegistrantsModal.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/EventRegistrantsModal/EventRegistrantsModal + +# Module: components/EventRegistrantsModal/EventRegistrantsModal + +## Table of contents + +### Functions + +- [EventRegistrantsModal](components_EventRegistrantsModal_EventRegistrantsModal.md#eventregistrantsmodal) + +## Functions + +### EventRegistrantsModal + +▸ **EventRegistrantsModal**(`props`): `Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `ModalPropType` | + +#### Returns + +`Element` + +#### Defined in + +[src/components/EventRegistrantsModal/EventRegistrantsModal.tsx:31](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/EventRegistrantsModal/EventRegistrantsModal.tsx#L31) diff --git a/talawa-admin-docs/modules/components_EventRegistrantsModal_EventRegistrantsModal_test.md b/talawa-admin-docs/modules/components_EventRegistrantsModal_EventRegistrantsModal_test.md new file mode 100644 index 0000000000..f755a4e6d5 --- /dev/null +++ b/talawa-admin-docs/modules/components_EventRegistrantsModal_EventRegistrantsModal_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/EventRegistrantsModal/EventRegistrantsModal.test + +# Module: components/EventRegistrantsModal/EventRegistrantsModal.test diff --git a/talawa-admin-docs/modules/components_EventRegistrantsModal_EventRegistrantsWrapper.md b/talawa-admin-docs/modules/components_EventRegistrantsModal_EventRegistrantsWrapper.md new file mode 100644 index 0000000000..c7d0744c33 --- /dev/null +++ b/talawa-admin-docs/modules/components_EventRegistrantsModal_EventRegistrantsWrapper.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/EventRegistrantsModal/EventRegistrantsWrapper + +# Module: components/EventRegistrantsModal/EventRegistrantsWrapper + +## Table of contents + +### Functions + +- [EventRegistrantsWrapper](components_EventRegistrantsModal_EventRegistrantsWrapper.md#eventregistrantswrapper) + +## Functions + +### EventRegistrantsWrapper + +▸ **EventRegistrantsWrapper**(`props`): `Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `PropType` | + +#### Returns + +`Element` + +#### Defined in + +[src/components/EventRegistrantsModal/EventRegistrantsWrapper.tsx:10](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/EventRegistrantsModal/EventRegistrantsWrapper.tsx#L10) diff --git a/talawa-admin-docs/modules/components_EventRegistrantsModal_EventRegistrantsWrapper_test.md b/talawa-admin-docs/modules/components_EventRegistrantsModal_EventRegistrantsWrapper_test.md new file mode 100644 index 0000000000..e952929703 --- /dev/null +++ b/talawa-admin-docs/modules/components_EventRegistrantsModal_EventRegistrantsWrapper_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/EventRegistrantsModal/EventRegistrantsWrapper.test + +# Module: components/EventRegistrantsModal/EventRegistrantsWrapper.test diff --git a/talawa-admin-docs/modules/components_IconComponent_IconComponent.md b/talawa-admin-docs/modules/components_IconComponent_IconComponent.md new file mode 100644 index 0000000000..0d43d06cf2 --- /dev/null +++ b/talawa-admin-docs/modules/components_IconComponent_IconComponent.md @@ -0,0 +1,33 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/IconComponent/IconComponent + +# Module: components/IconComponent/IconComponent + +## Table of contents + +### Interfaces + +- [InterfaceIconComponent](../interfaces/components_IconComponent_IconComponent.InterfaceIconComponent.md) + +### Functions + +- [default](components_IconComponent_IconComponent.md#default) + +## Functions + +### default + +▸ **default**(`props`): `Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | [`InterfaceIconComponent`](../interfaces/components_IconComponent_IconComponent.InterfaceIconComponent.md) | + +#### Returns + +`Element` + +#### Defined in + +[src/components/IconComponent/IconComponent.tsx:19](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/IconComponent/IconComponent.tsx#L19) diff --git a/talawa-admin-docs/modules/components_IconComponent_IconComponent_test.md b/talawa-admin-docs/modules/components_IconComponent_IconComponent_test.md new file mode 100644 index 0000000000..4753149ae6 --- /dev/null +++ b/talawa-admin-docs/modules/components_IconComponent_IconComponent_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/IconComponent/IconComponent.test + +# Module: components/IconComponent/IconComponent.test diff --git a/talawa-admin-docs/modules/components_LandingPage_LandingPage.md b/talawa-admin-docs/modules/components_LandingPage_LandingPage.md new file mode 100644 index 0000000000..d74f17edb5 --- /dev/null +++ b/talawa-admin-docs/modules/components_LandingPage_LandingPage.md @@ -0,0 +1,23 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/LandingPage/LandingPage + +# Module: components/LandingPage/LandingPage + +## Table of contents + +### Functions + +- [default](components_LandingPage_LandingPage.md#default) + +## Functions + +### default + +▸ **default**(): `JSX.Element` + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/LandingPage/LandingPage.tsx:6](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/LandingPage/LandingPage.tsx#L6) diff --git a/talawa-admin-docs/modules/components_LandingPage_LandingPage_test.md b/talawa-admin-docs/modules/components_LandingPage_LandingPage_test.md new file mode 100644 index 0000000000..039cbf1ff6 --- /dev/null +++ b/talawa-admin-docs/modules/components_LandingPage_LandingPage_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/LandingPage/LandingPage.test + +# Module: components/LandingPage/LandingPage.test diff --git a/talawa-admin-docs/modules/components_LeftDrawerOrg_LeftDrawerOrg.md b/talawa-admin-docs/modules/components_LeftDrawerOrg_LeftDrawerOrg.md new file mode 100644 index 0000000000..e8da5ad34f --- /dev/null +++ b/talawa-admin-docs/modules/components_LeftDrawerOrg_LeftDrawerOrg.md @@ -0,0 +1,33 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/LeftDrawerOrg/LeftDrawerOrg + +# Module: components/LeftDrawerOrg/LeftDrawerOrg + +## Table of contents + +### Interfaces + +- [InterfaceLeftDrawerProps](../interfaces/components_LeftDrawerOrg_LeftDrawerOrg.InterfaceLeftDrawerProps.md) + +### Functions + +- [default](components_LeftDrawerOrg_LeftDrawerOrg.md#default) + +## Functions + +### default + +▸ **default**(`«destructured»`): `Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `«destructured»` | [`InterfaceLeftDrawerProps`](../interfaces/components_LeftDrawerOrg_LeftDrawerOrg.InterfaceLeftDrawerProps.md) | + +#### Returns + +`Element` + +#### Defined in + +[src/components/LeftDrawerOrg/LeftDrawerOrg.tsx:26](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/LeftDrawerOrg/LeftDrawerOrg.tsx#L26) diff --git a/talawa-admin-docs/modules/components_LeftDrawerOrg_LeftDrawerOrg_test.md b/talawa-admin-docs/modules/components_LeftDrawerOrg_LeftDrawerOrg_test.md new file mode 100644 index 0000000000..8923adc0c2 --- /dev/null +++ b/talawa-admin-docs/modules/components_LeftDrawerOrg_LeftDrawerOrg_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/LeftDrawerOrg/LeftDrawerOrg.test + +# Module: components/LeftDrawerOrg/LeftDrawerOrg.test diff --git a/talawa-admin-docs/modules/components_LeftDrawer_LeftDrawer.md b/talawa-admin-docs/modules/components_LeftDrawer_LeftDrawer.md new file mode 100644 index 0000000000..67af4bdfa5 --- /dev/null +++ b/talawa-admin-docs/modules/components_LeftDrawer_LeftDrawer.md @@ -0,0 +1,33 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/LeftDrawer/LeftDrawer + +# Module: components/LeftDrawer/LeftDrawer + +## Table of contents + +### Interfaces + +- [InterfaceLeftDrawerProps](../interfaces/components_LeftDrawer_LeftDrawer.InterfaceLeftDrawerProps.md) + +### Functions + +- [default](components_LeftDrawer_LeftDrawer.md#default) + +## Functions + +### default + +▸ **default**(`«destructured»`): `Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `«destructured»` | [`InterfaceLeftDrawerProps`](../interfaces/components_LeftDrawer_LeftDrawer.InterfaceLeftDrawerProps.md) | + +#### Returns + +`Element` + +#### Defined in + +[src/components/LeftDrawer/LeftDrawer.tsx:20](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/LeftDrawer/LeftDrawer.tsx#L20) diff --git a/talawa-admin-docs/modules/components_LeftDrawer_LeftDrawer_test.md b/talawa-admin-docs/modules/components_LeftDrawer_LeftDrawer_test.md new file mode 100644 index 0000000000..91d8b23c78 --- /dev/null +++ b/talawa-admin-docs/modules/components_LeftDrawer_LeftDrawer_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/LeftDrawer/LeftDrawer.test + +# Module: components/LeftDrawer/LeftDrawer.test diff --git a/talawa-admin-docs/modules/components_Loader_Loader.md b/talawa-admin-docs/modules/components_Loader_Loader.md new file mode 100644 index 0000000000..11141a8c7a --- /dev/null +++ b/talawa-admin-docs/modules/components_Loader_Loader.md @@ -0,0 +1,23 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/Loader/Loader + +# Module: components/Loader/Loader + +## Table of contents + +### Functions + +- [default](components_Loader_Loader.md#default) + +## Functions + +### default + +▸ **default**(): `Element` + +#### Returns + +`Element` + +#### Defined in + +[src/components/Loader/Loader.tsx:5](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/Loader/Loader.tsx#L5) diff --git a/talawa-admin-docs/modules/components_Loader_Loader_test.md b/talawa-admin-docs/modules/components_Loader_Loader_test.md new file mode 100644 index 0000000000..97f48de7d6 --- /dev/null +++ b/talawa-admin-docs/modules/components_Loader_Loader_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/Loader/Loader.test + +# Module: components/Loader/Loader.test diff --git a/talawa-admin-docs/modules/components_MemberRequestCard_MemberRequestCard.md b/talawa-admin-docs/modules/components_MemberRequestCard_MemberRequestCard.md new file mode 100644 index 0000000000..c47491fab3 --- /dev/null +++ b/talawa-admin-docs/modules/components_MemberRequestCard_MemberRequestCard.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/MemberRequestCard/MemberRequestCard + +# Module: components/MemberRequestCard/MemberRequestCard + +## Table of contents + +### Functions + +- [default](components_MemberRequestCard_MemberRequestCard.md#default) + +## Functions + +### default + +▸ **default**(`props`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `InterfaceMemberRequestCardProps` | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/MemberRequestCard/MemberRequestCard.tsx:26](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/MemberRequestCard/MemberRequestCard.tsx#L26) diff --git a/talawa-admin-docs/modules/components_MemberRequestCard_MemberRequestCard_test.md b/talawa-admin-docs/modules/components_MemberRequestCard_MemberRequestCard_test.md new file mode 100644 index 0000000000..467f66899c --- /dev/null +++ b/talawa-admin-docs/modules/components_MemberRequestCard_MemberRequestCard_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/MemberRequestCard/MemberRequestCard.test + +# Module: components/MemberRequestCard/MemberRequestCard.test diff --git a/talawa-admin-docs/modules/components_NotFound_NotFound.md b/talawa-admin-docs/modules/components_NotFound_NotFound.md new file mode 100644 index 0000000000..201dc29d3d --- /dev/null +++ b/talawa-admin-docs/modules/components_NotFound_NotFound.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/NotFound/NotFound + +# Module: components/NotFound/NotFound + +## Table of contents + +### Functions + +- [default](components_NotFound_NotFound.md#default) + +## Functions + +### default + +▸ **default**(`props`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `InterfaceNotFoundProps` | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/NotFound/NotFound.tsx:11](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/NotFound/NotFound.tsx#L11) diff --git a/talawa-admin-docs/modules/components_NotFound_NotFound_test.md b/talawa-admin-docs/modules/components_NotFound_NotFound_test.md new file mode 100644 index 0000000000..27f07457d2 --- /dev/null +++ b/talawa-admin-docs/modules/components_NotFound_NotFound_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/NotFound/NotFound.test + +# Module: components/NotFound/NotFound.test diff --git a/talawa-admin-docs/modules/components_OrgAdminListCard_OrgAdminListCard.md b/talawa-admin-docs/modules/components_OrgAdminListCard_OrgAdminListCard.md new file mode 100644 index 0000000000..becb2ee57b --- /dev/null +++ b/talawa-admin-docs/modules/components_OrgAdminListCard_OrgAdminListCard.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/OrgAdminListCard/OrgAdminListCard + +# Module: components/OrgAdminListCard/OrgAdminListCard + +## Table of contents + +### Functions + +- [default](components_OrgAdminListCard_OrgAdminListCard.md#default) + +## Functions + +### default + +▸ **default**(`props`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `InterfaceOrgPeopleListCardProps` | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/OrgAdminListCard/OrgAdminListCard.tsx:26](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/OrgAdminListCard/OrgAdminListCard.tsx#L26) diff --git a/talawa-admin-docs/modules/components_OrgAdminListCard_OrgAdminListCard_test.md b/talawa-admin-docs/modules/components_OrgAdminListCard_OrgAdminListCard_test.md new file mode 100644 index 0000000000..4c74c02867 --- /dev/null +++ b/talawa-admin-docs/modules/components_OrgAdminListCard_OrgAdminListCard_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/OrgAdminListCard/OrgAdminListCard.test + +# Module: components/OrgAdminListCard/OrgAdminListCard.test diff --git a/talawa-admin-docs/modules/components_OrgContriCards_OrgContriCards.md b/talawa-admin-docs/modules/components_OrgContriCards_OrgContriCards.md new file mode 100644 index 0000000000..92da0a07c0 --- /dev/null +++ b/talawa-admin-docs/modules/components_OrgContriCards_OrgContriCards.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/OrgContriCards/OrgContriCards + +# Module: components/OrgContriCards/OrgContriCards + +## Table of contents + +### Functions + +- [default](components_OrgContriCards_OrgContriCards.md#default) + +## Functions + +### default + +▸ **default**(`props`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `InterfaceOrgContriCardsProps` | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/OrgContriCards/OrgContriCards.tsx:17](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/OrgContriCards/OrgContriCards.tsx#L17) diff --git a/talawa-admin-docs/modules/components_OrgContriCards_OrgContriCards_test.md b/talawa-admin-docs/modules/components_OrgContriCards_OrgContriCards_test.md new file mode 100644 index 0000000000..32030428bb --- /dev/null +++ b/talawa-admin-docs/modules/components_OrgContriCards_OrgContriCards_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/OrgContriCards/OrgContriCards.test + +# Module: components/OrgContriCards/OrgContriCards.test diff --git a/talawa-admin-docs/modules/components_OrgDelete_OrgDelete.md b/talawa-admin-docs/modules/components_OrgDelete_OrgDelete.md new file mode 100644 index 0000000000..4d5b157c3f --- /dev/null +++ b/talawa-admin-docs/modules/components_OrgDelete_OrgDelete.md @@ -0,0 +1,23 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/OrgDelete/OrgDelete + +# Module: components/OrgDelete/OrgDelete + +## Table of contents + +### Functions + +- [default](components_OrgDelete_OrgDelete.md#default) + +## Functions + +### default + +▸ **default**(): `JSX.Element` + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/OrgDelete/OrgDelete.tsx:4](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/OrgDelete/OrgDelete.tsx#L4) diff --git a/talawa-admin-docs/modules/components_OrgDelete_OrgDelete_test.md b/talawa-admin-docs/modules/components_OrgDelete_OrgDelete_test.md new file mode 100644 index 0000000000..574934084f --- /dev/null +++ b/talawa-admin-docs/modules/components_OrgDelete_OrgDelete_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/OrgDelete/OrgDelete.test + +# Module: components/OrgDelete/OrgDelete.test diff --git a/talawa-admin-docs/modules/components_OrgListCard_OrgListCard.md b/talawa-admin-docs/modules/components_OrgListCard_OrgListCard.md new file mode 100644 index 0000000000..899f502836 --- /dev/null +++ b/talawa-admin-docs/modules/components_OrgListCard_OrgListCard.md @@ -0,0 +1,33 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/OrgListCard/OrgListCard + +# Module: components/OrgListCard/OrgListCard + +## Table of contents + +### Interfaces + +- [InterfaceOrgListCardProps](../interfaces/components_OrgListCard_OrgListCard.InterfaceOrgListCardProps.md) + +### Functions + +- [default](components_OrgListCard_OrgListCard.md#default) + +## Functions + +### default + +▸ **default**(`props`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | [`InterfaceOrgListCardProps`](../interfaces/components_OrgListCard_OrgListCard.InterfaceOrgListCardProps.md) | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/OrgListCard/OrgListCard.tsx:13](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/OrgListCard/OrgListCard.tsx#L13) diff --git a/talawa-admin-docs/modules/components_OrgListCard_OrgListCard_test.md b/talawa-admin-docs/modules/components_OrgListCard_OrgListCard_test.md new file mode 100644 index 0000000000..07415ddf2d --- /dev/null +++ b/talawa-admin-docs/modules/components_OrgListCard_OrgListCard_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/OrgListCard/OrgListCard.test + +# Module: components/OrgListCard/OrgListCard.test diff --git a/talawa-admin-docs/modules/components_OrgPeopleListCard_OrgPeopleListCard.md b/talawa-admin-docs/modules/components_OrgPeopleListCard_OrgPeopleListCard.md new file mode 100644 index 0000000000..2f9298e315 --- /dev/null +++ b/talawa-admin-docs/modules/components_OrgPeopleListCard_OrgPeopleListCard.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/OrgPeopleListCard/OrgPeopleListCard + +# Module: components/OrgPeopleListCard/OrgPeopleListCard + +## Table of contents + +### Functions + +- [default](components_OrgPeopleListCard_OrgPeopleListCard.md#default) + +## Functions + +### default + +▸ **default**(`props`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `InterfaceOrgPeopleListCardProps` | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/OrgPeopleListCard/OrgPeopleListCard.tsx:24](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/OrgPeopleListCard/OrgPeopleListCard.tsx#L24) diff --git a/talawa-admin-docs/modules/components_OrgPeopleListCard_OrgPeopleListCard_test.md b/talawa-admin-docs/modules/components_OrgPeopleListCard_OrgPeopleListCard_test.md new file mode 100644 index 0000000000..0195d958b6 --- /dev/null +++ b/talawa-admin-docs/modules/components_OrgPeopleListCard_OrgPeopleListCard_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/OrgPeopleListCard/OrgPeopleListCard.test + +# Module: components/OrgPeopleListCard/OrgPeopleListCard.test diff --git a/talawa-admin-docs/modules/components_OrgPostCard_OrgPostCard.md b/talawa-admin-docs/modules/components_OrgPostCard_OrgPostCard.md new file mode 100644 index 0000000000..856ad3bb1c --- /dev/null +++ b/talawa-admin-docs/modules/components_OrgPostCard_OrgPostCard.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/OrgPostCard/OrgPostCard + +# Module: components/OrgPostCard/OrgPostCard + +## Table of contents + +### Functions + +- [default](components_OrgPostCard_OrgPostCard.md#default) + +## Functions + +### default + +▸ **default**(`props`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `InterfaceOrgPostCardProps` | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/OrgPostCard/OrgPostCard.tsx:28](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/OrgPostCard/OrgPostCard.tsx#L28) diff --git a/talawa-admin-docs/modules/components_OrgPostCard_OrgPostCard_test.md b/talawa-admin-docs/modules/components_OrgPostCard_OrgPostCard_test.md new file mode 100644 index 0000000000..77ac86c214 --- /dev/null +++ b/talawa-admin-docs/modules/components_OrgPostCard_OrgPostCard_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/OrgPostCard/OrgPostCard.test + +# Module: components/OrgPostCard/OrgPostCard.test diff --git a/talawa-admin-docs/modules/components_OrgUpdate_OrgUpdate.md b/talawa-admin-docs/modules/components_OrgUpdate_OrgUpdate.md new file mode 100644 index 0000000000..12f1fb6b3b --- /dev/null +++ b/talawa-admin-docs/modules/components_OrgUpdate_OrgUpdate.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/OrgUpdate/OrgUpdate + +# Module: components/OrgUpdate/OrgUpdate + +## Table of contents + +### Functions + +- [default](components_OrgUpdate_OrgUpdate.md#default) + +## Functions + +### default + +▸ **default**(`props`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `InterfaceOrgUpdateProps` | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/OrgUpdate/OrgUpdate.tsx:20](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/OrgUpdate/OrgUpdate.tsx#L20) diff --git a/talawa-admin-docs/modules/components_OrgUpdate_OrgUpdate_test.md b/talawa-admin-docs/modules/components_OrgUpdate_OrgUpdate_test.md new file mode 100644 index 0000000000..e619c0f075 --- /dev/null +++ b/talawa-admin-docs/modules/components_OrgUpdate_OrgUpdate_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/OrgUpdate/OrgUpdate.test + +# Module: components/OrgUpdate/OrgUpdate.test diff --git a/talawa-admin-docs/modules/components_OrganizationCardStart_OrganizationCardStart.md b/talawa-admin-docs/modules/components_OrganizationCardStart_OrganizationCardStart.md new file mode 100644 index 0000000000..98aec646d0 --- /dev/null +++ b/talawa-admin-docs/modules/components_OrganizationCardStart_OrganizationCardStart.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/OrganizationCardStart/OrganizationCardStart + +# Module: components/OrganizationCardStart/OrganizationCardStart + +## Table of contents + +### Functions + +- [default](components_OrganizationCardStart_OrganizationCardStart.md#default) + +## Functions + +### default + +▸ **default**(`props`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `InterfaceOrganizationCardStartProps` | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/OrganizationCardStart/OrganizationCardStart.tsx:11](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/OrganizationCardStart/OrganizationCardStart.tsx#L11) diff --git a/talawa-admin-docs/modules/components_OrganizationCardStart_OrganizationCardStart_test.md b/talawa-admin-docs/modules/components_OrganizationCardStart_OrganizationCardStart_test.md new file mode 100644 index 0000000000..6071b1a57e --- /dev/null +++ b/talawa-admin-docs/modules/components_OrganizationCardStart_OrganizationCardStart_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/OrganizationCardStart/OrganizationCardStart.test + +# Module: components/OrganizationCardStart/OrganizationCardStart.test diff --git a/talawa-admin-docs/modules/components_OrganizationCard_OrganizationCard.md b/talawa-admin-docs/modules/components_OrganizationCard_OrganizationCard.md new file mode 100644 index 0000000000..360ee52b37 --- /dev/null +++ b/talawa-admin-docs/modules/components_OrganizationCard_OrganizationCard.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/OrganizationCard/OrganizationCard + +# Module: components/OrganizationCard/OrganizationCard + +## Table of contents + +### Functions + +- [default](components_OrganizationCard_OrganizationCard.md#default) + +## Functions + +### default + +▸ **default**(`props`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `InterfaceOrganizationCardProps` | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/OrganizationCard/OrganizationCard.tsx:13](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/OrganizationCard/OrganizationCard.tsx#L13) diff --git a/talawa-admin-docs/modules/components_OrganizationCard_OrganizationCard_test.md b/talawa-admin-docs/modules/components_OrganizationCard_OrganizationCard_test.md new file mode 100644 index 0000000000..ab6e5c8712 --- /dev/null +++ b/talawa-admin-docs/modules/components_OrganizationCard_OrganizationCard_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/OrganizationCard/OrganizationCard.test + +# Module: components/OrganizationCard/OrganizationCard.test diff --git a/talawa-admin-docs/modules/components_OrganizationScreen_OrganizationScreen.md b/talawa-admin-docs/modules/components_OrganizationScreen_OrganizationScreen.md new file mode 100644 index 0000000000..f13a9bc770 --- /dev/null +++ b/talawa-admin-docs/modules/components_OrganizationScreen_OrganizationScreen.md @@ -0,0 +1,33 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/OrganizationScreen/OrganizationScreen + +# Module: components/OrganizationScreen/OrganizationScreen + +## Table of contents + +### Interfaces + +- [InterfaceOrganizationScreenProps](../interfaces/components_OrganizationScreen_OrganizationScreen.InterfaceOrganizationScreenProps.md) + +### Functions + +- [default](components_OrganizationScreen_OrganizationScreen.md#default) + +## Functions + +### default + +▸ **default**(`«destructured»`): `Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `«destructured»` | [`InterfaceOrganizationScreenProps`](../interfaces/components_OrganizationScreen_OrganizationScreen.InterfaceOrganizationScreenProps.md) | + +#### Returns + +`Element` + +#### Defined in + +[src/components/OrganizationScreen/OrganizationScreen.tsx:15](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/OrganizationScreen/OrganizationScreen.tsx#L15) diff --git a/talawa-admin-docs/modules/components_OrganizationScreen_OrganizationScreen_test.md b/talawa-admin-docs/modules/components_OrganizationScreen_OrganizationScreen_test.md new file mode 100644 index 0000000000..1965da619e --- /dev/null +++ b/talawa-admin-docs/modules/components_OrganizationScreen_OrganizationScreen_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/OrganizationScreen/OrganizationScreen.test + +# Module: components/OrganizationScreen/OrganizationScreen.test diff --git a/talawa-admin-docs/modules/components_PaginationList_PaginationList.md b/talawa-admin-docs/modules/components_PaginationList_PaginationList.md new file mode 100644 index 0000000000..05ced10e30 --- /dev/null +++ b/talawa-admin-docs/modules/components_PaginationList_PaginationList.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/PaginationList/PaginationList + +# Module: components/PaginationList/PaginationList + +## Table of contents + +### Functions + +- [default](components_PaginationList_PaginationList.md#default) + +## Functions + +### default + +▸ **default**(`props`): `Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `InterfacePropsInterface` | + +#### Returns + +`Element` + +#### Defined in + +[src/components/PaginationList/PaginationList.tsx:21](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/PaginationList/PaginationList.tsx#L21) diff --git a/talawa-admin-docs/modules/components_Pagination_Pagination.md b/talawa-admin-docs/modules/components_Pagination_Pagination.md new file mode 100644 index 0000000000..16ed2d4b99 --- /dev/null +++ b/talawa-admin-docs/modules/components_Pagination_Pagination.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/Pagination/Pagination + +# Module: components/Pagination/Pagination + +## Table of contents + +### Functions + +- [default](components_Pagination_Pagination.md#default) + +## Functions + +### default + +▸ **default**(`props`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `InterfaceTablePaginationActionsProps` | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/Pagination/Pagination.tsx:20](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/Pagination/Pagination.tsx#L20) diff --git a/talawa-admin-docs/modules/components_Pagination_Pagination_test.md b/talawa-admin-docs/modules/components_Pagination_Pagination_test.md new file mode 100644 index 0000000000..b663353b05 --- /dev/null +++ b/talawa-admin-docs/modules/components_Pagination_Pagination_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/Pagination/Pagination.test + +# Module: components/Pagination/Pagination.test diff --git a/talawa-admin-docs/modules/components_SecuredRoute_SecuredRoute.md b/talawa-admin-docs/modules/components_SecuredRoute_SecuredRoute.md new file mode 100644 index 0000000000..274114319e --- /dev/null +++ b/talawa-admin-docs/modules/components_SecuredRoute_SecuredRoute.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/SecuredRoute/SecuredRoute + +# Module: components/SecuredRoute/SecuredRoute + +## Table of contents + +### Functions + +- [default](components_SecuredRoute_SecuredRoute.md#default) + +## Functions + +### default + +▸ **default**(`props`): `Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `any` | + +#### Returns + +`Element` + +#### Defined in + +[src/components/SecuredRoute/SecuredRoute.tsx:5](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/SecuredRoute/SecuredRoute.tsx#L5) diff --git a/talawa-admin-docs/modules/components_SuperAdminScreen_SuperAdminScreen.md b/talawa-admin-docs/modules/components_SuperAdminScreen_SuperAdminScreen.md new file mode 100644 index 0000000000..7b32fb59e9 --- /dev/null +++ b/talawa-admin-docs/modules/components_SuperAdminScreen_SuperAdminScreen.md @@ -0,0 +1,33 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/SuperAdminScreen/SuperAdminScreen + +# Module: components/SuperAdminScreen/SuperAdminScreen + +## Table of contents + +### Interfaces + +- [InterfaceSuperAdminScreenProps](../interfaces/components_SuperAdminScreen_SuperAdminScreen.InterfaceSuperAdminScreenProps.md) + +### Functions + +- [default](components_SuperAdminScreen_SuperAdminScreen.md#default) + +## Functions + +### default + +▸ **default**(`«destructured»`): `Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `«destructured»` | [`InterfaceSuperAdminScreenProps`](../interfaces/components_SuperAdminScreen_SuperAdminScreen.InterfaceSuperAdminScreenProps.md) | + +#### Returns + +`Element` + +#### Defined in + +[src/components/SuperAdminScreen/SuperAdminScreen.tsx:12](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/SuperAdminScreen/SuperAdminScreen.tsx#L12) diff --git a/talawa-admin-docs/modules/components_SuperAdminScreen_SuperAdminScreen_test.md b/talawa-admin-docs/modules/components_SuperAdminScreen_SuperAdminScreen_test.md new file mode 100644 index 0000000000..09367d5fab --- /dev/null +++ b/talawa-admin-docs/modules/components_SuperAdminScreen_SuperAdminScreen_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/SuperAdminScreen/SuperAdminScreen.test + +# Module: components/SuperAdminScreen/SuperAdminScreen.test diff --git a/talawa-admin-docs/modules/components_TableLoader_TableLoader.md b/talawa-admin-docs/modules/components_TableLoader_TableLoader.md new file mode 100644 index 0000000000..3ac894cea3 --- /dev/null +++ b/talawa-admin-docs/modules/components_TableLoader_TableLoader.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/TableLoader/TableLoader + +# Module: components/TableLoader/TableLoader + +## Table of contents + +### Functions + +- [default](components_TableLoader_TableLoader.md#default) + +## Functions + +### default + +▸ **default**(`props`): `Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `InterfaceTableLoader` | + +#### Returns + +`Element` + +#### Defined in + +[src/components/TableLoader/TableLoader.tsx:10](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/TableLoader/TableLoader.tsx#L10) diff --git a/talawa-admin-docs/modules/components_TableLoader_TableLoader_test.md b/talawa-admin-docs/modules/components_TableLoader_TableLoader_test.md new file mode 100644 index 0000000000..8bdff07dba --- /dev/null +++ b/talawa-admin-docs/modules/components_TableLoader_TableLoader_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/TableLoader/TableLoader.test + +# Module: components/TableLoader/TableLoader.test diff --git a/talawa-admin-docs/modules/components_TaskListItem_TaskListItem.md b/talawa-admin-docs/modules/components_TaskListItem_TaskListItem.md new file mode 100644 index 0000000000..1550e23597 --- /dev/null +++ b/talawa-admin-docs/modules/components_TaskListItem_TaskListItem.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/TaskListItem/TaskListItem + +# Module: components/TaskListItem/TaskListItem + +## Table of contents + +### Functions + +- [TaskListItem](components_TaskListItem_TaskListItem.md#tasklistitem) + +## Functions + +### TaskListItem + +▸ **TaskListItem**(`«destructured»`): `Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `«destructured»` | `PropType` | + +#### Returns + +`Element` + +#### Defined in + +[src/components/TaskListItem/TaskListItem.tsx:38](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/TaskListItem/TaskListItem.tsx#L38) diff --git a/talawa-admin-docs/modules/components_TaskListItem_TaskListItem_test.md b/talawa-admin-docs/modules/components_TaskListItem_TaskListItem_test.md new file mode 100644 index 0000000000..601f36689f --- /dev/null +++ b/talawa-admin-docs/modules/components_TaskListItem_TaskListItem_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/TaskListItem/TaskListItem.test + +# Module: components/TaskListItem/TaskListItem.test diff --git a/talawa-admin-docs/modules/components_TaskModals_AddTaskModal.md b/talawa-admin-docs/modules/components_TaskModals_AddTaskModal.md new file mode 100644 index 0000000000..f4676b390d --- /dev/null +++ b/talawa-admin-docs/modules/components_TaskModals_AddTaskModal.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/TaskModals/AddTaskModal + +# Module: components/TaskModals/AddTaskModal + +## Table of contents + +### Functions + +- [AddTaskModal](components_TaskModals_AddTaskModal.md#addtaskmodal) + +## Functions + +### AddTaskModal + +▸ **AddTaskModal**(`«destructured»`): `Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `«destructured»` | `ModalPropType` | + +#### Returns + +`Element` + +#### Defined in + +[src/components/TaskModals/AddTaskModal.tsx:17](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/TaskModals/AddTaskModal.tsx#L17) diff --git a/talawa-admin-docs/modules/components_TaskModals_AddTaskModal_test.md b/talawa-admin-docs/modules/components_TaskModals_AddTaskModal_test.md new file mode 100644 index 0000000000..9fc6d4f85c --- /dev/null +++ b/talawa-admin-docs/modules/components_TaskModals_AddTaskModal_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/TaskModals/AddTaskModal.test + +# Module: components/TaskModals/AddTaskModal.test diff --git a/talawa-admin-docs/modules/components_TaskModals_DeleteTaskModal.md b/talawa-admin-docs/modules/components_TaskModals_DeleteTaskModal.md new file mode 100644 index 0000000000..b8e1b78b3c --- /dev/null +++ b/talawa-admin-docs/modules/components_TaskModals_DeleteTaskModal.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/TaskModals/DeleteTaskModal + +# Module: components/TaskModals/DeleteTaskModal + +## Table of contents + +### Functions + +- [DeleteTaskModal](components_TaskModals_DeleteTaskModal.md#deletetaskmodal) + +## Functions + +### DeleteTaskModal + +▸ **DeleteTaskModal**(`props`): `Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `ModalPropType` | + +#### Returns + +`Element` + +#### Defined in + +[src/components/TaskModals/DeleteTaskModal.tsx:14](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/TaskModals/DeleteTaskModal.tsx#L14) diff --git a/talawa-admin-docs/modules/components_TaskModals_DeleteTaskModal_test.md b/talawa-admin-docs/modules/components_TaskModals_DeleteTaskModal_test.md new file mode 100644 index 0000000000..9a35d7741c --- /dev/null +++ b/talawa-admin-docs/modules/components_TaskModals_DeleteTaskModal_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/TaskModals/DeleteTaskModal.test + +# Module: components/TaskModals/DeleteTaskModal.test diff --git a/talawa-admin-docs/modules/components_TaskModals_ManageVolunteerModal.md b/talawa-admin-docs/modules/components_TaskModals_ManageVolunteerModal.md new file mode 100644 index 0000000000..3ce0f430fd --- /dev/null +++ b/talawa-admin-docs/modules/components_TaskModals_ManageVolunteerModal.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/TaskModals/ManageVolunteerModal + +# Module: components/TaskModals/ManageVolunteerModal + +## Table of contents + +### Functions + +- [ManageVolunteerModal](components_TaskModals_ManageVolunteerModal.md#managevolunteermodal) + +## Functions + +### ManageVolunteerModal + +▸ **ManageVolunteerModal**(`props`): `Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `ModalPropType` | + +#### Returns + +`Element` + +#### Defined in + +[src/components/TaskModals/ManageVolunteerModal.tsx:29](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/TaskModals/ManageVolunteerModal.tsx#L29) diff --git a/talawa-admin-docs/modules/components_TaskModals_ManageVolunteerModal_test.md b/talawa-admin-docs/modules/components_TaskModals_ManageVolunteerModal_test.md new file mode 100644 index 0000000000..f587cab1db --- /dev/null +++ b/talawa-admin-docs/modules/components_TaskModals_ManageVolunteerModal_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/TaskModals/ManageVolunteerModal.test + +# Module: components/TaskModals/ManageVolunteerModal.test diff --git a/talawa-admin-docs/modules/components_TaskModals_UpdateTaskModal.md b/talawa-admin-docs/modules/components_TaskModals_UpdateTaskModal.md new file mode 100644 index 0000000000..593edf1a85 --- /dev/null +++ b/talawa-admin-docs/modules/components_TaskModals_UpdateTaskModal.md @@ -0,0 +1,55 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/TaskModals/UpdateTaskModal + +# Module: components/TaskModals/UpdateTaskModal + +## Table of contents + +### Type Aliases + +- [ModalPropType](components_TaskModals_UpdateTaskModal.md#modalproptype) + +### Functions + +- [UpdateTaskModal](components_TaskModals_UpdateTaskModal.md#updatetaskmodal) + +## Type Aliases + +### ModalPropType + +Ƭ **ModalPropType**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `handleClose` | () => `void` | +| `organization` | { `_id`: `string` ; `members`: `InterfaceUser`[] } | +| `organization._id` | `string` | +| `organization.members` | `InterfaceUser`[] | +| `refetchData` | () => `void` | +| `show` | `boolean` | +| `task` | `InterfaceTask` | + +#### Defined in + +[src/components/TaskModals/UpdateTaskModal.tsx:31](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/TaskModals/UpdateTaskModal.tsx#L31) + +## Functions + +### UpdateTaskModal + +▸ **UpdateTaskModal**(`props`): `Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | [`ModalPropType`](components_TaskModals_UpdateTaskModal.md#modalproptype) | + +#### Returns + +`Element` + +#### Defined in + +[src/components/TaskModals/UpdateTaskModal.tsx:42](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/TaskModals/UpdateTaskModal.tsx#L42) diff --git a/talawa-admin-docs/modules/components_TaskModals_UpdateTaskModal_test.md b/talawa-admin-docs/modules/components_TaskModals_UpdateTaskModal_test.md new file mode 100644 index 0000000000..9d8c0895f7 --- /dev/null +++ b/talawa-admin-docs/modules/components_TaskModals_UpdateTaskModal_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/TaskModals/UpdateTaskModal.test + +# Module: components/TaskModals/UpdateTaskModal.test diff --git a/talawa-admin-docs/modules/components_UserListCard_UserListCard.md b/talawa-admin-docs/modules/components_UserListCard_UserListCard.md new file mode 100644 index 0000000000..7de393f44a --- /dev/null +++ b/talawa-admin-docs/modules/components_UserListCard_UserListCard.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/UserListCard/UserListCard + +# Module: components/UserListCard/UserListCard + +## Table of contents + +### Functions + +- [default](components_UserListCard_UserListCard.md#default) + +## Functions + +### default + +▸ **default**(`props`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `InterfaceUserListCardProps` | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/UserListCard/UserListCard.tsx:24](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/UserListCard/UserListCard.tsx#L24) diff --git a/talawa-admin-docs/modules/components_UserListCard_UserListCard_test.md b/talawa-admin-docs/modules/components_UserListCard_UserListCard_test.md new file mode 100644 index 0000000000..6e6b1eb973 --- /dev/null +++ b/talawa-admin-docs/modules/components_UserListCard_UserListCard_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/UserListCard/UserListCard.test + +# Module: components/UserListCard/UserListCard.test diff --git a/talawa-admin-docs/modules/components_UserPasswordUpdate_UserPasswordUpdate.md b/talawa-admin-docs/modules/components_UserPasswordUpdate_UserPasswordUpdate.md new file mode 100644 index 0000000000..8402744885 --- /dev/null +++ b/talawa-admin-docs/modules/components_UserPasswordUpdate_UserPasswordUpdate.md @@ -0,0 +1,30 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/UserPasswordUpdate/UserPasswordUpdate + +# Module: components/UserPasswordUpdate/UserPasswordUpdate + +## Table of contents + +### Functions + +- [default](components_UserPasswordUpdate_UserPasswordUpdate.md#default) + +## Functions + +### default + +▸ **default**(`props`, `context?`): ``null`` \| `ReactElement`<`any`, `any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `PropsWithChildren`<`InterfaceUserPasswordUpdateProps`\> | +| `context?` | `any` | + +#### Returns + +``null`` \| `ReactElement`<`any`, `any`\> + +#### Defined in + +node_modules/@types/react/index.d.ts:543 diff --git a/talawa-admin-docs/modules/components_UserPasswordUpdate_UserPasswordUpdate_test.md b/talawa-admin-docs/modules/components_UserPasswordUpdate_UserPasswordUpdate_test.md new file mode 100644 index 0000000000..55647dc09e --- /dev/null +++ b/talawa-admin-docs/modules/components_UserPasswordUpdate_UserPasswordUpdate_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/UserPasswordUpdate/UserPasswordUpdate.test + +# Module: components/UserPasswordUpdate/UserPasswordUpdate.test diff --git a/talawa-admin-docs/modules/components_UserPortal_DonationCard_DonationCard.md b/talawa-admin-docs/modules/components_UserPortal_DonationCard_DonationCard.md new file mode 100644 index 0000000000..f6276c967c --- /dev/null +++ b/talawa-admin-docs/modules/components_UserPortal_DonationCard_DonationCard.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/UserPortal/DonationCard/DonationCard + +# Module: components/UserPortal/DonationCard/DonationCard + +## Table of contents + +### Functions + +- [default](components_UserPortal_DonationCard_DonationCard.md#default) + +## Functions + +### default + +▸ **default**(`props`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `InterfaceDonationCardProps` | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/UserPortal/DonationCard/DonationCard.tsx:12](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/UserPortal/DonationCard/DonationCard.tsx#L12) diff --git a/talawa-admin-docs/modules/components_UserPortal_Login_Login.md b/talawa-admin-docs/modules/components_UserPortal_Login_Login.md new file mode 100644 index 0000000000..56bdc5753c --- /dev/null +++ b/talawa-admin-docs/modules/components_UserPortal_Login_Login.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/UserPortal/Login/Login + +# Module: components/UserPortal/Login/Login + +## Table of contents + +### Functions + +- [default](components_UserPortal_Login_Login.md#default) + +## Functions + +### default + +▸ **default**(`props`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `InterfaceLoginProps` | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/UserPortal/Login/Login.tsx:19](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/UserPortal/Login/Login.tsx#L19) diff --git a/talawa-admin-docs/modules/components_UserPortal_Login_Login_test.md b/talawa-admin-docs/modules/components_UserPortal_Login_Login_test.md new file mode 100644 index 0000000000..373cee75b5 --- /dev/null +++ b/talawa-admin-docs/modules/components_UserPortal_Login_Login_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/UserPortal/Login/Login.test + +# Module: components/UserPortal/Login/Login.test diff --git a/talawa-admin-docs/modules/components_UserPortal_OrganizationCard_OrganizationCard.md b/talawa-admin-docs/modules/components_UserPortal_OrganizationCard_OrganizationCard.md new file mode 100644 index 0000000000..8bd259d646 --- /dev/null +++ b/talawa-admin-docs/modules/components_UserPortal_OrganizationCard_OrganizationCard.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/UserPortal/OrganizationCard/OrganizationCard + +# Module: components/UserPortal/OrganizationCard/OrganizationCard + +## Table of contents + +### Functions + +- [default](components_UserPortal_OrganizationCard_OrganizationCard.md#default) + +## Functions + +### default + +▸ **default**(`props`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `InterfaceOrganizationCardProps` | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/UserPortal/OrganizationCard/OrganizationCard.tsx:13](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/UserPortal/OrganizationCard/OrganizationCard.tsx#L13) diff --git a/talawa-admin-docs/modules/components_UserPortal_OrganizationCard_OrganizationCard_test.md b/talawa-admin-docs/modules/components_UserPortal_OrganizationCard_OrganizationCard_test.md new file mode 100644 index 0000000000..141b8155d9 --- /dev/null +++ b/talawa-admin-docs/modules/components_UserPortal_OrganizationCard_OrganizationCard_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/UserPortal/OrganizationCard/OrganizationCard.test + +# Module: components/UserPortal/OrganizationCard/OrganizationCard.test diff --git a/talawa-admin-docs/modules/components_UserPortal_OrganizationNavbar_OrganizationNavbar.md b/talawa-admin-docs/modules/components_UserPortal_OrganizationNavbar_OrganizationNavbar.md new file mode 100644 index 0000000000..55602bbcb9 --- /dev/null +++ b/talawa-admin-docs/modules/components_UserPortal_OrganizationNavbar_OrganizationNavbar.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/UserPortal/OrganizationNavbar/OrganizationNavbar + +# Module: components/UserPortal/OrganizationNavbar/OrganizationNavbar + +## Table of contents + +### Functions + +- [default](components_UserPortal_OrganizationNavbar_OrganizationNavbar.md#default) + +## Functions + +### default + +▸ **default**(`props`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `InterfaceNavbarProps` | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/UserPortal/OrganizationNavbar/OrganizationNavbar.tsx:21](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/UserPortal/OrganizationNavbar/OrganizationNavbar.tsx#L21) diff --git a/talawa-admin-docs/modules/components_UserPortal_OrganizationNavbar_OrganizationNavbar_test.md b/talawa-admin-docs/modules/components_UserPortal_OrganizationNavbar_OrganizationNavbar_test.md new file mode 100644 index 0000000000..41bd01b6c2 --- /dev/null +++ b/talawa-admin-docs/modules/components_UserPortal_OrganizationNavbar_OrganizationNavbar_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/UserPortal/OrganizationNavbar/OrganizationNavbar.test + +# Module: components/UserPortal/OrganizationNavbar/OrganizationNavbar.test diff --git a/talawa-admin-docs/modules/components_UserPortal_OrganizationSidebar_OrganizationSidebar.md b/talawa-admin-docs/modules/components_UserPortal_OrganizationSidebar_OrganizationSidebar.md new file mode 100644 index 0000000000..0694a5aef8 --- /dev/null +++ b/talawa-admin-docs/modules/components_UserPortal_OrganizationSidebar_OrganizationSidebar.md @@ -0,0 +1,23 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/UserPortal/OrganizationSidebar/OrganizationSidebar + +# Module: components/UserPortal/OrganizationSidebar/OrganizationSidebar + +## Table of contents + +### Functions + +- [default](components_UserPortal_OrganizationSidebar_OrganizationSidebar.md#default) + +## Functions + +### default + +▸ **default**(): `JSX.Element` + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/UserPortal/OrganizationSidebar/OrganizationSidebar.tsx:18](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/UserPortal/OrganizationSidebar/OrganizationSidebar.tsx#L18) diff --git a/talawa-admin-docs/modules/components_UserPortal_OrganizationSidebar_OrganizationSidebar_test.md b/talawa-admin-docs/modules/components_UserPortal_OrganizationSidebar_OrganizationSidebar_test.md new file mode 100644 index 0000000000..2d7163c537 --- /dev/null +++ b/talawa-admin-docs/modules/components_UserPortal_OrganizationSidebar_OrganizationSidebar_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/UserPortal/OrganizationSidebar/OrganizationSidebar.test + +# Module: components/UserPortal/OrganizationSidebar/OrganizationSidebar.test diff --git a/talawa-admin-docs/modules/components_UserPortal_PeopleCard_PeopleCard.md b/talawa-admin-docs/modules/components_UserPortal_PeopleCard_PeopleCard.md new file mode 100644 index 0000000000..cc4ecd4ca3 --- /dev/null +++ b/talawa-admin-docs/modules/components_UserPortal_PeopleCard_PeopleCard.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/UserPortal/PeopleCard/PeopleCard + +# Module: components/UserPortal/PeopleCard/PeopleCard + +## Table of contents + +### Functions + +- [default](components_UserPortal_PeopleCard_PeopleCard.md#default) + +## Functions + +### default + +▸ **default**(`props`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `InterfaceOrganizationCardProps` | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/UserPortal/PeopleCard/PeopleCard.tsx:12](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/UserPortal/PeopleCard/PeopleCard.tsx#L12) diff --git a/talawa-admin-docs/modules/components_UserPortal_PeopleCard_PeopleCard_test.md b/talawa-admin-docs/modules/components_UserPortal_PeopleCard_PeopleCard_test.md new file mode 100644 index 0000000000..d874dc3b00 --- /dev/null +++ b/talawa-admin-docs/modules/components_UserPortal_PeopleCard_PeopleCard_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/UserPortal/PeopleCard/PeopleCard.test + +# Module: components/UserPortal/PeopleCard/PeopleCard.test diff --git a/talawa-admin-docs/modules/components_UserPortal_PostCard_PostCard.md b/talawa-admin-docs/modules/components_UserPortal_PostCard_PostCard.md new file mode 100644 index 0000000000..2e18dfc8b3 --- /dev/null +++ b/talawa-admin-docs/modules/components_UserPortal_PostCard_PostCard.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/UserPortal/PostCard/PostCard + +# Module: components/UserPortal/PostCard/PostCard + +## Table of contents + +### Functions + +- [default](components_UserPortal_PostCard_PostCard.md#default) + +## Functions + +### default + +▸ **default**(`props`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `InterfacePostCardProps` | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/UserPortal/PostCard/PostCard.tsx:35](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/UserPortal/PostCard/PostCard.tsx#L35) diff --git a/talawa-admin-docs/modules/components_UserPortal_PostCard_PostCard_test.md b/talawa-admin-docs/modules/components_UserPortal_PostCard_PostCard_test.md new file mode 100644 index 0000000000..03b9f9b2ea --- /dev/null +++ b/talawa-admin-docs/modules/components_UserPortal_PostCard_PostCard_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/UserPortal/PostCard/PostCard.test + +# Module: components/UserPortal/PostCard/PostCard.test diff --git a/talawa-admin-docs/modules/components_UserPortal_Register_Register.md b/talawa-admin-docs/modules/components_UserPortal_Register_Register.md new file mode 100644 index 0000000000..400008de6d --- /dev/null +++ b/talawa-admin-docs/modules/components_UserPortal_Register_Register.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/UserPortal/Register/Register + +# Module: components/UserPortal/Register/Register + +## Table of contents + +### Functions + +- [default](components_UserPortal_Register_Register.md#default) + +## Functions + +### default + +▸ **default**(`props`): `JSX.Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `InterfaceRegisterProps` | + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/UserPortal/Register/Register.tsx:19](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/UserPortal/Register/Register.tsx#L19) diff --git a/talawa-admin-docs/modules/components_UserPortal_Register_Register_test.md b/talawa-admin-docs/modules/components_UserPortal_Register_Register_test.md new file mode 100644 index 0000000000..e82f244ca2 --- /dev/null +++ b/talawa-admin-docs/modules/components_UserPortal_Register_Register_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/UserPortal/Register/Register.test + +# Module: components/UserPortal/Register/Register.test diff --git a/talawa-admin-docs/modules/components_UserPortal_SecuredRouteForUser_SecuredRouteForUser.md b/talawa-admin-docs/modules/components_UserPortal_SecuredRouteForUser_SecuredRouteForUser.md new file mode 100644 index 0000000000..6fee00ab23 --- /dev/null +++ b/talawa-admin-docs/modules/components_UserPortal_SecuredRouteForUser_SecuredRouteForUser.md @@ -0,0 +1,29 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/UserPortal/SecuredRouteForUser/SecuredRouteForUser + +# Module: components/UserPortal/SecuredRouteForUser/SecuredRouteForUser + +## Table of contents + +### Functions + +- [default](components_UserPortal_SecuredRouteForUser_SecuredRouteForUser.md#default) + +## Functions + +### default + +▸ **default**(`props`): `Element` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `any` | + +#### Returns + +`Element` + +#### Defined in + +[src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.tsx:4](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/UserPortal/SecuredRouteForUser/SecuredRouteForUser.tsx#L4) diff --git a/talawa-admin-docs/modules/components_UserPortal_UserNavbar_UserNavbar.md b/talawa-admin-docs/modules/components_UserPortal_UserNavbar_UserNavbar.md new file mode 100644 index 0000000000..052b822f8a --- /dev/null +++ b/talawa-admin-docs/modules/components_UserPortal_UserNavbar_UserNavbar.md @@ -0,0 +1,23 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/UserPortal/UserNavbar/UserNavbar + +# Module: components/UserPortal/UserNavbar/UserNavbar + +## Table of contents + +### Functions + +- [default](components_UserPortal_UserNavbar_UserNavbar.md#default) + +## Functions + +### default + +▸ **default**(): `JSX.Element` + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/UserPortal/UserNavbar/UserNavbar.tsx:13](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/UserPortal/UserNavbar/UserNavbar.tsx#L13) diff --git a/talawa-admin-docs/modules/components_UserPortal_UserNavbar_UserNavbar_test.md b/talawa-admin-docs/modules/components_UserPortal_UserNavbar_UserNavbar_test.md new file mode 100644 index 0000000000..c6d86ea6b2 --- /dev/null +++ b/talawa-admin-docs/modules/components_UserPortal_UserNavbar_UserNavbar_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/UserPortal/UserNavbar/UserNavbar.test + +# Module: components/UserPortal/UserNavbar/UserNavbar.test diff --git a/talawa-admin-docs/modules/components_UserPortal_UserSidebar_UserSidebar.md b/talawa-admin-docs/modules/components_UserPortal_UserSidebar_UserSidebar.md new file mode 100644 index 0000000000..e9f6ad4bc0 --- /dev/null +++ b/talawa-admin-docs/modules/components_UserPortal_UserSidebar_UserSidebar.md @@ -0,0 +1,23 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/UserPortal/UserSidebar/UserSidebar + +# Module: components/UserPortal/UserSidebar/UserSidebar + +## Table of contents + +### Functions + +- [default](components_UserPortal_UserSidebar_UserSidebar.md#default) + +## Functions + +### default + +▸ **default**(): `JSX.Element` + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/UserPortal/UserSidebar/UserSidebar.tsx:15](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/UserPortal/UserSidebar/UserSidebar.tsx#L15) diff --git a/talawa-admin-docs/modules/components_UserPortal_UserSidebar_UserSidebar_test.md b/talawa-admin-docs/modules/components_UserPortal_UserSidebar_UserSidebar_test.md new file mode 100644 index 0000000000..f4eee6091e --- /dev/null +++ b/talawa-admin-docs/modules/components_UserPortal_UserSidebar_UserSidebar_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/UserPortal/UserSidebar/UserSidebar.test + +# Module: components/UserPortal/UserSidebar/UserSidebar.test diff --git a/talawa-admin-docs/modules/components_UserUpdate_UserUpdate.md b/talawa-admin-docs/modules/components_UserUpdate_UserUpdate.md new file mode 100644 index 0000000000..4285a73143 --- /dev/null +++ b/talawa-admin-docs/modules/components_UserUpdate_UserUpdate.md @@ -0,0 +1,30 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/UserUpdate/UserUpdate + +# Module: components/UserUpdate/UserUpdate + +## Table of contents + +### Functions + +- [default](components_UserUpdate_UserUpdate.md#default) + +## Functions + +### default + +▸ **default**(`props`, `context?`): ``null`` \| `ReactElement`<`any`, `any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `PropsWithChildren`<`InterfaceUserUpdateProps`\> | +| `context?` | `any` | + +#### Returns + +``null`` \| `ReactElement`<`any`, `any`\> + +#### Defined in + +node_modules/@types/react/index.d.ts:543 diff --git a/talawa-admin-docs/modules/components_UserUpdate_UserUpdate_test.md b/talawa-admin-docs/modules/components_UserUpdate_UserUpdate_test.md new file mode 100644 index 0000000000..b5d37bf7fe --- /dev/null +++ b/talawa-admin-docs/modules/components_UserUpdate_UserUpdate_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/UserUpdate/UserUpdate.test + +# Module: components/UserUpdate/UserUpdate.test diff --git a/talawa-admin-docs/modules/components_plugins.md b/talawa-admin-docs/modules/components_plugins.md new file mode 100644 index 0000000000..a72385a04b --- /dev/null +++ b/talawa-admin-docs/modules/components_plugins.md @@ -0,0 +1,22 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/plugins + +# Module: components/plugins + +## Table of contents + +### References + +- [DummyPlugin](components_plugins.md#dummyplugin) +- [DummyPlugin2](components_plugins.md#dummyplugin2) + +## References + +### DummyPlugin + +Renames and re-exports [default](components_plugins_DummyPlugin_DummyPlugin.md#default) + +___ + +### DummyPlugin2 + +Renames and re-exports [default](components_plugins_DummyPlugin2_DummyPlugin2.md#default) diff --git a/talawa-admin-docs/modules/components_plugins_DummyPlugin2_DummyPlugin2.default.md b/talawa-admin-docs/modules/components_plugins_DummyPlugin2_DummyPlugin2.default.md new file mode 100644 index 0000000000..43f1316236 --- /dev/null +++ b/talawa-admin-docs/modules/components_plugins_DummyPlugin2_DummyPlugin2.default.md @@ -0,0 +1,32 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / [components/plugins/DummyPlugin2/DummyPlugin2](components_plugins_DummyPlugin2_DummyPlugin2.md) / default + +# Namespace: default + +[components/plugins/DummyPlugin2/DummyPlugin2](components_plugins_DummyPlugin2_DummyPlugin2.md).default + +## Table of contents + +### Variables + +- [defaultProps](components_plugins_DummyPlugin2_DummyPlugin2.default.md#defaultprops) +- [propTypes](components_plugins_DummyPlugin2_DummyPlugin2.default.md#proptypes) + +## Variables + +### defaultProps + +• **defaultProps**: `Object` + +#### Defined in + +[src/components/plugins/DummyPlugin2/DummyPlugin2.tsx:8](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/plugins/DummyPlugin2/DummyPlugin2.tsx#L8) + +___ + +### propTypes + +• **propTypes**: `Object` + +#### Defined in + +[src/components/plugins/DummyPlugin2/DummyPlugin2.tsx:10](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/plugins/DummyPlugin2/DummyPlugin2.tsx#L10) diff --git a/talawa-admin-docs/modules/components_plugins_DummyPlugin2_DummyPlugin2.md b/talawa-admin-docs/modules/components_plugins_DummyPlugin2_DummyPlugin2.md new file mode 100644 index 0000000000..8e30500c3f --- /dev/null +++ b/talawa-admin-docs/modules/components_plugins_DummyPlugin2_DummyPlugin2.md @@ -0,0 +1,27 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/plugins/DummyPlugin2/DummyPlugin2 + +# Module: components/plugins/DummyPlugin2/DummyPlugin2 + +## Table of contents + +### Namespaces + +- [default](components_plugins_DummyPlugin2_DummyPlugin2.default.md) + +### Functions + +- [default](components_plugins_DummyPlugin2_DummyPlugin2.md#default) + +## Functions + +### default + +▸ **default**(): `JSX.Element` + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/plugins/DummyPlugin2/DummyPlugin2.tsx:4](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/plugins/DummyPlugin2/DummyPlugin2.tsx#L4) diff --git a/talawa-admin-docs/modules/components_plugins_DummyPlugin2_DummyPlugin2_test.md b/talawa-admin-docs/modules/components_plugins_DummyPlugin2_DummyPlugin2_test.md new file mode 100644 index 0000000000..10b1e69c6b --- /dev/null +++ b/talawa-admin-docs/modules/components_plugins_DummyPlugin2_DummyPlugin2_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/plugins/DummyPlugin2/DummyPlugin2.test + +# Module: components/plugins/DummyPlugin2/DummyPlugin2.test diff --git a/talawa-admin-docs/modules/components_plugins_DummyPlugin_DummyPlugin.default.md b/talawa-admin-docs/modules/components_plugins_DummyPlugin_DummyPlugin.default.md new file mode 100644 index 0000000000..4ff63cd0a8 --- /dev/null +++ b/talawa-admin-docs/modules/components_plugins_DummyPlugin_DummyPlugin.default.md @@ -0,0 +1,32 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / [components/plugins/DummyPlugin/DummyPlugin](components_plugins_DummyPlugin_DummyPlugin.md) / default + +# Namespace: default + +[components/plugins/DummyPlugin/DummyPlugin](components_plugins_DummyPlugin_DummyPlugin.md).default + +## Table of contents + +### Variables + +- [defaultProps](components_plugins_DummyPlugin_DummyPlugin.default.md#defaultprops) +- [propTypes](components_plugins_DummyPlugin_DummyPlugin.default.md#proptypes) + +## Variables + +### defaultProps + +• **defaultProps**: `Object` + +#### Defined in + +[src/components/plugins/DummyPlugin/DummyPlugin.tsx:13](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/plugins/DummyPlugin/DummyPlugin.tsx#L13) + +___ + +### propTypes + +• **propTypes**: `Object` + +#### Defined in + +[src/components/plugins/DummyPlugin/DummyPlugin.tsx:15](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/plugins/DummyPlugin/DummyPlugin.tsx#L15) diff --git a/talawa-admin-docs/modules/components_plugins_DummyPlugin_DummyPlugin.md b/talawa-admin-docs/modules/components_plugins_DummyPlugin_DummyPlugin.md new file mode 100644 index 0000000000..089dbc414b --- /dev/null +++ b/talawa-admin-docs/modules/components_plugins_DummyPlugin_DummyPlugin.md @@ -0,0 +1,27 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/plugins/DummyPlugin/DummyPlugin + +# Module: components/plugins/DummyPlugin/DummyPlugin + +## Table of contents + +### Namespaces + +- [default](components_plugins_DummyPlugin_DummyPlugin.default.md) + +### Functions + +- [default](components_plugins_DummyPlugin_DummyPlugin.md#default) + +## Functions + +### default + +▸ **default**(): `JSX.Element` + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/components/plugins/DummyPlugin/DummyPlugin.tsx:5](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/components/plugins/DummyPlugin/DummyPlugin.tsx#L5) diff --git a/talawa-admin-docs/modules/components_plugins_DummyPlugin_DummyPlugin_test.md b/talawa-admin-docs/modules/components_plugins_DummyPlugin_DummyPlugin_test.md new file mode 100644 index 0000000000..91fbe5a40b --- /dev/null +++ b/talawa-admin-docs/modules/components_plugins_DummyPlugin_DummyPlugin_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / components/plugins/DummyPlugin/DummyPlugin.test + +# Module: components/plugins/DummyPlugin/DummyPlugin.test diff --git a/talawa-admin-docs/modules/screens_BlockUser_BlockUser.md b/talawa-admin-docs/modules/screens_BlockUser_BlockUser.md new file mode 100644 index 0000000000..f4900b2c0a --- /dev/null +++ b/talawa-admin-docs/modules/screens_BlockUser_BlockUser.md @@ -0,0 +1,23 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/BlockUser/BlockUser + +# Module: screens/BlockUser/BlockUser + +## Table of contents + +### Functions + +- [default](screens_BlockUser_BlockUser.md#default) + +## Functions + +### default + +▸ **default**(): `Element` + +#### Returns + +`Element` + +#### Defined in + +[src/screens/BlockUser/BlockUser.tsx:32](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/BlockUser/BlockUser.tsx#L32) diff --git a/talawa-admin-docs/modules/screens_BlockUser_BlockUser_test.md b/talawa-admin-docs/modules/screens_BlockUser_BlockUser_test.md new file mode 100644 index 0000000000..f37cc5c5ba --- /dev/null +++ b/talawa-admin-docs/modules/screens_BlockUser_BlockUser_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/BlockUser/BlockUser.test + +# Module: screens/BlockUser/BlockUser.test diff --git a/talawa-admin-docs/modules/screens_EventDashboard_EventDashboard.md b/talawa-admin-docs/modules/screens_EventDashboard_EventDashboard.md new file mode 100644 index 0000000000..536a3222b8 --- /dev/null +++ b/talawa-admin-docs/modules/screens_EventDashboard_EventDashboard.md @@ -0,0 +1,23 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/EventDashboard/EventDashboard + +# Module: screens/EventDashboard/EventDashboard + +## Table of contents + +### Functions + +- [default](screens_EventDashboard_EventDashboard.md#default) + +## Functions + +### default + +▸ **default**(): `Element` + +#### Returns + +`Element` + +#### Defined in + +[src/screens/EventDashboard/EventDashboard.tsx:38](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/EventDashboard/EventDashboard.tsx#L38) diff --git a/talawa-admin-docs/modules/screens_EventDashboard_EventDashboard_mocks.md b/talawa-admin-docs/modules/screens_EventDashboard_EventDashboard_mocks.md new file mode 100644 index 0000000000..d5ef0c33f7 --- /dev/null +++ b/talawa-admin-docs/modules/screens_EventDashboard_EventDashboard_mocks.md @@ -0,0 +1,52 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/EventDashboard/EventDashboard.mocks + +# Module: screens/EventDashboard/EventDashboard.mocks + +## Table of contents + +### Variables + +- [queryMockWithProject](screens_EventDashboard_EventDashboard_mocks.md#querymockwithproject) +- [queryMockWithProjectAndTask](screens_EventDashboard_EventDashboard_mocks.md#querymockwithprojectandtask) +- [queryMockWithTime](screens_EventDashboard_EventDashboard_mocks.md#querymockwithtime) +- [queryMockWithoutTime](screens_EventDashboard_EventDashboard_mocks.md#querymockwithouttime) + +## Variables + +### queryMockWithProject + +• `Const` **queryMockWithProject**: { `request`: { `query`: `DocumentNode` = EVENT\_DETAILS; `variables`: { `id`: `string` = 'event123' } } ; `result`: { `data`: { `event`: { `allDay`: `boolean` = false; `attendees`: { `_id`: `string` = 'user1' }[] ; `description`: `string` = 'Event Description'; `endDate`: `string` = '2/2/23'; `endTime`: `string` = '09:00:00'; `location`: `string` = 'India'; `organization`: { `_id`: `string` = 'org1'; `members`: { `_id`: `string` = 'user1'; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' }[] } ; `projects`: { `_id`: `string` = 'project1'; `description`: `string` = 'Project Description 1'; `tasks`: `never`[] = []; `title`: `string` = 'Project 1' }[] ; `startDate`: `string` = '1/1/23'; `startTime`: `string` = '08:00:00'; `title`: `string` = 'Event Title' } } } }[] + +#### Defined in + +[src/screens/EventDashboard/EventDashboard.mocks.ts:68](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/EventDashboard/EventDashboard.mocks.ts#L68) + +___ + +### queryMockWithProjectAndTask + +• `Const` **queryMockWithProjectAndTask**: { `request`: { `query`: `DocumentNode` = EVENT\_DETAILS; `variables`: { `id`: `string` = 'event123' } } ; `result`: { `data`: { `event`: { `allDay`: `boolean` = false; `attendees`: { `_id`: `string` = 'user1' }[] ; `description`: `string` = 'Event Description'; `endDate`: `string` = '2/2/23'; `endTime`: `string` = '09:00:00'; `location`: `string` = 'India'; `organization`: { `_id`: `string` = 'org1'; `members`: { `_id`: `string` = 'user1'; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' }[] } ; `projects`: { `_id`: `string` = 'project1'; `description`: `string` = 'Project Description 1'; `tasks`: { `_id`: `string` = 'task1'; `completed`: `boolean` = false; `deadline`: `string` = '22/12/23'; `description`: `string` = 'Description 1'; `title`: `string` = 'Task 1'; `volunteers`: `never`[] = [] }[] ; `title`: `string` = 'Project 1' }[] ; `startDate`: `string` = '1/1/23'; `startTime`: `string` = '08:00:00'; `title`: `string` = 'Event Title' } } } }[] + +#### Defined in + +[src/screens/EventDashboard/EventDashboard.mocks.ts:107](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/EventDashboard/EventDashboard.mocks.ts#L107) + +___ + +### queryMockWithTime + +• `Const` **queryMockWithTime**: { `request`: { `query`: `DocumentNode` = EVENT\_DETAILS; `variables`: { `id`: `string` = 'event123' } } ; `result`: { `data`: { `event`: { `allDay`: `boolean` = false; `attendees`: { `_id`: `string` = 'user1' }[] ; `description`: `string` = 'Event Description'; `endDate`: `string` = '2/2/23'; `endTime`: `string` = '09:00:00'; `location`: `string` = 'India'; `organization`: { `_id`: `string` = 'org1'; `members`: { `_id`: `string` = 'user1'; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' }[] } ; `projects`: `never`[] = []; `startDate`: `string` = '1/1/23'; `startTime`: `string` = '08:00:00'; `title`: `string` = 'Event Title' } } } }[] + +#### Defined in + +[src/screens/EventDashboard/EventDashboard.mocks.ts:4](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/EventDashboard/EventDashboard.mocks.ts#L4) + +___ + +### queryMockWithoutTime + +• `Const` **queryMockWithoutTime**: { `request`: { `query`: `DocumentNode` = EVENT\_DETAILS; `variables`: { `id`: `string` = 'event123' } } ; `result`: { `data`: { `event`: { `allDay`: `boolean` = false; `attendees`: { `_id`: `string` = 'user1' }[] ; `description`: `string` = 'Event Description'; `endDate`: `string` = '2/2/23'; `endTime`: ``null`` = null; `location`: `string` = 'India'; `organization`: { `_id`: `string` = 'org1'; `members`: { `_id`: `string` = 'user1'; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' }[] } ; `projects`: `never`[] = []; `startDate`: `string` = '1/1/23'; `startTime`: ``null`` = null; `title`: `string` = 'Event Title' } } } }[] + +#### Defined in + +[src/screens/EventDashboard/EventDashboard.mocks.ts:36](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/EventDashboard/EventDashboard.mocks.ts#L36) diff --git a/talawa-admin-docs/modules/screens_EventDashboard_EventDashboard_test.md b/talawa-admin-docs/modules/screens_EventDashboard_EventDashboard_test.md new file mode 100644 index 0000000000..56f57626c3 --- /dev/null +++ b/talawa-admin-docs/modules/screens_EventDashboard_EventDashboard_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/EventDashboard/EventDashboard.test + +# Module: screens/EventDashboard/EventDashboard.test diff --git a/talawa-admin-docs/modules/screens_ForgotPassword_ForgotPassword.md b/talawa-admin-docs/modules/screens_ForgotPassword_ForgotPassword.md new file mode 100644 index 0000000000..3ba539ee00 --- /dev/null +++ b/talawa-admin-docs/modules/screens_ForgotPassword_ForgotPassword.md @@ -0,0 +1,23 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/ForgotPassword/ForgotPassword + +# Module: screens/ForgotPassword/ForgotPassword + +## Table of contents + +### Functions + +- [default](screens_ForgotPassword_ForgotPassword.md#default) + +## Functions + +### default + +▸ **default**(): `Element` + +#### Returns + +`Element` + +#### Defined in + +[src/screens/ForgotPassword/ForgotPassword.tsx:18](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/ForgotPassword/ForgotPassword.tsx#L18) diff --git a/talawa-admin-docs/modules/screens_ForgotPassword_ForgotPassword_test.md b/talawa-admin-docs/modules/screens_ForgotPassword_ForgotPassword_test.md new file mode 100644 index 0000000000..8748876204 --- /dev/null +++ b/talawa-admin-docs/modules/screens_ForgotPassword_ForgotPassword_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/ForgotPassword/ForgotPassword.test + +# Module: screens/ForgotPassword/ForgotPassword.test diff --git a/talawa-admin-docs/modules/screens_LoginPage_LoginPage.md b/talawa-admin-docs/modules/screens_LoginPage_LoginPage.md new file mode 100644 index 0000000000..1d820b928e --- /dev/null +++ b/talawa-admin-docs/modules/screens_LoginPage_LoginPage.md @@ -0,0 +1,23 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/LoginPage/LoginPage + +# Module: screens/LoginPage/LoginPage + +## Table of contents + +### Functions + +- [default](screens_LoginPage_LoginPage.md#default) + +## Functions + +### default + +▸ **default**(): `JSX.Element` + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/screens/LoginPage/LoginPage.tsx:27](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/LoginPage/LoginPage.tsx#L27) diff --git a/talawa-admin-docs/modules/screens_LoginPage_LoginPage_test.md b/talawa-admin-docs/modules/screens_LoginPage_LoginPage_test.md new file mode 100644 index 0000000000..f269edc1ac --- /dev/null +++ b/talawa-admin-docs/modules/screens_LoginPage_LoginPage_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/LoginPage/LoginPage.test + +# Module: screens/LoginPage/LoginPage.test diff --git a/talawa-admin-docs/modules/screens_MemberDetail_MemberDetail.md b/talawa-admin-docs/modules/screens_MemberDetail_MemberDetail.md new file mode 100644 index 0000000000..775b3e0dcd --- /dev/null +++ b/talawa-admin-docs/modules/screens_MemberDetail_MemberDetail.md @@ -0,0 +1,72 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/MemberDetail/MemberDetail + +# Module: screens/MemberDetail/MemberDetail + +## Table of contents + +### Functions + +- [default](screens_MemberDetail_MemberDetail.md#default) +- [getLanguageName](screens_MemberDetail_MemberDetail.md#getlanguagename) +- [prettyDate](screens_MemberDetail_MemberDetail.md#prettydate) + +## Functions + +### default + +▸ **default**(`props`, `context?`): ``null`` \| `ReactElement`<`any`, `any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `props` | `PropsWithChildren`<`MemberDetailProps`\> | +| `context?` | `any` | + +#### Returns + +``null`` \| `ReactElement`<`any`, `any`\> + +#### Defined in + +node_modules/@types/react/index.d.ts:543 + +___ + +### getLanguageName + +▸ **getLanguageName**(`code`): `string` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `code` | `string` | + +#### Returns + +`string` + +#### Defined in + +[src/screens/MemberDetail/MemberDetail.tsx:303](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/MemberDetail/MemberDetail.tsx#L303) + +___ + +### prettyDate + +▸ **prettyDate**(`param`): `string` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `param` | `string` | + +#### Returns + +`string` + +#### Defined in + +[src/screens/MemberDetail/MemberDetail.tsx:295](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/MemberDetail/MemberDetail.tsx#L295) diff --git a/talawa-admin-docs/modules/screens_MemberDetail_MemberDetail_test.md b/talawa-admin-docs/modules/screens_MemberDetail_MemberDetail_test.md new file mode 100644 index 0000000000..fceb473c26 --- /dev/null +++ b/talawa-admin-docs/modules/screens_MemberDetail_MemberDetail_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/MemberDetail/MemberDetail.test + +# Module: screens/MemberDetail/MemberDetail.test diff --git a/talawa-admin-docs/modules/screens_OrgContribution_OrgContribution.md b/talawa-admin-docs/modules/screens_OrgContribution_OrgContribution.md new file mode 100644 index 0000000000..87dcea8f66 --- /dev/null +++ b/talawa-admin-docs/modules/screens_OrgContribution_OrgContribution.md @@ -0,0 +1,23 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/OrgContribution/OrgContribution + +# Module: screens/OrgContribution/OrgContribution + +## Table of contents + +### Functions + +- [default](screens_OrgContribution_OrgContribution.md#default) + +## Functions + +### default + +▸ **default**(): `JSX.Element` + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/screens/OrgContribution/OrgContribution.tsx:11](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/OrgContribution/OrgContribution.tsx#L11) diff --git a/talawa-admin-docs/modules/screens_OrgContribution_OrgContribution_test.md b/talawa-admin-docs/modules/screens_OrgContribution_OrgContribution_test.md new file mode 100644 index 0000000000..588e0253be --- /dev/null +++ b/talawa-admin-docs/modules/screens_OrgContribution_OrgContribution_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/OrgContribution/OrgContribution.test + +# Module: screens/OrgContribution/OrgContribution.test diff --git a/talawa-admin-docs/modules/screens_OrgList_OrgList.md b/talawa-admin-docs/modules/screens_OrgList_OrgList.md new file mode 100644 index 0000000000..98b197b2f9 --- /dev/null +++ b/talawa-admin-docs/modules/screens_OrgList_OrgList.md @@ -0,0 +1,23 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/OrgList/OrgList + +# Module: screens/OrgList/OrgList + +## Table of contents + +### Functions + +- [default](screens_OrgList_OrgList.md#default) + +## Functions + +### default + +▸ **default**(): `JSX.Element` + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/screens/OrgList/OrgList.tsx:29](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/OrgList/OrgList.tsx#L29) diff --git a/talawa-admin-docs/modules/screens_OrgList_OrgListMocks.md b/talawa-admin-docs/modules/screens_OrgList_OrgListMocks.md new file mode 100644 index 0000000000..3cee071055 --- /dev/null +++ b/talawa-admin-docs/modules/screens_OrgList_OrgListMocks.md @@ -0,0 +1,41 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/OrgList/OrgListMocks + +# Module: screens/OrgList/OrgListMocks + +## Table of contents + +### Variables + +- [MOCKS](screens_OrgList_OrgListMocks.md#mocks) +- [MOCKS\_ADMIN](screens_OrgList_OrgListMocks.md#mocks_admin) +- [MOCKS\_EMPTY](screens_OrgList_OrgListMocks.md#mocks_empty) + +## Variables + +### MOCKS + +• `Const` **MOCKS**: ({ `request`: { `query`: `DocumentNode` = ORGANIZATION\_CONNECTION\_LIST; `variables?`: `undefined` } ; `result`: { `data`: { `organizationsConnection`: `InterfaceOrgConnectionInfoType`[] = organizations } } } \| { `request`: { `query`: `DocumentNode` = USER\_ORGANIZATION\_LIST; `variables`: { `id`: `string` = '123' } } ; `result`: { `data`: `InterfaceUserType` = superAdminUser } })[] + +#### Defined in + +[src/screens/OrgList/OrgListMocks.ts:79](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/OrgList/OrgListMocks.ts#L79) + +___ + +### MOCKS\_ADMIN + +• `Const` **MOCKS\_ADMIN**: ({ `request`: { `query`: `DocumentNode` = ORGANIZATION\_CONNECTION\_LIST; `variables?`: `undefined` } ; `result`: { `data`: { `organizationsConnection`: `InterfaceOrgConnectionInfoType`[] = organizations } } } \| { `request`: { `query`: `DocumentNode` = USER\_ORGANIZATION\_LIST; `variables`: { `id`: `string` = '123' } } ; `result`: { `data`: `InterfaceUserType` = adminUser } })[] + +#### Defined in + +[src/screens/OrgList/OrgListMocks.ts:123](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/OrgList/OrgListMocks.ts#L123) + +___ + +### MOCKS\_EMPTY + +• `Const` **MOCKS\_EMPTY**: ({ `request`: { `query`: `DocumentNode` = ORGANIZATION\_CONNECTION\_LIST; `variables?`: `undefined` } ; `result`: { `data`: { `organizationsConnection`: `never`[] = [] } } } \| { `request`: { `query`: `DocumentNode` = USER\_ORGANIZATION\_LIST; `variables`: { `id`: `string` = '123' } } ; `result`: { `data`: `InterfaceUserType` = superAdminUser } })[] + +#### Defined in + +[src/screens/OrgList/OrgListMocks.ts:100](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/OrgList/OrgListMocks.ts#L100) diff --git a/talawa-admin-docs/modules/screens_OrgList_OrgList_test.md b/talawa-admin-docs/modules/screens_OrgList_OrgList_test.md new file mode 100644 index 0000000000..97033df2f3 --- /dev/null +++ b/talawa-admin-docs/modules/screens_OrgList_OrgList_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/OrgList/OrgList.test + +# Module: screens/OrgList/OrgList.test diff --git a/talawa-admin-docs/modules/screens_OrgPost_OrgPost.md b/talawa-admin-docs/modules/screens_OrgPost_OrgPost.md new file mode 100644 index 0000000000..cdc5d0b854 --- /dev/null +++ b/talawa-admin-docs/modules/screens_OrgPost_OrgPost.md @@ -0,0 +1,23 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/OrgPost/OrgPost + +# Module: screens/OrgPost/OrgPost + +## Table of contents + +### Functions + +- [default](screens_OrgPost_OrgPost.md#default) + +## Functions + +### default + +▸ **default**(): `JSX.Element` + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/screens/OrgPost/OrgPost.tsx:25](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/OrgPost/OrgPost.tsx#L25) diff --git a/talawa-admin-docs/modules/screens_OrgPost_OrgPost_test.md b/talawa-admin-docs/modules/screens_OrgPost_OrgPost_test.md new file mode 100644 index 0000000000..7bbf3988e6 --- /dev/null +++ b/talawa-admin-docs/modules/screens_OrgPost_OrgPost_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/OrgPost/OrgPost.test + +# Module: screens/OrgPost/OrgPost.test diff --git a/talawa-admin-docs/modules/screens_OrgSettings_OrgSettings.md b/talawa-admin-docs/modules/screens_OrgSettings_OrgSettings.md new file mode 100644 index 0000000000..c20c2e6ad8 --- /dev/null +++ b/talawa-admin-docs/modules/screens_OrgSettings_OrgSettings.md @@ -0,0 +1,23 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/OrgSettings/OrgSettings + +# Module: screens/OrgSettings/OrgSettings + +## Table of contents + +### Functions + +- [default](screens_OrgSettings_OrgSettings.md#default) + +## Functions + +### default + +▸ **default**(): `JSX.Element` + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/screens/OrgSettings/OrgSettings.tsx:18](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/OrgSettings/OrgSettings.tsx#L18) diff --git a/talawa-admin-docs/modules/screens_OrgSettings_OrgSettings_test.md b/talawa-admin-docs/modules/screens_OrgSettings_OrgSettings_test.md new file mode 100644 index 0000000000..58f2a07074 --- /dev/null +++ b/talawa-admin-docs/modules/screens_OrgSettings_OrgSettings_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/OrgSettings/OrgSettings.test + +# Module: screens/OrgSettings/OrgSettings.test diff --git a/talawa-admin-docs/modules/screens_OrganizationDashboard_OrganizationDashboard.md b/talawa-admin-docs/modules/screens_OrganizationDashboard_OrganizationDashboard.md new file mode 100644 index 0000000000..eb89824a56 --- /dev/null +++ b/talawa-admin-docs/modules/screens_OrganizationDashboard_OrganizationDashboard.md @@ -0,0 +1,23 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/OrganizationDashboard/OrganizationDashboard + +# Module: screens/OrganizationDashboard/OrganizationDashboard + +## Table of contents + +### Functions + +- [default](screens_OrganizationDashboard_OrganizationDashboard.md#default) + +## Functions + +### default + +▸ **default**(): `JSX.Element` + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/screens/OrganizationDashboard/OrganizationDashboard.tsx:25](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/OrganizationDashboard/OrganizationDashboard.tsx#L25) diff --git a/talawa-admin-docs/modules/screens_OrganizationDashboard_OrganizationDashboardMocks.md b/talawa-admin-docs/modules/screens_OrganizationDashboard_OrganizationDashboardMocks.md new file mode 100644 index 0000000000..eeee46963b --- /dev/null +++ b/talawa-admin-docs/modules/screens_OrganizationDashboard_OrganizationDashboardMocks.md @@ -0,0 +1,41 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/OrganizationDashboard/OrganizationDashboardMocks + +# Module: screens/OrganizationDashboard/OrganizationDashboardMocks + +## Table of contents + +### Variables + +- [MOCKS\_NO\_TAGS](screens_OrganizationDashboard_OrganizationDashboardMocks.md#mocks_no_tags) +- [MOCKS\_WITHOUT\_IMAGE](screens_OrganizationDashboard_OrganizationDashboardMocks.md#mocks_without_image) +- [MOCKS\_WITH\_IMAGE](screens_OrganizationDashboard_OrganizationDashboardMocks.md#mocks_with_image) + +## Variables + +### MOCKS\_NO\_TAGS + +• `Const` **MOCKS\_NO\_TAGS**: ({ `request`: { `query`: `DocumentNode` = ORGANIZATIONS\_LIST } ; `result`: { `data`: { `eventsByOrganization?`: `undefined` ; `organizations`: { `_id`: `number` = 1; `admins`: { `_id`: `string` = '123'; `email`: `string` = 'johndoe@gmail.com'; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' } ; `blockedUsers`: { `_id`: `string` = '789'; `email`: `string` = 'stevesmith@gmail.com'; `firstName`: `string` = 'Steve'; `lastName`: `string` = 'Smith' } ; `creator`: { `email`: `string` = ''; `firstName`: `string` = ''; `lastName`: `string` = '' } ; `description`: `string` = 'This is a Dummy Organization'; `image`: `string` = ''; `location`: `string` = 'New Delhi'; `members`: { `_id`: `string` = '123'; `email`: `string` = 'johndoe@gmail.com'; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' } ; `membershipRequests`: { `_id`: `string` = '456'; `user`: { `email`: `string` = 'samsmith@gmail.com'; `firstName`: `string` = 'Sam'; `lastName`: `string` = 'Smith' } } ; `name`: `string` = 'Dummy Organization'; `spamCount`: { `_id`: `string` = '6954'; `groupchat`: { `_id`: `string` = '321'; `title`: `string` = 'Dummy' } ; `isReaded`: `boolean` = false; `user`: { `_id`: `string` = '878'; `email`: `string` = 'joeroot@gmail.com'; `firstName`: `string` = 'Joe'; `lastName`: `string` = 'Root' } }[] }[] ; `postsByOrganization?`: `undefined` } } } \| { `request`: { `query`: `DocumentNode` = ORGANIZATION\_POST\_LIST } ; `result`: { `data`: { `eventsByOrganization?`: `undefined` ; `organizations?`: `undefined` ; `postsByOrganization`: { `_id`: `number` = 1; `creator`: { `_id`: `string` = '583'; `email`: `string` = 'johndoe@gmail.com'; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' } ; `imageUrl`: `string` = ''; `text`: `string` = 'Capture Jinchuriki'; `title`: `string` = 'Akatsuki'; `videoUrl`: `string` = '' }[] } } } \| { `request`: { `query`: `DocumentNode` = ORGANIZATION\_EVENT\_LIST } ; `result`: { `data`: { `eventsByOrganization`: { `_id`: `number` = 1; `allDay`: `boolean` = false; `description`: `string` = 'Event Test'; `endDate`: `string` = ''; `endTime`: `string` = '06:00'; `isPublic`: `boolean` = true; `isRegisterable`: `boolean` = true; `location`: `string` = 'New Delhi'; `recurring`: `boolean` = false; `startDate`: `string` = ''; `startTime`: `string` = '02:00'; `title`: `string` = 'Event' }[] ; `organizations?`: `undefined` ; `postsByOrganization?`: `undefined` } } })[] + +#### Defined in + +[src/screens/OrganizationDashboard/OrganizationDashboardMocks.ts:139](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/OrganizationDashboard/OrganizationDashboardMocks.ts#L139) + +___ + +### MOCKS\_WITHOUT\_IMAGE + +• `Const` **MOCKS\_WITHOUT\_IMAGE**: ({ `request`: { `query`: `DocumentNode` = ORGANIZATIONS\_LIST } ; `result`: { `data`: { `eventsByOrganization?`: `undefined` ; `organizations`: { `_id`: `number` = 1; `admins`: { `_id`: `string` = '123'; `email`: `string` = 'johndoe@gmail.com'; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' } ; `blockedUsers`: { `_id`: `string` = '789'; `email`: `string` = 'stevesmith@gmail.com'; `firstName`: `string` = 'Steve'; `lastName`: `string` = 'Smith' } ; `creator`: { `email`: `string` = ''; `firstName`: `string` = ''; `lastName`: `string` = '' } ; `description`: `string` = 'This is a Dummy Organization'; `image`: `string` = ''; `location`: `string` = 'New Delhi'; `members`: { `_id`: `string` = '123'; `email`: `string` = 'johndoe@gmail.com'; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' } ; `membershipRequests`: { `_id`: `string` = '456'; `user`: { `email`: `string` = 'samsmith@gmail.com'; `firstName`: `string` = 'Sam'; `lastName`: `string` = 'Smith' } } ; `name`: `string` = 'Dummy Organization'; `spamCount`: { `_id`: `string` = '6954'; `groupchat`: { `_id`: `string` = '321'; `title`: `string` = 'Dummy' } ; `isReaded`: `boolean` = false; `user`: { `_id`: `string` = '878'; `email`: `string` = 'joeroot@gmail.com'; `firstName`: `string` = 'Joe'; `lastName`: `string` = 'Root' } }[] }[] ; `postsByOrganization?`: `undefined` ; `removeOrganization?`: `undefined` } } } \| { `request`: { `query`: `DocumentNode` = ORGANIZATION\_POST\_LIST } ; `result`: { `data`: { `eventsByOrganization?`: `undefined` ; `organizations?`: `undefined` ; `postsByOrganization`: { `_id`: `number` = 1; `creator`: { `_id`: `string` = '583'; `email`: `string` = 'johndoe@gmail.com'; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' } ; `imageUrl`: `string` = ''; `text`: `string` = 'Capture Jinchuriki'; `title`: `string` = 'Akatsuki'; `videoUrl`: `string` = '' }[] ; `removeOrganization?`: `undefined` } } } \| { `request`: { `query`: `DocumentNode` = DELETE\_ORGANIZATION\_MUTATION } ; `result`: { `data`: { `eventsByOrganization?`: `undefined` ; `organizations?`: `undefined` ; `postsByOrganization?`: `undefined` ; `removeOrganization`: { `_id`: `number` = 1 }[] } } } \| { `request`: { `query`: `DocumentNode` = ORGANIZATION\_EVENT\_LIST } ; `result`: { `data`: { `eventsByOrganization`: { `_id`: `number` = 1; `allDay`: `boolean` = false; `description`: `string` = 'Event Test'; `endDate`: `string` = ''; `endTime`: `string` = '06:00'; `isPublic`: `boolean` = true; `isRegisterable`: `boolean` = true; `location`: `string` = 'New Delhi'; `recurring`: `boolean` = false; `startDate`: `string` = ''; `startTime`: `string` = '02:00'; `title`: `string` = 'Event' }[] ; `organizations?`: `undefined` ; `postsByOrganization?`: `undefined` ; `removeOrganization?`: `undefined` } } })[] + +#### Defined in + +[src/screens/OrganizationDashboard/OrganizationDashboardMocks.ts:8](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/OrganizationDashboard/OrganizationDashboardMocks.ts#L8) + +___ + +### MOCKS\_WITH\_IMAGE + +• `Const` **MOCKS\_WITH\_IMAGE**: ({ `request`: { `query`: `DocumentNode` = ORGANIZATIONS\_LIST } ; `result`: { `data`: { `eventsByOrganization?`: `undefined` ; `organizations`: { `_id`: `number` = 1; `admins`: { `_id`: `string` = '123'; `email`: `string` = 'johndoe@gmail.com'; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' } ; `blockedUsers`: { `_id`: `string` = '789'; `email`: `string` = 'stevesmith@gmail.com'; `firstName`: `string` = 'Steve'; `lastName`: `string` = 'Smith' } ; `creator`: { `email`: `string` = ''; `firstName`: `string` = ''; `lastName`: `string` = '' } ; `description`: `string` = 'This is a Dummy Organization'; `image`: `string` = 'https://via.placeholder.com/200x200'; `location`: `string` = 'New Delhi'; `members`: { `_id`: `string` = '123'; `email`: `string` = 'johndoe@gmail.com'; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' } ; `membershipRequests`: { `_id`: `string` = '456'; `user`: { `email`: `string` = 'samsmith@gmail.com'; `firstName`: `string` = 'Sam'; `lastName`: `string` = 'Smith' } } ; `name`: `string` = 'Dummy Organization'; `spamCount`: { `_id`: `string` = '6954'; `groupchat`: { `_id`: `string` = '321'; `title`: `string` = 'Dummy' } ; `isReaded`: `boolean` = false; `user`: { `_id`: `string` = '878'; `email`: `string` = 'joeroot@gmail.com'; `firstName`: `string` = 'Joe'; `lastName`: `string` = 'Root' } }[] }[] ; `postsByOrganization?`: `undefined` } } } \| { `request`: { `query`: `DocumentNode` = ORGANIZATION\_POST\_LIST } ; `result`: { `data`: { `eventsByOrganization?`: `undefined` ; `organizations?`: `undefined` ; `postsByOrganization`: { `_id`: `number` = 1; `creator`: { `_id`: `string` = '583'; `email`: `string` = 'johndoe@gmail.com'; `firstName`: `string` = 'John'; `lastName`: `string` = 'Doe' } ; `imageUrl`: `string` = ''; `text`: `string` = 'Capture Jinchuriki'; `title`: `string` = 'Akatsuki'; `videoUrl`: `string` = '' }[] } } } \| { `request`: { `query`: `DocumentNode` = ORGANIZATION\_EVENT\_LIST } ; `result`: { `data`: { `eventsByOrganization`: { `_id`: `number` = 1; `allDay`: `boolean` = false; `description`: `string` = 'Event Test'; `endDate`: `string` = ''; `endTime`: `string` = '06:00'; `isPublic`: `boolean` = true; `isRegisterable`: `boolean` = true; `location`: `string` = 'New Delhi'; `recurring`: `boolean` = false; `startDate`: `string` = ''; `startTime`: `string` = '02:00'; `title`: `string` = 'Event' }[] ; `organizations?`: `undefined` ; `postsByOrganization?`: `undefined` } } })[] + +#### Defined in + +[src/screens/OrganizationDashboard/OrganizationDashboardMocks.ts:256](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/OrganizationDashboard/OrganizationDashboardMocks.ts#L256) diff --git a/talawa-admin-docs/modules/screens_OrganizationDashboard_OrganizationDashboard_test.md b/talawa-admin-docs/modules/screens_OrganizationDashboard_OrganizationDashboard_test.md new file mode 100644 index 0000000000..59b308b2c3 --- /dev/null +++ b/talawa-admin-docs/modules/screens_OrganizationDashboard_OrganizationDashboard_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/OrganizationDashboard/OrganizationDashboard.test + +# Module: screens/OrganizationDashboard/OrganizationDashboard.test diff --git a/talawa-admin-docs/modules/screens_OrganizationEvents_OrganizationEvents.md b/talawa-admin-docs/modules/screens_OrganizationEvents_OrganizationEvents.md new file mode 100644 index 0000000000..a360d62602 --- /dev/null +++ b/talawa-admin-docs/modules/screens_OrganizationEvents_OrganizationEvents.md @@ -0,0 +1,23 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/OrganizationEvents/OrganizationEvents + +# Module: screens/OrganizationEvents/OrganizationEvents + +## Table of contents + +### Functions + +- [default](screens_OrganizationEvents_OrganizationEvents.md#default) + +## Functions + +### default + +▸ **default**(): `JSX.Element` + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/screens/OrganizationEvents/OrganizationEvents.tsx:27](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/OrganizationEvents/OrganizationEvents.tsx#L27) diff --git a/talawa-admin-docs/modules/screens_OrganizationEvents_OrganizationEvents_test.md b/talawa-admin-docs/modules/screens_OrganizationEvents_OrganizationEvents_test.md new file mode 100644 index 0000000000..6cbca3f09b --- /dev/null +++ b/talawa-admin-docs/modules/screens_OrganizationEvents_OrganizationEvents_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/OrganizationEvents/OrganizationEvents.test + +# Module: screens/OrganizationEvents/OrganizationEvents.test diff --git a/talawa-admin-docs/modules/screens_OrganizationPeople_OrganizationPeople.md b/talawa-admin-docs/modules/screens_OrganizationPeople_OrganizationPeople.md new file mode 100644 index 0000000000..8944e2fa18 --- /dev/null +++ b/talawa-admin-docs/modules/screens_OrganizationPeople_OrganizationPeople.md @@ -0,0 +1,23 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/OrganizationPeople/OrganizationPeople + +# Module: screens/OrganizationPeople/OrganizationPeople + +## Table of contents + +### Functions + +- [default](screens_OrganizationPeople_OrganizationPeople.md#default) + +## Functions + +### default + +▸ **default**(): `JSX.Element` + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/screens/OrganizationPeople/OrganizationPeople.tsx:24](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/OrganizationPeople/OrganizationPeople.tsx#L24) diff --git a/talawa-admin-docs/modules/screens_OrganizationPeople_OrganizationPeople_test.md b/talawa-admin-docs/modules/screens_OrganizationPeople_OrganizationPeople_test.md new file mode 100644 index 0000000000..e0879da4b3 --- /dev/null +++ b/talawa-admin-docs/modules/screens_OrganizationPeople_OrganizationPeople_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/OrganizationPeople/OrganizationPeople.test + +# Module: screens/OrganizationPeople/OrganizationPeople.test diff --git a/talawa-admin-docs/modules/screens_PageNotFound_PageNotFound.md b/talawa-admin-docs/modules/screens_PageNotFound_PageNotFound.md new file mode 100644 index 0000000000..18cd057b40 --- /dev/null +++ b/talawa-admin-docs/modules/screens_PageNotFound_PageNotFound.md @@ -0,0 +1,23 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/PageNotFound/PageNotFound + +# Module: screens/PageNotFound/PageNotFound + +## Table of contents + +### Functions + +- [default](screens_PageNotFound_PageNotFound.md#default) + +## Functions + +### default + +▸ **default**(): `Element` + +#### Returns + +`Element` + +#### Defined in + +[src/screens/PageNotFound/PageNotFound.tsx:8](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/PageNotFound/PageNotFound.tsx#L8) diff --git a/talawa-admin-docs/modules/screens_PageNotFound_PageNotFound_test.md b/talawa-admin-docs/modules/screens_PageNotFound_PageNotFound_test.md new file mode 100644 index 0000000000..b63137770c --- /dev/null +++ b/talawa-admin-docs/modules/screens_PageNotFound_PageNotFound_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/PageNotFound/PageNotFound.test + +# Module: screens/PageNotFound/PageNotFound.test diff --git a/talawa-admin-docs/modules/screens_Requests_Requests.md b/talawa-admin-docs/modules/screens_Requests_Requests.md new file mode 100644 index 0000000000..bc869b3bdf --- /dev/null +++ b/talawa-admin-docs/modules/screens_Requests_Requests.md @@ -0,0 +1,23 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/Requests/Requests + +# Module: screens/Requests/Requests + +## Table of contents + +### Functions + +- [default](screens_Requests_Requests.md#default) + +## Functions + +### default + +▸ **default**(): `Element` + +#### Returns + +`Element` + +#### Defined in + +[src/screens/Requests/Requests.tsx:30](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/Requests/Requests.tsx#L30) diff --git a/talawa-admin-docs/modules/screens_Requests_Requests_test.md b/talawa-admin-docs/modules/screens_Requests_Requests_test.md new file mode 100644 index 0000000000..62f8ec88e0 --- /dev/null +++ b/talawa-admin-docs/modules/screens_Requests_Requests_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/Requests/Requests.test + +# Module: screens/Requests/Requests.test diff --git a/talawa-admin-docs/modules/screens_UserPortal_Donate_Donate.md b/talawa-admin-docs/modules/screens_UserPortal_Donate_Donate.md new file mode 100644 index 0000000000..44a76a5d36 --- /dev/null +++ b/talawa-admin-docs/modules/screens_UserPortal_Donate_Donate.md @@ -0,0 +1,23 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/UserPortal/Donate/Donate + +# Module: screens/UserPortal/Donate/Donate + +## Table of contents + +### Functions + +- [default](screens_UserPortal_Donate_Donate.md#default) + +## Functions + +### default + +▸ **default**(): `JSX.Element` + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/screens/UserPortal/Donate/Donate.tsx:27](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/UserPortal/Donate/Donate.tsx#L27) diff --git a/talawa-admin-docs/modules/screens_UserPortal_Donate_Donate_test.md b/talawa-admin-docs/modules/screens_UserPortal_Donate_Donate_test.md new file mode 100644 index 0000000000..5fd12c96d5 --- /dev/null +++ b/talawa-admin-docs/modules/screens_UserPortal_Donate_Donate_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/UserPortal/Donate/Donate.test + +# Module: screens/UserPortal/Donate/Donate.test diff --git a/talawa-admin-docs/modules/screens_UserPortal_Home_Home.md b/talawa-admin-docs/modules/screens_UserPortal_Home_Home.md new file mode 100644 index 0000000000..ed3f409426 --- /dev/null +++ b/talawa-admin-docs/modules/screens_UserPortal_Home_Home.md @@ -0,0 +1,23 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/UserPortal/Home/Home + +# Module: screens/UserPortal/Home/Home + +## Table of contents + +### Functions + +- [default](screens_UserPortal_Home_Home.md#default) + +## Functions + +### default + +▸ **default**(): `JSX.Element` + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/screens/UserPortal/Home/Home.tsx:43](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/UserPortal/Home/Home.tsx#L43) diff --git a/talawa-admin-docs/modules/screens_UserPortal_Home_Home_test.md b/talawa-admin-docs/modules/screens_UserPortal_Home_Home_test.md new file mode 100644 index 0000000000..024a7960f4 --- /dev/null +++ b/talawa-admin-docs/modules/screens_UserPortal_Home_Home_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/UserPortal/Home/Home.test + +# Module: screens/UserPortal/Home/Home.test diff --git a/talawa-admin-docs/modules/screens_UserPortal_Organizations_Organizations.md b/talawa-admin-docs/modules/screens_UserPortal_Organizations_Organizations.md new file mode 100644 index 0000000000..42ab891319 --- /dev/null +++ b/talawa-admin-docs/modules/screens_UserPortal_Organizations_Organizations.md @@ -0,0 +1,23 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/UserPortal/Organizations/Organizations + +# Module: screens/UserPortal/Organizations/Organizations + +## Table of contents + +### Functions + +- [default](screens_UserPortal_Organizations_Organizations.md#default) + +## Functions + +### default + +▸ **default**(): `JSX.Element` + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/screens/UserPortal/Organizations/Organizations.tsx:25](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/UserPortal/Organizations/Organizations.tsx#L25) diff --git a/talawa-admin-docs/modules/screens_UserPortal_Organizations_Organizations_test.md b/talawa-admin-docs/modules/screens_UserPortal_Organizations_Organizations_test.md new file mode 100644 index 0000000000..71d42b41fc --- /dev/null +++ b/talawa-admin-docs/modules/screens_UserPortal_Organizations_Organizations_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/UserPortal/Organizations/Organizations.test + +# Module: screens/UserPortal/Organizations/Organizations.test diff --git a/talawa-admin-docs/modules/screens_UserPortal_People_People.md b/talawa-admin-docs/modules/screens_UserPortal_People_People.md new file mode 100644 index 0000000000..0212686009 --- /dev/null +++ b/talawa-admin-docs/modules/screens_UserPortal_People_People.md @@ -0,0 +1,23 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/UserPortal/People/People + +# Module: screens/UserPortal/People/People + +## Table of contents + +### Functions + +- [default](screens_UserPortal_People_People.md#default) + +## Functions + +### default + +▸ **default**(): `JSX.Element` + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/screens/UserPortal/People/People.tsx:26](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/UserPortal/People/People.tsx#L26) diff --git a/talawa-admin-docs/modules/screens_UserPortal_People_People_test.md b/talawa-admin-docs/modules/screens_UserPortal_People_People_test.md new file mode 100644 index 0000000000..2e500bc348 --- /dev/null +++ b/talawa-admin-docs/modules/screens_UserPortal_People_People_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/UserPortal/People/People.test + +# Module: screens/UserPortal/People/People.test diff --git a/talawa-admin-docs/modules/screens_UserPortal_Settings_Settings.md b/talawa-admin-docs/modules/screens_UserPortal_Settings_Settings.md new file mode 100644 index 0000000000..1940359b75 --- /dev/null +++ b/talawa-admin-docs/modules/screens_UserPortal_Settings_Settings.md @@ -0,0 +1,23 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/UserPortal/Settings/Settings + +# Module: screens/UserPortal/Settings/Settings + +## Table of contents + +### Functions + +- [default](screens_UserPortal_Settings_Settings.md#default) + +## Functions + +### default + +▸ **default**(): `JSX.Element` + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/screens/UserPortal/Settings/Settings.tsx:14](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/UserPortal/Settings/Settings.tsx#L14) diff --git a/talawa-admin-docs/modules/screens_UserPortal_Settings_Settings_test.md b/talawa-admin-docs/modules/screens_UserPortal_Settings_Settings_test.md new file mode 100644 index 0000000000..89bc26e757 --- /dev/null +++ b/talawa-admin-docs/modules/screens_UserPortal_Settings_Settings_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/UserPortal/Settings/Settings.test + +# Module: screens/UserPortal/Settings/Settings.test diff --git a/talawa-admin-docs/modules/screens_UserPortal_UserLoginPage_UserLoginPage.md b/talawa-admin-docs/modules/screens_UserPortal_UserLoginPage_UserLoginPage.md new file mode 100644 index 0000000000..ea6c9b5c69 --- /dev/null +++ b/talawa-admin-docs/modules/screens_UserPortal_UserLoginPage_UserLoginPage.md @@ -0,0 +1,23 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/UserPortal/UserLoginPage/UserLoginPage + +# Module: screens/UserPortal/UserLoginPage/UserLoginPage + +## Table of contents + +### Functions + +- [default](screens_UserPortal_UserLoginPage_UserLoginPage.md#default) + +## Functions + +### default + +▸ **default**(): `JSX.Element` + +#### Returns + +`JSX.Element` + +#### Defined in + +[src/screens/UserPortal/UserLoginPage/UserLoginPage.tsx:11](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/UserPortal/UserLoginPage/UserLoginPage.tsx#L11) diff --git a/talawa-admin-docs/modules/screens_UserPortal_UserLoginPage_UserLoginPage_test.md b/talawa-admin-docs/modules/screens_UserPortal_UserLoginPage_UserLoginPage_test.md new file mode 100644 index 0000000000..186ddd1caf --- /dev/null +++ b/talawa-admin-docs/modules/screens_UserPortal_UserLoginPage_UserLoginPage_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/UserPortal/UserLoginPage/UserLoginPage.test + +# Module: screens/UserPortal/UserLoginPage/UserLoginPage.test diff --git a/talawa-admin-docs/modules/screens_Users_Users.md b/talawa-admin-docs/modules/screens_Users_Users.md new file mode 100644 index 0000000000..08fdfc77b8 --- /dev/null +++ b/talawa-admin-docs/modules/screens_Users_Users.md @@ -0,0 +1,23 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/Users/Users + +# Module: screens/Users/Users + +## Table of contents + +### Functions + +- [default](screens_Users_Users.md#default) + +## Functions + +### default + +▸ **default**(): `Element` + +#### Returns + +`Element` + +#### Defined in + +[src/screens/Users/Users.tsx:24](https://github.com/PalisadoesFoundation/talawa-admin/blob/b619a0d/src/screens/Users/Users.tsx#L24) diff --git a/talawa-admin-docs/modules/screens_Users_Users_test.md b/talawa-admin-docs/modules/screens_Users_Users_test.md new file mode 100644 index 0000000000..c8069af122 --- /dev/null +++ b/talawa-admin-docs/modules/screens_Users_Users_test.md @@ -0,0 +1,3 @@ +[talawa-admin](../README.md) / [Modules](../modules.md) / screens/Users/Users.test + +# Module: screens/Users/Users.test diff --git a/talawa-admin-docs/xyz.md b/talawa-admin-docs/xyz.md deleted file mode 100644 index 8aae74caca..0000000000 --- a/talawa-admin-docs/xyz.md +++ /dev/null @@ -1 +0,0 @@ -file will be overwritten \ No newline at end of file From 04bb679e10e3bc53d5acc3c1c7678ccf6ed282eb Mon Sep 17 00:00:00 2001 From: Nitya Pasrija <97171261+Nitya-Pasrija@users.noreply.github.com> Date: Sun, 3 Sep 2023 18:43:33 +0530 Subject: [PATCH 4/9] copy-docs -to-talawa branch update to develop --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index ac5b81cd19..56af83e702 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -97,7 +97,7 @@ jobs: Copy-docs-to-talawa-docs: runs-on: ubuntu-latest - if: github.ref == 'refs/heads/automated-docs' + if: github.ref == 'refs/heads/develop' needs: Generate-Documentation steps: - uses: actions/checkout@v3 From d1bd3631f1a93938cf12a207fd4d3f60cc60fb9a Mon Sep 17 00:00:00 2001 From: Nitya Pasrija <97171261+Nitya-Pasrija@users.noreply.github.com> Date: Sun, 3 Sep 2023 18:50:43 +0530 Subject: [PATCH 5/9] removed dependance of code copying from generate segment --- .github/workflows/push.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 56af83e702..02ebc37c60 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -98,7 +98,6 @@ jobs: Copy-docs-to-talawa-docs: runs-on: ubuntu-latest if: github.ref == 'refs/heads/develop' - needs: Generate-Documentation steps: - uses: actions/checkout@v3 - uses: dmnemec/copy_file_to_another_repo_action@v1.1.1 From 0a6f0c93cd47ec14cda4b528815c23cab6dc303e Mon Sep 17 00:00:00 2001 From: TASNEEM KOUSHAR Date: Sun, 3 Sep 2023 19:46:01 +0530 Subject: [PATCH 6/9] Update push.yml (#969) --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 02ebc37c60..969a62af5a 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -102,7 +102,7 @@ jobs: - uses: actions/checkout@v3 - uses: dmnemec/copy_file_to_another_repo_action@v1.1.1 env: - API_TOKEN_GITHUB: ${{ secrets.TALAWA_DOCS_SYNC }} + API_TOKEN_GITHUB: ${{ secrets.TALAWA_DOCS_SYNC_NEW }} with: source_file: 'talawa-admin-docs/' destination_repo: 'PalisadoesFoundation/talawa-docs' From cb3a7ec5a0f561942462e00bb60b94077c6a8f93 Mon Sep 17 00:00:00 2001 From: TASNEEM KOUSHAR Date: Sun, 3 Sep 2023 19:50:40 +0530 Subject: [PATCH 7/9] Update push.yml (#970) --- .github/workflows/push.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 969a62af5a..2169009ec0 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -97,7 +97,6 @@ jobs: Copy-docs-to-talawa-docs: runs-on: ubuntu-latest - if: github.ref == 'refs/heads/develop' steps: - uses: actions/checkout@v3 - uses: dmnemec/copy_file_to_another_repo_action@v1.1.1 From a6ced9ab2c144ab7642a423f6660460cd420965f Mon Sep 17 00:00:00 2001 From: Siddhesh Bhupendra Kuakde Date: Wed, 6 Sep 2023 22:52:40 +0530 Subject: [PATCH 8/9] Feature Request: Adding a dialog to go to plugin store after an organization is created by the admin (#951) * Add/ test for OrgPost.tsx * fix: org post back to default * Added Dialog 2 * Updated Dialog UI * Removed Extra code * Updated Plugin store * fix: warnings and solves #951 & #948 * fix: warnings and solves #951 & #948 * fix: warnings and solves #951 & #948 * Fix: UI Redesign * fix: merge * fix * Update AddOnStore.tsx * Fixed Merge Errors * Add test: for OrgEntry * Test 3 * fix test 4 --- public/locales/en.json | 9 +- src/GraphQl/Mutations/mutations.ts | 4 +- src/GraphQl/Queries/Queries.ts | 1 + .../AddOn/core/AddOnEntry/AddOnEntry.test.tsx | 39 ++++- .../AddOn/core/AddOnEntry/AddOnEntry.tsx | 134 ++++-------------- .../AddOn/core/AddOnStore/AddOnStore.tsx | 64 ++------- src/screens/OrgList/OrgList.module.css | 79 +++++++++++ src/screens/OrgList/OrgList.tsx | 65 +++++++++ 8 files changed, 227 insertions(+), 168 deletions(-) diff --git a/public/locales/en.json b/public/locales/en.json index bf232e2bdd..80a75b08db 100644 --- a/public/locales/en.json +++ b/public/locales/en.json @@ -86,6 +86,11 @@ "cancel": "Cancel", "noOrgErrorTitle": "Organizations Not Found", "noOrgErrorDescription": "Please create an organization through dashboard", + + "manageFeatures": "Manage Features", + "manageFeaturesInfo": "Creation Successful ! Please select features that you want to enale for this organization from the plugin store.", + "goToStore": "Go to Plugin Store", + "enableEverything": "Enable Everything", "noResultsFoundFor": "No results found for " }, "orgListCard": { @@ -442,7 +447,9 @@ "addOnEntry": { "enable": "Enabled", "install": "Install", - "uninstall": "Uninstall" + "uninstall": "Uninstall", + "uninstallMsg": "This feature is now removed from your organization", + "installMsg": "This feature is now enabled in your organization" }, "memberDetail": { "title": "User Details", diff --git a/src/GraphQl/Mutations/mutations.ts b/src/GraphQl/Mutations/mutations.ts index 040dea6344..550ad1e07d 100644 --- a/src/GraphQl/Mutations/mutations.ts +++ b/src/GraphQl/Mutations/mutations.ts @@ -351,8 +351,8 @@ export const REJECT_ADMIN_MUTATION = gql` * @description used to toggle `installStatus` (boolean value) of a Plugin */ export const UPDATE_INSTALL_STATUS_PLUGIN_MUTATION = gql` - mutation update_install_status_plugin_mutation($id: ID!, $orgId: ID!) { - updatePluginStatus(orgId: $orgId, id: $id) { + mutation ($id: ID!, $orgId: ID!) { + updatePluginStatus(id: $id, orgId: $orgId) { _id pluginName pluginCreatedBy diff --git a/src/GraphQl/Queries/Queries.ts b/src/GraphQl/Queries/Queries.ts index 49ac11df57..1f47769e4c 100644 --- a/src/GraphQl/Queries/Queries.ts +++ b/src/GraphQl/Queries/Queries.ts @@ -600,6 +600,7 @@ export const PLUGIN_GET = gql` pluginName pluginCreatedBy pluginDesc + uninstalledOrgs } } `; diff --git a/src/components/AddOn/core/AddOnEntry/AddOnEntry.test.tsx b/src/components/AddOn/core/AddOnEntry/AddOnEntry.test.tsx index 1716323755..50e56adf1e 100644 --- a/src/components/AddOn/core/AddOnEntry/AddOnEntry.test.tsx +++ b/src/components/AddOn/core/AddOnEntry/AddOnEntry.test.tsx @@ -23,7 +23,7 @@ const httpLink = new HttpLink({ authorization: 'Bearer ' + localStorage.getItem('token') || '', }, }); - +console.error = jest.fn(); const client: ApolloClient = new ApolloClient({ cache: new InMemoryCache(), link: ApolloLink.from([httpLink]), @@ -52,7 +52,7 @@ describe('Testing AddOnEntry', () => { - {} + {} @@ -60,4 +60,39 @@ describe('Testing AddOnEntry', () => { ); expect(getByTestId('AddOnEntry')).toBeInTheDocument(); }); + + it('renders correctly', () => { + const props = { + id: '1', + title: 'Test Addon', + description: 'Test addon description', + createdBy: 'Test User', + component: 'string', + installed: true, + configurable: true, + modified: true, + isInstalled: true, + uninstalledOrgs: [], + enabled: true, + getInstalledPlugins: (): { sample: string } => { + return { sample: 'sample' }; + }, + }; + + const { getByText } = render( + + + + + {} + + + + + ); + + expect(getByText('Test Addon')).toBeInTheDocument(); + expect(getByText('Test addon description')).toBeInTheDocument(); + expect(getByText('Test User')).toBeInTheDocument(); + }); }); diff --git a/src/components/AddOn/core/AddOnEntry/AddOnEntry.tsx b/src/components/AddOn/core/AddOnEntry/AddOnEntry.tsx index 9288c30af9..7503d0667d 100644 --- a/src/components/AddOn/core/AddOnEntry/AddOnEntry.tsx +++ b/src/components/AddOn/core/AddOnEntry/AddOnEntry.tsx @@ -1,13 +1,11 @@ import React, { useState } from 'react'; import PropTypes from 'prop-types'; import styles from './AddOnEntry.module.css'; -import { Button, Card, Form, Spinner } from 'react-bootstrap'; -import { - UPDATE_INSTALL_STATUS_PLUGIN_MUTATION, - UPDATE_ORG_STATUS_PLUGIN_MUTATION, -} from 'GraphQl/Mutations/mutations'; +import { Button, Card, Spinner } from 'react-bootstrap'; +import { UPDATE_INSTALL_STATUS_PLUGIN_MUTATION } from 'GraphQl/Mutations/mutations'; import { useMutation } from '@apollo/client'; import { useTranslation } from 'react-i18next'; +import { toast } from 'react-toastify'; interface InterfaceAddOnEntryProps { id: string; @@ -16,131 +14,52 @@ interface InterfaceAddOnEntryProps { description: string; createdBy: string; component: string; - installed?: boolean; - configurable?: boolean; modified: any; - isInstalled: boolean; + uninstalledOrgs: string[]; getInstalledPlugins: () => any; } function addOnEntry({ id, - enabled, title, description, createdBy, - installed, - isInstalled, + uninstalledOrgs, getInstalledPlugins, }: InterfaceAddOnEntryProps): JSX.Element { const { t } = useTranslation('translation', { keyPrefix: 'addOnEntry' }); - + //getting orgId from URL + const currentOrg = window.location.href.split('/id=')[1] + ''; const [buttonLoading, setButtonLoading] = useState(false); - const [switchInProgress] = useState(false); - const [isInstalledLocal, setIsInstalledLocal] = useState(isInstalled); - - const [updateInstallStatus] = useMutation( + const [isInstalledLocal, setIsInstalledLocal] = useState( + uninstalledOrgs.includes(currentOrg) + ); + // const [addOrgAsUninstalled] = useMutation(UPDATE_ORG_STATUS_PLUGIN_MUTATION); + const [addOrgAsUninstalled] = useMutation( UPDATE_INSTALL_STATUS_PLUGIN_MUTATION ); - const [updateOrgStatus] = useMutation(UPDATE_ORG_STATUS_PLUGIN_MUTATION); - - const currentOrg = window.location.href.split('=')[1]; - const updateOrgList = async (): Promise => { - await updateOrgStatus({ - variables: { - id: id.toString(), - orgId: currentOrg.toString(), - }, - }); - }; - - const updateInstallStatusFunc = async (): Promise => { + const togglePluginInstall = async (): Promise => { setButtonLoading(true); - await updateInstallStatus({ + await addOrgAsUninstalled({ variables: { id: id.toString(), - status: !isInstalledLocal, + orgId: currentOrg.toString(), }, }); setIsInstalledLocal(!isInstalledLocal); setButtonLoading(false); + const dialog: string = isInstalledLocal + ? t('installMsg') + : t('uninstallMsg'); + toast.success(dialog); }; - // useEffect(() => { - // // updateInstallStatusFunc(); - // }, []); - // TODO: Install/Remove Effect - // 1. Update Server to add to Org - // 2. Validate Permissions - // 3. Trigger Server Hook if Validated. (Stream to track progress) - // const install = () => { - // setButtonLoading(true); - // fetch('http://localhost:3005/installed', { - // method: 'POST', - // headers: { - // 'Content-type': 'application/json; charset=UTF-8', - // }, - // body: JSON.stringify( - // Object.assign( - // {}, - // { ...entry }, - // { - // installedDatetime: new Date(), - // installedBy: 'Admin', - // enabled: true, - // } - // ) - // ), - // }) - // .then(() => { - // setButtonLoading(false); - // modified(); - // }) - // .finally(() => setButtonLoading(false)); - // }; - - // const remove = () => { - // setButtonLoading(true); - // fetch(`http://localhost:3005/installed/${id}`, { - // method: 'DELETE', - // }) - // .then(() => { - // setButtonLoading(false); - // modified(); - // }) - // .finally(() => setButtonLoading(false)); - // }; - - // const toggleActive = () => { - // setSwitchState(true); - // fetch(`http://localhost:3005/installed/${id}`, { - // method: 'PUT', - // headers: { - // 'Content-type': 'application/json; charset=UTF-8', - // }, - // body: JSON.stringify( - // Object.assign( - // {}, - // { ...entry }, - // { - // enabled: !enabled, - // } - // ) - // ), - // }) - // .then(() => { - // modified(); - // setSwitchState(false); - // }) - // .finally(() => setSwitchState(false)); - // }; - return ( <> - {installed && ( + {/* {uninstalledOrgs.includes(currentOrg) && ( - )} + )} */} {title} @@ -163,22 +82,23 @@ function addOnEntry({ variant="primary" // disabled={buttonLoading || !configurable} disabled={buttonLoading} + data-testid="AddOnEntry_btn_install" onClick={(): void => { - updateOrgList(); - updateInstallStatusFunc(); + togglePluginInstall(); getInstalledPlugins(); - // installed ? remove() : install(); }} > {buttonLoading ? ( ) : ( )} {/* {installed ? 'Remove' : configurable ? 'Installed' : 'Install'} */} - {isInstalledLocal ? t('uninstall') : t('install')} + {uninstalledOrgs.includes(currentOrg) + ? t('install') + : t('uninstall')} diff --git a/src/components/AddOn/core/AddOnStore/AddOnStore.tsx b/src/components/AddOn/core/AddOnStore/AddOnStore.tsx index 1a6eaad34d..2e3e511149 100644 --- a/src/components/AddOn/core/AddOnStore/AddOnStore.tsx +++ b/src/components/AddOn/core/AddOnStore/AddOnStore.tsx @@ -240,7 +240,7 @@ function addOnStore(): JSX.Element { pluginName: string | undefined; pluginDesc: string | undefined; pluginCreatedBy: string; - pluginInstallStatus: boolean | undefined; + uninstalledOrgs: string[]; getInstalledPlugins: () => any; }, i: React.Key | null | undefined @@ -251,13 +251,14 @@ function addOnStore(): JSX.Element { title={plug.pluginName} description={plug.pluginDesc} createdBy={plug.pluginCreatedBy} - isInstalled={plug.pluginInstallStatus} - configurable={plug.pluginInstallStatus} + // isInstalled={plug.pluginInstallStatus} + // configurable={plug.pluginInstallStatus} component={'Special Component'} modified={(): void => { console.log('Plugin is modified'); }} getInstalledPlugins={getInstalledPlugins} + uninstalledOrgs={plug.uninstalledOrgs} /> ) ) @@ -319,7 +320,7 @@ function addOnStore(): JSX.Element { pluginName: string | undefined; pluginDesc: string | undefined; pluginCreatedBy: string; - pluginInstallStatus: boolean | undefined; + uninstalledOrgs: string[]; getInstalledPlugins: () => any; }, i: React.Key | null | undefined @@ -330,13 +331,14 @@ function addOnStore(): JSX.Element { title={plug.pluginName} description={plug.pluginDesc} createdBy={plug.pluginCreatedBy} - isInstalled={plug.pluginInstallStatus} - configurable={plug.pluginInstallStatus} + // isInstalled={plug.pluginInstallStatus} + // configurable={plug.pluginInstallStatus} component={'Special Component'} modified={(): void => { console.log('Plugin is modified'); }} getInstalledPlugins={getInstalledPlugins} + uninstalledOrgs={plug.uninstalledOrgs} /> ) ) @@ -356,53 +358,3 @@ addOnStore.defaultProps = {}; addOnStore.propTypes = {}; export default addOnStore; - -// {addonStore.map((plugin: any, index: number) => { -// return ( -// { -// /* istanbul ignore next */ -// pluginModified().then((installedPlugins) => { -// updateLinks( -// new PluginHelper().generateLinks(installedPlugins) -// ); -// }); -// }} -// /> -// ); -// })} - -// {installed -// .filter((plugin: any) => -// showEnabled ? plugin.enabled : !plugin.enabled -// ) -// .map((plugin: any, index: number) => { -// return ( -// { -// /* istanbul ignore next */ -// pluginModified().then((installedPlugins) => { -// updateLinks( -// new PluginHelper().generateLinks(installedPlugins) -// ); -// }); -// }} -// /> -// ); -// })} diff --git a/src/screens/OrgList/OrgList.module.css b/src/screens/OrgList/OrgList.module.css index b7ba2e1314..6e643bb80d 100644 --- a/src/screens/OrgList/OrgList.module.css +++ b/src/screens/OrgList/OrgList.module.css @@ -129,6 +129,34 @@ flex-direction: column; margin-left: 1rem; } +.titlemodaldialog { + color: #707070; + font-size: 20px; + margin-bottom: 20px; + padding-bottom: 5px; +} +form label { + font-weight: bold; + padding-bottom: 1px; + font-size: 14px; + color: #707070; +} + +form > input { + display: block; + margin-bottom: 20px; + border: 1px solid #e8e5e5; + box-shadow: 2px 1px #e8e5e5; + padding: 10px 20px; + border-radius: 5px; + background: none; + width: 100%; + transition: all 0.3s ease-in-out; + -webkit-transition: all 0.3s ease-in-out; + -moz-transition: all 0.3s ease-in-out; + -ms-transition: all 0.3s ease-in-out; + -o-transition: all 0.3s ease-in-out; +} .itemCard .loadingWrapper .innerContainer .content h5 { height: 24px; @@ -136,11 +164,62 @@ margin-bottom: 0.8rem; } +.cancel > i { + margin-top: 5px; + transform: scale(1.2); + cursor: pointer; + color: #707070; +} +.modalbody { + width: 50px; +} +.pluginStoreBtnContainer { + display: flex; + gap: 1rem; +} +.greenregbtn { + margin: 1rem 0 0; + margin-top: 10px; + border: 1px solid #e8e5e5; + box-shadow: 0 2px 2px #e8e5e5; + padding: 10px 10px; + border-radius: 5px; + background-color: #31bb6b; + width: 100%; + font-size: 16px; + color: white; + outline: none; + font-weight: 600; + cursor: pointer; + transition: transform 0.2s, box-shadow 0.2s; + width: 100%; +} + .itemCard .loadingWrapper .innerContainer .content h6[title='Location'] { display: block; width: 45%; height: 18px; } +.secondbtn { + display: flex; + align-items: center; + justify-content: center; + margin: 1rem 0 0; + margin-top: 10px; + border: 1px solid #d0cfcf; + box-shadow: 0 2px 2px #d0cfcf; + padding: 10px 10px; + border-radius: 5px; + background-color: white; + width: 100%; + font-size: 16px; + color: #31bb6b; + outline: none; + font-weight: 600; + cursor: pointer; + transition: transform 0.2s, box-shadow 0.2s; + width: 100%; +} .itemCard .loadingWrapper .innerContainer .content h6 { display: block; diff --git a/src/screens/OrgList/OrgList.tsx b/src/screens/OrgList/OrgList.tsx index 702f8b2d3c..a34a084a14 100644 --- a/src/screens/OrgList/OrgList.tsx +++ b/src/screens/OrgList/OrgList.tsx @@ -25,10 +25,27 @@ import type { } from 'utils/interfaces'; import styles from './OrgList.module.css'; import SuperAdminScreen from 'components/SuperAdminScreen/SuperAdminScreen'; +import { Link } from 'react-router-dom'; function orgList(): JSX.Element { const { t } = useTranslation('translation', { keyPrefix: 'orgList' }); + const [dialogModalisOpen, setdialogModalIsOpen] = useState(false); + /* eslint-disable @typescript-eslint/no-unused-vars */ + const [modalisOpen, setmodalIsOpen] = useState(false); + const [dialogRedirectOrgId, setDialogRedirectOrgId] = useState(''); + /* eslint-disable @typescript-eslint/explicit-function-return-type */ + function openDialogModal(redirectOrgId: string) { + setDialogRedirectOrgId(redirectOrgId); + // console.log(redirectOrgId, dialogRedirectOrgId); + setdialogModalIsOpen(true); + } + /* eslint-disable @typescript-eslint/explicit-function-return-type */ + function closeDialogModal() { + setdialogModalIsOpen(false); + } + const toggleDialogModal = (): void => + setdialogModalIsOpen(!dialogModalisOpen); document.title = t('title'); const [searchByName, setSearchByName] = useState(''); @@ -136,6 +153,7 @@ function orgList(): JSX.Element { if (data) { toast.success('Congratulation the Organization is created'); refetchOrgs(); + openDialogModal(data.createOrganization._id); setFormState({ name: '', descrip: '', @@ -437,7 +455,54 @@ function orgList(): JSX.Element { + {' '} + + +
+
+
+

{t('manageFeatures')}

+ + + +
+

+ {t('manageFeaturesInfo')} +

+ +
+ + {t('goToStore')} + + {/* */} + +
+
+
+
+ {/* Plugin Notification after Org is Created */}
); From b1f513fc7108a4686bb59620cfacc6618c2087ae Mon Sep 17 00:00:00 2001 From: Rishav Jha <76212518+rishav-jha-mech@users.noreply.github.com> Date: Sat, 9 Sep 2023 20:16:47 +0530 Subject: [PATCH 9/9] Merge latest AdminUI Redesign into develop (#972) * Initial Organizations screen done * Removed yellow scrollbar * Linting fixed * Replaced images with svgs for logos * Styling done for btnsContainer * Better typechecking and readability * Animated Drawer working * Responsive page ready * OrgCard responsive * Fixed navbar issue and added webkit keyframes * LeftDrawer ready * Translations added * Added shimmer loading effect * Styling issue fixed * Failing tests fixed for OrgList * Removed unused vars * Tests done for LeftDrawer * Succesfully made component without causing any breaking change * 100% Code coverage achieved for Requests Screen * Fix alignment * Roles screen UI done * Role screen fixed with 100% test coverage * Changing screen activeness fixed * Unused vars and Typos fixed * Language support added * Linting and typos fixed * Fixed failing tests for LeftDrawer * Completed tests of AdminDashListCard with 100% code coverage * OrgListCard done * Finalised tests * Requests user search made functional again ! * Fixed loading on refetch and UX on all screens * OrgList failing errors fixed * Fixed all failing tests * Achieved 100% code coverage for OrgList.tsx * Wrote tests and mod LeftDrawer for admins * Minor ui issue fixed * Fixed failing test * UI bug dropdown * Frontend insync with Backend attempt 1 * Introspection fail fix 1 * Introspection error fix 3 * Introspection error fix another attempt * Another attempt * Fixed Default Animation on Organizations Screen * Fixed typo * Loading data from localstorage functional * Fixed name conventions * Fixed typo * UI Fix * Changed screen name * Table Loader added * Added LeftOrg drawer and Organization screen comp to Screens * routesReducer tests fixed * Redundant adminNavbar removed from project * MemberDetail issue fixed * Achieved 100% code coverage for LeftDrawerOrg, Added Empty div in images * Fixed failing tests * Fix tests * Fixed warnings * Linting fixes * Linting issues fixed * Achieved 100% code coverage for CollapsibleDropdown * Achieved 100% CC on IconComponent and removed useless imports * Achieved 100% cc for LeftDrawer Component * Achieved 100% CC on SuperAdminScreen Component * Fixed typo * Integrated Event Dashboard * Failing tests for LeftDrawer LeftDrawerOrg OrgList screen fixed * Removed redundant code * Removed useless imports * Linting fixed * Removed LeftDrawerOrg * Dashboard screen ui almost ready * Org Dash ready * Block/Unblock screen ready * Organization settings page ready * Lang changes * Page refresh on updating org removed * OrgUpdate tests done * OrgUpdate 100% test coverage achieved * OrgSettings Tests done * Organization Dashboard Cards done * Organization Dashboard achieved 100% CC * 100% CC achieved for BlockUser screen * Finalised changes * Small change * Tests fixed * Separate OrgSettings component made * Linting fixed * Formatting fixed --- public/locales/en.json | 35 +- public/locales/fr.json | 31 +- public/locales/hi.json | 30 +- public/locales/sp.json | 30 +- public/locales/zh.json | 30 +- src/GraphQl/Queries/Queries.ts | 2 + src/assets/svgs/admin.svg | 5 + src/assets/svgs/{icons => }/angleRight.svg | 0 src/assets/svgs/{icons => }/blockUser.svg | 0 src/assets/svgs/blockedUser.svg | 3 + src/assets/svgs/{icons => }/dashboard.svg | 0 src/assets/svgs/event.svg | 3 + src/assets/svgs/{icons => }/events.svg | 0 src/assets/svgs/{icons => }/logout.svg | 0 src/assets/svgs/{icons => }/organizations.svg | 0 src/assets/svgs/{icons => }/people.svg | 0 src/assets/svgs/{icons => }/plugins.svg | 0 src/assets/svgs/post.svg | 3 + src/assets/svgs/{icons => }/posts.svg | 0 src/assets/svgs/{icons => }/requests.svg | 0 src/assets/svgs/{icons => }/roles.svg | 0 src/assets/svgs/{icons => }/settings.svg | 0 src/assets/svgs/{icons => }/tags.svg | 0 src/assets/svgs/users.svg | 3 + .../ChangeLanguageDropDown.tsx | 7 +- .../ChangeLanguageDropdown.module.css | 7 - src/components/DeleteOrg/DeleteOrg.module.css | 25 + src/components/DeleteOrg/DeleteOrg.test.tsx | 84 +++ src/components/DeleteOrg/DeleteOrg.tsx | 89 ++++ .../IconComponent/IconComponent.tsx | 16 +- src/components/LeftDrawer/LeftDrawer.tsx | 12 +- .../LeftDrawerOrg/LeftDrawerOrg.test.tsx | 10 +- .../LeftDrawerOrg/LeftDrawerOrg.tsx | 48 +- src/components/Loader/Loader.module.css | 14 +- src/components/Loader/Loader.tsx | 22 +- src/components/OrgUpdate/OrgUpdate.module.css | 113 +--- src/components/OrgUpdate/OrgUpdate.test.tsx | 278 +++++----- src/components/OrgUpdate/OrgUpdate.tsx | 274 +++++----- src/components/OrgUpdate/OrgUpdateMocks.ts | 157 ++++++ .../OrganizationDashCards/CardItem.module.css | 47 ++ .../OrganizationDashCards/CardItem.test.tsx | 42 ++ .../OrganizationDashCards/CardItem.tsx | 48 ++ .../OrganizationDashCards/CardItemLoading.tsx | 24 + .../DashboardCard.test.tsx | 18 + .../OrganizationDashCards/DashboardCard.tsx | 32 ++ .../DashboardCardLoading.tsx | 36 ++ .../Dashboardcard.module.css | 60 +++ src/screens/BlockUser/BlockUser.module.css | 196 ++----- src/screens/BlockUser/BlockUser.test.tsx | 208 +++++--- src/screens/BlockUser/BlockUser.tsx | 370 ++++++------- .../ForgotPassword/ForgotPassword.module.css | 17 - src/screens/ForgotPassword/ForgotPassword.tsx | 3 +- .../OrgSettings/OrgSettings.module.css | 189 +------ src/screens/OrgSettings/OrgSettings.test.tsx | 234 +++----- src/screens/OrgSettings/OrgSettings.tsx | 196 +------ .../OrganizationDashboard.module.css | 201 +------ .../OrganizationDashboard.test.tsx | 241 ++++----- .../OrganizationDashboard.tsx | 502 ++++++++---------- .../OrganizationDashboardMocks.ts | 323 ++++------- src/utils/interfaces.ts | 40 ++ 60 files changed, 2116 insertions(+), 2242 deletions(-) create mode 100644 src/assets/svgs/admin.svg rename src/assets/svgs/{icons => }/angleRight.svg (100%) rename src/assets/svgs/{icons => }/blockUser.svg (100%) create mode 100644 src/assets/svgs/blockedUser.svg rename src/assets/svgs/{icons => }/dashboard.svg (100%) create mode 100644 src/assets/svgs/event.svg rename src/assets/svgs/{icons => }/events.svg (100%) rename src/assets/svgs/{icons => }/logout.svg (100%) rename src/assets/svgs/{icons => }/organizations.svg (100%) rename src/assets/svgs/{icons => }/people.svg (100%) rename src/assets/svgs/{icons => }/plugins.svg (100%) create mode 100644 src/assets/svgs/post.svg rename src/assets/svgs/{icons => }/posts.svg (100%) rename src/assets/svgs/{icons => }/requests.svg (100%) rename src/assets/svgs/{icons => }/roles.svg (100%) rename src/assets/svgs/{icons => }/settings.svg (100%) rename src/assets/svgs/{icons => }/tags.svg (100%) create mode 100644 src/assets/svgs/users.svg delete mode 100644 src/components/ChangeLanguageDropdown/ChangeLanguageDropdown.module.css create mode 100644 src/components/DeleteOrg/DeleteOrg.module.css create mode 100644 src/components/DeleteOrg/DeleteOrg.test.tsx create mode 100644 src/components/DeleteOrg/DeleteOrg.tsx create mode 100644 src/components/OrgUpdate/OrgUpdateMocks.ts create mode 100644 src/components/OrganizationDashCards/CardItem.module.css create mode 100644 src/components/OrganizationDashCards/CardItem.test.tsx create mode 100644 src/components/OrganizationDashCards/CardItem.tsx create mode 100644 src/components/OrganizationDashCards/CardItemLoading.tsx create mode 100644 src/components/OrganizationDashCards/DashboardCard.test.tsx create mode 100644 src/components/OrganizationDashCards/DashboardCard.tsx create mode 100644 src/components/OrganizationDashCards/DashboardCardLoading.tsx create mode 100644 src/components/OrganizationDashCards/Dashboardcard.module.css diff --git a/public/locales/en.json b/public/locales/en.json index 80a75b08db..6dd9156052 100644 --- a/public/locales/en.json +++ b/public/locales/en.json @@ -152,11 +152,7 @@ "posts": "Posts", "events": "Events", "blockedUsers": "Blocked Users", - "membershipRequests": "Membership Requests", - "deleteOrganization": "Delete Organization", - "deleteMsg": "Do you want to delete this organization?", - "no": "No", - "yes": "Yes", + "requests": "Requests", "talawaApiUnavailable": "Talawa-API service is unavailable. Is it running? Check your network connectivity too." }, "organizationPeople": { @@ -304,6 +300,7 @@ }, "blockUnblockUser": { "title": "Talawa Block/Unblock User", + "pageName": "Block/Unblock", "searchByName": "Search By Name", "listOfUsers": "List of Users who spammed", "name": "Name", @@ -317,8 +314,10 @@ "talawaApiUnavailable": "Talawa-API service is unavailable. Is it running? Check your network connectivity too.", "allMembers": "All Members", "blockedUsers": "Blocked Users", - "searchFirstName": "Enter First Name", - "searchLastName": "Enter Last Name" + "searchByFirstName": "Search By First Name", + "searchByLastName": "Search By Last Name", + "noResultsFoundFor": "No results found for", + "noSpammerFound": "No spammer found" }, "forgotPassword": { "title": "Talawa Forgot Password", @@ -367,13 +366,20 @@ }, "orgSettings": { "title": "Talawa Setting", - "updateYourDetails": "Update Your Details", - "updateYourPassword": "Update Your Password", + "pageName": "Settings", "updateOrganization": "Update Organization", - "deleteOrganization": "Delete Organization", "seeRequest": "See Request", "settings": "Settings", - "noData": "No data" + "noData": "No data", + "otherSettings": "Other Settings", + "changeLanguage": "Change Language" + }, + "deleteOrg": { + "deleteOrganization": "Delete Organization", + "deleteMsg": "Do you want to delete this organization?", + "no": "No", + "yes": "Yes", + "longDelOrgMsg": "By clicking on Delete organization button you will the organization will be permanently deleted along with its events, tags and all related data." }, "userUpdate": { "firstName": "First Name", @@ -388,7 +394,6 @@ "saveChanges": "Save Changes", "cancel": "Cancel" }, - "userPasswordUpdate": { "previousPassword": "Previous Password", "newPassword": "New Password", @@ -396,7 +401,6 @@ "saveChanges": "Save Changes", "cancel": "Cancel" }, - "orgDelete": { "deleteOrg": "Delete Org" }, @@ -412,10 +416,9 @@ "description": "Description", "location": "Location", "displayImage": "Display Image", - "isPublic": "Is Public", - "isRegistrable": "Is Registrable", + "isPublic": "Public", + "isVisibleInSearch": "Visible in Search", "saveChanges": "Save Changes", - "cancel": "Cancel", "enterNameOrganization": "Enter Organization Name", "successfulUpdated": "Organization updated successfully", "talawaApiUnavailable": "Talawa-API service is unavailable. Is it running? Check your network connectivity too." diff --git a/public/locales/fr.json b/public/locales/fr.json index 6d501840ac..78d3fade9b 100644 --- a/public/locales/fr.json +++ b/public/locales/fr.json @@ -145,11 +145,7 @@ "posts": "Des postes", "events": "Événements", "blockedUsers": "Utilisateurs bloqués", - "membershipRequests": "Demandes d'adhésion", - "deleteOrganization": "Supprimer l'organisation", - "deleteMsg": "Voulez-vous supprimer cette organisation ?", - "no": "Non", - "yes": "Oui", + "requests": "Demandes", "talawaApiUnavailable": "Le service Talawa-API n'est pas disponible. Est-il en cours d'exécution ? Vérifiez également votre connectivité réseau." }, "organizationPeople": { @@ -297,6 +293,7 @@ }, "blockUnblockUser": { "title": "Talawa Bloquer/Débloquer l'utilisateur", + "pageName": "Bloquer/Débloquer'", "searchByName": "Recherche par nom", "listOfUsers": "Liste des utilisateurs qui ont spammé", "name": "Nom", @@ -310,8 +307,10 @@ "talawaApiUnavailable": "Le service Talawa-API n'est pas disponible. Est-il en cours d'exécution ? Vérifiez également votre connectivité réseau.", "allMembers": "Tous les membres", "blockedUsers": "Utilisateurs bloqués", - "searchFirstName": "Entrez votre prénom", - "searchLastName": "Entrer le nom de famille" + "searchByFirstName": "Rechercher par prénom", + "searchByLastName": "Rechercher par nom de famille", + "noResultsFoundFor": "Aucun résultat trouvé pour ", + "noSpammerFound": "Aucun spammeur trouvé" }, "forgotPassword": { "title": "Mot de passe oublié Talawa", @@ -360,13 +359,22 @@ }, "orgSettings": { "title": "Paramètre Talawa", + "pageName": "Paramètres", "updateYourDetails": "Mettre à jour vos informations", "updateYourPassword": "Mettez à jour votre mot de passe", "updateOrganization": "Mettre à jour l'organisation", - "deleteOrganization": "Supprimer l'organisation", "seeRequest": "Voir demande", "settings": "Réglages", - "noData": "Pas de données" + "noData": "Pas de données", + "otherSettings": "Autres paramètres", + "changeLanguage": "Changer la langue" + }, + "deleteOrg": { + "deleteOrganization": "Supprimer l'organisation", + "deleteMsg": "Voulez-vous supprimer cette organisation ?", + "no": "Non", + "yes": "Oui", + "longDelOrgMsg": "En cliquant sur le bouton Supprimer l'organisation, l'organisation sera définitivement supprimée, ainsi que ses événements, étiquettes et toutes les données associées." }, "userUpdate": { "firstName": "Prénom", @@ -403,10 +411,9 @@ "description": "La description", "location": "emplacement", "displayImage": "Afficher l'image", - "isPublic": "Est publique", - "isRegistrable": "Est enregistrable", + "isPublic": "Public", + "isVisibleInSearch": "Visible dans la recherche", "saveChanges": "Sauvegarder les modifications", - "cancel": "Annuler", "enterNameOrganization": "Entrez le nom de l'organisation", "successfulUpdated": "Mise à jour réussie", "talawaApiUnavailable": "Le service Talawa-API n'est pas disponible. Est-il en cours d'exécution ? Vérifiez également votre connectivité réseau." diff --git a/public/locales/hi.json b/public/locales/hi.json index d376cb1107..29b449a0c9 100644 --- a/public/locales/hi.json +++ b/public/locales/hi.json @@ -145,11 +145,7 @@ "posts": "पोस्ट", "events": "आयोजन", "blockedUsers": "रोके गए उपयोगकर्ता", - "membershipRequests": "सदस्यता अनुरोध", - "deleteOrganization": "संगठन हटाएं", - "deleteMsg": "क्या आप इस संगठन को हटाना चाहते हैं?", - "no": "नहीं", - "yes": "हाँ", + "requests": "अनुरोध", "talawaApiUnavailable": "तलवा-एपीआई सेवा उपलब्ध नहीं है। क्या यह चल रहा है? अपनी नेटवर्क कनेक्टिविटी भी जांचें।" }, "organizationPeople": { @@ -297,6 +293,7 @@ }, "blockUnblockUser": { "title": "तलावा ब्लॉक/अनब्लॉक यूजर", + "pageName": "ब्लॉक/अनब्लॉक", "searchByName": "नाम से खोजें", "listOfUsers": "स्पैम करने वाले उपयोगकर्ताओं की सूची", "name": "नाम", @@ -310,8 +307,10 @@ "talawaApiUnavailable": "तलवा-एपीआई सेवा उपलब्ध नहीं है। क्या यह चल रहा है? अपनी नेटवर्क कनेक्टिविटी भी जांचें।", "allMembers": "सभी सदस्य", "blockedUsers": "रोके गए उपयोगकर्ता", - "searchFirstName": "प्रथम नाम दर्ज करें", - "searchLastName": "अंतिम नाम दर्ज करो" + "searchByFirstName": "पहले नाम से खोजें", + "searchByLastName": "उपनाम से खोजें", + "noResultsFoundFor": "के लिए कोई परिणाम नहीं मिला ", + "noSpammerFound": "कोई स्पैमर नहीं मिला" }, "forgotPassword": { "title": "तलवा पासवर्ड भूल गए", @@ -360,13 +359,22 @@ }, "orgSettings": { "title": "तलावा सेटिंग", + "pageName": "सेटिंग्स", "updateYourDetails": "अपना विवरण अपडेट करें", "updateYourPassword": "अपना पासवर्ड अपडेट करें", "updateOrganization": "अद्यतन संगठन", - "deleteOrganization": "संगठन हटाएं", "seeRequest": "अनुरोध देखें", "settings": "समायोजन", - "noData": "कोई डेटा नहीं" + "noData": "कोई डेटा नहीं", + "otherSettings": "अन्य सेटिंग्स", + "changeLanguage": "भाषा बदलें" + }, + "deleteOrg": { + "deleteOrganization": "संगठन हटाएं", + "deleteMsg": "क्या आप इस संगठन को हटाना चाहते हैं?", + "no": "नहीं", + "yes": "हां", + "longDelOrgMsg": "संगठन हटाने के बटन पर क्लिक करके, संगठन को स्थायित रूप से हटा दिया जाएगा, साथ ही उसके आयोजन, टैग और सभी संबंधित डेटा भी हटा दिया जाएगा।" }, "userUpdate": { "firstName": "पहला नाम", @@ -403,8 +411,8 @@ "description": "विवरण", "location": "जगह", "displayImage": "प्रदर्शन छवि", - "isPublic": "सार्वजनिक है", - "isRegistrable": "पंजीकरण योग्य है", + "isPublic": "सार्वजनिक", + "isVisibleInSearch": "खोज में दिखाए जा सकते हैं", "saveChanges": "परिवर्तनों को सुरक्षित करें", "cancel": "रद्द करना", "enterNameOrganization": "संगठन का नाम दर्ज करें", diff --git a/public/locales/sp.json b/public/locales/sp.json index af9a7f5686..7fa6ccd04b 100644 --- a/public/locales/sp.json +++ b/public/locales/sp.json @@ -145,11 +145,7 @@ "posts": "Publicaciones", "events": "Eventos", "blockedUsers": "Usuarios bloqueados", - "membershipRequests": "Solicitudes de membresía", - "deleteOrganization": "Eliminar Organización", - "deleteMsg": "¿Desea eliminar esta organización?", - "no": "No", - "yes": "Sí", + "requests": "Solicitudes", "talawaApiUnavailable": "El servicio Talawa-API no está disponible. ¿Está funcionando? Compruebe también la conectividad de su red." }, "organizationPeople": { @@ -297,6 +293,7 @@ }, "blockUnblockUser": { "title": "Usuario de bloqueo/desbloqueo de Talawa", + "pageName": "Bloqueo/desbloqueo", "searchByName": "Buscar por nombre", "listOfUsers": "Lista de Usuarios que enviaron spam", "name": "Nombre", @@ -310,8 +307,10 @@ "talawaApiUnavailable": "El servicio Talawa-API no está disponible. ¿Está funcionando? Compruebe también la conectividad de su red.", "allMembers": "Todos los miembros", "blockedUsers": "Usuarios bloqueados", - "searchFirstName": "Ingrese el nombre", - "searchLastName": "Introduzca el apellido" + "searchByFirstName": "Buscar por nombre de pila", + "searchByLastName": "Buscar por apellido", + "noResultsFoundFor": "No se encontraron resultados para ", + "noSpammerFound": "No se encontró ningún spammer" }, "forgotPassword": { "title": "Talawa olvidó su contraseña", @@ -360,13 +359,22 @@ }, "orgSettings": { "title": "Configuración Talawa", + "pageName": "Configuración", "updateYourDetails": "Actualiza tus datos", "updateYourPassword": "Actualice su contraseña", "updateOrganization": "Actualizar Organización", - "deleteOrganization": "Eliminar Organización", "seeRequest": "Ver Solicitud", "settings": "Ajustes", - "noData": "Sin datos" + "noData": "Sin datos", + "otherSettings": "Otras Configuraciones", + "changeLanguage": "Cambiar Idioma" + }, + "deleteOrg": { + "deleteOrganization": "Eliminar organización", + "deleteMsg": "¿Desea eliminar esta organización?", + "no": "No", + "yes": "Sí", + "longDelOrgMsg": "Al hacer clic en el botón de Eliminar organización, se eliminará permanentemente la organización junto con sus eventos, etiquetas y todos los datos relacionados." }, "userUpdate": { "firstName": "Primer nombre", @@ -403,8 +411,8 @@ "description": "Descripción", "location": "ubicación", "displayImage": "Mostrar imagen", - "isPublic": "Es público", - "isRegistrable": "Es registrable", + "isPublic": "Público", + "isVisibleInSearch": "Visible en la búsqueda", "saveChanges": "Guardar cambios", "cancel": "Cancelar", "enterNameOrganization": "Ingrese el nombre de la organización", diff --git a/public/locales/zh.json b/public/locales/zh.json index e91c57c531..a4232d43cf 100644 --- a/public/locales/zh.json +++ b/public/locales/zh.json @@ -145,11 +145,7 @@ "posts": "帖子", "events": "事件", "blockedUsers": "被阻止的用戶", - "membershipRequests": "會員申請", - "deleteOrganization": "刪除組織", - "deleteMsg": "您要刪除此組織嗎?", - "no": "不", - "yes": "是的", + "requests": "请求", "talawaApiUnavailable": "服務不可用。它在運行嗎?還要檢查您的網絡連接。" }, "organizationPeople": { @@ -297,6 +293,7 @@ }, "blockUnblockUser": { "title": "塔拉瓦封鎖/解除封鎖用戶", + "pageName": "封锁/解封", "searchByName": "按名稱搜索", "listOfUsers": "發送垃圾郵件的用戶列表", "name": "姓名", @@ -310,8 +307,10 @@ "talawaApiUnavailable": "服務不可用。它在運行嗎?還要檢查您的網絡連接。", "allMembers": "所有成员", "blockedUsers": "被阻止的用户", - "searchFirstName": "输入名字", - "searchLastName": "输入姓氏" + "searchByFirstName": "按名字搜索", + "searchByLastName": "按姓氏搜索", + "noResultsFoundFor": "未找到结果 ", + "noSpammerFound": "未发现垃圾邮件发送者" }, "forgotPassword": { "title": "塔拉瓦忘記密碼", @@ -360,13 +359,22 @@ }, "orgSettings": { "title": "塔拉瓦設置", + "pageName": "设置", "updateYourDetails": "更新您的詳細信息", "updateYourPassword": "更新您的密碼", "updateOrganization": "更新組織", - "deleteOrganization": "刪除組織", "seeRequest": "查看請求", "settings": "設置", - "noData": "沒有數據" + "noData": "沒有數據", + "otherSettings": "其他设置", + "changeLanguage": "更改语言" + }, + "deleteOrg": { + "deleteOrganization": "删除组织", + "deleteMsg": "您是否要删除此组织?", + "no": "否", + "yes": "是", + "longDelOrgMsg": "点击删除组织按钮后,将永久删除该组织以及其活动、标签和所有相关数据。" }, "userUpdate": { "firstName": "名", @@ -403,8 +411,8 @@ "description": "描述", "location": "地點", "displayImage": "顯示圖像", - "isPublic": "是公開的", - "isRegistrable": "可註冊", + "isPublic": "公开", + "isVisibleInSearch": "在搜索中可见", "saveChanges": "保存更改", "cancel": "取消", "enterNameOrganization": "輸入組織名稱", diff --git a/src/GraphQl/Queries/Queries.ts b/src/GraphQl/Queries/Queries.ts index 1f47769e4c..6efae00ed5 100644 --- a/src/GraphQl/Queries/Queries.ts +++ b/src/GraphQl/Queries/Queries.ts @@ -183,6 +183,8 @@ export const ORGANIZATIONS_LIST = gql` name description location + isPublic + visibleInSearch members { _id firstName diff --git a/src/assets/svgs/admin.svg b/src/assets/svgs/admin.svg new file mode 100644 index 0000000000..8ee42f611d --- /dev/null +++ b/src/assets/svgs/admin.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/svgs/icons/angleRight.svg b/src/assets/svgs/angleRight.svg similarity index 100% rename from src/assets/svgs/icons/angleRight.svg rename to src/assets/svgs/angleRight.svg diff --git a/src/assets/svgs/icons/blockUser.svg b/src/assets/svgs/blockUser.svg similarity index 100% rename from src/assets/svgs/icons/blockUser.svg rename to src/assets/svgs/blockUser.svg diff --git a/src/assets/svgs/blockedUser.svg b/src/assets/svgs/blockedUser.svg new file mode 100644 index 0000000000..bbe0a51f84 --- /dev/null +++ b/src/assets/svgs/blockedUser.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/svgs/icons/dashboard.svg b/src/assets/svgs/dashboard.svg similarity index 100% rename from src/assets/svgs/icons/dashboard.svg rename to src/assets/svgs/dashboard.svg diff --git a/src/assets/svgs/event.svg b/src/assets/svgs/event.svg new file mode 100644 index 0000000000..3c73e7b04e --- /dev/null +++ b/src/assets/svgs/event.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/svgs/icons/events.svg b/src/assets/svgs/events.svg similarity index 100% rename from src/assets/svgs/icons/events.svg rename to src/assets/svgs/events.svg diff --git a/src/assets/svgs/icons/logout.svg b/src/assets/svgs/logout.svg similarity index 100% rename from src/assets/svgs/icons/logout.svg rename to src/assets/svgs/logout.svg diff --git a/src/assets/svgs/icons/organizations.svg b/src/assets/svgs/organizations.svg similarity index 100% rename from src/assets/svgs/icons/organizations.svg rename to src/assets/svgs/organizations.svg diff --git a/src/assets/svgs/icons/people.svg b/src/assets/svgs/people.svg similarity index 100% rename from src/assets/svgs/icons/people.svg rename to src/assets/svgs/people.svg diff --git a/src/assets/svgs/icons/plugins.svg b/src/assets/svgs/plugins.svg similarity index 100% rename from src/assets/svgs/icons/plugins.svg rename to src/assets/svgs/plugins.svg diff --git a/src/assets/svgs/post.svg b/src/assets/svgs/post.svg new file mode 100644 index 0000000000..34e468523b --- /dev/null +++ b/src/assets/svgs/post.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/svgs/icons/posts.svg b/src/assets/svgs/posts.svg similarity index 100% rename from src/assets/svgs/icons/posts.svg rename to src/assets/svgs/posts.svg diff --git a/src/assets/svgs/icons/requests.svg b/src/assets/svgs/requests.svg similarity index 100% rename from src/assets/svgs/icons/requests.svg rename to src/assets/svgs/requests.svg diff --git a/src/assets/svgs/icons/roles.svg b/src/assets/svgs/roles.svg similarity index 100% rename from src/assets/svgs/icons/roles.svg rename to src/assets/svgs/roles.svg diff --git a/src/assets/svgs/icons/settings.svg b/src/assets/svgs/settings.svg similarity index 100% rename from src/assets/svgs/icons/settings.svg rename to src/assets/svgs/settings.svg diff --git a/src/assets/svgs/icons/tags.svg b/src/assets/svgs/tags.svg similarity index 100% rename from src/assets/svgs/icons/tags.svg rename to src/assets/svgs/tags.svg diff --git a/src/assets/svgs/users.svg b/src/assets/svgs/users.svg new file mode 100644 index 0000000000..a1a474206d --- /dev/null +++ b/src/assets/svgs/users.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/ChangeLanguageDropdown/ChangeLanguageDropDown.tsx b/src/components/ChangeLanguageDropdown/ChangeLanguageDropDown.tsx index d80b8cb225..8f4fd945ed 100644 --- a/src/components/ChangeLanguageDropdown/ChangeLanguageDropDown.tsx +++ b/src/components/ChangeLanguageDropdown/ChangeLanguageDropDown.tsx @@ -1,7 +1,6 @@ import React from 'react'; import { Dropdown } from 'react-bootstrap'; import i18next from 'i18next'; -import styles from './ChangeLanguageDropdown.module.css'; import { languages } from 'utils/languages'; import cookies from 'js-cookie'; @@ -23,9 +22,7 @@ const ChangeLanguageDropDown = ( return ( ( => changeLanguage(language.code)} disabled={currentLanguageCode === language.code} data-testid={`change-language-btn-${language.code}`} diff --git a/src/components/ChangeLanguageDropdown/ChangeLanguageDropdown.module.css b/src/components/ChangeLanguageDropdown/ChangeLanguageDropdown.module.css deleted file mode 100644 index e72c604905..0000000000 --- a/src/components/ChangeLanguageDropdown/ChangeLanguageDropdown.module.css +++ /dev/null @@ -1,7 +0,0 @@ -.parentContainer { - margin: 0 1rem; -} - -.dropdownItem { - font-size: 0.9rem; -} diff --git a/src/components/DeleteOrg/DeleteOrg.module.css b/src/components/DeleteOrg/DeleteOrg.module.css new file mode 100644 index 0000000000..2b15a2ac0c --- /dev/null +++ b/src/components/DeleteOrg/DeleteOrg.module.css @@ -0,0 +1,25 @@ +.settingsBody { + margin: 2.5rem 0; +} + +.cardHeader { + padding: 1.25rem 1rem 1rem 1rem; + border-bottom: 1px solid var(--bs-gray-200); + display: flex; + justify-content: space-between; + align-items: center; +} + +.cardHeader .cardTitle { + font-size: 1.2rem; + font-weight: 600; +} + +.cardBody { + min-height: 180px; +} + +.cardBody .textBox { + margin: 0 0 3rem 0; + color: var(--bs-secondary); +} diff --git a/src/components/DeleteOrg/DeleteOrg.test.tsx b/src/components/DeleteOrg/DeleteOrg.test.tsx new file mode 100644 index 0000000000..936cf44e03 --- /dev/null +++ b/src/components/DeleteOrg/DeleteOrg.test.tsx @@ -0,0 +1,84 @@ +import React from 'react'; +import { MockedProvider } from '@apollo/react-testing'; +import { render, screen } from '@testing-library/react'; +import 'jest-location-mock'; +import { I18nextProvider } from 'react-i18next'; +import { Provider } from 'react-redux'; +import { BrowserRouter } from 'react-router-dom'; + +import { DELETE_ORGANIZATION_MUTATION } from 'GraphQl/Mutations/mutations'; +import { act } from 'react-dom/test-utils'; +import { store } from 'state/store'; +import { StaticMockLink } from 'utils/StaticMockLink'; +import i18nForTest from 'utils/i18nForTest'; +import DeleteOrg from './DeleteOrg'; + +const MOCKS = [ + { + request: { + query: DELETE_ORGANIZATION_MUTATION, + variables: { + id: 123, + }, + }, + result: { + data: { + removeOrganization: [ + { + _id: 123, + }, + ], + }, + }, + }, +]; + +const link = new StaticMockLink(MOCKS, true); + +afterEach(() => { + localStorage.clear(); +}); + +describe('Delete Organization Component', () => { + test('should be able to Toggle Delete Organization Modal', async () => { + window.location.assign('/orgsetting/id=123'); + localStorage.setItem('UserType', 'SUPERADMIN'); + render( + + + + + + + + + + ); + screen.getByTestId(/openDeleteModalBtn/i).click(); + expect(screen.getByTestId(/orgDeleteModal/i)).toBeInTheDocument(); + screen.getByTestId(/closeDelOrgModalBtn/i).click(); + await act(async () => { + expect(screen.queryByTestId(/orgDeleteModal/i)).not.toHaveFocus(); + }); + expect(window.location).toBeAt('/orgsetting/id=123'); + }); + + test('Delete organization functionality should work properly', async () => { + window.location.assign('/orgsetting/id=123'); + localStorage.setItem('UserType', 'SUPERADMIN'); + render( + + + + + + + + + + ); + screen.getByTestId(/openDeleteModalBtn/i).click(); + screen.getByTestId(/deleteOrganizationBtn/i).click(); + expect(window.location).not.toBeNull(); + }); +}); diff --git a/src/components/DeleteOrg/DeleteOrg.tsx b/src/components/DeleteOrg/DeleteOrg.tsx new file mode 100644 index 0000000000..e6442d6558 --- /dev/null +++ b/src/components/DeleteOrg/DeleteOrg.tsx @@ -0,0 +1,89 @@ +import { useMutation } from '@apollo/client'; +import { DELETE_ORGANIZATION_MUTATION } from 'GraphQl/Mutations/mutations'; +import React, { useState } from 'react'; +import { Button, Card, Modal } from 'react-bootstrap'; +import { useTranslation } from 'react-i18next'; +import { errorHandler } from 'utils/errorHandler'; +import styles from './DeleteOrg.module.css'; + +function deleteOrg(): JSX.Element { + const { t } = useTranslation('translation', { + keyPrefix: 'deleteOrg', + }); + const [showDeleteModal, setShowDeleteModal] = useState(false); + const currentUrl = window.location.href.split('=')[1]; + const canDelete = localStorage.getItem('UserType') === 'SUPERADMIN'; + const toggleDeleteModal = (): void => setShowDeleteModal(!showDeleteModal); + const [del] = useMutation(DELETE_ORGANIZATION_MUTATION); + + const deleteOrg = async (): Promise => { + try { + const { data } = await del({ + variables: { + id: currentUrl, + }, + }); + /* istanbul ignore next */ + if (data) { + window.location.replace('/orglist'); + } + } catch (error: any) { + /* istanbul ignore next */ + errorHandler(t, error); + } + }; + + return ( + <> + {canDelete && ( + +
+
{t('deleteOrganization')}
+
+ +
{t('longDelOrgMsg')}
+ +
+
+ )} + {/* Delete Organization Modal */} + {canDelete && ( + + +
{t('deleteOrganization')}
+
+ {t('deleteMsg')} + + + + +
+ )} + + ); +} + +export default deleteOrg; diff --git a/src/components/IconComponent/IconComponent.tsx b/src/components/IconComponent/IconComponent.tsx index 5bbbf44334..a4648a6e03 100644 --- a/src/components/IconComponent/IconComponent.tsx +++ b/src/components/IconComponent/IconComponent.tsx @@ -1,13 +1,13 @@ import React from 'react'; import { QuestionMarkOutlined } from '@mui/icons-material'; -import { ReactComponent as BlockUserIcon } from '../../assets/svgs/icons/blockUser.svg'; -import { ReactComponent as DashboardIcon } from '../../assets/svgs/icons/dashboard.svg'; -import { ReactComponent as EventsIcon } from '../../assets/svgs/icons/events.svg'; -import { ReactComponent as OrganizationsIcon } from '../../assets/svgs/icons/organizations.svg'; -import { ReactComponent as PeopleIcon } from '../../assets/svgs/icons/people.svg'; -import { ReactComponent as PluginsIcon } from '../../assets/svgs/icons/plugins.svg'; -import { ReactComponent as PostsIcon } from '../../assets/svgs/icons/posts.svg'; -import { ReactComponent as SettingsIcon } from '../../assets/svgs/icons/settings.svg'; +import { ReactComponent as BlockUserIcon } from 'assets/svgs/blockUser.svg'; +import { ReactComponent as DashboardIcon } from 'assets/svgs/dashboard.svg'; +import { ReactComponent as EventsIcon } from 'assets/svgs/events.svg'; +import { ReactComponent as OrganizationsIcon } from 'assets/svgs/organizations.svg'; +import { ReactComponent as PeopleIcon } from 'assets/svgs/people.svg'; +import { ReactComponent as PluginsIcon } from 'assets/svgs/plugins.svg'; +import { ReactComponent as PostsIcon } from 'assets/svgs/posts.svg'; +import { ReactComponent as SettingsIcon } from 'assets/svgs/settings.svg'; export interface InterfaceIconComponent { name: string; diff --git a/src/components/LeftDrawer/LeftDrawer.tsx b/src/components/LeftDrawer/LeftDrawer.tsx index 87e37097e7..e28f40d31a 100644 --- a/src/components/LeftDrawer/LeftDrawer.tsx +++ b/src/components/LeftDrawer/LeftDrawer.tsx @@ -3,12 +3,12 @@ import Button from 'react-bootstrap/Button'; import { useTranslation } from 'react-i18next'; import { useHistory } from 'react-router-dom'; import { toast } from 'react-toastify'; -import { ReactComponent as AngleRightIcon } from '../../assets/svgs/icons/angleRight.svg'; -import { ReactComponent as LogoutIcon } from '../../assets/svgs/icons/logout.svg'; -import { ReactComponent as OrganizationsIcon } from '../../assets/svgs/icons/organizations.svg'; -import { ReactComponent as RequestsIcon } from '../../assets/svgs/icons/requests.svg'; -import { ReactComponent as RolesIcon } from '../../assets/svgs/icons/roles.svg'; -import { ReactComponent as TalawaLogo } from '../../assets/svgs/talawa.svg'; +import { ReactComponent as AngleRightIcon } from 'assets/svgs/angleRight.svg'; +import { ReactComponent as LogoutIcon } from 'assets/svgs/logout.svg'; +import { ReactComponent as OrganizationsIcon } from 'assets/svgs/organizations.svg'; +import { ReactComponent as RequestsIcon } from 'assets/svgs/requests.svg'; +import { ReactComponent as RolesIcon } from 'assets/svgs/roles.svg'; +import { ReactComponent as TalawaLogo } from 'assets/svgs/talawa.svg'; import styles from './LeftDrawer.module.css'; export interface InterfaceLeftDrawerProps { diff --git a/src/components/LeftDrawerOrg/LeftDrawerOrg.test.tsx b/src/components/LeftDrawerOrg/LeftDrawerOrg.test.tsx index 0c108533cc..ff10c1b28b 100644 --- a/src/components/LeftDrawerOrg/LeftDrawerOrg.test.tsx +++ b/src/components/LeftDrawerOrg/LeftDrawerOrg.test.tsx @@ -83,6 +83,8 @@ const MOCKS = [ name: 'Test Organization', description: 'Testing this organization', location: 'Gotham, DC', + isPublic: true, + visibleInSearch: true, members: [ { _id: 'john123', @@ -135,6 +137,8 @@ const MOCKS_WITH_IMAGE = [ name: 'Test Organization', description: 'Testing this organization', location: 'Gotham, DC', + isPublic: true, + visibleInSearch: true, members: [ { _id: 'john123', @@ -261,11 +265,7 @@ describe('Testing Left Drawer component for SUPERADMIN', () => { ); await wait(); - // Coming soon - userEvent.click(screen.getByTestId(/orgBtn/i)); - expect(toast.success).toHaveBeenCalledWith( - 'Organization detail modal coming soon!' - ); + expect(screen.getByTestId(/orgBtn/i)).toBeInTheDocument(); userEvent.click(screen.getByTestId(/profileBtn/i)); expect(toast.success).toHaveBeenCalledWith('Profile page coming soon!'); }); diff --git a/src/components/LeftDrawerOrg/LeftDrawerOrg.tsx b/src/components/LeftDrawerOrg/LeftDrawerOrg.tsx index 5ec1f615bd..119a90f0eb 100644 --- a/src/components/LeftDrawerOrg/LeftDrawerOrg.tsx +++ b/src/components/LeftDrawerOrg/LeftDrawerOrg.tsx @@ -3,16 +3,16 @@ import { WarningAmberOutlined } from '@mui/icons-material'; import { ORGANIZATIONS_LIST } from 'GraphQl/Queries/Queries'; import CollapsibleDropdown from 'components/CollapsibleDropdown/CollapsibleDropdown'; import IconComponent from 'components/IconComponent/IconComponent'; -import React from 'react'; +import React, { useEffect, useState } from 'react'; import Button from 'react-bootstrap/Button'; import { useTranslation } from 'react-i18next'; import { useHistory } from 'react-router-dom'; import { toast } from 'react-toastify'; import type { TargetsType } from 'state/reducers/routesReducer'; import type { InterfaceQueryOrganizationsListObject } from 'utils/interfaces'; -import { ReactComponent as AngleRightIcon } from '../../assets/svgs/icons/angleRight.svg'; -import { ReactComponent as LogoutIcon } from '../../assets/svgs/icons/logout.svg'; -import { ReactComponent as TalawaLogo } from '../../assets/svgs/talawa.svg'; +import { ReactComponent as AngleRightIcon } from 'assets/svgs/angleRight.svg'; +import { ReactComponent as LogoutIcon } from 'assets/svgs/logout.svg'; +import { ReactComponent as TalawaLogo } from 'assets/svgs/talawa.svg'; import styles from './LeftDrawerOrg.module.css'; export interface InterfaceLeftDrawerProps { @@ -31,7 +31,8 @@ const leftDrawerOrg = ({ setHideDrawer, }: InterfaceLeftDrawerProps): JSX.Element => { const { t } = useTranslation('translation', { keyPrefix: 'leftDrawerOrg' }); - + const [organization, setOrganization] = + useState(); const { data, loading, @@ -51,6 +52,17 @@ const leftDrawerOrg = ({ const history = useHistory(); + // Set organization data + useEffect(() => { + let isMounted = true; + if (data && isMounted) { + setOrganization(data?.organizations[0]); + } + return () => { + isMounted = false; + }; + }, [data]); + const logout = (): void => { localStorage.clear(); history.push('/'); @@ -95,7 +107,7 @@ const leftDrawerOrg = ({ data-testid="orgBtn" /> - ) : data && data?.organizations.length == 0 ? ( + ) : organization == undefined ? ( <> )}
diff --git a/src/components/Loader/Loader.module.css b/src/components/Loader/Loader.module.css index df8c1deea6..aad512e826 100644 --- a/src/components/Loader/Loader.module.css +++ b/src/components/Loader/Loader.module.css @@ -6,8 +6,20 @@ align-items: center; } -.spinner { +.spinnerXl { width: 6rem; height: 6rem; border-width: 0.5rem; } + +.spinnerLg { + height: 4rem; + width: 4rem; + border-width: 0.3rem; +} + +.spinnerSm { + height: 2rem; + width: 2rem; + border-width: 0.2rem; +} diff --git a/src/components/Loader/Loader.tsx b/src/components/Loader/Loader.tsx index 6dc247b4c9..f761ebd79b 100644 --- a/src/components/Loader/Loader.tsx +++ b/src/components/Loader/Loader.tsx @@ -2,12 +2,28 @@ import React from 'react'; import styles from './Loader.module.css'; import { Spinner } from 'react-bootstrap'; -const Loader = (): JSX.Element => { +interface InterfaceLoaderProps { + styles?: StyleSheet | string; + size?: 'sm' | 'lg' | 'xl'; +} + +const Loader = (props: InterfaceLoaderProps): JSX.Element => { return ( <> -
+
div { - width: 50%; - margin-right: 50px; + justify-content: center; + align-items: center; + flex-direction: column; } -.radio_buttons > input { - margin-bottom: 20px; - border: none; - box-shadow: none; - padding: 0 0; - border-radius: 5px; - background: none; - width: 50%; -} - -.whitebtn { - margin: 1rem 0 0; - margin-top: 10px; - border: 1px solid #e8e5e5; - box-shadow: 0 2px 2px #e8e5e5; - padding: 10px 20px; - border-radius: 5px; - background: none; - width: 20%; - font-size: 16px; - color: #31bb6b; - outline: none; - font-weight: 600; - cursor: pointer; - float: left; - transition: transform 0.2s, box-shadow 0.2s; -} -.greenregbtn { - margin: 1rem 0 0; - margin-top: 10px; - margin-right: 30px; - border: 1px solid #e8e5e5; - box-shadow: 0 2px 2px #e8e5e5; - padding: 10px 10px; - border-radius: 5px; - background-color: #31bb6b; - width: 20%; - font-size: 16px; - color: white; - outline: none; - font-weight: 600; - cursor: pointer; - transition: transform 0.2s, box-shadow 0.2s; -} -.radio_buttons { - width: 55%; - margin-top: 10px; - display: flex; - color: #707070; - font-weight: 600; - font-size: 14px; -} -.radio_buttons > input { - transform: scale(1.2); -} -.radio_buttons > label { - margin-top: -4px; - margin-left: 0px; - margin-right: 7px; -} -.idtitle { - width: 88%; -} -.checkboxdiv { - display: flex; - width: 100%; - margin-top: 20px; -} -.checkboxdiv > div { - display: flex; - width: 50%; -} -.checkboxdiv > div > input { - width: 30%; - border: none; - box-shadow: none; - margin-top: 5px; +.icon { + transform: scale(1.5); + color: var(--bs-danger); + margin-bottom: 1rem; } diff --git a/src/components/OrgUpdate/OrgUpdate.test.tsx b/src/components/OrgUpdate/OrgUpdate.test.tsx index 187e736c69..79b076c452 100644 --- a/src/components/OrgUpdate/OrgUpdate.test.tsx +++ b/src/components/OrgUpdate/OrgUpdate.test.tsx @@ -1,109 +1,19 @@ import React from 'react'; -import { act, render, screen } from '@testing-library/react'; import { MockedProvider } from '@apollo/react-testing'; +import { act, fireEvent, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { I18nextProvider } from 'react-i18next'; -import OrgUpdate from './OrgUpdate'; -import { UPDATE_ORGANIZATION_MUTATION } from 'GraphQl/Mutations/mutations'; -import i18nForTest from 'utils/i18nForTest'; -import { ORGANIZATIONS_LIST } from 'GraphQl/Queries/Queries'; import { StaticMockLink } from 'utils/StaticMockLink'; +import i18nForTest from 'utils/i18nForTest'; +import OrgUpdate from './OrgUpdate'; +import { + MOCKS, + MOCKS_ERROR_ORGLIST, + MOCKS_ERROR_UPDATE_ORGLIST, +} from './OrgUpdateMocks'; -const MOCKS = [ - { - request: { - query: ORGANIZATIONS_LIST, - }, - result: { - data: { - organizations: [ - { - _id: '123', - image: '', - name: '', - description: '', - creator: { - firstName: '', - lastName: '', - email: '', - }, - location: '', - members: { - _id: '123', - firstName: 'John', - lastName: 'Doe', - email: 'johndoe@gmail.com', - }, - admins: { - _id: '123', - firstName: 'John', - lastName: 'Doe', - email: 'johndoe@gmail.com', - }, - membershipRequests: { - _id: '456', - user: { - firstName: 'Sam', - lastName: 'Smith', - email: 'samsmith@gmail.com', - }, - }, - blockedUsers: { - _id: '789', - firstName: 'Steve', - lastName: 'Smith', - email: 'stevesmith@gmail.com', - }, - tags: ['Shelter', 'NGO', 'Open Source'], - spamCount: [ - { - _id: '6954', - user: { - _id: '878', - firstName: 'Joe', - lastName: 'Root', - email: 'joeroot@gmail.com', - }, - isReaded: false, - groupchat: { - _id: '321', - title: 'Dummy', - }, - }, - ], - }, - ], - }, - }, - }, - { - request: { - query: UPDATE_ORGANIZATION_MUTATION, - variables: { - id: '123', - name: 'Updated Organization', - description: 'This is an updated test organization', - location: 'Updated location', - image: new File(['hello'], 'hello.png', { type: 'image/png' }), - isPublic: true, - visibleInSearch: false, - }, - }, - result: { - data: { - updateOrganization: { - _id: '123', - name: 'Updated Organization', - description: 'This is an updated test organization', - location: 'Updated location', - isPublic: true, - visibleInSearch: false, - }, - }, - }, - }, -]; const link = new StaticMockLink(MOCKS, true); + async function wait(ms = 500): Promise { await act(() => { return new Promise((resolve) => { @@ -114,24 +24,22 @@ async function wait(ms = 500): Promise { describe('Testing Organization Update', () => { const props = { - id: '123', - orgid: '123', + orgId: '123', }; const formData = { - name: 'John Doe', - description: 'This is a description', - location: 'Test location', + name: 'Palisadoes Organization', + description: 'This is a updated description', + location: 'This is updated location', displayImage: new File(['hello'], 'hello.png', { type: 'image/png' }), - isPublic: true, + isPublic: false, isVisible: true, }; global.alert = jest.fn(); - test('should render props and text elements test for the page component', async () => { - //window.location.assign('/orgsetting/id=123'); - await act(async () => { + test('should render props and text elements test for the page component along with mock data', async () => { + act(() => { render( @@ -139,50 +47,128 @@ describe('Testing Organization Update', () => { ); - await wait(); - userEvent.type( - screen.getByPlaceholderText(/Enter Organization Name/i), - formData.name - ); - userEvent.type( - screen.getByPlaceholderText(/Description/i), - formData.description - ); - userEvent.type( - screen.getByPlaceholderText(/Location/i), - formData.location - ); - userEvent.upload( - screen.getByLabelText(/Display Image:/i), - formData.displayImage - ); - userEvent.click(screen.getByLabelText(/Is Public:/i)); - userEvent.click(screen.getByLabelText(/Is Registrable:/i)); + }); + await wait(); + // Check labels are present or not + expect(screen.getByText('Name')).toBeInTheDocument(); + expect(screen.getByText('Description')).toBeInTheDocument(); + expect(screen.getByText('Location')).toBeInTheDocument(); + expect(screen.getByText('Display Image:')).toBeInTheDocument(); + expect(screen.getByText('Public:')).toBeInTheDocument(); + expect(screen.getByText('Visible in Search:')).toBeInTheDocument(); - await wait(); + // Get the input fields, and btns + const name = screen.getByPlaceholderText(/Enter Organization Name/i); + const des = screen.getByPlaceholderText(/Description/i); + const location = screen.getByPlaceholderText(/Location/i); + const isPublic = screen.getByPlaceholderText(/Public/i); + const isVisible = screen.getByPlaceholderText(/Visible/i); - userEvent.click(screen.getByText(/Save Changes/i)); + // Checking if form fields got updated according to the mock data + expect(name).toHaveValue('Palisadoes'); + expect(des).toHaveValue('Equitable Access to STEM Education Jobs'); + expect(location).toHaveValue('Jamaica'); + expect(isPublic).toBeChecked(); + expect(isVisible).not.toBeChecked(); + }); - expect(screen.getByPlaceholderText(/Organization Name/i)).toHaveValue( - formData.name + test('Should Update organization properly', async () => { + await act(async () => { + render( + + + + + ); - expect(screen.getByPlaceholderText(/Description/i)).toHaveValue( - formData.description + }); + + await wait(); + + // Get the input fields, and btns + const name = screen.getByPlaceholderText(/Enter Organization Name/i); + const des = screen.getByPlaceholderText(/Description/i); + const location = screen.getByPlaceholderText(/Location/i); + const displayImage = screen.getByPlaceholderText(/Display Image/i); + const isPublic = screen.getByPlaceholderText(/Public/i); + const isVisible = screen.getByPlaceholderText(/Visible/i); + const saveChangesBtn = screen.getByText(/Save Changes/i); + + // Emptying the text fields to add updated data + fireEvent.change(name, { target: { value: '' } }); + fireEvent.change(des, { target: { value: '' } }); + fireEvent.change(location, { target: { value: '' } }); + + // Mocking filling form behaviour + userEvent.type(name, formData.name); + userEvent.type(des, formData.description); + userEvent.type(location, formData.location); + userEvent.upload(displayImage, formData.displayImage); + userEvent.click(isPublic); + userEvent.click(isVisible); + + await wait(); + userEvent.click(saveChangesBtn); + + // Checking if the form got update accordingly + expect(name).toHaveValue(formData.name); + expect(des).toHaveValue(formData.description); + expect(location).toHaveValue(formData.location); + expect(displayImage).toBeTruthy(); + expect(isPublic).not.toBeChecked(); + expect(isVisible).toBeChecked(); + }); + + test('Should render error occured text when Organization Could not be found', async () => { + act(() => { + render( + + + + + ); - expect(screen.getByPlaceholderText(/Location/i)).toHaveValue( - formData.location + }); + await wait(); + expect(screen.getByText(/Mock Graphql Error/i)).toBeInTheDocument(); + }); + + test('Should show error occured toast when Organization could not be updated', async () => { + await act(async () => { + render( + + + + + ); - expect(screen.getByLabelText(/display image:/i)).toBeTruthy(); - expect(screen.getByLabelText(/Is Public:/i)).not.toBeChecked(); - expect(screen.getByLabelText(/Is Registrable:/i)).toBeChecked(); - expect(screen.getByText(/Cancel/i)).toBeTruthy(); - - expect(screen.getByText('Name')).toBeInTheDocument(); - expect(screen.getByText('Description')).toBeInTheDocument(); - expect(screen.getByText('Location')).toBeInTheDocument(); - expect(screen.getByText('Display Image:')).toBeInTheDocument(); - expect(screen.getByText('Is Public:')).toBeInTheDocument(); - expect(screen.getByText('Is Registrable:')).toBeInTheDocument(); }); + + await wait(); + + // Get the input fields, and btns + const name = screen.getByPlaceholderText(/Enter Organization Name/i); + const des = screen.getByPlaceholderText(/Description/i); + const location = screen.getByPlaceholderText(/Location/i); + const displayImage = screen.getByPlaceholderText(/Display Image/i); + const isPublic = screen.getByPlaceholderText(/Public/i); + const isVisible = screen.getByPlaceholderText(/Visible/i); + const saveChangesBtn = screen.getByText(/Save Changes/i); + + // Emptying the text fields to add updated data + fireEvent.change(name, { target: { value: '' } }); + fireEvent.change(des, { target: { value: '' } }); + fireEvent.change(location, { target: { value: '' } }); + + // Mocking filling form behaviour + userEvent.type(name, formData.name); + userEvent.type(des, formData.description); + userEvent.type(location, formData.location); + userEvent.upload(displayImage, formData.displayImage); + userEvent.click(isPublic); + userEvent.click(isVisible); + + await wait(); + userEvent.click(saveChangesBtn); }); }); diff --git a/src/components/OrgUpdate/OrgUpdate.tsx b/src/components/OrgUpdate/OrgUpdate.tsx index b93d1ff218..16222717d6 100644 --- a/src/components/OrgUpdate/OrgUpdate.tsx +++ b/src/components/OrgUpdate/OrgUpdate.tsx @@ -1,26 +1,28 @@ -import React from 'react'; +import React, { useState, useEffect } from 'react'; import { useMutation, useQuery } from '@apollo/client'; -import { useTranslation } from 'react-i18next'; import Button from 'react-bootstrap/Button'; +import { useTranslation } from 'react-i18next'; import { toast } from 'react-toastify'; +import type { ApolloError } from '@apollo/client'; +import { WarningAmberRounded } from '@mui/icons-material'; import { UPDATE_ORGANIZATION_MUTATION } from 'GraphQl/Mutations/mutations'; -import styles from './OrgUpdate.module.css'; import { ORGANIZATIONS_LIST } from 'GraphQl/Queries/Queries'; +import Loader from 'components/Loader/Loader'; +import { Col, Form, Row } from 'react-bootstrap'; import convertToBase64 from 'utils/convertToBase64'; import { errorHandler } from 'utils/errorHandler'; -import { Form } from 'react-bootstrap'; +import type { InterfaceQueryOrganizationsListObject } from 'utils/interfaces'; +import styles from './OrgUpdate.module.css'; interface InterfaceOrgUpdateProps { - id: string; - orgid: string; + orgId: string; } -// eslint-disable-next-line @typescript-eslint/no-unused-vars function orgUpdate(props: InterfaceOrgUpdateProps): JSX.Element { - const currentUrl = window.location.href.split('=')[1]; + const { orgId } = props; - const [formState, setFormState] = React.useState<{ + const [formState, setFormState] = useState<{ orgName: string; orgDescrip: string; location: string; @@ -32,7 +34,7 @@ function orgUpdate(props: InterfaceOrgUpdateProps): JSX.Element { orgImage: null, }); - const [publicchecked, setPublicChecked] = React.useState(true); + const [publicchecked, setPublicChecked] = React.useState(false); const [visiblechecked, setVisibleChecked] = React.useState(false); const [login] = useMutation(UPDATE_ORGANIZATION_MUTATION); @@ -41,30 +43,45 @@ function orgUpdate(props: InterfaceOrgUpdateProps): JSX.Element { keyPrefix: 'orgUpdate', }); - const { data, loading: loadingdata } = useQuery(ORGANIZATIONS_LIST, { - variables: { id: currentUrl }, + const { + data, + loading, + refetch, + error, + }: { + data?: { + organizations: InterfaceQueryOrganizationsListObject[]; + }; + loading: boolean; + refetch: (variables: { id: string }) => void; + error?: ApolloError; + } = useQuery(ORGANIZATIONS_LIST, { + variables: { id: orgId }, + notifyOnNetworkStatusChange: true, }); - React.useEffect(() => { - if (data) { + useEffect(() => { + let isMounted = true; + if (data && isMounted) { setFormState({ ...formState, orgName: data.organizations[0].name, orgDescrip: data.organizations[0].description, location: data.organizations[0].location, }); + setPublicChecked(data.organizations[0].isPublic); + setVisibleChecked(data.organizations[0].visibleInSearch); } - }, [data]); - - if (loadingdata) { - return
; - } + return () => { + isMounted = false; + }; + }, [data, orgId]); const onSaveChangesClicked = async (): Promise => { try { const { data } = await login({ variables: { - id: currentUrl, + id: orgId, name: formState.orgName, description: formState.orgDescrip, location: formState.location, @@ -73,144 +90,127 @@ function orgUpdate(props: InterfaceOrgUpdateProps): JSX.Element { file: formState.orgImage, }, }); - /* istanbul ignore next */ + // istanbul ignore next if (data) { - window.location.assign(`/orgdash/id=${props.orgid}`); - + refetch({ id: orgId }); toast.success(t('successfulUpdated')); } } catch (error: any) { - /* istanbul ignore next */ errorHandler(t, error); } }; - /* istanbul ignore next */ - const cancelUpdate = (): void => { - window.location.reload(); - }; + if (loading) { + return ; + } + + if (error) { + return ( +
+ +
+ Error occured while loading Organization Data +
+ {`${error.message}`} +
+
+ ); + } return ( <>
- {/*

Update Your Details

*/} -
-
- - { - setFormState({ - ...formState, - orgName: e.target.value, - }); - }} + {t('name')} + { + setFormState({ + ...formState, + orgName: e.target.value, + }); + }} + /> + {t('description')} + { + setFormState({ + ...formState, + orgDescrip: e.target.value, + }); + }} + /> + {t('location')} + { + setFormState({ + ...formState, + location: e.target.value, + }); + }} + /> + + + {t('isPublic')}: + setPublicChecked(!publicchecked)} /> -
-
- - { - setFormState({ - ...formState, - orgDescrip: e.target.value, - }); - }} + + + + {t('isVisibleInSearch')}: + + setVisibleChecked(!visiblechecked)} /> -
-
-
-
- - { - setFormState({ - ...formState, - location: e.target.value, - }); - }} - /> -
-
-
-
- -
-
-
- - setPublicChecked(!publicchecked)} - /> -
-
- - setVisibleChecked(!visiblechecked)} - /> -
-
-
-
+ + + {t('displayImage')}: + => { + const target = e.target as HTMLInputElement; + const file = target.files && target.files[0]; + /* istanbul ignore else */ + if (file) + setFormState({ + ...formState, + orgImage: await convertToBase64(file), + }); + }} + data-testid="organisationImage" + /> +
-
diff --git a/src/components/OrgUpdate/OrgUpdateMocks.ts b/src/components/OrgUpdate/OrgUpdateMocks.ts new file mode 100644 index 0000000000..cd78d37fd0 --- /dev/null +++ b/src/components/OrgUpdate/OrgUpdateMocks.ts @@ -0,0 +1,157 @@ +import { UPDATE_ORGANIZATION_MUTATION } from 'GraphQl/Mutations/mutations'; +import { ORGANIZATIONS_LIST } from 'GraphQl/Queries/Queries'; + +export const MOCKS = [ + { + request: { + query: ORGANIZATIONS_LIST, + variables: { id: '123' }, + }, + result: { + data: { + organizations: [ + { + _id: '123', + image: null, + name: 'Palisadoes', + description: 'Equitable Access to STEM Education Jobs', + location: 'Jamaica', + isPublic: true, + visibleInSearch: false, + creator: { + firstName: 'John', + lastName: 'Doe', + email: 'johndoe@example.com', + }, + members: { + _id: '123', + firstName: 'John', + lastName: 'Doe', + email: 'johndoe@gmail.com', + }, + admins: [ + { + _id: '123', + firstName: 'John', + lastName: 'Doe', + email: 'johndoe@gmail.com', + }, + ], + membershipRequests: { + _id: '456', + user: { + firstName: 'Sam', + lastName: 'Smith', + email: 'samsmith@gmail.com', + }, + }, + blockedUsers: [], + }, + ], + }, + }, + }, + { + request: { + query: UPDATE_ORGANIZATION_MUTATION, + variables: { + id: '123', + name: 'Updated Organization', + description: 'This is an updated test organization', + location: 'Updated location', + image: new File(['hello'], 'hello.png', { type: 'image/png' }), + isPublic: true, + visibleInSearch: false, + }, + }, + result: { + data: { + updateOrganization: { + _id: '123', + name: 'Updated Organization', + description: 'This is an updated test organization', + location: 'Updated location', + isPublic: true, + visibleInSearch: false, + }, + }, + }, + }, +]; + +export const MOCKS_ERROR_ORGLIST = [ + { + request: { + query: ORGANIZATIONS_LIST, + variables: { id: '123' }, + }, + error: new Error('Mock Graphql Error'), + }, +]; + +export const MOCKS_ERROR_UPDATE_ORGLIST = [ + { + request: { + query: ORGANIZATIONS_LIST, + variables: { id: '123' }, + }, + result: { + data: { + organizations: [ + { + _id: '123', + image: null, + name: 'Palisadoes', + description: 'Equitable Access to STEM Education Jobs', + location: 'Jamaica', + isPublic: true, + visibleInSearch: false, + creator: { + firstName: 'John', + lastName: 'Doe', + email: 'johndoe@example.com', + }, + members: { + _id: '123', + firstName: 'John', + lastName: 'Doe', + email: 'johndoe@gmail.com', + }, + admins: [ + { + _id: '123', + firstName: 'John', + lastName: 'Doe', + email: 'johndoe@gmail.com', + }, + ], + membershipRequests: { + _id: '456', + user: { + firstName: 'Sam', + lastName: 'Smith', + email: 'samsmith@gmail.com', + }, + }, + blockedUsers: [], + }, + ], + }, + }, + }, + { + request: { + query: UPDATE_ORGANIZATION_MUTATION, + variables: { + id: '123', + name: 'Updated Organization', + description: 'This is an updated test organization', + location: 'Updated location', + image: new File(['hello'], 'hello.png', { type: 'image/png' }), + isPublic: true, + visibleInSearch: false, + }, + }, + erorr: new Error('Mock Graphql Updating Organization Error'), + }, +]; diff --git a/src/components/OrganizationDashCards/CardItem.module.css b/src/components/OrganizationDashCards/CardItem.module.css new file mode 100644 index 0000000000..e90a6d3655 --- /dev/null +++ b/src/components/OrganizationDashCards/CardItem.module.css @@ -0,0 +1,47 @@ +.cardItem { + position: relative; + display: flex; + align-items: center; + padding: 0.75rem 0; +} + +.cardItem .iconWrapper { + position: relative; + height: 40px; + width: 40px; + display: flex; + justify-content: center; + align-items: center; +} + +.cardItem .iconWrapper .themeOverlay { + background: var(--bs-primary); + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + opacity: 0.12; + border-radius: 50%; +} + +.cardItem .iconWrapper .dangerOverlay { + background: var(--bs-danger); + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + opacity: 0.12; + border-radius: 50%; +} + +.cardItem .title { + font-size: 1rem; + flex: 1; +} + +.cardItem .time { + font-size: 0.9rem; + color: var(--bs-secondary); +} diff --git a/src/components/OrganizationDashCards/CardItem.test.tsx b/src/components/OrganizationDashCards/CardItem.test.tsx new file mode 100644 index 0000000000..6841fe9659 --- /dev/null +++ b/src/components/OrganizationDashCards/CardItem.test.tsx @@ -0,0 +1,42 @@ +import React from 'react'; +import { render, screen } from '@testing-library/react'; +import CardItem from './CardItem'; +import type { InterfaceCardItem } from './CardItem'; + +describe('Testing the Organization Card', () => { + test('should render props and text elements For event card', () => { + const props: InterfaceCardItem = { + type: 'Event', + title: 'Event Title', + time: '2023-09-03', + }; + + render(); + + expect(screen.getByText(/Event Title/i)).toBeInTheDocument(); + expect(screen.getByText(/03-09-2023/i)).toBeInTheDocument(); + }); + + test('Should render props and text elements for Post card', () => { + const props: InterfaceCardItem = { + type: 'Post', + title: 'Post Title', + time: '2023-09-03', + }; + + render(); + + expect(screen.getByText(/Post Title/i)).toBeInTheDocument(); + expect(screen.getByText(/03-09-2023/i)).toBeInTheDocument(); + }); + + test('Should render props and text elements for Membership Request card', () => { + const props: InterfaceCardItem = { + type: 'MembershipRequest', + title: 'Membership Request Title', + }; + + render(); + expect(screen.getByText(/Membership Request Title/i)).toBeInTheDocument(); + }); +}); diff --git a/src/components/OrganizationDashCards/CardItem.tsx b/src/components/OrganizationDashCards/CardItem.tsx new file mode 100644 index 0000000000..4843d421c5 --- /dev/null +++ b/src/components/OrganizationDashCards/CardItem.tsx @@ -0,0 +1,48 @@ +import React from 'react'; +import { ReactComponent as EventsIcon } from 'assets/svgs/events.svg'; +import { ReactComponent as PostsIcon } from 'assets/svgs/post.svg'; +import dayjs from 'dayjs'; +import styles from './CardItem.module.css'; +import { PersonAddAlt1Rounded } from '@mui/icons-material'; + +export interface InterfaceCardItem { + type: 'Event' | 'Post' | 'MembershipRequest'; + title: string; + time?: string; +} + +const cardItem = (props: InterfaceCardItem): JSX.Element => { + const { type, title, time } = props; + return ( + <> +
+
+
+ {type == 'Event' ? ( + + ) : type == 'Post' ? ( + + ) : ( + type == 'MembershipRequest' && ( + + ) + )} +
+ {`${title}`} + {time ? ( + + {dayjs(time).format('DD-MM-YYYY')} + + ) : ( + '' + )} +
+ + ); +}; + +export default cardItem; diff --git a/src/components/OrganizationDashCards/CardItemLoading.tsx b/src/components/OrganizationDashCards/CardItemLoading.tsx new file mode 100644 index 0000000000..923128c2f2 --- /dev/null +++ b/src/components/OrganizationDashCards/CardItemLoading.tsx @@ -0,0 +1,24 @@ +import React from 'react'; +import styles from './CardItem.module.css'; + +const cardItemLoading = (): JSX.Element => { + return ( + <> +
+
+
+
+ +   + +
+ + ); +}; + +export default cardItemLoading; diff --git a/src/components/OrganizationDashCards/DashboardCard.test.tsx b/src/components/OrganizationDashCards/DashboardCard.test.tsx new file mode 100644 index 0000000000..71e5e1fed0 --- /dev/null +++ b/src/components/OrganizationDashCards/DashboardCard.test.tsx @@ -0,0 +1,18 @@ +import React from 'react'; +import { render, screen } from '@testing-library/react'; +import DashboardCard from './DashboardCard'; + +describe('Testing the Dashboard Card', () => { + test('should render props and text elements For event card', () => { + const props = { + icon: , + title: 'Example Title', + count: 100, + }; + + render(); + + expect(screen.getByText(/Example Title/i)).toBeInTheDocument(); + expect(screen.getByText(/100/i)).toBeInTheDocument(); + }); +}); diff --git a/src/components/OrganizationDashCards/DashboardCard.tsx b/src/components/OrganizationDashCards/DashboardCard.tsx new file mode 100644 index 0000000000..4ad8fe8849 --- /dev/null +++ b/src/components/OrganizationDashCards/DashboardCard.tsx @@ -0,0 +1,32 @@ +import React from 'react'; +import { Card, Row } from 'react-bootstrap'; +import Col from 'react-bootstrap/Col'; +import styles from './Dashboardcard.module.css'; + +const dashBoardCard = (props: { + icon: React.ReactNode; + title: string; + count?: number; +}): JSX.Element => { + const { icon, count, title } = props; + return ( + + + + +
+
+ {icon} +
+ + + {count ?? 0} + {title} + + + + + ); +}; + +export default dashBoardCard; diff --git a/src/components/OrganizationDashCards/DashboardCardLoading.tsx b/src/components/OrganizationDashCards/DashboardCardLoading.tsx new file mode 100644 index 0000000000..5b596f32b2 --- /dev/null +++ b/src/components/OrganizationDashCards/DashboardCardLoading.tsx @@ -0,0 +1,36 @@ +import React from 'react'; +import { Card, Row } from 'react-bootstrap'; +import Col from 'react-bootstrap/Col'; +import styles from './Dashboardcard.module.css'; + +const dashBoardCardLoading = (): JSX.Element => { + return ( + + + + +
+
+
+ + + + + + + + + ); +}; + +export default dashBoardCardLoading; diff --git a/src/components/OrganizationDashCards/Dashboardcard.module.css b/src/components/OrganizationDashCards/Dashboardcard.module.css new file mode 100644 index 0000000000..365657fb4f --- /dev/null +++ b/src/components/OrganizationDashCards/Dashboardcard.module.css @@ -0,0 +1,60 @@ +.cardBody { + padding: 1.25rem 1.5rem; +} + +.cardBody .iconWrapper { + position: relative; + height: 48px; + width: 48px; + display: flex; + justify-content: center; + align-items: center; +} + +.cardBody .iconWrapper .themeOverlay { + background: var(--bs-primary); + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + opacity: 0.12; + border-radius: 50%; +} + +.cardBody .textWrapper .primaryText { + font-size: 24px; + font-weight: bold; + display: block; +} + +.cardBody .textWrapper .secondaryText { + font-size: 14px; + display: block; + color: var(--bs-secondary); +} + +@media (max-width: 600px) { + .cardBody { + min-height: 120px; + } + + .cardBody .iconWrapper { + position: absolute; + top: 1rem; + left: 1rem; + } + + .cardBody .textWrapper { + margin-top: calc(0.5rem + 36px); + text-align: right; + } + + .cardBody .textWrapper .primaryText { + font-size: 1.5rem; + } + + .cardBody .textWrapper .secondaryText { + font-size: 1rem; + } +} diff --git a/src/screens/BlockUser/BlockUser.module.css b/src/screens/BlockUser/BlockUser.module.css index 365774b438..ed93446206 100644 --- a/src/screens/BlockUser/BlockUser.module.css +++ b/src/screens/BlockUser/BlockUser.module.css @@ -1,184 +1,102 @@ -.mainpage { +.btnsContainer { display: flex; - flex-direction: row; + margin: 2.5rem 0 2.5rem 0; } -.sidebar { - z-index: 0; - padding-top: 5px; - margin: 0; - height: 100%; +.btnsContainer .btnsBlock { + display: flex; } -.sidebar:after { - content: ''; - background-color: #f7f7f7; - position: absolute; - width: 2px; - height: 600px; - top: 10px; - left: 94%; - display: block; +.btnsContainer .btnsBlock button { + margin-left: 1rem; + display: flex; + justify-content: center; + align-items: center; } -.sidebarsticky { - padding-left: 45px; +.btnsContainer .inputContainer { + flex: 1; + position: relative; } -.sidebarsticky > input { - text-decoration: none; - margin-bottom: 50px; - border-color: #e8e5e5; - width: 80%; - border-radius: 7px; - padding-top: 5px; - padding-bottom: 5px; - padding-right: 10px; - padding-left: 10px; - box-shadow: none; +.btnsContainer .input { + width: 70%; + position: relative; } -.navitem { - padding-left: 27%; - padding-top: 12px; - padding-bottom: 12px; - cursor: pointer; +.btnsContainer input { + outline: 1px solid var(--bs-gray-400); } -.searchtitle { - color: #707070; - font-weight: 600; - font-size: 18px; - margin-bottom: 20px; - padding-bottom: 5px; - border-bottom: 3px solid #31bb6b; - width: 60%; +.btnsContainer .inputContainer button { + width: 52px; } -.logintitle { - color: #707070; - font-weight: 600; - font-size: 20px; - margin-bottom: 30px; - padding-bottom: 5px; - border-bottom: 3px solid #31bb6b; - width: 30%; +.largeBtnsWrapper { + display: flex; } -.mainpageright > hr { - margin-top: 20px; +.listBox { width: 100%; - margin-left: -15px; - margin-right: -15px; - margin-bottom: 20px; + flex: 1; } -.justifysp { +.notFound { + flex: 1; display: flex; - justify-content: space-between; -} - -.radio_buttons { - color: #707070; - font-weight: 600; - font-size: 14px; -} -.radio_buttons > input { - transform: scale(1.2); -} -.radio_buttons > label { - margin-top: -4px; - margin-left: 5px; - margin-right: 15px; + justify-content: center; + align-items: center; + flex-direction: column; } -.loader { - text-align: center; -} - -@media screen and (max-width: 575.5px) { - .justifysp { - padding-left: 55px; - display: flex; - justify-content: space-between; - width: 100%; +@media (max-width: 1020px) { + .btnsContainer { + flex-direction: column; + margin: 1.5rem 0; } - .mainpageright { + .btnsContainer .input { width: 100%; } -} - -.list_box { - height: 70vh; - overflow-y: auto; - width: auto; - padding-right: 50px; -} -@media only screen and (max-width: 600px) { - .sidebar { - position: relative; - bottom: 18px; + .btnsContainer .btnsBlock { + margin: 1.5rem 0 0 0; + justify-content: space-between; } - .invitebtn { - width: 135px; - position: relative; - right: 10px; + .btnsContainer .btnsBlock button { + margin: 0; } - .userListTable { - margin-left: 40px; + .btnsContainer .btnsBlock div button { + margin-right: 1.5rem; } } -/* Loader CSS */ - -.loader, -.loader:after { - border-radius: 50%; - width: 10em; - height: 10em; -} +/* For mobile devices */ -.loader { - margin: 60px auto; - margin-top: 35vh !important; - font-size: 10px; - position: relative; - text-indent: -9999em; - border-top: 1.1em solid rgba(255, 255, 255, 0.2); - border-right: 1.1em solid rgba(255, 255, 255, 0.2); - border-bottom: 1.1em solid rgba(255, 255, 255, 0.2); - border-left: 1.1em solid #febc59; - -webkit-transform: translateZ(0); - -ms-transform: translateZ(0); - transform: translateZ(0); - -webkit-animation: load8 1.1s infinite linear; - animation: load8 1.1s infinite linear; -} +@media (max-width: 520px) { + .btnsContainer { + margin-bottom: 0; + } -@-webkit-keyframes load8 { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); + .btnsContainer .btnsBlock { + display: block; + margin-top: 1rem; + margin-right: 0; } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); + .largeBtnsWrapper { + flex-direction: column; } -} -@keyframes load8 { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); + .btnsContainer .btnsBlock div { + flex: 1; } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); + .btnsContainer .btnsBlock button { + margin-bottom: 1rem; + margin-right: 0; + width: 100%; } } diff --git a/src/screens/BlockUser/BlockUser.test.tsx b/src/screens/BlockUser/BlockUser.test.tsx index 7d5b4fbd41..1c8be48624 100644 --- a/src/screens/BlockUser/BlockUser.test.tsx +++ b/src/screens/BlockUser/BlockUser.test.tsx @@ -1,24 +1,24 @@ import React from 'react'; -import { act, render, screen } from '@testing-library/react'; import { MockedProvider } from '@apollo/react-testing'; -import { BrowserRouter } from 'react-router-dom'; -import { Provider } from 'react-redux'; -import { I18nextProvider } from 'react-i18next'; -import BlockUser from './BlockUser'; -import { - BLOCK_PAGE_MEMBER_LIST, - ORGANIZATIONS_LIST, -} from 'GraphQl/Queries/Queries'; +import { act, render, screen } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; import { BLOCK_USER_MUTATION, UNBLOCK_USER_MUTATION, } from 'GraphQl/Mutations/mutations'; -import { store } from 'state/store'; -import userEvent from '@testing-library/user-event'; -import i18nForTest from 'utils/i18nForTest'; -import { StaticMockLink } from 'utils/StaticMockLink'; +import { + BLOCK_PAGE_MEMBER_LIST, + ORGANIZATIONS_LIST, +} from 'GraphQl/Queries/Queries'; import 'jest-location-mock'; +import { I18nextProvider } from 'react-i18next'; +import { Provider } from 'react-redux'; +import { BrowserRouter } from 'react-router-dom'; import { ToastContainer } from 'react-toastify'; +import { store } from 'state/store'; +import { StaticMockLink } from 'utils/StaticMockLink'; +import i18nForTest from 'utils/i18nForTest'; +import BlockUser from './BlockUser'; let userQueryCalled = false; @@ -226,15 +226,87 @@ const MOCKS = [ request: { query: BLOCK_PAGE_MEMBER_LIST, variables: { - firstName_contains: 'sam', - lastName_contains: 'smith', + firstName_contains: 'Peter', + lastName_contains: '', + orgId: 'orgid', + }, + }, + result: { + data: { + organizationsMemberConnection: { + edges: [], + }, + }, + }, + }, +]; +const MOCKS_EMPTY = [ + { + request: { + query: ORGANIZATIONS_LIST, + variables: { + id: 'orgid', + }, + }, + result: { + data: { + organizations: [ + { + _id: 'orgid', + image: '', + creator: { + firstName: 'firstName', + lastName: 'lastName', + email: 'email', + }, + name: 'name', + description: 'description', + location: 'location', + members: { + _id: 'id', + firstName: 'firstName', + lastName: 'lastName', + email: 'email', + }, + admins: { + _id: 'id', + firstName: 'firstName', + lastName: 'lastName', + email: 'email', + }, + membershipRequests: { + _id: 'id', + user: { + firstName: 'firstName', + lastName: 'lastName', + email: 'email', + }, + }, + blockedUsers: { + _id: 'id', + firstName: 'firstName', + lastName: 'lastName', + email: 'email', + }, + }, + ], + }, + }, + }, + + { + request: { + query: BLOCK_PAGE_MEMBER_LIST, + variables: { + firstName_contains: 'Peter', + lastName_contains: '', orgId: 'orgid', }, }, result: { data: { organizationsMemberConnection: { - edges: [USER_UNBLOCKED], + edges: [], }, }, }, @@ -242,6 +314,7 @@ const MOCKS = [ ]; const link = new StaticMockLink(MOCKS, true); +const link2 = new StaticMockLink(MOCKS_EMPTY, true); async function wait(ms = 500): Promise { await act(() => { @@ -273,7 +346,7 @@ describe('Testing Block/Unblock user screen', () => { await wait(); - expect(screen.getByText('Search By Name')).toBeInTheDocument(); + expect(screen.getByText('Search By First Name')).toBeInTheDocument(); expect(screen.getByText('List of Users who spammed')).toBeInTheDocument(); expect(window.location).toBeAt('/blockuser/id=orgid'); @@ -357,14 +430,15 @@ describe('Testing Block/Unblock user screen', () => { expect(screen.getByText('John Doe')).toBeInTheDocument(); expect(screen.getByText('Sam Smith')).toBeInTheDocument(); - const firstNameInput = screen.getByPlaceholderText(/Enter First Name/i); - const lastNameInput = screen.getByPlaceholderText(/Enter Last Name/i); - + const firstNameInput = screen.getByPlaceholderText(/Search by First Name/i); + // Open Dropdown + await act(async () => { + userEvent.click(screen.getByTestId('nameFilter')); + }); + // Select option and enter first name + userEvent.click(screen.getByTestId('searchByFirstName')); userEvent.type(firstNameInput, 'john'); - expect(firstNameInput).toHaveValue('john'); - expect(lastNameInput).toHaveValue(''); - await wait(700); expect(screen.getByText('John Doe')).toBeInTheDocument(); @@ -393,32 +467,31 @@ describe('Testing Block/Unblock user screen', () => { expect(screen.getByText('John Doe')).toBeInTheDocument(); expect(screen.getByText('Sam Smith')).toBeInTheDocument(); - const firstNameInput = screen.getByPlaceholderText(/Enter First Name/i); - const lastNameInput = screen.getByPlaceholderText(/Enter Last Name/i); - + // Open Dropdown + await act(async () => { + userEvent.click(screen.getByTestId('nameFilter')); + }); + // Select option and enter last name + userEvent.click(screen.getByTestId('searchByLastName')); + const lastNameInput = screen.getByPlaceholderText(/Search by Last Name/i); userEvent.type(lastNameInput, 'doe'); await wait(700); - expect(firstNameInput).toHaveValue(''); expect(lastNameInput).toHaveValue('doe'); - expect(screen.getByText('John Doe')).toBeInTheDocument(); expect(screen.queryByText('Sam Smith')).not.toBeInTheDocument(); - expect(window.location).toBeAt('/blockuser/id=orgid'); }); - test('Testing Full Name Filter', async () => { + test('Testing No Spammers Present', async () => { window.location.assign('/blockuser/id=orgid'); - render( - + - @@ -426,24 +499,7 @@ describe('Testing Block/Unblock user screen', () => { ); await wait(); - - expect(screen.getByText('John Doe')).toBeInTheDocument(); - expect(screen.getByText('Sam Smith')).toBeInTheDocument(); - - const firstNameInput = screen.getByPlaceholderText(/Enter First Name/i); - const lastNameInput = screen.getByPlaceholderText(/Enter Last Name/i); - - userEvent.type(firstNameInput, 'sam'); - userEvent.type(lastNameInput, 'smith'); - - expect(firstNameInput).toHaveValue('sam'); - expect(lastNameInput).toHaveValue('smith'); - - await wait(700); - - expect(screen.getByText('Sam Smith')).toBeInTheDocument(); - expect(screen.queryByText('John Doe')).not.toBeInTheDocument(); - + expect(screen.getByText(/No spammer found/i)).toBeInTheDocument(); expect(window.location).toBeAt('/blockuser/id=orgid'); }); @@ -462,15 +518,15 @@ describe('Testing Block/Unblock user screen', () => { ); - - await wait(); - - userEvent.click(screen.getByLabelText(/All Members/i)); await wait(); + await act(async () => { + userEvent.click(screen.getByTestId('userFilter')); + }); + userEvent.click(screen.getByTestId('showMembers')); - expect(screen.getByLabelText(/All Members/i)).toBeChecked(); - await wait(); + await wait(700); + expect(screen.getByTestId(/userFilter/i)).toHaveTextContent('All Members'); expect(screen.getByText('John Doe')).toBeInTheDocument(); expect(screen.getByText('Sam Smith')).toBeInTheDocument(); @@ -493,12 +549,11 @@ describe('Testing Block/Unblock user screen', () => { ); - await wait(); - - userEvent.click(screen.getByLabelText(/Blocked Users/i)); - await wait(); + await act(async () => { + userEvent.click(screen.getByTestId('userFilter')); + }); - expect(screen.getByLabelText(/Blocked Users/i)).toBeChecked(); + userEvent.click(screen.getByTestId('showBlockedMembers')); await wait(); expect(screen.getByText('John Doe')).toBeInTheDocument(); @@ -524,9 +579,34 @@ describe('Testing Block/Unblock user screen', () => { await wait(); - expect(screen.getByTestId(/blockedusers/)).toBeInTheDocument(); - expect(screen.getByTestId(/allusers/)).toBeInTheDocument(); + expect(screen.getByTestId(/userList/)).toBeInTheDocument(); + expect(screen.getAllByText('Block/Unblock')).toHaveLength(2); expect(screen.getByText('John Doe')).toBeInTheDocument(); expect(screen.getByText('Sam Smith')).toBeInTheDocument(); }); + + test('Testing No Results Found', async () => { + window.location.assign('/blockuser/id=orgid'); + render( + + + + + + + + + + ); + + const input = screen.getByPlaceholderText('Search By First Name'); + await act(async () => { + userEvent.type(input, 'Peter'); + }); + await wait(700); + expect( + screen.getByText(`No results found for "Peter"`) + ).toBeInTheDocument(); + expect(window.location).toBeAt('/blockuser/id=orgid'); + }); }); diff --git a/src/screens/BlockUser/BlockUser.tsx b/src/screens/BlockUser/BlockUser.tsx index 1995c2d634..2b39a00650 100644 --- a/src/screens/BlockUser/BlockUser.tsx +++ b/src/screens/BlockUser/BlockUser.tsx @@ -1,17 +1,18 @@ import { useMutation, useQuery } from '@apollo/client'; -import React, { useEffect, useRef, useState } from 'react'; -import { Col, Form, Row } from 'react-bootstrap'; +import React, { useEffect, useState } from 'react'; +import { Dropdown, Form, Table } from 'react-bootstrap'; import Button from 'react-bootstrap/Button'; import { toast } from 'react-toastify'; -import { CircularProgress } from '@mui/material'; +import { Search } from '@mui/icons-material'; +import SortIcon from '@mui/icons-material/Sort'; import { BLOCK_USER_MUTATION, UNBLOCK_USER_MUTATION, } from 'GraphQl/Mutations/mutations'; import { BLOCK_PAGE_MEMBER_LIST } from 'GraphQl/Queries/Queries'; import OrganizationScreen from 'components/OrganizationScreen/OrganizationScreen'; -import PaginationList from 'components/PaginationList/PaginationList'; +import TableLoader from 'components/TableLoader/TableLoader'; import { useTranslation } from 'react-i18next'; import debounce from 'utils/debounce'; import { errorHandler } from 'utils/errorHandler'; @@ -35,21 +36,15 @@ const Requests = (): JSX.Element => { }); document.title = t('title'); - - const [page, setPage] = useState(0); - const [rowsPerPage, setRowsPerPage] = React.useState(10); - const currentUrl = window.location.href.split('=')[1]; - const [membersData, setMembersData] = useState([]); - const [state, setState] = useState(0); - - const firstNameRef = useRef(null); - const lastNameRef = useRef(null); + const [searchByFirstName, setSearchByFirstName] = useState(true); + const [searchByName, setSearchByName] = useState(''); + const [showBlockedMembers, setShowBlockedMembers] = useState(false); const { data: memberData, - loading: memberLoading, + loading: loadingMembers, error: memberError, refetch: memberRefetch, } = useQuery(BLOCK_PAGE_MEMBER_LIST, { @@ -69,33 +64,16 @@ const Requests = (): JSX.Element => { return; } - if (state === 0) { + if (showBlockedMembers == false) { setMembersData(memberData?.organizationsMemberConnection.edges); } else { const blockUsers = memberData?.organizationsMemberConnection.edges.filter( (user: InterfaceMember) => user.organizationsBlockedBy.some((org) => org._id === currentUrl) ); - setMembersData(blockUsers); } - }, [state, memberData]); - - /* istanbul ignore next */ - const handleChangePage = ( - event: React.MouseEvent | null, - newPage: number - ): void => { - setPage(newPage); - }; - - /* istanbul ignore next */ - const handleChangeRowsPerPage = ( - event: React.ChangeEvent - ): void => { - setRowsPerPage(parseInt(event.target.value, 10)); - setPage(0); - }; + }, [memberData, showBlockedMembers]); const handleBlockUser = async (userId: string): Promise => { try { @@ -140,181 +118,175 @@ const Requests = (): JSX.Element => { toast.error(memberError.message); } - const handleSearch = (): void => { - const filterData = { + const handleSearch = (e: any): void => { + const { value } = e.target; + setSearchByName(value); + memberRefetch({ orgId: currentUrl, - firstName_contains: firstNameRef.current?.value ?? '', - lastName_contains: lastNameRef.current?.value ?? '', - }; - - memberRefetch(filterData); + firstName_contains: searchByFirstName ? value : '', + lastName_contains: searchByFirstName ? '' : value, + }); }; const handleSearchDebounced = debounce(handleSearch); + const headerTitles: string[] = [ + '#', + t('name'), + t('email'), + t('block_unblock'), + ]; return ( <> - - - -
-
-
{t('searchByName')}
- - - - -
- { - setState(0); - }} - /> - - - { - setState(1); - }} - /> - -
-
+ + {/* Buttons Container */} +
+
+
+ +
- - - -
- -

{t('listOfUsers')}

-
- {memberLoading ? ( -
- -
- ) : ( -
-
- - - - - - - - - - - - { - /* istanbul ignore next */ - (rowsPerPage > 0 - ? membersData.slice( - page * rowsPerPage, - page * rowsPerPage + rowsPerPage - ) - : membersData - ).map((user, index: number) => { - return ( - - - - - - - ); - }) - } - -
#{t('name')}{t('email')} - {t('block_unblock')} -
{page * 10 + (index + 1)}{`${user.firstName} ${user.lastName}`}{user.email} - {user.organizationsBlockedBy.some( - (spam: any) => spam._id === currentUrl - ) ? ( - - ) : ( - - )} -
-
-
- )} -
- - - - - - -
-
+
+
+
+ +
- - +
+
+ {/* Table */} + {loadingMembers == false && + membersData.length === 0 && + searchByName.length > 0 ? ( +
+

+ {t('noResultsFoundFor')} "{searchByName}" +

+
+ ) : loadingMembers == false && membersData.length === 0 ? ( +
+

{t('noSpammerFound')}

+
+ ) : ( +
+ {loadingMembers ? ( + + ) : ( + + + + {headerTitles.map((title: string, index: number) => { + return ( + + ); + })} + + + + {membersData.map((user, index: number) => { + return ( + + + + + + + ); + })} + +
+ {title} +
{index + 1}{`${user.firstName} ${user.lastName}`}{user.email} + {user.organizationsBlockedBy.some( + (spam: any) => spam._id === currentUrl + ) ? ( + + ) : ( + + )} +
+ )} +
+ )} ); diff --git a/src/screens/ForgotPassword/ForgotPassword.module.css b/src/screens/ForgotPassword/ForgotPassword.module.css index bd59589a61..e69de29bb2 100644 --- a/src/screens/ForgotPassword/ForgotPassword.module.css +++ b/src/screens/ForgotPassword/ForgotPassword.module.css @@ -1,17 +0,0 @@ -.forgotPassword .border { - border-color: #31bb6b !important; -} -.forgotPassword .heading h1 { - color: #31bb6b; -} - -.talawaBackgroundColor { - background-color: #31bb6b; -} - -@media only screen and (max-width: 600px) { - .forgotPassword .border { - position: relative; - bottom: 50px; - } -} diff --git a/src/screens/ForgotPassword/ForgotPassword.tsx b/src/screens/ForgotPassword/ForgotPassword.tsx index eb75422385..eb96f70f26 100644 --- a/src/screens/ForgotPassword/ForgotPassword.tsx +++ b/src/screens/ForgotPassword/ForgotPassword.tsx @@ -14,6 +14,7 @@ import { useTranslation } from 'react-i18next'; import { errorHandler } from 'utils/errorHandler'; import Button from 'react-bootstrap/Button'; import { Form } from 'react-bootstrap'; +import Loader from 'components/Loader/Loader'; const ForgotPassword = (): JSX.Element => { const { t } = useTranslation('translation', { @@ -113,7 +114,7 @@ const ForgotPassword = (): JSX.Element => { }; if (componentLoader || otpLoading || forgotPasswordLoading) { - return
; + return ; } return ( diff --git a/src/screens/OrgSettings/OrgSettings.module.css b/src/screens/OrgSettings/OrgSettings.module.css index 88e7ab719c..2b15a2ac0c 100644 --- a/src/screens/OrgSettings/OrgSettings.module.css +++ b/src/screens/OrgSettings/OrgSettings.module.css @@ -1,184 +1,25 @@ -.navbarbg { - height: 60px; - background-color: white; - display: flex; - margin-bottom: 30px; - z-index: 1; - position: relative; - flex-direction: row; - justify-content: space-between; - box-shadow: 0px 0px 8px 2px #c8c8c8; -} -.titlemodal .logo { - color: #707070; - margin-left: 0; - display: flex; - align-items: center; - text-decoration: none; -} - -.logo img { - margin-top: 0px; - margin-left: 10px; - height: 64px; - width: 70px; -} - -.logo > strong { - line-height: 1.5rem; - margin-left: -5px; - font-family: sans-serif; - font-size: 19px; - color: #707070; -} - -.mainpage { - display: flex; - flex-direction: row; -} -.sidebar { - z-index: 0; - padding-top: 5px; - margin: 0; - height: 100%; -} -.sidebar:after { - content: ''; - background-color: #f7f7f7; - position: absolute; - width: 2px; - height: 100%; - top: 10px; - left: 94%; - display: block; -} -.sidebarsticky { - padding-left: 45px; - margin-top: 7px; -} -.sidebarsticky > p { - margin-top: -10px; +.settingsBody { + margin: 2.5rem 0; } -.navitem { - padding-left: 27%; - padding-top: 12px; - padding-bottom: 12px; - cursor: pointer; -} - -.headerDiv { +.cardHeader { + padding: 1.25rem 1rem 1rem 1rem; + border-bottom: 1px solid var(--bs-gray-200); display: flex; - flex-direction: column; + justify-content: space-between; + align-items: center; } -.logintitle { - color: #707070; - font-weight: 600; - font-size: 20px; - /* margin-bottom: 30px; */ - padding-bottom: 5px; - border-bottom: 3px solid #31bb6b; - /* width: 15%; */ - margin-left: 20px; -} -.loginSubtitle { - color: #707070; - font-weight: 600; - font-size: 19px; - /* margin-bottom: 30px; */ - padding-bottom: 5px; - /* border-bottom: 3px solid #31bb6b; */ - /* width: 15%; */ - margin-left: 20px; -} -.searchtitle { - color: #707070; +.cardHeader .cardTitle { + font-size: 1.2rem; font-weight: 600; - font-size: 18px; - margin-bottom: 20px; - padding-bottom: 5px; - border-bottom: 3px solid #31bb6b; - width: 60%; -} -.logintitleadmin { - color: #707070; - font-weight: 600; - font-size: 18px; - margin-top: 50px; - margin-bottom: 40px; - padding-bottom: 5px; - border-bottom: 3px solid #31bb6b; - width: 30%; -} -.greenregbtn { - margin: 1rem 0 0; - margin-top: 15px; - border: 1px solid #e8e5e5; - box-shadow: 0 2px 2px #e8e5e5; - padding: 6px 8px; - border-radius: 5px; - background-color: #31bb6b; - width: 70%; - font-size: 14px; - color: white; - outline: none; - font-weight: 600; - cursor: pointer; - transition: transform 0.2s, box-shadow 0.2s; -} -.sidebarsticky > input { - text-decoration: none; - margin-bottom: 50px; - border-color: #e8e5e5; - width: 80%; - border-radius: 7px; - padding-top: 5px; - padding-bottom: 5px; - padding-right: 10px; - padding-left: 10px; - box-shadow: none; } -.loader, -.loader:after { - border-radius: 50%; - width: 10em; - height: 10em; -} -.loader { - margin: 60px auto; - margin-top: 35vh !important; - font-size: 10px; - position: relative; - text-indent: -9999em; - border-top: 1.1em solid rgba(255, 255, 255, 0.2); - border-right: 1.1em solid rgba(255, 255, 255, 0.2); - border-bottom: 1.1em solid rgba(255, 255, 255, 0.2); - border-left: 1.1em solid #febc59; - -webkit-transform: translateZ(0); - -ms-transform: translateZ(0); - transform: translateZ(0); - -webkit-animation: load8 1.1s infinite linear; - animation: load8 1.1s infinite linear; +.cardBody { + min-height: 180px; } -@-webkit-keyframes load8 { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -@keyframes load8 { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } + +.cardBody .textBox { + margin: 0 0 3rem 0; + color: var(--bs-secondary); } diff --git a/src/screens/OrgSettings/OrgSettings.test.tsx b/src/screens/OrgSettings/OrgSettings.test.tsx index 2fe1b816ef..e722dc4a8d 100644 --- a/src/screens/OrgSettings/OrgSettings.test.tsx +++ b/src/screens/OrgSettings/OrgSettings.test.tsx @@ -1,37 +1,76 @@ import React from 'react'; import { MockedProvider } from '@apollo/react-testing'; -import { act, render, screen } from '@testing-library/react'; -import { MEMBERSHIP_REQUEST } from 'GraphQl/Queries/Queries'; +import { render, screen } from '@testing-library/react'; +import 'jest-location-mock'; +import { I18nextProvider } from 'react-i18next'; import { Provider } from 'react-redux'; import { BrowserRouter } from 'react-router-dom'; -import userEvent from '@testing-library/user-event'; -import { I18nextProvider } from 'react-i18next'; -import 'jest-location-mock'; +import { DELETE_ORGANIZATION_MUTATION } from 'GraphQl/Mutations/mutations'; import { store } from 'state/store'; -import OrgSettings from './OrgSettings'; -import i18nForTest from 'utils/i18nForTest'; import { StaticMockLink } from 'utils/StaticMockLink'; +import i18nForTest from 'utils/i18nForTest'; +import OrgSettings from './OrgSettings'; +import { ORGANIZATIONS_LIST } from 'GraphQl/Queries/Queries'; const MOCKS = [ { request: { - query: MEMBERSHIP_REQUEST, + query: ORGANIZATIONS_LIST, }, result: { data: { organizations: [ { - _id: 1, - membershipRequests: { - _id: 1, - user: { - _id: 1, + _id: '123', + image: null, + name: 'Palisadoes', + description: 'Equitable Access to STEM Education Jobs', + location: 'Jamaica', + isPublic: true, + visibleInSearch: false, + creator: { + firstName: 'John', + lastName: 'Doe', + email: 'johndoe@example.com', + }, + members: { + _id: '123', + firstName: 'John', + lastName: 'Doe', + email: 'johndoe@gmail.com', + }, + admins: [ + { + _id: '123', firstName: 'John', lastName: 'Doe', email: 'johndoe@gmail.com', }, + ], + membershipRequests: { + _id: '456', + user: { + firstName: 'Sam', + lastName: 'Smith', + email: 'samsmith@gmail.com', + }, }, + blockedUsers: [], + }, + ], + }, + }, + }, + { + request: { + query: DELETE_ORGANIZATION_MUTATION, + }, + result: { + data: { + removeOrganization: [ + { + _id: 123, }, ], }, @@ -41,36 +80,24 @@ const MOCKS = [ const link = new StaticMockLink(MOCKS, true); -async function wait(ms = 100): Promise { - await act(() => { - return new Promise((resolve) => { - setTimeout(resolve, ms); - }); - }); -} +afterEach(() => { + localStorage.clear(); +}); describe('Organisation Settings Page', () => { test('correct mock data should be queried', async () => { - const dataQuery1 = MOCKS[0]?.result?.data?.organizations[0]; - - expect(dataQuery1).toEqual({ - _id: 1, - membershipRequests: { - _id: 1, - user: { - _id: 1, - email: 'johndoe@gmail.com', - firstName: 'John', - lastName: 'Doe', - }, + const dataQuery1 = MOCKS[1]?.result?.data?.removeOrganization; + expect(dataQuery1).toEqual([ + { + _id: 123, }, - }); + ]); }); test('should render props and text elements test for the screen', async () => { - window.location.assign('/orglist'); - - const { container } = render( + window.location.assign('/orgsetting/id=123'); + localStorage.setItem('UserType', 'SUPERADMIN'); + render( @@ -81,131 +108,14 @@ describe('Organisation Settings Page', () => { ); - - await wait(); - expect(container.textContent).not.toBe('Loading data...'); - - expect(container.textContent).toMatch('Settings'); - expect(container.textContent).toMatch('Update Your Details'); - expect(container.textContent).toMatch('Update Organization'); - expect(container.textContent).toMatch('Delete Organization'); - expect(container.textContent).toMatch('See Request'); - - expect(window.location).toBeAt('/orglist'); - }); - - test('should render User update form in clicking user update button', async () => { - window.location.assign('/orglist'); - - const { container } = render( - - - - - - - - - - ); - - await wait(); - expect(container.textContent).not.toBe('Loading data...'); - await wait(); - - userEvent.click(screen.getByTestId('userUpdateBtn')); - - await wait(); - const firstNameInput = screen.getByText(/first name/i); - const lastNameInput = screen.getByText(/last name/i); - const emailInput = screen.getByText(/email/i); - const imageInput = screen.getByText(/display image:/i); - const saveBtn = screen.getByRole('button', { name: /save changes/i }); - const cancelBtn = screen.getByRole('button', { name: /cancel/i }); - - await wait(); - - expect(firstNameInput).toBeInTheDocument(); - expect(lastNameInput).toBeInTheDocument(); - expect(emailInput).toBeInTheDocument(); - expect(imageInput).toBeInTheDocument(); - expect(saveBtn).toBeInTheDocument(); - expect(cancelBtn).toBeInTheDocument(); - }); - - test('should render password update form in clicking update your password button', async () => { - window.location.assign('/orglist'); - - const { container } = render( - - - - - - - - - - ); - - expect(container.textContent).not.toBe('Loading data...'); - await wait(); - - userEvent.click(screen.getByTestId('userPasswordUpdateBtn')); - - await wait(); - const previousPasswordInput = screen.getByText(/previous password/i); - const confirmPasswordInput = screen.getByText(/confirm new password/i); - const saveBtn = screen.getByRole('button', { name: /save changes/i }); - const cancelBtn = screen.getByRole('button', { name: /cancel/i }); - - await wait(); - - expect(previousPasswordInput).toBeInTheDocument(); - expect(confirmPasswordInput).toBeInTheDocument(); - expect(saveBtn).toBeInTheDocument(); - expect(cancelBtn).toBeInTheDocument(); - }); - - test('should render update orgnization form in clicking update orgnization button', async () => { - window.location.assign('/orglist'); - - const { container } = render( - - - - - - - - - - ); - - expect(container.textContent).not.toBe('Loading data...'); - await wait(); - - userEvent.click(screen.getByTestId('orgUpdateBtn')); - - await wait(); - const nameInput = screen.getByText(/name/i); - const descriptionInput = screen.getByText(/description/i); - const locationInput = screen.getByText(/location/i); - const displayImageInput = screen.getByText(/display image:/i); - const isPublicInput = screen.getByText(/is public:/i); - const isRegistrableInput = screen.getByText(/is registrable:/i); - const saveBtn = screen.getByRole('button', { name: /save changes/i }); - const cancelBtn = screen.getByRole('button', { name: /cancel/i }); - - await wait(); - - expect(nameInput).toBeInTheDocument(); - expect(descriptionInput).toBeInTheDocument(); - expect(locationInput).toBeInTheDocument(); - expect(displayImageInput).toBeInTheDocument(); - expect(isPublicInput).toBeInTheDocument(); - expect(isRegistrableInput).toBeInTheDocument(); - expect(saveBtn).toBeInTheDocument(); - expect(cancelBtn).toBeInTheDocument(); + expect(screen.getAllByText(/Delete Organization/i)).toHaveLength(3); + expect( + screen.getByText( + /By clicking on Delete organization button you will the organization will be permanently deleted along with its events, tags and all related data/i + ) + ).toBeInTheDocument(); + expect(screen.getByText(/Other Settings/i)).toBeInTheDocument(); + expect(screen.getByText(/Change Language/i)).toBeInTheDocument(); + expect(window.location).toBeAt('/orgsetting/id=123'); }); }); diff --git a/src/screens/OrgSettings/OrgSettings.tsx b/src/screens/OrgSettings/OrgSettings.tsx index ef707bf91f..d0df92b2c6 100644 --- a/src/screens/OrgSettings/OrgSettings.tsx +++ b/src/screens/OrgSettings/OrgSettings.tsx @@ -1,15 +1,9 @@ -import { useQuery } from '@apollo/client'; -import { MEMBERSHIP_REQUEST } from 'GraphQl/Queries/Queries'; -import defaultImg from 'assets/images/blank.png'; -import Loader from 'components/Loader/Loader'; -import MemberRequestCard from 'components/MemberRequestCard/MemberRequestCard'; -import OrgDelete from 'components/OrgDelete/OrgDelete'; +import React from 'react'; +import ChangeLanguageDropDown from 'components/ChangeLanguageDropdown/ChangeLanguageDropDown'; +import DeleteOrg from 'components/DeleteOrg/DeleteOrg'; import OrgUpdate from 'components/OrgUpdate/OrgUpdate'; import OrganizationScreen from 'components/OrganizationScreen/OrganizationScreen'; -import UserPasswordUpdate from 'components/UserPasswordUpdate/UserPasswordUpdate'; -import UserUpdate from 'components/UserUpdate/UserUpdate'; -import React from 'react'; -import Button from 'react-bootstrap/Button'; +import { Card, Form } from 'react-bootstrap'; import Col from 'react-bootstrap/Col'; import Row from 'react-bootstrap/Row'; import { useTranslation } from 'react-i18next'; @@ -21,171 +15,39 @@ function orgSettings(): JSX.Element { }); document.title = t('title'); - const [screenVariable, setScreenVariable] = React.useState(0); - const [screenDisplayVariable, setDisplayScreenVariable] = React.useState(''); - - const handleClick = (number: any): void => { - if (number === 1) { - setDisplayScreenVariable('updateYourDetails'); - setScreenVariable(1); - } else if (number === 2) { - setDisplayScreenVariable('updateOrganization'); - setScreenVariable(2); - } else if (number === 3) { - setDisplayScreenVariable('deleteOrganization'); - setScreenVariable(3); - } else if (number === 4) { - setDisplayScreenVariable('seeRequest'); - setScreenVariable(4); - } else { - setDisplayScreenVariable('updateYourPassword'); - setScreenVariable(5); - } - }; - const currentUrl = window.location.href.split('=')[1]; - const { data, loading, error } = useQuery(MEMBERSHIP_REQUEST, { - variables: { id: currentUrl }, - }); - - if (loading) { - return ; - } - - /* istanbul ignore next */ - if (error) { - window.location.replace('/orglist'); - } - return ( <> - - - -
-
-
- - - - - + + + + +
+
+ {t('updateOrganization')}
-
+ + {currentUrl && } + + - -
- -
-

{t('settings')}

- {screenDisplayVariable != '' && ( -

- {t(screenDisplayVariable)} -

- )} - {/*

{t("abc")}

*/} -
- - {/*

{t('settings')}

*/} -
-
{screenVariable == 1 ? : null}
-
- {screenVariable == 5 ? : null} + + + +
+
{t('otherSettings')}
-
- {screenVariable == 2 ? ( - - ) : null} -
-
{screenVariable == 3 ? : null}
-
- {screenVariable == 4 ? ( - data?.organizations?.membershipRequests ? ( - /* istanbul ignore next */ - data.organizations.map( - /* istanbul ignore next */ - (datas: { - _id: string; - membershipRequests: { - _id: string; - user: { - _id: string; - firstName: string; - lastName: string; - email: string; - }; - }; - }) => { - /* istanbul ignore next */ - return ( - - ); - } - ) - ) : ( -
{t('noData')}
- ) - ) : null} -
-
+ +
+ + {t('changeLanguage')} + + +
+
+ diff --git a/src/screens/OrganizationDashboard/OrganizationDashboard.module.css b/src/screens/OrganizationDashboard/OrganizationDashboard.module.css index af35265ae8..485200b1ae 100644 --- a/src/screens/OrganizationDashboard/OrganizationDashboard.module.css +++ b/src/screens/OrganizationDashboard/OrganizationDashboard.module.css @@ -1,197 +1,24 @@ -.mainpage { +.cardHeader { + padding: 1.25rem 1rem 1rem 1rem; + border-bottom: 1px solid var(--bs-gray-200); display: flex; - flex-direction: row; -} - -.toporgloc { - padding-top: 8px; - font-size: 16px; -} -.sidebar { - z-index: 0; - padding-top: 5px; - margin: 0; - height: 100%; -} -.sidebar:after { - content: ''; - background-color: #f7f7f7; - position: absolute; - width: 2px; - height: 600px; - top: 10px; - left: 94%; - display: block; -} -.sidebarsticky { - padding-left: 30px; -} -.sidebarsticky > p { - margin-top: -10px; - width: 90%; -} - -.description { - word-wrap: break-word; -} - -.titlename { - color: #707070; - font-weight: 600; - font-size: 20px; - margin-bottom: 30px; - padding-bottom: 5px; - width: 26%; -} -.tagdetailsGreen > button { - background-color: #31bb6b; - color: white; - outline: none; - cursor: pointer; - transition: transform 0.2s, box-shadow 0.2s; - border: none; - border-radius: 5px; - margin-top: -12px; - margin-bottom: 10px; - margin-right: 30px; - padding-right: 20px; - padding-left: 20px; - padding-top: 5px; - padding-bottom: 5px; -} -.mainpageright > hr { - margin-top: 20px; - width: 100%; - margin-left: -15px; - margin-right: -15px; - margin-bottom: 20px; -} -.justifysp { - display: flex; - justify-content: space-between; -} -.org_about_img { - margin-top: 0px; - margin-bottom: 30px; - border-radius: 5px; - max-width: 100%; - height: auto; - width: 90%; -} -.invitebtn { - border: 1px solid #e8e5e5; - box-shadow: 0 2px 2px #e8e5e5; - border-radius: 5px; - background-color: #31bb6b; - width: 20%; - height: 40px; - font-size: 16px; - color: white; - outline: none; - font-weight: 600; - cursor: pointer; - transition: transform 0.2s, box-shadow 0.2s; -} -.flexdir { - display: flex; - flex-direction: row; justify-content: space-between; - border: none; + align-items: center; } -.logintitleinvite { - color: #707070; +.cardHeader .cardTitle { + font-size: 1.2rem; font-weight: 600; - font-size: 20px; - margin-bottom: 20px; - padding-bottom: 5px; - border-bottom: 3px solid #31bb6b; - width: 40%; -} - -.cancel > i { - margin-top: 5px; - transform: scale(1.2); - cursor: pointer; - color: #707070; -} - -.greenregbtn { - margin: 1rem 0 0; - margin-top: 10px; - border: 1px solid #e8e5e5; - box-shadow: 0 2px 2px #e8e5e5; - padding: 10px 10px; - border-radius: 5px; - background-color: #31bb6b; - width: 100%; - font-size: 16px; - color: white; - outline: none; - font-weight: 600; - cursor: pointer; - transition: transform 0.2s, box-shadow 0.2s; - width: 100%; -} - -.loader, -.loader:after { - border-radius: 50%; - width: 10em; - height: 10em; -} -.loader { - margin: 60px auto; - margin-top: 35vh !important; - font-size: 10px; - position: relative; - text-indent: -9999em; - border-top: 1.1em solid rgba(255, 255, 255, 0.2); - border-right: 1.1em solid rgba(255, 255, 255, 0.2); - border-bottom: 1.1em solid rgba(255, 255, 255, 0.2); - border-left: 1.1em solid #febc59; - -webkit-transform: translateZ(0); - -ms-transform: translateZ(0); - transform: translateZ(0); - -webkit-animation: load8 1.1s infinite linear; - animation: load8 1.1s infinite linear; -} -@-webkit-keyframes load8 { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -@keyframes load8 { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } } -.cardContainer { - box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05); +.cardBody { + min-height: 180px; + padding-top: 0; } -.dashboardIcon { - font-size: 50px; - color: #31bb6b; -} - -.counterNumber { - font-size: 24px; - margin-bottom: 0rem !important; -} - -.counterHead { - color: #99abb4; - margin-bottom: 0rem !important; +.cardBody .emptyContainer { + display: flex; + height: 180px; + justify-content: center; + align-items: center; } diff --git a/src/screens/OrganizationDashboard/OrganizationDashboard.test.tsx b/src/screens/OrganizationDashboard/OrganizationDashboard.test.tsx index 612bbd30de..61d3eebc60 100644 --- a/src/screens/OrganizationDashboard/OrganizationDashboard.test.tsx +++ b/src/screens/OrganizationDashboard/OrganizationDashboard.test.tsx @@ -1,27 +1,19 @@ import React from 'react'; import { MockedProvider } from '@apollo/react-testing'; -import type { RenderResult } from '@testing-library/react'; -import { - act, - render, - screen, - fireEvent, - waitFor, -} from '@testing-library/react'; -import { Provider } from 'react-redux'; -import { BrowserRouter } from 'react-router-dom'; +import { act, fireEvent, render, screen } from '@testing-library/react'; import 'jest-location-mock'; import { I18nextProvider } from 'react-i18next'; +import { Provider } from 'react-redux'; +import { BrowserRouter } from 'react-router-dom'; -import OrganizationDashboard from './OrganizationDashboard'; -import { - MOCKS_WITHOUT_IMAGE, - MOCKS_WITH_IMAGE, -} from './OrganizationDashboardMocks'; import { store } from 'state/store'; -import i18nForTest from 'utils/i18nForTest'; -import { USER_ORGANIZATION_LIST } from 'GraphQl/Queries/Queries'; import { StaticMockLink } from 'utils/StaticMockLink'; +import OrganizationDashboard from './OrganizationDashboard'; +import { EMPTY_MOCKS, ERROR_MOCKS, MOCKS } from './OrganizationDashboardMocks'; +import i18nForTest from 'utils/i18nForTest'; +import dayjs from 'dayjs'; +import { toast } from 'react-toastify'; +import userEvent from '@testing-library/user-event'; async function wait(ms = 100): Promise { await act(() => { @@ -30,125 +22,124 @@ async function wait(ms = 100): Promise { }); }); } -const link2 = new StaticMockLink(MOCKS_WITH_IMAGE, true); -const link3 = new StaticMockLink(MOCKS_WITHOUT_IMAGE, true); -const customRender = (userType: any): RenderResult => { - const mockedUser = { - request: { - query: USER_ORGANIZATION_LIST, - variables: { id: localStorage.getItem('id') }, - }, - result: { - data: { - user: { - userType, - firstName: 'John', - lastName: 'Doe', - image: '', - email: 'John_Does_Palasidoes@gmail.com', - adminFor: { - _id: 1, - name: 'Akatsuki', - image: '', - }, - }, - }, - }, - }; - - const mocks = [mockedUser, ...MOCKS_WITHOUT_IMAGE]; - - const link1 = new StaticMockLink(mocks, true); - - return render( - - - - - - - - - +const link1 = new StaticMockLink(MOCKS, true); +const link2 = new StaticMockLink(EMPTY_MOCKS, true); +const link3 = new StaticMockLink(ERROR_MOCKS, true); + +jest.mock('react-toastify', () => ({ + toast: { + success: jest.fn(), + warn: jest.fn(), + error: jest.fn(), + }, +})); + +beforeEach(() => { + localStorage.setItem('FirstName', 'John'); + localStorage.setItem('LastName', 'Doe'); + localStorage.setItem('UserType', 'SUPERADMIN'); + localStorage.setItem( + 'UserImage', + 'https://api.dicebear.com/5.x/initials/svg?seed=John%20Doe' ); -}; +}); + +afterEach(() => { + jest.clearAllMocks(); + localStorage.clear(); +}); describe('Organisation Dashboard Page', () => { - test('should render props and text elements test for the screen', async () => { - window.location.replace('/orglist'); - - const { container } = render( - - - - - - - - - - ); - - expect(container.textContent).not.toBe('Loading data...'); + test('Should render props and text elements test for the screen', async () => { + await act(async () => { + render( + + + + + + + + + + ); + }); + await wait(); - expect(container.textContent).toMatch('Location'); - expect(container.textContent).toMatch('About'); - expect(container.textContent).toMatch('Statistics'); - expect(window.location).toBeAt('/orglist'); - }); + expect(screen.getByText('Members')).toBeInTheDocument(); + expect(screen.getByText('Admins')).toBeInTheDocument(); + expect(screen.getAllByText('Posts')).toHaveLength(2); + expect(screen.getAllByText('Events')).toHaveLength(2); + expect(screen.getByText('Blocked Users')).toBeInTheDocument(); + expect(screen.getByText('Requests')).toBeInTheDocument(); + expect(screen.getByText('Upcoming events')).toBeInTheDocument(); + expect(screen.getByText('Latest posts')).toBeInTheDocument(); + expect(screen.getByText('Membership requests')).toBeInTheDocument(); + expect(screen.getAllByText('View all')).toHaveLength(3); - test('should display delete button for SUPERADMIN', async () => { - const { getByTestId, queryByTestId } = customRender('SUPERADMIN'); - await waitFor(() => - expect(queryByTestId('deleteClick')).toBeInTheDocument() - ); + // Checking if events are rendered + expect(screen.getByText('Event 1')).toBeInTheDocument(); + expect( + screen.getByText( + `${dayjs(new Date()).add(1, 'day').format('DD-MM-YYYY')}` + ) + ).toBeInTheDocument(); - fireEvent.click(getByTestId('deleteClick')); - fireEvent.click(getByTestId(/deleteOrganizationBtn/i)); - expect(window.location).not.toBeNull(); - }); + // Checking if posts are rendered + expect(screen.getByText('Post 1')).toBeInTheDocument(); - test('should not display delete button for non-SUPERADMIN', async () => { - const { queryByTestId } = customRender('ADMIN'); - await waitFor(() => - expect(queryByTestId('deleteClick')).not.toBeInTheDocument() - ); + // Checking if membership requests are rendered + expect(screen.getByText('Jane Doe')).toBeInTheDocument(); }); - test('Should check if organisation image is present', async () => { - const { container } = render( - - - - - - - - - - ); - - expect(container.textContent).not.toBe('Loading data...'); + test('Testing buttons and checking empty events, posts and membership requests', async () => { + await act(async () => { + render( + + + + + + + + + + ); + }); + await wait(); - const image = screen.getByTestId(/orgDashImgPresent/i); - expect(image).toBeInTheDocument(); + const viewEventsBtn = screen.getByTestId('viewAllEvents'); + const viewPostsBtn = screen.getByTestId('viewAllPosts'); + const viewMSBtn = screen.getByTestId('viewAllMembershipRequests'); + + userEvent.click(viewEventsBtn); + userEvent.click(viewPostsBtn); + fireEvent.click(viewMSBtn); + expect(toast.success).toBeCalledWith('Coming soon!'); + + expect( + screen.getByText('No membership requests present') + ).toBeInTheDocument(); + expect(screen.getByText('No upcoming events')).toBeInTheDocument(); + expect(screen.getByText('No posts present')).toBeInTheDocument(); }); - test('Should check if organisation image is not present', async () => { - const { container } = render( - - - - - - - - - - ); - - expect(container.textContent).not.toBe('Loading data...'); + + test('Testing error scenario', async () => { + await act(async () => { + render( + + + + + + + + + + ); + }); + await wait(); - const image = screen.getByTestId(/orgDashImgAbsent/i); - expect(image).toBeInTheDocument(); + expect(window.location).toBeAt('/orglist'); }); }); diff --git a/src/screens/OrganizationDashboard/OrganizationDashboard.tsx b/src/screens/OrganizationDashboard/OrganizationDashboard.tsx index 9d31a5c535..87e538a538 100644 --- a/src/screens/OrganizationDashboard/OrganizationDashboard.tsx +++ b/src/screens/OrganizationDashboard/OrganizationDashboard.tsx @@ -1,37 +1,55 @@ -import React, { useState } from 'react'; -import Row from 'react-bootstrap/Row'; +import React, { useEffect, useState } from 'react'; +import { useQuery } from '@apollo/client'; +import { Button, Card } from 'react-bootstrap'; import Col from 'react-bootstrap/Col'; -import { useMutation, useQuery } from '@apollo/client'; -import { useSelector } from 'react-redux'; -import type { RootState } from 'state/reducers'; -import { Container, Modal } from 'react-bootstrap'; +import Row from 'react-bootstrap/Row'; import { useTranslation } from 'react-i18next'; -import Button from 'react-bootstrap/Button'; -import { Link } from 'react-router-dom'; -import styles from './OrganizationDashboard.module.css'; -import AboutImg from 'assets/images/defaultImg.png'; import { ORGANIZATIONS_LIST, ORGANIZATION_EVENT_LIST, ORGANIZATION_POST_LIST, - USER_ORGANIZATION_LIST, } from 'GraphQl/Queries/Queries'; -import { DELETE_ORGANIZATION_MUTATION } from 'GraphQl/Mutations/mutations'; -import { errorHandler } from 'utils/errorHandler'; -import Loader from 'components/Loader/Loader'; +import { ReactComponent as AdminsIcon } from 'assets/svgs/admin.svg'; +import { ReactComponent as BlockedUsersIcon } from 'assets/svgs/blockedUser.svg'; +import { ReactComponent as EventsIcon } from 'assets/svgs/events.svg'; +import { ReactComponent as PostsIcon } from 'assets/svgs/post.svg'; +import { ReactComponent as UsersIcon } from 'assets/svgs/users.svg'; +import DashBoardCard from 'components/OrganizationDashCards/DashboardCard'; import OrganizationScreen from 'components/OrganizationScreen/OrganizationScreen'; +import styles from './OrganizationDashboard.module.css'; +import CardItem from 'components/OrganizationDashCards/CardItem'; +import type { ApolloError } from '@apollo/client'; +import type { + InterfaceQueryOrganizationEventListItem, + InterfaceQueryOrganizationPostListItem, + InterfaceQueryOrganizationsListObject, +} from 'utils/interfaces'; +import { toast } from 'react-toastify'; +import { useHistory } from 'react-router-dom'; +import CardItemLoading from 'components/OrganizationDashCards/CardItemLoading'; +import DashboardCardLoading from 'components/OrganizationDashCards/DashboardCardLoading'; function organizationDashboard(): JSX.Element { const { t } = useTranslation('translation', { keyPrefix: 'dashboard' }); - const [showDeleteModal, setShowDeleteModal] = useState(false); document.title = t('title'); const currentUrl = window.location.href.split('=')[1]; + const history = useHistory(); + const [upcomingEvents, setUpcomingEvents] = useState< + InterfaceQueryOrganizationEventListItem[] + >([]); - const appRoutes = useSelector((state: RootState) => state.appRoutes); - const { targets } = appRoutes; - - const { data, loading, error } = useQuery(ORGANIZATIONS_LIST, { + const { + data, + loading: loadingOrgData, + error: errorOrg, + }: { + data?: { + organizations: InterfaceQueryOrganizationsListObject[]; + }; + loading: boolean; + error?: ApolloError; + } = useQuery(ORGANIZATIONS_LIST, { variables: { id: currentUrl }, }); @@ -39,6 +57,14 @@ function organizationDashboard(): JSX.Element { data: postData, loading: loadingPost, error: errorPost, + }: { + data: + | { + postsByOrganization: InterfaceQueryOrganizationPostListItem[]; + } + | undefined; + loading: boolean; + error?: ApolloError; } = useQuery(ORGANIZATION_POST_LIST, { variables: { id: currentUrl }, }); @@ -47,274 +73,218 @@ function organizationDashboard(): JSX.Element { data: eventData, loading: loadingEvent, error: errorEvent, + }: { + data: + | { + eventsByOrganization: InterfaceQueryOrganizationEventListItem[]; + } + | undefined; + loading: boolean; + error?: ApolloError; } = useQuery(ORGANIZATION_EVENT_LIST, { variables: { id: currentUrl }, }); - const { data: data2 } = useQuery(USER_ORGANIZATION_LIST, { - variables: { id: localStorage.getItem('id') }, - }); - - const canDelete = data2?.user.userType === 'SUPERADMIN'; - const toggleDeleteModal = (): void => setShowDeleteModal(!showDeleteModal); - const [del] = useMutation(DELETE_ORGANIZATION_MUTATION); - - const deleteOrg = async (): Promise => { - try { - const { data } = await del({ - variables: { - id: currentUrl, - }, + // UseEffect to update upcomingEvents array + useEffect(() => { + if (eventData && eventData?.eventsByOrganization.length > 0) { + const tempUpcomingEvents: InterfaceQueryOrganizationEventListItem[] = []; + eventData?.eventsByOrganization.map((event) => { + const startDate = new Date(event.startDate); + const now = new Date(); + if (startDate > now) { + tempUpcomingEvents.push(event); + } }); - - /* istanbul ignore next */ - if (data) { - window.location.replace('/orglist'); - } - } catch (error: any) { - /* istanbul ignore next */ - errorHandler(t, error); + setUpcomingEvents(tempUpcomingEvents); } - }; + }, [eventData?.eventsByOrganization]); - if (loading || loadingPost || loadingEvent) { - return ; - } - - /* istanbul ignore next */ - if (error || errorPost || errorEvent) { + if (errorOrg || errorPost || errorEvent) { window.location.replace('/orglist'); } - return ( <> - - -
-
-
{t('about')}
-

- {data?.organizations[0].description} -

-

- {t('location')} : {data?.organizations[0].location} -

- -

- {canDelete && ( + + + {loadingOrgData ? ( + + {[...Array(6)].map((_, index) => { + return ( + + + + ); + })} + + ) : ( + + + } + /> + + + } + /> + + + } + /> + + + } + /> + + + } + /> + + + } + /> + + + )} + + + +

+
Upcoming events
- )} -

-
-
- - - -
- -

{t('statistics')}

-
- - - { - const { name } = target; - return name == 'People'; - }) - .map((target: any) => { - return target.url; - })}`} - > -
-
- -
-
-

- {data?.organizations[0].members.length} -

-

{t('members')}

-
-
- - - - { - const { name } = target; - return name == 'People'; - }) - .map((target: any) => { - return target.url; - })}`} - > -
-
-
- -
-
-

- {data?.organizations[0].admins.length} -

-

{t('admins')}

-
-
-
- - - - { - const { name } = target; - return name == 'Posts'; - }) - .map((target: any) => { - return target.url; - })}`} - > -
-
- -
-
-

- {postData?.postsByOrganization.length} -

-

{t('posts')}

-
+
+ + {loadingEvent ? ( + [...Array(4)].map((_, index) => { + return ; + }) + ) : upcomingEvents.length == 0 ? ( +
+
No upcoming events
- - - - { - const { name } = target; - return name == 'Events'; - }) - .map((target: any) => { - return target.url; - })}`} - > -
-
- -
-
-

- {eventData?.eventsByOrganization.length} -

-

{t('events')}

-
-
- - - - { - const { name } = target; - return name == 'Block/Unblock'; - }) - .map((target: any) => { - return target.url; - })}`} + ) : ( + upcomingEvents.slice(0, 5).map((event) => { + return ( + + ); + }) + )} +
+ + + + +
+
Latest posts
+ +
+ + {loadingPost ? ( + [...Array(4)].map((_, index) => { + return ; + }) + ) : postData?.postsByOrganization?.length == 0 ? ( +
+
No posts present
-
- - + ) : ( + postData?.postsByOrganization.slice(0, 5).map((post) => { + return ( + + ); + }) + )} + + + + + + + +
+
Membership requests
+
-
+ + {loadingOrgData ? ( + [...Array(4)].map((_, index) => { + return ; + }) + ) : data?.organizations[0].membershipRequests.length == 0 ? ( +
+
No membership requests present
+
+ ) : ( + data?.organizations[0]?.membershipRequests + .slice(0, 8) + .map((request) => { + return ( + + ); + }) + )} +
+ - - -
{t('deleteOrganization')}
- -
- {t('deleteMsg')} - - - - -
); diff --git a/src/screens/OrganizationDashboard/OrganizationDashboardMocks.ts b/src/screens/OrganizationDashboard/OrganizationDashboardMocks.ts index 8335e55f91..f1672c03ca 100644 --- a/src/screens/OrganizationDashboard/OrganizationDashboardMocks.ts +++ b/src/screens/OrganizationDashboard/OrganizationDashboardMocks.ts @@ -1,11 +1,11 @@ -import { DELETE_ORGANIZATION_MUTATION } from 'GraphQl/Mutations/mutations'; import { ORGANIZATIONS_LIST, ORGANIZATION_EVENT_LIST, ORGANIZATION_POST_LIST, } from 'GraphQl/Queries/Queries'; +import dayjs from 'dayjs'; -export const MOCKS_WITHOUT_IMAGE = [ +export const MOCKS = [ { request: { query: ORGANIZATIONS_LIST, @@ -14,58 +14,53 @@ export const MOCKS_WITHOUT_IMAGE = [ data: { organizations: [ { - _id: 1, + _id: 123, image: '', name: 'Dummy Organization', description: 'This is a Dummy Organization', + location: 'New Delhi', + isPublic: true, + visibleInSearch: false, creator: { firstName: '', lastName: '', email: '', }, - location: 'New Delhi', - members: { - _id: '123', - firstName: 'John', - lastName: 'Doe', - email: 'johndoe@gmail.com', - }, - admins: { - _id: '123', - firstName: 'John', - lastName: 'Doe', - email: 'johndoe@gmail.com', - }, - membershipRequests: { - _id: '456', - user: { - firstName: 'Sam', - lastName: 'Smith', - email: 'samsmith@gmail.com', + + members: [ + { + _id: '123', + firstName: 'John', + lastName: 'Doe', + email: 'johndoe@gmail.com', }, - }, - blockedUsers: { - _id: '789', - firstName: 'Steve', - lastName: 'Smith', - email: 'stevesmith@gmail.com', - }, - spamCount: [ + ], + admins: [ + { + _id: '123', + firstName: 'John', + lastName: 'Doe', + email: 'johndoe@gmail.com', + }, + ], + membershipRequests: [ { - _id: '6954', + _id: '456', user: { - _id: '878', - firstName: 'Joe', - lastName: 'Root', - email: 'joeroot@gmail.com', - }, - isReaded: false, - groupchat: { - _id: '321', - title: 'Dummy', + firstName: 'Jane', + lastName: 'Doe', + email: 'janedoe@gmail.com', }, }, ], + blockedUsers: [ + { + _id: '789', + firstName: 'Steve', + lastName: 'Smith', + email: 'stevesmith@gmail.com', + }, + ], }, ], }, @@ -80,8 +75,8 @@ export const MOCKS_WITHOUT_IMAGE = [ postsByOrganization: [ { _id: 1, - title: 'Akatsuki', - text: 'Capture Jinchuriki', + title: 'Post 1', + text: 'Test Post', imageUrl: '', videoUrl: '', creator: { @@ -95,20 +90,6 @@ export const MOCKS_WITHOUT_IMAGE = [ }, }, }, - { - request: { - query: DELETE_ORGANIZATION_MUTATION, - }, - result: { - data: { - removeOrganization: [ - { - _id: 1, - }, - ], - }, - }, - }, { request: { query: ORGANIZATION_EVENT_LIST, @@ -118,14 +99,28 @@ export const MOCKS_WITHOUT_IMAGE = [ eventsByOrganization: [ { _id: 1, - title: 'Event', + title: 'Event 1', description: 'Event Test', - startDate: '', - endDate: '', + startDate: dayjs(new Date()).add(1, 'day'), + endDate: dayjs(new Date()).add(3, 'day'), location: 'New Delhi', - startTime: '02:00', - endTime: '06:00', - allDay: false, + startTime: '', + endTime: '', + allDay: true, + recurring: false, + isPublic: true, + isRegisterable: true, + }, + { + _id: 2, + title: 'Event 2', + description: 'Event Test', + startDate: dayjs(new Date()), + endDate: dayjs(new Date()).add(1, 'day'), + location: 'Jamaica', + startTime: '', + endTime: '', + allDay: true, recurring: false, isPublic: true, isRegisterable: true, @@ -136,7 +131,7 @@ export const MOCKS_WITHOUT_IMAGE = [ }, ]; -export const MOCKS_NO_TAGS = [ +export const EMPTY_MOCKS = [ { request: { query: ORGANIZATIONS_LIST, @@ -145,56 +140,41 @@ export const MOCKS_NO_TAGS = [ data: { organizations: [ { - _id: 1, + _id: 123, image: '', name: 'Dummy Organization', description: 'This is a Dummy Organization', - creator: { - firstName: '', - lastName: '', - email: '', - }, location: 'New Delhi', - members: { - _id: '123', - firstName: 'John', - lastName: 'Doe', - email: 'johndoe@gmail.com', - }, - admins: { - _id: '123', + isPublic: true, + visibleInSearch: false, + creator: { firstName: 'John', lastName: 'Doe', email: 'johndoe@gmail.com', }, - membershipRequests: { - _id: '456', - user: { - firstName: 'Sam', - lastName: 'Smith', - email: 'samsmith@gmail.com', + members: [ + { + _id: '123', + firstName: 'John', + lastName: 'Doe', + email: 'johndoe@gmail.com', }, - }, - blockedUsers: { - _id: '789', - firstName: 'Steve', - lastName: 'Smith', - email: 'stevesmith@gmail.com', - }, - spamCount: [ + ], + admins: [ { - _id: '6954', - user: { - _id: '878', - firstName: 'Joe', - lastName: 'Root', - email: 'joeroot@gmail.com', - }, - isReaded: false, - groupchat: { - _id: '321', - title: 'Dummy', - }, + _id: '123', + firstName: 'John', + lastName: 'Doe', + email: 'johndoe@gmail.com', + }, + ], + membershipRequests: [], + blockedUsers: [ + { + _id: '789', + firstName: 'Steve', + lastName: 'Smith', + email: 'stevesmith@gmail.com', }, ], }, @@ -208,21 +188,7 @@ export const MOCKS_NO_TAGS = [ }, result: { data: { - postsByOrganization: [ - { - _id: 1, - title: 'Akatsuki', - text: 'Capture Jinchuriki', - imageUrl: '', - videoUrl: '', - creator: { - _id: '583', - firstName: 'John', - lastName: 'Doe', - email: 'johndoe@gmail.com', - }, - }, - ], + postsByOrganization: [], }, }, }, @@ -232,140 +198,29 @@ export const MOCKS_NO_TAGS = [ }, result: { data: { - eventsByOrganization: [ - { - _id: 1, - title: 'Event', - description: 'Event Test', - startDate: '', - endDate: '', - location: 'New Delhi', - startTime: '02:00', - endTime: '06:00', - allDay: false, - recurring: false, - isPublic: true, - isRegisterable: true, - }, - ], + eventsByOrganization: [], }, }, }, ]; -export const MOCKS_WITH_IMAGE = [ +export const ERROR_MOCKS = [ { request: { query: ORGANIZATIONS_LIST, }, - result: { - data: { - organizations: [ - { - _id: 1, - image: 'https://via.placeholder.com/200x200', - name: 'Dummy Organization', - description: 'This is a Dummy Organization', - creator: { - firstName: '', - lastName: '', - email: '', - }, - location: 'New Delhi', - members: { - _id: '123', - firstName: 'John', - lastName: 'Doe', - email: 'johndoe@gmail.com', - }, - admins: { - _id: '123', - firstName: 'John', - lastName: 'Doe', - email: 'johndoe@gmail.com', - }, - membershipRequests: { - _id: '456', - user: { - firstName: 'Sam', - lastName: 'Smith', - email: 'samsmith@gmail.com', - }, - }, - blockedUsers: { - _id: '789', - firstName: 'Steve', - lastName: 'Smith', - email: 'stevesmith@gmail.com', - }, - spamCount: [ - { - _id: '6954', - user: { - _id: '878', - firstName: 'Joe', - lastName: 'Root', - email: 'joeroot@gmail.com', - }, - isReaded: false, - groupchat: { - _id: '321', - title: 'Dummy', - }, - }, - ], - }, - ], - }, - }, + error: new Error('Mock Graphql ORGANIZATIONS_LIST Error'), }, { request: { query: ORGANIZATION_POST_LIST, }, - result: { - data: { - postsByOrganization: [ - { - _id: 1, - title: 'Akatsuki', - text: 'Capture Jinchuriki', - imageUrl: '', - videoUrl: '', - creator: { - _id: '583', - firstName: 'John', - lastName: 'Doe', - email: 'johndoe@gmail.com', - }, - }, - ], - }, - }, + error: new Error('Mock Graphql ORGANIZATION_POST_LIST Error'), }, { request: { query: ORGANIZATION_EVENT_LIST, }, - result: { - data: { - eventsByOrganization: [ - { - _id: 1, - title: 'Event', - description: 'Event Test', - startDate: '', - endDate: '', - location: 'New Delhi', - startTime: '02:00', - endTime: '06:00', - allDay: false, - recurring: false, - isPublic: true, - isRegisterable: true, - }, - ], - }, - }, + error: new Error('Mock Graphql ORGANIZATION_EVENT_LIST Error'), }, ]; diff --git a/src/utils/interfaces.ts b/src/utils/interfaces.ts index 44994640f8..304fc36715 100644 --- a/src/utils/interfaces.ts +++ b/src/utils/interfaces.ts @@ -46,6 +46,8 @@ export interface InterfaceQueryOrganizationsListObject { name: string; description: string; location: string; + isPublic: boolean; + visibleInSearch: boolean; members: { _id: string; firstName: string; @@ -73,3 +75,41 @@ export interface InterfaceQueryOrganizationsListObject { email: string; }[]; } + +export interface InterfaceQueryOrganizationPostListItem { + _id: string; + title: string; + text: string; + imageUrl: null; + videoUrl: null; + creator: { + _id: string; + firstName: string; + lastName: string; + email: string; + }[]; +} +export interface InterfaceQueryOrganizationEventListItem { + _id: string; + title: string; + description: string; + startDate: string; + endDate: string; + location: string; + startTime: string; + endTime: string; + allDay: boolean; + recurring: boolean; + isPublic: boolean; + isRegisterable: boolean; +} + +export interface InterfaceQueryBlockPageMemberListItem { + _id: string; + firstName: string; + lastName: string; + email: string; + organizationsBlockedBy: { + _id: string; + }[]; +}