The information on most pages is gathered by the mounted code
But upon change of data in the DB, it is not refreshed
So make the mounted code into an explicit method (say mountedMethod) and then call that on mounting and also on data refresh
For context:
|
//Refresh the page for new data |
|
this.user = ( |
|
await axios.get( |
|
`/admin/super/users/searchById/?q=${this.$route.params.user_id}` |
|
) |
|
).data; |
|
const courses = this.user.courses.map(async (course_id) => { |
|
return (await axios.get(`/admin/super/courses/${course_id}`)).data; |
|
}); |
|
this.courses = await Promise.all(courses); |
|
}, |
I haven't put all the details so feel free to ask more clarification
The information on most pages is gathered by the
mountedcodeBut upon change of data in the DB, it is not refreshed
So make the mounted code into an explicit method (say
mountedMethod) and then call that on mounting and also on data refreshFor context:
noodle/client/src/views/Admin/EditUser.vue
Lines 84 to 94 in cd665d0
I haven't put all the details so feel free to ask more clarification