Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[26544] dialog on mail change of activated mediorder patient #799

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

PatrickDenzler
Copy link
Collaborator

@PatrickDenzler PatrickDenzler commented Feb 27, 2025

Ist der neue pr für #695

@col-panic col-panic self-requested a review February 27, 2025 14:38
@col-panic col-panic self-assigned this Feb 27, 2025
@col-panic
Copy link
Member

  • if (sticker != null && !sticker.getId().equals("activate_mediorder")) { aus StickerService entfernen @PatrickDenzler

}

@Override
public List<ISticker> getStickers(Identifiable identifiable, boolean includeMediorderSticker) {
Copy link
Member

Choose a reason for hiding this comment

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

Nein, sowas macht in einem zentralen Service keinen Sinn. Der zentrale Service sollte keine Kenntnis eines mediorder stickers haben bzw. wenn, dann brauchst du wirklich eine gute Begründung dafür. Du müsstest das generischer halten, in dem man bspw. einen Filter übergeben kann. Schon der originalcode if (sticker != null && !sticker.getId().equals("activate_mediorder")) { muss raus - weiß gar nich wie der reinkommen konnte!

Der Sticker-Service soll keinen einzelnen Sticker kennen und sonder-behandeln. Der soll nur Methoden bereitstellen Sticker generell zu bearbeiten

@@ -161,12 +172,27 @@ public String getText(Object element) {

setUnlocked(LocalLockServiceHolder.get().isLocked(pat));

emailVerifyListener = e -> {
Copy link
Member

Choose a reason for hiding this comment

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

Du verwendest den IStickerService ja nur an dieser Stelle! Hol ihn doch hier ab und release ihn gleich nach der Verwendung wieder. dispose sollte generell nicht verwendet werden, und es gibt auch keinen Grund das hier zu tun! Zudem musst die ungetService auf das service-objekt, nicht die klassen anwenden!

Du musst IStickerService gar nicht im Field anlegen!


public class StickerConstants {

public static final String PEA_MEDIORDER_STICKER_ID = "activate_mediorder";
Copy link
Member

Choose a reason for hiding this comment

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

Bitte kurze JavaDoc

* Get all stickers for the {@link Identifiable}. The returned list is sorted by
* {@link ISticker#getImportance()}.
* Get all stickers for the {@link Identifiable} excluding pea mediorder
* sticker. The returned list is sorted by {@link ISticker#getImportance()}.
Copy link
Member

Choose a reason for hiding this comment

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

? Die JavaDoc stimmt doch so nicht mehr oder?

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