@icvdeveloper/common-module 2.3.6 → 2.3.7
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/CHANGELOG.md +2 -0
- package/dist/module.json +1 -1
- package/dist/runtime/assets/postcss/_custom.css +1 -1
- package/dist/runtime/assets/postcss/_forms.css +1 -1
- package/dist/runtime/components/auth/LoginFullWidth.vue +10 -2
- package/dist/runtime/components/core/Navigation.vue +12 -2
- package/dist/runtime/components/forms/CheckboxGroup.vue +16 -16
- package/dist/runtime/components/forms/RadioGroup.vue +15 -21
- package/dist/runtime/components/forms/SelectDropDown.vue +12 -13
- package/dist/runtime/components/forms/TextArea.vue +1 -1
- package/dist/runtime/components/forms/TextInput.vue +1 -1
- package/dist/runtime/components/registration/RegistrationForm.vue +20 -14
- package/dist/runtime/store/auth.mjs +3 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/module.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
.bg-color-white{background-color:#fff}.bg-color-white-darker{background-color:#f7f7f7}.bg-color-1{background-color:var(--global-color-1)}.bg-color-2{background-color:var(--global-color-2)}.bg-color-3{background-color:var(--global-color-3)}.bg-color-4{background-color:var(--global-color-4)}.bg-color-5{background-color:var(--global-color-5)}.bg-color-6{background-color:var(--global-color-6)}.bg-color-link{background-color:var(--link-color)}.heading-color-1{color:var(--heading-color-1)}.heading-color-2{color:var(--heading-color-2)}.heading-color-3{color:var(--heading-color-3)}.heading-color-4{color:var(--heading-color-4)}.heading-color-5{color:var(--heading-color-5)}.heading-color-6{color:var(--heading-color-6)}.body-color-1{color:var(--body-color-1)}.body-color-2{color:var(--body-color-2)}.body-color-3{color:var(--body-color-3)}.body-color-4{color:var(--body-color-4)}.body-color-5{color:var(--body-color-5)}.body-color-6{color:var(--body-color-6)}.paragraph-color-1{color:var(--paragraph-color-1)}.paragraph-color-2{color:var(--paragraph-color-2)}.nav-color-1{color:var(--nav-color-1)}.nav-color-2{color:var(--nav-color-2)}.nav-color-3{color:var(--nav-color-3)}.nav-color-4{color:var(--nav-color-4)}.nav-color-5{color:var(--nav-color-5)}.button-color-1{background-color:var(--button-color-1)}.button-color-2{background-color:var(--button-color-2)}.button-color-3{background-color:var(--button-color-3)}.accent-color-1{color:var(--accent-color-1)}.accent-color-2{color:var(--accent-color-2)}.accent-color-3{color:var(--accent-color-3)}.border-color-1{border-color:var(--global-color-1)}.border-color-2{border-color:var(--global-color-2)}.border-color-3{border-color:var(--global-color-3)}.border-color-4{border-color:var(--global-color-4)}.border-color-5{border-color:var(--global-color-5)}.border-color-accent-1{border-color:var(--accent-color-1)}.border-color-accent-2{border-color:var(--accent-color-2)}.border-color-accent-3{border-color:var(--accent-color-3)}.border-color-link{border-color:var(--link-color)}html{background-color:var(--global-color-1);color:var(--paragraph-color-1)}body{font-family:var(--font-body-1)}a{color:var(--link-color)}a:hover{color:var(--link-hover)}h1{font-family:var(--font-heading-1)}.font-body-1{font-family:var(--font-body-1)}.font-body-2{font-family:var(--font-body-2)}.font-heading-1{font-family:var(--font-heading-1)}.font-heading-2{font-family:var(--font-heading-2)}@if variable-exists(presenter-name-color){#page-presenters .presenter-name-color{color:var(--presenter-name-color)}}@if variable-exists(presenter-title-color){#page-presenters .presenter-title-color{color:var(--presenter-title-color)}}.grid{display:grid}.place-self-center{place-self:center}.text-xxs{font-size:.5rem}.section-header{@apply mb-0 uppercase tracking-wider}.section-subheader{@apply tracking-wider font-extralight}.contrast-border{border-color:saturate(mix(var(--global-color-1),desaturate(invert(var(--global-color-1)),100%),90%),5%)}.presenter-icon{@apply block mx-1}.presenter-icon svg{@apply w-6 h-auto}.presenter-icon-small{@apply block;margin:0 .2rem}.presenter-icon-small svg{@apply w-4 h-auto}.flex-basis-3{flex-basis:33%}.flex-basis-4{flex-basis:25%}.flex-basis-5{flex-basis:20%}.primary-link{@apply uppercase tracking-wider;font-size:.65rem}.body-copy{@apply paragraph-color-1 font-body-1 text-base leading-normal}.heading-primary{@apply heading-color-1 font-heading-1 leading-normal tracking-wider}.heading-secondary{@apply heading-color-2 font-heading-2 leading-normal tracking-wider}.heading-link{color:var(--body-color-3)}.heading-link:hover{color:saturate(mix(var(--body-color-3),desaturate(invert(var(--body-color-3)),100%),75%),0)}.presenter-name{@apply body-color-4 font-body-1}.presenter-title{@apply body-color-5 font-body-1}.hr-heading{align-items:center;display:grid;grid-template-columns:minmax(20px,1fr) auto minmax(20px,1fr);text-align:center;width:auto;grid-gap:.3em;color:var(--heading-color-5);margin-left:1em;margin-right:1em}.hr-heading:after,.hr-heading:before{border-top:1px solid;border-color:var(--accent-color-2);content:""}.tabs-details{max-height:523px;overflow-y:scroll}.tabs-details li:before{content:"—";@apply text-center mr-4 body-color-1;padding-bottom:.25rem}.conf-name-alignment{margin-top:-.2em}.invert{transform:rotate(180deg)}.span-no-spacing{margin-left:-3px}@if variable-exists(captions-font) and
|
|
1
|
+
.bg-color-white{background-color:#fff}.bg-color-white-darker{background-color:#f7f7f7}.bg-color-1{background-color:var(--global-color-1)}.bg-color-2{background-color:var(--global-color-2)}.bg-color-3{background-color:var(--global-color-3)}.bg-color-4{background-color:var(--global-color-4)}.bg-color-5{background-color:var(--global-color-5)}.bg-color-6{background-color:var(--global-color-6)}.bg-color-link{background-color:var(--link-color)}.heading-color-1{color:var(--heading-color-1)}.heading-color-2{color:var(--heading-color-2)}.heading-color-3{color:var(--heading-color-3)}.heading-color-4{color:var(--heading-color-4)}.heading-color-5{color:var(--heading-color-5)}.heading-color-6{color:var(--heading-color-6)}.body-color-1{color:var(--body-color-1)}.body-color-2{color:var(--body-color-2)}.body-color-3{color:var(--body-color-3)}.body-color-4{color:var(--body-color-4)}.body-color-5{color:var(--body-color-5)}.body-color-6{color:var(--body-color-6)}.paragraph-color-1{color:var(--paragraph-color-1)}.paragraph-color-2{color:var(--paragraph-color-2)}.nav-color-1{color:var(--nav-color-1)}.nav-color-2{color:var(--nav-color-2)}.nav-color-3{color:var(--nav-color-3)}.nav-color-4{color:var(--nav-color-4)}.nav-color-5{color:var(--nav-color-5)}.button-color-1{background-color:var(--button-color-1)}.button-color-2{background-color:var(--button-color-2)}.button-color-3{background-color:var(--button-color-3)}.radio-check-color-1{accent-color:var(--button-color-1)}.accent-color-1{color:var(--accent-color-1)}.accent-color-2{color:var(--accent-color-2)}.accent-color-3{color:var(--accent-color-3)}.border-color-1{border-color:var(--global-color-1)}.border-color-2{border-color:var(--global-color-2)}.border-color-3{border-color:var(--global-color-3)}.border-color-4{border-color:var(--global-color-4)}.border-color-5{border-color:var(--global-color-5)}.border-color-accent-1{border-color:var(--accent-color-1)}.border-color-accent-2{border-color:var(--accent-color-2)}.border-color-accent-3{border-color:var(--accent-color-3)}.border-color-link{border-color:var(--link-color)}html{background-color:var(--global-color-1);color:var(--paragraph-color-1)}body{font-family:var(--font-body-1)}a{color:var(--link-color)}a:hover{color:var(--link-hover)}h1{font-family:var(--font-heading-1)}.font-body-1{font-family:var(--font-body-1)}.font-body-2{font-family:var(--font-body-2)}.font-heading-1{font-family:var(--font-heading-1)}.font-heading-2{font-family:var(--font-heading-2)}@if variable-exists(presenter-name-color){#page-presenters .presenter-name-color{color:var(--presenter-name-color)}}@if variable-exists(presenter-title-color){#page-presenters .presenter-title-color{color:var(--presenter-title-color)}}.grid{display:grid}.place-self-center{place-self:center}.text-xxs{font-size:.5rem}.section-header{@apply mb-0 uppercase tracking-wider}.section-subheader{@apply tracking-wider font-extralight}.contrast-border{border-color:saturate(mix(var(--global-color-1),desaturate(invert(var(--global-color-1)),100%),90%),5%)}.presenter-icon{@apply block mx-1}.presenter-icon svg{@apply w-6 h-auto}.presenter-icon-small{@apply block;margin:0 .2rem}.presenter-icon-small svg{@apply w-4 h-auto}.flex-basis-3{flex-basis:33%}.flex-basis-4{flex-basis:25%}.flex-basis-5{flex-basis:20%}.primary-link{@apply uppercase tracking-wider;font-size:.65rem}.body-copy{@apply paragraph-color-1 font-body-1 text-base leading-normal}.heading-primary{@apply heading-color-1 font-heading-1 leading-normal tracking-wider}.heading-secondary{@apply heading-color-2 font-heading-2 leading-normal tracking-wider}.heading-link{color:var(--body-color-3)}.heading-link:hover{color:saturate(mix(var(--body-color-3),desaturate(invert(var(--body-color-3)),100%),75%),0)}.presenter-name{@apply body-color-4 font-body-1}.presenter-title{@apply body-color-5 font-body-1}.hr-heading{align-items:center;display:grid;grid-template-columns:minmax(20px,1fr) auto minmax(20px,1fr);text-align:center;width:auto;grid-gap:.3em;color:var(--heading-color-5);margin-left:1em;margin-right:1em}.hr-heading:after,.hr-heading:before{border-top:1px solid;border-color:var(--accent-color-2);content:""}.tabs-details{max-height:523px;overflow-y:scroll}.tabs-details li:before{content:"—";@apply text-center mr-4 body-color-1;padding-bottom:.25rem}.conf-name-alignment{margin-top:-.2em}.invert{transform:rotate(180deg)}.span-no-spacing{margin-left:-3px}@if variable-exists(captions-font) and
|
|
2
2
|
variable-exists(captions-text-color) and
|
|
3
3
|
variable-exists(captions-bg-color){.jw-text-track-cue{background-color:var(--captions-bg-color)!important;color:var(--captions-text-color)!important;font-family:var(--captions-font)!important}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.form-input{@apply border rounded w-full py-2 px-3 text-gray-600 leading-tight}.form-input:focus{@apply outline-none shadow}.select-input{@apply border rounded w-full text-gray-600 leading-tight py-1 px-2 h-auto}.select-input:focus{@apply outline-none}.btn{@apply button-color-1 text-white tracking-wider font-bold uppercase py-2 px-4 rounded}.btn:hover{filter:brightness(130%)}.btn-secondary{@apply text-white button-color-2}.btn-secondary:hover{filter:brightness(130%)}.max-form-width{max-width:50ch}
|
|
1
|
+
.form-input{@apply border rounded w-full py-2 px-3 text-gray-600 leading-tight}.form-input:focus{@apply outline-none shadow}.select-input{@apply border rounded w-full text-gray-600 leading-tight py-1 px-2 h-auto}.select-input:focus{@apply outline-none}.radio-check{@apply radio-check-color-1 mr-1}.btn{@apply button-color-1 text-white tracking-wider font-bold uppercase py-2 px-4 rounded}.btn:hover{filter:brightness(130%)}.btn-secondary{@apply text-white button-color-2}.btn-secondary:hover{filter:brightness(130%)}.max-form-width{max-width:50ch}
|
|
@@ -6,14 +6,16 @@ import { useLogin } from "../../composables/useLogin";
|
|
|
6
6
|
import { useTemplateConfigsStore } from "../../store";
|
|
7
7
|
|
|
8
8
|
interface Props {
|
|
9
|
+
title?: string | null;
|
|
9
10
|
conference?: Conference | null;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
const props = withDefaults(defineProps<Props>(), {
|
|
14
|
+
title: null,
|
|
13
15
|
conference: null,
|
|
14
16
|
});
|
|
15
17
|
|
|
16
|
-
const { conference } = toRefs<Props>(props);
|
|
18
|
+
const { title, conference } = toRefs<Props>(props);
|
|
17
19
|
|
|
18
20
|
const { globalConfigValue } = storeToRefs(useTemplateConfigsStore());
|
|
19
21
|
|
|
@@ -25,6 +27,12 @@ const { loginError, handleLogin, email, password, tooManySessions, showReset } =
|
|
|
25
27
|
<template>
|
|
26
28
|
<div class="px-2">
|
|
27
29
|
<div class="flex flex-1 flex-col text-center pt-8">
|
|
30
|
+
<h3
|
|
31
|
+
v-if="title"
|
|
32
|
+
class="py-8"
|
|
33
|
+
>
|
|
34
|
+
{{ title }}
|
|
35
|
+
</h3>
|
|
28
36
|
<h1 class="mb-3 heading-color-3">
|
|
29
37
|
Log In
|
|
30
38
|
</h1>
|
|
@@ -67,7 +75,7 @@ const { loginError, handleLogin, email, password, tooManySessions, showReset } =
|
|
|
67
75
|
class="form-input contrast-border mb-5"
|
|
68
76
|
@keyup.enter="handleLogin()"
|
|
69
77
|
>
|
|
70
|
-
<button
|
|
78
|
+
<button
|
|
71
79
|
v-if="!tooManySessions"
|
|
72
80
|
class="btn"
|
|
73
81
|
@click="handleLogin()"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import { ref, toRefs, computed } from 'vue';
|
|
3
3
|
import { storeToRefs } from 'pinia';
|
|
4
|
-
import { useRoute } from 'vue-router';
|
|
4
|
+
import { useRoute, useRouter } from 'vue-router';
|
|
5
5
|
import { usePresenters } from '../../composables/usePresenters';
|
|
6
6
|
import { useNavigation } from '../../composables/useNavigation';
|
|
7
7
|
import { useAuth } from '../../composables/useAuth';
|
|
@@ -79,6 +79,7 @@ const { getEnabled } = useNavigationConfigStore();
|
|
|
79
79
|
const { getPresentersLabel } = usePresenters(currentConference as Ref<Conference>);
|
|
80
80
|
|
|
81
81
|
const route = useRoute();
|
|
82
|
+
const router = useRouter();
|
|
82
83
|
|
|
83
84
|
const toggleMenu = () => {
|
|
84
85
|
showMenu.value = !showMenu.value;
|
|
@@ -132,6 +133,15 @@ const emitStreamTest = (): void => {
|
|
|
132
133
|
setPlayerConferenceEventHook.trigger(currentConference);
|
|
133
134
|
setIsPlayerVisibleEventHook.trigger(true);
|
|
134
135
|
};
|
|
136
|
+
|
|
137
|
+
const logoutReload = (): void => {
|
|
138
|
+
logout()
|
|
139
|
+
.then(() => {
|
|
140
|
+
router.push('/');
|
|
141
|
+
})
|
|
142
|
+
.catch((error) => {
|
|
143
|
+
});
|
|
144
|
+
}
|
|
135
145
|
</script>
|
|
136
146
|
|
|
137
147
|
<template>
|
|
@@ -250,7 +260,7 @@ const emitStreamTest = (): void => {
|
|
|
250
260
|
<li :class="classBinding(classObject, 'logOutListItem', 'md:inline-block')">
|
|
251
261
|
<a
|
|
252
262
|
:class="classBinding(classObject, 'logOutLink', 'block md:inline-block w-auto md:w-full text-center cursor-pointer')"
|
|
253
|
-
@click="
|
|
263
|
+
@click="logoutReload"
|
|
254
264
|
>Log Out</a>
|
|
255
265
|
</li>
|
|
256
266
|
<li
|
|
@@ -2,26 +2,25 @@
|
|
|
2
2
|
import { ref, toRefs } from 'vue';
|
|
3
3
|
|
|
4
4
|
type Props = {
|
|
5
|
-
|
|
5
|
+
name?: string;
|
|
6
|
+
options: Array<{ name: string; value: string; }>;
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
const props = defineProps<Props>();
|
|
9
10
|
|
|
10
|
-
const { options } = toRefs(props);
|
|
11
|
+
const { name, options } = toRefs(props);
|
|
11
12
|
|
|
12
13
|
// data
|
|
13
|
-
|
|
14
|
-
const currentValueArray = ref<any[]>([]);
|
|
14
|
+
const currentValueArray = ref<string[]>([] as string[]);
|
|
15
15
|
|
|
16
16
|
// emits
|
|
17
|
-
// TODO - set value type
|
|
18
17
|
const emit = defineEmits<{
|
|
19
|
-
(event:
|
|
18
|
+
(event: "update:modelValue", value: string[]): void;
|
|
20
19
|
}>();
|
|
21
20
|
|
|
22
21
|
// methods
|
|
23
|
-
const onChange = (
|
|
24
|
-
emit(
|
|
22
|
+
const onChange = (e: any) => {
|
|
23
|
+
emit("update:modelValue", currentValueArray.value);
|
|
25
24
|
};
|
|
26
25
|
</script>
|
|
27
26
|
|
|
@@ -32,15 +31,16 @@ const onChange = (): void => {
|
|
|
32
31
|
v-for="(option, index) in options"
|
|
33
32
|
:key="index"
|
|
34
33
|
class="mb-2 ml-4"
|
|
35
|
-
>
|
|
36
|
-
|
|
34
|
+
>
|
|
35
|
+
<input
|
|
36
|
+
type="checkbox"
|
|
37
37
|
v-model="currentValueArray"
|
|
38
|
+
:name="name"
|
|
38
39
|
:value="option.value"
|
|
39
40
|
@change="onChange"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
</
|
|
43
|
-
</div>
|
|
44
|
-
</span>
|
|
41
|
+
class="radio-check"
|
|
42
|
+
/>
|
|
43
|
+
<label>{{ option.name }}</label>
|
|
44
|
+
</div>
|
|
45
|
+
</span>
|
|
45
46
|
</template>
|
|
46
|
-
|
|
@@ -2,30 +2,23 @@
|
|
|
2
2
|
import { toRefs } from 'vue';
|
|
3
3
|
|
|
4
4
|
type Props = {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
name?: string;
|
|
6
|
+
value?: string;
|
|
7
|
+
options: Array<{ name: string; value: string; }>;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
const props = defineProps<Props>();
|
|
10
11
|
|
|
11
|
-
const { value, options } = toRefs(props);
|
|
12
|
+
const { name, value, options } = toRefs(props);
|
|
12
13
|
|
|
13
14
|
// emits
|
|
14
|
-
// TODO - set value type
|
|
15
15
|
const emit = defineEmits<{
|
|
16
|
-
(event:
|
|
16
|
+
(event: "update:modelValue", value: string): void;
|
|
17
17
|
}>();
|
|
18
18
|
|
|
19
|
-
// computed
|
|
20
|
-
// TODO - what's this for?
|
|
21
|
-
// what is <p-radio> ?
|
|
22
|
-
const guid = () => {
|
|
23
|
-
return crypto.getRandomValues(new Uint32Array(2)).join('-');
|
|
24
|
-
}
|
|
25
|
-
|
|
26
19
|
// methods
|
|
27
|
-
const onChange = (e: any)
|
|
28
|
-
emit(
|
|
20
|
+
const onChange = (e: any) => {
|
|
21
|
+
emit("update:modelValue", e.target.value);
|
|
29
22
|
};
|
|
30
23
|
</script>
|
|
31
24
|
|
|
@@ -37,14 +30,15 @@ const onChange = (e: any): void => {
|
|
|
37
30
|
:key="index"
|
|
38
31
|
class="mb-2 ml-4"
|
|
39
32
|
>
|
|
40
|
-
<
|
|
33
|
+
<input
|
|
34
|
+
type="radio"
|
|
41
35
|
v-model="value"
|
|
42
|
-
|
|
36
|
+
:name="name"
|
|
43
37
|
:value="option.value"
|
|
44
38
|
@change="onChange"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
</
|
|
48
|
-
</div>
|
|
49
|
-
</span>
|
|
39
|
+
class="radio-check"
|
|
40
|
+
/>
|
|
41
|
+
<label>{{ option.name }}</label>
|
|
42
|
+
</div>
|
|
43
|
+
</span>
|
|
50
44
|
</template>
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { toRefs } from 'vue';
|
|
2
|
+
import { ref, toRefs } from 'vue';
|
|
3
3
|
|
|
4
4
|
type Props = {
|
|
5
|
-
value:
|
|
6
|
-
|
|
7
|
-
firstDisabled?: boolean
|
|
5
|
+
options: Array<{ name: string; value: string; }>;
|
|
6
|
+
firstDisabled?: boolean;
|
|
8
7
|
}
|
|
9
8
|
|
|
10
9
|
const props = withDefaults(defineProps<Props>(), {
|
|
11
10
|
firstDisabled: false
|
|
12
11
|
});
|
|
13
12
|
|
|
14
|
-
const {
|
|
13
|
+
const { options, firstDisabled } = toRefs(props);
|
|
14
|
+
|
|
15
|
+
// data
|
|
16
|
+
const selectedValue = ref<string>("");
|
|
15
17
|
|
|
16
18
|
// emits
|
|
17
|
-
// TODO - set value type
|
|
18
19
|
const emit = defineEmits<{
|
|
19
|
-
(event:
|
|
20
|
+
(event: "update:modelValue", value: string): void;
|
|
20
21
|
}>();
|
|
21
22
|
|
|
22
23
|
// methods
|
|
23
|
-
const
|
|
24
|
-
emit(
|
|
24
|
+
const onChange = () => {
|
|
25
|
+
emit("update:modelValue", selectedValue.value);
|
|
25
26
|
};
|
|
26
27
|
</script>
|
|
27
28
|
|
|
@@ -29,8 +30,8 @@ const onInput = (e: any): void => {
|
|
|
29
30
|
<span>
|
|
30
31
|
<select
|
|
31
32
|
class="form-input"
|
|
32
|
-
|
|
33
|
-
@change="
|
|
33
|
+
v-model="selectedValue"
|
|
34
|
+
@change="onChange"
|
|
34
35
|
>
|
|
35
36
|
<option
|
|
36
37
|
v-for="(option, index) in options"
|
|
@@ -43,5 +44,3 @@ const onInput = (e: any): void => {
|
|
|
43
44
|
</select>
|
|
44
45
|
</span>
|
|
45
46
|
</template>
|
|
46
|
-
|
|
47
|
-
|
|
@@ -34,6 +34,7 @@ const loading = ref<boolean>(false);
|
|
|
34
34
|
const errors = ref<{[key: string]: []}>({});
|
|
35
35
|
const showLogin = ref<boolean>(false);
|
|
36
36
|
const stripeComponent = ref();
|
|
37
|
+
const newUser = ref();
|
|
37
38
|
|
|
38
39
|
// computed
|
|
39
40
|
const regButtonEnabled = computed((): boolean => {
|
|
@@ -107,7 +108,7 @@ const closeUserAcctError = (): void => {
|
|
|
107
108
|
|
|
108
109
|
const getRegistrationFormData = (_group: string): void => {
|
|
109
110
|
const request = useApi();
|
|
110
|
-
request(`groups/${_group}?with=registration_form.fields,merchant`)
|
|
111
|
+
request(`groups/${encodeURIComponent(_group)}?with=registration_form.fields,merchant`)
|
|
111
112
|
// TODO - define type
|
|
112
113
|
.then((response: any) => {
|
|
113
114
|
group.value = response.data as Group;
|
|
@@ -189,10 +190,11 @@ const register = (ccToken: string = '') => {
|
|
|
189
190
|
request(`groups/${group.value.id}/registration`, inputs)
|
|
190
191
|
.then((response: any) => {
|
|
191
192
|
if(isLoggedIn.value) {
|
|
192
|
-
router.push('/');
|
|
193
|
+
//router.push('/');
|
|
193
194
|
}
|
|
194
195
|
formComplete.value = true;
|
|
195
|
-
user.value = response;
|
|
196
|
+
// don't log in // user.value = response;
|
|
197
|
+
newUser.value = response;
|
|
196
198
|
})
|
|
197
199
|
.catch((error: IFetchError) => {
|
|
198
200
|
errors.value = get(error?.response?._data, 'errors', {});
|
|
@@ -220,7 +222,7 @@ onMounted(() => {
|
|
|
220
222
|
>
|
|
221
223
|
<h3
|
|
222
224
|
v-if="group.name"
|
|
223
|
-
class="py-8
|
|
225
|
+
class="py-8"
|
|
224
226
|
>
|
|
225
227
|
Please complete the registration form below for {{ group.name }}.
|
|
226
228
|
</h3>
|
|
@@ -239,6 +241,10 @@ onMounted(() => {
|
|
|
239
241
|
class="block body-color-1 mb-1"
|
|
240
242
|
>
|
|
241
243
|
{{ field.label }}
|
|
244
|
+
<span
|
|
245
|
+
v-if="field.validation.required"
|
|
246
|
+
class="text-red-500"
|
|
247
|
+
>*</span>
|
|
242
248
|
</label>
|
|
243
249
|
|
|
244
250
|
<!-- Input / Password -->
|
|
@@ -272,6 +278,7 @@ onMounted(() => {
|
|
|
272
278
|
<span v-if="field.type == 'select'">
|
|
273
279
|
<CommonSelectDropDown
|
|
274
280
|
v-model="formInputs[field.name]"
|
|
281
|
+
:required="field.validation.required"
|
|
275
282
|
:options="field.options"
|
|
276
283
|
:first-disabled="true"
|
|
277
284
|
/>
|
|
@@ -281,6 +288,8 @@ onMounted(() => {
|
|
|
281
288
|
<span v-if="field.type == 'checkbox'">
|
|
282
289
|
<CommonCheckboxGroup
|
|
283
290
|
v-model="formInputs[field.name]"
|
|
291
|
+
:name="field.name"
|
|
292
|
+
:required="field.validation.required"
|
|
284
293
|
:options="field.options"
|
|
285
294
|
/>
|
|
286
295
|
</span>
|
|
@@ -289,6 +298,8 @@ onMounted(() => {
|
|
|
289
298
|
<span v-if="field.type == 'radiogroup'">
|
|
290
299
|
<CommonRadioGroup
|
|
291
300
|
v-model="formInputs[field.name]"
|
|
301
|
+
:name="field.name"
|
|
302
|
+
:required="field.validation.required"
|
|
292
303
|
:options="field.options"
|
|
293
304
|
/>
|
|
294
305
|
</span>
|
|
@@ -307,7 +318,7 @@ onMounted(() => {
|
|
|
307
318
|
:errors="errors[field.name]"
|
|
308
319
|
/>
|
|
309
320
|
<CommonErrorField
|
|
310
|
-
v-if="field.name == 'email' &&
|
|
321
|
+
v-if="field.name == 'email' && errors.user?.length"
|
|
311
322
|
:errors="errors.user"
|
|
312
323
|
/>
|
|
313
324
|
</div>
|
|
@@ -326,7 +337,7 @@ onMounted(() => {
|
|
|
326
337
|
|
|
327
338
|
<!-- error field when email field/error is hidden -->
|
|
328
339
|
<CommonErrorField
|
|
329
|
-
v-if="isLoggedIn && errors.user
|
|
340
|
+
v-if="isLoggedIn && errors.user?.length"
|
|
330
341
|
class="mt-3"
|
|
331
342
|
:errors="errors.user"
|
|
332
343
|
/>
|
|
@@ -374,21 +385,16 @@ onMounted(() => {
|
|
|
374
385
|
<br>
|
|
375
386
|
|
|
376
387
|
<div
|
|
377
|
-
v-if="
|
|
388
|
+
v-if="newUser && formComplete"
|
|
378
389
|
class="w-full mx-auto max-form-width"
|
|
379
|
-
>
|
|
380
|
-
<template v-if="user.name">
|
|
381
|
-
<h2 class="mb-4">
|
|
382
|
-
{{ user.name }}
|
|
383
|
-
</h2>
|
|
384
|
-
</template>
|
|
390
|
+
>{{ group.registration_message }}
|
|
385
391
|
<CommonDynamicHtml
|
|
386
392
|
v-if="group.registration_message"
|
|
387
393
|
:template="group.registration_message"
|
|
388
394
|
/>
|
|
389
395
|
<CommonLoginFullWidth
|
|
390
396
|
v-else-if="!user"
|
|
391
|
-
title="Thank you for registering
|
|
397
|
+
title="Thank you for registering.<br />Please log in to continue to your event."
|
|
392
398
|
/>
|
|
393
399
|
<span v-else>
|
|
394
400
|
You are now registered for <span class="font-bold"><i>{{ group.name }}</i></span>.
|
|
@@ -3,20 +3,18 @@ import { merge } from "lodash-es";
|
|
|
3
3
|
import { DateTime } from "luxon";
|
|
4
4
|
import { useApi } from "../composables/useApi.mjs";
|
|
5
5
|
import { useConferencesStore } from "./conferences.mjs";
|
|
6
|
-
import {
|
|
7
|
-
loginEventHook
|
|
8
|
-
} from "../composables/useEventHooks.mjs";
|
|
6
|
+
import { loginEventHook } from "../composables/useEventHooks.mjs";
|
|
9
7
|
export const useAuthStore = defineStore("auth", {
|
|
10
8
|
persist: {
|
|
11
9
|
afterRestore(context) {
|
|
12
10
|
if (context.store.$state.user) {
|
|
13
11
|
const user = context.store.$state.user;
|
|
14
12
|
const now = DateTime.now().setZone("utc");
|
|
15
|
-
const expiration = DateTime.fromFormat(
|
|
13
|
+
const expiration = user.expires_at ? DateTime.fromFormat(
|
|
16
14
|
user.expires_at,
|
|
17
15
|
"yyyy-MM-dd HH:mm:ss",
|
|
18
16
|
{ zone: "utc" }
|
|
19
|
-
);
|
|
17
|
+
) : now;
|
|
20
18
|
if (now >= expiration) {
|
|
21
19
|
console.log("Auth expired: Pinia auth store reset.");
|
|
22
20
|
context.store.reset();
|