This commit is contained in:
2026-05-07 21:04:27 +02:00
parent 6f3a63af12
commit fb6a0c7968
13 changed files with 101 additions and 48 deletions

View File

@@ -3,7 +3,7 @@
<div>
<PageSection tone="jaune" content-size="default">
<SectionTitle tone="invert" pad="md">
LA SAISON 2025/2026 POUR LES JEUNES
LA SAISON POUR LES JEUNES
</SectionTitle>
</PageSection>
<PageSection padded_size="md" content-size="default" class="remonter_concert_list">
@@ -34,9 +34,42 @@
import { onMounted } from "vue"
import { formatDateLong } from "@/utils/dateFormat.js"
const runtimeConfig = useRuntimeConfig()
const saisonCourante = String(runtimeConfig.public.saison || "").trim()
const saisonPrecedente = String(runtimeConfig.public.saisonmoins1 || "").trim()
// PRISE EN COMPTE DE LA DOUBLE SAISON ENTRE L'ANNONCE DE LA NOUVELLE SAISON ET LA FIN DE LA SAISON EN COURS
// de janvier à août inclus, saisonmoins1 est ajoutée au filtre via $or
// de septembre à décembre, seule runtimeConfig.public.saison est utilisée
const inclureSaisonPrecedente = new Date().getMonth() <= 7
const saisonFilter = inclureSaisonPrecedente && saisonPrecedente
? {
$or: [
{
saison_concert: {
nom_saison: {
$eq: saisonCourante,
},
},
},
{
saison_concert: {
nom_saison: {
$eq: saisonPrecedente,
},
},
},
],
}
: {
saison_concert: {
nom_saison: {
$eq: saisonCourante,
},
},
}
const { concerts, refresh } = useConcerts({
locale: "fr-FR",
pageSize: 200,
populate: {
saison_concert: true,
genre_concert: true,
@@ -55,13 +88,7 @@
},
filters: {
$and: [
{
saison_concert: {
nom_saison: {
$eq: String(runtimeConfig.public.saison),
},
},
},
saisonFilter,
{
$or: [
{