Disable analytics in dev env, redirect to edit page after event update
- Skip loading /stats/script.js and /assets/perf.js when data-env=dev
- Add data-env="{{ app.environment }}" to body tag
- Redirect to edit event page instead of events list after saving
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,10 @@ function loadAnalytics() {
|
||||
return
|
||||
}
|
||||
|
||||
if (document.body.dataset.env === 'dev') {
|
||||
return
|
||||
}
|
||||
|
||||
const script = document.createElement('script')
|
||||
script.defer = true
|
||||
script.src = '/stats/script.js'
|
||||
|
||||
@@ -362,7 +362,7 @@ class AccountController extends AbstractController
|
||||
|
||||
$this->addFlash('success', 'Evenement modifie avec succes.');
|
||||
|
||||
return $this->redirectToRoute('app_account', ['tab' => 'events']);
|
||||
return $this->redirectToRoute('app_account_edit_event', ['id' => $event->getId()]);
|
||||
}
|
||||
|
||||
return $this->render('account/edit_event.html.twig', [
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
{{ vite_asset('app.js') }}
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body class="min-h-screen flex flex-col bg-[#fbfbfb] text-[#111827]">
|
||||
<body class="min-h-screen flex flex-col bg-[#fbfbfb] text-[#111827]" data-env="{{ app.environment }}">
|
||||
<header class="sticky top-0 z-50 bg-white border-b-4 border-gray-900">
|
||||
<nav class="mx-auto px-4 lg:px-8" role="navigation" aria-label="Navigation principale" itemscope itemtype="https://schema.org/SiteNavigationElement">
|
||||
<div class="flex justify-between items-center h-20">
|
||||
|
||||
Reference in New Issue
Block a user