From e9fc9bccb4c2d570d789d21c9149af755ad58786 Mon Sep 17 00:00:00 2001
From: Thai <42761684+thaigillespie@users.noreply.github.com>
Date: Sun, 3 Jan 2021 09:41:29 -0800
Subject: [PATCH] Disallow event signin/rsvp for pending+complete events for
non-officers (#204)
* Disallow event signin/rsvp for pending+complete events for non-officers
* Remove role checking for disabling event signin/rsvp buttons
* Combine event signin/rsvp buttons into 1 Grid container
---
.../components/EventDetails/index.tsx | 28 ++++++++++++-------
1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/src/pages/EventDetailsPage/components/EventDetails/index.tsx b/src/pages/EventDetailsPage/components/EventDetails/index.tsx
index 58545c8e..8dcbdd74 100644
--- a/src/pages/EventDetailsPage/components/EventDetails/index.tsx
+++ b/src/pages/EventDetailsPage/components/EventDetails/index.tsx
@@ -15,6 +15,7 @@ import {
} from '@HOCs/RenderPermissions';
import { Tags, Card, GetLocation } from '@SharedComponents';
import { EventResponse as EventInfo } from '@Services/api/models';
+import { EventStatusEnum } from '@Services/EventService';
interface EventDetailsComponentProps {
eventInfo: EventInfo;
@@ -37,6 +38,7 @@ function EventDetailsComponent(props: EventDetailsComponentProps) {
canvaURL = null,
signInURL,
rsvpURL,
+ status,
} = eventInfo;
const urls = {
@@ -47,6 +49,21 @@ function EventDetailsComponent(props: EventDetailsComponentProps) {
canva: { url: canvaURL, label: 'Canva' },
};
+ const renderSignInRSVPButtons = () =>
+ status === EventStatusEnum.Ready ? (
+
+
+
+
+
+
+
+
+
+ ) : (
+ <>>
+ );
+
return (
@@ -70,16 +87,7 @@ function EventDetailsComponent(props: EventDetailsComponentProps) {
})}
-
-
-
-
-
-
-
-
-
-
+ {renderSignInRSVPButtons()}