Rename store function
This commit is contained in:
parent
4a3eb72416
commit
6a4f795801
|
|
@ -11,7 +11,7 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import * as log from "loglevel";
|
||||
import log from "loglevel";
|
||||
|
||||
import AppFooter from "@/components/AppFooter.vue";
|
||||
import MainNavigationBar from "@/components/MainNavigationBar.vue";
|
||||
|
|
|
|||
|
|
@ -116,14 +116,14 @@ import ItRadioGroup from "@/components/ui/ItRadioGroup.vue";
|
|||
import ItTextarea from "@/components/ui/ItTextarea.vue";
|
||||
import { graphql } from "@/gql/";
|
||||
import type { SendFeedbackInput } from "@/gql/graphql";
|
||||
import { useSetupCourseSessionsStore } from "@/stores/courseSessions";
|
||||
import { useCourseSessionsStore } from "@/stores/courseSessions";
|
||||
import type { LearningContent } from "@/types";
|
||||
import { useMutation } from "@urql/vue";
|
||||
import log from "loglevel";
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
|
||||
const props = defineProps<{ page: LearningContent }>();
|
||||
const courseSessionsStore = useSetupCourseSessionsStore();
|
||||
const courseSessionsStore = useCourseSessionsStore();
|
||||
|
||||
onMounted(async () => {
|
||||
log.debug("Feedback mounted");
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
<script setup lang="ts">
|
||||
import * as log from "loglevel";
|
||||
import log from "loglevel";
|
||||
|
||||
import IconLogout from "@/components/icons/IconLogout.vue";
|
||||
import IconSettings from "@/components/icons/IconSettings.vue";
|
||||
import MobileMenu from "@/components/MobileMenu.vue";
|
||||
import ItDropdown from "@/components/ui/ItDropdown.vue";
|
||||
import { useAppStore } from "@/stores/app";
|
||||
import { useSetupCourseSessionsStore } from "@/stores/courseSessions";
|
||||
import { useCourseSessionsStore } from "@/stores/courseSessions";
|
||||
import { useUserStore } from "@/stores/user";
|
||||
import type { DropdownListItem } from "@/types";
|
||||
import type { Component } from "vue";
|
||||
|
|
@ -26,7 +26,7 @@ const route = useRoute();
|
|||
const router = useRouter();
|
||||
const userStore = useUserStore();
|
||||
const appStore = useAppStore();
|
||||
const courseSessionsStore = useSetupCourseSessionsStore();
|
||||
const courseSessionsStore = useCourseSessionsStore();
|
||||
|
||||
const { t } = useI18n();
|
||||
const state = reactive({ showMenu: false });
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import LearningPathDiagramSmall from "@/components/learningPath/LearningPathDiagramSmall.vue";
|
||||
import { useSetupCourseSessionsStore } from "@/stores/courseSessions";
|
||||
import { useCourseSessionsStore } from "@/stores/courseSessions";
|
||||
import { useUserStore } from "@/stores/user";
|
||||
import log from "loglevel";
|
||||
import { onMounted } from "vue";
|
||||
|
|
@ -8,7 +8,7 @@ import { onMounted } from "vue";
|
|||
log.debug("DashboardPage created");
|
||||
|
||||
const userStore = useUserStore();
|
||||
const courseSessionsStore = useSetupCourseSessionsStore();
|
||||
const courseSessionsStore = useCourseSessionsStore();
|
||||
|
||||
function employer() {
|
||||
return userStore.email === "bianca.muster@eiger-versicherungen.ch"
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ import CircleOverview from "@/components/learningPath/CircleOverview.vue";
|
|||
import LearningSequence from "@/components/learningPath/LearningSequence.vue";
|
||||
import ItDropdownSelect from "@/components/ui/ItDropdownSelect.vue";
|
||||
import ItModal from "@/components/ui/ItModal.vue";
|
||||
import * as log from "loglevel";
|
||||
import log from "loglevel";
|
||||
import { computed, onMounted, reactive, ref } from "vue";
|
||||
|
||||
import { useAppStore } from "@/stores/app";
|
||||
import { useCircleStore } from "@/stores/circle";
|
||||
import { useSetupCourseSessionsStore } from "@/stores/courseSessions";
|
||||
import { useCourseSessionsStore } from "@/stores/courseSessions";
|
||||
import type { CourseSessionUser } from "@/types";
|
||||
import { humanizeDuration } from "@/utils/humanizeDuration";
|
||||
import _ from "lodash";
|
||||
|
|
@ -18,7 +18,7 @@ import { useRoute } from "vue-router";
|
|||
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
const courseSessionsStore = useSetupCourseSessionsStore();
|
||||
const courseSessionsStore = useCourseSessionsStore();
|
||||
|
||||
interface Props {
|
||||
courseSlug: string;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ function loadCourseSessionsData(reload = false) {
|
|||
return { courseSessions };
|
||||
}
|
||||
|
||||
export const useSetupCourseSessionsStore = defineStore("courseSessionsSetup", () => {
|
||||
export const useCourseSessionsStore = defineStore("courseSessionsSetup", () => {
|
||||
// using setup function seems cleaner, see https://pinia.vuejs.org/core-concepts/#setup-stores
|
||||
|
||||
// this will become a state variable (like each other `ref()`
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
import * as log from "loglevel";
|
||||
import log from "loglevel";
|
||||
|
||||
import { bustItGetCache, itGetCached, itPost } from "@/fetchHelpers";
|
||||
import { useAppStore } from "@/stores/app";
|
||||
// import { useSetupCourseSessionsStore } from "@/stores/courseSessions";
|
||||
import { defineStore } from "pinia";
|
||||
|
||||
const logoutRedirectUrl = import.meta.env.VITE_LOGOUT_REDIRECT;
|
||||
|
|
|
|||
Loading…
Reference in New Issue