Add user setting to provide location and show events near location on
homepage Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -15,10 +15,11 @@ originId
|
||||
`;
|
||||
|
||||
export const ADDRESS = gql`
|
||||
query($query:String!, $locale: String) {
|
||||
query($query:String!, $locale: String, $type: AddressSearchType) {
|
||||
searchAddress(
|
||||
query: $query,
|
||||
locale: $locale
|
||||
locale: $locale,
|
||||
type: $type
|
||||
) {
|
||||
${$addressFragment}
|
||||
}
|
||||
|
||||
@@ -207,6 +207,7 @@ export const FETCH_EVENTS = gql`
|
||||
endsOn
|
||||
status
|
||||
visibility
|
||||
insertedAt
|
||||
picture {
|
||||
id
|
||||
url
|
||||
@@ -673,3 +674,26 @@ export const FETCH_GROUP_EVENTS = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const CLOSE_EVENTS = gql`
|
||||
query CloseEvents($location: String, $radius: Float) {
|
||||
searchEvents(location: $location, radius: $radius, page: 1, limit: 10) {
|
||||
total
|
||||
elements {
|
||||
id
|
||||
title
|
||||
uuid
|
||||
beginsOn
|
||||
picture {
|
||||
id
|
||||
url
|
||||
}
|
||||
tags {
|
||||
slug
|
||||
title
|
||||
}
|
||||
__typename
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -125,6 +125,11 @@ export const USER_SETTINGS_FRAGMENT = gql`
|
||||
notificationBeforeEvent
|
||||
notificationPendingParticipation
|
||||
notificationPendingMembership
|
||||
location {
|
||||
range
|
||||
geohash
|
||||
name
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -149,6 +154,7 @@ export const SET_USER_SETTINGS = gql`
|
||||
$notificationBeforeEvent: Boolean
|
||||
$notificationPendingParticipation: NotificationPendingEnum
|
||||
$notificationPendingMembership: NotificationPendingEnum
|
||||
$location: LocationInput
|
||||
) {
|
||||
setUserSettings(
|
||||
timezone: $timezone
|
||||
@@ -157,6 +163,7 @@ export const SET_USER_SETTINGS = gql`
|
||||
notificationBeforeEvent: $notificationBeforeEvent
|
||||
notificationPendingParticipation: $notificationPendingParticipation
|
||||
notificationPendingMembership: $notificationPendingMembership
|
||||
location: $location
|
||||
) {
|
||||
...UserSettingFragment
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user