Skip to content

feat(dist): switch equipment#690

Merged
tmenzel27 merged 26 commits intomainfrom
feat(dist)/switch-equipment
Mar 2, 2026
Merged

feat(dist): switch equipment#690
tmenzel27 merged 26 commits intomainfrom
feat(dist)/switch-equipment

Conversation

@tmenzel27
Copy link
Copy Markdown
Collaborator

@tmenzel27 tmenzel27 commented Feb 23, 2026

🗒 Description

Allows the user to unselect selection and a bit clearer how the user now needs to assign.

Fixed an issue on first assignment / not getting correct equipment name.
Logic now:

  1. GetApplicationState
  2. ShouldApplyBayType?
  3. If done no freshMatches else applyBayType and use those matches
  4. get matches from the derived version in the bayStore
  5. Pass the matches down to create the LNodes etc. in the Bay and create the LDevice

Added Documentation about the Store setup.

  • Removed BayTypeStore as it is just a wrapper for the ssdImportStore
  • Added functions from the BayTypeStore as normal utils might need to move them.

Updated Tests

📷 Demo screen recording or Screenshots

Screenshot 2026-02-25 at 10 51 13

📋 Checklist

You may remove tasks that do not make sense in this PR.

  • Ticket-ACs are checked and met
  • GitHub labels are assigned
  • Git Ticket / issue is linked with PR
  • Designated PR Reviewers are set
  • Tested by another developer
  • Changelog updated
  • Documentation updated (check Documentation guidelines for further reading )
  • All comments in the PR are resolved / answered

🔦 Useful files

  • type-distributor/docs/concepts/store-architecture.md
    • A little bit of an overview
  • type-distributor/src/headless/stores/dnd/dnd.store.svelte.ts
    • The "new" logic
  • type-distributor/src/headless/stores/bay-types.utils.ts
    • The extracted logic

New Equipment Matching

  • type-distributor/src/headless/stores/equipment-matching.store.svelte.ts
    • A lot of new derived properties
  • type-distributor/src/ui/components/columns/bay-type/
    • Here the new components for the matching exist. Maybe a good idea to group them into a folder?

❌ Link issue(s) to close - hint

closes #659
closes #660

AI Suggested Review order

  1. 🎯 docs/concepts/store-architecture.md — read this first; it maps the entire refactor intent
  2. 🔗 src/headless/stores/bay-types.utils.ts — the new plain module replacing bayTypesStore
  3. 🔗 src/headless/stores/bay.store.svelte.tsequipmentMatches now $derived
  4. 🔗 src/headless/stores/equipment-matching.store.svelte.ts — new derived properties
  5. 🔗 src/headless/stores/ssd-import.store.svelte.tsbayTypesStore coupling removed
  6. 🔗 src/headless/matching/applyBayTypeSelection.ts — now returns EquipmentMatch[]
  7. 🔗 src/headless/ied/build-edits-for-bay-lnode.ts + create-lNode-in-access-point.ts + elements/lDevice.ts — explicit equipmentMatches parameter propagation
  8. 🎨 src/ui/components/columns/bay-type/equipment-matching*.svelte — UI decomposition
  9. src/headless/stores/bay-types.utils.spec.ts + assigned-lnodes/*.spec.ts — new/updated tests
  10. ⏭️ docs/refactor-plan/new-folder-structure.md — doc-only update, skim only

- Replace all references of bayTypesStore with ssdImportStore in validation and store files.
- Update utility functions to use ssdImportStore for bay type selection and template resolution.
- Remove bayTypesStore and its associated tests, consolidating functionality into ssdImportStore.
- Adjust UI components to reflect changes in state management for bay type selection.
@tmenzel27 tmenzel27 marked this pull request as ready for review February 25, 2026 09:56
Comment thread packages/plugins/type-distributor/src/headless/ied/elements/lDevice.ts Outdated
Comment thread packages/plugins/type-distributor/src/headless/ied/elements/lDevice.ts Outdated
Comment thread packages/plugins/type-distributor/src/headless/ied/elements/lDevice.ts Outdated
Comment thread packages/plugins/type-distributor/src/headless/ied/build-edits-for-bay-lnode.ts Outdated
Comment thread packages/plugins/type-distributor/src/headless/ied/build-edits-for-bay-lnode.ts Outdated
Comment thread packages/plugins/type-distributor/src/headless/stores/dnd/drop-handler.ts Outdated
@tmenzel27 tmenzel27 changed the title Feat(dist)/switch equipment feat(dist): switch equipment Feb 25, 2026
@tmenzel27
Copy link
Copy Markdown
Collaborator Author

Something is broken am fixing

Comment thread packages/plugins/type-distributor/docs/concepts/assigned-lnodes-tracking.md Outdated
Comment thread packages/plugins/type-distributor/docs/concepts/matching-algorithm.md Outdated
Comment thread packages/plugins/type-distributor/src/headless/stores/dnd/dnd.store.svelte.ts Outdated
Comment thread packages/plugins/type-distributor/CHANGELOG.md
@tmenzel27 tmenzel27 merged commit bfa92c9 into main Mar 2, 2026
@tmenzel27 tmenzel27 deleted the feat(dist)/switch-equipment branch March 2, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Info dialog for too many equipments Switching equipments after initial selection

3 participants