Account now displays the name instead of account id
This commit is contained in:
parent
5a2d91c515
commit
cf031cf4fd
|
@ -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 } })
|
||||
|
|
Loading…
Reference in New Issue