From c545ec498bb8d9df61dc3bf2035a96562f43e523 Mon Sep 17 00:00:00 2001 From: Md Noman Khan <54404474+noman2002@users.noreply.github.com> Date: Tue, 12 Dec 2023 15:40:39 +0530 Subject: [PATCH] Revert "[#1123] Changes position and text of "All Organizations" button (#1124)" This reverts commit 1fd4105bda3f43c68109ffcb507a794c13122a8a. --- src/GraphQl/Queries/Queries.ts | 2 +- src/components/IconComponent/IconComponent.test.tsx | 8 ++++---- src/components/IconComponent/IconComponent.tsx | 2 +- src/state/reducers/routesReducer.test.ts | 12 ++++++------ src/state/reducers/routesReducer.ts | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/GraphQl/Queries/Queries.ts b/src/GraphQl/Queries/Queries.ts index 0e3f20918e..7bf99d48ee 100644 --- a/src/GraphQl/Queries/Queries.ts +++ b/src/GraphQl/Queries/Queries.ts @@ -1,6 +1,6 @@ import gql from 'graphql-tag'; -// Query List +//Query List // Check Auth diff --git a/src/components/IconComponent/IconComponent.test.tsx b/src/components/IconComponent/IconComponent.test.tsx index dbcd477b5d..ff83ebe57c 100644 --- a/src/components/IconComponent/IconComponent.test.tsx +++ b/src/components/IconComponent/IconComponent.test.tsx @@ -3,10 +3,6 @@ import { render, screen } from '@testing-library/react'; import IconComponent from './IconComponent'; const screenTestIdMap: Record> = { - AllOrganizations: { - name: 'My Organizations', - testId: 'Icon-Component-AllOrganizationsIcon', - }, Dashboard: { name: 'Dashboard', testId: 'Icon-Component-DashboardIcon', @@ -35,6 +31,10 @@ const screenTestIdMap: Record> = { name: 'Settings', testId: 'Icon-Component-SettingsIcon', }, + AllOrganizations: { + name: 'All Organizations', + testId: 'Icon-Component-AllOrganizationsIcon', + }, EventProject: { name: 'Add Event Project', testId: 'Icon-Component-Add-Event-Project', diff --git a/src/components/IconComponent/IconComponent.tsx b/src/components/IconComponent/IconComponent.tsx index 90a60244b5..4c490c9c94 100644 --- a/src/components/IconComponent/IconComponent.tsx +++ b/src/components/IconComponent/IconComponent.tsx @@ -53,7 +53,7 @@ const iconComponent = (props: InterfaceIconComponent): JSX.Element => { data-testid="Icon-Component-SettingsIcon" /> ); - case 'My Organizations': + case 'All Organizations': return ( { }) ).toEqual({ targets: [ - { name: 'My Organizations', url: '/orglist/id=undefined' }, { name: 'Dashboard', url: '/orgdash/id=undefined' }, { name: 'People', url: '/orgpeople/id=undefined' }, { name: 'Events', url: '/orgevents/id=undefined' }, @@ -31,10 +30,10 @@ describe('Testing Routes reducer', () => { ], }, { name: 'Settings', url: '/orgsetting/id=undefined' }, + { name: 'All Organizations', url: '/orglist/id=undefined' }, ], configUrl: 'undefined', components: [ - { name: 'My Organizations', comp_id: 'orglist', component: 'OrgList' }, { name: 'Dashboard', comp_id: 'orgdash', @@ -71,6 +70,7 @@ describe('Testing Routes reducer', () => { ], }, { name: 'Settings', comp_id: 'orgsetting', component: 'OrgSettings' }, + { name: 'All Organizations', comp_id: 'orglist', component: 'OrgList' }, { name: '', comp_id: 'member', component: 'MemberDetail' }, ], }); @@ -84,7 +84,6 @@ describe('Testing Routes reducer', () => { }) ).toEqual({ targets: [ - { name: 'My Organizations', url: '/orglist/id=undefined' }, { name: 'Dashboard', url: '/orgdash/id=undefined' }, { name: 'People', url: '/orgpeople/id=undefined' }, { name: 'Events', url: '/orgevents/id=undefined' }, @@ -102,11 +101,11 @@ describe('Testing Routes reducer', () => { ], }, { name: 'Settings', url: '/orgsetting/id=undefined' }, + { name: 'All Organizations', url: '/orglist/id=undefined' }, { test: 'testupdate' }, ], configUrl: 'undefined', components: [ - { name: 'My Organizations', comp_id: 'orglist', component: 'OrgList' }, { name: 'Dashboard', comp_id: 'orgdash', @@ -143,6 +142,7 @@ describe('Testing Routes reducer', () => { ], }, { name: 'Settings', comp_id: 'orgsetting', component: 'OrgSettings' }, + { name: 'All Organizations', comp_id: 'orglist', component: 'OrgList' }, { name: '', comp_id: 'member', component: 'MemberDetail' }, ], }); @@ -156,7 +156,6 @@ describe('Testing Routes reducer', () => { }) ).toEqual({ targets: [ - { name: 'My Organizations', url: '/orglist/id=undefined' }, { name: 'Dashboard', url: '/orgdash/id=undefined' }, { name: 'People', url: '/orgpeople/id=undefined' }, { name: 'Events', url: '/orgevents/id=undefined' }, @@ -167,6 +166,7 @@ describe('Testing Routes reducer', () => { }, { name: 'Advertisement', url: '/orgads/id=undefined' }, { name: 'Settings', url: '/orgsetting/id=undefined' }, + { name: 'All Organizations', url: '/orglist/id=undefined' }, { comp_id: null, component: null, @@ -183,7 +183,6 @@ describe('Testing Routes reducer', () => { ], configUrl: 'undefined', components: [ - { name: 'My Organizations', comp_id: 'orglist', component: 'OrgList' }, { name: 'Dashboard', comp_id: 'orgdash', @@ -221,6 +220,7 @@ describe('Testing Routes reducer', () => { ], }, { name: 'Settings', comp_id: 'orgsetting', component: 'OrgSettings' }, + { name: 'All Organizations', comp_id: 'orglist', component: 'OrgList' }, { name: '', comp_id: 'member', component: 'MemberDetail' }, ], }); diff --git a/src/state/reducers/routesReducer.ts b/src/state/reducers/routesReducer.ts index 7157feb23f..4fafbd1ebb 100644 --- a/src/state/reducers/routesReducer.ts +++ b/src/state/reducers/routesReducer.ts @@ -63,7 +63,6 @@ export type TargetsType = { // Note: Routes with names appear on NavBar const components: ComponentType[] = [ - { name: 'My Organizations', comp_id: 'orglist', component: 'OrgList' }, { name: 'Dashboard', comp_id: 'orgdash', component: 'OrganizationDashboard' }, { name: 'People', comp_id: 'orgpeople', component: 'OrganizationPeople' }, { name: 'Events', comp_id: 'orgevents', component: 'OrganizationEvents' }, @@ -85,6 +84,7 @@ const components: ComponentType[] = [ }, { name: 'Settings', comp_id: 'orgsetting', component: 'OrgSettings' }, + { name: 'All Organizations', comp_id: 'orglist', component: 'OrgList' }, { name: '', comp_id: 'member', component: 'MemberDetail' }, ];