Mercurial > gemma
diff client/src/lib/mixins.js @ 4155:552ea22ed266 improvepdf
merge default into improvepdf
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Fri, 02 Aug 2019 13:30:29 +0200 |
parents | 33deb8634783 7c44af0b9370 |
children | 92c2f93fef3c |
line wrap: on
line diff
--- a/client/src/lib/mixins.js Thu Aug 01 12:48:33 2019 +0200 +++ b/client/src/lib/mixins.js Fri Aug 02 13:30:29 2019 +0200 @@ -47,6 +47,21 @@ } } }; +/** + * Since the names of LDC and HDC aren't normalized, we have to do guesswork + * best fit is key with HDC or LDC in it + */ +export const refwaterlevels = { + methods: { + determineLDCHDC(refWaterLevels) { + let HDC = + refWaterLevels[Object.keys(refWaterLevels).find(e => /HDC/.test(e))]; + let LDC = + refWaterLevels[Object.keys(refWaterLevels).find(e => /LDC/.test(e))]; + return { LDC, HDC }; + } + } +}; export const diagram = { methods: {