- Filterfunktion erweitert mit Filtern nach Datum

This commit is contained in:
2026-01-29 22:38:02 +01:00
parent fbf677c23a
commit d05da838a8
3 changed files with 235 additions and 52 deletions

View File

@@ -82,11 +82,32 @@ class MapViewModel(application: Application) : AndroidViewModel(application) {
damageTypeList += it.name
}
println("DEBUG: ServiceFeatureTable erfolgreich geladen")
// ===== DEBUG: Alle verfügbaren Felder ausgeben =====
println("DEBUG: Verfügbare Felder in ServiceFeatureTable:")
serviceFeatureTable.fields.forEach { field ->
println(" - ${field.name}")
}
println("DEBUG: Ende Feldliste")
}.onFailure {
println("DEBUG: Fehler beim Laden der Tabelle: ${it.message}")
}
featureLayer = FeatureLayer.createWithFeatureTable(serviceFeatureTable)
map.operationalLayers.add(featureLayer)
// ===== DEBUG: Felder nach dem Hinzufügen zur Map =====
featureLayer.load().onSuccess {
println("DEBUG: FeatureLayer erfolgreich geladen")
val table = featureLayer.featureTable
if (table != null) {
println("DEBUG: Verfügbare Felder im FeatureLayer:")
table.fields.forEach { field ->
println(" - ${field.name}")
}
println("DEBUG: Ende Feldliste FeatureLayer")
}
}
}
}
@@ -365,7 +386,7 @@ class MapViewModel(application: Application) : AndroidViewModel(application) {
viewModelScope.launch {
// Determine if a user tapped on a feature.
mapViewProxy.identify(featureLayer, screenCoordinate, 10.dp).onSuccess {
identifyResult ->
identifyResult ->
// Get the identified feature.
val identifiedFeature = identifyResult.geoElements.firstOrNull() as? ArcGISFeature
identifiedFeature?.let {
@@ -403,7 +424,7 @@ data class ReportDraft(
val isValid: Boolean
get() =
beschreibung.isNotBlank() &&
typ != "Schadenstyp wählen..." &&
point != null &&
photos.isNotEmpty()
typ != "Schadenstyp wählen..." &&
point != null &&
photos.isNotEmpty()
}