Skip to content

Fv 150 anpassung filtermenü fahrzeuge#559

Open
martind260 wants to merge 13 commits intosprintfrom
FV-150_Anpassung-Filtermenü-Fahrzeuge

Hidden character warning

The head ref may contain hidden characters: "FV-150_Anpassung-Filtermen\u00fc-Fahrzeuge"
Open

Fv 150 anpassung filtermenü fahrzeuge#559
martind260 wants to merge 13 commits intosprintfrom
FV-150_Anpassung-Filtermenü-Fahrzeuge

Conversation

@martind260
Copy link
Member

@martind260 martind260 commented Feb 12, 2026

Description

Filtermenu extended by new Zählarten

Issue References

FV-150

Definition of Done

  • Acceptance criteria are met
  • Testing is done (unit-tests, DEV-environment)
  • Build/Test workflow has successfully finished
  • Release notes are complemented
  • Documentation is complemented (operator manual, system specification, etc.)

Summary by CodeRabbit

  • New Features

    • Automatic time setting adjustments when pedestrian traffic is the only category selected.
    • Expanded traffic type support for radar activation, including additional counting methods.
  • Improvements

    • Updated UI labels for clarity: panel title changed to "Verkehrsarten & Fahrzeuge" and pedestrian option label refined.
    • Tageswert option now automatically disabled for partial pedestrian traffic scenarios.

@martind260 martind260 self-assigned this Feb 12, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 12, 2026

Walkthrough

The changes extend the options menu to handle pedestrian traffic (Fussverkehr) counting scenarios. When pedestrian traffic is the only category in a non-24-hour count, default settings are applied and specific UI options are disabled. UI labels are also updated for clarity.

Changes

Cohort / File(s) Summary
Core Option Logic
frontend/src/components/zaehlstelle/optionsmenue/OptionsmenueZaehlstelle.vue
Adds computed flag isTeilzaehlungFussverkehr to detect single-category pedestrian, non-24h scenarios. Extends default options logic to apply BLOCK time settings in these cases. Broadens traffic types that activate Rad- and Fussverkehr options to include FJS, QU, and QJS alongside existing types.
UI Panel Updates
frontend/src/components/zaehlstelle/optionsmenue/panels/FahrzeugPanel.vue, frontend/src/components/zaehlstelle/optionsmenue/panels/ZeitauswahlPanel.vue
FahrzeugPanel updates expansion title to "Verkehrsarten & Fahrzeuge" and checkbox label to "Fußverkehr". ZeitauswahlPanel introduces computed flags and watchers to disable Tageswert radio button and auto-adjust time settings when only pedestrian traffic is selected.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fv 150 anpassung filtermenü fahrzeuge' is partially related to the changeset—it references the issue number and filter menu adjustments, but uses non-English text and lacks clarity about the specific technical changes (e.g., Zählarten expansion, Fussverkehr handling).
Description check ✅ Passed The pull request description covers the main sections from the template (Description, Issue References, Definition of Done) but shows incomplete DoD compliance with only 2 of 5 items marked done and critical testing/documentation tasks marked incomplete.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch FV-150_Anpassung-Filtermenü-Fahrzeuge

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In
`@frontend/src/components/zaehlstelle/optionsmenue/OptionsmenueZaehlstelle.vue`:
- Around line 134-138: In the computed property isTeilzaehlungFussverkehr,
replace the loose inequality operator used on activeZaehlung.value.zaehldauer
(currently using !=) with the strict inequality operator !== so the comparison
against Zaehldauer.DAUER_24_STUNDEN is type-safe; update the expression in the
computed function that references activeZaehlung, Kategorien check, and
Zaehldauer.DAUER_24_STUNDEN accordingly.

In
`@frontend/src/components/zaehlstelle/optionsmenue/panels/ZeitauswahlPanel.vue`:
- Around line 330-334: Change the loose inequality to a strict one in the
computed isTeilzaehlungFussverkehr: replace the Zaehldauer comparison using `!=`
with `!==` so the check uses type-safe strict comparison on
activeZaehlung.value.zaehldauer against Zaehldauer.DAUER_24_STUNDEN; locate the
computed property named isTeilzaehlungFussverkehr that references
activeZaehlung, Fahrzeug.FUSS and Zaehldauer, and update that single operator.
🧹 Nitpick comments (2)
frontend/src/components/zaehlstelle/optionsmenue/panels/ZeitauswahlPanel.vue (2)

346-362: Watch-triggered mutation may cause redundant re-entries.

The deep watcher on the entire chosenOptionsCopy fires on every property change. When adaptOptionsUpdate sets zeitauswahl and zeitblock, it re-triggers this same watcher. Vue's reactivity deduplicates identical assignments so it stabilizes, but this is wasteful and fragile.

Consider narrowing the watch to only the properties that matter:

♻️ Suggested improvement
-watch(
-    () => chosenOptionsCopy.value,
-    () => {
-      adaptOptionsUpdate();
-    },
-    { deep: true }
-);
+watch(
+    () => isOnlyFussgaengerSelected.value,
+    (newVal) => {
+      if (newVal) {
+        chosenOptionsCopy.value.zeitauswahl = Zeitauswahl.BLOCK;
+        chosenOptionsCopy.value.zeitblock = Zeitblock.ZB_06_19;
+      }
+    }
+);

This avoids re-triggering on unrelated option changes and eliminates the redundant re-entry cycle.


330-344: isTeilzaehlungFussverkehr is duplicated across components.

This exact computed exists in both ZeitauswahlPanel.vue and OptionsmenueZaehlstelle.vue (lines 134–138). Consider extracting it into a shared composable or utility to keep it DRY, especially since the condition may evolve.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6fb93b1 and 78ea952.

