Skip to content

Commit b57f520

Browse files
authored
Bugfix: apply export filters and return correct result (#1298)
1 parent fe2e39a commit b57f520

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

src/frontend/src/modules/Client/Clients.vue

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@
203203
<md-option
204204
v-for="miniGrid in miniGridService.list"
205205
:key="miniGrid.id"
206-
:value="miniGrid.id"
206+
:value="miniGrid.name"
207207
>
208208
{{ miniGrid.name }}
209209
</md-option>
@@ -218,7 +218,7 @@
218218
<md-option
219219
v-for="city in cityService.list"
220220
:key="city.id"
221-
:value="city.id"
221+
:value="city.name"
222222
>
223223
{{ city.name }}
224224
</md-option>
@@ -246,9 +246,12 @@
246246
<label>{{ $tc("words.deviceType") }}</label>
247247
<md-select v-model="exportFilters.deviceType">
248248
<md-option value="">{{ $tc("words.all") }}</md-option>
249-
<md-option value="meter">{{ $tc("words.meter") }}</md-option>
250-
<md-option value="appliance">
251-
{{ $tc("words.appliance") }}
249+
<md-option
250+
v-for="device in deviceTypes"
251+
:key="device.type"
252+
:value="device.type"
253+
>
254+
{{ device.display }}
252255
</md-option>
253256
</md-select>
254257
</md-field>
@@ -299,6 +302,7 @@ import { MainSettingsService } from "@/services/MainSettingsService"
299302
import { AgentService } from "@/services/AgentService"
300303
import { MiniGridService } from "@/services/MiniGridService"
301304
import { CityService } from "@/services/CityService"
305+
import { mapGetters } from "vuex"
302306
303307
const debounce = require("debounce")
304308
@@ -337,6 +341,11 @@ export default {
337341
activeRequest: null,
338342
}
339343
},
344+
computed: {
345+
...mapGetters({
346+
deviceTypes: "device/getDeviceTypes",
347+
}),
348+
},
340349
watch: {
341350
searchTerm: debounce(function () {
342351
this.handleSearch()

0 commit comments

Comments
 (0)