@fishawack/lab-velocity 2.0.0-beta.7 → 2.0.0-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/README.md +160 -38
  2. package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/create.vue +1 -1
  3. package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/edit.vue +1 -1
  4. package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/show.vue +3 -2
  5. package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/create.vue +3 -2
  6. package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/edit.vue +2 -4
  7. package/_Build/vue/modules/AuthModule/components/VTableSorter.vue +1 -1
  8. package/_Build/vue/modules/AuthModule/js/axios.js +19 -0
  9. package/_Build/vue/modules/AuthModule/js/store.js +2 -2
  10. package/_Build/vue/modules/AuthModule/routes/account-exists.vue +2 -2
  11. package/_Build/vue/modules/AuthModule/routes/change-password.vue +9 -15
  12. package/_Build/vue/modules/AuthModule/routes/expired-reset.vue +4 -4
  13. package/_Build/vue/modules/AuthModule/routes/expired-verification.vue +9 -8
  14. package/_Build/vue/modules/AuthModule/routes/force-reset.vue +9 -15
  15. package/_Build/vue/modules/AuthModule/routes/forgot.vue +4 -4
  16. package/_Build/vue/modules/AuthModule/routes/login.vue +7 -11
  17. package/_Build/vue/modules/AuthModule/routes/logincallback.vue +1 -3
  18. package/_Build/vue/modules/AuthModule/routes/loginsso.vue +7 -9
  19. package/_Build/vue/modules/AuthModule/routes/logout.vue +1 -3
  20. package/_Build/vue/modules/AuthModule/routes/logoutheadless.vue +1 -3
  21. package/_Build/vue/modules/AuthModule/routes/register.vue +10 -13
  22. package/_Build/vue/modules/AuthModule/routes/reset.vue +5 -5
  23. package/_Build/vue/modules/AuthModule/routes/success-forgot.vue +8 -7
  24. package/_Build/vue/modules/AuthModule/routes/success-reset.vue +2 -2
  25. package/_Build/vue/modules/AuthModule/routes/success-verify.vue +1 -3
  26. package/_Build/vue/modules/AuthModule/routes/verify.vue +11 -14
  27. package/_defaults.scss +2 -2
  28. package/components/_auth.scss +19 -61
  29. package/package.json +1 -2
package/README.md CHANGED
@@ -10,65 +10,187 @@ Prevent code repetition.
10
10
 
11
11
  ## Getting started
12
12
 
13
+ ### Requirements
14
+
15
+ ```json
16
+ "vue": "^3.3.4",
17
+ "vue-router": "^4.2.4",
18
+ "vuex": "^4.1.0",
19
+ "vuex-persistedstate": "^4.1.0"
20
+ "vue-loader": "^17.2.2"
21
+ ```
22
+
13
23
  ### Install
14
24
 
15
25
  ```bash
16
26
  npm install @fishawack/lab-velocity
17
27
  ```
18
28
 
19
- ### Auth Module
29
+ ## Hydrate Views
30
+
31
+ Frontend & Admin files to work with the Hydrate Module including routes, store, axios and components.
32
+
33
+ ### Installation
34
+
35
+ ### Configure axios
36
+
37
+ ##### script.js
38
+
39
+ ```js
40
+ import { Auth } from "@fishawack/lab-velocity";
41
+
42
+ // Call in your boot method
43
+ Auth.Axios.setAxiosDefaults(process.env.APP_URL, router);
44
+ ```
45
+
46
+ ### Configure router
47
+
48
+ ##### router.js
49
+
50
+ ```js
51
+ import { Auth } from "@fishawack/lab-velocity";
52
+ import store from "./store.js";
53
+
54
+ // ... initialize router
55
+
56
+ Auth.Router.beforeEach(router, store);
57
+ ```
58
+
59
+ ### Configure routes
60
+
61
+ There are two different set of routes for the admin and the frontend.
62
+
63
+ ##### routes.js
64
+
65
+ ```js
66
+ import { Auth } from "@fishawack/lab-velocity";
67
+
68
+ [
69
+ // ... other routes
70
+
71
+ // End user routes for login, register, chang password etc
72
+ ...Auth.Router.routes(node),
73
+
74
+ // Admin routes for headless login & managing users & companies
75
+ ...Auth.Router.adminRoutes(node),
76
+
77
+ // ... wildcard 404 routes etc
78
+ ];
79
+ ```
80
+
81
+ ### Configure store
82
+
83
+ ##### store.js
84
+
85
+ ```js
86
+ import { Auth } from "@fishawack/lab-velocity";
87
+
88
+ // Call in store
89
+ {
90
+ plugins: [
91
+ VuexPersistedState({
92
+ // ...
93
+ paths: ["auth.user"],
94
+ }),
95
+ ],
96
+
97
+ modules: {
98
+ auth: Auth.Store,
99
+ },
100
+
101
+ // ...
102
+ }
103
+ ```
104
+
105
+ ### Base Styles
106
+
107
+ @fishawack/lab-velocity extends @fishawack/lab-ui, for this reason you should replace the two references to variables & defaults with @fishawack/lab-velocity ones.
20
108
 
