parent
9b7cd5831a
commit
a407a56051
@ -616,6 +616,7 @@ import {
|
|||||||
EventJoinOptions,
|
EventJoinOptions,
|
||||||
EventStatus,
|
EventStatus,
|
||||||
EventVisibility,
|
EventVisibility,
|
||||||
|
GroupVisibility,
|
||||||
MemberRole,
|
MemberRole,
|
||||||
ParticipantRole,
|
ParticipantRole,
|
||||||
} from "@/types/enums";
|
} from "@/types/enums";
|
||||||
@ -639,6 +640,7 @@ import {
|
|||||||
LOGGED_USER_DRAFTS,
|
LOGGED_USER_DRAFTS,
|
||||||
PERSON_STATUS_GROUP,
|
PERSON_STATUS_GROUP,
|
||||||
} from "../../graphql/actor";
|
} from "../../graphql/actor";
|
||||||
|
import { FETCH_GROUP } from "../../graphql/group";
|
||||||
import {
|
import {
|
||||||
displayNameAndUsername,
|
displayNameAndUsername,
|
||||||
IActor,
|
IActor,
|
||||||
@ -719,6 +721,21 @@ const DEFAULT_LIMIT_NUMBER_OF_PLACES = 10;
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
group: {
|
||||||
|
query: FETCH_GROUP,
|
||||||
|
fetchPolicy: "cache-and-network",
|
||||||
|
variables() {
|
||||||
|
return {
|
||||||
|
name: this.event?.attributedTo?.preferredUsername,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
skip() {
|
||||||
|
return (
|
||||||
|
!this.event?.attributedTo ||
|
||||||
|
!this.event?.attributedTo?.preferredUsername
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
metaInfo() {
|
metaInfo() {
|
||||||
return {
|
return {
|
||||||
@ -737,6 +754,8 @@ export default class EditEvent extends Vue {
|
|||||||
|
|
||||||
@Prop({ type: Boolean, default: false }) isDuplicate!: boolean;
|
@Prop({ type: Boolean, default: false }) isDuplicate!: boolean;
|
||||||
|
|
||||||
|
group!: IGroup;
|
||||||
|
|
||||||
currentActor!: IActor;
|
currentActor!: IActor;
|
||||||
|
|
||||||
loggedUser!: IUser;
|
loggedUser!: IUser;
|
||||||
@ -782,6 +801,16 @@ export default class EditEvent extends Vue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Watch("group")
|
||||||
|
updateEventVisibility(group: IGroup): void {
|
||||||
|
if (!this.isUpdate && group.visibility == GroupVisibility.UNLISTED) {
|
||||||
|
this.event.visibility = EventVisibility.UNLISTED;
|
||||||
|
}
|
||||||
|
if (!this.isUpdate && group.visibility == GroupVisibility.PUBLIC) {
|
||||||
|
this.event.visibility = EventVisibility.PUBLIC;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private initializeEvent() {
|
private initializeEvent() {
|
||||||
const roundUpTo15Minutes = (time: Date) => {
|
const roundUpTo15Minutes = (time: Date) => {
|
||||||
time.setMilliseconds(Math.round(time.getMilliseconds() / 1000) * 1000);
|
time.setMilliseconds(Math.round(time.getMilliseconds() / 1000) * 1000);
|
||||||
|
Loading…
Reference in New Issue
Block a user