@fishawack/lab-velocity 2.0.0-beta.2 → 2.0.0-beta.21
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 +439 -37
- package/_Build/vue/components/basic/Button.vue +1 -1
- package/_Build/vue/components/form/Select.vue +2 -2
- package/_Build/vue/components/form/Spinner.vue +5 -0
- package/_Build/vue/components/layout/Alert.vue +5 -5
- package/_Build/vue/{modules/AuthModule/components/VBreadcrumbs.vue → components/layout/Breadcrumbs.vue} +5 -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} +13 -7
- package/_Build/vue/{modules/AuthModule/components → components/layout}/FormRole.vue +9 -7
- package/_Build/vue/components/layout/Layout.vue +76 -0
- package/_Build/vue/components/layout/Navigation.vue +77 -0
- package/_Build/vue/{modules/AuthModule/components/VPageHeader.vue → components/layout/PageHeader.vue} +7 -2
- package/_Build/vue/components/layout/SideBar.vue +26 -0
- package/_Build/vue/{modules/AuthModule/components/VTable.vue → components/layout/Table.vue} +19 -17
- package/_Build/vue/{modules/AuthModule/components/VTableSorter.vue → components/layout/TableSorter.vue} +35 -25
- package/_Build/vue/components/layout/pageTitle.vue +1 -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 +19 -0
- package/_Build/vue/modules/AuthModule/js/router.js +21 -89
- package/_Build/vue/modules/AuthModule/js/store.js +15 -6
- package/_Build/vue/modules/AuthModule/{adminRoutes/PCompanies/Children/partials → routes/PCompanies}/form.vue +32 -17
- package/_Build/vue/modules/AuthModule/routes/PCompanies/resource.js +168 -0
- package/_Build/vue/modules/AuthModule/{adminRoutes/PUsers/Children/partials → routes/PUsers}/form.vue +30 -18
- package/_Build/vue/modules/AuthModule/routes/PUsers/resource.js +202 -0
- package/_Build/vue/modules/AuthModule/routes/account-exists.vue +3 -3
- package/_Build/vue/modules/AuthModule/routes/change-password.vue +23 -24
- package/_Build/vue/modules/AuthModule/routes/container.vue +2 -11
- package/_Build/vue/modules/AuthModule/routes/expired-reset.vue +6 -6
- package/_Build/vue/modules/AuthModule/routes/expired-verification.vue +11 -10
- package/_Build/vue/modules/AuthModule/routes/force-reset.vue +24 -28
- package/_Build/vue/modules/AuthModule/routes/forgot.vue +6 -6
- package/_Build/vue/modules/AuthModule/routes/login.vue +9 -13
- package/_Build/vue/modules/AuthModule/routes/logincallback.vue +2 -4
- package/_Build/vue/modules/AuthModule/routes/loginsso.vue +9 -11
- package/_Build/vue/modules/AuthModule/routes/logout.vue +1 -3
- package/_Build/vue/modules/AuthModule/routes/logoutheadless.vue +1 -3
- package/_Build/vue/modules/AuthModule/routes/register.vue +19 -21
- package/_Build/vue/modules/AuthModule/routes/reset.vue +14 -13
- package/_Build/vue/modules/AuthModule/routes/success-forgot.vue +10 -9
- package/_Build/vue/modules/AuthModule/routes/success-reset.vue +3 -3
- package/_Build/vue/modules/AuthModule/routes/success-verify.vue +2 -4
- package/_Build/vue/modules/AuthModule/routes/verify.vue +13 -16
- package/_Build/vue/modules/resource/Children/create.vue +76 -0
- package/_Build/vue/modules/resource/Children/edit.vue +110 -0
- package/_Build/vue/modules/resource/Children/index.vue +47 -0
- package/_Build/vue/modules/resource/Children/partials/form.vue +57 -0
- package/_Build/vue/modules/resource/Children/show.vue +97 -0
- package/_Build/vue/modules/resource/index.js +280 -0
- package/_Build/vue/modules/resource/parent.vue +41 -0
- package/_base.scss +0 -1
- package/_defaults.scss +2 -13
- package/_variables.scss +9 -4
- package/components/_alert.scss +5 -0
- package/components/_auth.scss +163 -0
- package/components/_basic.scss +55 -0
- package/components/_breadcrumbs.scss +39 -0
- package/components/_button.scss +304 -0
- package/components/_cascader.scss +12 -0
- package/components/_checkbox.scss +41 -0
- package/components/_chip.scss +24 -0
- package/components/_collapse.scss +24 -0
- package/components/_datepicker.scss +52 -0
- package/components/_descriptions.scss +2 -0
- package/components/_footer.scss +47 -0
- package/components/_form.scss +24 -0
- package/components/_header.scss +30 -0
- package/components/_icon.scss +25 -0
- package/components/_inputNumber.scss +22 -0
- package/components/_layout.scss +56 -0
- package/components/_link.scss +44 -0
- package/components/_loader.scss +43 -0
- package/components/_menu.scss +112 -0
- package/components/_modal.scss +24 -0
- package/components/_pageTitle.scss +8 -0
- package/components/_permissionLegend.scss +18 -0
- package/components/_select.scss +29 -0
- package/components/_sidebar.scss +41 -0
- package/components/_switch.scss +14 -0
- package/components/_table.scss +20 -0
- package/components/_tooltip.scss +4 -0
- package/components/_typography.scss +162 -0
- package/components/_upload.scss +15 -0
- package/components/_wysiwyg.scss +7 -0
- package/components/_wysiwyg2.scss +142 -0
- package/index.js +7 -1
- package/package.json +4 -2
- package/vendor.scss +0 -1
- package/_Build/vue/components/layout/sideBar.vue +0 -25
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/Upload/upload.vue +0 -251
- 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/show.vue +0 -262
- 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/show.vue +0 -120
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/parent.vue +0 -36
- /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
|
@@ -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"
|
|
@@ -68,8 +68,8 @@ import Form from "form-backend-validation";
|
|
|
68
68
|
|
|
69
69
|
export default {
|
|
70
70
|
components: {
|
|
71
|
-
elInput: require("
|
|
72
|
-
elButton: require("
|
|
71
|
+
elInput: require("../../../components/form/basic.vue").default,
|
|
72
|
+
elButton: require("../../../components/basic/Button.vue").default,
|
|
73
73
|
},
|
|
74
74
|
data() {
|
|
75
75
|
return {
|
|
@@ -97,9 +97,7 @@ export default {
|
|
|
97
97
|
|
|
98
98
|
if (res["logged-in"]) {
|
|
99
99
|
try {
|
|
100
|
-
await this.$store.dispatch("logout"
|
|
101
|
-
errors: this.$root.errors,
|
|
102
|
-
});
|
|
100
|
+
await this.$store.dispatch("logout");
|
|
103
101
|
} catch (e) {}
|
|
104
102
|
|
|
105
103
|
await this.form.post("/login");
|
|
@@ -107,16 +105,14 @@ export default {
|
|
|
107
105
|
|
|
108
106
|
await this.postLogin();
|
|
109
107
|
} catch (e) {
|
|
110
|
-
|
|
108
|
+
console.log(e);
|
|
111
109
|
} finally {
|
|
112
110
|
this.loading = false;
|
|
113
111
|
}
|
|
114
112
|
},
|
|
115
113
|
|
|
116
114
|
async postLogin() {
|
|
117
|
-
const { data: user } = await this.$store.dispatch("getUser"
|
|
118
|
-
errors: this.$root.errors,
|
|
119
|
-
});
|
|
115
|
+
const { data: user } = await this.$store.dispatch("getUser");
|
|
120
116
|
|
|
121
117
|
if (window.dataLayer) {
|
|
122
118
|
window.dataLayer.push({ event: "login", user });
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<script>
|
|
9
9
|
export default {
|
|
10
10
|
components: {
|
|
11
|
-
VLoader: require("
|
|
11
|
+
VLoader: require("../../../components/layout/Loader.vue").default,
|
|
12
12
|
},
|
|
13
13
|
data() {
|
|
14
14
|
return {};
|
|
@@ -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>
|
|
@@ -62,8 +60,8 @@ import Form from "form-backend-validation";
|
|
|
62
60
|
|
|
63
61
|
export default {
|
|
64
62
|
components: {
|
|
65
|
-
elInput: require("
|
|
66
|
-
elButton: require("
|
|
63
|
+
elInput: require("../../../components/form/basic.vue").default,
|
|
64
|
+
elButton: require("../../../components/basic/Button.vue").default,
|
|
67
65
|
},
|
|
68
66
|
data() {
|
|
69
67
|
return {
|
|
@@ -100,7 +98,7 @@ export default {
|
|
|
100
98
|
});
|
|
101
99
|
}
|
|
102
100
|
} catch (e) {
|
|
103
|
-
|
|
101
|
+
console.log(e);
|
|
104
102
|
} finally {
|
|
105
103
|
this.loading = false;
|
|
106
104
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<h1 class="h2 h2--small">Register</h1>
|
|
3
|
-
<p class="
|
|
3
|
+
<p class="mb-3 mt-2">
|
|
4
4
|
Please enter your personal details to complete your registration.
|
|
5
5
|
</p>
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
id="memberLoginForm"
|
|
11
11
|
>
|
|
12
12
|
<el-input
|
|
13
|
-
class="
|
|
13
|
+
class="mb-2"
|
|
14
14
|
label="Full name"
|
|
15
15
|
placeholder="Enter your full name"
|
|
16
16
|
name="name"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
/>
|
|
21
21
|
|
|
22
22
|
<el-input
|
|
23
|
-
class="
|
|
23
|
+
class="mb-2"
|
|
24
24
|
label="Email"
|
|
25
25
|
placeholder="Enter your email address"
|
|
26
26
|
name="email"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
/>
|
|
32
32
|
|
|
33
33
|
<el-input
|
|
34
|
-
class="
|
|
34
|
+
class="mb-2"
|
|
35
35
|
label="Password"
|
|
36
36
|
name="password"
|
|
37
37
|
placeholder="Create a unique password"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
:error="form.errors"
|
|
43
43
|
/>
|
|
44
44
|
|
|
45
|
-
<
|
|
45
|
+
<VelPasswordValidation
|
|
46
46
|
:password="form.password"
|
|
47
47
|
@passwordValid="updatePasswordValidity"
|
|
48
48
|
/>
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
Register
|
|
73
73
|
</elButton>
|
|
74
74
|
|
|
75
|
-
<p class="disclaimer
|
|
75
|
+
<p class="disclaimer mt-3">
|
|
76
76
|
Having trouble registering?
|
|
77
77
|
<a :href="$store.state.auth.contact" class="underline"
|
|
78
78
|
>Contact us</a
|
|
@@ -83,8 +83,17 @@
|
|
|
83
83
|
|
|
84
84
|
<script>
|
|
85
85
|
import Form from "form-backend-validation";
|
|
86
|
+
import { ElNotification } from "element-plus";
|
|
86
87
|
|
|
87
88
|
export default {
|
|
89
|
+
components: {
|
|
90
|
+
VelPasswordValidation:
|
|
91
|
+
require("../../../components/layout/PasswordValidation.vue")
|
|
92
|
+
.default,
|
|
93
|
+
elInput: require("../../../components/form/basic.vue").default,
|
|
94
|
+
elButton: require("../../../components/basic/Button.vue").default,
|
|
95
|
+
},
|
|
96
|
+
|
|
88
97
|
data() {
|
|
89
98
|
return {
|
|
90
99
|
form: new Form(
|
|
@@ -111,9 +120,7 @@ export default {
|
|
|
111
120
|
|
|
112
121
|
if (res["logged-in"]) {
|
|
113
122
|
try {
|
|
114
|
-
await this.$store.dispatch("logout"
|
|
115
|
-
errors: this.$root.errors,
|
|
116
|
-
});
|
|
123
|
+
await this.$store.dispatch("logout");
|
|
117
124
|
} catch (e) {}
|
|
118
125
|
|
|
119
126
|
await this.form.post("/register");
|
|
@@ -124,7 +131,7 @@ export default {
|
|
|
124
131
|
name: `auth.login`,
|
|
125
132
|
query: { company: res["company"] },
|
|
126
133
|
});
|
|
127
|
-
|
|
134
|
+
ElNotification.error({
|
|
128
135
|
title: "Domain is SSO enabled",
|
|
129
136
|
message: "Sign in with your company email address",
|
|
130
137
|
duration: 10000,
|
|
@@ -133,16 +140,14 @@ export default {
|
|
|
133
140
|
await this.postLogin();
|
|
134
141
|
}
|
|
135
142
|
} catch (e) {
|
|
136
|
-
|
|
143
|
+
console.log(e);
|
|
137
144
|
} finally {
|
|
138
145
|
this.loading = false;
|
|
139
146
|
}
|
|
140
147
|
},
|
|
141
148
|
|
|
142
149
|
async postLogin() {
|
|
143
|
-
const { data: user } = await this.$store.dispatch("getUser"
|
|
144
|
-
errors: this.$root.errors,
|
|
145
|
-
});
|
|
150
|
+
const { data: user } = await this.$store.dispatch("getUser");
|
|
146
151
|
|
|
147
152
|
if (window.dataLayer) {
|
|
148
153
|
window.dataLayer.push({ event: "login", user });
|
|
@@ -163,12 +168,5 @@ export default {
|
|
|
163
168
|
this.isPasswordValid = isValid;
|
|
164
169
|
},
|
|
165
170
|
},
|
|
166
|
-
|
|
167
|
-
components: {
|
|
168
|
-
VPasswordValidation: require("./../components/VPasswordValidation.vue")
|
|
169
|
-
.default,
|
|
170
|
-
elInput: require("../../form/basic.vue").default,
|
|
171
|
-
elButton: require("../../basic/Button.vue").default,
|
|
172
|
-
},
|
|
173
171
|
};
|
|
174
172
|
</script>
|
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
<h1 class="h2 h2--small">Reset password</h1>
|
|
5
5
|
<form class="form" @submit.prevent="submit">
|
|
6
6
|
<div v-if="!form.successful">
|
|
7
|
-
<p class="
|
|
7
|
+
<p class="mt-2 mb-0 color-highlight">
|
|
8
8
|
<strong class="">Email: {{ form?.email }}</strong>
|
|
9
9
|
</p>
|
|
10
|
-
<p class="
|
|
10
|
+
<p class="mt-0.5">
|
|
11
11
|
Please create a new password. Passwords you have used
|
|
12
12
|
previously aren’t permitted.
|
|
13
13
|
</p>
|
|
14
14
|
<el-input
|
|
15
15
|
v-model="form.password"
|
|
16
|
-
class="
|
|
16
|
+
class="mt-3"
|
|
17
17
|
label="New Password"
|
|
18
18
|
placeholder="Enter new password"
|
|
19
19
|
name="password"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
required
|
|
24
24
|
/>
|
|
25
25
|
|
|
26
|
-
<
|
|
26
|
+
<VelPasswordValidation
|
|
27
27
|
:password="form.password"
|
|
28
28
|
@passwordValid="updatePasswordValidity"
|
|
29
29
|
/>
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
<h4 class="mt" v-text="`Success!`" />
|
|
52
52
|
<p v-text="`Your password has been reset.`" />
|
|
53
53
|
</div>
|
|
54
|
-
<p class="disclaimer
|
|
54
|
+
<p class="disclaimer mt-3">
|
|
55
55
|
<router-link
|
|
56
56
|
class="color-1 underline"
|
|
57
57
|
:to="{ name: 'auth.login' }"
|
|
@@ -68,6 +68,14 @@
|
|
|
68
68
|
import Form from "form-backend-validation";
|
|
69
69
|
|
|
70
70
|
export default {
|
|
71
|
+
components: {
|
|
72
|
+
VelPasswordValidation:
|
|
73
|
+
require("../../../components/layout/PasswordValidation.vue")
|
|
74
|
+
.default,
|
|
75
|
+
elInput: require("../../../components/form/basic.vue").default,
|
|
76
|
+
elButton: require("../../../components/basic/Button.vue").default,
|
|
77
|
+
},
|
|
78
|
+
|
|
71
79
|
data() {
|
|
72
80
|
return {
|
|
73
81
|
form: new Form(
|
|
@@ -108,7 +116,7 @@ export default {
|
|
|
108
116
|
query: { email: this.form.email },
|
|
109
117
|
});
|
|
110
118
|
}
|
|
111
|
-
|
|
119
|
+
console.log(e);
|
|
112
120
|
}
|
|
113
121
|
},
|
|
114
122
|
|
|
@@ -122,12 +130,5 @@ export default {
|
|
|
122
130
|
title: "Reset Password",
|
|
123
131
|
};
|
|
124
132
|
},
|
|
125
|
-
|
|
126
|
-
components: {
|
|
127
|
-
VPasswordValidation: require("./../components/VPasswordValidation.vue")
|
|
128
|
-
.default,
|
|
129
|
-
elInput: require("../../form/basic.vue").default,
|
|
130
|
-
elButton: require("../../basic/Button.vue").default,
|
|
131
|
-
},
|
|
132
133
|
};
|
|
133
134
|
</script>
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
<h1 class="h2 h2--small">Reset password</h1>
|
|
5
5
|
|
|
6
6
|
<form class="form" @submit.prevent="submit">
|
|
7
|
-
<p class="
|
|
7
|
+
<p class="mt-2 mb-0 color-highlight">
|
|
8
8
|
<strong class="">Email: {{ form?.email }}</strong>
|
|
9
9
|
</p>
|
|
10
|
-
<p class="
|
|
10
|
+
<p class="mt">
|
|
11
11
|
If this account exists we have sent an email containing
|
|
12
12
|
instructions for resetting the password.
|
|
13
13
|
<strong>Please check your inbox.</strong>
|
|
14
14
|
</p>
|
|
15
|
-
<p class="
|
|
15
|
+
<p class="mt-3 mb">
|
|
16
16
|
Haven’t received the email after 10 minutes?
|
|
17
17
|
</p>
|
|
18
18
|
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
Re-send instructions
|
|
38
38
|
</elButton>
|
|
39
39
|
|
|
40
|
-
<p class="disclaimer
|
|
40
|
+
<p class="disclaimer mt-3">
|
|
41
41
|
<router-link
|
|
42
42
|
class="color-1 underline"
|
|
43
43
|
:to="{ name: `auth.login` }"
|
|
@@ -52,11 +52,12 @@
|
|
|
52
52
|
|
|
53
53
|
<script>
|
|
54
54
|
import Form from "form-backend-validation";
|
|
55
|
+
import { ElNotification } from "element-plus";
|
|
55
56
|
|
|
56
57
|
export default {
|
|
57
58
|
components: {
|
|
58
|
-
elInput: require("
|
|
59
|
-
elButton: require("
|
|
59
|
+
elInput: require("../../../components/form/basic.vue").default,
|
|
60
|
+
elButton: require("../../../components/basic/Button.vue").default,
|
|
60
61
|
},
|
|
61
62
|
data: () => ({
|
|
62
63
|
form: new Form(
|
|
@@ -78,7 +79,7 @@ export default {
|
|
|
78
79
|
|
|
79
80
|
await this.form.post("/forgot-password");
|
|
80
81
|
|
|
81
|
-
|
|
82
|
+
ElNotification({
|
|
82
83
|
type: "success",
|
|
83
84
|
message: "Email has been re-sent",
|
|
84
85
|
duration: 10000,
|
|
@@ -86,14 +87,14 @@ export default {
|
|
|
86
87
|
});
|
|
87
88
|
} catch (e) {
|
|
88
89
|
if (e.response && e.response.status === 422) {
|
|
89
|
-
this.notification =
|
|
90
|
+
this.notification = ElNotification({
|
|
90
91
|
type: "warning",
|
|
91
92
|
message: "Please allow 10 minutes before re-requesting",
|
|
92
93
|
duration: 0,
|
|
93
94
|
class: "el-notification--warning el-notification--right-override",
|
|
94
95
|
});
|
|
95
96
|
} else {
|
|
96
|
-
|
|
97
|
+
console.log(e);
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
100
|
},
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
<section id="resetPasswordForm">
|
|
4
4
|
<h1 class="h2 h2--small">Success</h1>
|
|
5
5
|
|
|
6
|
-
<p class="
|
|
6
|
+
<p class="mt-2 mb-0 color-highlight">
|
|
7
7
|
<strong class="">Email: {{ $route.query.email }}</strong>
|
|
8
8
|
</p>
|
|
9
|
-
<p class="
|
|
9
|
+
<p class="mt">
|
|
10
10
|
Your password has been reset. Please sign in to continue.
|
|
11
11
|
</p>
|
|
12
12
|
|
|
@@ -29,7 +29,7 @@ export default {
|
|
|
29
29
|
};
|
|
30
30
|
},
|
|
31
31
|
components: {
|
|
32
|
-
elButton: require("
|
|
32
|
+
elButton: require("../../../components/basic/Button.vue").default,
|
|
33
33
|
},
|
|
34
34
|
};
|
|
35
35
|
</script>
|
|
@@ -20,12 +20,10 @@
|
|
|
20
20
|
<script>
|
|
21
21
|
export default {
|
|
22
22
|
mounted() {
|
|
23
|
-
this.$store.dispatch("getUser"
|
|
24
|
-
errors: this.$root.errors,
|
|
25
|
-
});
|
|
23
|
+
this.$store.dispatch("getUser");
|
|
26
24
|
},
|
|
27
25
|
components: {
|
|
28
|
-
elButton: require("
|
|
26
|
+
elButton: require("../../../components/basic/Button.vue").default,
|
|
29
27
|
},
|
|
30
28
|
// Problem in this file
|
|
31
29
|
};
|
|
@@ -2,17 +2,15 @@
|
|
|
2
2
|
<h1 class="h2 h2--small">Verify your email address</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: {{ user?.email }}</strong>
|
|
7
7
|
</p>
|
|
8
|
-
<p class="
|
|
8
|
+
<p class="mt-0.5">
|
|
9
9
|
<strong>Please check your inbox</strong> for a Verification email
|
|
10
10
|
from {{ $root.appName }}. Click the link in that email to verify
|
|
11
11
|
your email address and complete your registration.
|
|
12
12
|
</p>
|
|
13
|
-
<p class="
|
|
14
|
-
Haven’t received the email after 10 minutes?
|
|
15
|
-
</p>
|
|
13
|
+
<p class="mt-0.5 mb-0">Haven’t received the email after 10 minutes?</p>
|
|
16
14
|
|
|
17
15
|
<el-input
|
|
18
16
|
class="hidden"
|
|
@@ -26,7 +24,7 @@
|
|
|
26
24
|
/>
|
|
27
25
|
|
|
28
26
|
<elButton
|
|
29
|
-
class="
|
|
27
|
+
class="mt mb-3"
|
|
30
28
|
native-type="submit"
|
|
31
29
|
type="primary"
|
|
32
30
|
:disabled="form.processing"
|
|
@@ -36,7 +34,7 @@
|
|
|
36
34
|
Re-send verification link
|
|
37
35
|
</elButton>
|
|
38
36
|
|
|
39
|
-
<p class="disclaimer
|
|
37
|
+
<p class="disclaimer mt-1.5">
|
|
40
38
|
Having trouble singing in?
|
|
41
39
|
<a :href="$store.state.auth.contact" class="underline"
|
|
42
40
|
>Contact us</a
|
|
@@ -47,11 +45,12 @@
|
|
|
47
45
|
|
|
48
46
|
<script>
|
|
49
47
|
import Form from "form-backend-validation";
|
|
48
|
+
import { ElNotification } from "element-plus";
|
|
50
49
|
|
|
51
50
|
export default {
|
|
52
51
|
components: {
|
|
53
|
-
elInput: require("
|
|
54
|
-
elButton: require("
|
|
52
|
+
elInput: require("../../../components/form/basic.vue").default,
|
|
53
|
+
elButton: require("../../../components/basic/Button.vue").default,
|
|
55
54
|
},
|
|
56
55
|
data: () => ({
|
|
57
56
|
user: null,
|
|
@@ -74,7 +73,7 @@ export default {
|
|
|
74
73
|
|
|
75
74
|
await this.form.post("/email/verification-notification");
|
|
76
75
|
|
|
77
|
-
|
|
76
|
+
ElNotification({
|
|
78
77
|
type: "success",
|
|
79
78
|
message: "Email has been re-sent",
|
|
80
79
|
duration: 10000,
|
|
@@ -82,30 +81,28 @@ export default {
|
|
|
82
81
|
});
|
|
83
82
|
} catch (e) {
|
|
84
83
|
if (e.response && e.response.status === 429) {
|
|
85
|
-
this.notification =
|
|
84
|
+
this.notification = ElNotification({
|
|
86
85
|
type: "warning",
|
|
87
86
|
message: "Please allow 10 minutes before re-requesting",
|
|
88
87
|
duration: 0,
|
|
89
88
|
class: "el-notification--warning el-notification--right-override",
|
|
90
89
|
});
|
|
91
90
|
} else if (e.response && e.response.status === 422) {
|
|
92
|
-
this.notification =
|
|
91
|
+
this.notification = ElNotification({
|
|
93
92
|
type: "error",
|
|
94
93
|
message: e.response.data.message,
|
|
95
94
|
duration: 0,
|
|
96
95
|
class: "el-notification--error el-notification--right-override",
|
|
97
96
|
});
|
|
98
97
|
} else {
|
|
99
|
-
|
|
98
|
+
console.log(e);
|
|
100
99
|
}
|
|
101
100
|
}
|
|
102
101
|
},
|
|
103
102
|
},
|
|
104
103
|
|
|
105
104
|
async mounted() {
|
|
106
|
-
this.user = await this.$store.dispatch("getUser"
|
|
107
|
-
errors: this.$root.errors,
|
|
108
|
-
});
|
|
105
|
+
this.user = await this.$store.dispatch("getUser");
|
|
109
106
|
|
|
110
107
|
this.form.email = this.user.email;
|
|
111
108
|
},
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<VBreadcrumbs :items="breadcrumbs" class="mb-8" container-classes="m-0" />
|
|
3
|
+
|
|
4
|
+
<div class="container px-6 tablet:px-4 mobile:px-2 mb-8 ml-0 mr-0">
|
|
5
|
+
<div class="grid__1/1">
|
|
6
|
+
<div class="grid__1/1 mb-4">
|
|
7
|
+
<h2 class="h1">Create {{ resource.singular }}</h2>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="mt grid__1/2">
|
|
10
|
+
<component
|
|
11
|
+
:is="resource.form.component ?? 'XForm'"
|
|
12
|
+
ref="form"
|
|
13
|
+
:form="form"
|
|
14
|
+
:submit="submit"
|
|
15
|
+
:method="method"
|
|
16
|
+
:resource="resource"
|
|
17
|
+
/>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script>
|
|
24
|
+
import Form from "form-backend-validation";
|
|
25
|
+
|
|
26
|
+
export default {
|
|
27
|
+
components: {
|
|
28
|
+
VBreadcrumbs: require("../../../components/layout/Breadcrumbs.vue")
|
|
29
|
+
.default,
|
|
30
|
+
XForm: require("./partials/form.vue").default,
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
props: {
|
|
34
|
+
breadcrumbs: {
|
|
35
|
+
type: Array,
|
|
36
|
+
required: true,
|
|
37
|
+
},
|
|
38
|
+
resource: {
|
|
39
|
+
type: Object,
|
|
40
|
+
required: true,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
data() {
|
|
45
|
+
return {
|
|
46
|
+
form: null,
|
|
47
|
+
method: "post",
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
beforeMount() {
|
|
52
|
+
this.form = new Form(this.resource.form.fields(this), {
|
|
53
|
+
resetOnSuccess: false,
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
methods: {
|
|
58
|
+
async submit() {
|
|
59
|
+
if (this.resource.form.submit) {
|
|
60
|
+
await this.resource.form.submit(this);
|
|
61
|
+
} else {
|
|
62
|
+
try {
|
|
63
|
+
let res = await this.form.post(`${this.resource.api}`);
|
|
64
|
+
|
|
65
|
+
this.$router.replace({
|
|
66
|
+
name: `${this.resource.slug}.show`,
|
|
67
|
+
params: { id: res.data.id },
|
|
68
|
+
});
|
|
69
|
+
} catch (e) {
|
|
70
|
+
console.log(e);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
</script>
|