Skip to content

Commit

Permalink
Merge branch 'develop-postgres' into issue-2072-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gurramkarthiknetha authored Jan 23, 2025
2 parents f44000e + 846ce57 commit a39e835
Show file tree
Hide file tree
Showing 1,055 changed files with 27,201 additions and 9,624 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ src/components/CheckIn/tagTemplate.ts
package.json
package-lock.json
tsconfig.json

fix-readme-links.js
fix-repo-url.js
# Ignore the Docusaurus website subdirectory
docs/**

Expand Down
27 changes: 14 additions & 13 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Count number of lines
run: |
chmod +x ./.github/workflows/scripts/countline.py
./.github/workflows/scripts/countline.py --lines 600 --exclude_files src/screens/LoginPage/LoginPage.tsx src/GraphQl/Queries/Queries.ts src/screens/OrgList/OrgList.tsx src/GraphQl/Mutations/mutations.ts src/components/EventListCard/EventListCardModals.tsx src/components/TagActions/TagActionsMocks.ts src/utils/interfaces.ts src/screens/MemberDetail/MemberDetail.tsx src/components/OrgPostCard/OrgPostCard.tsx
./.github/workflows/scripts/countline.py --lines 600 --exclude_files src/screens/LoginPage/LoginPage.tsx src/GraphQl/Queries/Queries.ts src/screens/OrgList/OrgList.tsx src/GraphQl/Mutations/mutations.ts src/components/EventListCard/EventListCardModals.tsx src/components/TagActions/TagActionsMocks.ts src/utils/interfaces.ts src/screens/MemberDetail/MemberDetail.tsx src/components/OrgPostCard/OrgPostCard.tsx src/components/UsersTableItem/UsersTableItem.tsx
- name: Get changed TypeScript files
id: changed-files
Expand All @@ -65,9 +65,7 @@ jobs:
run: npm run check-tsdoc # Run the TSDoc check script

- name: Check for localStorage Usage
run: |
chmod +x scripts/githooks/check-localstorage-usage.js
node scripts/githooks/check-localstorage-usage.js --scan-entire-repo
run: npx tsx scripts/githooks/check-localstorage-usage.ts --scan-entire-repo

- name: Compare translation files
run: |
Expand Down Expand Up @@ -416,27 +414,30 @@ jobs:
run: |
docker stop talawa-admin-app-container
docker rm talawa-admin-app-container

Test-Docusaurus-Deployment:
name: Test Deployment to https://docs-admin.talawa.io
runs-on: ubuntu-latest
needs: [Docker-Start-Check, Start-App-Without-Docker]
# Run only if the develop-postgres branch and not dependabot
# Run only if the develop-postgres branch and not dependabot
if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.base.ref == 'develop-postgres' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Checkout the Repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: yarn
cache-dependency-path: 'docs/'
# Run Docusaurus in the ./docs directory
node-version: '20.x'

- name: Install dependencies
working-directory: ./docs
run: yarn install --frozen-lockfile
run: npm install

- name: Test building the website
working-directory: ./docs
run: yarn build
run: npm run build

Check-Target-Branch:
if: ${{ github.actor != 'dependabot[bot]' }}
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/push-deploy-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
name: Deploy https://docs-admin.talawa.io website
runs-on: ubuntu-latest
# Run only if the develop-postgres branch and not dependabot
if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.base.ref == 'develop-postgres' }}
if: ${{ github.actor != 'dependabot[bot]' }}
environment:
# This "name" has to be the repos' branch that contains
# the current active website. There must be an entry for
Expand All @@ -38,9 +38,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: yarn
cache-dependency-path: 'docs/'
node-version: '20.x'
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DEPLOY_GITHUB_PAGES }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Docusaurus related
.docusaurus

# generated docs using husky pre-commit hook
# /docs/docs/auto-docs

# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# files that interfere with YARN
Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

npm run generate-docs
npm run format:fix
# npm run lint:fix
npm run lint-staged
Expand Down
2 changes: 1 addition & 1 deletion .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"**/*.{ts,tsx,yml}": "eslint --fix",
"**/*.{ts,tsx,json,scss,css,yml}": "prettier --write",
"**/*.{ts,tsx}": "node scripts/githooks/check-localstorage-usage.js"
"**/*.{ts,tsx}": "npx tsx scripts/githooks/check-localstorage-usage.ts"
}
Empty file removed 3141
Empty file.
28 changes: 28 additions & 0 deletions docs/docs/auto-docs/App/functions/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[Admin Docs](/)

