Skip to content

Commit

Permalink
refined organization dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
JamarTG committed Oct 3, 2023
1 parent f92864e commit 71cd481
Show file tree
Hide file tree
Showing 22 changed files with 184 additions and 449 deletions.
10 changes: 0 additions & 10 deletions public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@
"login_to_admin_portal": "Admin Portal Login",
"OR": "OR"
},
"latestEvents": {
"eventCardTitle": "Upcoming Events",
"eventCardSeeAll": "See All",
"noEvents": "No Upcoming Events"
},
"latestPosts": {
"latestPostsTitle": "Latest Posts",
"seeAllLink": "See All",
"noPostsCreated": "No Posts Created"
},
"listNavbar": {
"talawa_portal": "Talawa Admin Portal",
"roles": "Roles",
Expand Down
5 changes: 0 additions & 5 deletions public/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@
"login_to_admin_portal": "Connexion à l'administration du portail",
"OR": "OU"
},
"latestEvents": {
"eventCardTitle": "Événements à venir",
"eventCardSeeAll": "Voir Tout",
"noEvents": "Aucun événement à venir"
},
"listNavbar": {
"talawa_portal": "Portail D'Administrateur Talawa",
"roles": "Les rôles",
Expand Down
5 changes: 0 additions & 5 deletions public/locales/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@
"login_to_admin_portal": "एडमिन पोर्टल लॉगिन",
"OR": "या"
},
"latestEvents": {
"eventCardTitle": "आगामी घटनाएँ",
"eventCardSeeAll": "सभी देखें",
"noEvents": "कोई आगामी घटनाएँ नहीं"
},
"listNavbar": {
"talawa_portal": "तलावा प्रशासन पोर्टल",
"roles": "भूमिकाएँ",
Expand Down
5 changes: 0 additions & 5 deletions public/locales/sp.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@
"login_to_admin_portal": "Inicio de sesión en el portal de administración",
"OR": "O"
},
"latestEvents": {
"eventCardTitle": "Próximos Eventos",
"eventCardSeeAll": "Ver Todos",
"noEvents": "No Hay Eventos Próximos"
},
"listNavbar": {
"talawa_portal": "Portal De Administración Talawa",
"roles": "Roles",
Expand Down
5 changes: 0 additions & 5 deletions public/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@
"login_to_admin_portal": " 管理员门户登录 ",
"OR": "或者"
},
"latestEvents": {
"eventCardTitle": "即将举行的活动",
"eventCardSeeAll": "查看全部",
"noEvents": "暂无即将举行的活动"
},
"listNavbar": {
"talawa_portal": "塔拉瓦管理門戶",
"roles": "角色",
Expand Down
1 change: 1 addition & 0 deletions src/assets/svgs/date.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion src/assets/svgs/trash.svg

This file was deleted.

1 change: 1 addition & 0 deletions src/assets/svgs/user.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 0 additions & 65 deletions src/components/LatestPostsCard/LatestPostsCard.module.css

This file was deleted.

52 changes: 0 additions & 52 deletions src/components/LatestPostsCard/LatestPostsCard.test.tsx

This file was deleted.

47 changes: 0 additions & 47 deletions src/components/LatestPostsCard/LatestPostsCard.tsx

This file was deleted.

13 changes: 13 additions & 0 deletions src/components/OrganizationDashCards/CardItem.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,16 @@
font-size: 0.9rem;
color: var(--bs-secondary);
}

.cardItem .creator {
font-size: 1rem;
color: rgb(33, 208, 21);
}

.rightCard {
display: flex;
gap: 5px;
min-width: 170px;
justify-content: center;
flex-direction: column;
}
56 changes: 48 additions & 8 deletions src/components/OrganizationDashCards/CardItem.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import React from 'react';
import { ReactComponent as EventsIcon } from 'assets/svgs/events.svg';
import { ReactComponent as PostsIcon } from 'assets/svgs/post.svg';
import { ReactComponent as MarkerIcon } from 'assets/svgs/location.svg';
import { ReactComponent as DateIcon } from 'assets/svgs/date.svg';
import { ReactComponent as UserIcon } from 'assets/svgs/user.svg';
import dayjs from 'dayjs';
import styles from './CardItem.module.css';
import { PersonAddAlt1Rounded } from '@mui/icons-material';
Expand All @@ -9,10 +12,12 @@ export interface InterfaceCardItem {
type: 'Event' | 'Post' | 'MembershipRequest';
title: string;
time?: string;
creator?: any;
location?: string;
}

const cardItem = (props: InterfaceCardItem): JSX.Element => {
const { type, title, time } = props;
const { creator, type, title, time, location } = props;
return (
<>
<div className={`${styles.cardItem} border-bottom`}>
Expand All @@ -33,13 +38,48 @@ const cardItem = (props: InterfaceCardItem): JSX.Element => {
)}
</div>
<span className={styles.title}>{`${title}`}</span>
{time ? (
<span className={styles.time}>
{dayjs(time).format('DD-MM-YYYY')}
</span>
) : (
''
)}

<div className={styles.rightCard}>
{creator && (
<small className={styles.creator}>
<UserIcon
title="Post Creator"
fill="var(--bs-primary)"
width={20}
height={20}
/>{' '}
{' '}
<a>
{creator.firstName} {creator.lastName}
</a>
</small>
)}

{location && (
<span className={styles.location}>
<MarkerIcon
title="Event Location"
fill="var(--bs-primary)"
width={20}
height={20}
/>{' '}
{location}
</span>
)}
{time && (
<span className={styles.time}>
{type === 'Event' && (
<DateIcon
title="Event Date"
fill="#4cd964"
width={20}
height={20}
/>
)}{' '}
{dayjs(time).format('MMM D, YYYY')}
</span>
)}
</div>
</div>
</>
);
Expand Down
Loading

0 comments on commit 71cd481

Please sign in to comment.