@fishawack/lab-velocity 2.0.0-beta.1 → 2.0.0-beta.3

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 (112) hide show
  1. package/_Build/vue/components/Icon.vue +33 -0
  2. package/_Build/vue/components/Svg.vue +45 -0
  3. package/_Build/vue/components/basic/Button.vue +109 -0
  4. package/_Build/vue/components/basic/link.vue +64 -0
  5. package/_Build/vue/components/form/Cascader.vue +85 -0
  6. package/_Build/vue/components/form/Checkbox.vue +39 -0
  7. package/_Build/vue/components/form/CheckboxGroup.vue +91 -0
  8. package/_Build/vue/components/form/DatePicker.vue +116 -0
  9. package/_Build/vue/components/form/InputNumber.vue +89 -0
  10. package/_Build/vue/components/form/Select.vue +109 -0
  11. package/_Build/vue/components/form/Switch.vue +63 -0
  12. package/_Build/vue/components/form/Upload.vue +101 -0
  13. package/_Build/vue/components/form/Wysiwyg.vue +127 -0
  14. package/_Build/vue/components/form/Wysiwyg2.vue +577 -0
  15. package/_Build/vue/components/form/basic.vue +106 -0
  16. package/_Build/vue/components/form/color.vue +22 -0
  17. package/_Build/vue/components/form/file.vue +89 -0
  18. package/_Build/vue/components/form/input.js +79 -0
  19. package/_Build/vue/components/form/input.vue +105 -0
  20. package/_Build/vue/components/layout/Alert.vue +38 -0
  21. package/_Build/vue/components/layout/Footer.vue +50 -0
  22. package/_Build/vue/components/layout/Header.vue +13 -0
  23. package/_Build/vue/components/layout/Loader.vue +59 -0
  24. package/_Build/vue/components/layout/Tooltip.vue +46 -0
  25. package/_Build/vue/components/layout/pageTitle.vue +18 -0
  26. package/_Build/vue/components/layout/sideBar.vue +25 -0
  27. package/_Build/vue/components/navigation/Breadcrumbs.vue +37 -0
  28. package/_Build/vue/components/navigation/BreadcrumbsItem.vue +19 -0
  29. package/_Build/vue/components/navigation/Menu.vue +14 -0
  30. package/_Build/vue/components/navigation/MenuItem.vue +20 -0
  31. package/_Build/vue/components/navigation/MenuItemGroup.vue +20 -0
  32. package/_Build/vue/components/navigation/SubMenu.vue +20 -0
  33. package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/Upload/upload.vue +251 -0
  34. package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/create.vue +62 -0
  35. package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/edit.vue +98 -0
  36. package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/index.vue +90 -0
  37. package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/partials/form.vue +173 -0
  38. package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/show.vue +262 -0
  39. package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/parent.vue +36 -0
  40. package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/create.vue +112 -0
  41. package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/edit.vue +103 -0
  42. package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/index.vue +112 -0
  43. package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/partials/form.vue +169 -0
  44. package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/show.vue +120 -0
  45. package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/parent.vue +36 -0
  46. package/_Build/vue/modules/AuthModule/components/AuthModal.vue +105 -0
  47. package/_Build/vue/modules/AuthModule/components/Chip.vue +70 -0
  48. package/_Build/vue/modules/AuthModule/components/Chips.vue +26 -0
  49. package/_Build/vue/modules/AuthModule/components/FormRole.vue +115 -0
  50. package/_Build/vue/modules/AuthModule/components/VBreadcrumbs.vue +33 -0
  51. package/_Build/vue/modules/AuthModule/components/VFormFooter.vue +46 -0
  52. package/_Build/vue/modules/AuthModule/components/VPageHeader.vue +38 -0
  53. package/_Build/vue/modules/AuthModule/components/VPasswordValidation.vue +106 -0
  54. package/_Build/vue/modules/AuthModule/components/VRoleLegend.vue +43 -0
  55. package/_Build/vue/modules/AuthModule/components/VTable.vue +127 -0
  56. package/_Build/vue/modules/AuthModule/components/VTableSorter.vue +240 -0
  57. package/_Build/vue/modules/AuthModule/js/FakeAPI.js +78 -0
  58. package/_Build/vue/modules/AuthModule/js/axios.js +62 -0
  59. package/_Build/vue/modules/AuthModule/js/router.js +295 -0
  60. package/_Build/vue/modules/AuthModule/js/store.js +62 -0
  61. package/_Build/vue/modules/AuthModule/routes/account-exists.vue +33 -0
  62. package/_Build/vue/modules/AuthModule/routes/change-password.vue +165 -0
  63. package/_Build/vue/modules/AuthModule/routes/container.vue +34 -0
  64. package/_Build/vue/modules/AuthModule/routes/expired-reset.vue +78 -0
  65. package/_Build/vue/modules/AuthModule/routes/expired-verification.vue +100 -0
  66. package/_Build/vue/modules/AuthModule/routes/force-reset.vue +152 -0
  67. package/_Build/vue/modules/AuthModule/routes/forgot.vue +91 -0
  68. package/_Build/vue/modules/AuthModule/routes/login.vue +143 -0
  69. package/_Build/vue/modules/AuthModule/routes/logincallback.vue +41 -0
  70. package/_Build/vue/modules/AuthModule/routes/loginheadless.vue +21 -0
  71. package/_Build/vue/modules/AuthModule/routes/loginsso.vue +134 -0
  72. package/_Build/vue/modules/AuthModule/routes/logout.vue +21 -0
  73. package/_Build/vue/modules/AuthModule/routes/logoutheadless.vue +27 -0
  74. package/_Build/vue/modules/AuthModule/routes/register.vue +174 -0
  75. package/_Build/vue/modules/AuthModule/routes/reset.vue +133 -0
  76. package/_Build/vue/modules/AuthModule/routes/success-forgot.vue +119 -0
  77. package/_Build/vue/modules/AuthModule/routes/success-reset.vue +35 -0
  78. package/_Build/vue/modules/AuthModule/routes/success-verify.vue +32 -0
  79. package/_Build/vue/modules/AuthModule/routes/verify.vue +113 -0
  80. package/package.json +3 -9
  81. package/components/_alert.scss +0 -5
  82. package/components/_basic.scss +0 -55
  83. package/components/_breadcrumbs.scss +0 -39
  84. package/components/_button.scss +0 -304
  85. package/components/_cascader.scss +0 -12
  86. package/components/_checkbox.scss +0 -41
  87. package/components/_chip.scss +0 -24
  88. package/components/_collapse.scss +0 -24
  89. package/components/_datepicker.scss +0 -52
  90. package/components/_footer.scss +0 -46
  91. package/components/_form.scss +0 -24
  92. package/components/_header.scss +0 -54
  93. package/components/_icon.scss +0 -25
  94. package/components/_input.scss +0 -0
  95. package/components/_inputNumber.scss +0 -22
  96. package/components/_link.scss +0 -44
  97. package/components/_loader.scss +0 -43
  98. package/components/_menu.scss +0 -112
  99. package/components/_pageTitle.scss +0 -8
  100. package/components/_permissionLegend.scss +0 -18
  101. package/components/_select.scss +0 -29
  102. package/components/_sidebar.scss +0 -56
  103. package/components/_switch.scss +0 -14
  104. package/components/_table.scss +0 -20
  105. package/components/_tooltip.scss +0 -4
  106. package/components/_typography.scss +0 -162
  107. package/components/_upload.scss +0 -15
  108. package/components/_wysiwyg.scss +0 -7
  109. package/components/_wysiwyg2.scss +0 -142
  110. package/modules/_AuthModule.scss +0 -212
  111. package/modules/_AuthVariables.scss +0 -7
  112. package/modules/_modal.scss +0 -24
