Skip to content

Commit 90260ea

Browse files
authored
Merge pull request #116 from TaskFlow-CLAP/CLAP-311
CLAP-311 Token 관련 핸들링 완료
2 parents 7b59131 + 3b43a02 commit 90260ea

20 files changed

+140
-124
lines changed

src/components/my-request/MyRequestFilterBar.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,17 @@ import FilterDropdownMulti from '../filters/FilterDropdownMulti.vue'
4242
import FilterInput from '../filters/FilterInput.vue'
4343
import { useRequestParamsChange } from '../hooks/useRequestParamsChange'
4444
import { getCategory } from '@/api/common'
45+
import { useMemberStore } from '@/stores/member'
4546
4647
const store = useRequestParamsStore()
4748
store.$reset()
4849
4950
const onParamsChange = useRequestParamsChange()
5051
52+
const { isLogined } = useMemberStore()
5153
const { data } = useQuery({
5254
queryKey: ['category'],
53-
queryFn: getCategory
55+
queryFn: getCategory,
56+
enabled: !!isLogined
5457
})
5558
</script>

src/components/my-request/MyRequestList.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import ListPagination from '../lists/ListPagination.vue'
3333
import NoContent from '../lists/NoContent.vue'
3434
import MyRequestListBar from './MyRequestListBar.vue'
3535
import MyRequestListCard from './MyRequestListCard.vue'
36+
import { useMemberStore } from '@/stores/member'
3637
3738
const { params } = useRequestParamsStore()
3839
const onPageChange = (value: number) => {
@@ -46,9 +47,11 @@ const fetchMyRequestList = async () => {
4647
return response.data
4748
}
4849
50+
const { isLogined } = useMemberStore()
4951
const { data } = useQuery<MyRequestResponse>({
5052
queryKey: ['myRequest', params],
51-
queryFn: fetchMyRequestList
53+
queryFn: fetchMyRequestList,
54+
enabled: !!isLogined
5255
})
5356
5457
const totalPage = computed(() => {

src/components/my-task/MyTaskList.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import type { MyTaskResponse } from '@/types/manager'
3333
import { useQuery } from '@tanstack/vue-query'
3434
import { computed } from 'vue'
3535
import NoContent from '../lists/NoContent.vue'
36+
import { useMemberStore } from '@/stores/member'
3637
3738
const { params } = useRequestParamsStore()
3839
const onPageChange = (value: number) => {
@@ -46,9 +47,11 @@ const fetchMyTaskList = async () => {
4647
return response.data
4748
}
4849
50+
const { isLogined } = useMemberStore()
4951
const { data } = useQuery<MyTaskResponse>({
5052
queryKey: ['myTask', params],
51-
queryFn: fetchMyTaskList
53+
queryFn: fetchMyTaskList,
54+
enabled: !!isLogined
5255
})
5356
5457
const totalPage = computed(() => {

src/components/request-history/RequestHistoryList.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import { useQuery } from '@tanstack/vue-query'
3333
import { computed } from 'vue'
3434
import type { RequestHistoryResponse } from '@/types/manager'
3535
import NoContent from '../lists/NoContent.vue'
36+
import { useMemberStore } from '@/stores/member'
3637
3738
const { params } = useRequestParamsStore()
3839
const onPageChange = (value: number) => {
@@ -46,9 +47,11 @@ const fetchRequestHistoryList = async () => {
4647
return response.data
4748
}
4849
50+
const { isLogined } = useMemberStore()
4951
const { data } = useQuery<RequestHistoryResponse>({
5052
queryKey: ['requestHistory', params],
51-
queryFn: fetchRequestHistoryList
53+
queryFn: fetchRequestHistoryList,
54+
enabled: !!isLogined
5255
})
5356
5457
const totalPage = computed(() => {

src/components/request-task/CategoryDropDown.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
ref="htmlRef"
1818
class="relative flex">
1919
<div
20-
class="flex w-full h-11 items-center rounded p-4 border border-border-1 cursor-pointer text-black"
21-
:class="isDisabled ? 'bg-background-2' : 'bg-white'"
20+
class="flex w-full h-11 items-center rounded p-4 border border-border-1 text-black"
21+
:class="isDisabled ? 'bg-background-2 cursor-default' : 'bg-white cursor-pointer'"
2222
@click="toggleDropdown">
2323
<p :class="{ 'text-disabled': !modelValue?.name }">
2424
{{ modelValue?.name ?? labelName + '를 선택해주세요' }}

src/components/requested/RequestedList.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import { useQuery } from '@tanstack/vue-query'
3333
import { computed } from 'vue'
3434
import type { RequestedResponse } from '@/types/manager'
3535
import NoContent from '../lists/NoContent.vue'
36+
import { useMemberStore } from '@/stores/member'
3637
3738
const { params } = useRequestParamsStore()
3839
const onPageChange = (value: number) => {
@@ -46,9 +47,11 @@ const fetchRequestedList = async () => {
4647
return response.data
4748
}
4849
50+
const { isLogined } = useMemberStore()
4951
const { data } = useQuery<RequestedResponse>({
5052
queryKey: ['requested', params],
51-
queryFn: fetchRequestedList
53+
queryFn: fetchRequestedList,
54+
enabled: !!isLogined
5255
})
5356
5457
const totalPage = computed(() => {

src/components/requested/RequestedListCard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
<ModalView
3232
:is-open="isModalVisible.reject"
33-
@update:model-value="value => (rejectReason = value)"
33+
@update:model-value="value => (rejectReason = value || '')"
3434
type="inputType"
3535
@close="closeModal"
3636
@click="rejectRequest">

src/components/statistics/StatisticsCard.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import type { PeriodType } from '@/types/manager'
3535
import { axiosInstance } from '@/utils/axios'
3636
import { useQuery } from '@tanstack/vue-query'
3737
import type { StatisticsData } from '@/types/admin'
38+
import { useMemberStore } from '@/stores/member'
3839
3940
const { title, statisticsType, chartType } = defineProps<{
4041
title: string
@@ -64,9 +65,11 @@ const fetchStatistics = async () => {
6465
return response.data
6566
}
6667
68+
const { isLogined } = useMemberStore()
6769
const { data } = useQuery<StatisticsData[]>({
6870
queryKey: computed(() => [statisticsType, periodType]),
69-
queryFn: fetchStatistics
71+
queryFn: fetchStatistics,
72+
enabled: !!isLogined
7073
})
7174
7275
const labels = computed(() => {

src/components/statistics/StatisticsCategoryCard.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import type { PeriodType } from '@/types/manager'
3737
import { axiosInstance } from '@/utils/axios'
3838
import { useQuery } from '@tanstack/vue-query'
3939
import type { StatisticsData } from '@/types/admin'
40+
import { useMemberStore } from '@/stores/member'
4041
4142
const periodType = ref<PeriodType>('DAY')
4243
const changePeriod = (newPeriodType: PeriodType) => {
@@ -56,9 +57,11 @@ const fetchMainStatistics = async () => {
5657
5758
return response.data
5859
}
60+
const { isLogined } = useMemberStore()
5961
const { data: mainData } = useQuery<StatisticsData[]>({
6062
queryKey: computed(() => ['REQUEST_BY_CATEGORY', periodType]),
61-
queryFn: fetchMainStatistics
63+
queryFn: fetchMainStatistics,
64+
enabled: !!isLogined
6265
})
6366
const mainLabels = computed(() => {
6467
return mainData.value?.map(el => el.key) || []

src/components/task-detail/TaskDetail.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<div
88
v-if="selectedId"
99
@click.stop
10-
class="flex flex-col overflow-y-auto rounded-lg w-full max-w-[1104px] min-w-[768px] h-[calc(100%-96px)] bg-white shadow-custom p-6 fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-50">
10+
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">
1111
<TaskDetailTopBar
1212
v-if="data"
1313
:is-approved="isApproved"
@@ -17,8 +17,8 @@
1717
:isRequestor="data?.requesterNickName === info.nickname" />
1818
<div
1919
v-if="data"
20-
class="w-full flex gap-6 relative overflow-y-auto">
21-
<div class="w-full flex flex-col gap-y-8 overflow-y-auto scrollbar-hide">
20+
class="w-full flex relative overflow-y-auto">
21+
<div class="w-full flex flex-col gap-y-8 overflow-y-auto scrollbar-hide p-6">
2222
<TaskDetailLeft :data="data" />
2323
<div class="w-full h-[1px] bg-border-1 shrink-0"></div>
2424
<TaskDetailHistory

0 commit comments

Comments
 (0)