Skip to content

Commit

Permalink
Finalised changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rishav-jha-mech committed Sep 5, 2023
1 parent 8b0d383 commit b033c98
Show file tree
Hide file tree
Showing 21 changed files with 121 additions and 117 deletions.
2 changes: 1 addition & 1 deletion public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -557,4 +557,4 @@
"donate": "Donate",
"nothingToShow": "Nothing to show here."
}
}
}
2 changes: 1 addition & 1 deletion public/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -557,4 +557,4 @@
"donate": "Donner",
"nothingToShow": "Rien à montrer ici."
}
}
}
2 changes: 1 addition & 1 deletion public/locales/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -558,4 +558,4 @@
"donate": "दान",
"nothingToShow": "यहां दिखाने के लिए कुछ भी नहीं है."
}
}
}
2 changes: 1 addition & 1 deletion public/locales/sp.json
Original file line number Diff line number Diff line change
Expand Up @@ -558,4 +558,4 @@
"donate": "Donar",
"nothingToShow": "Nada que mostrar aquí."
}
}
}
2 changes: 1 addition & 1 deletion public/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -558,4 +558,4 @@
"donate": "",
"nothingToShow": "這裡沒有什麼可顯示的。"
}
}
}
10 changes: 5 additions & 5 deletions src/components/LeftDrawerOrg/LeftDrawerOrg.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ const MOCKS = [
name: 'Test Organization',
description: 'Testing this organization',
location: 'Gotham, DC',
isPublic: true,
visibleInSearch: true,
members: [
{
_id: 'john123',
Expand Down Expand Up @@ -135,6 +137,8 @@ const MOCKS_WITH_IMAGE = [
name: 'Test Organization',
description: 'Testing this organization',
location: 'Gotham, DC',
isPublic: true,
visibleInSearch: true,
members: [
{
_id: 'john123',
Expand Down Expand Up @@ -261,11 +265,7 @@ describe('Testing Left Drawer component for SUPERADMIN', () => {
</MockedProvider>
);
await wait();
// Coming soon
userEvent.click(screen.getByTestId(/orgBtn/i));
expect(toast.success).toHaveBeenCalledWith(
'Organization detail modal coming soon!'
);
expect(screen.getByTestId(/orgBtn/i)).toBeInTheDocument();
userEvent.click(screen.getByTestId(/profileBtn/i));
expect(toast.success).toHaveBeenCalledWith('Profile page coming soon!');
});
Expand Down
8 changes: 1 addition & 7 deletions src/components/LeftDrawerOrg/LeftDrawerOrg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,7 @@ const leftDrawerOrg = ({
</button>
</>
) : (
<button
className={styles.profileContainer}
data-testid="OrgBtn"
onClick={(): void => {
toast.success('Organization detail modal coming soon!');
}}
>
<button className={styles.profileContainer} data-testid="OrgBtn">
<div className={styles.imageContainer}>
{data && data?.organizations[0].image ? (
<img
Expand Down
6 changes: 3 additions & 3 deletions src/components/Loader/Loader.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
border-width: 0.5rem;
}

.spinnerLg{
.spinnerLg {
height: 4rem;
width: 4rem;
border-width: 0.3rem;
}

.spinnerSm{
.spinnerSm {
height: 2rem;
width: 2rem;
border-width: 0.2rem;
}
}
2 changes: 1 addition & 1 deletion src/components/OrgUpdate/OrgUpdate.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
transform: scale(1.5);
color: var(--bs-danger);
margin-bottom: 1rem;
}
}
10 changes: 3 additions & 7 deletions src/components/OrgUpdate/OrgUpdate.test.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import React from 'react';
import { MockedProvider } from '@apollo/react-testing';
import {
act,
fireEvent,
render,
screen
} from '@testing-library/react';
import { act, fireEvent, render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { I18nextProvider } from 'react-i18next';
import { StaticMockLink } from 'utils/StaticMockLink';
Expand Down Expand Up @@ -134,7 +130,7 @@ describe('Testing Organization Update', () => {
);
});
await wait();
expect(screen.getByText(/Mock Graphql Error/i));
expect(screen.getByText(/Mock Graphql Error/i)).toBeInTheDocument();
});

test('Should show error occured toast when Organization could not be updated', async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/OrgUpdate/OrgUpdateMocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,6 @@ export const MOCKS_ERROR_UPDATE_ORGLIST = [
visibleInSearch: false,
},
},
erorr: new Error('Mock Graphql Updating Organization Error')
erorr: new Error('Mock Graphql Updating Organization Error'),
},
];
62 changes: 31 additions & 31 deletions src/components/OrganizationDashCards/CardItem.module.css
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
.cardItem {
position: relative;
display: flex;
align-items: center;
padding: 0.75rem 0;
position: relative;
display: flex;
align-items: center;
padding: 0.75rem 0;
}

.cardItem .iconWrapper {
position: relative;
height: 40px;
width: 40px;
display: flex;
justify-content: center;
align-items: center;
position: relative;
height: 40px;
width: 40px;
display: flex;
justify-content: center;
align-items: center;
}

.cardItem .iconWrapper .themeOverlay {
background: var(--bs-primary);
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
opacity: 0.12;
border-radius: 50%;
background: var(--bs-primary);
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
opacity: 0.12;
border-radius: 50%;
}

.cardItem .iconWrapper .dangerOverlay {
background: var(--bs-danger);
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
opacity: 0.12;
border-radius: 50%;
background: var(--bs-danger);
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
opacity: 0.12;
border-radius: 50%;
}

.cardItem .title {
font-size: 1rem;
flex: 1;
font-size: 1rem;
flex: 1;
}

.cardItem .time {
font-size: 0.9rem;
color: var(--bs-secondary);
}
font-size: 0.9rem;
color: var(--bs-secondary);
}
2 changes: 1 addition & 1 deletion src/components/OrganizationDashCards/CardItem.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('Testing the Organization Card', () => {
};

render(<CardItem {...props} />);

expect(screen.getByText(/Post Title/i)).toBeInTheDocument();
expect(screen.getByText(/03-09-2023/i)).toBeInTheDocument();
});
Expand Down
88 changes: 44 additions & 44 deletions src/components/OrganizationDashCards/Dashboardcard.module.css
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
.cardBody {
padding: 1.25rem 1.5rem;
padding: 1.25rem 1.5rem;
}

.cardBody .iconWrapper {
position: relative;
height: 48px;
width: 48px;
display: flex;
justify-content: center;
align-items: center;
position: relative;
height: 48px;
width: 48px;
display: flex;
justify-content: center;
align-items: center;
}

.cardBody .iconWrapper .themeOverlay {
background: var(--bs-primary);
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
opacity: 0.12;
border-radius: 50%;
background: var(--bs-primary);
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
opacity: 0.12;
border-radius: 50%;
}

.cardBody .textWrapper .primaryText {
font-size: 24px;
font-weight: bold;
display: block;
font-size: 24px;
font-weight: bold;
display: block;
}

.cardBody .textWrapper .secondaryText {
font-size: 14px;
display: block;
color: var(--bs-secondary);
font-size: 14px;
display: block;
color: var(--bs-secondary);
}

@media (max-width: 600px) {
.cardBody {
min-height: 120px;
}

.cardBody .iconWrapper {
position: absolute;
top: 1rem;
left: 1rem;
}

.cardBody .textWrapper {
margin-top: calc(0.5rem + 36px);
text-align: right;
}

.cardBody .textWrapper .primaryText {
font-size: 1.5rem;
}

.cardBody .textWrapper .secondaryText {
font-size: 1rem;
}
}
.cardBody {
min-height: 120px;
}

.cardBody .iconWrapper {
position: absolute;
top: 1rem;
left: 1rem;
}

.cardBody .textWrapper {
margin-top: calc(0.5rem + 36px);
text-align: right;
}

.cardBody .textWrapper .primaryText {
font-size: 1.5rem;
}

.cardBody .textWrapper .secondaryText {
font-size: 1rem;
}
}
3 changes: 1 addition & 2 deletions src/screens/BlockUser/BlockUser.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
justify-content: center;
align-items: center;
flex-direction: column;

}

@media (max-width: 1020px) {
Expand Down Expand Up @@ -100,4 +99,4 @@
margin-right: 0;
width: 100%;
}
}
}
2 changes: 1 addition & 1 deletion src/screens/OrgSettings/OrgSettings.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
width: 100%;
font-size: 0.9rem;
margin-bottom: 0.5rem;
}
}
Loading

0 comments on commit b033c98

Please sign in to comment.