+
0 && styles.day__events)
+ }
+ data-testid="day"
+ >
{date.getDate()}
= ({
>
{expanded === index ? allEventsList : allEventsList?.slice(0, 2)}
- {allEventsList?.length > 2 && (
+ {(allEventsList?.length > 2 ||
+ (windowWidth <= 700 && allEventsList?.length > 0)) && (
)}
diff --git a/src/components/EventRegistrantsModal/EventRegistrantsModal.tsx b/src/components/EventRegistrantsModal/EventRegistrantsModal.tsx
index dc8850e3fc..0b3ef64d28 100644
--- a/src/components/EventRegistrantsModal/EventRegistrantsModal.tsx
+++ b/src/components/EventRegistrantsModal/EventRegistrantsModal.tsx
@@ -1,8 +1,7 @@
import React, { useState } from 'react';
import { Modal, Button } from 'react-bootstrap';
import { toast } from 'react-toastify';
-import { useMutation } from '@apollo/client';
-import { useQuery } from '@apollo/client';
+import { useMutation, useQuery } from '@apollo/client';
import { EVENT_ATTENDEES, MEMBERS_LIST } from 'GraphQl/Queries/Queries';
import {
ADD_EVENT_ATTENDEE,
diff --git a/src/components/LeftDrawer/LeftDrawer.module.css b/src/components/LeftDrawer/LeftDrawer.module.css
index 81b309a187..4a5517672d 100644
--- a/src/components/LeftDrawer/LeftDrawer.module.css
+++ b/src/components/LeftDrawer/LeftDrawer.module.css
@@ -28,10 +28,6 @@
animation: goToLeftBigScreen 0.5s ease-in-out;
}
-.leftDrawer .closeModalBtn {
- display: none;
-}
-
.leftDrawer .talawaLogo {
width: 100%;
height: 65px;
@@ -130,31 +126,21 @@
right: 0;
}
- .leftDrawer .closeModalBtn {
- display: block;
- position: absolute;
- top: 1rem;
- right: 1rem;
- z-index: 10;
- }
-
- /* For smaller devices .activeDrawer in real behaves like inactive */
- .activeDrawer {
+ .inactiveDrawer {
opacity: 0;
left: 0;
z-index: -1;
animation: closeDrawer 0.4s ease-in-out;
}
- /* For smaller devices .inactiveDrawer in real behaves like active */
- .inactiveDrawer {
+ .activeDrawer {
display: flex;
z-index: 100;
animation: openDrawer 0.6s ease-in-out;
}
.logout {
- margin-bottom: 1.5rem !important;
+ margin-bottom: 2.5rem !important;
}
}
diff --git a/src/components/LeftDrawer/LeftDrawer.test.tsx b/src/components/LeftDrawer/LeftDrawer.test.tsx
index dc370da8cc..013f6c9a2d 100644
--- a/src/components/LeftDrawer/LeftDrawer.test.tsx
+++ b/src/components/LeftDrawer/LeftDrawer.test.tsx
@@ -21,11 +21,6 @@ const propsOrg: InterfaceLeftDrawerProps = {
...props,
screenName: 'My Organizations',
};
-const propsReq: InterfaceLeftDrawerProps = {
- ...props,
- hideDrawer: false,
- screenName: 'Requests',
-};
const propsUsers: InterfaceLeftDrawerProps = {
...props,
hideDrawer: null,
@@ -80,7 +75,6 @@ describe('Testing Left Drawer component for SUPERADMIN', () => {
);
expect(screen.getByText('My Organizations')).toBeInTheDocument();
- expect(screen.getByText('Requests')).toBeInTheDocument();
expect(screen.getByText('Users')).toBeInTheDocument();
expect(screen.getByText('Talawa Admin Portal')).toBeInTheDocument();
@@ -89,15 +83,11 @@ describe('Testing Left Drawer component for SUPERADMIN', () => {
expect(screen.getByAltText(/dummy picture/i)).toBeInTheDocument();
const orgsBtn = screen.getByTestId(/orgsBtn/i);
- const requestsBtn = screen.getByTestId(/requestsBtn/i);
const rolesBtn = screen.getByTestId(/rolesBtn/i);
expect(
orgsBtn.className.includes('text-white btn btn-success')
).toBeTruthy();
- expect(
- requestsBtn.className.includes('text-secondary btn btn-light')
- ).toBeTruthy();
expect(
rolesBtn.className.includes('text-secondary btn btn-light')
).toBeTruthy();
@@ -110,25 +100,6 @@ describe('Testing Left Drawer component for SUPERADMIN', () => {
expect(global.window.location.pathname).toContain('/users');
});
- test('Testing in requests screen', () => {
- localStorage.setItem('UserType', 'SUPERADMIN');
- render(
-
-
-
-
-
-
-
- );
-
- const orgsBtn = screen.getByTestId(/orgsBtn/i);
-
- // Send to organizations screen
- userEvent.click(orgsBtn);
- expect(global.window.location.pathname).toContain('/orglist');
- });
-
test('Testing in roles screen', () => {
localStorage.setItem('UserType', 'SUPERADMIN');
render(
@@ -142,37 +113,14 @@ describe('Testing Left Drawer component for SUPERADMIN', () => {
);
const orgsBtn = screen.getByTestId(/orgsBtn/i);
- const requestsBtn = screen.getByTestId(/requestsBtn/i);
const rolesBtn = screen.getByTestId(/rolesBtn/i);
expect(
orgsBtn.className.includes('text-secondary btn btn-light')
).toBeTruthy();
- expect(
- requestsBtn.className.includes('text-secondary btn btn-light')
- ).toBeTruthy();
expect(
rolesBtn.className.includes('text-white btn btn-success')
).toBeTruthy();
-
- // Send to requests screen
- userEvent.click(requestsBtn);
- expect(global.window.location.pathname).toContain('/requests');
- });
-
- test('Testing Drawer open close functionality', () => {
- localStorage.setItem('UserType', 'SUPERADMIN');
- render(
-
-
-
-
-
-
-
- );
- const closeModalBtn = screen.getByTestId(/closeModalBtn/i);
- userEvent.click(closeModalBtn);
});
test('Testing Drawer when hideDrawer is null', () => {
@@ -188,19 +136,6 @@ describe('Testing Left Drawer component for SUPERADMIN', () => {
);
});
- test('Testing Drawer when hideDrawer is true', () => {
- localStorage.setItem('UserType', 'SUPERADMIN');
- render(
-
-
-
-
-
-
-
- );
- });
-
test('Testing logout functionality', async () => {
localStorage.setItem('UserType', 'SUPERADMIN');
render(
@@ -246,7 +181,6 @@ describe('Testing Left Drawer component for ADMIN', () => {
// These screens arent meant for admins so they should not be present
expect(screen.queryByTestId(/rolesBtn/i)).toBeNull();
- expect(screen.queryByTestId(/requestsBtn/i)).toBeNull();
// Coming soon
userEvent.click(screen.getByTestId(/profileBtn/i));
diff --git a/src/components/LeftDrawer/LeftDrawer.tsx b/src/components/LeftDrawer/LeftDrawer.tsx
index 72b3ff5215..fbc4594c59 100644
--- a/src/components/LeftDrawer/LeftDrawer.tsx
+++ b/src/components/LeftDrawer/LeftDrawer.tsx
@@ -5,7 +5,6 @@ import { useHistory, Link } from 'react-router-dom';
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';
@@ -21,7 +20,6 @@ export interface InterfaceLeftDrawerProps {
const leftDrawer = ({
screenName,
hideDrawer,
- setHideDrawer,
}: InterfaceLeftDrawerProps): JSX.Element => {
const { t } = useTranslation('translation', { keyPrefix: 'leftDrawer' });
@@ -52,16 +50,6 @@ const leftDrawer = ({
}`}
data-testid="leftDrawerContainer"
>
-
{t('talawaAdminPortal')}
{t('menu')}
@@ -89,29 +77,6 @@ const leftDrawer = ({
{t('my organizations')}
- {userType === 'SUPERADMIN' && (
-