diff --git a/gql/queries/EventDetail.gql b/gql/queries/EventDetail.gql index 2d6e738..6bc03c1 100644 --- a/gql/queries/EventDetail.gql +++ b/gql/queries/EventDetail.gql @@ -1,6 +1,4 @@ #import "../gql/fragments/Image.gql" -#import "../gql/fragments/collections/DefaultFpbWithCardsAndHighlight.gql" -#import "../gql/fragments/collections/ExhibitionsAndCollectionsFpb.gql" query FTVADetail($slug: [String!]) { entry(section: "ftvaEvent", slug: $slug) { @@ -82,26 +80,6 @@ query FTVADetail($slug: [String!]) { } } } - - categorySeries: entry( - section: "ftvaEventSeries" - relatedToEntries: {section: "ftvaEvent", slug: $slug}) { - ... on ftvaEventSeries_eventSeries_Entry { - id - ftvaEvent { - ... on ftvaEvent_ftvaEvent_Entry { - id - title - startDate: startDateWithTime @formatDateTime(format: "Y-m-d", timezone: "America/Los_Angeles") - startTime: startDateWithTime @formatDateTime(format: "TH:i:s", timezone: "America/Los_Angeles") - - ftvaImage { - ...Image - } - } - } - } - } } fragment Image on AssetInterface { diff --git a/gql/queries/EventDetail2.gql b/gql/queries/EventDetail2.gql deleted file mode 100644 index 940cc06..0000000 --- a/gql/queries/EventDetail2.gql +++ /dev/null @@ -1,344 +0,0 @@ -# PARINITA"s Event Detail Query - -#import "../gql/fragments/Image.gql" -#import "../gql/fragments/collections/DefaultFpbWithCardsAndHighlight.gql" -#import "../gql/fragments/collections/ExhibitionsAndCollectionsFpb.gql" - -query EventDetail($slug: [String!]) { - event: entry(section: "event", slug: $slug) { - ... on event_event_Entry { - id - uri - typehandle - sectionHandle - title: eventTitle - eventLocation: location { - title - to: publicUrl - } - image: heroImage { - ... on heroImage_heroImage_BlockType { - image { - ...Image - } - } - } - to: uri - slug - libcalId - publicUrl - startDateWithTime - @formatDateTime( - format: "Y-m-d\\TH:i" - timezone: "America/Los_Angeles" - ) - endDateWithTime - @formatDateTime( - format: "Y-m-d\\TH:i" - timezone: "America/Los_Angeles" - ) - eventType { - ... on eventType_Category { - id - title - } - } - eventDescription - associatedLocations { - ... on location_location_Entry { - id - to: uri - title - summary - } - } - requiresRegistration - libcalRegistrationOpened - libcalRegistrationClosed - libcalPhysicalSeats - libcalPhysicalSeatsTaken - libcalOnlineSeats - libcalOnlineSeatsTaken - libcalWaitlist - onlineProvider: libcalEventOnlineProvider - onlineJoinURL: onlineEventUrl - eventTags { - ... on eventTags_Tag { - id - title - } - } - presenter - moreInformation - eventOwner - } - } - associatedSeries: entries( - section: "workshopOrEventSeries" - relatedToEntries: { section: "event", slug: $slug } - ) { - title - sectionHandle - workshopOrEventSeriesType - text: summary - image: heroImage { - ... on heroImage_heroImage_BlockType { - image { - ...Image - } - } - } - to: uri - startDate - @formatDateTime( - format: "Y-m-d\\TH:i" - timezone: "America/Los_Angeles" - ) - endDate - @formatDateTime( - format: "Y-m-d\\TH:i" - timezone: "America/Los_Angeles" - ) - ongoing - } - eventSeries: entry(section: "workshopOrEventSeries", slug: $slug) { - id - - ... on workshopOrEventSeries_workshopOrEventSeries_Entry { - id - workshopOrEventSeriesType - sectionHandle - typeHandle - uri - slug - title - summary - startDate - @formatDateTime( - format: "Y-m-d\\TH:i" - timezone: "America/Los_Angeles" - ) - endDate - @formatDateTime( - format: "Y-m-d\\TH:i" - timezone: "America/Los_Angeles" - ) - ongoing - eventLocation: location { - title - to: publicUrl - } - associatedLocations { - ... on location_location_Entry { - id - to: uri - title - summary - } - } - image: heroImage { - ... on heroImage_heroImage_BlockType { - image { - ...Image - } - } - } - associatedTopics { - id - title - text: summary - uri - externalResourceUrl - illustration - } - ...DefaultFpbWithCardsAndHighlight - } - } - - pastEvents: entries( - section: "event" - orderBy: "startDateWithTime DESC" - startDateWithTime: "< now" - relatedToEntries: { section: "workshopOrEventSeries", slug: $slug } - ) { - title: eventTitle - uri - sectionHandle - eventType { - title - } - startDateWithTime - @formatDateTime( - format: "Y-m-d\\TH:i:s" - timezone: "America/Los_Angeles" - ) - endDateWithTime - @formatDateTime( - format: "Y-m-d\\TH:i:s" - timezone: "America/Los_Angeles" - ) - associatedLocations { - title - } - eventLocation: location { - title - } - image: heroImage { - ... on heroImage_heroImage_BlockType { - image { - ...Image - } - } - } - category: eventType { - ... on eventType_Category { - id - title - } - } - } - - upcomingEvents: entries( - section: "event" - orderBy: "startDateWithTime ASC" - startDateWithTime: ">= now" - relatedToEntries: { section: "workshopOrEventSeries", slug: $slug } - ) { - title: eventTitle - uri - sectionHandle - eventType { - title - } - startDateWithTime - @formatDateTime( - format: "Y-m-d\\TH:i:s" - timezone: "America/Los_Angeles" - ) - endDateWithTime - @formatDateTime( - format: "Y-m-d\\TH:i:s" - timezone: "America/Los_Angeles" - ) - associatedLocations { - title - } - eventLocation: location { - title - } - image: heroImage { - ... on heroImage_heroImage_BlockType { - image { - ...Image - } - } - } - category: eventType { - ... on eventType_Category { - id - title - } - } - } - - exhibition: entry(section: "exhibition", slug: $slug) { - title - summary - sectionHandle - startDate - @formatDateTime( - format: "Y-m-d\\TH:i" - timezone: "America/Los_Angeles" - ) - endDate - @formatDateTime( - format: "Y-m-d\\TH:i" - timezone: "America/Los_Angeles" - ) - ongoing - image: heroImage { - ... on heroImage_heroImage_BlockType { - image { - ...Image - } - altText - } - } - ... on exhibition_exhibition_Entry { - sectionHandle - typeHandle - uri - slug - associatedLocationsAndPrograms { - title - to: uri - } - buttonUrl { - ... on buttonUrl_button_BlockType { - buttonText - buttonUrl - } - } - exhibitsAndEvents { - title - uri - sectionHandle - startDateWithTime - @formatDateTime( - format: "Y-m-d\\TH:i" - timezone: "America/Los_Angeles" - ) - endDateWithTime - @formatDateTime( - format: "Y-m-d\\TH:i" - timezone: "America/Los_Angeles" - ) - image: heroImage { - ... on heroImage_heroImage_BlockType { - image { - ...Image - } - } - } - text: eventDescription - locations: associatedLocations { - ... on location_location_Entry { - id - to: uri - title - summary - } - } - category: eventType { - ... on eventType_Category { - id - title - } - } - } - associatedStaffMember { - email - phoneNumber - staffMemberJobTitle - nameFirst - nameLast - uri - bookAConsultation - staffDepartment { - title - } - image: staffPortrait { - ...Image - } - } - acknowledgements { - ... on acknowledgements_richTextWithSectionTitle_BlockType { - displaySectionTitle - titleGeneral - acknowledgements - } - } - ...ExhibitionsAndCollectionsFpb - } - } -} diff --git a/gql/queries/FTVAEventDetailSeries.gql b/gql/queries/FTVAEventDetailSeries.gql new file mode 100644 index 0000000..475de90 --- /dev/null +++ b/gql/queries/FTVAEventDetailSeries.gql @@ -0,0 +1,33 @@ +#import "../gql/fragments/Image.gql" + +query FTVADetailSeries($slug: [String!]) { + entry( + section: "ftvaEventSeries" + relatedToEntries: {section: "ftvaEvent", slug: $slug}) { + ... on ftvaEventSeries_eventSeries_Entry { + id + ftvaEvent { + ... on ftvaEvent_ftvaEvent_Entry { + id + title + startDate: startDateWithTime @formatDateTime(format: "Y-m-d", timezone: "America/Los_Angeles") + startTime: startDateWithTime @formatDateTime(format: "TH:i:s", timezone: "America/Los_Angeles") + + ftvaImage { + ...Image + } + } + } + } + } +} + +fragment Image on AssetInterface { + id + src: url(transform: "fullscreen") + height(transform: "fullscreen") + width(transform: "fullscreen") + srcset(sizes: ["375", "960", "1280", "1920", "2560"]) + alt: altText + focalPoint +} diff --git a/pages/events/[slug].vue b/pages/events/[slug].vue index ae11ba5..f086621 100644 --- a/pages/events/[slug].vue +++ b/pages/events/[slug].vue @@ -8,6 +8,8 @@ import _get from 'lodash/get' // GQL import FTVAEventDetail from '../gql/queries/FTVAEventDetail.gql' +import FTVAEventDetailSeries from '../gql/queries/FTVAEventDetailSeries.gql' + const { $graphql } = useNuxtApp() const route = useRoute() @@ -15,6 +17,9 @@ const route = useRoute() // DATA const { data, error } = await useAsyncData(`events-detail-${route.params.slug}`, async () => { const data = await $graphql.default.request(FTVAEventDetail, { slug: route.params.slug }) + + // const ftvaEventSeries = await $graphql.default.request(FTVAEventDetailSeries, { slug: route.params.slug }) + // return { data, ftvaEventSeries } return data }) @@ -22,7 +27,6 @@ const { data, error } = await useAsyncData(`events-detail-${route.params.slug}`, // const page = ref(_get(data.value.single, 'entry', {})) const page = data.value.entry - // Banner Header const imageCarousel = page.imageCarousel const eventTitle = page.title @@ -65,7 +69,7 @@ if (!data.value.entry) { id="main" class="page page-event-detail" > - +

ftvaEventSeries:::{{ ftvaEventSeries }}

@@ -86,8 +90,6 @@ if (!data.value.entry) { - -

ResponsiveImage

InfoBlock

-

blockInfo: {{ ftvaTicketInformation }}

Arrray +

blockInfo: {{ blockInfo }}

Arrray If this event is part of an EventSeries display other events in the same series. - {{ series }} +
More in this series
CardWithImage
@@ -166,22 +168,22 @@ if (!data.value.entry) { date | time
+ - -