diff --git a/src/components/my-request/MyRequestFilterBar.vue b/src/components/my-request/MyRequestFilterBar.vue index 4d90dd5e..f8980594 100644 --- a/src/components/my-request/MyRequestFilterBar.vue +++ b/src/components/my-request/MyRequestFilterBar.vue @@ -42,14 +42,17 @@ import FilterDropdownMulti from '../filters/FilterDropdownMulti.vue' import FilterInput from '../filters/FilterInput.vue' import { useRequestParamsChange } from '../hooks/useRequestParamsChange' import { getCategory } from '@/api/common' +import { useMemberStore } from '@/stores/member' const store = useRequestParamsStore() store.$reset() const onParamsChange = useRequestParamsChange() +const { isLogined } = useMemberStore() const { data } = useQuery({ queryKey: ['category'], - queryFn: getCategory + queryFn: getCategory, + enabled: !!isLogined }) diff --git a/src/components/my-request/MyRequestList.vue b/src/components/my-request/MyRequestList.vue index 8409cfd3..a2f2bc88 100644 --- a/src/components/my-request/MyRequestList.vue +++ b/src/components/my-request/MyRequestList.vue @@ -33,6 +33,7 @@ import ListPagination from '../lists/ListPagination.vue' import NoContent from '../lists/NoContent.vue' import MyRequestListBar from './MyRequestListBar.vue' import MyRequestListCard from './MyRequestListCard.vue' +import { useMemberStore } from '@/stores/member' const { params } = useRequestParamsStore() const onPageChange = (value: number) => { @@ -46,9 +47,11 @@ const fetchMyRequestList = async () => { return response.data } +const { isLogined } = useMemberStore() const { data } = useQuery({ queryKey: ['myRequest', params], - queryFn: fetchMyRequestList + queryFn: fetchMyRequestList, + enabled: !!isLogined }) const totalPage = computed(() => { diff --git a/src/components/my-task/MyTaskList.vue b/src/components/my-task/MyTaskList.vue index 6e1c03dd..017e3417 100644 --- a/src/components/my-task/MyTaskList.vue +++ b/src/components/my-task/MyTaskList.vue @@ -33,6 +33,7 @@ import type { MyTaskResponse } from '@/types/manager' import { useQuery } from '@tanstack/vue-query' import { computed } from 'vue' import NoContent from '../lists/NoContent.vue' +import { useMemberStore } from '@/stores/member' const { params } = useRequestParamsStore() const onPageChange = (value: number) => { @@ -46,9 +47,11 @@ const fetchMyTaskList = async () => { return response.data } +const { isLogined } = useMemberStore() const { data } = useQuery({ queryKey: ['myTask', params], - queryFn: fetchMyTaskList + queryFn: fetchMyTaskList, + enabled: !!isLogined }) const totalPage = computed(() => { diff --git a/src/components/request-history/RequestHistoryList.vue b/src/components/request-history/RequestHistoryList.vue index f3ef6028..9acf0b90 100644 --- a/src/components/request-history/RequestHistoryList.vue +++ b/src/components/request-history/RequestHistoryList.vue @@ -33,6 +33,7 @@ import { useQuery } from '@tanstack/vue-query' import { computed } from 'vue' import type { RequestHistoryResponse } from '@/types/manager' import NoContent from '../lists/NoContent.vue' +import { useMemberStore } from '@/stores/member' const { params } = useRequestParamsStore() const onPageChange = (value: number) => { @@ -46,9 +47,11 @@ const fetchRequestHistoryList = async () => { return response.data } +const { isLogined } = useMemberStore() const { data } = useQuery({ queryKey: ['requestHistory', params], - queryFn: fetchRequestHistoryList + queryFn: fetchRequestHistoryList, + enabled: !!isLogined }) const totalPage = computed(() => { diff --git a/src/components/request-task/CategoryDropDown.vue b/src/components/request-task/CategoryDropDown.vue index 5e3a78b9..1950c7f6 100644 --- a/src/components/request-task/CategoryDropDown.vue +++ b/src/components/request-task/CategoryDropDown.vue @@ -17,8 +17,8 @@ ref="htmlRef" class="relative flex">

{{ modelValue?.name ?? labelName + '를 선택해주세요' }} diff --git a/src/components/requested/RequestedList.vue b/src/components/requested/RequestedList.vue index a2defa6f..06f509fa 100644 --- a/src/components/requested/RequestedList.vue +++ b/src/components/requested/RequestedList.vue @@ -33,6 +33,7 @@ import { useQuery } from '@tanstack/vue-query' import { computed } from 'vue' import type { RequestedResponse } from '@/types/manager' import NoContent from '../lists/NoContent.vue' +import { useMemberStore } from '@/stores/member' const { params } = useRequestParamsStore() const onPageChange = (value: number) => { @@ -46,9 +47,11 @@ const fetchRequestedList = async () => { return response.data } +const { isLogined } = useMemberStore() const { data } = useQuery({ queryKey: ['requested', params], - queryFn: fetchRequestedList + queryFn: fetchRequestedList, + enabled: !!isLogined }) const totalPage = computed(() => { diff --git a/src/components/requested/RequestedListCard.vue b/src/components/requested/RequestedListCard.vue index d73509fe..a307ee7b 100644 --- a/src/components/requested/RequestedListCard.vue +++ b/src/components/requested/RequestedListCard.vue @@ -30,7 +30,7 @@ diff --git a/src/components/statistics/StatisticsCard.vue b/src/components/statistics/StatisticsCard.vue index 84f1f439..351b8330 100644 --- a/src/components/statistics/StatisticsCard.vue +++ b/src/components/statistics/StatisticsCard.vue @@ -35,6 +35,7 @@ import type { PeriodType } from '@/types/manager' import { axiosInstance } from '@/utils/axios' import { useQuery } from '@tanstack/vue-query' import type { StatisticsData } from '@/types/admin' +import { useMemberStore } from '@/stores/member' const { title, statisticsType, chartType } = defineProps<{ title: string @@ -64,9 +65,11 @@ const fetchStatistics = async () => { return response.data } +const { isLogined } = useMemberStore() const { data } = useQuery({ queryKey: computed(() => [statisticsType, periodType]), - queryFn: fetchStatistics + queryFn: fetchStatistics, + enabled: !!isLogined }) const labels = computed(() => { diff --git a/src/components/statistics/StatisticsCategoryCard.vue b/src/components/statistics/StatisticsCategoryCard.vue index 371b4641..e99036ff 100644 --- a/src/components/statistics/StatisticsCategoryCard.vue +++ b/src/components/statistics/StatisticsCategoryCard.vue @@ -37,6 +37,7 @@ import type { PeriodType } from '@/types/manager' import { axiosInstance } from '@/utils/axios' import { useQuery } from '@tanstack/vue-query' import type { StatisticsData } from '@/types/admin' +import { useMemberStore } from '@/stores/member' const periodType = ref('DAY') const changePeriod = (newPeriodType: PeriodType) => { @@ -56,9 +57,11 @@ const fetchMainStatistics = async () => { return response.data } +const { isLogined } = useMemberStore() const { data: mainData } = useQuery({ queryKey: computed(() => ['REQUEST_BY_CATEGORY', periodType]), - queryFn: fetchMainStatistics + queryFn: fetchMainStatistics, + enabled: !!isLogined }) const mainLabels = computed(() => { return mainData.value?.map(el => el.key) || [] diff --git a/src/components/task-detail/TaskDetail.vue b/src/components/task-detail/TaskDetail.vue index 920ec75b..2d37d717 100644 --- a/src/components/task-detail/TaskDetail.vue +++ b/src/components/task-detail/TaskDetail.vue @@ -7,7 +7,7 @@

+ class="flex flex-col overflow-y-auto rounded-lg w-[calc(100%-96px)] max-w-[1104px] min-w-[768px] h-[calc(100%-96px)] bg-white shadow-custom py-6 fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-50">
-
+ class="w-full flex relative overflow-y-auto"> +
-
-
+
+
+
+
+ userProfile +
+

+ {{ modelValue }} +

+
+ +
+
-
+ v-for="option in options" + :key="option" + class="task-detail-dropdown-option justify-between" + @click="selectOption(option)"> +
userProfile
-

- {{ modelValue }} +

+ {{ option }}

- -
-
-
-
-
- userProfile -
-

- {{ option }} -

-
-

잔여 작업 : {{ 3 }}

-
+

잔여 작업 : {{ 3 }}

@@ -48,6 +48,7 @@ import { dropdownIcon } from '@/constants/iconPath' import type { TaskDetailDropdownProps } from '@/types/user' import { ref } from 'vue' import CommonIcons from '../common/CommonIcons.vue' +import { useOutsideClick } from '../hooks/useOutsideClick' const { options, modelValue, processor } = defineProps() const emit = defineEmits(['update:modelValue']) @@ -61,4 +62,6 @@ const selectOption = (option: string) => { emit('update:modelValue', option) dropdownOpen.value = false } + +const { htmlRef } = useOutsideClick(() => dropdownOpen.value && toggleDropdown()) diff --git a/src/components/task-detail/TaskDetailLeft.vue b/src/components/task-detail/TaskDetailLeft.vue index ca4e215d..c7b12d6e 100644 --- a/src/components/task-detail/TaskDetailLeft.vue +++ b/src/components/task-detail/TaskDetailLeft.vue @@ -14,11 +14,11 @@

부가 설명

-

+

{{ data.description }}

-
+

첨부 파일

diff --git a/src/components/task-detail/TaskDetailManagerDropdown.vue b/src/components/task-detail/TaskDetailManagerDropdown.vue index 772ded8f..df36a88d 100644 --- a/src/components/task-detail/TaskDetailManagerDropdown.vue +++ b/src/components/task-detail/TaskDetailManagerDropdown.vue @@ -1,47 +1,43 @@