mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-22 07:52:43 +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"
|
||||
>
|
||||
<event-date-picker
|
||||
:time="eventOptions.showStartTime"
|
||||
:time="showStartTime"
|
||||
v-model="beginsOn"
|
||||
@blur="consistencyBeginsOnBeforeEndsOn"
|
||||
></event-date-picker>
|
||||
|
||||
<o-switch v-model="eventOptions.showStartTime">{{
|
||||
<o-switch v-model="showStartTime">{{
|
||||
t("Show the time when the event begins")
|
||||
}}</o-switch>
|
||||
</o-field>
|
||||
|
@ -84,12 +84,12 @@
|
|||
class="items-center"
|
||||
>
|
||||
<event-date-picker
|
||||
:time="eventOptions.showEndTime"
|
||||
:time="showEndTime"
|
||||
v-model="endsOn"
|
||||
@blur="consistencyBeginsOnBeforeEndsOn"
|
||||
:min="beginsOn"
|
||||
></event-date-picker>
|
||||
<o-switch v-model="eventOptions.showEndTime">{{
|
||||
<o-switch v-model="showEndTime">{{
|
||||
t("Show the time when the event ends")
|
||||
}}</o-switch>
|
||||
</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 endsOn = ref(new Date());
|
||||
|
||||
|
|
Loading…
Reference in a new issue