21
- Frontend files to to work with the Hydrate Module.
109
+ #### \_variables.scss
22
110
 
23
- #### Installation
111
+ ```sass
112
+ @import "@fishawack/lab-velocity/variables";
113
+
114
+ // Set global variables here, e.g $color6: red;
115
+ ```
24
116
 
25
- ##### Import Axios File
117
+ #### \_defaults.scss
26
118
 
27
- import axios from "axios";
28
- import "@fishawack/lab-velocity/AuthModule/js/AuthAxios.js";
119
+ ```sass
120
+ @use "variables";
121
+ @import "@fishawack/lab-velocity/defaults";
29
122
 
30
- ##### Import Routes File
123
+ $colors: variables.dynamic("color", module-variables("variables"));
31
124
 
32
- Inside Router.js file
33
- import { authRoutes, configureRoutes } from "@fishawack/lab-velocity/AuthModule/js/AuthRoutes";
125
+ // Override lab-ui defaults here, e.g $button: $color6;
126
+ ```
34
127
 
35
- let routes = require("./routes.js")(null, store).concat(authRoutes(null,store,store.state.auth.authBase));
36
- Add routes to createRouter call
128
+ ### Route Styles
37
129
 
38
- add method call after createRouter
39
- configureRoutes(router);
130
+ There are two different set of sass imports for the admin and the frontend routes.
40
131
 
41
- ##### Import Store
132
+ #### Frontend
42
133
 
43
- import AuthStore from "@fishawack/lab-velocity/AuthModule/js/AuthStore.js";
44
- Inside createStore method add
45
- modules: {
46
- auth: AuthStore
47
- },
48
- Inside VuexPersistedState add
49
- paths:["auth"]
134
+ ```sass
135
+ // Vendor imports / Lab-ui imports
136
+ @import "@fishawack/lab-ui/typography";
137
+ @import "@fishawack/lab-ui/grid";
138
+ @import "@fishawack/lab-ui/utilities";
139
+ @import "@fishawack/lab-ui/icon";
50
140
 
51
- At bottom of file set
52
- window.store = store;
141
+ // Lab velocity
142
+ @import "@fishawack/lab-velocity/base";
143
+ @import "@fishawack/lab-velocity/components/basic";
144
+ @import "@fishawack/lab-velocity/components/button";
145
+ @import "@fishawack/lab-velocity/components/form";
146
+ @import "@fishawack/lab-velocity/components/auth";
147
+ ```
53
148
 
54
- ##### SVGS
149
+ #### Admin
150
+
151
+ ##### vendor.scss
152
+
153
+ ```sass
154
+ // Vendor imports / Lab-ui imports
155
+ @import "@fishawack/lab-ui/typography";
156
+ @import "@fishawack/lab-ui/grid";
157
+ @import "@fishawack/lab-ui/utilities";
158
+
159
+ // Lab velocity
160
+ @import "@fishawack/lab-velocity/base";
161
+ @import "@fishawack/lab-velocity/components/pageTitle";
162
+ @import "@fishawack/lab-velocity/components/breadcrumbs";
163
+ @import "@fishawack/lab-velocity/components/table";
164
+ @import "@fishawack/lab-velocity/components/icon";
165
+ @import "@fishawack/lab-velocity/components/basic";
166
+ @import "@fishawack/lab-velocity/components/button";
167
+ @import "@fishawack/lab-velocity/components/form";
168
+ @import "@fishawack/lab-velocity/components/checkbox";
169
+ @import "@fishawack/lab-velocity/components/select";
170
+ @import "@fishawack/lab-velocity/components/loader";
171
+ @import "@fishawack/lab-velocity/components/permissionLegend";
172
+ @import "@fishawack/lab-velocity/components/chip";
173
+ ```
55
174
 
