mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-22 16:03:25 +00:00
Issue #1571: Fixes the switches for displaying hours not working.
This commit is contained in:
parent
7f43169fae
commit
19ba095e07
1 changed files with 28 additions and 4 deletions
|
@ -67,12 +67,12 @@
|
||||||
label-for="begins-on-field"
|
label-for="begins-on-field"
|
||||||
>
|
>
|
||||||
<event-date-picker
|
<event-date-picker
|
||||||
:time="eventOptions.showStartTime"
|
:time="showStartTime"
|
||||||
v-model="beginsOn"
|
v-model="beginsOn"
|
||||||
@blur="consistencyBeginsOnBeforeEndsOn"
|
@blur="consistencyBeginsOnBeforeEndsOn"
|
||||||
></event-date-picker>
|
></event-date-picker>
|
||||||
|
|
||||||
<o-switch v-model="eventOptions.showStartTime">{{
|
<o-switch v-model="showStartTime">{{
|
||||||
t("Show the time when the event begins")
|
t("Show the time when the event begins")
|
||||||
}}</o-switch>
|
}}</o-switch>
|
||||||
</o-field>
|
</o-field>
|
||||||
|
@ -84,12 +84,12 @@
|
||||||
class="items-center"
|
class="items-center"
|
||||||
>
|
>
|
||||||
<event-date-picker
|
<event-date-picker
|
||||||
:time="eventOptions.showEndTime"
|
:time="showEndTime"
|
||||||
v-model="endsOn"
|
v-model="endsOn"
|
||||||
@blur="consistencyBeginsOnBeforeEndsOn"
|
@blur="consistencyBeginsOnBeforeEndsOn"
|
||||||
:min="beginsOn"
|
:min="beginsOn"
|
||||||
></event-date-picker>
|
></event-date-picker>
|
||||||
<o-switch v-model="eventOptions.showEndTime">{{
|
<o-switch v-model="showEndTime">{{
|
||||||
t("Show the time when the event ends")
|
t("Show the time when the event ends")
|
||||||
}}</o-switch>
|
}}</o-switch>
|
||||||
</o-field>
|
</o-field>
|
||||||
|
@ -1201,6 +1201,30 @@ const isEventModified = computed((): boolean => {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const showStartTime = computed({
|
||||||
|
get(): boolean {
|
||||||
|
return event.value.options.showStartTime;
|
||||||
|
},
|
||||||
|
set(newShowStartTime: boolean) {
|
||||||
|
event.value.options = {
|
||||||
|
...event.value.options,
|
||||||
|
showStartTime: newShowStartTime,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const showEndTime = computed({
|
||||||
|
get(): boolean {
|
||||||
|
return event.value.options.showEndTime;
|
||||||
|
},
|
||||||
|
set(newshowEndTime: boolean) {
|
||||||
|
event.value.options = {
|
||||||
|
...event.value.options,
|
||||||
|
showEndTime: newshowEndTime,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const beginsOn = ref(new Date());
|
const beginsOn = ref(new Date());
|
||||||
const endsOn = ref(new Date());
|
const endsOn = ref(new Date());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue