@fishawack/lab-velocity 2.0.0-beta.6 → 2.0.0-beta.60
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 +467 -36
- package/_Build/js/libs/build-id.js +14 -0
- package/_Build/js/libs/filters.js +36 -0
- package/_Build/js/libs/globals.js +7 -0
- package/_Build/js/libs/router.js +22 -0
- package/_Build/js/libs/routes.js +29 -0
- package/_Build/js/libs/store.js +21 -0
- package/_Build/js/libs/utility.js +161 -0
- package/_Build/vue/components/basic/Button.vue +1 -1
- package/_Build/vue/components/form/Avatar.vue +90 -0
- package/_Build/vue/components/form/Checkbox.vue +10 -0
- package/_Build/vue/components/form/InputNumber.vue +1 -1
- package/_Build/vue/components/form/Select.vue +221 -31
- package/_Build/vue/components/form/Wysiwyg2.vue +87 -2
- package/_Build/vue/components/form/wysiwyg2-video.js +41 -0
- package/_Build/vue/components/layout/Alert.vue +5 -5
- package/_Build/vue/components/layout/Audit.vue +158 -0
- package/_Build/vue/{modules/AuthModule/components/VBreadcrumbs.vue → components/layout/Breadcrumbs.vue} +4 -4
- package/_Build/vue/{modules/AuthModule/components → components/layout}/Chips.vue +2 -2
- package/_Build/vue/components/layout/Footer.vue +11 -10
- package/_Build/vue/{modules/AuthModule/components/VFormFooter.vue → components/layout/FormFooter.vue} +2 -2
- package/_Build/vue/{modules/AuthModule/components → components/layout}/FormRole.vue +8 -8
- package/_Build/vue/components/layout/Layout.vue +94 -0
- package/_Build/vue/components/layout/Navigation.vue +83 -0
- package/_Build/vue/{modules/AuthModule/components/VPageHeader.vue → components/layout/PageHeader.vue} +14 -8
- package/_Build/vue/components/layout/SideBar.vue +26 -0
- package/_Build/vue/{modules/AuthModule/components/VTable.vue → components/layout/Table.vue} +24 -12
- package/_Build/vue/{modules/AuthModule/components/VTableSorter.vue → components/layout/TableSorter.vue} +92 -48
- package/_Build/vue/components/layout/TokenDisplay.vue +52 -0
- package/_Build/vue/components/layout/pageTitle.vue +1 -1
- package/_Build/vue/components/navigation/Menu.vue +6 -1
- package/_Build/vue/components/navigation/MenuItem.vue +7 -2
- package/_Build/vue/components/navigation/MenuItemGroup.vue +7 -2
- package/_Build/vue/modules/AuthModule/js/axios.js +21 -1
- package/_Build/vue/modules/AuthModule/js/clear-cookies.js +34 -0
- package/_Build/vue/modules/AuthModule/js/guest-request.js +32 -0
- package/_Build/vue/modules/AuthModule/js/impersonation-banner.js +102 -0
- package/_Build/vue/modules/AuthModule/js/router.js +91 -114
- package/_Build/vue/modules/AuthModule/js/store.js +23 -6
- package/_Build/vue/modules/AuthModule/routes/PCompanies/columns.js +268 -0
- package/_Build/vue/modules/AuthModule/routes/PCompanies/resource.js +213 -0
- package/_Build/vue/modules/AuthModule/routes/PIntegrations/columns.js +58 -0
- package/_Build/vue/modules/AuthModule/routes/PIntegrations/resource.js +79 -0
- package/_Build/vue/modules/AuthModule/routes/PTeams/columns.js +78 -0
- package/_Build/vue/modules/AuthModule/routes/PTeams/resource.js +251 -0
- package/_Build/vue/modules/AuthModule/routes/PUsers/SetPasswordAction.vue +51 -0
- package/_Build/vue/modules/AuthModule/routes/PUsers/SetPasswordDialog.vue +138 -0
- package/_Build/vue/modules/AuthModule/routes/PUsers/columns.js +349 -0
- package/_Build/vue/modules/AuthModule/routes/PUsers/resource.js +239 -0
- package/_Build/vue/modules/AuthModule/routes/account-exists.vue +2 -2
- package/_Build/vue/modules/AuthModule/routes/change-password.vue +28 -32
- package/_Build/vue/modules/AuthModule/routes/container.vue +2 -11
- package/_Build/vue/modules/AuthModule/routes/expired-reset.vue +4 -4
- package/_Build/vue/modules/AuthModule/routes/expired-verification.vue +10 -9
- package/_Build/vue/modules/AuthModule/routes/force-reset.vue +44 -58
- package/_Build/vue/modules/AuthModule/routes/forgot.vue +10 -5
- package/_Build/vue/modules/AuthModule/routes/login.vue +12 -19
- package/_Build/vue/modules/AuthModule/routes/logincallback.vue +1 -3
- package/_Build/vue/modules/AuthModule/routes/loginsso.vue +14 -10
- package/_Build/vue/modules/AuthModule/routes/logout.vue +14 -5
- package/_Build/vue/modules/AuthModule/routes/logoutheadless.vue +16 -5
- package/_Build/vue/modules/AuthModule/routes/register.vue +24 -28
- package/_Build/vue/modules/AuthModule/routes/reset.vue +20 -14
- package/_Build/vue/modules/AuthModule/routes/success-forgot.vue +14 -8
- package/_Build/vue/modules/AuthModule/routes/success-reset.vue +2 -2
- package/_Build/vue/modules/AuthModule/routes/success-verify.vue +1 -3
- package/_Build/vue/modules/AuthModule/routes/verify.vue +11 -14
- package/_Build/vue/modules/resource/Children/create.vue +99 -0
- package/_Build/vue/modules/resource/Children/edit.vue +124 -0
- package/_Build/vue/modules/resource/Children/index.vue +42 -0
- package/_Build/vue/modules/resource/Children/partials/form.vue +111 -0
- package/_Build/vue/modules/resource/Children/show.vue +170 -0
- package/_Build/vue/modules/resource/index.js +562 -0
- package/_Build/vue/modules/resource/parent.vue +63 -0
- package/_Build/vue/modules/resource/trashable.js +104 -0
- package/_base.scss +0 -1
- package/_defaults.scss +2 -2
- package/components/_auth.scss +19 -61
- package/components/_datepicker.scss +1 -0
- package/components/_descriptions.scss +2 -0
- package/components/_footer.scss +1 -0
- package/components/_form.scss +18 -0
- package/components/_header.scss +3 -27
- package/components/_layout.scss +56 -0
- package/components/_menu.scss +0 -5
- package/components/_sidebar.scss +12 -27
- package/components/_table.scss +3 -0
- package/components/_token-display.scss +41 -0
- package/components/_wysiwyg2.scss +10 -0
- package/general.scss +1 -0
- package/index.js +31 -1
- package/package.json +7 -4
- package/_Build/vue/components/layout/sideBar.vue +0 -25
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/Upload/upload.vue +0 -259
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/create.vue +0 -62
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/edit.vue +0 -98
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/index.vue +0 -90
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/partials/form.vue +0 -181
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/show.vue +0 -266
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/parent.vue +0 -36
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/create.vue +0 -112
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/edit.vue +0 -103
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/index.vue +0 -112
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/partials/form.vue +0 -173
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/show.vue +0 -123
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/parent.vue +0 -36
- package/components/_input.scss +0 -0
- /package/_Build/vue/{modules/AuthModule/components → components/layout}/AuthModal.vue +0 -0
- /package/_Build/vue/{modules/AuthModule/components → components/layout}/Chip.vue +0 -0
- /package/_Build/vue/{modules/AuthModule/components/VPasswordValidation.vue → components/layout/PasswordValidation.vue} +0 -0
- /package/_Build/vue/{modules/AuthModule/components/VRoleLegend.vue → components/layout/RoleLegend.vue} +0 -0
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
/>
|
|
8
8
|
<form class="form" @submit.prevent="submit">
|
|
9
9
|
<div v-if="!form.successful">
|
|
10
|
-
<p class="
|
|
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="
|
|
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="
|
|
28
|
+
class="mt-2 mb-2"
|
|
29
29
|
label="New Password"
|
|
30
30
|
placeholder="Enter your new password"
|
|
31
31
|
name="password"
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
:password="true"
|
|
37
37
|
/>
|
|
38
38
|
|
|
39
|
-
<
|
|
39
|
+
<VelPasswordValidation
|
|
40
40
|
:password="form.password"
|
|
41
41
|
@passwordValid="updatePasswordValidity"
|
|
42
42
|
/>
|
|
43
|
-
<div class="flex
|
|
43
|
+
<div class="flex mt-3">
|
|
44
44
|
<elButton
|
|
45
45
|
native-type="submit"
|
|
46
46
|
class=""
|
|
@@ -66,7 +66,11 @@
|
|
|
66
66
|
>Email: {{ $store.state.auth?.user?.email }}</strong
|
|
67
67
|
>
|
|
68
68
|
<p v-text="`Your password has been updated.`" />
|
|
69
|
-
<elButton
|
|
69
|
+
<elButton
|
|
70
|
+
tag="router-link"
|
|
71
|
+
type="primary"
|
|
72
|
+
:to="{ name: $store.state.auth.redirect }"
|
|
73
|
+
>
|
|
70
74
|
<span v-text="'Continue'" />
|
|
71
75
|
</elButton>
|
|
72
76
|
</div>
|
|
@@ -77,8 +81,17 @@
|
|
|
77
81
|
|
|
78
82
|
<script>
|
|
79
83
|
import Form from "form-backend-validation";
|
|
84
|
+
import { guestRequest } from "../js/guest-request";
|
|
80
85
|
|
|
81
86
|
export default {
|
|
87
|
+
components: {
|
|
88
|
+
VelPasswordValidation:
|
|
89
|
+
require("../../../components/layout/PasswordValidation.vue")
|
|
90
|
+
.default,
|
|
91
|
+
elInput: require("../../../components/form/basic.vue").default,
|
|
92
|
+
elButton: require("../../../components/basic/Button.vue").default,
|
|
93
|
+
},
|
|
94
|
+
|
|
82
95
|
data() {
|
|
83
96
|
return {
|
|
84
97
|
form: new Form(
|
|
@@ -94,9 +107,7 @@ export default {
|
|
|
94
107
|
},
|
|
95
108
|
|
|
96
109
|
mounted() {
|
|
97
|
-
this.$store.dispatch("getUser"
|
|
98
|
-
errors: this.$root.errors,
|
|
99
|
-
});
|
|
110
|
+
this.$store.dispatch("getUser");
|
|
100
111
|
},
|
|
101
112
|
|
|
102
113
|
methods: {
|
|
@@ -107,7 +118,7 @@ export default {
|
|
|
107
118
|
await this.form.put("/user/password");
|
|
108
119
|
await this.login();
|
|
109
120
|
} catch (e) {
|
|
110
|
-
|
|
121
|
+
console.log(e);
|
|
111
122
|
} finally {
|
|
112
123
|
this.loading = false;
|
|
113
124
|
}
|
|
@@ -116,19 +127,13 @@ export default {
|
|
|
116
127
|
this.loading = true;
|
|
117
128
|
|
|
118
129
|
try {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
// errors: this.$root.errors,
|
|
125
|
-
});
|
|
126
|
-
} catch (e) {}
|
|
127
|
-
|
|
128
|
-
await this.form.post("/login");
|
|
129
|
-
}
|
|
130
|
+
await guestRequest({
|
|
131
|
+
form: this.form,
|
|
132
|
+
url: "/login",
|
|
133
|
+
store: this.$store,
|
|
134
|
+
});
|
|
130
135
|
} catch (e) {
|
|
131
|
-
|
|
136
|
+
console.log(e);
|
|
132
137
|
} finally {
|
|
133
138
|
this.loading = false;
|
|
134
139
|
this.postLogin();
|
|
@@ -143,9 +148,7 @@ export default {
|
|
|
143
148
|
},
|
|
144
149
|
|
|
145
150
|
async postLogin() {
|
|
146
|
-
const { data: user } = await this.$store.dispatch("getUser"
|
|
147
|
-
errors: this.$root.errors,
|
|
148
|
-
});
|
|
151
|
+
const { data: user } = await this.$store.dispatch("getUser");
|
|
149
152
|
},
|
|
150
153
|
},
|
|
151
154
|
|
|
@@ -154,12 +157,5 @@ export default {
|
|
|
154
157
|
title: "Reset Password",
|
|
155
158
|
};
|
|
156
159
|
},
|
|
157
|
-
|
|
158
|
-
components: {
|
|
159
|
-
VPasswordValidation: require("./../components/VPasswordValidation.vue")
|
|
160
|
-
.default,
|
|
161
|
-
elInput: require("../../../components/form/basic.vue").default,
|
|
162
|
-
elButton: require("../../../components/basic/Button.vue").default,
|
|
163
|
-
},
|
|
164
160
|
};
|
|
165
161
|
</script>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<router-link to="/" class="logo" aria-label="Go to home page">
|
|
6
6
|
<GSvg
|
|
7
7
|
class="AuthModule__logo"
|
|
8
|
-
:name="
|
|
8
|
+
:name="$store.state.auth.logo"
|
|
9
9
|
embed
|
|
10
10
|
asis
|
|
11
11
|
role="presentation"
|
|
@@ -21,14 +21,5 @@
|
|
|
21
21
|
</template>
|
|
22
22
|
|
|
23
23
|
<script>
|
|
24
|
-
export default {
|
|
25
|
-
mounted() {},
|
|
26
|
-
data() {
|
|
27
|
-
return {
|
|
28
|
-
logoName: process.env.HYDRATE_LOGO,
|
|
29
|
-
};
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
components: {},
|
|
33
|
-
};
|
|
24
|
+
export default {};
|
|
34
25
|
</script>
|
|
@@ -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="
|
|
4
|
+
<p class="mt-2 mb-0 color-highlight">
|
|
5
5
|
<strong class="">Email: {{ form?.email }}</strong>
|
|
6
6
|
</p>
|
|
7
|
-
<p class="
|
|
7
|
+
<p class="mt-0.5">
|
|
8
8
|
For security, password reset requests are only
|
|
9
9
|
<strong>active for 1 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
|
|
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
|
-
|
|
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="
|
|
5
|
+
<p class="mt-2 mb-0 color-highlight">
|
|
6
6
|
<strong class="">Email: {{ form?.email }}</strong>
|
|
7
7
|
</p>
|
|
8
|
-
<p class="
|
|
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="
|
|
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
|
|
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: {
|
|
@@ -64,30 +65,30 @@ export default {
|
|
|
64
65
|
this.notification = null;
|
|
65
66
|
}
|
|
66
67
|
|
|
67
|
-
await this.form.post("/email/verification
|
|
68
|
+
await this.form.post("/email/resend-verification");
|
|
68
69
|
|
|
69
|
-
|
|
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 =
|
|
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 =
|
|
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
|
-
|
|
91
|
+
console.log(e);
|
|
91
92
|
}
|
|
92
93
|
}
|
|
93
94
|
},
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="relative">
|
|
3
3
|
<section id="resetPasswordForm">
|
|
4
|
-
<h1
|
|
5
|
-
class="h2 h2--small"
|
|
6
|
-
v-html="!form.successful ? 'Welcome' : 'Success'"
|
|
7
|
-
/>
|
|
4
|
+
<h1 class="h2 h2--small" v-html="'Welcome'" />
|
|
8
5
|
<form class="form" @submit.prevent="submit">
|
|
9
|
-
<div
|
|
10
|
-
<p class="
|
|
11
|
-
<strong class=""
|
|
12
|
-
>Email:
|
|
13
|
-
{{ $store.state?.auth?.user?.email }}</strong
|
|
14
|
-
>
|
|
6
|
+
<div>
|
|
7
|
+
<p class="mt-2 mb-0 color-highlight">
|
|
8
|
+
<strong class="">Email: {{ email }}</strong>
|
|
15
9
|
</p>
|
|
16
|
-
<p class="
|
|
17
|
-
<strong
|
|
18
|
-
>Hello {{ $store.state?.auth?.user?.name }}</strong
|
|
10
|
+
<p class="mt-0.5">
|
|
11
|
+
<strong>Hello {{ name }}</strong
|
|
19
12
|
>, and welcome to {{ $root.appName }}. To maintain
|
|
20
13
|
security, anyone signing in with a one-time-password
|
|
21
14
|
must <strong>create a new password</strong> the first
|
|
@@ -23,7 +16,7 @@
|
|
|
23
16
|
</p>
|
|
24
17
|
<el-input
|
|
25
18
|
v-model="form.password"
|
|
26
|
-
class="
|
|
19
|
+
class="mt-2"
|
|
27
20
|
label="New Password"
|
|
28
21
|
placeholder="Enter new password"
|
|
29
22
|
name="password"
|
|
@@ -33,31 +26,22 @@
|
|
|
33
26
|
required
|
|
34
27
|
/>
|
|
35
28
|
|
|
36
|
-
<
|
|
29
|
+
<VelPasswordValidation
|
|
37
30
|
:password="form.password"
|
|
38
31
|
@passwordValid="updatePasswordValidity"
|
|
39
32
|
/>
|
|
40
33
|
|
|
41
34
|
<elButton
|
|
42
35
|
native-type="submit"
|
|
43
|
-
class="
|
|
36
|
+
class="mt-3"
|
|
44
37
|
type="primary"
|
|
45
|
-
:disabled="
|
|
46
|
-
:loading="
|
|
38
|
+
:disabled="loading || !isPasswordValid"
|
|
39
|
+
:loading="loading"
|
|
47
40
|
@click="onSubmit"
|
|
48
41
|
>
|
|
49
42
|
<span v-text="'Update password'" />
|
|
50
43
|
</elButton>
|
|
51
44
|
</div>
|
|
52
|
-
<div v-else>
|
|
53
|
-
<strong class=""
|
|
54
|
-
>Email: {{ $store.state.auth?.user?.email }}</strong
|
|
55
|
-
>
|
|
56
|
-
<p v-text="`Your password has been updated.`" />
|
|
57
|
-
<elButton type="primary" @click="handleButton">
|
|
58
|
-
Continue
|
|
59
|
-
</elButton>
|
|
60
|
-
</div>
|
|
61
45
|
</form>
|
|
62
46
|
</section>
|
|
63
47
|
</div>
|
|
@@ -65,8 +49,18 @@
|
|
|
65
49
|
|
|
66
50
|
<script>
|
|
67
51
|
import Form from "form-backend-validation";
|
|
52
|
+
import { ElNotification } from "element-plus";
|
|
53
|
+
import { guestRequest } from "../js/guest-request";
|
|
68
54
|
|
|
69
55
|
export default {
|
|
56
|
+
components: {
|
|
57
|
+
VelPasswordValidation:
|
|
58
|
+
require("../../../components/layout/PasswordValidation.vue")
|
|
59
|
+
.default,
|
|
60
|
+
elInput: require("../../../components/form/basic.vue").default,
|
|
61
|
+
elButton: require("../../../components/basic/Button.vue").default,
|
|
62
|
+
},
|
|
63
|
+
|
|
70
64
|
data() {
|
|
71
65
|
return {
|
|
72
66
|
form: new Form(
|
|
@@ -77,13 +71,17 @@ export default {
|
|
|
77
71
|
{ resetOnSuccess: false },
|
|
78
72
|
),
|
|
79
73
|
isPasswordValid: false,
|
|
74
|
+
loading: false,
|
|
75
|
+
name: "",
|
|
76
|
+
email: "",
|
|
80
77
|
};
|
|
81
78
|
},
|
|
82
79
|
|
|
83
80
|
mounted() {
|
|
84
|
-
this.$store.dispatch("getUser"
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
this.$store.dispatch("getUser");
|
|
82
|
+
|
|
83
|
+
this.name = this.$store.state?.auth?.user?.name;
|
|
84
|
+
this.email = this.$store.state?.auth?.user?.email;
|
|
87
85
|
},
|
|
88
86
|
|
|
89
87
|
methods: {
|
|
@@ -94,46 +92,41 @@ export default {
|
|
|
94
92
|
await this.form.put("/user/password");
|
|
95
93
|
await this.login();
|
|
96
94
|
} catch (e) {
|
|
97
|
-
|
|
95
|
+
console.log(e);
|
|
98
96
|
} finally {
|
|
99
97
|
this.loading = false;
|
|
100
98
|
}
|
|
101
99
|
},
|
|
102
100
|
async login() {
|
|
103
|
-
this.loading = true;
|
|
104
|
-
|
|
105
101
|
try {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
errors: this.$root.errors,
|
|
112
|
-
});
|
|
113
|
-
} catch (e) {}
|
|
114
|
-
|
|
115
|
-
await this.form.post("/login");
|
|
116
|
-
}
|
|
102
|
+
await guestRequest({
|
|
103
|
+
form: this.form,
|
|
104
|
+
url: "/login",
|
|
105
|
+
store: this.$store,
|
|
106
|
+
});
|
|
117
107
|
} catch (e) {
|
|
118
|
-
|
|
108
|
+
console.log(e);
|
|
119
109
|
} finally {
|
|
120
|
-
this.loading = false;
|
|
121
110
|
await this.postLogin();
|
|
122
111
|
}
|
|
123
112
|
},
|
|
124
113
|
|
|
125
114
|
async postLogin() {
|
|
126
|
-
const { data: user } = await this.$store.dispatch("getUser"
|
|
127
|
-
|
|
115
|
+
const { data: user } = await this.$store.dispatch("getUser");
|
|
116
|
+
|
|
117
|
+
this.$router.push({ name: this.$store.state.auth.redirect });
|
|
118
|
+
|
|
119
|
+
ElNotification({
|
|
120
|
+
type: "success",
|
|
121
|
+
message: "Password updated successfully",
|
|
122
|
+
duration: 10000,
|
|
123
|
+
class: "el-notification--success el-notification--right-override",
|
|
128
124
|
});
|
|
129
125
|
},
|
|
130
126
|
|
|
131
127
|
updatePasswordValidity(isValid) {
|
|
132
128
|
this.isPasswordValid = isValid;
|
|
133
129
|
},
|
|
134
|
-
handleButton() {
|
|
135
|
-
this.$emit("close");
|
|
136
|
-
},
|
|
137
130
|
},
|
|
138
131
|
|
|
139
132
|
metaInfo() {
|
|
@@ -141,12 +134,5 @@ export default {
|
|
|
141
134
|
title: "Reset Password",
|
|
142
135
|
};
|
|
143
136
|
},
|
|
144
|
-
|
|
145
|
-
components: {
|
|
146
|
-
VPasswordValidation: require("./../components/VPasswordValidation.vue")
|
|
147
|
-
.default,
|
|
148
|
-
elInput: require("../../../components/form/basic.vue").default,
|
|
149
|
-
elButton: require("../../../components/basic/Button.vue").default,
|
|
150
|
-
},
|
|
151
137
|
};
|
|
152
138
|
</script>
|
|
@@ -3,14 +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="
|
|
6
|
+
<p class="mt-2">
|
|
7
7
|
Enter the email address associated with your account to
|
|
8
8
|
continue.
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
11
|
<el-input
|
|
12
12
|
v-if="!form.successful"
|
|
13
|
-
class="
|
|
13
|
+
class="mt-3 mb-3"
|
|
14
14
|
v-model="form.email"
|
|
15
15
|
label="Email "
|
|
16
16
|
placeholder="Enter email address"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
Continue
|
|
33
33
|
</elButton>
|
|
34
34
|
|
|
35
|
-
<p class="disclaimer
|
|
35
|
+
<p class="disclaimer mt-3">
|
|
36
36
|
<router-link
|
|
37
37
|
class="color-1 underline"
|
|
38
38
|
:to="{ name: 'auth.login' }"
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
|
|
48
48
|
<script>
|
|
49
49
|
import Form from "form-backend-validation";
|
|
50
|
+
import { guestRequest } from "../js/guest-request";
|
|
50
51
|
|
|
51
52
|
export default {
|
|
52
53
|
components: {
|
|
@@ -66,14 +67,18 @@ export default {
|
|
|
66
67
|
methods: {
|
|
67
68
|
async onSubmit() {
|
|
68
69
|
try {
|
|
69
|
-
await
|
|
70
|
+
await guestRequest({
|
|
71
|
+
form: this.form,
|
|
72
|
+
url: "/forgot-password",
|
|
73
|
+
store: this.$store,
|
|
74
|
+
});
|
|
70
75
|
|
|
71
76
|
this.$router.push({
|
|
72
77
|
name: "auth.success-forgot",
|
|
73
78
|
query: { email: this.form.email },
|
|
74
79
|
});
|
|
75
80
|
} catch (e) {
|
|
76
|
-
|
|
81
|
+
console.log(e);
|
|
77
82
|
}
|
|
78
83
|
},
|
|
79
84
|
},
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<h1 class="h2 h2--small">Sign in</h1>
|
|
3
|
-
<p class="
|
|
3
|
+
<p class="mb-3 mt-2">Enter your password to continue.</p>
|
|
4
4
|
|
|
5
5
|
<form @submit.prevent="submit" class="form" id="memberLoginForm">
|
|
6
6
|
<el-input
|
|
7
|
-
class="
|
|
7
|
+
class="mb-3"
|
|
8
8
|
label="Email"
|
|
9
9
|
placeholder="Enter your email address"
|
|
10
10
|
name="email"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
/>
|
|
16
16
|
|
|
17
17
|
<el-input
|
|
18
|
-
class="
|
|
18
|
+
class="mb-3"
|
|
19
19
|
label="Password"
|
|
20
20
|
placeholder="Enter your password"
|
|
21
21
|
name="password"
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
Continue
|
|
48
48
|
</el-button>
|
|
49
49
|
|
|
50
|
-
<p class="disclaimer
|
|
50
|
+
<p class="disclaimer mt-3">
|
|
51
51
|
Having trouble signing in?
|
|
52
52
|
<router-link
|
|
53
53
|
class="color-1 underline"
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
|
|
66
66
|
<script>
|
|
67
67
|
import Form from "form-backend-validation";
|
|
68
|
+
import { guestRequest } from "../js/guest-request";
|
|
68
69
|
|
|
69
70
|
export default {
|
|
70
71
|
components: {
|
|
@@ -93,30 +94,22 @@ export default {
|
|
|
93
94
|
this.loading = true;
|
|
94
95
|
|
|
95
96
|
try {
|
|
96
|
-
const res = await
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
errors: this.$root.errors,
|
|
102
|
-
});
|
|
103
|
-
} catch (e) {}
|
|
104
|
-
|
|
105
|
-
await this.form.post("/login");
|
|
106
|
-
}
|
|
97
|
+
const res = await guestRequest({
|
|
98
|
+
form: this.form,
|
|
99
|
+
url: "/login",
|
|
100
|
+
store: this.$store,
|
|
101
|
+
});
|
|
107
102
|
|
|
108
103
|
await this.postLogin();
|
|
109
104
|
} catch (e) {
|
|
110
|
-
|
|
105
|
+
console.log(e);
|
|
111
106
|
} finally {
|
|
112
107
|
this.loading = false;
|
|
113
108
|
}
|
|
114
109
|
},
|
|
115
110
|
|
|
116
111
|
async postLogin() {
|
|
117
|
-
const { data: user } = await this.$store.dispatch("getUser"
|
|
118
|
-
errors: this.$root.errors,
|
|
119
|
-
});
|
|
112
|
+
const { data: user } = await this.$store.dispatch("getUser");
|
|
120
113
|
|
|
121
114
|
if (window.dataLayer) {
|
|
122
115
|
window.dataLayer.push({ event: "login", user });
|
|
@@ -16,9 +16,7 @@ export default {
|
|
|
16
16
|
|
|
17
17
|
methods: {
|
|
18
18
|
async postLogin() {
|
|
19
|
-
const { data: user } = await this.$store.dispatch("getUser"
|
|
20
|
-
errors: this.$root.errors,
|
|
21
|
-
});
|
|
19
|
+
const { data: user } = await this.$store.dispatch("getUser");
|
|
22
20
|
|
|
23
21
|
if (window.dataLayer) {
|
|
24
22
|
window.dataLayer.push({ event: "login", user });
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<template v-if="stage === 1">
|
|
3
3
|
<h1 class="h2 h2--small">Sign in</h1>
|
|
4
|
-
<p class="
|
|
4
|
+
<p class="mb-3 mt-2">Enter your email address to continue.</p>
|
|
5
5
|
|
|
6
6
|
<form @submit.prevent="submit" class="form" id="memberLoginForm">
|
|
7
7
|
<el-input
|
|
8
|
-
class="
|
|
8
|
+
class="mb-3"
|
|
9
9
|
label="Email"
|
|
10
10
|
placeholder="Enter your email address"
|
|
11
11
|
name="email"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
Continue
|
|
36
36
|
</el-button>
|
|
37
37
|
|
|
38
|
-
<p class="disclaimer
|
|
38
|
+
<p class="disclaimer mt-3">
|
|
39
39
|
Having trouble signing in?
|
|
40
40
|
<a :href="$store.state.auth.contact" class="underline"
|
|
41
41
|
>Contact us</a
|
|
@@ -45,13 +45,11 @@
|
|
|
45
45
|
</template>
|
|
46
46
|
<template v-else>
|
|
47
47
|
<h1 class="h2 h2--small">Sign in with SSO</h1>
|
|
48
|
-
<p class="
|
|
48
|
+
<p class="mt-2">
|
|
49
49
|
Redirecting you to your organisation’s Single Sign-On (SSO) gateway
|
|
50
|
-
<span class="
|
|
51
|
-
>in {{ countdown }} seconds...</span
|
|
52
|
-
>
|
|
50
|
+
<span class="color-highlight">in {{ countdown }} seconds...</span>
|
|
53
51
|
</p>
|
|
54
|
-
<p class="disclaimer
|
|
52
|
+
<p class="disclaimer mt-3">
|
|
55
53
|
<a :href="redirect_url" class="underline">Go to SSO gateway</a>
|
|
56
54
|
</p>
|
|
57
55
|
</template>
|
|
@@ -59,6 +57,7 @@
|
|
|
59
57
|
|
|
60
58
|
<script>
|
|
61
59
|
import Form from "form-backend-validation";
|
|
60
|
+
import { guestRequest } from "../js/guest-request";
|
|
62
61
|
|
|
63
62
|
export default {
|
|
64
63
|
components: {
|
|
@@ -89,7 +88,12 @@ export default {
|
|
|
89
88
|
this.loading = true;
|
|
90
89
|
|
|
91
90
|
try {
|
|
92
|
-
const res = await
|
|
91
|
+
const res = await guestRequest({
|
|
92
|
+
form: this.form,
|
|
93
|
+
url: "/hydrate/sso/check",
|
|
94
|
+
store: this.$store,
|
|
95
|
+
});
|
|
96
|
+
|
|
93
97
|
if (res["redirect_url"]) {
|
|
94
98
|
this.redirect_url = res["redirect_url"];
|
|
95
99
|
this.setRedirect();
|
|
@@ -100,7 +104,7 @@ export default {
|
|
|
100
104
|
});
|
|
101
105
|
}
|
|
102
106
|
} catch (e) {
|
|
103
|
-
|
|
107
|
+
console.log(e);
|
|
104
108
|
} finally {
|
|
105
109
|
this.loading = false;
|
|
106
110
|
}
|