From cc55ac6684ad57c6d801d897e7f2328d9a64fea2 Mon Sep 17 00:00:00 2001 From: Mehdi104797 <92753457+Mehdi104797@users.noreply.github.com> Date: Thu, 1 May 2025 13:23:46 +0330 Subject: [PATCH] =?UTF-8?q?=D8=AA=D8=BA=DB=8C=DB=8C=D8=B1=D8=A7=D8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/MainSection.vue | 20 +++++++++++++++++--- components/RightSection.vue | 3 ++- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/components/MainSection.vue b/components/MainSection.vue index dd49620..f541730 100644 --- a/components/MainSection.vue +++ b/components/MainSection.vue @@ -856,10 +856,24 @@ export default { }, }, components: { - TaskForm: () => import("@task/components/TaskForm"), - HoursForm: () => import("@task/components/HoursForm"), + TaskForm: defineAsyncComponent(() => + import("@task/components/TaskForm") + ), + HoursForm: defineAsyncComponent(() => + import("@task/components/HoursForm") + ), + Multiselect: defineAsyncComponent(() => + import("vue-multiselect") + ), - Multiselect: () => import("vue-multiselect"), + + + + + // TaskForm: () => import("@task/components/TaskForm"), + // HoursForm: () => import("@task/components/HoursForm"), + + // Multiselect: () => import("vue-multiselect"), // datePicker: VuePersianDatetimePicker, }, }; diff --git a/components/RightSection.vue b/components/RightSection.vue index 23a932c..9945d58 100644 --- a/components/RightSection.vue +++ b/components/RightSection.vue @@ -192,10 +192,11 @@ export default { beforeMount() { // this.httpService = new HttpService(this.taskMicroServiceName); this.httpService = useNuxtApp()["$http"]; + const { $eventBus } = useNuxtApp(); this.activeUserId = this.currentUser.user_id; // event fired from MainSection.vue. - this.$root.$on("request-based-on-new-user-data", (userId) => { + $eventBus.on("request-based-on-new-user-data", (userId) => { this.activeUserId = userId; this.getWorkingHoursInformation(); });