Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Added: An option for users to leave the Organization (Fixes #1873) #2629

Open
wants to merge 15 commits into
base: develop-postgres
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 52 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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
Loading