Skip to content

Commit 52865fd

Browse files
committed
feat(super-admin-dashboard): implements a super admin dashboard
1 parent 31852e3 commit 52865fd

File tree

11 files changed

+709
-81
lines changed

11 files changed

+709
-81
lines changed

package-lock.json

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
"apollo-upload-client": "^17.0.0",
5858
"autoprefixer": "^10.4.14",
5959
"axios": "^1.6.1",
60-
"chart.js": "^4.3.2",
6160
"cleave.js": "^1.6.0",
6261
"cloudinary": "^1.39.0",
6362
"cloudinary-react": "^1.8.1",
@@ -107,7 +106,7 @@
107106
"react-tooltip": "^4.5.1",
108107
"react-widgets": "^5.8.4",
109108
"reactjs-popup": "^2.0.5",
110-
"recharts": "^2.7.2",
109+
"recharts": "^2.13.3",
111110
"sheetjs-style": "^0.15.8",
112111
"sinon": "^14.0.2",
113112
"subscriptions-transport-ws": "^0.11.0",

src/assets/dash-event-icon.svg

Lines changed: 3 additions & 0 deletions
Loading

src/assets/multiple-users.svg

Lines changed: 3 additions & 0 deletions
Loading

src/components/Calendar.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@ const Calendar = () => {
4242
/* istanbul ignore next */
4343
try {
4444
await getEvents({
45-
variables: {
46-
authToken: localStorage.getItem('auth_token'),
47-
},
48-
fetchPolicy: 'network-only',
45+
4946
});
5047
} catch (error: any) {
5148
toast.error(error.message)

src/components/OrgStatusSymbol.tsx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import React from 'react';
2+
3+
interface PropsInterface {
4+
type: 'active' | 'pending' | 'rejected';
5+
label?: boolean;
6+
}
7+
8+
function OrgStatusSymbol({ type, label }: PropsInterface) {
9+
const colorClasses = {
10+
active: 'border-[#11AF0E] bg-[#11AF0E]',
11+
pending: 'border-[#FFA500] bg-[#FFA500]',
12+
rejected: 'border-[#C30909] bg-[#C30909]',
13+
};
14+
15+
const selectedColor = colorClasses[type];
16+
17+
return (
18+
<div className="flex gap-x-1 items-center capitalize text-[.85rem] tracking-tight">
19+
<div
20+
className={`border ${selectedColor.split(' ')[0]} rounded-full p-[3px]`}
21+
>
22+
<div
23+
className={`h-[5px] w-[5px] rounded-full ${
24+
selectedColor.split(' ')[1]
25+
}`}
26+
/>
27+
</div>
28+
{label && <span>{type}</span>}
29+
</div>
30+
);
31+
}
32+
33+
export default OrgStatusSymbol;

0 commit comments

Comments
 (0)