validate min/max values on save

This commit is contained in:
Josh Harvey 2016-12-20 14:08:07 +02:00
parent 3f3671f138
commit 124e35d153
5 changed files with 61 additions and 28 deletions

View file

@ -39,10 +39,8 @@ function selectedAccounts () {
const mapSchema = code => schemas[code]
return config.fetchConfig()
.then(data => {
if (!data) return []
const accountCodes = _.uniq(data.config.map(mapAccount)
.then(conf => {
const accountCodes = _.uniq(conf.map(mapAccount)
.filter(_.identity))
return _.sortBy(_.get('display'), accountCodes.map(mapSchema)