parent
464528381d
commit
19c7756465
@ -387,6 +387,7 @@ export default class EditorComponent extends Vue {
|
|||||||
placement: 'top-start',
|
placement: 'top-start',
|
||||||
inertia: true,
|
inertia: true,
|
||||||
duration: [400, 200],
|
duration: [400, 200],
|
||||||
|
// @ts-ignore for some reason
|
||||||
showOnInit: true,
|
showOnInit: true,
|
||||||
arrow: true,
|
arrow: true,
|
||||||
arrowType: 'round',
|
arrowType: 'round',
|
||||||
|
@ -70,7 +70,7 @@ query {
|
|||||||
}`;
|
}`;
|
||||||
|
|
||||||
export const CURRENT_ACTOR_CLIENT = gql`
|
export const CURRENT_ACTOR_CLIENT = gql`
|
||||||
query {
|
query currentActor {
|
||||||
currentActor @client {
|
currentActor @client {
|
||||||
id,
|
id,
|
||||||
avatar {
|
avatar {
|
||||||
|
@ -289,6 +289,7 @@ export const EDIT_EVENT = gql`
|
|||||||
$picture: PictureInput,
|
$picture: PictureInput,
|
||||||
$onlineAddress: String,
|
$onlineAddress: String,
|
||||||
$phoneAddress: String,
|
$phoneAddress: String,
|
||||||
|
$organizerActorId: ID,
|
||||||
$category: String,
|
$category: String,
|
||||||
$physicalAddress: AddressInput,
|
$physicalAddress: AddressInput,
|
||||||
$options: EventOptionsInput,
|
$options: EventOptionsInput,
|
||||||
@ -307,6 +308,7 @@ export const EDIT_EVENT = gql`
|
|||||||
picture: $picture,
|
picture: $picture,
|
||||||
onlineAddress: $onlineAddress,
|
onlineAddress: $onlineAddress,
|
||||||
phoneAddress: $phoneAddress,
|
phoneAddress: $phoneAddress,
|
||||||
|
organizerActorId: $organizerActorId,
|
||||||
category: $category,
|
category: $category,
|
||||||
physicalAddress: $physicalAddress
|
physicalAddress: $physicalAddress
|
||||||
options: $options,
|
options: $options,
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Component, Prop, Vue } from 'vue-property-decorator';
|
import { Component, Prop, Vue, Watch } from 'vue-property-decorator';
|
||||||
import { IActor } from '@/types/actor';
|
import { IActor } from '@/types/actor';
|
||||||
import IdentityPicker from './IdentityPicker.vue';
|
import IdentityPicker from './IdentityPicker.vue';
|
||||||
|
|
||||||
@ -22,6 +22,11 @@ export default class IdentityPickerWrapper extends Vue {
|
|||||||
isComponentModalActive: boolean = false;
|
isComponentModalActive: boolean = false;
|
||||||
currentIdentity: IActor = this.value;
|
currentIdentity: IActor = this.value;
|
||||||
|
|
||||||
|
@Watch('value')
|
||||||
|
updateCurrentActor(value) {
|
||||||
|
this.currentIdentity = value;
|
||||||
|
}
|
||||||
|
|
||||||
relay(identity: IActor) {
|
relay(identity: IActor) {
|
||||||
this.currentIdentity = identity;
|
this.currentIdentity = identity;
|
||||||
this.$emit('input', identity);
|
this.$emit('input', identity);
|
||||||
@ -36,4 +41,4 @@ export default class IdentityPickerWrapper extends Vue {
|
|||||||
height: 1.5em;
|
height: 1.5em;
|
||||||
vertical-align: text-bottom;
|
vertical-align: text-bottom;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -292,11 +292,15 @@ defmodule MobilizonWeb.Resolvers.Event do
|
|||||||
%{event_id: event_id} = args,
|
%{event_id: event_id} = args,
|
||||||
%{context: %{current_user: user}} = _resolution
|
%{context: %{current_user: user}} = _resolution
|
||||||
) do
|
) do
|
||||||
|
require Logger
|
||||||
|
Logger.error(inspect(args))
|
||||||
# See https://github.com/absinthe-graphql/absinthe/issues/490
|
# See https://github.com/absinthe-graphql/absinthe/issues/490
|
||||||
with args <- Map.put(args, :options, args[:options] || %{}),
|
with args <- Map.put(args, :options, args[:options] || %{}),
|
||||||
{:ok, %Event{} = event} <- Events.get_event_with_preload(event_id),
|
{:ok, %Event{} = event} <- Events.get_event_with_preload(event_id),
|
||||||
|
organizer_actor_id <- args |> Map.get(:organizer_actor_id, event.organizer_actor_id),
|
||||||
{:is_owned, %Actor{} = organizer_actor} <-
|
{:is_owned, %Actor{} = organizer_actor} <-
|
||||||
User.owns_actor(user, event.organizer_actor_id),
|
User.owns_actor(user, organizer_actor_id),
|
||||||
|
:ok <- Logger.error(inspect(organizer_actor)),
|
||||||
args <- Map.put(args, :organizer_actor, organizer_actor),
|
args <- Map.put(args, :organizer_actor, organizer_actor),
|
||||||
{:ok, %Activity{data: %{"object" => %{"type" => "Event"}}}, %Event{} = event} <-
|
{:ok, %Activity{data: %{"object" => %{"type" => "Event"}}}, %Event{} = event} <-
|
||||||
MobilizonWeb.API.Events.update_event(args, event) do
|
MobilizonWeb.API.Events.update_event(args, event) do
|
||||||
|
@ -299,6 +299,7 @@ defmodule MobilizonWeb.Schema.EventType do
|
|||||||
|
|
||||||
arg(:online_address, :string)
|
arg(:online_address, :string)
|
||||||
arg(:phone_address, :string)
|
arg(:phone_address, :string)
|
||||||
|
arg(:organizer_actor_id, :id)
|
||||||
arg(:category, :string)
|
arg(:category, :string)
|
||||||
arg(:physical_address, :address_input)
|
arg(:physical_address, :address_input)
|
||||||
arg(:options, :event_options_input)
|
arg(:options, :event_options_input)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# source: http://localhost:4000/api
|
# source: http://localhost:4000/api
|
||||||
# timestamp: Fri Nov 08 2019 17:20:47 GMT+0100 (Central European Standard Time)
|
# timestamp: Mon Nov 18 2019 16:00:35 GMT+0100 (Central European Standard Time)
|
||||||
|
|
||||||
schema {
|
schema {
|
||||||
query: RootQueryType
|
query: RootQueryType
|
||||||
@ -1081,6 +1081,7 @@ type RootMutationType {
|
|||||||
joinOptions: EventJoinOptions = FREE
|
joinOptions: EventJoinOptions = FREE
|
||||||
onlineAddress: String
|
onlineAddress: String
|
||||||
options: EventOptionsInput
|
options: EventOptionsInput
|
||||||
|
organizerActorId: ID
|
||||||
phoneAddress: String
|
phoneAddress: String
|
||||||
physicalAddress: AddressInput
|
physicalAddress: AddressInput
|
||||||
|
|
||||||
@ -1178,7 +1179,7 @@ type RootQueryType {
|
|||||||
reports(limit: Int = 10, page: Int = 1, status: ReportStatus = OPEN): [Report]
|
reports(limit: Int = 10, page: Int = 1, status: ReportStatus = OPEN): [Report]
|
||||||
|
|
||||||
"""Reverse geocode coordinates"""
|
"""Reverse geocode coordinates"""
|
||||||
reverseGeocode(latitude: Float!, longitude: Float!): [Address]
|
reverseGeocode(latitude: Float!, locale: String = "en", longitude: Float!, zoom: Int = 15): [Address]
|
||||||
|
|
||||||
"""Search for an address"""
|
"""Search for an address"""
|
||||||
searchAddress(limit: Int = 10, locale: String = "en", page: Int = 1, query: String!): [Address]
|
searchAddress(limit: Int = 10, locale: String = "en", page: Int = 1, query: String!): [Address]
|
||||||
|
Loading…
Reference in New Issue
Block a user