***

# Function: default()

> **default**(): `JSX.Element`
Defined in: [src/App.tsx:74](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/App.tsx#L74)

This is the main function for our application. It sets up all the routes and components,
defining how the user can navigate through the app. The function uses React Router's `Routes`
and `Route` components to map different URL paths to corresponding screens and components.

## Important Details
- **UseEffect Hook**: This hook checks user authentication status using the `CHECK_AUTH` GraphQL query.
- **Plugins**: It dynamically loads additional routes for any installed plugins.
- **Routes**:
- The root route ("/") takes the user to the `LoginPage`.
- Protected routes are wrapped with the `SecuredRoute` component to ensure they are only accessible to authenticated users.
- Admin and Super Admin routes allow access to organization and user management screens.
- User portal routes allow end-users to interact with organizations, settings, chat, events, etc.

## Returns

`JSX.Element`

The rendered routes and components of the application.
9 changes: 9 additions & 0 deletions docs/docs/auto-docs/Constant/constant/variables/AUTH_TOKEN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Admin Docs](/)

***

# Variable: AUTH\_TOKEN

> `const` **AUTH\_TOKEN**: `""` = `''`
Defined in: [src/Constant/constant.ts:1](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/Constant/constant.ts#L1)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Admin Docs](/)

***

# Variable: BACKEND\_URL

> `const` **BACKEND\_URL**: `string` = `process.env.REACT_APP_TALAWA_URL`
Defined in: [src/Constant/constant.ts:2](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/Constant/constant.ts#L2)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Admin Docs](/)

***

# Variable: REACT\_APP\_BACKEND\_WEBSOCKET\_URL

> `const` **REACT\_APP\_BACKEND\_WEBSOCKET\_URL**: `string`
Defined in: [src/Constant/constant.ts:6](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/Constant/constant.ts#L6)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Admin Docs](/)

***

# Variable: REACT\_APP\_CUSTOM\_PORT

> `const` **REACT\_APP\_CUSTOM\_PORT**: `string` = `process.env.PORT`
Defined in: [src/Constant/constant.ts:5](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/Constant/constant.ts#L5)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Admin Docs](/)

***

# Variable: REACT\_APP\_USE\_RECAPTCHA

> `const` **REACT\_APP\_USE\_RECAPTCHA**: `string` = `process.env.REACT_APP_USE_RECAPTCHA`
Defined in: [src/Constant/constant.ts:4](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/Constant/constant.ts#L4)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Admin Docs](/)

***

# Variable: RECAPTCHA\_SITE\_KEY

> `const` **RECAPTCHA\_SITE\_KEY**: `string` = `process.env.REACT_APP_RECAPTCHA_SITE_KEY`
Defined in: [src/Constant/constant.ts:3](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/Constant/constant.ts#L3)
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[Admin Docs](/)

***

# Variable: CREATE\_ACTION\_ITEM\_CATEGORY\_MUTATION

> `const` **CREATE\_ACTION\_ITEM\_CATEGORY\_MUTATION**: `DocumentNode`
Defined in: [src/GraphQl/Mutations/ActionItemCategoryMutations.ts:11](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/GraphQl/Mutations/ActionItemCategoryMutations.ts#L11)

GraphQL mutation to create an action item category.

## Param

Name of the ActionItemCategory.

## Param

Disabled status of the ActionItemCategory.

## Param

Organization to which the ActionItemCategory belongs.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[Admin Docs](/)

***

# Variable: UPDATE\_ACTION\_ITEM\_CATEGORY\_MUTATION

> `const` **UPDATE\_ACTION\_ITEM\_CATEGORY\_MUTATION**: `DocumentNode`
Defined in: [src/GraphQl/Mutations/ActionItemCategoryMutations.ts:35](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/GraphQl/Mutations/ActionItemCategoryMutations.ts#L35)

GraphQL mutation to update an action item category.

## Param

The id of the ActionItemCategory to be updated.

## Param

Updated name of the ActionItemCategory.

## Param

Updated disabled status of the ActionItemCategory.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[Admin Docs](/)

***

# Variable: CREATE\_ACTION\_ITEM\_MUTATION

> `const` **CREATE\_ACTION\_ITEM\_MUTATION**: `DocumentNode`
Defined in: [src/GraphQl/Mutations/ActionItemMutations.ts:14](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/GraphQl/Mutations/ActionItemMutations.ts#L14)

GraphQL mutation to create an action item.

## Param

ActionItemCategory to which the ActionItem is related.

## Param

User to whom the ActionItem is assigned.

## Param

Notes prior to completion.

## Param

Due date.

## Param

Event to which the ActionItem is related.

## Param

Hours allotted for the ActionItem.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[Admin Docs](/)

***

# Variable: DELETE\_ACTION\_ITEM\_MUTATION

> `const` **DELETE\_ACTION\_ITEM\_MUTATION**: `DocumentNode`
Defined in: [src/GraphQl/Mutations/ActionItemMutations.ts:88](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/GraphQl/Mutations/ActionItemMutations.ts#L88)

GraphQL mutation to delete an action item.

## Param

Id of the ActionItem to be updated.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[Admin Docs](/)

***

# Variable: UPDATE\_ACTION\_ITEM\_MUTATION

> `const` **UPDATE\_ACTION\_ITEM\_MUTATION**: `DocumentNode`
Defined in: [src/GraphQl/Mutations/ActionItemMutations.ts:52](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/GraphQl/Mutations/ActionItemMutations.ts#L52)

GraphQL mutation to update an action item.

## Param

Id of the ActionItem to be updated.

## Param

User to whom the ActionItem is assigned.

## Param

Notes prior to completion.

## Param

Notes on completion.

## Param

Due date.

## Param

Completion date.

## Param

Whether the ActionItem has been completed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[Admin Docs](/)

***

# Variable: CREATE\_AGENDA\_ITEM\_CATEGORY\_MUTATION

> `const` **CREATE\_AGENDA\_ITEM\_CATEGORY\_MUTATION**: `DocumentNode`
Defined in: [src/GraphQl/Mutations/AgendaCategoryMutations.ts:9](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/GraphQl/Mutations/AgendaCategoryMutations.ts#L9)

GraphQL mutation to create an agenda category.

## Param

Name, Description, OrganizationID of the AgendaCategory.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[Admin Docs](/)

***

# Variable: DELETE\_AGENDA\_ITEM\_CATEGORY\_MUTATION

> `const` **DELETE\_AGENDA\_ITEM\_CATEGORY\_MUTATION**: `DocumentNode`
Defined in: [src/GraphQl/Mutations/AgendaCategoryMutations.ts:23](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/GraphQl/Mutations/AgendaCategoryMutations.ts#L23)

GraphQL mutation to delete an agenda category.

## Param

The ID of the AgendaCategory to be deleted.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[Admin Docs](/)

***

# Variable: UPDATE\_AGENDA\_ITEM\_CATEGORY\_MUTATION

> `const` **UPDATE\_AGENDA\_ITEM\_CATEGORY\_MUTATION**: `DocumentNode`
Defined in: [src/GraphQl/Mutations/AgendaCategoryMutations.ts:36](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/GraphQl/Mutations/AgendaCategoryMutations.ts#L36)

GraphQL mutation to update an agenda category.

## Param

The ID of the AgendaCategory to be updated.

## Param

Updated Name, Description, OrganizationID of the AgendaCategory.
Loading

0 comments on commit a39e835

Please sign in to comment.