Merged in feat/SW-1449-destination-page (pull request #1195)
Feat/SW-1449 destination page * feat(SW-1449): Added destination country page * feat(SW-1449): added destination city page Approved-by: Fredrik Thorsson Approved-by: Matilda Landström
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
#import "./AccountPage.graphql"
|
||||
#import "./CollectionPage.graphql"
|
||||
#import "./ContentPage.graphql"
|
||||
#import "./DestinationOverviewPage.graphql"
|
||||
#import "./DestinationCountryPage.graphql"
|
||||
#import "./DestinationCityPage.graphql"
|
||||
#import "./HotelPage.graphql"
|
||||
#import "./LoyaltyPage.graphql"
|
||||
|
||||
@@ -13,6 +16,9 @@ fragment Breadcrumbs on Breadcrumbs {
|
||||
...AccountPageBreadcrumb
|
||||
...CollectionPageBreadcrumb
|
||||
...ContentPageBreadcrumb
|
||||
...DestinationOverviewPageBreadcrumb
|
||||
...DestinationCountryPageBreadcrumb
|
||||
...DestinationCityPageBreadcrumb
|
||||
...HotelPageBreadcrumb
|
||||
...LoyaltyPageBreadcrumb
|
||||
}
|
||||
@@ -29,6 +35,9 @@ fragment BreadcrumbsRefs on Breadcrumbs {
|
||||
...AccountPageBreadcrumbRef
|
||||
...CollectionPageBreadcrumbRef
|
||||
...ContentPageBreadcrumbRef
|
||||
...DestinationOverviewPageBreadcrumbRef
|
||||
...DestinationCountryPageBreadcrumbRef
|
||||
...DestinationCityPageBreadcrumbRef
|
||||
...HotelPageBreadcrumbRef
|
||||
...LoyaltyPageBreadcrumbRef
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
#import "../System.graphql"
|
||||
|
||||
fragment DestinationCityPageBreadcrumb on DestinationCityPage {
|
||||
web {
|
||||
breadcrumbs {
|
||||
title
|
||||
}
|
||||
}
|
||||
system {
|
||||
...System
|
||||
}
|
||||
url
|
||||
}
|
||||
|
||||
fragment DestinationCityPageBreadcrumbRef on DestinationCityPage {
|
||||
web {
|
||||
breadcrumbs {
|
||||
title
|
||||
}
|
||||
}
|
||||
system {
|
||||
...System
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#import "../System.graphql"
|
||||
|
||||
fragment DestinationCountryPageBreadcrumb on DestinationCountryPage {
|
||||
web {
|
||||
breadcrumbs {
|
||||
title
|
||||
}
|
||||
}
|
||||
system {
|
||||
...System
|
||||
}
|
||||
url
|
||||
}
|
||||
|
||||
fragment DestinationCountryPageBreadcrumbRef on DestinationCountryPage {
|
||||
web {
|
||||
breadcrumbs {
|
||||
title
|
||||
}
|
||||
}
|
||||
system {
|
||||
...System
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#import "../System.graphql"
|
||||
|
||||
fragment DestinationOverviewPageBreadcrumb on DestinationOverviewPage {
|
||||
web {
|
||||
breadcrumbs {
|
||||
title
|
||||
}
|
||||
}
|
||||
system {
|
||||
...System
|
||||
}
|
||||
url
|
||||
}
|
||||
|
||||
fragment DestinationOverviewPageBreadcrumbRef on DestinationOverviewPage {
|
||||
web {
|
||||
breadcrumbs {
|
||||
title
|
||||
}
|
||||
}
|
||||
system {
|
||||
...System
|
||||
}
|
||||
}
|
||||
@@ -36,6 +36,20 @@ query GetDestinationOverviewPageSettings($uid: String!, $locale: String!) {
|
||||
}
|
||||
}
|
||||
}
|
||||
query GetDestinationCountryPageSettings($uid: String!, $locale: String!) {
|
||||
destination_country_page(uid: $uid, locale: $locale) {
|
||||
page_settings {
|
||||
hide_booking_widget
|
||||
}
|
||||
}
|
||||
}
|
||||
query GetDestinationCityPageSettings($uid: String!, $locale: String!) {
|
||||
destination_city_page(uid: $uid, locale: $locale) {
|
||||
page_settings {
|
||||
hide_booking_widget
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query GetHotelPageSettings($uid: String!, $locale: String!) {
|
||||
hotel_page(uid: $uid, locale: $locale) {
|
||||
|
||||
28
lib/graphql/Query/Breadcrumbs/DestinationCityPage.graphql
Normal file
28
lib/graphql/Query/Breadcrumbs/DestinationCityPage.graphql
Normal file
@@ -0,0 +1,28 @@
|
||||
#import "../../Fragments/Breadcrumbs/Breadcrumbs.graphql"
|
||||
#import "../../Fragments/System.graphql"
|
||||
|
||||
query GetDestinationCityPageBreadcrumbs($locale: String!, $uid: String!) {
|
||||
destination_city_page(locale: $locale, uid: $uid) {
|
||||
web {
|
||||
breadcrumbs {
|
||||
...Breadcrumbs
|
||||
}
|
||||
}
|
||||
system {
|
||||
...System
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query GetDestinationCityPageBreadcrumbsRefs($locale: String!, $uid: String!) {
|
||||
destination_city_page(locale: $locale, uid: $uid) {
|
||||
web {
|
||||
breadcrumbs {
|
||||
...BreadcrumbsRefs
|
||||
}
|
||||
}
|
||||
system {
|
||||
...System
|
||||
}
|
||||
}
|
||||
}
|
||||
31
lib/graphql/Query/Breadcrumbs/DestinationCountryPage.graphql
Normal file
31
lib/graphql/Query/Breadcrumbs/DestinationCountryPage.graphql
Normal file
@@ -0,0 +1,31 @@
|
||||
#import "../../Fragments/Breadcrumbs/Breadcrumbs.graphql"
|
||||
#import "../../Fragments/System.graphql"
|
||||
|
||||
query GetDestinationCountryPageBreadcrumbs($locale: String!, $uid: String!) {
|
||||
destination_country_page(locale: $locale, uid: $uid) {
|
||||
web {
|
||||
breadcrumbs {
|
||||
...Breadcrumbs
|
||||
}
|
||||
}
|
||||
system {
|
||||
...System
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query GetDestinationCountryPageBreadcrumbsRefs(
|
||||
$locale: String!
|
||||
$uid: String!
|
||||
) {
|
||||
destination_country_page(locale: $locale, uid: $uid) {
|
||||
web {
|
||||
breadcrumbs {
|
||||
...BreadcrumbsRefs
|
||||
}
|
||||
}
|
||||
system {
|
||||
...System
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
#import "../../Fragments/System.graphql"
|
||||
|
||||
query GetDestinationCityPage($locale: String!, $uid: String!) {
|
||||
destination_city_page(uid: $uid, locale: $locale) {
|
||||
title
|
||||
system {
|
||||
...System
|
||||
created_at
|
||||
updated_at
|
||||
}
|
||||
}
|
||||
trackingProps: destination_city_page(locale: "en", uid: $uid) {
|
||||
url
|
||||
}
|
||||
}
|
||||
|
||||
query GetDestinationCityPageRefs($locale: String!, $uid: String!) {
|
||||
destination_city_page(locale: $locale, uid: $uid) {
|
||||
system {
|
||||
...System
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query GetDaDeEnUrlsDestinationCityPage($uid: String!) {
|
||||
de: destination_city_page(locale: "de", uid: $uid) {
|
||||
url
|
||||
}
|
||||
en: destination_city_page(locale: "en", uid: $uid) {
|
||||
url
|
||||
}
|
||||
da: destination_city_page(locale: "da", uid: $uid) {
|
||||
url
|
||||
}
|
||||
}
|
||||
|
||||
query GetFiNoSvUrlsDestinationCityPage($uid: String!) {
|
||||
fi: destination_city_page(locale: "fi", uid: $uid) {
|
||||
url
|
||||
}
|
||||
no: destination_city_page(locale: "no", uid: $uid) {
|
||||
url
|
||||
}
|
||||
sv: destination_city_page(locale: "sv", uid: $uid) {
|
||||
url
|
||||
}
|
||||
}
|
||||
18
lib/graphql/Query/DestinationCityPage/Metadata.graphql
Normal file
18
lib/graphql/Query/DestinationCityPage/Metadata.graphql
Normal file
@@ -0,0 +1,18 @@
|
||||
#import "../../Fragments/Metadata.graphql"
|
||||
#import "../../Fragments/System.graphql"
|
||||
|
||||
query GetDestinationCityPageMetadata($locale: String!, $uid: String!) {
|
||||
destination_city_page(locale: $locale, uid: $uid) {
|
||||
web {
|
||||
breadcrumbs {
|
||||
title
|
||||
}
|
||||
seo_metadata {
|
||||
...Metadata
|
||||
}
|
||||
}
|
||||
system {
|
||||
...System
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
#import "../../Fragments/System.graphql"
|
||||
|
||||
query GetDestinationCountryPage($locale: String!, $uid: String!) {
|
||||
destination_country_page(uid: $uid, locale: $locale) {
|
||||
title
|
||||
system {
|
||||
...System
|
||||
created_at
|
||||
updated_at
|
||||
}
|
||||
}
|
||||
trackingProps: destination_country_page(locale: "en", uid: $uid) {
|
||||
url
|
||||
}
|
||||
}
|
||||
|
||||
query GetDestinationCountryPageRefs($locale: String!, $uid: String!) {
|
||||
destination_country_page(locale: $locale, uid: $uid) {
|
||||
system {
|
||||
...System
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query GetDaDeEnUrlsDestinationCountryPage($uid: String!) {
|
||||
de: destination_country_page(locale: "de", uid: $uid) {
|
||||
url
|
||||
}
|
||||
en: destination_country_page(locale: "en", uid: $uid) {
|
||||
url
|
||||
}
|
||||
da: destination_country_page(locale: "da", uid: $uid) {
|
||||
url
|
||||
}
|
||||
}
|
||||
|
||||
query GetFiNoSvUrlsDestinationCountryPage($uid: String!) {
|
||||
fi: destination_country_page(locale: "fi", uid: $uid) {
|
||||
url
|
||||
}
|
||||
no: destination_country_page(locale: "no", uid: $uid) {
|
||||
url
|
||||
}
|
||||
sv: destination_country_page(locale: "sv", uid: $uid) {
|
||||
url
|
||||
}
|
||||
}
|
||||
18
lib/graphql/Query/DestinationCountryPage/Metadata.graphql
Normal file
18
lib/graphql/Query/DestinationCountryPage/Metadata.graphql
Normal file
@@ -0,0 +1,18 @@
|
||||
#import "../../Fragments/Metadata.graphql"
|
||||
#import "../../Fragments/System.graphql"
|
||||
|
||||
query GetDestinationCountryPageMetadata($locale: String!, $uid: String!) {
|
||||
destination_country_page(locale: $locale, uid: $uid) {
|
||||
web {
|
||||
breadcrumbs {
|
||||
title
|
||||
}
|
||||
seo_metadata {
|
||||
...Metadata
|
||||
}
|
||||
}
|
||||
system {
|
||||
...System
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -60,4 +60,20 @@ query EntryByUrlBatch2($locale: String!, $url: String!) {
|
||||
}
|
||||
total
|
||||
}
|
||||
all_destination_country_page(where: { url: $url }, locale: $locale) {
|
||||
items {
|
||||
system {
|
||||
...System
|
||||
}
|
||||
}
|
||||
total
|
||||
}
|
||||
all_destination_city_page(where: { url: $url }, locale: $locale) {
|
||||
items {
|
||||
system {
|
||||
...System
|
||||
}
|
||||
}
|
||||
total
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,3 +176,13 @@ export const getDestinationOverviewPage = cache(
|
||||
return serverClient().contentstack.destinationOverviewPage.get()
|
||||
}
|
||||
)
|
||||
export const getDestinationCountryPage = cache(
|
||||
async function getMemoizedDestinationCountryPage() {
|
||||
return serverClient().contentstack.destinationCountryPage.get()
|
||||
}
|
||||
)
|
||||
export const getDestinationCityPage = cache(
|
||||
async function getMemoizedDestinationCityPage() {
|
||||
return serverClient().contentstack.destinationCityPage.get()
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user