Skip to content

Commit

Permalink
Feature Added: An option for users to leave the Organization (Fixes #…
Browse files Browse the repository at this point in the history
…1873) (#2629)

* Fixed: issue-#1873

* Fixed: issue-#1873

* Fixed: issue-#1873

* Fixed: issue-#1873

* Not title changed to title

* Ensure case-insensitive email verification for leaving organization

* Null check for organization data added

* Refetching of orgs added after leaving org

* GraphQL error scenarios to test cases Added

* GraphQL error scenarios to test cases Added 1

* Downgrade vitest to 2.1.5 to resolve peer dependency conflict

* fixed parsing error 1

* TSDoc comment added in LeaveOrganization.tsx 5

* LeaveOrganization.test.tsx file updated 1

* suggested changes are made

* suggested changes are made 2

* optimizing testing file 1

* optimizing testing file 2

* optimizing testing file 2-a

* Fixed: issue-#1873

* Fixed: issue-#1873

* Fixed: issue-#1873

* Fixed: issue-#1873

* Not title changed to title

* Ensure case-insensitive email verification for leaving organization

* Null check for organization data added

* Refetching of orgs added after leaving org

* GraphQL error scenarios to test cases Added

* GraphQL error scenarios to test cases Added 1

* Downgrade vitest to 2.1.5 to resolve peer dependency conflict

* fixed parsing error 1

* TSDoc comment added in LeaveOrganization.tsx 5

* LeaveOrganization.test.tsx file updated 1

* suggested changes are made

* suggested changes are made 2

* optimizing testing file 1

* optimizing testing file 2

* optimizing testing file 2-a

* suggested changes are made 3

* optimizing test file 3

* optimizing test file 3-a

* optimizing test file 3-b

* optimizing test file 3-c

* optimizing test file 3-d

* optimizing test file 3-e
  • Loading branch information
raggettii authored Dec 23, 2024
1 parent 2d7b26f commit 007bcb0
Show file tree
Hide file tree
Showing 13 changed files with 840 additions and 0 deletions.
3 changes: 3 additions & 0 deletions public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1405,6 +1405,9 @@
"userPledges": {
"title": "My Pledges"
},
"leaveOrganization": {
"title": "Leave Organization"
},
"eventVolunteers": {
"volunteers": "Volunteers",
"volunteer": "Volunteer",
Expand Down
3 changes: 3 additions & 0 deletions public/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1405,6 +1405,9 @@
"userPledges": {
"title": "Mes Promesses"
},
"leaveOrganization": {
"title": "Quitter l'organisation"
},
"eventVolunteers": {
"volunteers": "Bénévoles",
"volunteer": "Bénévole",
Expand Down
3 changes: 3 additions & 0 deletions public/locales/hi/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1405,6 +1405,9 @@
"userPledges": {
"title": "मेरी प्रतिज्ञाएँ"
},
"leaveOrganization": {
"title": "संगठन छोड़ें"
},
"eventVolunteers": {
"volunteers": "स्वयंसेवक",
"volunteer": "स्वयंसेवक",
Expand Down
3 changes: 3 additions & 0 deletions public/locales/sp/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1407,6 +1407,9 @@
"userPledges": {
"title": "Mis Promesas"
},
"leaveOrganization": {
"title": "Dejar la organización"
},
"eventVolunteers": {
"volunteers": "Voluntarios",
"volunteer": "Voluntario",
Expand Down
3 changes: 3 additions & 0 deletions public/locales/zh/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1405,6 +1405,9 @@
"userPledges": {
"title": "我的承诺"
},
"leaveOrganization": {
"title": "离开组织"
},
"eventVolunteers": {
"volunteers": "志愿者",
"volunteer": "志愿者",
Expand Down
5 changes: 5 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import EventDashboardScreen from 'components/EventDashboardScreen/EventDashboard
import Campaigns from 'screens/UserPortal/Campaigns/Campaigns';
import Pledges from 'screens/UserPortal/Pledges/Pledges';
import VolunteerManagement from 'screens/UserPortal/Volunteer/VolunteerManagement';
import LeaveOrganization from 'screens/UserPortal/LeaveOrganization/LeaveOrganization';

const { setItem } = useLocalStorage();

Expand Down Expand Up @@ -198,6 +199,10 @@ function app(): JSX.Element {
<Route path="/user/events/:orgId" element={<Events />} />
<Route path="/user/campaigns/:orgId" element={<Campaigns />} />
<Route path="/user/pledges/:orgId" element={<Pledges />} />
<Route
path="/user/leaveOrg/:orgId"
element={<LeaveOrganization />}
/>
<Route
path="/user/volunteer/:orgId"
element={<VolunteerManagement />}
Expand Down
8 changes: 8 additions & 0 deletions src/components/IconComponent/IconComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import PostsIcon from 'assets/svgs/posts.svg?react';
import SettingsIcon from 'assets/svgs/settings.svg?react';
import VenueIcon from 'assets/svgs/venues.svg?react';
import RequestsIcon from 'assets/svgs/requests.svg?react';
import ExitToAppIcon from '@mui/icons-material/ExitToApp';
import { MdOutlineVolunteerActivism } from 'react-icons/md';

import React from 'react';
Expand Down Expand Up @@ -134,6 +135,13 @@ const iconComponent = (props: InterfaceIconComponent): JSX.Element => {
stroke={props.fill}
/>
);
case 'Leave Organization':
return (
<ExitToAppIcon
data-testid="Icon-Component-Leave-Organization"
stroke={props.fill}
/>
);
case 'Volunteer':
return (
<MdOutlineVolunteerActivism
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.modal-dialog {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
}

.modal-content {
width: 100%;
max-width: 500px;
}

.modal-body {
text-align: center;
}

.modal-header,
.modal-footer {
justify-content: center;
text-align: center;
}

.confirmation {
text-align: center;
margin-top: 30px;
}
Loading

0 comments on commit 007bcb0

Please sign in to comment.