Skip to content

Koala Consumer card order as per component hierarchy - #4075

Open
Brett-S-OWB wants to merge 4 commits into
openWB:masterfrom
Brett-S-OWB:consumer-order
Open

Brett-S-OWB wants to merge 4 commits into
openWB:masterfrom
Brett-S-OWB:consumer-order

Conversation

@Brett-S-OWB

Copy link
Copy Markdown
Contributor

No description provided.

@Brett-S-OWB
Brett-S-OWB requested a review from benderl October 8, 2026 13:50
Comment on lines +3714 to +3721
return getObjectIds
.value('consumer')
.filter((id) => `openWB/consumer/${id}/module` in modules)
.map((id) => {
const module = modules[`openWB/consumer/${id}/module`] as
ConsumerModule | undefined;
return { id, name: module?.name ?? `Verbraucher ${id}` };
})
.sort((a, b) => a.id - b.id);
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Die Benutzerverwaltung kann dafür sorgen, dass ein Verbraucher zwar in der Hierarchie vorhanden ist, jedoch das Modul-Topic nicht empfangen wird. In dem Fall darf der Verbraucher nicht angezeigt werden. Siehe z.B. Z.935 für die Ladepunkte.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In Z.3716 gibt es den Filter auf Verbraucher Module Topic , dadurch ist schon geprüft ob der Nutzer Rechte hat oder? Ich habe es kommentiert.

Oder wäre es besser mit ein helper "accessConsumerAllowed " wie bei CP's

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Stimmt, hatte ich übersehen. Eine Hilfsmethode wäre aber schon besser, da die auch in anderen Situationen verwendet werden kann (z.B. vor dem Schalten eines Verbrauchers).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Helper accessConsumerAllowed hinzugefügt

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.

2 participants