Skip to content

Commit f43efb5

Browse files
committed
fix: reg count
1 parent 10716ef commit f43efb5

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ eloop is an event management system that integrates with Turso (DBaaS), supporti
44

55
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fpolarhive%2Feloop-serverless-spin&env=QR_SECRET,GOOGLE_CLIENT_SECRET,TURSO_AUTH_TOKEN,NEXTAUTH_SECRET,ADMIN_EMAIL,TURSO_DATABASE_URL,GOOGLE_CLIENT_ID,NEXTAUTH_URL)
66

7-
8-
> **Note:** (eloop-turso) is based on the concept and architecture of the original [eventloop](https://github.com/homebrew-ec-foss/eventloop) backend system at HSP. Reimagined as a modern Next.js frontend with serverless capabilities.
9-
107
<details>
118
<summary>Required environment variables</summary>
129

@@ -67,6 +64,8 @@ If you don't already have a Turso database, follow these steps to create one and
6764

6865
The application automatically checks for the database tables on startup and initializes them if they don't exist. The user whose email matches the `ADMIN_EMAIL` environment variable will automatically be assigned the admin role when they first sign in. All other new users will be assigned the "applicant" role by default and must be approved by an admin to become participants.
6966

67+
> **Note:** (eloop-turso) is based on the concept and architecture of the original [eventloop](https://github.com/homebrew-ec-foss/eventloop) backend system at HSP. Reimagined as a modern Next.js frontend with serverless capabilities.
68+
7069
## Features
7170

7271
- **Role-Based Access Control**: Admin, Organizer, Volunteer, Participant, and Applicant roles with hierarchical permissions

src/app/dashboard/events/page.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -358,11 +358,13 @@ export default function EventsPage() {
358358
)}
359359
</div>
360360

361-
<div className="bg-gray-50 px-6 py-3 border-t">
362-
<span className="text-sm text-gray-500">
363-
{registrationCounts[event.id] || 0} registrations
364-
</span>
365-
</div>
361+
{(userRole === 'admin' || userRole === 'organizer') && (
362+
<div className="bg-gray-50 px-6 py-3 border-t">
363+
<span className="text-sm text-gray-500">
364+
{registrationCounts[event.id] || 0} registrations
365+
</span>
366+
</div>
367+
)}
366368
</div>
367369
);
368370
})}

0 commit comments

Comments
 (0)