@@ -0,0 +1,134 @@
1
+ <template>
2
+ <template v-if="stage === 1">
3
+ <h1 class="h2 h2--small">Sign in</h1>
4
+ <p class="AM-mb-3 AM-mt-2">Enter your email address to continue.</p>
5
+
6
+ <form @submit.prevent="submit" class="form" id="memberLoginForm">
7
+ <el-input
8
+ class="AM-mb-3"
9
+ label="Email"
10
+ placeholder="Enter your email address"
11
+ name="email"
12
+ type="email"
13
+ required
14
+ v-model="form.email"
15
+ :error="form.errors"
16
+ />
17
+
18
+ <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
19
+ <div style="position: absolute; left: -5000px" aria-hidden="true">
20
+ <input
21
+ ref="honeypot"
22
+ type="text"
23
+ name="b_0e1715593ad9366bc5d3ad8be_7aca058f12"
24
+ tabindex="-1"
25
+ value=""
26
+ />
27
+ </div>
28
+
29
+ <el-button
30
+ native-type="submit"
31
+ type="primary"
32
+ :disabled="loading || !isValidEmail(form.email)"
33
+ @click="onSubmit"
34
+ >
35
+ Continue
36
+ </el-button>
37
+
38
+ <p class="disclaimer AM-mt-3">
39
+ Having trouble signing in?
40
+ <a :href="$store.state.auth.contact" class="underline"
41
+ >Contact us</a
42
+ >
43
+ </p>
44
+ </form>
45
+ </template>
46
+ <template v-else>
47
+ <h1 class="h2 h2--small">Sign in with SSO</h1>
48
+ <p class="AM-mt-2">
49
+ Redirecting you to your organisation’s Single Sign-On (SSO) gateway
50
+ <span class="AM-color-highlight"
51
+ >in {{ countdown }} seconds...</span
52
+ >
53
+ </p>
54
+ <p class="disclaimer AM-mt-3">
55
+ <a :href="redirect_url" class="underline">Go to SSO gateway</a>
56
+ </p>
57
+ </template>
58
+ </template>
59
+
60
+ <script>
61
+ import Form from "form-backend-validation";
62
+
63
+ export default {
64
+ components: {
65
+ elInput: require("../../../components/form/basic.vue").default,
66
+ elButton: require("../../../components/basic/Button.vue").default,
67
+ },
68
+ data() {
69
+ return {
70
+ form: new Form(
71
+ {
72
+ email: "",
73
+ device_name: "Mobile device",
74
+ remember: true,
75
+ },
76
+ { resetOnSuccess: false },
77
+ ),
78
+ countdown: 3,
79
+ loading: false,
80
+ redirect_url: null,
81
+ stage: 1,
82
+ };
83
+ },
84
+
85
+ methods: {
86
+ async onSubmit() {
87
+ if (this.loading) return;
88
+
89
+ this.loading = true;
90
+
91
+ try {
92
+ const res = await this.form.post(`/hydrate/sso/check`);
93
+ if (res["redirect_url"]) {
94
+ this.redirect_url = res["redirect_url"];
95
+ this.setRedirect();
96
+ } else {
97
+ this.$router.push({
98
+ name: "auth.logincreds",
99
+ query: { email: this.form.email },
100
+ });
101
+ }
102
+ } catch (e) {
103
+ this.$root.errors(e);
104
+ } finally {
105
+ this.loading = false;
106
+ }
107
+ },
108
+ setRedirect() {
109
+ this.stage = 2;
110
+ let vue = this;
111
+ setTimeout(function () {
112
+ vue.setCountdown();
113
+ }, 1000);
114
+ },
115
+ setCountdown() {
116
+ this.countdown--;
117
+ if (this.countdown === 0) {
118
+ window.location = this.redirect_url;
119
+ } else {
120
+ let vue = this;
121
+ setTimeout(function () {
122
+ vue.setCountdown();
123
+ }, 1000);
124
+ }
125
+ },
126
+ isValidEmail(email) {
127
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
128
+ return emailRegex.test(email);
129
+ },
130
+ },
131
+
132
+ mounted() {},
133
+ };
134
+ </script>
@@ -0,0 +1,21 @@
1
+ <script>
2
+ export default {
3
+ metaInfo() {
4
+ return {
5
+ title: "Logout",
6
+ };
7
+ },
8
+
9
+ async mounted() {
10
+ try {
11
+ await this.$store.dispatch("logout", {
12
+ errors: this.$root.errors,
13
+ });
14
+ } catch {
15
+ /* empty */
16
+ } finally {
17
+ this.$router.push({ name: "auth.login" });
18
+ }
19
+ },
20
+ };
21
+ </script>
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <p v-text="done ? 'Logged out' : 'Logging out...'" />
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ metaInfo() {
8
+ return {
9
+ title: "Logout",
10
+ };
11
+ },
12
+
13
+ data: () => ({
14
+ done: false,
15
+ }),
16
+
17
+ async mounted() {
18
+ try {
19
+ await this.$store.dispatch("logout", {
20
+ errors: this.$root.errors,
21
+ });
22
+ } finally {
23
+ this.done = true;
24
+ }
25
+ },
26
+ };
27
+ </script>
@@ -0,0 +1,174 @@
1
+ <template>
2
+ <h1 class="h2 h2--small">Register</h1>
3
+ <p class="AM-mb-3 AM-mt-2">
4
+ Please enter your personal details to complete your registration.
5
+ </p>
6
+
7
+ <form
8
+ @submit.prevent="submit"
9
+ :class="form.errors && form.errors.any() ? 'form error' : 'form'"
10
+ id="memberLoginForm"
11
+ >
12
+ <el-input
13
+ class="AM-mb-2"
14
+ label="Full name"
15
+ placeholder="Enter your full name"
16
+ name="name"
17
+ required
18
+ v-model="form.name"
19
+ :error="form.errors"
20
+ />
21
+
22
+ <el-input
23
+ class="AM-mb-2"
24
+ label="Email"
25
+ placeholder="Enter your email address"
26
+ name="email"
27
+ type="email"
28
+ required
29
+ v-model="form.email"
30
+ :error="form.errors"
31
+ />
32
+
33
+ <el-input
34
+ class="AM-mb-2"
35
+ label="Password"
36
+ name="password"
37
+ placeholder="Create a unique password"
38
+ autocomplete="new-password"
39
+ type="password"
40
+ required
41
+ v-model="form.password"
42
+ :error="form.errors"
43
+ />
44
+
45
+ <VPasswordValidation
46
+ :password="form.password"
47
+ @passwordValid="updatePasswordValidity"
48
+ />
49
+
50
+ <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
51
+ <div style="position: absolute; left: -5000px" aria-hidden="true">
52
+ <input
53
+ ref="honeypot"
54
+ type="text"
55
+ name="b_0e1715593ad9366bc5d3ad8be_7aca058f12"
56
+ tabindex="-1"
57
+ value=""
58
+ />
59
+ </div>
60
+
61
+ <elButton
62
+ native-type="submit"
63
+ type="primary"
64
+ :disabled="
65
+ loading ||
66
+ form.name?.length < 1 ||
67
+ form.email?.length < 5 ||
68
+ !isPasswordValid
69
+ "
70
+ @click="onSubmit"
71
+ >
72
+ Register
73
+ </elButton>
74
+
75
+ <p class="disclaimer AM-mt-3">
76
+ Having trouble registering?
77
+ <a :href="$store.state.auth.contact" class="underline"
78
+ >Contact us</a
79
+ >
80
+ </p>
81
+ </form>
82
+ </template>
83
+
84
+ <script>
85
+ import Form from "form-backend-validation";
86
+
87
+ export default {
88
+ data() {
89
+ return {
90
+ form: new Form(
91
+ {
92
+ name: "",
93
+ email: "",
94
+ password: "",
95
+ },
96
+ { resetOnSuccess: false },
97
+ ),
98
+ loading: false,
99
+ isPasswordValid: false,
100
+ };
101
+ },
102
+
103
+ methods: {
104
+ async onSubmit() {
105
+ if (this.loading) return;
106
+
107
+ this.loading = true;
108
+
109
+ try {
110
+ const res = await this.form.post("/register");
111
+
112
+ if (res["logged-in"]) {
113
+ try {
114
+ await this.$store.dispatch("logout", {
115
+ errors: this.$root.errors,
116
+ });
117
+ } catch (e) {}
118
+
119
+ await this.form.post("/register");
120
+ }
121
+ if (res["redirect"]) {
122
+ // Redirect here
123
+ this.$router.push({
124
+ name: `auth.login`,
125
+ query: { company: res["company"] },
126
+ });
127
+ this.$notify.error({
128
+ title: "Domain is SSO enabled",
129
+ message: "Sign in with your company email address",
130
+ duration: 10000,
131
+ });
132
+ } else {
133
+ await this.postLogin();
134
+ }
135
+ } catch (e) {
136
+ this.$root.errors(e);
137
+ } finally {
138
+ this.loading = false;
139
+ }
140
+ },
141
+
142
+ async postLogin() {
143
+ const { data: user } = await this.$store.dispatch("getUser", {
144
+ errors: this.$root.errors,
145
+ });
146
+
147
+ if (window.dataLayer) {
148
+ window.dataLayer.push({ event: "login", user });
149
+ }
150
+
151
+ if (this.$store.state.auth.intended) {
152
+ this.$router.push(this.$store.state.auth.intended);
153
+ } else {
154
+ this.$router.push({
155
+ name: `auth.verify`,
156
+ });
157
+ // Problem Here
158
+ }
159
+
160
+ this.$store.commit("setIntended", null);
161
+ },
162
+ updatePasswordValidity(isValid) {
163
+ this.isPasswordValid = isValid;
164
+ },
165
+ },
166
+
167
+ components: {
168
+ VPasswordValidation: require("./../components/VPasswordValidation.vue")
169
+ .default,
170
+ elInput: require("../../../components/form/basic.vue").default,
171
+ elButton: require("../../../components/basic/Button.vue").default,
172
+ },
173
+ };
174
+ </script>
@@ -0,0 +1,133 @@
1
+ <template>
2
+ <div class="relative">
3
+ <section id="resetPasswordForm">
4
+ <h1 class="h2 h2--small">Reset password</h1>
5
+ <form class="form" @submit.prevent="submit">
6
+ <div v-if="!form.successful">
7
+ <p class="AM-mt-2 AM-mb-0 AM-color-highlight">
8
+ <strong class="">Email: {{ form?.email }}</strong>
9
+ </p>
10
+ <p class="AM-mt-0.5">
11
+ Please create a new password. Passwords you have used
12
+ previously aren’t permitted.
13
+ </p>
14
+ <el-input
15
+ v-model="form.password"
16
+ class="AM-mt-3"
17
+ label="New Password"
18
+ placeholder="Enter new password"
19
+ name="password"
20
+ :error="form.errors"
21
+ type="password"
22
+ autocomplete="new-password"
23
+ required
24
+ />
25
+
26
+ <VPasswordValidation
27
+ :password="form.password"
28
+ @passwordValid="updatePasswordValidity"
29
+ />
30
+
31
+ <el-input
32
+ class="hidden"
33
+ v-model="form.token"
34
+ name="token"
35
+ :error="form.errors"
36
+ type="hidden"
37
+ required
38
+ />
39
+
40
+ <elButton
41
+ native-type="submit"
42
+ type="primary"
43
+ :disabled="form.processing || !isPasswordValid"
44
+ :loading="form.processing"
45
+ @click="onSubmit"
46
+ >
47
+ <span v-text="'Reset password'" />
48
+ </elButton>
49
+ </div>
50
+ <div v-else>
51
+ <h4 class="mt" v-text="`Success!`" />
52
+ <p v-text="`Your password has been reset.`" />
53
+ </div>
54
+ <p class="disclaimer AM-mt-3">
55
+ <router-link
56
+ class="color-1 underline"
57
+ :to="{ name: 'auth.login' }"
58
+ >
59
+ Back to Sign in
60
+ </router-link>
61
+ </p>
62
+ </form>
63
+ </section>
64
+ </div>
65
+ </template>
66
+
67
+ <script>
68
+ import Form from "form-backend-validation";
69
+
70
+ export default {
71
+ data() {
72
+ return {
73
+ form: new Form(
74
+ {
75
+ email: "",
76
+ password: "",
77
+ token: "",
78
+ },
79
+ { resetOnSuccess: false },
80
+ ),
81
+ isPasswordValid: false,
82
+ };
83
+ },
84
+
85
+ mounted() {
86
+ this.form.email = this.$route.query.email;
87
+ this.form.token = this.$route.query.token;
88
+ },
89
+
90
+ methods: {
91
+ async onSubmit() {
92
+ try {
93
+ const res = await this.form.post("/reset-password");
94
+
95
+ this.$router.push({
96
+ name: "auth.success-reset",
97
+ query: { email: this.form.email },
98
+ });
99
+ } catch (e) {
100
+ if (
101
+ e.response &&
102
+ e.response.status === 422 &&
103
+ e.response.data.message ===
104
+ "This password reset token is invalid."
105
+ ) {
106
+ this.$router.push({
107
+ name: "auth.expired-reset",
108
+ query: { email: this.form.email },
109
+ });
110
+ }
111
+ this.$root.errors(e);
112
+ }
113
+ },
114
+
115
+ updatePasswordValidity(isValid) {
116
+ this.isPasswordValid = isValid;
117
+ },
118
+ },
119
+
120
+ metaInfo() {
121
+ return {
122
+ title: "Reset Password",
123
+ };
124
+ },
125
+
126
+ components: {
127
+ VPasswordValidation: require("./../components/VPasswordValidation.vue")
128
+ .default,
129
+ elInput: require("../../../components/form/basic.vue").default,
130
+ elButton: require("../../../components/basic/Button.vue").default,
131
+ },
132
+ };
133
+ </script>
@@ -0,0 +1,119 @@
1
+ <template>
2
+ <div class="relative">
3
+ <section id="forgotPasswordForm">
4
+ <h1 class="h2 h2--small">Reset password</h1>
5
+
6
+ <form class="form" @submit.prevent="submit">
7
+ <p class="AM-mt-2 AM-mb-0 AM-color-highlight">
8
+ <strong class="">Email: {{ form?.email }}</strong>
9
+ </p>
10
+ <p class="AM-mt">
11
+ If this account exists we have sent an email containing
12
+ instructions for resetting the password.
13
+ <strong>Please check your inbox.</strong>
14
+ </p>
15
+ <p class="AM-mt-3 AM-mb">
16
+ Haven’t received the email after 10 minutes?
17
+ </p>
18
+
19
+ <el-input
20
+ class="hidden"
21
+ v-model="form.email"
22
+ label="Email address"
23
+ name="email"
24
+ :error="form.errors"
25
+ type="email"
26
+ placeholder="Email"
27
+ required
28
+ />
29
+
30
+ <elButton
31
+ native-type="submit"
32
+ type="primary"
33
+ :disabled="form.processing"
34
+ :loading="form.processing"
35
+ @click="onSubmit"
36
+ >
37
+ Re-send instructions
38
+ </elButton>
39
+
40
+ <p class="disclaimer AM-mt-3">
41
+ <router-link
42
+ class="color-1 underline"
43
+ :to="{ name: `auth.login` }"
44
+ >
45
+ Back to Sign in
46
+ </router-link>
47
+ </p>
48
+ </form>
49
+ </section>
50
+ </div>
51
+ </template>
52
+
53
+ <script>
54
+ import Form from "form-backend-validation";
55
+
56
+ export default {
57
+ components: {
58
+ elInput: require("../../../components/form/basic.vue").default,
59
+ elButton: require("../../../components/basic/Button.vue").default,
60
+ },
61
+ data: () => ({
62
+ form: new Form(
63
+ {
64
+ email: "",
65
+ },
66
+ { resetOnSuccess: false },
67
+ ),
68
+ notification: null,
69
+ }),
70
+
71
+ methods: {
72
+ async onSubmit() {
73
+ try {
74
+ if (this.notification) {
75
+ this.notification.close();
76
+ this.notification = null;
77
+ }
78
+
79
+ await this.form.post("/forgot-password");
80
+
81
+ this.$notify({
82
+ type: "success",
83
+ message: "Email has been re-sent",
84
+ duration: 10000,
85
+ class: "el-notification--success el-notification--right-override",
86
+ });
87
+ } catch (e) {
88
+ if (e.response && e.response.status === 422) {
89
+ this.notification = this.$notify({
90
+ type: "warning",
91
+ message: "Please allow 10 minutes before re-requesting",
92
+ duration: 0,
93
+ class: "el-notification--warning el-notification--right-override",
94
+ });
95
+ } else {
96
+ this.$root.errors(e);
97
+ }
98
+ }
99
+ },
100
+ },
101
+
102
+ mounted() {
103
+ this.form.email = this.$route.query.email;
104
+
105
+ // If a user has come here directly then send them off to the original forgot screen to enter an email
106
+ if (!this.form.email) {
107
+ this.$router.push({
108
+ name: `auth.forgot`,
109
+ });
110
+ }
111
+ },
112
+
113
+ metaInfo() {
114
+ return {
115
+ title: "Forgot Password | Success",
116
+ };
117
+ },
118
+ };
119
+ </script>
@@ -0,0 +1,35 @@
1
+ <template>
2
+ <div class="relative">
3
+ <section id="resetPasswordForm">
4
+ <h1 class="h2 h2--small">Success</h1>
5
+
6
+ <p class="AM-mt-2 AM-mb-0 AM-color-highlight">
7
+ <strong class="">Email: {{ $route.query.email }}</strong>
8
+ </p>
9
+ <p class="AM-mt">
10
+ Your password has been reset. Please sign in to continue.
11
+ </p>
12
+
13
+ <elButton
14
+ tag="router-link"
15
+ type="primary"
16
+ :to="{ name: 'auth.login' }"
17
+ >
18
+ <span v-text="'Sign in'" />
19
+ </elButton>
20
+ </section>
21
+ </div>
22
+ </template>
23
+
24
+ <script>
25
+ export default {
26
+ metaInfo() {
27
+ return {
28
+ title: "Reset Password | Success",
29
+ };
30
+ },
31
+ components: {
32
+ elButton: require("../../../components/basic/Button.vue").default,
33
+ },
34
+ };
35
+ </script>
@@ -0,0 +1,32 @@
1
+ <template>
2
+ <h1 class="h2 h2--small">Verification complete</h1>
3
+ <p class="mb-0">
4
+ <strong
5
+ >Welcome to {{ $root.appName }},
6
+ {{ $store.state?.auth?.user?.name }}!</strong
7
+ >
8
+ </p>
9
+ <p>Your account has been verified successfully.</p>
10
+
11
+ <elButton
12
+ tag="router-link"
13
+ type="primary"
14
+ :to="{ name: $store.state.auth.redirect }"
15
+ >
16
+ <span v-text="'Continue'" />
17
+ </elButton>
18
+ </template>
19
+
20
+ <script>
21
+ export default {
22
+ mounted() {
23
+ this.$store.dispatch("getUser", {
24
+ errors: this.$root.errors,
25
+ });
26
+ },
27
+ components: {
28
+ elButton: require("../../../components/basic/Button.vue").default,
29
+ },
30
+ // Problem in this file
31
+ };
32
+ </script>