Issue #1569 : New event times and participants are hidden by default
This commit is contained in:
parent
63a237b05f
commit
67393ba2f0
|
@ -716,10 +716,12 @@ const setEventTimezoneToUserTimezoneIfUnset = () => {
|
||||||
// usefull if the page is loaded from scratch
|
// usefull if the page is loaded from scratch
|
||||||
watch(loggedUser, setEventTimezoneToUserTimezoneIfUnset);
|
watch(loggedUser, setEventTimezoneToUserTimezoneIfUnset);
|
||||||
|
|
||||||
const initializeEvent = () => {
|
const initializeNewEvent = () => {
|
||||||
// usefull if the data is already cached
|
// usefull if the data is already cached
|
||||||
setEventTimezoneToUserTimezoneIfUnset();
|
setEventTimezoneToUserTimezoneIfUnset();
|
||||||
|
|
||||||
|
// Default values for beginsOn and endsOn
|
||||||
|
|
||||||
const roundUpTo15Minutes = (time: Date) => {
|
const roundUpTo15Minutes = (time: Date) => {
|
||||||
time.setUTCMilliseconds(
|
time.setUTCMilliseconds(
|
||||||
Math.round(time.getUTCMilliseconds() / 1000) * 1000
|
Math.round(time.getUTCMilliseconds() / 1000) * 1000
|
||||||
|
@ -736,6 +738,13 @@ const initializeEvent = () => {
|
||||||
|
|
||||||
beginsOn.value = now;
|
beginsOn.value = now;
|
||||||
endsOn.value = end;
|
endsOn.value = end;
|
||||||
|
|
||||||
|
// Default values for showStartTime and showEndTime
|
||||||
|
showStartTime.value = false;
|
||||||
|
showEndTime.value = false;
|
||||||
|
|
||||||
|
// Default values for hideParticipants
|
||||||
|
hideParticipants.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
const organizerActor = computed({
|
const organizerActor = computed({
|
||||||
|
@ -793,7 +802,7 @@ onMounted(async () => {
|
||||||
pictureFile.value = await buildFileFromIMedia(event.value.picture);
|
pictureFile.value = await buildFileFromIMedia(event.value.picture);
|
||||||
limitedPlaces.value = eventOptions.value.maximumAttendeeCapacity > 0;
|
limitedPlaces.value = eventOptions.value.maximumAttendeeCapacity > 0;
|
||||||
if (!(props.isUpdate || props.isDuplicate)) {
|
if (!(props.isUpdate || props.isDuplicate)) {
|
||||||
initializeEvent();
|
initializeNewEvent();
|
||||||
} else {
|
} else {
|
||||||
event.value = new EventModel({
|
event.value = new EventModel({
|
||||||
...event.value,
|
...event.value,
|
||||||
|
|
Loading…
Reference in a new issue