@fishawack/lab-velocity 1.11.1 → 2.0.0-beta.10
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.
- package/README.md +177 -49
- package/_Build/vue/components/Icon.vue +33 -0
- package/_Build/vue/components/Svg.vue +45 -0
- package/{basic → _Build/vue/components/basic}/Button.vue +17 -19
- package/{basic → _Build/vue/components/basic}/link.vue +8 -7
- package/{form → _Build/vue/components/form}/Cascader.vue +13 -13
- package/{form → _Build/vue/components/form}/CheckboxGroup.vue +28 -6
- package/{form → _Build/vue/components/form}/DatePicker.vue +23 -7
- package/{form → _Build/vue/components/form}/InputNumber.vue +1 -2
- package/{form → _Build/vue/components/form}/Select.vue +10 -11
- package/_Build/vue/components/form/Spinner.vue +5 -0
- package/{form → _Build/vue/components/form}/Switch.vue +2 -2
- package/{form → _Build/vue/components/form}/Upload.vue +4 -6
- package/{form → _Build/vue/components/form}/Wysiwyg.vue +14 -14
- package/_Build/vue/components/form/Wysiwyg2.vue +577 -0
- package/{form → _Build/vue/components/form}/basic.vue +25 -7
- package/{form → _Build/vue/components/form}/file.vue +1 -1
- package/{form → _Build/vue/components/form}/input.js +2 -2
- package/{form → _Build/vue/components/form}/input.vue +31 -11
- package/{layout → _Build/vue/components/layout}/Alert.vue +10 -10
- package/_Build/vue/components/layout/Footer.vue +50 -0
- package/{layout → _Build/vue/components/layout}/Header.vue +5 -7
- package/_Build/vue/components/layout/Loader.vue +59 -0
- package/{layout → _Build/vue/components/layout}/Tooltip.vue +12 -12
- package/{layout → _Build/vue/components/layout}/pageTitle.vue +4 -4
- package/{layout → _Build/vue/components/layout}/sideBar.vue +4 -6
- package/{navigation → _Build/vue/components/navigation}/Breadcrumbs.vue +15 -10
- package/{navigation → _Build/vue/components/navigation}/BreadcrumbsItem.vue +6 -6
- package/_Build/vue/components/navigation/Menu.vue +14 -0
- package/_Build/vue/components/navigation/MenuItem.vue +20 -0
- package/_Build/vue/components/navigation/MenuItemGroup.vue +20 -0
- package/_Build/vue/components/navigation/SubMenu.vue +20 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/Upload/upload.vue +259 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/create.vue +62 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/edit.vue +98 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/index.vue +90 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/partials/form.vue +181 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/show.vue +267 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/parent.vue +36 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/create.vue +113 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/edit.vue +101 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/index.vue +112 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/partials/form.vue +174 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/show.vue +123 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/parent.vue +36 -0
- package/{AuthModule → _Build/vue/modules/AuthModule}/components/AuthModal.vue +30 -35
- package/_Build/vue/modules/AuthModule/components/Chip.vue +70 -0
- package/_Build/vue/modules/AuthModule/components/Chips.vue +26 -0
- package/_Build/vue/modules/AuthModule/components/FormRole.vue +117 -0
- package/_Build/vue/modules/AuthModule/components/VBreadcrumbs.vue +33 -0
- package/_Build/vue/modules/AuthModule/components/VFormFooter.vue +52 -0
- package/_Build/vue/modules/AuthModule/components/VPageHeader.vue +38 -0
- package/_Build/vue/modules/AuthModule/components/VPasswordValidation.vue +106 -0
- package/_Build/vue/modules/AuthModule/components/VRoleLegend.vue +43 -0
- package/_Build/vue/modules/AuthModule/components/VTable.vue +136 -0
- package/_Build/vue/modules/AuthModule/components/VTableSorter.vue +252 -0
- package/_Build/vue/modules/AuthModule/js/FakeAPI.js +78 -0
- package/_Build/vue/modules/AuthModule/js/axios.js +81 -0
- package/_Build/vue/modules/AuthModule/js/router.js +295 -0
- package/_Build/vue/modules/AuthModule/js/store.js +62 -0
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/account-exists.vue +6 -8
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/change-password.vue +39 -38
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/container.vue +4 -8
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/expired-reset.vue +17 -15
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/expired-verification.vue +21 -20
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/force-reset.vue +45 -40
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/forgot.vue +15 -11
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/login.vue +27 -26
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/logincallback.vue +6 -13
- package/_Build/vue/modules/AuthModule/routes/loginheadless.vue +21 -0
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/loginsso.vue +34 -29
- package/_Build/vue/modules/AuthModule/routes/logout.vue +19 -0
- package/_Build/vue/modules/AuthModule/routes/logoutheadless.vue +25 -0
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/register.vue +52 -37
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/reset.vue +29 -19
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/success-forgot.vue +22 -19
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/success-reset.vue +6 -6
- package/_Build/vue/modules/AuthModule/routes/success-verify.vue +30 -0
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/verify.vue +26 -26
- package/_base.scss +0 -1
- package/_defaults.scss +3 -15
- package/_variables.scss +24 -21
- package/components/_alert.scss +2 -2
- package/components/_auth.scss +163 -0
- package/components/_basic.scss +5 -4
- package/components/_breadcrumbs.scss +7 -8
- package/components/_button.scss +11 -12
- package/components/_cascader.scss +1 -1
- package/components/_checkbox.scss +27 -26
- package/components/_chip.scss +24 -0
- package/components/_collapse.scss +2 -3
- package/components/_datepicker.scss +7 -6
- package/components/_footer.scss +1 -1
- package/components/_form.scss +6 -4
- package/components/_header.scss +4 -5
- package/components/_icon.scss +4 -3
- package/components/_inputNumber.scss +4 -3
- package/components/_link.scss +7 -7
- package/components/_loader.scss +3 -4
- package/components/_menu.scss +22 -22
- package/{modules → components}/_modal.scss +3 -3
- package/components/_pageTitle.scss +3 -3
- package/components/_permissionLegend.scss +18 -0
- package/components/_select.scss +3 -2
- package/components/_sidebar.scss +5 -6
- package/components/_switch.scss +2 -2
- package/components/_table.scss +3 -3
- package/components/_tooltip.scss +2 -2
- package/components/_typography.scss +71 -62
- package/components/_upload.scss +1 -1
- package/components/_wysiwyg.scss +3 -2
- package/components/_wysiwyg2.scss +37 -31
- package/general.scss +1 -2
- package/index.js +38 -30
- package/package.json +104 -102
- package/vendor.scss +2 -3
- package/AuthModule/components/VPasswordValidation.vue +0 -66
- package/AuthModule/js/AuthAxios.js +0 -59
- package/AuthModule/js/AuthRoutes.js +0 -186
- package/AuthModule/js/AuthStore.js +0 -99
- package/AuthModule/js/FakeAPI.js +0 -84
- package/AuthModule/routes/loginheadless.vue +0 -16
- package/AuthModule/routes/logout.vue +0 -21
- package/AuthModule/routes/success-verify.vue +0 -29
- package/Icon.vue +0 -33
- package/Svg.vue +0 -40
- package/components/_input.scss +0 -0
- package/form/Wysiwyg2.vue +0 -278
- package/layout/Footer.vue +0 -35
- package/layout/Loader.vue +0 -39
- package/modules/_AuthModule.scss +0 -209
- package/modules/_AuthVariables.scss +0 -7
- package/navigation/Menu.vue +0 -16
- package/navigation/MenuItem.vue +0 -20
- package/navigation/MenuItemGroup.vue +0 -20
- package/navigation/SubMenu.vue +0 -20
- /package/{form → _Build/vue/components/form}/Checkbox.vue +0 -0
- /package/{form → _Build/vue/components/form}/color.vue +0 -0
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="relative">
|
|
3
3
|
<section id="resetPasswordForm">
|
|
4
|
-
<h1
|
|
4
|
+
<h1
|
|
5
|
+
class="h2 h2--small"
|
|
6
|
+
v-html="!form.successful ? 'Change password' : 'Success'"
|
|
7
|
+
/>
|
|
5
8
|
<form class="form" @submit.prevent="submit">
|
|
6
9
|
<div v-if="!form.successful">
|
|
7
|
-
<p class="
|
|
8
|
-
Please complete the fields below to change your
|
|
10
|
+
<p class="mt-2 mb-0">
|
|
11
|
+
Please complete the fields below to change your
|
|
12
|
+
password.
|
|
9
13
|
</p>
|
|
10
14
|
|
|
11
15
|
<el-input
|
|
12
|
-
class="
|
|
16
|
+
class="mt-3"
|
|
13
17
|
label="Current password"
|
|
14
18
|
placeholder="Enter your current password"
|
|
15
19
|
name="current_password"
|
|
@@ -21,7 +25,7 @@
|
|
|
21
25
|
/>
|
|
22
26
|
<el-input
|
|
23
27
|
v-model="form.password"
|
|
24
|
-
class="
|
|
28
|
+
class="mt-2 mb-2"
|
|
25
29
|
label="New Password"
|
|
26
30
|
placeholder="Enter your new password"
|
|
27
31
|
name="password"
|
|
@@ -32,9 +36,13 @@
|
|
|
32
36
|
:password="true"
|
|
33
37
|
/>
|
|
34
38
|
|
|
35
|
-
<VPasswordValidation
|
|
36
|
-
|
|
39
|
+
<VPasswordValidation
|
|
40
|
+
:password="form.password"
|
|
41
|
+
@passwordValid="updatePasswordValidity"
|
|
42
|
+
/>
|
|
43
|
+
<div class="flex mt-3">
|
|
37
44
|
<elButton
|
|
45
|
+
native-type="submit"
|
|
38
46
|
class=""
|
|
39
47
|
type="primary"
|
|
40
48
|
:disabled="form.processing || !isPasswordValid"
|
|
@@ -54,12 +62,14 @@
|
|
|
54
62
|
</div>
|
|
55
63
|
</div>
|
|
56
64
|
<div v-else>
|
|
57
|
-
<strong class=""
|
|
65
|
+
<strong class=""
|
|
66
|
+
>Email: {{ $store.state.auth?.user?.email }}</strong
|
|
67
|
+
>
|
|
58
68
|
<p v-text="`Your password has been updated.`" />
|
|
59
69
|
<elButton
|
|
60
|
-
|
|
61
|
-
type="
|
|
62
|
-
|
|
70
|
+
tag="router-link"
|
|
71
|
+
type="primary"
|
|
72
|
+
:to="{ name: $store.state.auth.redirect }"
|
|
63
73
|
>
|
|
64
74
|
<span v-text="'Continue'" />
|
|
65
75
|
</elButton>
|
|
@@ -78,20 +88,17 @@ export default {
|
|
|
78
88
|
form: new Form(
|
|
79
89
|
{
|
|
80
90
|
email: this.$store.state.auth.user?.email,
|
|
81
|
-
password:
|
|
82
|
-
current_password:
|
|
91
|
+
password: "",
|
|
92
|
+
current_password: "",
|
|
83
93
|
},
|
|
84
|
-
{ resetOnSuccess: false }
|
|
94
|
+
{ resetOnSuccess: false },
|
|
85
95
|
),
|
|
86
96
|
isPasswordValid: false,
|
|
87
97
|
};
|
|
88
98
|
},
|
|
89
99
|
|
|
90
100
|
mounted() {
|
|
91
|
-
|
|
92
|
-
this.$store.dispatch("getUser", {
|
|
93
|
-
errors: this.$root.errors,
|
|
94
|
-
});
|
|
101
|
+
this.$store.dispatch("getUser");
|
|
95
102
|
},
|
|
96
103
|
|
|
97
104
|
methods: {
|
|
@@ -99,10 +106,10 @@ export default {
|
|
|
99
106
|
this.loading = true;
|
|
100
107
|
|
|
101
108
|
try {
|
|
102
|
-
await this.form.put(
|
|
109
|
+
await this.form.put("/user/password");
|
|
103
110
|
await this.login();
|
|
104
111
|
} catch (e) {
|
|
105
|
-
|
|
112
|
+
console.log(e);
|
|
106
113
|
} finally {
|
|
107
114
|
this.loading = false;
|
|
108
115
|
}
|
|
@@ -113,18 +120,15 @@ export default {
|
|
|
113
120
|
try {
|
|
114
121
|
const res = await this.form.post("/login");
|
|
115
122
|
|
|
116
|
-
if(res[
|
|
117
|
-
try{
|
|
118
|
-
await this.$store.dispatch("logout"
|
|
119
|
-
|
|
120
|
-
});
|
|
121
|
-
} catch(e){}
|
|
123
|
+
if (res["logged-in"]) {
|
|
124
|
+
try {
|
|
125
|
+
await this.$store.dispatch("logout");
|
|
126
|
+
} catch (e) {}
|
|
122
127
|
|
|
123
128
|
await this.form.post("/login");
|
|
124
129
|
}
|
|
125
|
-
|
|
126
130
|
} catch (e) {
|
|
127
|
-
|
|
131
|
+
console.log(e);
|
|
128
132
|
} finally {
|
|
129
133
|
this.loading = false;
|
|
130
134
|
this.postLogin();
|
|
@@ -135,15 +139,11 @@ export default {
|
|
|
135
139
|
this.isPasswordValid = isValid;
|
|
136
140
|
},
|
|
137
141
|
handleButton() {
|
|
138
|
-
this.$emit(
|
|
142
|
+
this.$emit("close");
|
|
139
143
|
},
|
|
140
|
-
|
|
141
|
-
async postLogin() {
|
|
142
|
-
this.$store.commit("setAuth", true);
|
|
143
144
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
});
|
|
145
|
+
async postLogin() {
|
|
146
|
+
const { data: user } = await this.$store.dispatch("getUser");
|
|
147
147
|
},
|
|
148
148
|
},
|
|
149
149
|
|
|
@@ -154,9 +154,10 @@ export default {
|
|
|
154
154
|
},
|
|
155
155
|
|
|
156
156
|
components: {
|
|
157
|
-
VPasswordValidation: require("./../components/VPasswordValidation.vue")
|
|
158
|
-
|
|
159
|
-
|
|
157
|
+
VPasswordValidation: require("./../components/VPasswordValidation.vue")
|
|
158
|
+
.default,
|
|
159
|
+
elInput: require("../../../components/form/basic.vue").default,
|
|
160
|
+
elButton: require("../../../components/basic/Button.vue").default,
|
|
160
161
|
},
|
|
161
162
|
};
|
|
162
163
|
</script>
|
|
@@ -22,17 +22,13 @@
|
|
|
22
22
|
|
|
23
23
|
<script>
|
|
24
24
|
export default {
|
|
25
|
-
mounted() {
|
|
26
|
-
|
|
27
|
-
},
|
|
25
|
+
mounted() {},
|
|
28
26
|
data() {
|
|
29
27
|
return {
|
|
30
|
-
|
|
31
|
-
}
|
|
28
|
+
logoName: process.env.HYDRATE_LOGO,
|
|
29
|
+
};
|
|
32
30
|
},
|
|
33
31
|
|
|
34
|
-
components: {
|
|
35
|
-
|
|
36
|
-
},
|
|
32
|
+
components: {},
|
|
37
33
|
};
|
|
38
34
|
</script>
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<h1 class="h2 h2--small">Sorry, your password reset has expired</h1>
|
|
3
3
|
|
|
4
|
-
<p class="
|
|
4
|
+
<p class="mt-2 mb-0 color-highlight">
|
|
5
5
|
<strong class="">Email: {{ form?.email }}</strong>
|
|
6
6
|
</p>
|
|
7
|
-
<p class="
|
|
8
|
-
For security, password reset requests are only
|
|
7
|
+
<p class="mt-0.5">
|
|
8
|
+
For security, password reset requests are only
|
|
9
|
+
<strong>active for 1 hour</strong>. If you still want to reset your
|
|
10
|
+
password, please request a new password reset-link.
|
|
11
|
+
</p>
|
|
9
12
|
|
|
10
|
-
<form class="form"
|
|
11
|
-
@submit.prevent="submit"
|
|
12
|
-
>
|
|
13
|
+
<form class="form" @submit.prevent="submit">
|
|
13
14
|
<el-input
|
|
14
15
|
class="hidden"
|
|
15
16
|
v-model="form.email"
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
required
|
|
22
23
|
/>
|
|
23
24
|
<elButton
|
|
25
|
+
native-type="submit"
|
|
24
26
|
type="primary"
|
|
25
27
|
:disabled="form.processing"
|
|
26
28
|
:loading="form.processing"
|
|
@@ -29,8 +31,8 @@
|
|
|
29
31
|
Request new reset-link
|
|
30
32
|
</elButton>
|
|
31
33
|
|
|
32
|
-
<p class="disclaimer
|
|
33
|
-
<router-link class="color-1 underline" :to="{ name:
|
|
34
|
+
<p class="disclaimer mt-3">
|
|
35
|
+
<router-link class="color-1 underline" :to="{ name: 'auth.login' }">
|
|
34
36
|
Back to Sign in
|
|
35
37
|
</router-link>
|
|
36
38
|
</p>
|
|
@@ -42,15 +44,15 @@ import Form from "form-backend-validation";
|
|
|
42
44
|
|
|
43
45
|
export default {
|
|
44
46
|
components: {
|
|
45
|
-
elInput: require(
|
|
46
|
-
elButton: require(
|
|
47
|
+
elInput: require("../../../components/form/basic.vue").default,
|
|
48
|
+
elButton: require("../../../components/basic/Button.vue").default,
|
|
47
49
|
},
|
|
48
50
|
data: () => ({
|
|
49
51
|
form: new Form(
|
|
50
52
|
{
|
|
51
53
|
email: "",
|
|
52
54
|
},
|
|
53
|
-
{ resetOnSuccess: false }
|
|
55
|
+
{ resetOnSuccess: false },
|
|
54
56
|
),
|
|
55
57
|
}),
|
|
56
58
|
|
|
@@ -60,17 +62,17 @@ export default {
|
|
|
60
62
|
await this.form.post("/forgot-password");
|
|
61
63
|
|
|
62
64
|
this.$router.push({
|
|
63
|
-
name:
|
|
65
|
+
name: "auth.success-forgot",
|
|
64
66
|
query: { email: this.form.email },
|
|
65
67
|
});
|
|
66
68
|
} catch (e) {
|
|
67
|
-
|
|
69
|
+
console.log(e);
|
|
68
70
|
}
|
|
69
71
|
},
|
|
70
72
|
},
|
|
71
73
|
|
|
72
|
-
mounted(){
|
|
74
|
+
mounted() {
|
|
73
75
|
this.form.email = this.$route.query.email;
|
|
74
|
-
}
|
|
76
|
+
},
|
|
75
77
|
};
|
|
76
78
|
</script>
|
|
@@ -2,15 +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="
|
|
5
|
+
<p class="mt-2 mb-0 color-highlight">
|
|
6
6
|
<strong class="">Email: {{ form?.email }}</strong>
|
|
7
7
|
</p>
|
|
8
|
-
<p class="
|
|
9
|
-
This email verification link has expired. Not to worry, we can email
|
|
8
|
+
<p class="mt-0.5">
|
|
9
|
+
This email verification link has expired. Not to worry, we can email
|
|
10
|
+
you a new one.
|
|
10
11
|
</p>
|
|
11
12
|
|
|
12
13
|
<el-input
|
|
13
|
-
class="
|
|
14
|
+
class="mt-2 mb-2.5 hidden"
|
|
14
15
|
v-model="form.email"
|
|
15
16
|
label="Email address"
|
|
16
17
|
name="email"
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
/>
|
|
22
23
|
|
|
23
24
|
<elButton
|
|
25
|
+
native-type="submit"
|
|
24
26
|
type="primary"
|
|
25
27
|
:disabled="form.processing"
|
|
26
28
|
:loading="form.processing"
|
|
@@ -30,29 +32,29 @@
|
|
|
30
32
|
</elButton>
|
|
31
33
|
</form>
|
|
32
34
|
|
|
33
|
-
<p class="disclaimer
|
|
35
|
+
<p class="disclaimer mt-3">
|
|
34
36
|
Having trouble singing in?
|
|
35
|
-
<a :href="contact" class="underline">Contact us</a>
|
|
37
|
+
<a :href="$store.state.auth.contact" class="underline">Contact us</a>
|
|
36
38
|
</p>
|
|
37
39
|
</template>
|
|
38
40
|
|
|
39
41
|
<script>
|
|
40
42
|
import Form from "form-backend-validation";
|
|
43
|
+
import { ElNotification } from "element-plus";
|
|
41
44
|
|
|
42
45
|
export default {
|
|
43
46
|
components: {
|
|
44
|
-
elInput: require(
|
|
45
|
-
elButton: require(
|
|
47
|
+
elInput: require("../../../components/form/basic.vue").default,
|
|
48
|
+
elButton: require("../../../components/basic/Button.vue").default,
|
|
46
49
|
},
|
|
47
50
|
data: () => ({
|
|
48
51
|
form: new Form(
|
|
49
52
|
{
|
|
50
53
|
email: "",
|
|
51
54
|
},
|
|
52
|
-
{ resetOnSuccess: false }
|
|
55
|
+
{ resetOnSuccess: false },
|
|
53
56
|
),
|
|
54
57
|
notification: null,
|
|
55
|
-
contact: process.env.HYDRATE_CONTACT ?? 'mailto:EP@avalerehealth.com',
|
|
56
58
|
}),
|
|
57
59
|
|
|
58
60
|
methods: {
|
|
@@ -65,29 +67,28 @@ export default {
|
|
|
65
67
|
|
|
66
68
|
await this.form.post("/email/verification-notification");
|
|
67
69
|
|
|
68
|
-
|
|
70
|
+
ElNotification.success({
|
|
69
71
|
message: "Email has been re-sent",
|
|
70
72
|
duration: 10000,
|
|
71
|
-
class:
|
|
73
|
+
class: "el-notification--success el-notification--right-override",
|
|
72
74
|
});
|
|
73
75
|
} catch (e) {
|
|
74
76
|
if (e.response && e.response.status === 429) {
|
|
75
|
-
this.notification =
|
|
77
|
+
this.notification = ElNotification({
|
|
76
78
|
type: "warning",
|
|
77
|
-
message:
|
|
79
|
+
message: "Please allow 10 minutes before re-requesting",
|
|
78
80
|
duration: 0,
|
|
79
|
-
class:
|
|
81
|
+
class: "el-notification--warning el-notification--right-override",
|
|
80
82
|
});
|
|
81
83
|
} else if (e.response && e.response.status === 422) {
|
|
82
|
-
this.notification =
|
|
84
|
+
this.notification = ElNotification({
|
|
83
85
|
type: "error",
|
|
84
86
|
message: e.response.data.message,
|
|
85
87
|
duration: 0,
|
|
86
|
-
class:
|
|
88
|
+
class: "el-notification--error el-notification--right-override",
|
|
87
89
|
});
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
this.$root.errors(e);
|
|
90
|
+
} else {
|
|
91
|
+
console.log(e);
|
|
91
92
|
}
|
|
92
93
|
}
|
|
93
94
|
},
|
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="relative">
|
|
3
3
|
<section id="resetPasswordForm">
|
|
4
|
-
<h1
|
|
4
|
+
<h1
|
|
5
|
+
class="h2 h2--small"
|
|
6
|
+
v-html="!form.successful ? 'Welcome' : 'Success'"
|
|
7
|
+
/>
|
|
5
8
|
<form class="form" @submit.prevent="submit">
|
|
6
9
|
<div v-if="!form.successful">
|
|
7
|
-
<p class="
|
|
8
|
-
<strong class=""
|
|
10
|
+
<p class="mt-2 mb-0 color-highlight">
|
|
11
|
+
<strong class=""
|
|
12
|
+
>Email:
|
|
13
|
+
{{ $store.state?.auth?.user?.email }}</strong
|
|
14
|
+
>
|
|
9
15
|
</p>
|
|
10
|
-
<p class="
|
|
11
|
-
<strong
|
|
16
|
+
<p class="mt-0.5">
|
|
17
|
+
<strong
|
|
18
|
+
>Hello {{ $store.state?.auth?.user?.name }}</strong
|
|
19
|
+
>, and welcome to {{ $root.appName }}. To maintain
|
|
20
|
+
security, anyone signing in with a one-time-password
|
|
21
|
+
must <strong>create a new password</strong> the first
|
|
22
|
+
time they access the {{ $root.appName }} portal.
|
|
12
23
|
</p>
|
|
13
24
|
<el-input
|
|
14
25
|
v-model="form.password"
|
|
15
|
-
class="
|
|
26
|
+
class="mt-2"
|
|
16
27
|
label="New Password"
|
|
17
28
|
placeholder="Enter new password"
|
|
18
29
|
name="password"
|
|
@@ -22,10 +33,14 @@
|
|
|
22
33
|
required
|
|
23
34
|
/>
|
|
24
35
|
|
|
25
|
-
<VPasswordValidation
|
|
36
|
+
<VPasswordValidation
|
|
37
|
+
:password="form.password"
|
|
38
|
+
@passwordValid="updatePasswordValidity"
|
|
39
|
+
/>
|
|
26
40
|
|
|
27
41
|
<elButton
|
|
28
|
-
|
|
42
|
+
native-type="submit"
|
|
43
|
+
class="mt-3"
|
|
29
44
|
type="primary"
|
|
30
45
|
:disabled="form.processing || !isPasswordValid"
|
|
31
46
|
:loading="form.processing"
|
|
@@ -35,13 +50,16 @@
|
|
|
35
50
|
</elButton>
|
|
36
51
|
</div>
|
|
37
52
|
<div v-else>
|
|
38
|
-
<strong class=""
|
|
53
|
+
<strong class=""
|
|
54
|
+
>Email: {{ $store.state.auth?.user?.email }}</strong
|
|
55
|
+
>
|
|
39
56
|
<p v-text="`Your password has been updated.`" />
|
|
40
57
|
<elButton
|
|
58
|
+
tag="router-link"
|
|
41
59
|
type="primary"
|
|
42
|
-
|
|
60
|
+
:to="{ name: $store.state.auth.redirect }"
|
|
43
61
|
>
|
|
44
|
-
Continue
|
|
62
|
+
<span v-text="'Continue'" />
|
|
45
63
|
</elButton>
|
|
46
64
|
</div>
|
|
47
65
|
</form>
|
|
@@ -58,20 +76,16 @@ export default {
|
|
|
58
76
|
form: new Form(
|
|
59
77
|
{
|
|
60
78
|
email: this.$store.state.auth.user?.email,
|
|
61
|
-
password:
|
|
62
|
-
otp: true,
|
|
79
|
+
password: "",
|
|
63
80
|
},
|
|
64
|
-
{ resetOnSuccess: false }
|
|
81
|
+
{ resetOnSuccess: false },
|
|
65
82
|
),
|
|
66
83
|
isPasswordValid: false,
|
|
67
84
|
};
|
|
68
85
|
},
|
|
69
86
|
|
|
70
87
|
mounted() {
|
|
71
|
-
|
|
72
|
-
this.$store.dispatch("getUser", {
|
|
73
|
-
errors: this.$root.errors,
|
|
74
|
-
});
|
|
88
|
+
this.$store.dispatch("getUser");
|
|
75
89
|
},
|
|
76
90
|
|
|
77
91
|
methods: {
|
|
@@ -79,10 +93,10 @@ export default {
|
|
|
79
93
|
this.loading = true;
|
|
80
94
|
|
|
81
95
|
try {
|
|
82
|
-
await this.form.put(
|
|
96
|
+
await this.form.put("/user/password");
|
|
83
97
|
await this.login();
|
|
84
98
|
} catch (e) {
|
|
85
|
-
|
|
99
|
+
console.log(e);
|
|
86
100
|
} finally {
|
|
87
101
|
this.loading = false;
|
|
88
102
|
}
|
|
@@ -93,38 +107,28 @@ export default {
|
|
|
93
107
|
try {
|
|
94
108
|
const res = await this.form.post("/login");
|
|
95
109
|
|
|
96
|
-
if(res[
|
|
97
|
-
try{
|
|
98
|
-
await this.$store.dispatch("logout"
|
|
99
|
-
|
|
100
|
-
});
|
|
101
|
-
} catch(e){}
|
|
110
|
+
if (res["logged-in"]) {
|
|
111
|
+
try {
|
|
112
|
+
await this.$store.dispatch("logout");
|
|
113
|
+
} catch (e) {}
|
|
102
114
|
|
|
103
115
|
await this.form.post("/login");
|
|
104
116
|
}
|
|
105
|
-
|
|
106
117
|
} catch (e) {
|
|
107
|
-
|
|
118
|
+
console.log(e);
|
|
108
119
|
} finally {
|
|
109
120
|
this.loading = false;
|
|
110
121
|
await this.postLogin();
|
|
111
122
|
}
|
|
112
123
|
},
|
|
113
|
-
|
|
114
|
-
async postLogin() {
|
|
115
|
-
this.$store.commit("setAuth", true);
|
|
116
124
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
});
|
|
125
|
+
async postLogin() {
|
|
126
|
+
const { data: user } = await this.$store.dispatch("getUser");
|
|
120
127
|
},
|
|
121
128
|
|
|
122
129
|
updatePasswordValidity(isValid) {
|
|
123
130
|
this.isPasswordValid = isValid;
|
|
124
131
|
},
|
|
125
|
-
handleButton() {
|
|
126
|
-
this.$emit('close');
|
|
127
|
-
}
|
|
128
132
|
},
|
|
129
133
|
|
|
130
134
|
metaInfo() {
|
|
@@ -134,9 +138,10 @@ export default {
|
|
|
134
138
|
},
|
|
135
139
|
|
|
136
140
|
components: {
|
|
137
|
-
VPasswordValidation: require("./../components/VPasswordValidation.vue")
|
|
138
|
-
|
|
139
|
-
|
|
141
|
+
VPasswordValidation: require("./../components/VPasswordValidation.vue")
|
|
142
|
+
.default,
|
|
143
|
+
elInput: require("../../../components/form/basic.vue").default,
|
|
144
|
+
elButton: require("../../../components/basic/Button.vue").default,
|
|
140
145
|
},
|
|
141
146
|
};
|
|
142
147
|
</script>
|
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
<section id="forgotPasswordForm">
|
|
4
4
|
<h1 class="h2 h2--small">Reset password</h1>
|
|
5
5
|
<form class="form" @submit.prevent="submit">
|
|
6
|
-
<p class="
|
|
7
|
-
Enter the email address associated with your account to
|
|
6
|
+
<p class="mt-2">
|
|
7
|
+
Enter the email address associated with your account to
|
|
8
|
+
continue.
|
|
8
9
|
</p>
|
|
9
10
|
|
|
10
11
|
<el-input
|
|
11
12
|
v-if="!form.successful"
|
|
12
|
-
class="
|
|
13
|
+
class="mt-3 mb-3"
|
|
13
14
|
v-model="form.email"
|
|
14
15
|
label="Email "
|
|
15
16
|
placeholder="Enter email address"
|
|
@@ -20,18 +21,21 @@
|
|
|
20
21
|
/>
|
|
21
22
|
|
|
22
23
|
<elButton
|
|
24
|
+
native-type="submit"
|
|
23
25
|
type="primary"
|
|
24
|
-
:disabled="
|
|
26
|
+
:disabled="
|
|
27
|
+
form.processing || !form.email || form.email?.length < 5
|
|
28
|
+
"
|
|
25
29
|
:loading="form.processing"
|
|
26
30
|
@click="onSubmit"
|
|
27
31
|
>
|
|
28
32
|
Continue
|
|
29
33
|
</elButton>
|
|
30
34
|
|
|
31
|
-
<p class="disclaimer
|
|
35
|
+
<p class="disclaimer mt-3">
|
|
32
36
|
<router-link
|
|
33
37
|
class="color-1 underline"
|
|
34
|
-
:to="{ name:
|
|
38
|
+
:to="{ name: 'auth.login' }"
|
|
35
39
|
>
|
|
36
40
|
Back to Sign in
|
|
37
41
|
</router-link>
|
|
@@ -46,8 +50,8 @@ import Form from "form-backend-validation";
|
|
|
46
50
|
|
|
47
51
|
export default {
|
|
48
52
|
components: {
|
|
49
|
-
elInput: require(
|
|
50
|
-
elButton: require(
|
|
53
|
+
elInput: require("../../../components/form/basic.vue").default,
|
|
54
|
+
elButton: require("../../../components/basic/Button.vue").default,
|
|
51
55
|
},
|
|
52
56
|
|
|
53
57
|
data: () => ({
|
|
@@ -55,7 +59,7 @@ export default {
|
|
|
55
59
|
{
|
|
56
60
|
email: "",
|
|
57
61
|
},
|
|
58
|
-
{ resetOnSuccess: false }
|
|
62
|
+
{ resetOnSuccess: false },
|
|
59
63
|
),
|
|
60
64
|
}),
|
|
61
65
|
|
|
@@ -65,11 +69,11 @@ export default {
|
|
|
65
69
|
await this.form.post("/forgot-password");
|
|
66
70
|
|
|
67
71
|
this.$router.push({
|
|
68
|
-
name:
|
|
72
|
+
name: "auth.success-forgot",
|
|
69
73
|
query: { email: this.form.email },
|
|
70
74
|
});
|
|
71
75
|
} catch (e) {
|
|
72
|
-
|
|
76
|
+
console.log(e);
|
|
73
77
|
}
|
|
74
78
|
},
|
|
75
79
|
},
|