56
- Ensure Content has Velocity pulled in
57
- {
58
- "lftp": "ftp-fishawack.egnyte.com",
59
- "location": "Shared/FW/Knutsford/Digital/Auto-Content/Lab/Velocity"
60
- }
61
- Copy out the svg folder contents into the svg files within vue.
175
+ ### Icons
62
176
 
63
- ##### ENV VARS
177
+ Ensure Content has Velocity pulled in & copy out the svg folder contents into the svg files within vue.
64
178
 
65
- HYDRATE_LOGO=example-logo
179
+ ```json
180
+ {
181
+ "lftp": "ftp-fishawack.egnyte.com",
182
+ "location": "Shared/FW/Knutsford/Digital/Auto-Content/Lab/Velocity"
183
+ }
184
+ ```
66
185
 
67
- HYDRATE_LOGO=example-logo(No Default set, name of svg logo to display on page)
68
- HYDRATE_REDIRECT=(Default index if not configured)
69
- HYDRATE_CONTACT=(Default mailto:EP@avalerehealth, Email for contact us button)
186
+ ### ENV VARS (frontend)
70
187
 
71
- ##### Verify dependencies are installed
188
+ ```env
189
+ # Required
190
+ HYDRATE_LOGO=example-logo
72
191
 
73
- Axios
74
- form-backend-validation
192
+ # Descriptions
193
+ HYDRATE_LOGO Name of svg logo to display on page
194
+ HYDRATE_REDIRECT Default index if not configured
195
+ HYDRATE_CONTACT Default mailto:EP@avalerehealth, Email for contact us button
196
+ ```
@@ -54,7 +54,7 @@ export default {
54
54
  params: { id: res.data.id },
55
55
  });
56
56
  } catch (e) {
57
- this.$root.errors(e);
57
+ console.log(e);
58
58
  }
59
59
  },
60
60
  },
@@ -90,7 +90,7 @@ export default {
90
90
  params: { id: res.data.id },
91
91
  });
92
92
  } catch (e) {
93
- this.$root.errors(e);
93
+ console.log(e);
94
94
  }
95
95
  },
96
96
  },
@@ -143,6 +143,7 @@
143
143
  import axios from "axios";
144
144
  import VelButton from "../../../../../components/basic/Button.vue";
145
145
  import VelSpinner from "../../../../../components/form/Spinner.vue";
146
+ import { ElNotification } from "element-plus";
146
147
 
