Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the Page Info refresh upon changes #116

Open
Devanshu24 opened this issue Sep 4, 2020 · 2 comments
Open

Make the Page Info refresh upon changes #116

Devanshu24 opened this issue Sep 4, 2020 · 2 comments

Comments

@Devanshu24
Copy link
Collaborator

Devanshu24 commented Sep 4, 2020

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

@samarsault
Copy link
Owner

I don't think we need a realtime db kind of thing, the user can just refresh

@Devanshu24
Copy link
Collaborator Author

But isn't that sort of difficult experience, how will you know that you have actually changed the thing after changing?
Anyways isn't a pressing concern at the moment, important places already refresh upon data change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants