Account now displays the name instead of account id
This commit is contained in:
		| @@ -166,6 +166,7 @@ export default { | |||||||
|     if (this.isEdit) { |     if (this.isEdit) { | ||||||
|       const id = this.$route.params && this.$route.params.id |       const id = this.$route.params && this.$route.params.id | ||||||
|       this.fetchData(id) |       this.fetchData(id) | ||||||
|  |       this.getRemoteAccountList() | ||||||
|     } else { |     } else { | ||||||
|       this.postForm = Object.assign({}, defaultForm) |       this.postForm = Object.assign({}, defaultForm) | ||||||
|     } |     } | ||||||
| @@ -226,10 +227,11 @@ export default { | |||||||
|         } |         } | ||||||
|       }) |       }) | ||||||
|     }, |     }, | ||||||
|     getRemoteAccountList(query) { |     getRemoteAccountList(query) { // platform is undefined | ||||||
|       query = {} |       query = {} | ||||||
|       query.platform = this.$store.state.platform |       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 => { |       fetchList(query).then(response => { | ||||||
|         if (!response.data.docs) return |         if (!response.data.docs) return | ||||||
|         this.accountListOptions = response.data.docs.map(v => { return { name: v.name, id: v._id } }) |         this.accountListOptions = response.data.docs.map(v => { return { name: v.name, id: v._id } }) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user