Added unversioned resources
authorelgekko <vasary@elgekko.net>
Thu, 6 Jul 2023 19:39:44 +0000 (21:39 +0200)
committerelgekko <vasary@elgekko.net>
Thu, 6 Jul 2023 19:39:44 +0000 (21:39 +0200)
.idea/.gitignore
lis-ui/src/main/java/hu/user/lis/ui/converter/AssociateIdToNameConverter.java [new file with mode: 0644]
lis-ui/src/main/resources/web/static/images/logo.png [new file with mode: 0644]

index 26d33521af10bcc7fd8cea344038eaaeb78d0ef5..982ef174cc44ccb329d8f13f85262a257ecf0b99 100644 (file)
@@ -1,3 +1,6 @@
 # Default ignored files
 /shelf/
 /workspace.xml
+/jpa-buddy.xml
+/jpa-buddy-datasource.xml
+/mongoSettings.xml
diff --git a/lis-ui/src/main/java/hu/user/lis/ui/converter/AssociateIdToNameConverter.java b/lis-ui/src/main/java/hu/user/lis/ui/converter/AssociateIdToNameConverter.java
new file mode 100644 (file)
index 0000000..4d1e8e3
--- /dev/null
@@ -0,0 +1,28 @@
+package hu.user.lis.ui.converter;
+
+import hu.user.lis.db.Associate;
+import hu.user.lis.services.data.AssociateService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.zkoss.bind.BindContext;
+import org.zkoss.bind.Converter;
+import org.zkoss.zul.impl.XulElement;
+
+@Component
+public class AssociateIdToNameConverter implements Converter<String, String, XulElement> {
+    @Autowired
+    AssociateService associateService;
+
+    @Override
+    public String coerceToUi(String associateId, XulElement element, BindContext bindContext) {
+        Associate associate = StringUtils.isBlank(associateId) ? null : associateService.getById(associateId);
+        return associate == null ? null : associate.getName();
+    }
+
+    @Override
+    public String coerceToBean(String s, XulElement element, BindContext bindContext) {
+
+        return null;
+    }
+}
\ No newline at end of file
diff --git a/lis-ui/src/main/resources/web/static/images/logo.png b/lis-ui/src/main/resources/web/static/images/logo.png
new file mode 100644 (file)
index 0000000..8996be7
Binary files /dev/null and b/lis-ui/src/main/resources/web/static/images/logo.png differ