Account now displays the name instead of account id

This commit is contained in:
Mike 2019-09-05 16:25:15 +01:00
parent 5a2d91c515
commit cf031cf4fd
1 changed files with 4 additions and 2 deletions

View File

@ -166,6 +166,7 @@ export default {
if (this.isEdit) {
const id = this.$route.params && this.$route.params.id
this.fetchData(id)
this.getRemoteAccountList()
} else {
this.postForm = Object.assign({}, defaultForm)
}
@ -226,10 +227,11 @@ export default {
}
})
},
getRemoteAccountList(query) {
getRemoteAccountList(query) { // platform is undefined
query = {}
query.platform = this.$store.state.platform
query.limit = 100
query.limit = 100 // to fix limit maybe add another parameter in the Api call
fetchList(query).then(response => {
if (!response.data.docs) return
this.accountListOptions = response.data.docs.map(v => { return { name: v.name, id: v._id } })