147
148
  export default {
148
149
  name: "PShow",
@@ -246,7 +247,7 @@ export default {
246
247
  const res = await axios.post(
247
248
  `/api/companies/${this.id}/welcome`,
248
249
  );
249
- this.$notify({
250
+ ElNotification({
250
251
  title: "Success",
251
252
  message: res.data.message,
252
253
  type: "success",
@@ -254,7 +255,7 @@ export default {
254
255
 
255
256
  this.company.primary_contact_contacted = true;
256
257
  } catch (e) {
257
- this.$notify({
258
+ ElNotification({
258
259
  title: "Warning",
259
260
  message: e.response?.data?.message || e.message,
260
261
  type: "warning",
@@ -16,6 +16,7 @@
16
16
  <script>
17
17
  import { ElMessageBox } from "element-plus";
18
18
  import Form from "form-backend-validation";
19
+ import { ElNotification } from "element-plus";
19
20
 
20
21
  export default {
21
22
  name: "PCreate",
@@ -75,7 +76,7 @@ export default {
75
76
  if (!this.form.set_password) {
76
77
  this.open(res.data.id);
77
78
  } else {
78
- this.$notify({
79
+ ElNotification({
79
80
  title: "Success",
80
81
  message: "User created a notified of their new account",
81
82
  type: "success",
@@ -87,7 +88,7 @@ export default {
87
88
  });
88
89
  }
89
90
  } catch (e) {
90
- this.$root.errors(e);
91
+ console.log(e);
91
92
  }
92
93
  },
93
94
  open(id) {
@@ -85,9 +85,7 @@ export default {
85
85
 
86
86
  // if changing ourselves, re-fetch user data
87
87
  if (res.data.id === this.$store.state.auth.user.id) {
88
- await this.$store.dispatch("getUser", {
89
- errors: this.$root.errors,
90
- });
88
+ await this.$store.dispatch("getUser");
91
89
  }
92
90
 
93
91
  this.$router.replace({
@@ -95,7 +93,7 @@ export default {
95
93
  params: { id: res.data.id },
96
94
  });
97
95
  } catch (e) {
98
- this.$root.errors(e);
96
+ console.log(e);
99
97
  }
100
98
  },
101
99
  },
@@ -209,7 +209,7 @@ export default {
209
209
  .then((res) => {
210
210
  return res.data;
211
211
  })
212
- .catch(this.$root.errors);
212
+ .catch(console.log);
213
213
  },
214
214
 
215
215
  getStatusLabel(status) {
@@ -1,4 +1,21 @@
1
1
  import axios from "axios";
2
+ import debounce from "lodash/debounce";
3
+
4
+ import { ElNotification } from "element-plus";
5
+
6
+ const displayErrorNotification = debounce(async function errors(e) {
7
+ if (e.response && !e.response.data.errors) {
8
+ ElNotification.error({
9
+ title: "Error",
10
+ message:
11
+ e.response.data.message ||
12
+ `${e.response.status}: ${
13
+ e.response.statusText || "Please try again later!"
14
+ }`,
15
+ duration: 10000,
16
+ });
17
+ }
18
+ }, 250);
2
19
 
3
20
  function setAxiosDefaults(baseUrl, router) {
4
21
  axios.defaults.baseURL = baseUrl;
@@ -25,6 +42,8 @@ function setAxiosDefaults(baseUrl, router) {
25
42
  }
26
43
  }
27
44
 
45
+ displayErrorNotification(error);
46
+
28
47
  return Promise.reject(error);
29
48
  });
30
49
 
@@ -38,7 +38,7 @@ const store = {
38
38
  },
39
39
 
40
40
  actions: {
41
- getUser({ commit }, { errors, query = "", params }) {
41
+ getUser({ commit }, { errors = console.log, query = "", params } = {}) {
42
42
  return axios
43
43
  .get(`/api/users/self${query}`, {
44
44
  params,
@@ -51,7 +51,7 @@ const store = {
51
51
  .catch(errors);
52
52
  },
53
53
 
54
- logout({ commit }, { errors }) {
54
+ logout({ commit }) {
55
55
  commit("setUser", null);
56
56
 
57
57
  return axios.post("/logout");
@@ -3,10 +3,10 @@
3
3
  <section id="resetPasswordForm">
4
4
  <h1 class="h2">Account already exists</h1>
5
5
 
6
- <p class="mt AM-mb-0 color-21">
6
+ <p class="mt mb-0 color-21">
7
7
  <strong class="">Company: {{ $route.query.company }}</strong>
8
8
  </p>
9
- <p class="AM-mt-0.5">Your company already has an active account.</p>
9
+ <p class="mt-0.5">Your company already has an active account.</p>
10
10
 
11
11
  <elButton
12
12
  tag="router-link"
@@ -7,13 +7,13 @@
7
7
  />
8
8
  <form class="form" @submit.prevent="submit">
9
9
  <div v-if="!form.successful">
10
- <p class="AM-mt-2 AM-mb-0">
10
+ <p class="mt-2 mb-0">
11
11
  Please complete the fields below to change your
12
12
  password.
13
13
  </p>
14
14
 
15
15
  <el-input
16
- class="AM-mt-3"
16
+ class="mt-3"
17
17
  label="Current password"
18
18
  placeholder="Enter your current password"
19
19
  name="current_password"
@@ -25,7 +25,7 @@
25
25
  />
26
26
  <el-input
27
27
  v-model="form.password"
28
- class="AM-mt-2 AM-mb-2"
28
+ class="mt-2 mb-2"
29
29
  label="New Password"
30
30
  placeholder="Enter your new password"
31
31
  name="password"
@@ -40,7 +40,7 @@
40
40
  :password="form.password"
41
41
  @passwordValid="updatePasswordValidity"
42
42
  />
43
- <div class="flex AM-mt-3">
43
+ <div class="flex mt-3">
44
44
  <elButton
45
45
  native-type="submit"
46
46
  class=""
@@ -94,9 +94,7 @@ export default {
94
94
  },
95
95
 
96
96
  mounted() {
97
- this.$store.dispatch("getUser", {
98
- errors: this.$root.errors,
99
- });
97
+ this.$store.dispatch("getUser");
100
98
  },
101
99
 
102
100
  methods: {
@@ -107,7 +105,7 @@ export default {
107
105
  await this.form.put("/user/password");
108
106
  await this.login();
109
107
  } catch (e) {
110
- this.$root.errors(e);
108
+ console.log(e);
111
109
  } finally {
112
110
  this.loading = false;
113
111
  }
@@ -120,15 +118,13 @@ export default {
120
118
 
121
119
  if (res["logged-in"]) {
122
120
  try {
123
- await this.$store.dispatch("logout", {
124
- // errors: this.$root.errors,
125
- });
121
+ await this.$store.dispatch("logout");
126
122
  } catch (e) {}
127
123
 
128
124
  await this.form.post("/login");
129
125
  }
130
126
  } catch (e) {
131
- this.$root.errors(e);
127
+ console.log(e);
132
128
  } finally {
133
129
  this.loading = false;
134
130
  this.postLogin();
@@ -143,9 +139,7 @@ export default {
143
139
  },
144
140
 
145
141
  async postLogin() {
146
- const { data: user } = await this.$store.dispatch("getUser", {
147
- errors: this.$root.errors,
148
- });
142
+ const { data: user } = await this.$store.dispatch("getUser");
149
143
  },
150
144
  },
151
145
 
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <h1 class="h2 h2--small">Sorry, your password reset has expired</h1>
3
3
 
4
- <p class="AM-mt-2 AM-mb-0 AM-color-highlight">
4
+ <p class="mt-2 mb-0 color-highlight">
5
5
  <strong class="">Email: {{ form?.email }}</strong>
6
6
  </p>
7
- <p class="AM-mt-0.5">
7
+ <p class="mt-0.5">
8
8
  For security, password reset requests are only
9
9
  <strong>active for 1&nbsp;hour</strong>. If you still want to reset your
10
10
  password, please request a new password reset-link.
@@ -31,7 +31,7 @@
31
31
  Request new reset-link
32
32
  </elButton>
33
33
 
34
- <p class="disclaimer AM-mt-3">
34
+ <p class="disclaimer mt-3">
35
35
  <router-link class="color-1 underline" :to="{ name: 'auth.login' }">
36
36
  Back to Sign in
37
37
  </router-link>
@@ -66,7 +66,7 @@ export default {
66
66
  query: { email: this.form.email },
67
67
  });
68
68
  } catch (e) {
69
- this.$root.errors(e);
69
+ console.log(e);
70
70
  }
71
71
  },
72
72
  },
@@ -2,16 +2,16 @@
2
2
  <h1 class="h2 h2--small">Verification link expired</h1>
3
3
 
4
4
  <form class="form" @submit.prevent="submit">
5
- <p class="AM-mt-2 AM-mb-0 AM-color-highlight">
5
+ <p class="mt-2 mb-0 color-highlight">
6
6
  <strong class="">Email: {{ form?.email }}</strong>
7
7
  </p>
8
- <p class="AM-mt-0.5">
8
+ <p class="mt-0.5">
9
9
  This email verification link has expired. Not to worry, we can email
10
10
  you a new one.
11
11
  </p>
12
12
 
13
13
  <el-input
14
- class="AM-mt-2 AM-mb-2.5 hidden"
14
+ class="mt-2 mb-2.5 hidden"
15
15
  v-model="form.email"
16
16
  label="Email address"
17
17
  name="email"
@@ -32,7 +32,7 @@
32
32
  </elButton>
33
33
  </form>
34
34
 
35
- <p class="disclaimer AM-mt-3">
35
+ <p class="disclaimer mt-3">
36
36
  Having trouble singing in?
37
37
  <a :href="$store.state.auth.contact" class="underline">Contact us</a>
38
38
  </p>
@@ -40,6 +40,7 @@
40
40
 
41
41
  <script>
42
42
  import Form from "form-backend-validation";
43
+ import { ElNotification } from "element-plus";
43
44
 
44
45
  export default {
45
46
  components: {
@@ -66,28 +67,28 @@ export default {
66
67
 
67
68
  await this.form.post("/email/verification-notification");
68
69
 
69
- this.$notify.success({
70
+ ElNotification.success({
70
71
  message: "Email has been re-sent",
71
72
  duration: 10000,
72
73
  class: "el-notification--success el-notification--right-override",
73
74
  });
74
75
  } catch (e) {
75
76
  if (e.response && e.response.status === 429) {
76
- this.notification = this.$notify({
77
+ this.notification = ElNotification({
77
78
  type: "warning",
78
79
  message: "Please allow 10 minutes before re-requesting",
79
80
  duration: 0,
80
81
  class: "el-notification--warning el-notification--right-override",
81
82
  });
82
83
  } else if (e.response && e.response.status === 422) {
83
- this.notification = this.$notify({
84
+ this.notification = ElNotification({
84
85
  type: "error",
85
86
  message: e.response.data.message,
86
87
  duration: 0,
87
88
  class: "el-notification--error el-notification--right-override",
88
89
  });
89
90
  } else {
90
- this.$root.errors(e);
91
+ console.log(e);
91
92
  }
92
93
  }
93
94
  },
@@ -7,13 +7,13 @@
7
7
  />
8
8
  <form class="form" @submit.prevent="submit">
9
9
  <div v-if="!form.successful">
10
- <p class="AM-mt-2 AM-mb-0 AM-color-highlight">
10
+ <p class="mt-2 mb-0 color-highlight">
11
11
  <strong class=""
12
12
  >Email:
13
13
  {{ $store.state?.auth?.user?.email }}</strong
14
14
  >
15
15
  </p>
16
- <p class="AM-mt-0.5">
16
+ <p class="mt-0.5">
17
17
  <strong
18
18
  >Hello {{ $store.state?.auth?.user?.name }}</strong
19
19
  >, and welcome to {{ $root.appName }}. To maintain
@@ -23,7 +23,7 @@
23
23
  </p>
24
24
  <el-input
25
25
  v-model="form.password"
26
- class="AM-mt-2"
26
+ class="mt-2"
27
27
  label="New Password"
28
28
  placeholder="Enter new password"
29
29
  name="password"
@@ -40,7 +40,7 @@
40
40
 
41
41
  <elButton
42
42
  native-type="submit"
43
- class="AM-mt-3"
43
+ class="mt-3"
44
44
  type="primary"
45
45
  :disabled="form.processing || !isPasswordValid"
46
46
  :loading="form.processing"
@@ -81,9 +81,7 @@ export default {
81
81
  },
82
82
 
83
83
  mounted() {
84
- this.$store.dispatch("getUser", {
85
- errors: this.$root.errors,
86
- });
84
+ this.$store.dispatch("getUser");
87
85
  },
88
86
 
89
87
  methods: {
@@ -94,7 +92,7 @@ export default {
94
92
  await this.form.put("/user/password");
95
93
  await this.login();
96
94
  } catch (e) {
97
- this.$root.errors(e);
95
+ console.log(e);
98
96
  } finally {
99
97
  this.loading = false;
100
98
  }
@@ -107,15 +105,13 @@ export default {
107
105
 
108
106
  if (res["logged-in"]) {
109
107
  try {
110
- await this.$store.dispatch("logout", {
111
- errors: this.$root.errors,
112
- });
108
+ await this.$store.dispatch("logout");
113
109
  } catch (e) {}
114
110
 
115
111
  await this.form.post("/login");
116
112
  }
117
113
  } catch (e) {
118
- this.$root.errors(e);
114
+ console.log(e);
119
115
  } finally {
120
116
  this.loading = false;
121
117
  await this.postLogin();
@@ -123,9 +119,7 @@ export default {
123
119
  },
124
120
 
125
121
  async postLogin() {
126
- const { data: user } = await this.$store.dispatch("getUser", {
127
- errors: this.$root.errors,
128
- });
122
+ const { data: user } = await this.$store.dispatch("getUser");
129
123
  },
130
124
 
131
125
  updatePasswordValidity(isValid) {