- {event.coverImageUrl && (
-
- )}
-
-
+
+
+ Take Action
+
+
+
+
{event.title}
-
-
- {dayjs(event.date).format('MMM D, YYYY')} at {event.startTime}
+
+
+
+ {dayjs(event.date).format('ddd, MMM D, YYYY')} at {event.startTime}
{event.venueName && (
-
- {event.venueName}
+
+
+ {event.venueName}
)}
-
+
}
- onClick={handleClick}
+ onClick={() => navigate(`/event/${event.slug}`)}
+ style={{
+ background: '#fff',
+ color: '#c0392b',
+ fontWeight: 600,
+ border: 'none',
+ boxShadow: '0 2px 8px rgba(0,0,0,0.2)',
+ }}
>
Take Action
-
+
);
}
diff --git a/admin/src/components/volunteer/dashboard/TrainingList.tsx b/admin/src/components/volunteer/dashboard/TrainingList.tsx
index cca44e6a..1b86ec0e 100644
--- a/admin/src/components/volunteer/dashboard/TrainingList.tsx
+++ b/admin/src/components/volunteer/dashboard/TrainingList.tsx
@@ -1,6 +1,6 @@
import { useState } from 'react';
-import { Card, List, Button, Typography, Tag, Space, Empty, App } from 'antd';
-import { ReadOutlined, CalendarOutlined, ClockCircleOutlined, EnvironmentOutlined, CheckOutlined } from '@ant-design/icons';
+import { Card, Button, Typography, Tag, Empty, App } from 'antd';
+import { ReadOutlined, CheckOutlined } from '@ant-design/icons';
import dayjs from 'dayjs';
import { api } from '@/lib/api';
import type { DashboardTraining } from './types';
@@ -27,66 +27,79 @@ export default function TrainingList({ trainings, onRefresh }: TrainingListProps
}
};
+ const upcoming = trainings.filter((t) => new Date(t.date) >= new Date());
+
return (
-
- Upcoming Trainings
-
+
+
+ Volunteer Training
+
+ }
+ extra={
+ upcoming.length > 0 ? (
+
+ {upcoming.length} Upcoming
+
+ ) : null
}
- styles={{ body: { padding: 0 } }}
>
{trainings.length === 0 ? (
) : (
- {
- const full = training.maxVolunteers > 0 && training.currentVolunteers >= training.maxVolunteers;
- return (
- }>Signed up
- ) : (
-
- ),
- ]}
- >
-
-
- {dayjs(training.date).format('MMM D, YYYY')}
-
-
- {training.startTime} – {training.endTime}
-
- {training.location && (
-
- {training.location}
-
- )}
-
- }
- />
-
- );
- }}
- />
+ trainings.map((training, i) => {
+ const full = training.maxVolunteers > 0 && training.currentVolunteers >= training.maxVolunteers;
+ return (
+ 0 ? '1px solid rgba(255,255,255,0.04)' : undefined,
+ gap: 12,
+ }}
+ >
+
+
+
+ {training.location ? 'In Person' : 'Virtual'}
+
+
+ {dayjs(training.date).format('ddd, MMM D')} · {training.startTime} - {training.endTime}
+
+
+
+ {training.title}
+
+
+
+ {training.isSignedUp ? (
+ } style={{ margin: 0 }}>Signed up
+ ) : (
+
+ )}
+
+
+ );
+ })
)}
);