comparison client/src/components/systemconfiguration/DataAccuracy.vue @ 3867:d37f44c4d531

client: configuration: moved default values to separate file
author Markus Kottlaender <markus@intevation.de>
date Tue, 09 Jul 2019 16:11:42 +0200
parents a7abfb3d400d
children 851c0ccba59b
comparison
equal deleted inserted replaced
3866:42cd1978b504 3867:d37f44c4d531
324 * Author(s): 324 * Author(s):
325 * Markus Kottländer <markus@intevation.de> 325 * Markus Kottländer <markus@intevation.de>
326 */ 326 */
327 327
328 import { mapState } from "vuex"; 328 import { mapState } from "vuex";
329 import defaults from "./defaults";
329 330
330 export default { 331 export default {
331 computed: { 332 computed: {
332 ...mapState("application", ["config"]) 333 ...mapState("application", ["config"])
333 }, 334 },
334 methods: { 335 methods: {
335 reset() { 336 reset() {
336 this.config.bn_revtime_multiplier = "1.5"; 337 this.config.bn_revtime_multiplier = defaults.bn_revtime_multiplier;
337 this.config.gm_min_values_14d = "1224"; 338 this.config.gm_min_values_14d = defaults.gm_min_values_14d;
338 this.config.gm_latest_hours = "24"; 339 this.config.gm_latest_hours = defaults.gm_latest_hours;
339 this.config.gm_forecast_offset_24h = "15"; 340 this.config.gm_forecast_offset_24h = defaults.gm_forecast_offset_24h;
340 this.config.gm_forecast_offset_72h = "15"; 341 this.config.gm_forecast_offset_72h = defaults.gm_forecast_offset_72h;
341 this.config.gm_forecast_vs_reality_nsc_24h = "-12.5"; 342 this.config.gm_forecast_vs_reality_nsc_24h =
342 this.config.gm_forecast_vs_reality_nsc_72h = "-12.5"; 343 defaults.gm_forecast_vs_reality_nsc_24h;
344 this.config.gm_forecast_vs_reality_nsc_72h =
345 defaults.gm_forecast_vs_reality_nsc_72h;
343 }, 346 },
344 submit() { 347 submit() {
345 this.$store.dispatch("application/saveConfig", { 348 this.$store.dispatch("application/saveConfig", {
346 bn_revtime_multiplier: this.config.bn_revtime_multiplier, 349 bn_revtime_multiplier: this.config.bn_revtime_multiplier,
347 gm_latest_hours: this.config.gm_latest_hours, 350 gm_latest_hours: this.config.gm_latest_hours,