In order to streamline my workflow, I am developing a single admin panel that will be used for managing multiple web shops. To ensure that I can keep track of which website I am currently working on, I have implemented a website
object in my vuex state. This object can be modified by clicking a button that triggers an action within the state.
The admin dashboard page is designed to display statistics specific to the selected website. Currently, the data for these statistics is being stored within the page component itself.
I have encountered a problem when switching between websites while on the dashboard page. Since the URL remains the same for all dashboards, the statistics do not update accordingly. It seems that vue-router does not detect a change in the URL, therefore it doesn't reload the component. However, I would like the component to refresh automatically when the website is changed. Alternatively, I am looking for a way to identify when a website switch occurs so that I can manually trigger the retrieval of new data from the AJAX source.
As a relatively new user of Vue.js, I have been unable to find a solution to this issue despite having started using the framework a few weeks ago.