Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…a-admin-clone into priyanshu
  • Loading branch information
git-init-priyanshu committed Mar 6, 2024
2 parents a580938 + e04abf3 commit c4ed40a
Show file tree
Hide file tree
Showing 120 changed files with 5,224 additions and 20,754 deletions.
16,903 changes: 32 additions & 16,871 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"graphql": "^15.5.1",
"graphql-tag": "^2.12.6",
"graphql-ws": "^5.14.0",
"history": "^5.3.0",
"i18next": "^21.8.14",
"i18next-browser-languagedetector": "^6.1.4",
"i18next-http-backend": "^1.4.1",
Expand All @@ -45,7 +46,7 @@
"react-icons": "^4.12.0",
"react-infinite-scroll-component": "^6.1.0",
"react-redux": "^7.2.5",
"react-router-dom": "^5.2.0",
"react-router-dom": "^6.22.2",
"react-scripts": "5.0.1",
"react-toastify": "^9.0.3",
"redux": "^4.1.1",
Expand Down
12 changes: 9 additions & 3 deletions public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
"errorOccured": "An error occurred. Please try again later."
},
"communityProfile": {
"communityProfile": "Community Profile",
"title": "Community Profile",
"editProfile": "Edit Profile",
"communityProfileInfo": "These details will appear on the login/signup screen for you and your community members",
"communityName": "Community Name",
Expand Down Expand Up @@ -282,7 +282,10 @@
},
"organizationActionItems": {
"actionItemCategory": "Action Item Category",
"actionItemActive": "Action Item Active",
"actionItemCompleted": "Action Item Completed",
"actionItemDetails": "Action Item Details",
"actionItemStatus": "Action Item Status",
"assignee": "Assignee",
"assigner": "Assigner",
"assignmentDate": "Assignment Date",
Expand All @@ -298,13 +301,16 @@
"dueDate": "Due Date",
"earliest": "Earliest",
"editActionItem": "Edit Action Item",
"eventActionItems": "Event Action Items",
"isCompleted": "Completed",
"latest": "Latest",
"makeActive": "Make Active",
"markCompletion": "Mark Completion",
"no": "No",
"noActionItems": "No Action Items",
"options": "Options",
"preCompletionNotes": "Pre Completion Notes",
"postCompletionNotes": "Post Completion Notes",
"preCompletionNotes": "Notes",
"postCompletionNotes": "Completion Notes",
"selectActionItemCategory": "Select an action item category",
"selectAssignee": "Select an assignee",
"status": "Status",
Expand Down
8 changes: 7 additions & 1 deletion public/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
"errorOccured": "Une erreur s'est produite. Veuillez réessayer plus tard."
},
"communityProfile": {
"communityProfile": "Profil de la communauté",
"title": "Profil de la communauté",
"editProfile": "Editer le profil",
"communityProfileInfo": "Ces détails apparaîtront sur l'écran de connexion/inscription pour vous et les membres de votre communauté.",
"communityName": "Nom de la communauté",
Expand Down Expand Up @@ -277,7 +277,10 @@
},
"organizationActionItems": {
"actionItemCategory": "Catégorie de l'élément d'action",
"actionItemActive": "Mesure de suivi active",
"actionItemCompleted": "Mesure de suivi terminée",
"actionItemDetails": "Détails de l'élément d'action",
"actionItemStatus": "État de l’action",
"assignee": "Attributaire",
"assigner": "Assignateur",
"assignmentDate": "Date d'attribution",
Expand All @@ -293,8 +296,11 @@
"dueDate": "Date d'échéance",
"earliest": "Le plus tôt",
"editActionItem": "Modifier l'élément d'action",
"eventActionItems": "Mesures à prendre pour l’événement",
"isCompleted": "Terminé",
"latest": "Le plus récent",
"makeActive": "Rendre actif",
"markCompletion": "Marquer l'achèvement",
"no": "Non",
"noActionItems": "Pas d'éléments d'action",
"options": "Options",
Expand Down
8 changes: 7 additions & 1 deletion public/locales/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
"errorOccured": "कुछ गड़बड़ हो गई है। कृपया बाद में पुन: प्रयास करें।"
},
"communityProfile": {
"communityProfile": "सामुदायिक प्रोफ़ाइल",
"title": "सामुदायिक प्रोफ़ाइल",
"editProfile": "प्रोफ़ाइल संपादित करें",
"communityProfileInfo": "ये विवरण आपके और आपके समुदाय के सदस्यों के लिए लॉगिन/साइनअप स्क्रीन पर दिखाई देंगे",
"communityName": "समुदाय का नाम",
Expand Down Expand Up @@ -277,7 +277,10 @@
},
"organizationActionItems": {
"actionItemCategory": "कार्य आइटम श्रेणी",
"actionItemActive": "क्रिया आइटम सक्रिय",
"actionItemCompleted": "क्रिया आइटम पूर्ण हुआ",
"actionItemDetails": "कार्य आइटम विवरण",
"actionItemStatus": "कार्रवाई आइटम स्थिति",
"assignee": "सौंपने वाला",
"assigner": "निर्धारक",
"assignmentDate": "सौंपने की तारीख",
Expand All @@ -293,8 +296,11 @@
"dueDate": "नियत तारीख",
"earliest": "सबसे पहले",
"editActionItem": "कार्य आइटम संपादित करें",
"eventActionItems": "इवेंट एक्शन आइटम",
"isCompleted": "पूरा हुआ",
"latest": "नवीनतम",
"makeActive": "सक्रिय करें",
"markCompletion": "मार्क पूर्णता",
"no": "नहीं",
"noActionItems": "कोई कार्य आइटम नहीं",
"options": "विकल्प",
Expand Down
8 changes: 7 additions & 1 deletion public/locales/sp.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
"errorOccured": "Se produjo un error. Por favor, inténtalo de nuevo más tarde."
},
"communityProfile": {
"communityProfile": "Perfil de la comunidad",
"title": "Perfil de la comunidad",
"editProfile": "Editar perfil",
"communityProfileInfo": "Estos detalles aparecerán en la pantalla de inicio de sesión/registro para usted y los miembros de su comunidad.",
"communityName": "Nombre de la comunidad",
Expand Down Expand Up @@ -277,7 +277,10 @@
},
"organizationActionItems": {
"actionItemCategory": "Categoría del ítem de acción",
"actionItemActive": "Elemento de acción activo",
"actionItemCompleted": "Elemento de acción completado",
"actionItemDetails": "Detalles del ítem de acción",
"actionItemStatus": "Estado del elemento de acción",
"assignee": "Asignado",
"assigner": "Asignador",
"assignmentDate": "Fecha de asignación",
Expand All @@ -293,8 +296,11 @@
"dueDate": "Fecha de vencimiento",
"earliest": "Lo más temprano",
"editActionItem": "Editar ítem de acción",
"eventActionItems": "Elementos de acción del evento",
"isCompleted": "Completado",
"latest": "Lo más reciente",
"makeActive": "Activar",
"markCompletion": "Marcar finalización",
"no": "No",
"noActionItems": "No hay ítems de acción",
"options": "Opciones",
Expand Down
8 changes: 7 additions & 1 deletion public/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
"errorOccured": "发生错误,请稍后重试。"
},
"communityProfile": {
"communityProfile": "社区简介",
"title": "社区简介",
"editProfile": "编辑个人资料",
"communityProfileInfo": "这些详细信息将显示在您和您的社区成员的登录/注册屏幕上",
"communityName": "社区名字",
Expand Down Expand Up @@ -306,7 +306,10 @@
},
"organizationActionItems": {
"actionItemCategory": "行动项目类别",
"actionItemActive": "活动措施项",
"actionItemCompleted": "已完成操作项",
"actionItemDetails": "行动项目详情",
"actionItemStatus": "措施项状态",
"assignee": "受让人",
"assigner": "分配者",
"assignmentDate": "分配日期",
Expand All @@ -322,8 +325,11 @@
"dueDate": "到期日",
"earliest": "最早",
"editActionItem": "编辑行动项目",
"eventActionItems": "事件操作项",
"isCompleted": "已完成",
"latest": "最新",
"makeActive": "激活",
"markCompletion": "标记完成",
"no": "",
"noActionItems": "无行动项目",
"options": "选项",
Expand Down
136 changes: 58 additions & 78 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
/* eslint-disable */
import { useQuery } from '@apollo/client';
import { CHECK_AUTH } from 'GraphQl/Queries/Queries';
import AddOnStore from 'components/AddOn/core/AddOnStore/AddOnStore';
import Loader from 'components/Loader/Loader';
import SecuredRoute from 'components/SecuredRoute/SecuredRoute';
import SecuredRouteForUser from 'components/UserPortal/SecuredRouteForUser/SecuredRouteForUser';
import React from 'react';
import { Route, Routes } from 'react-router-dom';
import * as installedPlugins from 'components/plugins/index';
import React, { useEffect } from 'react';
import { Route, Switch } from 'react-router-dom';
import BlockUser from 'screens/BlockUser/BlockUser';
import EventDashboard from 'screens/EventDashboard/EventDashboard';
import ForgotPassword from 'screens/ForgotPassword/ForgotPassword';
import SecuredRoute from 'components/SecuredRoute/SecuredRoute';
import LoginPage from 'screens/LoginPage/LoginPage';
import MemberDetail from 'screens/MemberDetail/MemberDetail';
import OrganizationEvents from 'screens/OrganizationEvents/OrganizationEvents';
import OrganizationActionItems from 'screens/OrganizationActionItems/OrganizationActionItems';
import OrganizationPeople from 'screens/OrganizationPeople/OrganizationPeople';
import OrganizationFunds from 'screens/OrganizationFunds/OrganizationFunds';
import OrganizationDashboard from 'screens/OrganizationDashboard/OrganizationDashboard';
import OrgContribution from 'screens/OrgContribution/OrgContribution';
import OrgList from 'screens/OrgList/OrgList';
import OrgPost from 'screens/OrgPost/OrgPost';
import OrgSettings from 'screens/OrgSettings/OrgSettings';
import OrganizationActionItems from 'screens/OrganizationActionItems/OrganizationActionItems';
import OrganizationDashboard from 'screens/OrganizationDashboard/OrganizationDashboard';
import OrganizationEvents from 'screens/OrganizationEvents/OrganizationEvents';
import OrganizationFunds from 'screens/OrganizationFunds/OrganizationFunds';
import OrganizationPeople from 'screens/OrganizationPeople/OrganizationPeople';
import PageNotFound from 'screens/PageNotFound/PageNotFound';
import AddOnStore from 'components/AddOn/core/AddOnStore/AddOnStore';
import ForgotPassword from 'screens/ForgotPassword/ForgotPassword';
import Users from 'screens/Users/Users';
import CommunityProfile from 'screens/CommunityProfile/CommunityProfile';
import BlockUser from 'screens/BlockUser/BlockUser';
import EventDashboard from 'screens/EventDashboard/EventDashboard';
import MemberDetail from 'screens/MemberDetail/MemberDetail';
import OrganizationScreen from 'components/OrganizationScreen/OrganizationScreen';
import SuperAdminScreen from 'components/SuperAdminScreen/SuperAdminScreen';

// User Portal Components
import Donate from 'screens/UserPortal/Donate/Donate';
Expand All @@ -36,9 +33,7 @@ import Settings from 'screens/UserPortal/Settings/Settings';
// import UserLoginPage from 'screens/UserPortal/UserLoginPage/UserLoginPage';
// import Chat from 'screens/UserPortal/Chat/Chat';
import Advertisements from 'components/Advertisements/Advertisements';
import useLocalStorage from 'utils/useLocalstorage';

const { setItem } = useLocalStorage();
import SecuredRouteForUser from 'components/UserPortal/SecuredRouteForUser/SecuredRouteForUser';

function app(): JSX.Element {
/*const { updatePluginLinks, updateInstalled } = bindActionCreators(
Expand Down Expand Up @@ -66,78 +61,63 @@ function app(): JSX.Element {

// TODO: Fetch Installed plugin extras and store for use within MainContent and Side Panel Components.

const { data, loading } = useQuery(CHECK_AUTH);

useEffect(() => {
if (data) {
setItem('name', `${data.checkAuth.firstName} ${data.checkAuth.lastName}`);
setItem('id', data.checkAuth._id);
setItem('email', data.checkAuth.email);
setItem('IsLoggedIn', 'TRUE');
setItem('UserType', data.checkAuth.userType);
setItem('FirstName', data.checkAuth.firstName);
setItem('LastName', data.checkAuth.lastName);
setItem('UserImage', data.checkAuth.image);
setItem('Email', data.checkAuth.email);
}
}, [data, loading]);

const extraRoutes = Object.entries(installedPlugins).map(
(plugin: any, index) => {
const extraComponent = plugin[1];
return (
<SecuredRoute
<Route
key={index}
path={`/plugin/${plugin[0].toLowerCase()}`}
component={extraComponent}
element={extraComponent}
/>
);
},
);

if (loading) {
return <Loader />;
}
return (
<>
<Switch>
<Route exact path="/" component={LoginPage} />
<SecuredRoute path="/orgdash" component={OrganizationDashboard} />
<SecuredRoute path="/orgpeople" component={OrganizationPeople} />
<SecuredRoute path="/orglist" component={OrgList} />
<SecuredRoute path="/member" component={MemberDetail} />
<SecuredRoute path="/orgevents" component={OrganizationEvents} />
<SecuredRoute
path="/orgactionitems"
component={OrganizationActionItems}
/>
<SecuredRoute path="/orgfunds" component={OrganizationFunds} />
<SecuredRoute path="/orgcontribution" component={OrgContribution} />
<SecuredRoute path="/orgpost" component={OrgPost} />
<SecuredRoute path="/orgsetting" component={OrgSettings} />
<SecuredRoute path="/orgstore" component={AddOnStore} />
<SecuredRoute path="/orgads" component={Advertisements} />
<SecuredRoute path="/users" component={Users} />
<SecuredRoute path="/communityProfile" component={CommunityProfile} />
<SecuredRoute path="/blockuser" component={BlockUser} />
<SecuredRoute path="/event/:eventId" component={EventDashboard} />
{extraRoutes}
<Route exact path="/forgotPassword" component={ForgotPassword} />

<Routes>
<Route path="/" element={<LoginPage />} />
<Route element={<SecuredRoute />}>
<Route element={<SuperAdminScreen />}>
<Route path="/orglist" element={<OrgList />} />
<Route path="/member" element={<MemberDetail />} />
<Route path="/users" element={<Users />} />
<Route path="/communityProfile" element={<CommunityProfile />} />
</Route>
<Route element={<OrganizationScreen />}>
<Route path="/orgdash/:orgId" element={<OrganizationDashboard />} />
<Route path="/orgpeople/:orgId" element={<OrganizationPeople />} />
<Route path="/member/:orgId" element={<MemberDetail />} />
<Route path="/orgevents/:orgId" element={<OrganizationEvents />} />
<Route
path="/orgactionitems/:orgId"
element={<OrganizationActionItems />}
/>
<Route path="/orgfunds/:orgId" element={<OrganizationFunds />} />
<Route path="/orgcontribution" element={<OrgContribution />} />
<Route path="/orgpost/:orgId" element={<OrgPost />} />
<Route path="/orgsetting/:orgId" element={<OrgSettings />} />
<Route path="/orgstore/:orgId" element={<AddOnStore />} />
<Route path="/orgads/:orgId" element={<Advertisements />} />
<Route path="/blockuser/:orgId" element={<BlockUser />} />
{extraRoutes}
</Route>
</Route>
<Route path="/event/:eventId" element={<EventDashboard />} />
<Route path="/forgotPassword" element={<ForgotPassword />} />
{/* User Portal Routes */}
<SecuredRouteForUser
path="/user/organizations"
component={Organizations}
/>
<SecuredRouteForUser path="/user/organization" component={Home} />
<SecuredRouteForUser path="/user/people" component={People} />
<SecuredRouteForUser path="/user/settings" component={Settings} />
<SecuredRouteForUser path="/user/donate" component={Donate} />
<SecuredRouteForUser path="/user/events" component={Events} />
<Route element={<SecuredRouteForUser />}>
<Route path="/user/organizations" element={<Organizations />} />
<Route path="/user/organization/:orgId" element={<Home />} />
<Route path="/user/people/:orgId" element={<People />} />
<Route path="/user/settings" element={<Settings />} />
<Route path="/user/donate/:orgId" element={<Donate />} />
<Route path="/user/events/:orgId" element={<Events />} />
</Route>
{/* <SecuredRouteForUser path="/user/chat" component={Chat} /> */}

<Route exact path="*" component={PageNotFound} />
</Switch>
<Route path="*" element={<PageNotFound />} />
</Routes>
</>
);
}
Expand Down
4 changes: 4 additions & 0 deletions src/GraphQl/Mutations/mutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ export const LOGIN_MUTATION = gql`
_id
userType
adminApproved
firstName
lastName
email
image
}
accessToken
refreshToken
Expand Down
25 changes: 25 additions & 0 deletions src/components/ActionItems/ActionItemsContainer.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.actionItemStatusBadge {
width: 5.5rem;
margin-left: 1.1rem;
}

.createModal {
margin-top: 20vh;
margin-left: 13vw;
max-width: 80vw;
}

.titlemodal {
color: var(--bs-gray-600);
font-weight: 600;
font-size: 20px;
margin-bottom: 20px;
padding-bottom: 5px;
border-bottom: 3px solid var(--bs-primary);
width: 65%;
}

.actionItemsOptionsButton {
width: 24px;
height: 24px;
}
Loading

0 comments on commit c4ed40a

Please sign in to comment.