fix(event_creation): explains when the event will be an activity

Solves #1568
This commit is contained in:
Massedil
2025-02-11 17:54:59 +01:00
parent 8303eb13a5
commit b531256263
2 changed files with 21 additions and 1 deletions

View File

@@ -70,6 +70,7 @@
"Activate notifications": "Activer les notifications",
"Activated": "Activé",
"Active": "Actif·ive",
"Activities are disabled on this instance.|An event with a duration of more than one day will be categorized as an activity.|An event with a duration of more than {number} days will be categorized as an activity.": "Les activités sont désactivées sur cette instance.|Un événement avec une durée de plus d'un jour sera considéré comme une activité.|Un événement avec une durée de plus de {number} jours sera considéré comme une activité.",
"Activity": "Activité",
"Actor": "Acteur",
"Adapt to system theme": "Sadapter au thème du système",

View File

@@ -99,6 +99,21 @@
</div>
</o-field>
<p
v-if="
configResult?.config.longEvents &&
configResult?.config.durationOfLongEvent > 0
"
>
{{
t(
"Activities are disabled on this instance.|An event with a duration of more than one day will be categorized as an activity.|An event with a duration of more than {number} days will be categorized as an activity.",
{ number: configResult.config.durationOfLongEvent },
configResult.config.durationOfLongEvent
)
}}
</p>
<o-button class="block" variant="text" @click="dateSettingsIsOpen = true">
{{ t("Timezone parameters") }}
</o-button>
@@ -652,7 +667,7 @@ import {
useFeatures,
useTimezones,
} from "@/composition/apollo/config";
import { useMutation } from "@vue/apollo-composable";
import { useMutation, useQuery } from "@vue/apollo-composable";
import { Dialog } from "@/plugins/dialog";
import { Notifier } from "@/plugins/notifier";
import { useHead } from "@/utils/head";
@@ -660,6 +675,8 @@ import { useOruga } from "@oruga-ui/oruga-next";
import sortBy from "lodash/sortBy";
import { escapeHtml } from "@/utils/html";
import EventDatePicker from "@/components/Event/EventDatePicker.vue";
import { CONFIG } from "@/graphql/config";
import { IConfig } from "@/types/config.model";
const DEFAULT_LIMIT_NUMBER_OF_PLACES = 10;
@@ -694,6 +711,8 @@ useHead({
),
});
const { result: configResult } = useQuery<{ config: IConfig }>(CONFIG);
const event = ref<IEditableEvent>(new EventModel());
const unmodifiedEvent = ref<IEditableEvent>(new EventModel());