@icvdeveloper/common-module 2.1.4 → 2.2.0
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/components/agenda/AgendaList.vue +1 -1
- package/dist/runtime/composables/useAuth.mjs +1 -1
- package/dist/runtime/plugin.mjs +34 -1
- package/dist/runtime/store/conferences.d.ts +1 -0
- package/dist/runtime/store/conferences.mjs +10 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/module.json
CHANGED
|
@@ -59,7 +59,7 @@ const { getPresentersLabel, getSortedPresenters } = usePresenters(conference);
|
|
|
59
59
|
|
|
60
60
|
const { classBinding } = useClassBinding();
|
|
61
61
|
|
|
62
|
-
const isExpanded: Ref<boolean> = inject('isExpanded', ref<boolean>(
|
|
62
|
+
const isExpanded: Ref<boolean> = inject('isExpanded', ref<boolean>(true));
|
|
63
63
|
|
|
64
64
|
// data
|
|
65
65
|
const expandedPres = ref<number>(0);
|
|
@@ -3,7 +3,7 @@ import { useTemplateConfigsStore } from "../store/templateConfigs.mjs";
|
|
|
3
3
|
export const useAuth = () => {
|
|
4
4
|
const { globalConfigValue } = useTemplateConfigsStore();
|
|
5
5
|
const isLoginDisabled = computed(() => {
|
|
6
|
-
return globalConfigValue("
|
|
6
|
+
return globalConfigValue("login_process") === "disabled" || globalConfigValue("login_process") === "ucc";
|
|
7
7
|
});
|
|
8
8
|
return {
|
|
9
9
|
isLoginDisabled
|
package/dist/runtime/plugin.mjs
CHANGED
|
@@ -19,7 +19,7 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
19
19
|
apiUrl
|
|
20
20
|
});
|
|
21
21
|
nuxtApp.$pinia.use(piniaPluginPersistedstate);
|
|
22
|
-
router.beforeEach(async (to, from) => {
|
|
22
|
+
router.beforeEach(async (to, from, next) => {
|
|
23
23
|
NProgress.start();
|
|
24
24
|
const portalStore = usePortalStore();
|
|
25
25
|
const conferencesStore = useConferencesStore();
|
|
@@ -50,6 +50,38 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
50
50
|
await conferencesStore.getCurrentConference(true).then(() => NProgress.inc())
|
|
51
51
|
]);
|
|
52
52
|
}
|
|
53
|
+
if (routeName.includes("events-id") && to.params.id == "redirect") {
|
|
54
|
+
let matchedConfs = conferencesStore.conferenceList;
|
|
55
|
+
if (to.query.custom1) {
|
|
56
|
+
matchedConfs = conferencesStore.searchConferenceAffiliatesCustom1(to.query.custom1);
|
|
57
|
+
}
|
|
58
|
+
if (matchedConfs.length > 0 && to.query.state) {
|
|
59
|
+
if (to.query.state == "upcoming") {
|
|
60
|
+
matchedConfs = matchedConfs.filter(function(conf) {
|
|
61
|
+
return conf.state == "upcoming" || conf.state == "live" || conf.state == "mixed";
|
|
62
|
+
});
|
|
63
|
+
} else {
|
|
64
|
+
matchedConfs = matchedConfs.filter(function(conf) {
|
|
65
|
+
return conf.state == to.query.state;
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
if (matchedConfs.length > 0) {
|
|
70
|
+
if (to.query.orderdir == "asc") {
|
|
71
|
+
matchedConfs.sort(function(a, b) {
|
|
72
|
+
return a.start_date < b.start_date ? -1 : b.start_date < a.start_date ? 1 : 0;
|
|
73
|
+
});
|
|
74
|
+
} else {
|
|
75
|
+
matchedConfs.sort(function(a, b) {
|
|
76
|
+
return a.start_date > b.start_date ? -1 : b.start_date > a.start_date ? 1 : 0;
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
const eventPathPrefix = to.path.split("/")[1];
|
|
80
|
+
next("/" + eventPathPrefix + "/" + matchedConfs[0].id);
|
|
81
|
+
} else {
|
|
82
|
+
next("/");
|
|
83
|
+
}
|
|
84
|
+
}
|
|
53
85
|
const routeParamId = parseInt(to.params.id);
|
|
54
86
|
if (routeName.includes("events-id") && routeParamId) {
|
|
55
87
|
await conferencesStore.getSelectedConference(routeParamId, false).then(() => {
|
|
@@ -118,6 +150,7 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
118
150
|
twitterDescription: metaDesc,
|
|
119
151
|
twitterImage: socialImage
|
|
120
152
|
});
|
|
153
|
+
next();
|
|
121
154
|
});
|
|
122
155
|
router.afterEach(() => {
|
|
123
156
|
NProgress.done();
|
|
@@ -10,6 +10,7 @@ export declare const useConferencesStore: import("pinia").StoreDefinition<"confe
|
|
|
10
10
|
pastEvents: (state: ConferencesState) => Conference[];
|
|
11
11
|
}, {
|
|
12
12
|
getConferences(): Promise<Conference[]>;
|
|
13
|
+
searchConferenceAffiliatesCustom1(code: string): Conference[];
|
|
13
14
|
getSelectedConference(id: number, skipDetails?: boolean): Promise<Conference>;
|
|
14
15
|
getCurrentConference(skipDetails?: boolean): Promise<Conference>;
|
|
15
16
|
getRegisteredConferences(): Conference[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineStore } from "pinia";
|
|
2
|
-
import { findLast, find } from "lodash-es";
|
|
2
|
+
import { findLast, find, get } from "lodash-es";
|
|
3
3
|
import { useApi } from "../composables/useApi.mjs";
|
|
4
4
|
import { ConferenceState } from "../models/conference.mjs";
|
|
5
5
|
import { useTemplateConfigsStore } from "./templateConfigs.mjs";
|
|
@@ -39,6 +39,15 @@ export const useConferencesStore = defineStore("conferences", {
|
|
|
39
39
|
});
|
|
40
40
|
});
|
|
41
41
|
},
|
|
42
|
+
searchConferenceAffiliatesCustom1(code) {
|
|
43
|
+
const matchedConfs = this.conferenceList.filter(function(conf) {
|
|
44
|
+
const custom1Affiliates = get(conf, "affiliates", []).filter(function(aff) {
|
|
45
|
+
return aff.role == "custom1" && aff.code == code;
|
|
46
|
+
});
|
|
47
|
+
return custom1Affiliates.length > 0;
|
|
48
|
+
});
|
|
49
|
+
return matchedConfs;
|
|
50
|
+
},
|
|
42
51
|
getSelectedConference(id, skipDetails) {
|
|
43
52
|
return new Promise((resolve, reject) => {
|
|
44
53
|
if (skipDetails === true) {
|