diff --git a/js/src/views/Account/Register.vue b/js/src/views/Account/Register.vue index 8dc97b895..95a770e9b 100644 --- a/js/src/views/Account/Register.vue +++ b/js/src/views/Account/Register.vue @@ -129,6 +129,7 @@ import RouteName from "../../router/name"; import { changeIdentity } from "../../utils/auth"; import identityEditionMixin from "../../mixins/identityEdition"; import { ApolloCache, FetchResult } from "@apollo/client/core"; +import { ActorType } from "@/types/enums"; @Component({ apollo: { @@ -180,8 +181,18 @@ export default class Register extends mixins(identityEditionMixin) { }); if (identitiesData && localData) { - identitiesData.identities.push(localData.registerPerson); - store.writeQuery({ query: IDENTITIES, data: identitiesData }); + const newPersonData = { + ...localData.registerPerson, + type: ActorType.PERSON, + }; + + store.writeQuery({ + query: IDENTITIES, + data: { + ...identitiesData, + identities: [...identitiesData.identities, newPersonData], + }, + }); } } }, diff --git a/js/src/views/Event/Event.vue b/js/src/views/Event/Event.vue index 8664ce6aa..69fea48ff 100755 --- a/js/src/views/Event/Event.vue +++ b/js/src/views/Event/Event.vue @@ -1309,29 +1309,6 @@ export default class Event extends EventMixin { } return null; } - - get shouldShowParticipationButton(): boolean { - // So that people can cancel their participation - if ( - this.actorIsParticipant || - (this.config.anonymous.participation.allowed && - this.anonymousParticipation) - ) - return true; - - // You can participate to draft or cancelled events - if (this.event.draft || this.event.status === EventStatus.CANCELLED) - return false; - - // Organizer can't participate - if (this.actorIsOrganizer) return false; - - // If capacity is OK - if (this.eventCapacityOK) return true; - - // Else - return false; - } }