modif settings backend style map et ajout field étape couleurs

This commit is contained in:
Valentin
2024-08-09 17:04:53 +02:00
parent f61c81c714
commit bdf8011dd2
26 changed files with 1130 additions and 88 deletions

View File

@@ -26,6 +26,7 @@
<div><pre><b>GEOFIELD</b>{{etape.geofield}}</pre></div>
<div><pre><b>VIGNETTE</b>{{etape.vignette}}</pre></div>
<div><pre><b>GALERIES</b>{{etape.galeries}}</pre></div>
<div><pre><b>PARTIES</b>{{etape.parties}}</pre></div>
<div><pre><b>SAISON</b>{{etape.saison}}</pre></div>
@@ -61,9 +62,14 @@ const route = useRoute();
const { loading, error, href, etape, page } = storeToRefs(store);
watch(() => route.params.id, (newId) => {
store.fetchEtapeData(newId);
if (!etape.value.data) {
store.fetchStaticData(newId);
if (!newId) {
store.emptyAll();
} else {
store.fetchEtapeData(newId);
if (!etape.value.data) {
store.fetchStaticData(newId);
}
window.scrollTo({top: 0, behavior: 'smooth'});
}
});
@@ -71,12 +77,9 @@ watch(() => href.value, (newHref) => {
const relativePath = newHref.split('.fr')[1];
if (relativePath && (relativePath !== '' || relativePath !== '/')) {
router.push(relativePath);
} else {
store.emptyAll();
}
});
const isEtapeValid = computed(() => {
return etape.value && !isObjectEmpty(etape.value);
});