Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- beforeRouteEnter(from, to, next) {
- const promises = [];
- if (!store.getters['teams/value']) {
- promises.push(store.dispatch('teams/GET'));
- }
- if (!store.getters['users_masks/value']) {
- promises.push(store.dispatch('users_masks/GET'));
- }
- if (!store.getters['categories/value']) {
- promises.push(store.dispatch('users_masks/GET'));
- }
- if (!store.getters['statusv2/value']) {
- promises.push(store.dispatch('statusv2/GET'));
- }
- if (!store.getters['companiesv2/value']) {
- promises.push(store.dispatch('companiesv2/GET'));
- }
- Promise.all(promises).then(() => {
- next();
- }).catch(() => {
- });
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement