@fishawack/lab-velocity 1.11.1 → 2.0.0-beta.1
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 +13 -7
- package/_base.scss +1 -1
- package/_defaults.scss +2 -3
- package/_variables.scss +16 -18
- package/components/_alert.scss +2 -2
- 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/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/modules/_AuthModule.scss +32 -29
- package/modules/_AuthVariables.scss +3 -3
- package/modules/_modal.scss +3 -3
- package/package.json +109 -102
- package/vendor.scss +2 -2
- package/AuthModule/components/AuthModal.vue +0 -110
- 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/account-exists.vue +0 -35
- package/AuthModule/routes/change-password.vue +0 -162
- package/AuthModule/routes/container.vue +0 -38
- package/AuthModule/routes/expired-reset.vue +0 -76
- package/AuthModule/routes/expired-verification.vue +0 -100
- package/AuthModule/routes/force-reset.vue +0 -142
- package/AuthModule/routes/forgot.vue +0 -87
- package/AuthModule/routes/login.vue +0 -138
- package/AuthModule/routes/logincallback.vue +0 -46
- package/AuthModule/routes/loginheadless.vue +0 -16
- package/AuthModule/routes/loginsso.vue +0 -127
- package/AuthModule/routes/logout.vue +0 -21
- package/AuthModule/routes/register.vue +0 -156
- package/AuthModule/routes/reset.vue +0 -123
- package/AuthModule/routes/success-forgot.vue +0 -117
- package/AuthModule/routes/success-reset.vue +0 -35
- package/AuthModule/routes/success-verify.vue +0 -29
- package/AuthModule/routes/verify.vue +0 -110
- package/Icon.vue +0 -33
- package/Svg.vue +0 -40
- package/basic/Button.vue +0 -111
- package/basic/link.vue +0 -63
- package/form/Cascader.vue +0 -85
- package/form/Checkbox.vue +0 -39
- package/form/CheckboxGroup.vue +0 -69
- package/form/DatePicker.vue +0 -100
- package/form/InputNumber.vue +0 -90
- package/form/Select.vue +0 -110
- package/form/Switch.vue +0 -63
- package/form/Upload.vue +0 -103
- package/form/Wysiwyg.vue +0 -127
- package/form/Wysiwyg2.vue +0 -278
- package/form/basic.vue +0 -88
- package/form/color.vue +0 -22
- package/form/file.vue +0 -89
- package/form/input.js +0 -79
- package/form/input.vue +0 -85
- package/layout/Alert.vue +0 -38
- package/layout/Footer.vue +0 -35
- package/layout/Header.vue +0 -15
- package/layout/Loader.vue +0 -39
- package/layout/Tooltip.vue +0 -46
- package/layout/pageTitle.vue +0 -18
- package/layout/sideBar.vue +0 -27
- package/navigation/Breadcrumbs.vue +0 -32
- package/navigation/BreadcrumbsItem.vue +0 -19
- package/navigation/Menu.vue +0 -16
- package/navigation/MenuItem.vue +0 -20
- package/navigation/MenuItemGroup.vue +0 -20
- package/navigation/SubMenu.vue +0 -20
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<h1 class="h2 h2--small">Verification link expired</h1>
|
|
3
|
-
|
|
4
|
-
<form class="form" @submit.prevent="submit">
|
|
5
|
-
<p class="AM-mt-2 AM-mb-0 AM-color-highlight">
|
|
6
|
-
<strong class="">Email: {{ form?.email }}</strong>
|
|
7
|
-
</p>
|
|
8
|
-
<p class="AM-mt-0.5">
|
|
9
|
-
This email verification link has expired. Not to worry, we can email you a new one.
|
|
10
|
-
</p>
|
|
11
|
-
|
|
12
|
-
<el-input
|
|
13
|
-
class="AM-mt-2 AM-mb-2.5 hidden"
|
|
14
|
-
v-model="form.email"
|
|
15
|
-
label="Email address"
|
|
16
|
-
name="email"
|
|
17
|
-
:error="form.errors"
|
|
18
|
-
type="email"
|
|
19
|
-
placeholder="Email "
|
|
20
|
-
required
|
|
21
|
-
/>
|
|
22
|
-
|
|
23
|
-
<elButton
|
|
24
|
-
type="primary"
|
|
25
|
-
:disabled="form.processing"
|
|
26
|
-
:loading="form.processing"
|
|
27
|
-
@click="onSubmit"
|
|
28
|
-
>
|
|
29
|
-
Re-send verification link
|
|
30
|
-
</elButton>
|
|
31
|
-
</form>
|
|
32
|
-
|
|
33
|
-
<p class="disclaimer AM-mt-3">
|
|
34
|
-
Having trouble singing in?
|
|
35
|
-
<a :href="contact" class="underline">Contact us</a>
|
|
36
|
-
</p>
|
|
37
|
-
</template>
|
|
38
|
-
|
|
39
|
-
<script>
|
|
40
|
-
import Form from "form-backend-validation";
|
|
41
|
-
|
|
42
|
-
export default {
|
|
43
|
-
components: {
|
|
44
|
-
elInput: require('../../form/basic.vue').default,
|
|
45
|
-
elButton: require('../../basic/Button.vue').default,
|
|
46
|
-
},
|
|
47
|
-
data: () => ({
|
|
48
|
-
form: new Form(
|
|
49
|
-
{
|
|
50
|
-
email: "",
|
|
51
|
-
},
|
|
52
|
-
{ resetOnSuccess: false }
|
|
53
|
-
),
|
|
54
|
-
notification: null,
|
|
55
|
-
contact: process.env.HYDRATE_CONTACT ?? 'mailto:EP@avalerehealth.com',
|
|
56
|
-
}),
|
|
57
|
-
|
|
58
|
-
methods: {
|
|
59
|
-
async onSubmit() {
|
|
60
|
-
try {
|
|
61
|
-
if (this.notification) {
|
|
62
|
-
this.notification.close();
|
|
63
|
-
this.notification = null;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
await this.form.post("/email/verification-notification");
|
|
67
|
-
|
|
68
|
-
this.$notify.success({
|
|
69
|
-
message: "Email has been re-sent",
|
|
70
|
-
duration: 10000,
|
|
71
|
-
class: 'el-notification--success el-notification--right-override'
|
|
72
|
-
});
|
|
73
|
-
} catch (e) {
|
|
74
|
-
if (e.response && e.response.status === 429) {
|
|
75
|
-
this.notification = this.$notify({
|
|
76
|
-
type: "warning",
|
|
77
|
-
message: 'Please allow 10 minutes before re-requesting',
|
|
78
|
-
duration: 0,
|
|
79
|
-
class: 'el-notification--warning el-notification--right-override'
|
|
80
|
-
});
|
|
81
|
-
} else if (e.response && e.response.status === 422) {
|
|
82
|
-
this.notification = this.$notify({
|
|
83
|
-
type: "error",
|
|
84
|
-
message: e.response.data.message,
|
|
85
|
-
duration: 0,
|
|
86
|
-
class: 'el-notification--error el-notification--right-override'
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
this.$root.errors(e);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
|
|
96
|
-
async mounted() {
|
|
97
|
-
this.form.email = this.$route.query.email;
|
|
98
|
-
},
|
|
99
|
-
};
|
|
100
|
-
</script>
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="relative">
|
|
3
|
-
<section id="resetPasswordForm">
|
|
4
|
-
<h1 class="h2 h2--small" v-html="!form.successful ? 'Welcome' : 'Success'" />
|
|
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: {{ $store.state?.auth?.user?.email }}</strong>
|
|
9
|
-
</p>
|
|
10
|
-
<p class="AM-mt-0.5">
|
|
11
|
-
<strong>Hello {{ $store.state?.auth?.user?.name }}</strong>, and welcome to {{ $store.state.auth.platformName }}. To maintain security, anyone signing in with a one-time-password must <strong>create a new password</strong> the first time they access the {{ $store.state.auth.platformName }} portal.
|
|
12
|
-
</p>
|
|
13
|
-
<el-input
|
|
14
|
-
v-model="form.password"
|
|
15
|
-
class="AM-mt-2"
|
|
16
|
-
label="New Password"
|
|
17
|
-
placeholder="Enter new password"
|
|
18
|
-
name="password"
|
|
19
|
-
:error="form.errors"
|
|
20
|
-
type="password"
|
|
21
|
-
autocomplete="new-password"
|
|
22
|
-
required
|
|
23
|
-
/>
|
|
24
|
-
|
|
25
|
-
<VPasswordValidation :password="form.password" @passwordValid="updatePasswordValidity" />
|
|
26
|
-
|
|
27
|
-
<elButton
|
|
28
|
-
class="AM-mt-3"
|
|
29
|
-
type="primary"
|
|
30
|
-
:disabled="form.processing || !isPasswordValid"
|
|
31
|
-
:loading="form.processing"
|
|
32
|
-
@click="onSubmit"
|
|
33
|
-
>
|
|
34
|
-
<span v-text="'Update password'" />
|
|
35
|
-
</elButton>
|
|
36
|
-
</div>
|
|
37
|
-
<div v-else>
|
|
38
|
-
<strong class="">Email: {{ $store.state.auth?.user?.email }}</strong>
|
|
39
|
-
<p v-text="`Your password has been updated.`" />
|
|
40
|
-
<elButton
|
|
41
|
-
type="primary"
|
|
42
|
-
@click="handleButton"
|
|
43
|
-
>
|
|
44
|
-
Continue
|
|
45
|
-
</elButton>
|
|
46
|
-
</div>
|
|
47
|
-
</form>
|
|
48
|
-
</section>
|
|
49
|
-
</div>
|
|
50
|
-
</template>
|
|
51
|
-
|
|
52
|
-
<script>
|
|
53
|
-
import Form from "form-backend-validation";
|
|
54
|
-
|
|
55
|
-
export default {
|
|
56
|
-
data() {
|
|
57
|
-
return {
|
|
58
|
-
form: new Form(
|
|
59
|
-
{
|
|
60
|
-
email: this.$store.state.auth.user?.email,
|
|
61
|
-
password: '',
|
|
62
|
-
otp: true,
|
|
63
|
-
},
|
|
64
|
-
{ resetOnSuccess: false }
|
|
65
|
-
),
|
|
66
|
-
isPasswordValid: false,
|
|
67
|
-
};
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
mounted() {
|
|
71
|
-
|
|
72
|
-
this.$store.dispatch("getUser", {
|
|
73
|
-
errors: this.$root.errors,
|
|
74
|
-
});
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
methods: {
|
|
78
|
-
async onSubmit() {
|
|
79
|
-
this.loading = true;
|
|
80
|
-
|
|
81
|
-
try {
|
|
82
|
-
await this.form.put('/user/password');
|
|
83
|
-
await this.login();
|
|
84
|
-
} catch (e) {
|
|
85
|
-
this.$root.errors(e);
|
|
86
|
-
} finally {
|
|
87
|
-
this.loading = false;
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
async login() {
|
|
91
|
-
this.loading = true;
|
|
92
|
-
|
|
93
|
-
try {
|
|
94
|
-
const res = await this.form.post("/login");
|
|
95
|
-
|
|
96
|
-
if(res['logged-in']){
|
|
97
|
-
try{
|
|
98
|
-
await this.$store.dispatch("logout", {
|
|
99
|
-
errors: this.$root.errors,
|
|
100
|
-
});
|
|
101
|
-
} catch(e){}
|
|
102
|
-
|
|
103
|
-
await this.form.post("/login");
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
} catch (e) {
|
|
107
|
-
this.$root.errors(e);
|
|
108
|
-
} finally {
|
|
109
|
-
this.loading = false;
|
|
110
|
-
await this.postLogin();
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
|
|
114
|
-
async postLogin() {
|
|
115
|
-
this.$store.commit("setAuth", true);
|
|
116
|
-
|
|
117
|
-
const { data: user } = await this.$store.dispatch("getUser", {
|
|
118
|
-
errors: this.$root.errors,
|
|
119
|
-
});
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
updatePasswordValidity(isValid) {
|
|
123
|
-
this.isPasswordValid = isValid;
|
|
124
|
-
},
|
|
125
|
-
handleButton() {
|
|
126
|
-
this.$emit('close');
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
|
|
130
|
-
metaInfo() {
|
|
131
|
-
return {
|
|
132
|
-
title: "Reset Password",
|
|
133
|
-
};
|
|
134
|
-
},
|
|
135
|
-
|
|
136
|
-
components: {
|
|
137
|
-
VPasswordValidation: require("./../components/VPasswordValidation.vue").default,
|
|
138
|
-
elInput: require('../../form/basic.vue').default,
|
|
139
|
-
elButton: require('../../basic/Button.vue').default,
|
|
140
|
-
},
|
|
141
|
-
};
|
|
142
|
-
</script>
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="relative">
|
|
3
|
-
<section id="forgotPasswordForm">
|
|
4
|
-
<h1 class="h2 h2--small">Reset password</h1>
|
|
5
|
-
<form class="form" @submit.prevent="submit">
|
|
6
|
-
<p class="AM-mt-2">
|
|
7
|
-
Enter the email address associated with your account to continue.
|
|
8
|
-
</p>
|
|
9
|
-
|
|
10
|
-
<el-input
|
|
11
|
-
v-if="!form.successful"
|
|
12
|
-
class="AM-mt-3 AM-mb-3"
|
|
13
|
-
v-model="form.email"
|
|
14
|
-
label="Email "
|
|
15
|
-
placeholder="Enter email address"
|
|
16
|
-
name="email"
|
|
17
|
-
:error="form.errors"
|
|
18
|
-
type="email"
|
|
19
|
-
required
|
|
20
|
-
/>
|
|
21
|
-
|
|
22
|
-
<elButton
|
|
23
|
-
type="primary"
|
|
24
|
-
:disabled="form.processing || !form.email || form.email?.length < 5"
|
|
25
|
-
:loading="form.processing"
|
|
26
|
-
@click="onSubmit"
|
|
27
|
-
>
|
|
28
|
-
Continue
|
|
29
|
-
</elButton>
|
|
30
|
-
|
|
31
|
-
<p class="disclaimer AM-mt-3">
|
|
32
|
-
<router-link
|
|
33
|
-
class="color-1 underline"
|
|
34
|
-
:to="{ name: `${$store.state.auth.authBase}.login` }"
|
|
35
|
-
>
|
|
36
|
-
Back to Sign in
|
|
37
|
-
</router-link>
|
|
38
|
-
</p>
|
|
39
|
-
</form>
|
|
40
|
-
</section>
|
|
41
|
-
</div>
|
|
42
|
-
</template>
|
|
43
|
-
|
|
44
|
-
<script>
|
|
45
|
-
import Form from "form-backend-validation";
|
|
46
|
-
|
|
47
|
-
export default {
|
|
48
|
-
components: {
|
|
49
|
-
elInput: require('../../form/basic.vue').default,
|
|
50
|
-
elButton: require('../../basic/Button.vue').default,
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
data: () => ({
|
|
54
|
-
form: new Form(
|
|
55
|
-
{
|
|
56
|
-
email: "",
|
|
57
|
-
},
|
|
58
|
-
{ resetOnSuccess: false }
|
|
59
|
-
),
|
|
60
|
-
}),
|
|
61
|
-
|
|
62
|
-
methods: {
|
|
63
|
-
async onSubmit() {
|
|
64
|
-
try {
|
|
65
|
-
await this.form.post("/forgot-password");
|
|
66
|
-
|
|
67
|
-
this.$router.push({
|
|
68
|
-
name: `${this.$store.state.auth.authBase}.success-forgot`,
|
|
69
|
-
query: { email: this.form.email },
|
|
70
|
-
});
|
|
71
|
-
} catch (e) {
|
|
72
|
-
this.$root.errors(e);
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
mounted() {
|
|
78
|
-
this.form.email = this.$route.query.email;
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
metaInfo() {
|
|
82
|
-
return {
|
|
83
|
-
title: "Forgot Password",
|
|
84
|
-
};
|
|
85
|
-
},
|
|
86
|
-
};
|
|
87
|
-
</script>
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<h1 class="h2 h2--small">Sign in</h1>
|
|
3
|
-
<p class="AM-mb-3 AM-mt-2">Enter your password to continue.</p>
|
|
4
|
-
|
|
5
|
-
<form @submit.prevent="submit" class="form" id="memberLoginForm">
|
|
6
|
-
<el-input
|
|
7
|
-
class="AM-mb-3"
|
|
8
|
-
label="Email"
|
|
9
|
-
placeholder="Enter your email address"
|
|
10
|
-
name="email"
|
|
11
|
-
type="email"
|
|
12
|
-
required
|
|
13
|
-
v-model="form.email"
|
|
14
|
-
:error="form.errors"
|
|
15
|
-
/>
|
|
16
|
-
|
|
17
|
-
<el-input
|
|
18
|
-
class="AM-mb-3"
|
|
19
|
-
label="Password"
|
|
20
|
-
placeholder="Enter your password"
|
|
21
|
-
name="password"
|
|
22
|
-
type="password"
|
|
23
|
-
required
|
|
24
|
-
v-model="form.password"
|
|
25
|
-
:error="form.errors"
|
|
26
|
-
/>
|
|
27
|
-
|
|
28
|
-
<!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
|
|
29
|
-
<div style="position: absolute; left: -5000px" aria-hidden="true">
|
|
30
|
-
<input
|
|
31
|
-
ref="honeypot"
|
|
32
|
-
type="text"
|
|
33
|
-
name="b_0e1715593ad9366bc5d3ad8be_7aca058f12"
|
|
34
|
-
tabindex="-1"
|
|
35
|
-
value=""
|
|
36
|
-
/>
|
|
37
|
-
</div>
|
|
38
|
-
|
|
39
|
-
<el-button
|
|
40
|
-
type="primary"
|
|
41
|
-
:disabled="loading || (form.email?.length < 5 || form.password?.length < 8 )"
|
|
42
|
-
@click="onSubmit"
|
|
43
|
-
>
|
|
44
|
-
Continue
|
|
45
|
-
</el-button>
|
|
46
|
-
|
|
47
|
-
<p class="disclaimer AM-mt-3">
|
|
48
|
-
Having trouble signing in?
|
|
49
|
-
<router-link class="color-1 underline" :to="{ name: `${$store.state.auth.authBase}.forgot` }">
|
|
50
|
-
Reset password
|
|
51
|
-
</router-link>
|
|
52
|
-
or
|
|
53
|
-
<a :href="contact" class="underline">Contact us</a>
|
|
54
|
-
</p>
|
|
55
|
-
</form>
|
|
56
|
-
</template>
|
|
57
|
-
|
|
58
|
-
<script>
|
|
59
|
-
import Form from "form-backend-validation";
|
|
60
|
-
|
|
61
|
-
export default {
|
|
62
|
-
components: {
|
|
63
|
-
elInput: require('../../form/basic.vue').default,
|
|
64
|
-
elButton: require('../../basic/Button.vue').default,
|
|
65
|
-
},
|
|
66
|
-
data() {
|
|
67
|
-
return {
|
|
68
|
-
form: new Form(
|
|
69
|
-
{
|
|
70
|
-
email: this.$route.query.email ?? '',
|
|
71
|
-
password: '',
|
|
72
|
-
device_name: "Mobile device",
|
|
73
|
-
remember: true,
|
|
74
|
-
},
|
|
75
|
-
{ resetOnSuccess: false }
|
|
76
|
-
),
|
|
77
|
-
loading: false,
|
|
78
|
-
contact: process.env.HYDRATE_CONTACT ?? 'mailto:EP@avalerehealth.com',
|
|
79
|
-
};
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
methods: {
|
|
83
|
-
async onSubmit() {
|
|
84
|
-
if (this.loading) return;
|
|
85
|
-
|
|
86
|
-
this.loading = true;
|
|
87
|
-
|
|
88
|
-
try {
|
|
89
|
-
const res = await this.form.post("/login");
|
|
90
|
-
|
|
91
|
-
if (res["logged-in"]) {
|
|
92
|
-
try {
|
|
93
|
-
await this.$store.dispatch("logout", {
|
|
94
|
-
errors: this.$root.errors,
|
|
95
|
-
});
|
|
96
|
-
} catch (e) {}
|
|
97
|
-
|
|
98
|
-
await this.form.post("/login");
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
await this.postLogin();
|
|
102
|
-
} catch (e) {
|
|
103
|
-
this.$root.errors(e);
|
|
104
|
-
} finally {
|
|
105
|
-
this.loading = false;
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
|
|
109
|
-
async postLogin() {
|
|
110
|
-
this.$store.commit("setAuth", true);
|
|
111
|
-
|
|
112
|
-
const { data: user } = await this.$store.dispatch("getUser", {
|
|
113
|
-
errors: this.$root.errors,
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
if (window.dataLayer) {
|
|
117
|
-
window.dataLayer.push({ event: "login", user });
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
if (this.$store.state.auth.intended) {
|
|
121
|
-
this.$router.push(this.$store.state.auth.intended);
|
|
122
|
-
} else {
|
|
123
|
-
this.$router.push({ name: this.$store.state.auth.postLoginRedirect });
|
|
124
|
-
// this.$router.push({ name: "members" });
|
|
125
|
-
// Problem here
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
this.$store.commit("setIntended", null);
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
|
|
132
|
-
mounted() {
|
|
133
|
-
if (this.$route.query.authenticated) {
|
|
134
|
-
this.postLogin();
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
};
|
|
138
|
-
</script>
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<!-- Set Spinner -->
|
|
3
|
-
<div class="mx-auto">
|
|
4
|
-
<VLoader class="mx-auto" />
|
|
5
|
-
</div>
|
|
6
|
-
</template>
|
|
7
|
-
|
|
8
|
-
<script>
|
|
9
|
-
|
|
10
|
-
export default {
|
|
11
|
-
components: {
|
|
12
|
-
VLoader: require("../../layout/Loader.vue").default
|
|
13
|
-
},
|
|
14
|
-
data() {
|
|
15
|
-
return {
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
methods: {
|
|
21
|
-
async postLogin() {
|
|
22
|
-
this.$store.commit("setAuth", true);
|
|
23
|
-
|
|
24
|
-
const { data: user } = await this.$store.dispatch("getUser", {
|
|
25
|
-
errors: this.$root.errors,
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
if (window.dataLayer) {
|
|
29
|
-
window.dataLayer.push({ event: "login", user });
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
if (this.$store.state.auth.intended) {
|
|
33
|
-
this.$router.push(this.$store.state.auth.intended);
|
|
34
|
-
} else {
|
|
35
|
-
this.$router.push({ name: this.$store.state.auth.redirect });
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
this.$store.commit("setIntended", null);
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
mounted() {
|
|
43
|
-
this.postLogin();
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
</script>
|
|
@@ -1,127 +0,0 @@
|
|
|
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
|
-
type="primary"
|
|
31
|
-
:disabled="loading || (!isValidEmail(form.email))"
|
|
32
|
-
@click="onSubmit"
|
|
33
|
-
>
|
|
34
|
-
Continue
|
|
35
|
-
</el-button>
|
|
36
|
-
|
|
37
|
-
<p class="disclaimer AM-mt-3">
|
|
38
|
-
Having trouble signing in?
|
|
39
|
-
<a :href="contact" class="underline">Contact us</a>
|
|
40
|
-
</p>
|
|
41
|
-
</form>
|
|
42
|
-
</template>
|
|
43
|
-
<template v-else>
|
|
44
|
-
<h1 class="h2 h2--small">Sign in with SSO</h1>
|
|
45
|
-
<p class="AM-mt-2">Redirecting you to your organisation’s Single Sign-On (SSO) gateway <span class="AM-color-highlight">in {{ countdown }} seconds...</span></p>
|
|
46
|
-
<p class="disclaimer AM-mt-3">
|
|
47
|
-
<a :href="redirect_url" class="underline">Go to SSO gateway</a>
|
|
48
|
-
</p>
|
|
49
|
-
</template>
|
|
50
|
-
</template>
|
|
51
|
-
|
|
52
|
-
<script>
|
|
53
|
-
import Form from "form-backend-validation";
|
|
54
|
-
|
|
55
|
-
export default {
|
|
56
|
-
components: {
|
|
57
|
-
elInput: require('../../form/basic.vue').default,
|
|
58
|
-
elButton: require('../../basic/Button.vue').default,
|
|
59
|
-
},
|
|
60
|
-
data() {
|
|
61
|
-
return {
|
|
62
|
-
form: new Form(
|
|
63
|
-
{
|
|
64
|
-
email: '',
|
|
65
|
-
device_name: "Mobile device",
|
|
66
|
-
remember: true,
|
|
67
|
-
},
|
|
68
|
-
{ resetOnSuccess: false }
|
|
69
|
-
),
|
|
70
|
-
countdown: 3,
|
|
71
|
-
loading: false,
|
|
72
|
-
redirect_url: null,
|
|
73
|
-
stage: 1,
|
|
74
|
-
contact: process.env.HYDRATE_CONTACT ?? 'mailto:EP@avalerehealth.com',
|
|
75
|
-
};
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
methods: {
|
|
79
|
-
async onSubmit() {
|
|
80
|
-
if (this.loading) return;
|
|
81
|
-
|
|
82
|
-
this.loading = true;
|
|
83
|
-
|
|
84
|
-
try {
|
|
85
|
-
const res = await this.form.post(`/sso`);
|
|
86
|
-
if(res['redirect_url']) {
|
|
87
|
-
this.redirect_url = res['redirect_url'];
|
|
88
|
-
this.setRedirect();
|
|
89
|
-
} else {
|
|
90
|
-
this.$router.push({name: `${this.$store.state.auth.authBase}.logincreds`,query: {email: this.form.email}});
|
|
91
|
-
}
|
|
92
|
-
} catch (e) {
|
|
93
|
-
this.$root.errors(e);
|
|
94
|
-
} finally {
|
|
95
|
-
this.loading = false;
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
setRedirect(){
|
|
99
|
-
this.stage = 2;
|
|
100
|
-
let vue = this;
|
|
101
|
-
setTimeout(function() {
|
|
102
|
-
vue.setCountdown();
|
|
103
|
-
},1000);
|
|
104
|
-
},
|
|
105
|
-
setCountdown() {
|
|
106
|
-
this.countdown--;
|
|
107
|
-
if(this.countdown === 0) {
|
|
108
|
-
window.location = this.redirect_url;
|
|
109
|
-
} else {
|
|
110
|
-
let vue = this;
|
|
111
|
-
setTimeout(function() {
|
|
112
|
-
vue.setCountdown();
|
|
113
|
-
},1000);
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
isValidEmail(email) {
|
|
117
|
-
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
118
|
-
return emailRegex.test(email);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
},
|
|
122
|
-
|
|
123
|
-
mounted() {
|
|
124
|
-
|
|
125
|
-
},
|
|
126
|
-
};
|
|
127
|
-
</script>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
metaInfo() {
|
|
4
|
-
return {
|
|
5
|
-
title: "Logout",
|
|
6
|
-
};
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
mounted() {
|
|
10
|
-
try {
|
|
11
|
-
this.$store.dispatch("logout", {
|
|
12
|
-
errors: this.$root.errors,
|
|
13
|
-
});
|
|
14
|
-
} catch(e){
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
this.$router.push({ name: `${this.$store.state.auth.authBase}.login` });
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
</script>
|