aboutsummaryrefslogtreecommitdiff
path: root/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/ReportController.kt
diff options
context:
space:
mode:
Diffstat (limited to 'shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/ReportController.kt')
-rw-r--r--shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/ReportController.kt8
1 files changed, 4 insertions, 4 deletions
diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/ReportController.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/ReportController.kt
index 8a7f527..78f0173 100644
--- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/ReportController.kt
+++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/ReportController.kt
@@ -37,7 +37,7 @@ class ReportController(
reportType: ReportType?,
reportPeriod: ReportDates.ReportPeriod?,
xlsx: Boolean = false,
- eventTypes: Array<EventInformation.Type> = arrayOf()
+ eventTypes: List<EventInformation.Type> = listOf()
) {
if (reportType == null || reportPeriod == null) {
return
@@ -85,7 +85,7 @@ class ReportController(
deviceId: Int,
from: String,
to: String,
- types: Array<EventInformation.Type>,
+ types: List<EventInformation.Type>,
xlsx: Boolean
) {
Log.d("UnitReportsVM", "Fetching events")
@@ -93,7 +93,7 @@ class ReportController(
if (!xlsx) {
val positionsResult = reportsApi.reportsRouteGet(from, to, deviceId)
val eventsResult = reportsApi.reportsEventsGet(
- from, to, EventInformation.reportTypesToString(types), deviceId
+ from, to, EventInformation.reportTypesToStrings(types), deviceId
)
val geofencesResult = geofencesApi.geofencesGet(all = true)
@@ -110,7 +110,7 @@ class ReportController(
reportFlow.value = Report.EventsReport(result.toTypedArray())
} else {
val result = reportsApi.reportsEventsGetXlsx(
- from, to, EventInformation.reportTypesToString(types), deviceId
+ from, to, EventInformation.reportTypesToStrings(types), deviceId
)
Log.d("UnitReportsVM", "Events report: $result")