Commit daa5e6cf authored by Thomas Huster's avatar Thomas Huster

[16526] enabled mandant responsible text place holders

parent 92de6f3f
Pipeline #11325 passed with stages
in 2 minutes and 38 seconds
......@@ -15,6 +15,7 @@ package ch.elexis.data;
import java.util.Objects;
import ch.elexis.core.constants.StringConstants;
import ch.elexis.core.model.IPersistentObject;
import ch.rgw.tools.JdbcLink;
/**
......@@ -130,4 +131,16 @@ public class Mandant extends Anwender {
return Kontakt.TABLENAME;
}
public IPersistentObject getReferencedObject(String fieldl){
if (fieldl != null) {
if ("Responsible".equals(fieldl)) {
String responsibleId =
(String) getExtInfoStoredObjectByKey("ch.elexis.tarmedprefs.responsible");
if (responsibleId != null && !responsibleId.isEmpty()) {
return Mandant.load(responsibleId);
}
}
}
return null;
}
}
......@@ -452,6 +452,14 @@ public class TextContainer {
Fall fall = (Fall) parent;
return fall.getReferencedObject(fieldl);
} else if (parent instanceof Mandant) {
String fieldl = field;
if (fieldl.substring(0, 1).equalsIgnoreCase(DONT_SHOW_REPLACEMENT_ERRORS)) {
fieldl = fieldl.substring(1);
}
Mandant mandant = (Mandant) parent;
return mandant.getReferencedObject(fieldl);
} else {
// not yet supported
return null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment