Fv 105 speichern einer Zählung#555
Conversation
WalkthroughReplaces enum Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@frontend/src/components/zaehlstelle/optionsmenue/panels/GeometriePanel.vue`:
- Around line 193-195: Update the outdated comment in GeometriePanel.vue that
documents the DTO fields: replace the incorrect field name
"knotenarmKreisverkehr" with the actual field name "knotenarm" in the comment
that references the LadeVerkehrsbeziehungDTO attributes ("von", "nach",
"knotenarm" and "hinein") so the documentation matches the DTO.
In `@frontend/src/types/enum/Himmelsrichtung.ts`:
- Line 38: The tuple for Himmelsrichtung.W contains a stray comma in the string
value; update the mapping for Himmelsrichtung.W (the entry currently written as
[Himmelsrichtung.W, "W,"]) to use the correct string "W" so the UI displays the
direction properly and remove the accidental comma character.
In `@frontend/src/types/zaehlung/BelastungsplanVerkehrsbeziehungComperator.ts`:
- Line 3: The class name contains a typo: rename class
BelastungsplanVerkehrsbeziehungComperator to
BelastungsplanVerkehrsbeziehungComparator and update the export default
accordingly; also rename the file to
BelastungsplanVerkehrsbeziehungComparator.ts and update all imports that
reference BelastungsplanVerkehrsbeziehungComperator to the new filename/class
name so compilation and references (e.g., any imports like import X from
'.../BelastungsplanVerkehrsbeziehungComperator') continue to work.
🧹 Nitpick comments (4)
frontend/src/types/zaehlung/BelastungsplanVerkehrsbeziehungComperator.ts (1)
4-14: Method name does not match the property being compared.The method is named
sortByFahrtrichtungsartbut it compares byverkehrsbeziehungsTyp. Consider renaming for clarity.Proposed fix
- public static sortByFahrtrichtungsart( + public static sortByVerkehrsbeziehungsTyp( a: BelastungsplanVerkehrsbeziehung, b: BelastungsplanVerkehrsbeziehung ): number {frontend/src/types/enum/Bewegungsrichtung.ts (1)
8-22: Rename the text maps to match Bewegungsrichtung.
himmelsRichtungenTextLong/Shortread like cardinal directions but contain Ein/Aus. Consider renaming for clarity and, if needed, keep aliases for compatibility.♻️ Suggested rename with backwards-compatible aliases
-export const himmelsRichtungenTextLong: Map<string, string> = new Map< +export const bewegungsRichtungenTextLong: Map<string, string> = new Map< string, string >([ [Bewegungsrichtung.EIN, "Ein"], [Bewegungsrichtung.AUS, "Aus"], ]); -export const himmelsRichtungenTextShort: Map<string, string> = new Map< +export const bewegungsRichtungenTextShort: Map<string, string> = new Map< string, string >([ [Bewegungsrichtung.EIN, "Ein"], [Bewegungsrichtung.AUS, "Aus"], ]); + +// Optional compatibility aliases (remove after migration) +export const himmelsRichtungenTextLong = bewegungsRichtungenTextLong; +export const himmelsRichtungenTextShort = bewegungsRichtungenTextShort;frontend/src/components/zaehlstelle/charts/BelastungsplanMethods.ts (1)
1531-1533: Consider simplifying redundant export syntax.The export at line 1531 uses redundant key-value syntax (
calcVerkehrsbeziehungstype: calcVerkehrsbeziehungstype). This can be simplified using shorthand property syntax.Also note that line 1533 exports with a different name (
verkehrsbeziehungenAusrichten) than the internal function (verkehrsbeziehungAusrichten) - this appears intentional to provide a plural form in the public API, which is fine.♻️ Optional: Simplify redundant export syntax
return { docMode, viewbox, lineGap, chartPosition, spalt, ecke, legendColor, maxlineWidth, maxLegendLineWidth, fontfamily, abnahmeValueColor, zunahmeValueColor, maxFahrtrichtungWidth, fahrtrichtungVon, positiveNumber, anzeigeWerte, cleansePaths, - calcVerkehrsbeziehungstype: calcVerkehrsbeziehungstype, + calcVerkehrsbeziehungstype, calcRotation, verkehrsbeziehungenAusrichten: verkehrsbeziehungAusrichten, isSelectedKnotenarm, };frontend/src/components/zaehlstelle/charts/BelastungsplanKreuzungSvg.vue (1)
573-573: Minor naming inconsistency between files.The function is named
calcVerkehrsbeziehung(singular) here, whileBelastungsplanKreuzungSvgSchematischeUebersicht.vueusescalcVerkehrsbeziehungen(plural) for the equivalent function. Consider aligning the naming for consistency across both components.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (29)
frontend/src/components/messstelle/MessstelleGeometrie.vuefrontend/src/components/messstelle/charts/BelastungsplanMessquerschnittCard.vuefrontend/src/components/messstelle/charts/BelastungsplanMqSchematischeUebersicht.vuefrontend/src/components/messstelle/gesamtauswertung/stepper/OrtStepContent.vuefrontend/src/components/messstelle/icons/FahrtrichtungIcon.vuefrontend/src/components/messstelle/optionsmenue/FilterOptionen.vuefrontend/src/components/messstelle/optionsmenue/panels/MessquerschnittPanel.vuefrontend/src/components/zaehlstelle/ZaehlungInfo.vuefrontend/src/components/zaehlstelle/charts/BelastungsplanKreisverkehr.vuefrontend/src/components/zaehlstelle/charts/BelastungsplanKreuzungSvg.vuefrontend/src/components/zaehlstelle/charts/BelastungsplanKreuzungSvgSchematischeUebersicht.vuefrontend/src/components/zaehlstelle/charts/BelastungsplanMethods.tsfrontend/src/components/zaehlstelle/charts/ZeitreiheChart.vuefrontend/src/components/zaehlstelle/optionsmenue/panels/GeometriePanel.vuefrontend/src/types/enum/Bewegungsrichtung.tsfrontend/src/types/enum/Himmelsrichtung.tsfrontend/src/types/enum/Himmelsrichtungen.tsfrontend/src/types/messstelle/MessquerschnittInfoDTO.tsfrontend/src/types/messstelle/auswertung/MessquerschnittAuswertungDTO.tsfrontend/src/types/zaehlung/BelastungsplanFahrbeziehungComperator.tsfrontend/src/types/zaehlung/BelastungsplanKnotenarm.tsfrontend/src/types/zaehlung/BelastungsplanVerkehrsbeziehung.tsfrontend/src/types/zaehlung/BelastungsplanVerkehrsbeziehungComperator.tsfrontend/src/types/zaehlung/LadeVerkehrsbeziehungDTO.tsfrontend/src/types/zaehlung/LadeZaehlungDTO.tsfrontend/src/types/zaehlung/LaengsverkehrDTO.tsfrontend/src/types/zaehlung/QuerungsverkehrDTO.tsfrontend/src/types/zaehlung/VerkehrsbeziehungenDTO.tsfrontend/src/util/DefaultObjectCreator.ts
💤 Files with no reviewable changes (2)
- frontend/src/types/enum/Himmelsrichtungen.ts
- frontend/src/types/zaehlung/BelastungsplanFahrbeziehungComperator.ts
🧰 Additional context used
🧬 Code graph analysis (4)
frontend/src/util/DefaultObjectCreator.ts (1)
frontend/src/types/zaehlung/VerkehrsbeziehungenDTO.ts (1)
VerkehrsbeziehungenDTO(1-4)
frontend/src/types/zaehlung/LadeZaehlungDTO.ts (2)
frontend/src/types/zaehlung/LadeVerkehrsbeziehungDTO.ts (1)
LadeVerkehrsbeziehungDTO(3-19)frontend/src/types/zaehlung/VerkehrsbeziehungenDTO.ts (1)
VerkehrsbeziehungenDTO(1-4)
frontend/src/types/zaehlung/BelastungsplanKnotenarm.ts (1)
frontend/src/types/zaehlung/BelastungsplanVerkehrsbeziehung.ts (1)
verkehrsbeziehungsTyp(48-50)
frontend/src/components/zaehlstelle/charts/BelastungsplanMethods.ts (3)
frontend/src/types/zaehlung/BelastungsplanVerkehrsbeziehung.ts (2)
nach(52-54)BelastungsplanVerkehrsbeziehung(5-59)frontend/src/types/zaehlung/BelastungsplanKnotenarm.ts (3)
BelastungsplanKnotenarm(4-257)ausgleich(123-125)ausgleich(127-129)frontend/src/types/zaehlung/BelastungsplanVerkehrsbeziehungComperator.ts (1)
BelastungsplanVerkehrsbeziehungComperator(3-16)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyze (java-kotlin)
🔇 Additional comments (40)
frontend/src/types/zaehlung/QuerungsverkehrDTO.ts (1)
1-8: LGTM!Clean DTO definition that follows TypeScript best practices:
- Correct use of
import typefor type-only imports- Properly extends
BaseEntityfor common entity fields- Property types are well-defined and consistent with the project's domain model
frontend/src/types/enum/Himmelsrichtung.ts (1)
1-26: LGTM!The enum definition and
himmelsRichtungenTextLongmap are correctly implemented with all eight cardinal and ordinal directions properly mapped.frontend/src/types/zaehlung/LadeVerkehrsbeziehungDTO.ts (1)
3-19: LGTM!The interface rename from
LadeFahrbeziehungDTOtoLadeVerkehrsbeziehungDTOaligns with the broader terminology update in this PR. The properties remain unchanged as expected.frontend/src/components/messstelle/gesamtauswertung/stepper/OrtStepContent.vue (1)
69-69: LGTM!The import path update aligns with the renamed enum module, and the usage of
himmelsRichtungenTextLongat line 188 remains correct.frontend/src/types/zaehlung/VerkehrsbeziehungenDTO.ts (1)
1-4: LGTM!The interface rename from
FahrbeziehungenDTOtoVerkehrsbeziehungenDTOis consistent with the terminology update across the codebase.frontend/src/types/messstelle/MessquerschnittInfoDTO.ts (1)
1-8: LGTM!The import and type changes correctly align with the renamed
Himmelsrichtungenum.frontend/src/types/messstelle/auswertung/MessquerschnittAuswertungDTO.ts (1)
1-6: LGTM!The import and type changes correctly align with the renamed
Himmelsrichtungenum, consistent with other DTO updates in this PR.frontend/src/types/zaehlung/LaengsverkehrDTO.ts (1)
1-11: LGTM — clear DTO shape and enum usage.frontend/src/types/zaehlung/LadeZaehlungDTO.ts (1)
2-3: LGTM — Verkehrsbeziehungen rename applied consistently.Also applies to: 36-37
frontend/src/components/zaehlstelle/optionsmenue/panels/GeometriePanel.vue (2)
9-18: UI text/tooltip rename is consistent.Also applies to: 67-67, 150-161
78-81: LGTM — Verkehrsbeziehungen refactor applied cleanly to init and helper logic.Also applies to: 197-252, 299-393, 460-469
frontend/src/components/messstelle/MessstelleGeometrie.vue (1)
17-18: LGTM — enum rename applied consistently in drawing logic.Also applies to: 103-120, 136-153, 161-162, 169-171
frontend/src/components/zaehlstelle/ZaehlungInfo.vue (1)
307-309: LGTM — comment updated to match singular terminology.frontend/src/components/messstelle/icons/FahrtrichtungIcon.vue (1)
17-60: LGTM — enum rename is consistently reflected in the icon map.frontend/src/components/messstelle/charts/BelastungsplanMqSchematischeUebersicht.vue (4)
20-20: Enum rename applied consistently.Import update aligns with the new enum name.
159-160: Directional checks updated correctly (south/west).No behavior change beyond enum rename.
198-199: Directional checks updated correctly (north/east).No behavior change beyond enum rename.
234-235: Rotation guard updated correctly.Enum rename is applied consistently.
frontend/src/components/zaehlstelle/charts/ZeitreiheChart.vue (1)
489-518: CSV/meta label rename is consistent.Header and metadata now match “Verkehrsbeziehung”.
frontend/src/components/messstelle/charts/BelastungsplanMessquerschnittCard.vue (4)
20-49: Enum rename applied to import and color map.Mapping remains intact with new enum constants.
161-162: Directional checks updated correctly (south/west).No logic change beyond enum rename.
305-306: Directional checks updated correctly (north/east).No logic change beyond enum rename.
404-405: Rotation guard updated correctly.Enum rename is applied consistently.
frontend/src/components/messstelle/optionsmenue/panels/MessquerschnittPanel.vue (1)
81-114: Enum/type rename is consistent.Type usage aligns with the new enum name.
frontend/src/components/messstelle/optionsmenue/FilterOptionen.vue (2)
118-121: Enum rename applied to imports.No functional change.
216-216: Function signature updated to new enum type.Matches updated enum name.
frontend/src/types/zaehlung/BelastungsplanKnotenarm.ts (3)
45-69: Method rename consistent with new terminology.No behavioral change detected.
131-145: Accessor/mutator renames aligned.Consistent with Verkehrsbeziehung naming.
221-252: Counter fields and methods renamed consistently.No logic changes beyond terminology.
frontend/src/util/DefaultObjectCreator.ts (1)
16-212: Default DTO shape updated to Verkehrsbeziehungen.Initialization matches the renamed DTO fields.
frontend/src/types/zaehlung/BelastungsplanVerkehrsbeziehung.ts (1)
1-59: LGTM!The class rename from
BelastungsplanFahrbeziehungtoBelastungsplanVerkehrsbeziehungis consistent and complete. All internal fields, constructor parameters, and accessors have been properly updated to reflect the new terminology.frontend/src/components/zaehlstelle/charts/BelastungsplanKreisverkehr.vue (1)
30-42: LGTM!The comment updates correctly reflect the terminology change from "Fahrbeziehungen" to "Verkehrsbeziehungen" throughout the file. These are documentation-only changes with no functional impact.
frontend/src/components/zaehlstelle/charts/BelastungsplanKreuzungSvgSchematischeUebersicht.vue (2)
9-56: LGTM!The imports and state declarations have been correctly updated to use the new Verkehrsbeziehung terminology. The type safety is maintained with proper generic types for the Map.
217-394: LGTM!The
calcVerkehrsbeziehungenfunction has been thoroughly refactored with consistent naming. All internal references, method calls, and data access patterns have been properly updated to use the Verkehrsbeziehung terminology while preserving the original business logic.frontend/src/components/zaehlstelle/charts/BelastungsplanMethods.ts (3)
11-12: LGTM!The imports have been correctly updated to use the renamed types.
278-312: LGTM!The
ausgleichBerechnenandverkehrsbeziehungAusrichtenfunctions have been properly updated to use the new Verkehrsbeziehung accessors (vonVerkehrsbeziehungsTypen,findVerkehrsbeziehungNachPosition,nachVerkehrsbeziehungsTypen). The alignment logic for traffic relations remains intact.
421-748: LGTM!The
fahrtrichtungVonfunction has been comprehensively updated with consistent Verkehrsbeziehung terminology. The parameterverkehrsbeziehungsTypen, the internal groupverkehrsbeziehungsGroup, and all accessor calls (findVerkehrsbeziehungVonPosition,findVerkehrsbeziehungNachPosition,verkehrsbeziehungsTyp) are properly renamed while preserving the drawing logic for traffic flow visualization.frontend/src/components/zaehlstelle/charts/BelastungsplanKreuzungSvg.vue (3)
9-65: LGTM!The imports and state declarations have been correctly updated to use the Verkehrsbeziehung terminology. Type safety is maintained throughout.
573-750: LGTM!The
calcVerkehrsbeziehungfunction has been thoroughly refactored with consistent Verkehrsbeziehung terminology. All data processing, method calls tobelastungsplanMethods, and internal variable references have been properly updated while preserving the business logic for traffic relation calculations.
536-538: LGTM!The legend line width calculation correctly uses
highestVerkehrsbeziehungsValuefor computing the scale marker values.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| * Als Basis zur Ermittlung der relevanten Knotenarme dient die Klasse "LadeVerkehrsbeziehungDTO" | ||
| * welche als relevante Attribute "von" und "nach" für Kreuzungen sowie "knotenarmKreisverkehr" | ||
| * und "hinein" vorhält. |
There was a problem hiding this comment.
Fix outdated field name in the comment.
The DTO field is knotenarm (not knotenarmKreisverkehr).
📝 Suggested comment fix
- * welche als relevante Attribute "von" und "nach" für Kreuzungen sowie "knotenarmKreisverkehr"
+ * welche als relevante Attribute "von" und "nach" für Kreuzungen sowie "knotenarm"
* und "hinein" vorhält.📝 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.
| * Als Basis zur Ermittlung der relevanten Knotenarme dient die Klasse "LadeVerkehrsbeziehungDTO" | |
| * welche als relevante Attribute "von" und "nach" für Kreuzungen sowie "knotenarmKreisverkehr" | |
| * und "hinein" vorhält. | |
| * Als Basis zur Ermittlung der relevanten Knotenarme dient die Klasse "LadeVerkehrsbeziehungDTO" | |
| * welche als relevante Attribute "von" und "nach" für Kreuzungen sowie "knotenarm" | |
| * und "hinein" vorhält. |
🤖 Prompt for AI Agents
In `@frontend/src/components/zaehlstelle/optionsmenue/panels/GeometriePanel.vue`
around lines 193 - 195, Update the outdated comment in GeometriePanel.vue that
documents the DTO fields: replace the incorrect field name
"knotenarmKreisverkehr" with the actual field name "knotenarm" in the comment
that references the LadeVerkehrsbeziehungDTO attributes ("von", "nach",
"knotenarm" and "hinein") so the documentation matches the DTO.
| @@ -0,0 +1,16 @@ | |||
| import BelastungsplanVerkehrsbeziehung from "@/types/zaehlung/BelastungsplanVerkehrsbeziehung"; | |||
|
|
|||
| export default class BelastungsplanVerkehrsbeziehungComperator { | |||
There was a problem hiding this comment.
Typo in class name: "Comperator" should be "Comparator".
The standard English spelling is "Comparator". This typo will affect maintainability and discoverability.
Proposed fix
-export default class BelastungsplanVerkehrsbeziehungComperator {
+export default class BelastungsplanVerkehrsbeziehungComparator {Also rename the file to BelastungsplanVerkehrsbeziehungComparator.ts and update imports accordingly.
📝 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.
| export default class BelastungsplanVerkehrsbeziehungComperator { | |
| export default class BelastungsplanVerkehrsbeziehungComparator { |
🤖 Prompt for AI Agents
In `@frontend/src/types/zaehlung/BelastungsplanVerkehrsbeziehungComperator.ts` at
line 3, The class name contains a typo: rename class
BelastungsplanVerkehrsbeziehungComperator to
BelastungsplanVerkehrsbeziehungComparator and update the export default
accordingly; also rename the file to
BelastungsplanVerkehrsbeziehungComparator.ts and update all imports that
reference BelastungsplanVerkehrsbeziehungComperator to the new filename/class
name so compilation and references (e.g., any imports like import X from
'.../BelastungsplanVerkehrsbeziehungComperator') continue to work.
Description
Für die Zählarten FJS, QU und QJS können nun die Verkehrsbeziehungn, Laengsverkehre und Querverkehre gespeichert werden. Des Weiteren wurde Entität Fahrbeziehung nach Verkehrsbeziehung umbenannt.
Issue References
FV-105
Definition of Done
Summary by CodeRabbit
New Features
Refactor
Documentation