📒 Files selected for processing (3)
  • frontend/src/components/zaehlstelle/optionsmenue/OptionsmenueZaehlstelle.vue
  • frontend/src/components/zaehlstelle/optionsmenue/panels/FahrzeugPanel.vue
  • frontend/src/components/zaehlstelle/optionsmenue/panels/ZeitauswahlPanel.vue
🔇 Additional comments (4)
frontend/src/components/zaehlstelle/optionsmenue/panels/FahrzeugPanel.vue (2)

9-9: LGTM!

Panel title updated to better reflect the expanded scope of the panel.


259-259: LGTM!

Label simplified to "Fußverkehr" for consistency with the broader terminology changes.

frontend/src/components/zaehlstelle/optionsmenue/OptionsmenueZaehlstelle.vue (2)

143-150: LGTM!

The default options logic cleanly extends the existing 13-hour pattern to also cover Fussverkehr-only Teilzählung scenarios, setting BLOCK/ZB_06_19 as the sensible default.


200-211: The Zaehlart mappings for RAD and FUSS activation are correct and align with domain requirements.

Based on the enum definitions:

  • FJS explicitly produces both "Fußverkehr/Radverkehr je Straßenseite" (pedestrian and cycle traffic per street side)
  • QU ("Querung"/Crossing) naturally includes both pedestrian and cycle crossings
  • QJS ("Querschnitt je Straßenseite"/Cross-section per street side) captures all vehicle types including pedestrians and cycles

Combined with cycle-specific types (R, QR) for RAD, the expanded sets correctly enable these vehicle types for all counting types that produce their respective data.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment on lines +134 to +138
const isTeilzaehlungFussverkehr = computed(() => {
return (activeZaehlung.value.kategorien.length === 1 &&
activeZaehlung.value.kategorien[0] === Fahrzeug.FUSS &&
activeZaehlung.value.zaehldauer != Zaehldauer.DAUER_24_STUNDEN);
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Use strict inequality (!==) instead of !=.

Same as in ZeitauswahlPanel.vue — line 137 uses loose inequality != instead of !==.

🔧 Proposed fix
-      activeZaehlung.value.zaehldauer != Zaehldauer.DAUER_24_STUNDEN);
+      activeZaehlung.value.zaehldauer !== Zaehldauer.DAUER_24_STUNDEN);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const isTeilzaehlungFussverkehr = computed(() => {
return (activeZaehlung.value.kategorien.length === 1 &&
activeZaehlung.value.kategorien[0] === Fahrzeug.FUSS &&
activeZaehlung.value.zaehldauer != Zaehldauer.DAUER_24_STUNDEN);
});
const isTeilzaehlungFussverkehr = computed(() => {
return (activeZaehlung.value.kategorien.length === 1 &&
activeZaehlung.value.kategorien[0] === Fahrzeug.FUSS &&
activeZaehlung.value.zaehldauer !== Zaehldauer.DAUER_24_STUNDEN);
});
🤖 Prompt for AI Agents
In `@frontend/src/components/zaehlstelle/optionsmenue/OptionsmenueZaehlstelle.vue`
around lines 134 - 138, In the computed property isTeilzaehlungFussverkehr,
replace the loose inequality operator used on activeZaehlung.value.zaehldauer
(currently using !=) with the strict inequality operator !== so the comparison
against Zaehldauer.DAUER_24_STUNDEN is type-safe; update the expression in the
computed function that references activeZaehlung, Kategorien check, and
Zaehldauer.DAUER_24_STUNDEN accordingly.

Comment on lines +330 to +334
const isTeilzaehlungFussverkehr = computed(() => {
return (activeZaehlung.value.kategorien.length === 1 &&
activeZaehlung.value.kategorien[0] === Fahrzeug.FUSS &&
activeZaehlung.value.zaehldauer != Zaehldauer.DAUER_24_STUNDEN);
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Use strict inequality (!==) instead of != for the Zaehldauer comparison.

Line 333 uses != (loose inequality). TypeScript/linting best practice is to use !== for type-safe comparison, consistent with the same check in OptionsmenueZaehlstelle.vue line 137.

🔧 Proposed fix
-      activeZaehlung.value.zaehldauer != Zaehldauer.DAUER_24_STUNDEN);
+      activeZaehlung.value.zaehldauer !== Zaehldauer.DAUER_24_STUNDEN);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const isTeilzaehlungFussverkehr = computed(() => {
return (activeZaehlung.value.kategorien.length === 1 &&
activeZaehlung.value.kategorien[0] === Fahrzeug.FUSS &&
activeZaehlung.value.zaehldauer != Zaehldauer.DAUER_24_STUNDEN);
});
const isTeilzaehlungFussverkehr = computed(() => {
return (activeZaehlung.value.kategorien.length === 1 &&
activeZaehlung.value.kategorien[0] === Fahrzeug.FUSS &&
activeZaehlung.value.zaehldauer !== Zaehldauer.DAUER_24_STUNDEN);
});
🤖 Prompt for AI Agents
In `@frontend/src/components/zaehlstelle/optionsmenue/panels/ZeitauswahlPanel.vue`
around lines 330 - 334, Change the loose inequality to a strict one in the
computed isTeilzaehlungFussverkehr: replace the Zaehldauer comparison using `!=`
with `!==` so the check uses type-safe strict comparison on
activeZaehlung.value.zaehldauer against Zaehldauer.DAUER_24_STUNDEN; locate the
computed property named isTeilzaehlungFussverkehr that references
activeZaehlung, Fahrzeug.FUSS and Zaehldauer, and update that single operator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant