refactored moving of locations, implemented editing of location details, implemented raising locations to the top level

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2025-10-22 23:36:42 +02:00
parent 8bf0790fca
commit a73a660d43
6 changed files with 45 additions and 11 deletions

View File

@@ -2,15 +2,15 @@
package de.srsoftware.umbrella.core.model;
import static de.srsoftware.umbrella.core.Constants.*;
import static de.srsoftware.umbrella.core.Util.markdown;
import de.srsoftware.umbrella.core.api.Owner;
import org.json.JSONObject;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.json.JSONObject;
public class DbLocation extends Location {
private Owner owner;
@@ -92,7 +92,8 @@ public class DbLocation extends Location {
var map = super.toMap();
map.put(OWNER,owner.toMap());
map.put(NAME,name);
map.put(DESCRIPTION,description);
map.put(DESCRIPTION,Map.of(SOURCE,description,RENDERED,markdown(description)));
if (parentLocationId != null) map.put(PARENT_LOCATION_ID,parentLocationId);
return map;
}