diff --git a/api/supabase/queries/events.ts b/api/supabase/queries/events.ts
index 183b64e..5535887 100644
--- a/api/supabase/queries/events.ts
+++ b/api/supabase/queries/events.ts
@@ -11,12 +11,12 @@ export async function fetchAllEvents() {
return data;
}
-// fetches all events that have event_status = 'ACTIVE'
+// fetches all events that have event_status = 'Active'
export async function fetchAllActiveEvents() {
const { data, error } = await supabase
.from('events')
.select('*')
- .eq('event_status', 'ACTIVE');
+ .eq('event_status', 'Active');
if (error) {
throw new Error(error.message);
}
diff --git a/app/activeEvents/page.tsx b/app/activeEvents/page.tsx
index 4d5ec50..3f8f6d3 100644
--- a/app/activeEvents/page.tsx
+++ b/app/activeEvents/page.tsx
@@ -38,7 +38,7 @@ export default function Page() {
setEvents(fetchedActiveEvents);
};
getActiveEvents();
- }, [events]);
+ }, []);
return (
@@ -53,7 +53,10 @@ export default function Page() {
{events.map(event => (
-
+
))}
diff --git a/app/events/page.tsx b/app/events/page.tsx
index e99c643..e066eae 100644
--- a/app/events/page.tsx
+++ b/app/events/page.tsx
@@ -22,7 +22,7 @@ export default function Page() {
facility_id |
start_date_time |
end_date_time |
- type_of_act |
+ performance_type |
genre |
needs_host |
performer_type |
@@ -36,7 +36,7 @@ export default function Page() {
{d.facility_id} |
{d.start_date_time} |
{d.end_date_time} |
- {d.type_of_act} |
+ {d.performance_type} |
{d.genre} |
{d.needs_host} |
{d.performer_type} |
diff --git a/components/EventListingCard/EventListingCard.tsx b/components/EventListingCard/EventListingCard.tsx
index d69cdbb..7a6445d 100644
--- a/components/EventListingCard/EventListingCard.tsx
+++ b/components/EventListingCard/EventListingCard.tsx
@@ -1,6 +1,11 @@
import React from 'react';
+import { PerformanceType } from '@/types/schema';
import { EventListing } from './styles';
-export default function EventListingCard({ genre }: { genre: string }) {
- return {genre} ;
+export default function EventListingCard({
+ performance_type,
+}: {
+ performance_type: PerformanceType;
+}) {
+ return {performance_type} ;
}
diff --git a/types/schema.d.ts b/types/schema.d.ts
index c92d743..9931abe 100644
--- a/types/schema.d.ts
+++ b/types/schema.d.ts
@@ -2,7 +2,7 @@
import type { UUID } from 'crypto';
// used for events and volunteer_preference tables
-export type TypeOfAct =
+export type PerformanceType =
| 'Music'
| 'Dance'
| 'Poetry'
@@ -15,7 +15,7 @@ export type TypeOfAct =
| 'Puppetry';
// used for volunteers_preference and facilities table
-export type TypeOfFacility =
+export type FacilityType =
| 'Assisted Living'
| "Children's Day Care"
| 'Detention Center'
@@ -53,31 +53,36 @@ export type Genre =
| 'Standards';
// used for events table
-export type EventStatus = 'ACTIVE' | 'INACTIVE';
+export type EventStatus = 'Active' | 'Inactive';
// used for event_signups table
export type Role = 'Host' | 'Performer';
-// used for availabilities table
-export type Day =
- | 'Monday'
- | 'Tuesday'
- | 'Wednesday'
- | 'Thursday'
- | 'Friday'
- | 'Saturday'
- | 'Sunday';
-
-export type TypeOfPerformer = 'Solo' | 'Duo' | 'Band';
+export type PerformerType =
+ | 'Solo'
+ | 'Duo'
+ | 'Trio'
+ | 'Quartet'
+ | 'Five or More';
export interface Availabilities {
availability_id: UUID;
facility_id: UUID;
- date: Date; // date
- day_of_week: Day;
- start_time: string; // timestamptz
- end_time: string; // timestamptz
- is_recurring: boolean;
+ name: string;
+ additional_info: string;
+}
+
+export interface AvailableDates {
+ date_id: UUID;
+ availability_id: UUID;
+ available_date: string; //date
+}
+
+export interface Timeslots {
+ timeslot_id: UUID;
+ date_id: UUID;
+ start_time: string; //timestamptz
+ end_time: string; //timestamptz
}
export interface Event {
@@ -85,11 +90,12 @@ export interface Event {
facility_id: UUID;
start_date_time: string; //timestamptz
end_date_time: string; //timestamptz
- type_of_act: TypeOfAct;
- genre: Genre;
+ performance_type: PerformanceType;
+ genre?: Genre;
needs_host: boolean;
- performer_type: TypeOfPerformer;
event_status: EventStatus;
+ performer_type: PerformerType;
+ notes?: string;
}
export interface EventSignups {
@@ -99,27 +105,30 @@ export interface EventSignups {
is_accepted: boolean;
}
-export interface Facilities {
+export interface FacilityContacts {
+ user_id: UUID;
facility_id: UUID;
- name: string;
email: string;
+ first_name: string;
+ last_name: string;
phone_number: string;
- state: string;
+}
+
+export interface Facilities {
+ facility_id: UUID;
+ name: string;
+ county: string;
city: string;
street_address_1: string;
street_address_2?: string;
- postal_code: string;
audience: Audience;
- type: TypeOfFacility;
+ type: FacilityType;
host_name?: string;
host_contact?: string;
- poc_name: string;
- poc_contact: string;
- notifications_opt_in: boolean;
}
export interface Volunteers {
- volunteer_id: UUID;
+ user_id: UUID;
first_name: string;
last_name: string;
email: string;
@@ -128,11 +137,12 @@ export interface Volunteers {
}
export interface VolunteersPreferences {
- volunteer_id: UUID;
- city?: string;
- genre?: Genre;
- instruments?: Instruments;
- type_of_act?: TypeOfAct;
- audience?: Audience;
- facility_type?: TypeOfFacility;
+ user_id: UUID;
+ role?: Role[];
+ performance_type?: PerformanceType[];
+ facility_type?: FacilityType[];
+ locations?: string[];
+ audience?: Audience[];
+ genre?: Genre[];
+ additional_info?: string;
}