From f42a4d88c114b39ad78be3da69c1b2ae646dd5a2 Mon Sep 17 00:00:00 2001 From: seorang42 Date: Sun, 2 Feb 2025 00:40:26 +0900 Subject: [PATCH 001/180] =?UTF-8?q?=EC=8A=B9=EC=9D=B8=20=EB=8C=80=EA=B8=B0?= =?UTF-8?q?=20=EC=A4=91=EC=9D=B8=20=EC=9A=94=EC=B2=AD=20=EB=AA=A9=EB=A1=9D?= =?UTF-8?q?=20=EC=A1=B0=ED=9A=8C=20API=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/my-request/MyRequestList.vue | 4 +- .../requested/RequestedFilterBar.vue | 2 +- src/components/requested/RequestedList.vue | 41 ++++++++++++++++--- .../requested/RequestedListCard.vue | 3 +- src/types/manager.ts | 10 +++++ 5 files changed, 50 insertions(+), 10 deletions(-) diff --git a/src/components/my-request/MyRequestList.vue b/src/components/my-request/MyRequestList.vue index b91f588a..6b558595 100644 --- a/src/components/my-request/MyRequestList.vue +++ b/src/components/my-request/MyRequestList.vue @@ -39,7 +39,7 @@ const onPageChange = (value: number) => { params.page = value } -const fetchRequestList = async () => { +const fetchMyRequestList = async () => { const { parseRequestParams } = useParseParams() const parsedParams = parseRequestParams(params) const response = await axiosInstance.get('/api/tasks/requests', { @@ -53,7 +53,7 @@ const fetchRequestList = async () => { const { data } = useQuery({ queryKey: ['myRequest', params], - queryFn: fetchRequestList + queryFn: fetchMyRequestList }) watch( diff --git a/src/components/requested/RequestedFilterBar.vue b/src/components/requested/RequestedFilterBar.vue index 7c28ce9e..0539f796 100644 --- a/src/components/requested/RequestedFilterBar.vue +++ b/src/components/requested/RequestedFilterBar.vue @@ -16,7 +16,7 @@ :value="store.params.title" @update:value="onParamsChange.onTitleChange" /> + @@ -24,15 +25,43 @@ import ListPagination from '../lists/ListPagination.vue' import ListContainer from '../lists/ListContainer.vue' import RequestedListBar from './RequestedListBar.vue' -import { DUMMY_REQUESTED_LIST_DATA } from '@/datas/dummy' import RequestedListCard from './RequestedListCard.vue' import { useRequestParamsStore } from '@/stores/params' +import { useParseParams } from '../hooks/useParseParams' +import axiosInstance from '@/utils/axios' +import { useQuery } from '@tanstack/vue-query' +import { ref, watch } from 'vue' +import type { RequestedResponse } from '@/types/manager' +import NoContent from '../lists/NoContent.vue' const { params } = useRequestParamsStore() -const DUMMY_TOTAL_PAGE = 18 const onPageChange = (value: number) => { params.page = value } -// Data Handling +const fetchRequestedList = async () => { + const { parseRequestParams } = useParseParams() + const parsedParams = parseRequestParams(params) + const response = await axiosInstance.get('/api/tasks/requests/pending', { + headers: { + Authorization: `Bearer ${import.meta.env.VITE_ACCESS_TOKEN}` + }, + params: parsedParams + }) + return response.data +} + +const { data } = useQuery({ + queryKey: ['requested', params], + queryFn: fetchRequestedList +}) + +watch( + data, + () => { + if (data.value?.totalPages) totalPage.value = data.value.totalPages + }, + { once: true } +) +const totalPage = ref(0) diff --git a/src/components/requested/RequestedListCard.vue b/src/components/requested/RequestedListCard.vue index 889e0a96..6782eb0e 100644 --- a/src/components/requested/RequestedListCard.vue +++ b/src/components/requested/RequestedListCard.vue @@ -24,10 +24,11 @@ import type { ListCardProps } from '@/types/common' import ListCardTab from '../lists/ListCardTab.vue' import type { RequestedListData } from '@/types/manager' import { useRouter } from 'vue-router' +import { formatDate } from '@/utils/date' const { info } = defineProps<{ info: RequestedListData }>() const requestedTabList: ListCardProps[] = [ - { content: info.requestedAt, width: 80 }, + { content: formatDate(info.requestedAt), width: 80 }, { content: info.mainCategoryName, width: 80 }, { content: info.categoryName, width: 80 }, { content: info.title }, diff --git a/src/types/manager.ts b/src/types/manager.ts index 0f398bd4..38b5daa2 100644 --- a/src/types/manager.ts +++ b/src/types/manager.ts @@ -120,3 +120,13 @@ export interface DraggableEvent { newIndex: number } } + +export interface RequestedResponse { + content: RequestedListData[] + totalElements: number + totalPages: number + pageNumber: number + pageSize: number + isFirst: boolean + isLast: boolean +} From 1055c33b4d73175b4d0718c1e15d26ab4bcb0c62 Mon Sep 17 00:00:00 2001 From: seorang42 Date: Sun, 2 Feb 2025 00:56:14 +0900 Subject: [PATCH 002/180] =?UTF-8?q?=EC=A0=84=EC=B2=B4=20=EC=9A=94=EC=B2=AD?= =?UTF-8?q?=20=EA=B8=B0=EB=A1=9D=20=EB=AA=A9=EB=A1=9D=20=EC=A1=B0=ED=9A=8C?= =?UTF-8?q?=20API=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/my-request/MyRequestList.vue | 22 +++++++----- .../request-history/RequestHistoryList.vue | 34 +++++++++++++++---- .../RequestHistoryListCard.vue | 5 +-- src/components/requested/RequestedList.vue | 15 +++----- src/types/manager.ts | 10 ++++++ 5 files changed, 59 insertions(+), 27 deletions(-) diff --git a/src/components/my-request/MyRequestList.vue b/src/components/my-request/MyRequestList.vue index 6b558595..4d02af29 100644 --- a/src/components/my-request/MyRequestList.vue +++ b/src/components/my-request/MyRequestList.vue @@ -15,7 +15,7 @@ @@ -33,6 +33,15 @@ import ListPagination from '../lists/ListPagination.vue' import NoContent from '../lists/NoContent.vue' import MyRequestListBar from './MyRequestListBar.vue' import MyRequestListCard from './MyRequestListCard.vue' +import ListPagination from '../lists/ListPagination.vue' +import ListContainer from '../lists/ListContainer.vue' +import { useRequestParamsStore } from '@/stores/params' +import axiosInstance from '@/utils/axios' +import { useQuery } from '@tanstack/vue-query' +import { useParseParams } from '../hooks/useParseParams' +import type { MyRequestResponse } from '@/types/user' +import { computed } from 'vue' +import NoContent from '../lists/NoContent.vue' const { params } = useRequestParamsStore() const onPageChange = (value: number) => { @@ -56,12 +65,7 @@ const { data } = useQuery({ queryFn: fetchMyRequestList }) -watch( - data, - () => { - if (data.value?.totalPages) totalPage.value = data.value.totalPages - }, - { once: true } -) -const totalPage = ref(0) +const totalPage = computed(() => { + return data.value?.totalPages +}) diff --git a/src/components/request-history/RequestHistoryList.vue b/src/components/request-history/RequestHistoryList.vue index 67c2f0a8..1eee4df0 100644 --- a/src/components/request-history/RequestHistoryList.vue +++ b/src/components/request-history/RequestHistoryList.vue @@ -6,15 +6,15 @@ @@ -23,16 +23,38 @@ diff --git a/src/components/request-history/RequestHistoryListCard.vue b/src/components/request-history/RequestHistoryListCard.vue index e13bd529..e2f2bc87 100644 --- a/src/components/request-history/RequestHistoryListCard.vue +++ b/src/components/request-history/RequestHistoryListCard.vue @@ -15,17 +15,18 @@ import type { ListCardProps } from '@/types/common' import ListCardTab from '../lists/ListCardTab.vue' import type { RequestHistoryListData } from '@/types/manager' +import { formatDate } from '@/utils/date' const { info } = defineProps<{ info: RequestHistoryListData }>() const myRequestTabList: ListCardProps[] = [ { content: info.taskCode, width: 120, isTextXs: true }, - { content: info.requestedAt, width: 80 }, + { content: formatDate(info.requestedAt), width: 80 }, { content: info.mainCategoryName, width: 80 }, { content: info.categoryName, width: 80 }, { content: info.title }, { content: info.requesterName, width: 120, profileImg: info.requesterImg }, { content: info.processorName, width: 120, profileImg: info.processorImg }, { content: info.taskStatus, width: 64, isStatus: true }, - { content: info.finishedAt, width: 80 } + { content: info.finishedAt ? formatDate(info.finishedAt) : '', width: 80 } ] diff --git a/src/components/requested/RequestedList.vue b/src/components/requested/RequestedList.vue index 43f52a12..63766955 100644 --- a/src/components/requested/RequestedList.vue +++ b/src/components/requested/RequestedList.vue @@ -15,7 +15,7 @@ @@ -30,7 +30,7 @@ import { useRequestParamsStore } from '@/stores/params' import { useParseParams } from '../hooks/useParseParams' import axiosInstance from '@/utils/axios' import { useQuery } from '@tanstack/vue-query' -import { ref, watch } from 'vue' +import { computed } from 'vue' import type { RequestedResponse } from '@/types/manager' import NoContent from '../lists/NoContent.vue' @@ -56,12 +56,7 @@ const { data } = useQuery({ queryFn: fetchRequestedList }) -watch( - data, - () => { - if (data.value?.totalPages) totalPage.value = data.value.totalPages - }, - { once: true } -) -const totalPage = ref(0) +const totalPage = computed(() => { + return data.value?.totalPages +}) diff --git a/src/types/manager.ts b/src/types/manager.ts index 38b5daa2..24a61661 100644 --- a/src/types/manager.ts +++ b/src/types/manager.ts @@ -130,3 +130,13 @@ export interface RequestedResponse { isFirst: boolean isLast: boolean } + +export interface RequestHistoryResponse { + content: RequestHistoryListData[] + totalElements: number + totalPages: number + pageNumber: number + pageSize: number + isFirst: boolean + isLast: boolean +} From 1a78397e41b225e8939f3ddfdc2d989037e566d0 Mon Sep 17 00:00:00 2001 From: seorang42 Date: Sun, 2 Feb 2025 01:03:46 +0900 Subject: [PATCH 003/180] =?UTF-8?q?=EB=82=B4=20=EC=9E=91=EC=97=85=20?= =?UTF-8?q?=EB=AA=A9=EB=A1=9D=20=EC=A1=B0=ED=9A=8C=20API=20=EC=97=B0?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/my-task/MyTaskList.vue | 36 +- src/components/my-task/MyTaskListCard.vue | 5 +- .../request-history/RequestHistoryList.vue | 2 + src/datas/dummy.ts | 712 +----------------- src/types/manager.ts | 10 + 5 files changed, 46 insertions(+), 719 deletions(-) diff --git a/src/components/my-task/MyTaskList.vue b/src/components/my-task/MyTaskList.vue index 533fd104..40dc1f21 100644 --- a/src/components/my-task/MyTaskList.vue +++ b/src/components/my-task/MyTaskList.vue @@ -6,15 +6,16 @@ @@ -23,16 +24,39 @@ diff --git a/src/components/my-task/MyTaskListCard.vue b/src/components/my-task/MyTaskListCard.vue index 109b304d..1130aaed 100644 --- a/src/components/my-task/MyTaskListCard.vue +++ b/src/components/my-task/MyTaskListCard.vue @@ -15,16 +15,17 @@ import type { ListCardProps } from '@/types/common' import ListCardTab from '../lists/ListCardTab.vue' import type { MyTaskListData } from '@/types/manager' +import { formatDate } from '@/utils/date' const { info } = defineProps<{ info: MyTaskListData }>() const myRequestTabList: ListCardProps[] = [ { content: info.taskCode, width: 120, isTextXs: true }, - { content: info.requestedAt, width: 80 }, + { content: formatDate(info.requestedAt), width: 80 }, { content: info.mainCategoryName, width: 80 }, { content: info.categoryName, width: 80 }, { content: info.title }, { content: info.requesterName, width: 120, profileImg: info.requesterImg }, { content: info.taskStatus, width: 64, isStatus: true }, - { content: info.finishedAt, width: 80 } + { content: info.finishedAt ? formatDate(info.finishedAt) : '', width: 80 } ] diff --git a/src/components/request-history/RequestHistoryList.vue b/src/components/request-history/RequestHistoryList.vue index 1eee4df0..1f5d0281 100644 --- a/src/components/request-history/RequestHistoryList.vue +++ b/src/components/request-history/RequestHistoryList.vue @@ -9,6 +9,7 @@ v-for="info in data?.content" :key="info.taskId" :info="info" /> + From 1863dc8f7d6b57fd841be494b4f1cd36c457a0b0 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sun, 2 Feb 2025 14:59:57 +0900 Subject: [PATCH 059/180] =?UTF-8?q?:recycle:=20[refactor]=20:=20=EA=B5=AC?= =?UTF-8?q?=EB=B6=84=20=EC=82=AD=EC=A0=9C=20api=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/admin.ts | 4 ++-- .../task-management/LabelManagementLine.vue | 21 +++++++++++-------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/api/admin.ts b/src/api/admin.ts index f8e075f6..c3d4d687 100644 --- a/src/api/admin.ts +++ b/src/api/admin.ts @@ -5,7 +5,7 @@ export const getLabelsAdmin = async () => { return response.data } -export const deleteLabelAdmin = async (id: string) => { - const response = await axiosInstance.delete(`/api/managements/labels/${id}`) +export const deleteLabelAdmin = async (id: number) => { + const response = await axiosInstance.delete(`/api/management/labels/${id}`) return response.data } diff --git a/src/components/task-management/LabelManagementLine.vue b/src/components/task-management/LabelManagementLine.vue index f4068134..e5e2931d 100644 --- a/src/components/task-management/LabelManagementLine.vue +++ b/src/components/task-management/LabelManagementLine.vue @@ -53,7 +53,8 @@ + @close="handleDeleteModal" + @click="deleteLabel(label.labelId)"> @@ -62,6 +63,7 @@ diff --git a/src/components/task-management/LabelManagementLine.vue b/src/components/task-management/LabelManagementLine.vue index 238c93ed..02c7afcb 100644 --- a/src/components/task-management/LabelManagementLine.vue +++ b/src/components/task-management/LabelManagementLine.vue @@ -15,15 +15,12 @@ @click="isEdit && clickColor(label.labelId)">

- +

+
+
+ + +
+
+ + +
@@ -66,21 +68,22 @@ import CommonIcons from '../common/CommonIcons.vue' import ColorSelectModal from './ColorSelectModal.vue' import LabelManagementLine from './LabelManagementLine.vue' -onMounted(async () => { - const Labels = await getLabelsAdmin() - labelData.value = Labels -}) - const labelData = ref([]) - const newLabel = ref({ labelName: '', labelColor: 'RED' }) - const isColorVisible = ref(false) const isAdd = ref(false) +const fetchLabels = async () => { + labelData.value = await getLabelsAdmin() +} + +onMounted(async () => { + fetchLabels() +}) + const handleAdd = () => { isAdd.value = !isAdd.value } @@ -93,10 +96,12 @@ const updateLabelColor = (color: LabelColorTypes) => { newLabel.value.labelColor = color.colorEnum } -const addNewLabel = () => { +const addNewLabel = async () => { if (newLabel.value.labelName !== '') { - postAddLabelAdmin(newLabel.value) + await postAddLabelAdmin(newLabel.value) + newLabel.value.labelName = '' handleAdd() + fetchLabels() } } diff --git a/src/components/task-management/LabelManagementLine.vue b/src/components/task-management/LabelManagementLine.vue index fb4c3d97..3d3517b7 100644 --- a/src/components/task-management/LabelManagementLine.vue +++ b/src/components/task-management/LabelManagementLine.vue @@ -57,7 +57,7 @@ :is-open="isModalVisible" @close="handleDeleteModal(null)" @click="deleteLabel(selectedLabelId || 0)"> - + @@ -85,6 +85,8 @@ const editValue = ref({ labelId: 0 }) +const emit = defineEmits(['updateLabels']) + const handleDeleteModal = (labelId: number | null) => { isModalVisible.value = !isModalVisible.value selectedLabelId.value = labelId @@ -95,7 +97,8 @@ const handleColorModal = () => (isColorModalVisible.value = !isColorModalVisible const handleEdit = () => (isEdit.value = !isEdit.value) const deleteLabel = async (labelId: number) => { - deleteLabelAdmin(labelId) + await deleteLabelAdmin(labelId) + emit('updateLabels') handleDeleteModal(0) } @@ -116,5 +119,6 @@ const updateLabelColor = (color: LabelColorTypes) => { const finishEdit = () => { handleEdit() patchLabelAdmin(editValue.value) + emit('updateLabels') } From d175bebd5d1809e288630dbad047db75e26adcec Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sun, 2 Feb 2025 21:40:51 +0900 Subject: [PATCH 065/180] =?UTF-8?q?:recycle:=20[refactor]=20:=20axios=20?= =?UTF-8?q?=EC=9D=B8=EC=8A=A4=ED=84=B4=EC=8A=A4=20=EB=B6=88=ED=95=84?= =?UTF-8?q?=EC=9A=94=20=EC=BD=98=EC=86=94=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/axios.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/utils/axios.ts b/src/utils/axios.ts index ae769d70..2531c53c 100644 --- a/src/utils/axios.ts +++ b/src/utils/axios.ts @@ -11,7 +11,6 @@ const setInterceptors = (instance: AxiosInstance) => { if (token) { config.headers.Authorization = `Bearer ${token}` } - console.log(token, '으로 요청 중') } return config }, From c821f0f0b4509daacfca3179b3b031c3260c4a39 Mon Sep 17 00:00:00 2001 From: seorang42 Date: Sun, 2 Feb 2025 00:56:14 +0900 Subject: [PATCH 066/180] =?UTF-8?q?=EC=A0=84=EC=B2=B4=20=EC=9A=94=EC=B2=AD?= =?UTF-8?q?=20=EA=B8=B0=EB=A1=9D=20=EB=AA=A9=EB=A1=9D=20=EC=A1=B0=ED=9A=8C?= =?UTF-8?q?=20API=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/my-request/MyRequestList.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/my-request/MyRequestList.vue b/src/components/my-request/MyRequestList.vue index 78d4b07e..a95ea458 100644 --- a/src/components/my-request/MyRequestList.vue +++ b/src/components/my-request/MyRequestList.vue @@ -33,6 +33,15 @@ import ListPagination from '../lists/ListPagination.vue' import NoContent from '../lists/NoContent.vue' import MyRequestListBar from './MyRequestListBar.vue' import MyRequestListCard from './MyRequestListCard.vue' +import ListPagination from '../lists/ListPagination.vue' +import ListContainer from '../lists/ListContainer.vue' +import { useRequestParamsStore } from '@/stores/params' +import axiosInstance from '@/utils/axios' +import { useQuery } from '@tanstack/vue-query' +import { useParseParams } from '../hooks/useParseParams' +import type { MyRequestResponse } from '@/types/user' +import { computed } from 'vue' +import NoContent from '../lists/NoContent.vue' const { params } = useRequestParamsStore() const onPageChange = (value: number) => { From 165ffc5fad4b03e3b73bed7c6f3328bd5699b410 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sat, 1 Feb 2025 17:55:52 +0900 Subject: [PATCH 067/180] =?UTF-8?q?:sparkles:=20[feat]=20:=20=ED=8F=BC?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EC=9A=94=EC=B2=AD=20api=20?= =?UTF-8?q?=ED=98=95=EC=8B=9D=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/axios.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/axios.ts b/src/utils/axios.ts index 2531c53c..ae769d70 100644 --- a/src/utils/axios.ts +++ b/src/utils/axios.ts @@ -11,6 +11,7 @@ const setInterceptors = (instance: AxiosInstance) => { if (token) { config.headers.Authorization = `Bearer ${token}` } + console.log(token, '으로 요청 중') } return config }, From 74598f8b5ab6ed607f14ff3b0ac144a0530e6cef Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sat, 1 Feb 2025 20:03:17 +0900 Subject: [PATCH 068/180] =?UTF-8?q?:recycle:=20[refactor]=20:=20prop?= =?UTF-8?q?=EB=8C=80=EC=8B=A0=20=EC=A7=81=EC=A0=91=20=EA=B0=80=EC=A0=B8?= =?UTF-8?q?=EC=98=A4=EA=B8=B0,=20=ED=8C=8C=EC=9D=BC=20=EC=B4=88=EA=B8=B0?= =?UTF-8?q?=EA=B0=92=20=EB=B0=B0=EC=97=B4=EB=A1=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/request-task/RequestTask.vue | 23 +++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/components/request-task/RequestTask.vue b/src/components/request-task/RequestTask.vue index f6e56e6a..4c990021 100644 --- a/src/components/request-task/RequestTask.vue +++ b/src/components/request-task/RequestTask.vue @@ -36,10 +36,10 @@ From c92bafa2ba440fb1c22423e8fc6ce8626a91c958 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sun, 2 Feb 2025 02:19:43 +0900 Subject: [PATCH 069/180] =?UTF-8?q?:recycle:=20[refactor]=20:=201,2?= =?UTF-8?q?=EC=B0=A8=20=EC=B9=B4=ED=85=8C=EA=B3=A0=EB=A6=AC=20=ED=83=80?= =?UTF-8?q?=EC=9E=85=20=EC=84=A0=EC=96=B8=20=EB=B0=8F=20=EC=9C=84=EC=B9=98?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/types/common.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/types/common.ts b/src/types/common.ts index 566155d0..b316789b 100644 --- a/src/types/common.ts +++ b/src/types/common.ts @@ -105,3 +105,30 @@ export interface LabelColorTypes { fillColor: string colorEnum: string } + +export interface LabelDataTypes { + labelId: number + labelName: string + labelColor: string +} + +export interface MainCategoryTypes { + id: number + name: string + code: string +} + +export interface SubCategoryTypes { + id: number + mainCategoryId: number + name: string + code: string +} + +export interface CategoryDropdownProps { + placeholderText: string + options: MainCategoryTypes[] | SubCategoryTypes[] + labelName: string + modelValue: string + isLabel?: boolean +} From 4f9f5ef011ace3f3511f0d7334568cc77e41b899 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sun, 2 Feb 2025 03:07:11 +0900 Subject: [PATCH 070/180] =?UTF-8?q?:sparkles:=20[feat]=20:=20=EC=B9=B4?= =?UTF-8?q?=ED=85=8C=EA=B3=A0=EB=A6=AC=EC=9A=A9=20=EB=93=9C=EB=A1=AD?= =?UTF-8?q?=EB=8B=A4=EC=9A=B4=20=EA=B0=9C=EB=B3=84=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/request-task/CategoryDropDown.vue | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/components/request-task/CategoryDropDown.vue b/src/components/request-task/CategoryDropDown.vue index 7f377299..609ebdae 100644 --- a/src/components/request-task/CategoryDropDown.vue +++ b/src/components/request-task/CategoryDropDown.vue @@ -7,18 +7,13 @@ class="text-red-1"> *

-

- 카테고리를 선택해주세요 -

- {{ modelValue?.name ?? labelName + '를 선택해주세요' }} + {{ modelValue?.name ?? placeholderText }}

import { dropdownIcon } from '@/constants/iconPath' import type { CategoryDropdownProps, MainCategoryTypes, SubCategoryTypes } from '@/types/common' -import { computed, ref } from 'vue' +import { ref } from 'vue' import CommonIcons from '../common/CommonIcons.vue' -const { options, labelName, modelValue, isLabel, isDisabled, isInvalidate } = +const { placeholderText, options, labelName, modelValue, isLabel, isDisabled } = defineProps() - -const isInvalidateState = computed(() => isInvalidate) - const emit = defineEmits(['update:modelValue']) const dropdownOpen = ref(false) From ed8a3c82c0427475ad980b853ef9f3ffb35233e6 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sun, 2 Feb 2025 03:11:02 +0900 Subject: [PATCH 071/180] =?UTF-8?q?:sparkles:=20[feat]=20:=20=EC=9A=94?= =?UTF-8?q?=EC=B2=AD=20=EC=83=9D=EC=84=B1=20api=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/request-task/RequestTask.vue | 27 ++++++--------------- src/types/common.ts | 3 ++- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/src/components/request-task/RequestTask.vue b/src/components/request-task/RequestTask.vue index 4c990021..b6c8bbd5 100644 --- a/src/components/request-task/RequestTask.vue +++ b/src/components/request-task/RequestTask.vue @@ -4,13 +4,13 @@ v-model="category1" :options="mainCategoryArr" :label-name="'1차 카테고리'" - :isInvalidate="isInvalidate" + :placeholderText="'1차 카테고리를 선택해주세요'" :isDisabled="false" /> diff --git a/src/types/common.ts b/src/types/common.ts index b316789b..b74a73f8 100644 --- a/src/types/common.ts +++ b/src/types/common.ts @@ -129,6 +129,7 @@ export interface CategoryDropdownProps { placeholderText: string options: MainCategoryTypes[] | SubCategoryTypes[] labelName: string - modelValue: string + modelValue: MainCategoryTypes | SubCategoryTypes | null isLabel?: boolean + isDisabled?: boolean } From 2745ffdac15895087b73f619b806ca4bdd0eb8d8 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sun, 2 Feb 2025 11:51:43 +0900 Subject: [PATCH 072/180] =?UTF-8?q?:sparkles:=20[feat]=20:=20=EC=A0=95?= =?UTF-8?q?=EB=B3=B4=20=EB=88=84=EB=9D=BD=EC=8B=9C=20=EA=B2=BD=EA=B3=A0=20?= =?UTF-8?q?=ED=85=8D=EC=8A=A4=ED=8A=B8=20=EC=B6=9C=EB=A0=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/request-task/CategoryDropDown.vue | 12 ++++++++++-- src/components/request-task/RequestTask.vue | 15 ++++++++++++--- src/types/common.ts | 1 + 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/components/request-task/CategoryDropDown.vue b/src/components/request-task/CategoryDropDown.vue index 609ebdae..8ab78003 100644 --- a/src/components/request-task/CategoryDropDown.vue +++ b/src/components/request-task/CategoryDropDown.vue @@ -7,6 +7,11 @@ class="text-red-1"> *

+

+ 카테고리를 선택해주세요 +

import { dropdownIcon } from '@/constants/iconPath' import type { CategoryDropdownProps, MainCategoryTypes, SubCategoryTypes } from '@/types/common' -import { ref } from 'vue' +import { computed, ref } from 'vue' import CommonIcons from '../common/CommonIcons.vue' -const { placeholderText, options, labelName, modelValue, isLabel, isDisabled } = +const { placeholderText, options, labelName, modelValue, isLabel, isDisabled, isInvalidate } = defineProps() + +const isInvalidateState = computed(() => isInvalidate) + const emit = defineEmits(['update:modelValue']) const dropdownOpen = ref(false) diff --git a/src/components/request-task/RequestTask.vue b/src/components/request-task/RequestTask.vue index b6c8bbd5..22fddf5f 100644 --- a/src/components/request-task/RequestTask.vue +++ b/src/components/request-task/RequestTask.vue @@ -5,16 +5,18 @@ :options="mainCategoryArr" :label-name="'1차 카테고리'" :placeholderText="'1차 카테고리를 선택해주세요'" + :isInvalidate="isInvalidate" :isDisabled="false" /> ([]) const subCategoryArr = ref([]) @@ -85,9 +86,17 @@ const handleCancel = () => { } const handleSubmit = async () => { + if (!category1.value || !category2.value) { + isInvalidate.value = 'category' + console.log(isInvalidate.value, '변경됨') + return + } else if (!title.value) { + isInvalidate.value = 'input' + return + } const formData = new FormData() const taskInfo = { - categoryId: category2.value?.id, + categoryId: category2.value.id, title: title.value, description: description.value } diff --git a/src/types/common.ts b/src/types/common.ts index b74a73f8..98346976 100644 --- a/src/types/common.ts +++ b/src/types/common.ts @@ -132,4 +132,5 @@ export interface CategoryDropdownProps { modelValue: MainCategoryTypes | SubCategoryTypes | null isLabel?: boolean isDisabled?: boolean + isInvalidate?: string } From b9ef1b0ff596192094bd90c0703827fca8ddc78f Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sun, 2 Feb 2025 12:03:33 +0900 Subject: [PATCH 073/180] =?UTF-8?q?:sparkles:=20[feat]=20:=20=EC=9A=94?= =?UTF-8?q?=EC=B2=AD=20=EC=99=84=EB=A3=8C=20=ED=9B=84=20=EB=AA=A8=EB=8B=AC?= =?UTF-8?q?=20=EB=B0=8F=20=EB=9D=BC=EC=9A=B0=ED=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/request-task/RequestTask.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/request-task/RequestTask.vue b/src/components/request-task/RequestTask.vue index 22fddf5f..397725e8 100644 --- a/src/components/request-task/RequestTask.vue +++ b/src/components/request-task/RequestTask.vue @@ -45,6 +45,7 @@ import type { MainCategoryTypes, SubCategoryTypes } from '@/types/common' import { onMounted, ref, watch } from 'vue' import { useRouter } from 'vue-router' import FormButtonContainer from '../common/FormButtonContainer.vue' +import ModalView from '../ModalView.vue' import CategoryDropDown from './CategoryDropDown.vue' import RequestTaskFileInput from './RequestTaskFileInput.vue' import RequestTaskInput from './RequestTaskInput.vue' @@ -57,6 +58,7 @@ const title = ref('') const description = ref('') const file = ref(null as File[] | null) const isInvalidate = ref('') +const isModalVisible = ref(false) const mainCategoryArr = ref([]) const subCategoryArr = ref([]) @@ -112,6 +114,7 @@ const handleSubmit = async () => { } try { const res = await postTaskRequest(formData) + isModalVisible.value = true console.error('요청 성공:', res) } catch (error) { console.error('요청 실패:', error) From 989bb7a7dae1c4aa758cf4c320fd2b140544c53b Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sun, 2 Feb 2025 12:09:51 +0900 Subject: [PATCH 074/180] =?UTF-8?q?:recycle:=20[refactor]=20:=20axios=20in?= =?UTF-8?q?stance=20=EA=B0=9D=EC=B2=B4=20=EB=B6=84=EB=A6=AC=ED=95=B4?= =?UTF-8?q?=EC=84=9C=20import?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/my-request/MyRequestList.vue | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/components/my-request/MyRequestList.vue b/src/components/my-request/MyRequestList.vue index a95ea458..c310c969 100644 --- a/src/components/my-request/MyRequestList.vue +++ b/src/components/my-request/MyRequestList.vue @@ -26,22 +26,13 @@ import { useRequestParamsStore } from '@/stores/params' import type { MyRequestResponse } from '@/types/user' import { axiosInstance } from '@/utils/axios' import { useQuery } from '@tanstack/vue-query' -import { computed, ref, watch } from 'vue' +import { ref, watch } from 'vue' import { useParseParams } from '../hooks/useParseParams' import ListContainer from '../lists/ListContainer.vue' import ListPagination from '../lists/ListPagination.vue' import NoContent from '../lists/NoContent.vue' import MyRequestListBar from './MyRequestListBar.vue' import MyRequestListCard from './MyRequestListCard.vue' -import ListPagination from '../lists/ListPagination.vue' -import ListContainer from '../lists/ListContainer.vue' -import { useRequestParamsStore } from '@/stores/params' -import axiosInstance from '@/utils/axios' -import { useQuery } from '@tanstack/vue-query' -import { useParseParams } from '../hooks/useParseParams' -import type { MyRequestResponse } from '@/types/user' -import { computed } from 'vue' -import NoContent from '../lists/NoContent.vue' const { params } = useRequestParamsStore() const onPageChange = (value: number) => { From 7640af734d23d918abcc0dbb509b7740c059a791 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sun, 2 Feb 2025 12:18:58 +0900 Subject: [PATCH 075/180] =?UTF-8?q?:recycle:=20[refactor]=20:=20=EC=B9=B4?= =?UTF-8?q?=ED=85=8C=EA=B3=A0=EB=A6=AC=20=EB=93=9C=EB=A1=AD=EB=8B=A4?= =?UTF-8?q?=EC=9A=B4=20placeholder=EC=97=86=EC=9D=B4,=20input=20placeholde?= =?UTF-8?q?r=20=EC=83=81=EC=88=98=ED=99=94=20=EC=B7=A8=EC=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/request-task/CategoryDropDown.vue | 4 ++-- src/components/request-task/RequestTask.vue | 9 ++------- src/types/common.ts | 1 - 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/components/request-task/CategoryDropDown.vue b/src/components/request-task/CategoryDropDown.vue index 8ab78003..7f377299 100644 --- a/src/components/request-task/CategoryDropDown.vue +++ b/src/components/request-task/CategoryDropDown.vue @@ -18,7 +18,7 @@ class="flex w-full h-11 items-center rounded p-4 bg-white border border-border-1 cursor-pointer text-black" @click="toggleDropdown">

- {{ modelValue?.name ?? placeholderText }} + {{ modelValue?.name ?? labelName + '를 선택해주세요' }}

() const isInvalidateState = computed(() => isInvalidate) diff --git a/src/components/request-task/RequestTask.vue b/src/components/request-task/RequestTask.vue index 397725e8..6c5b942a 100644 --- a/src/components/request-task/RequestTask.vue +++ b/src/components/request-task/RequestTask.vue @@ -4,19 +4,17 @@ v-model="category1" :options="mainCategoryArr" :label-name="'1차 카테고리'" - :placeholderText="'1차 카테고리를 선택해주세요'" :isInvalidate="isInvalidate" :isDisabled="false" /> import { getMainCategory, getSubCategory } from '@/api/common' import { postTaskRequest } from '@/api/user' -import { EXPLANATION_PLACEHOLDER, TITLE_PLACEHOLDER } from '@/constants/user' import type { MainCategoryTypes, SubCategoryTypes } from '@/types/common' import { onMounted, ref, watch } from 'vue' import { useRouter } from 'vue-router' @@ -108,9 +105,7 @@ const handleSubmit = async () => { formData.append('taskInfo', newBlob) if (file.value && file.value.length > 0) { - file.value.forEach(f => { - formData.append('attachment', f) - }) + file.value.forEach(f => formData.append('attachment', f)) } try { const res = await postTaskRequest(formData) diff --git a/src/types/common.ts b/src/types/common.ts index 98346976..1c911b87 100644 --- a/src/types/common.ts +++ b/src/types/common.ts @@ -126,7 +126,6 @@ export interface SubCategoryTypes { } export interface CategoryDropdownProps { - placeholderText: string options: MainCategoryTypes[] | SubCategoryTypes[] labelName: string modelValue: MainCategoryTypes | SubCategoryTypes | null From b7a4689aea6178c5bc3cbba2b1e707d1bafdd35c Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Mon, 3 Feb 2025 01:22:48 +0900 Subject: [PATCH 076/180] =?UTF-8?q?:recycle:=20[refactor]=20:=20test=20api?= =?UTF-8?q?=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/test.ts | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 src/api/test.ts diff --git a/src/api/test.ts b/src/api/test.ts deleted file mode 100644 index bb6f3d0b..00000000 --- a/src/api/test.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { axiosInstance } from '../utils/axios' - -export const getNotifications = async () => { - const response = await axiosInstance.get('/api/notifications?page=0&size=5') - return response.data -} - -export const postLogin = async (nickname: string, password: string) => { - const response = await axiosInstance.post('/api/auths/login', { nickname, password }) - return response.data -} - -export const patchReadNotification = async (notificationId: number) => { - const response = await axiosInstance.patch(`/api/notification/${notificationId}`) - return response.data -} From 2bfed9d061747e68ef9c54897ad354cc8e69e832 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Mon, 3 Feb 2025 01:41:08 +0900 Subject: [PATCH 077/180] =?UTF-8?q?:recycle:=20[refactor]=20:=20scrollbar-?= =?UTF-8?q?hide=20=EB=AF=B8=EC=A0=81=EC=9A=A9=20=EB=B6=80=EB=B6=84=20?= =?UTF-8?q?=EC=9E=AC=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tailwind.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tailwind.config.js b/tailwind.config.js index 1c82d585..1d44248d 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,4 +1,6 @@ /** @type {import('tailwindcss').Config} */ +import scrollbarHide from 'tailwind-scrollbar-hide' + export default { content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'], safelist: [ @@ -77,5 +79,5 @@ export default { } } }, - plugins: [import('tailwind-scrollbar-hide')] + plugins: [scrollbarHide] } From 9d4e1170e81f1f62de1988936ac6d2b4133e8d77 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Mon, 3 Feb 2025 01:41:34 +0900 Subject: [PATCH 078/180] =?UTF-8?q?:sparkles:=20[feat]=20:=20=EC=9E=91?= =?UTF-8?q?=EC=97=85=20=EA=B4=80=EB=A6=AC=20=EC=B9=B4=ED=85=8C=EA=B3=A0?= =?UTF-8?q?=EB=A6=AC=20=EC=A0=84=EC=B2=B4=20=EC=A1=B0=ED=9A=8C=20=EC=97=B0?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/common.ts | 5 +++++ .../task-management/CategoryManagement.vue | 17 ++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/api/common.ts b/src/api/common.ts index a0d4fd4e..ade690e6 100644 --- a/src/api/common.ts +++ b/src/api/common.ts @@ -9,3 +9,8 @@ export const getSubCategory = async () => { const response = await axiosInstance.get('/api/sub-category') return response.data } + +export const getAllCategory = async () => { + const response = await axiosInstance.get('/api/category') + return response.data +} diff --git a/src/components/task-management/CategoryManagement.vue b/src/components/task-management/CategoryManagement.vue index 9a4c5d73..17eec4cc 100644 --- a/src/components/task-management/CategoryManagement.vue +++ b/src/components/task-management/CategoryManagement.vue @@ -1,5 +1,6 @@ diff --git a/src/components/task-management/CategoryLineSub.vue b/src/components/task-management/CategoryLineSub.vue index 747947bc..cf8910d9 100644 --- a/src/components/task-management/CategoryLineSub.vue +++ b/src/components/task-management/CategoryLineSub.vue @@ -20,12 +20,20 @@ 수정
+ + + +
- - - - From 06b1e42c7922bc771105f9642153195fd3c6852e Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Mon, 3 Feb 2025 11:50:44 +0900 Subject: [PATCH 082/180] =?UTF-8?q?:recycle:=20[refactor]=20:=20=EC=B9=B4?= =?UTF-8?q?=ED=85=8C=EA=B3=A0=EB=A6=AC=20=EC=82=AD=EC=A0=9C=20=ED=9B=84=20?= =?UTF-8?q?=EC=B5=9C=EC=8B=A0=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EB=B0=98?= =?UTF-8?q?=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/task-management/CategoryLineSub.vue | 3 +++ src/components/task-management/LabelManagement.vue | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/task-management/CategoryLineSub.vue b/src/components/task-management/CategoryLineSub.vue index cf8910d9..c121ff91 100644 --- a/src/components/task-management/CategoryLineSub.vue +++ b/src/components/task-management/CategoryLineSub.vue @@ -49,6 +49,7 @@ import { deleteCategoryAdmin } from '@/api/admin' import { plusIcon } from '@/constants/iconPath' import type { CategoryAllData } from '@/types/admin' +import { useQueryClient } from '@tanstack/vue-query' import { defineProps, ref } from 'vue' import { useRouter } from 'vue-router' import ModalView from '../ModalView.vue' @@ -59,6 +60,7 @@ const router = useRouter() const isModalVisible = ref(false) const selectedId = ref(null) +const queryClient = useQueryClient() const openModal = (id: number) => { selectedId.value = id @@ -72,6 +74,7 @@ const closeModal = () => { const deleteCategory = async (id: number) => { await deleteCategoryAdmin(id) + queryClient.invalidateQueries({ queryKey: ['category'] }) closeModal() } diff --git a/src/components/task-management/LabelManagement.vue b/src/components/task-management/LabelManagement.vue index 5caabede..e5921789 100644 --- a/src/components/task-management/LabelManagement.vue +++ b/src/components/task-management/LabelManagement.vue @@ -7,7 +7,7 @@

구분명

-
+
From ccbc3faf24356c8397c731120e2206d274e72a98 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Mon, 3 Feb 2025 13:43:20 +0900 Subject: [PATCH 083/180] =?UTF-8?q?:sparkles:=20[feat]=20:=20=EA=B5=AC?= =?UTF-8?q?=EB=B6=84=20=EC=83=89=EC=83=81=20=EB=B3=B4=EC=97=AC=EC=A7=80?= =?UTF-8?q?=EB=8A=94=20=EB=B2=94=EC=9C=84=20=EC=A6=9D=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/task-management/ColorSelectModal.vue | 2 +- src/components/task-management/LabelManagement.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/task-management/ColorSelectModal.vue b/src/components/task-management/ColorSelectModal.vue index 1679d10a..814d57c9 100644 --- a/src/components/task-management/ColorSelectModal.vue +++ b/src/components/task-management/ColorSelectModal.vue @@ -1,7 +1,7 @@ diff --git a/src/components/task-detail/TaskDetailTopBar.vue b/src/components/task-detail/TaskDetailTopBar.vue index 27327e3e..78570883 100644 --- a/src/components/task-detail/TaskDetailTopBar.vue +++ b/src/components/task-detail/TaskDetailTopBar.vue @@ -1,5 +1,5 @@ diff --git a/src/components/task-detail/TaskDetailLeft.vue b/src/components/task-detail/TaskDetailLeft.vue index b1a7b60e..5cbe6c0e 100644 --- a/src/components/task-detail/TaskDetailLeft.vue +++ b/src/components/task-detail/TaskDetailLeft.vue @@ -2,23 +2,23 @@

1차 카테고리

-

{{ taskDetail.mainCategoryName }}

+

{{ data.mainCategoryName }}

2차 카테고리

-

{{ taskDetail.categoryName }}

+

{{ data.categoryName }}

제목

-

{{ taskDetail.title }}

+

{{ data.title }}

부가 설명

-

{{ taskDetail.description }}

+

{{ data.description }}

첨부 파일

- +
@@ -26,7 +26,7 @@ - - diff --git a/src/components/task-detail/TaskDetailRight.vue b/src/components/task-detail/TaskDetailRight.vue index a61e60f3..1870a782 100644 --- a/src/components/task-detail/TaskDetailRight.vue +++ b/src/components/task-detail/TaskDetailRight.vue @@ -2,30 +2,30 @@

ID

-

{{ taskDetail.taskId || '-' }}

+

{{ data.taskId || '-' }}

요청일

-

{{ formatDate(taskDetail.requestedAt) }}

+

{{ formatDate(data.requestedAt) }}

종료일

-

{{ formatDate(taskDetail.finishedAt) || '-' }}

+

{{ formatDate(data.finishedAt) || '-' }}

상태

- +

요청자

requesterImg -

{{ taskDetail.requesterNickName }}

+

{{ data.requesterNickName }}

@@ -40,17 +40,17 @@ v-else class="flex gap-2"> processorImg -

{{ taskDetail.processorNickName || '-' }}

+

{{ data.processorNickName || '-' }}

마감기한

-

{{ taskDetail.dueDate || '-' }}까지

+

{{ data.dueDate || '-' }}까지

변경

3일 전

@@ -60,21 +60,27 @@ + :processor="data.labelName" />
diff --git a/src/types/manager.ts b/src/types/manager.ts index 24a61661..854e752c 100644 --- a/src/types/manager.ts +++ b/src/types/manager.ts @@ -100,7 +100,6 @@ export interface MyTaskDetailDatas { } export interface TaskDetailTopBarProps { - isManager: boolean isApproved: boolean closeTaskDetail: () => void } diff --git a/src/types/user.ts b/src/types/user.ts index cabf8366..6e852f7f 100644 --- a/src/types/user.ts +++ b/src/types/user.ts @@ -115,7 +115,6 @@ export interface TaskDetailDropdownProps { export interface TaskDetailRightProps { taskDetail: TaskDetailDatas - isManager: boolean } export interface TaskDetailLabelDropdownProps { From 4b8c716ac91b96ea06dc1942fba8572bdfbcc47f Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Mon, 3 Feb 2025 15:20:11 +0900 Subject: [PATCH 086/180] =?UTF-8?q?:sparkles:=20[feat]=20:=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=EC=9E=90=EC=9D=98=20=EA=B6=8C=ED=95=9C=EC=97=90=20?= =?UTF-8?q?=EB=A7=9E=EB=8A=94=20=EB=B3=B4=EC=97=AC=EC=A3=BC=EA=B8=B0,=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EB=8B=A4=EC=9A=B4,=20=EC=9A=A9=ED=96=98?= =?UTF-8?q?=20=ED=91=9C=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/task-detail/TaskDetail.vue | 3 --- src/components/task-detail/TaskDetailFiles.vue | 11 ++++++++--- src/components/task-detail/TaskDetailLeft.vue | 2 +- src/components/task-detail/TaskDetailRight.vue | 14 +++++++------- src/types/user.ts | 2 +- src/utils/date.ts | 3 ++- 6 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/components/task-detail/TaskDetail.vue b/src/components/task-detail/TaskDetail.vue index 676f1646..2b6039e6 100644 --- a/src/components/task-detail/TaskDetail.vue +++ b/src/components/task-detail/TaskDetail.vue @@ -2,7 +2,6 @@
- {{ selectedId }} 요청 번호 @@ -40,6 +39,4 @@ const { data } = useQuery({ queryKey: ['taskDetailUser', selectedId], queryFn: () => getTaskDetailUser(selectedId) }) - -console.log(data, 'data') diff --git a/src/components/task-detail/TaskDetailFiles.vue b/src/components/task-detail/TaskDetailFiles.vue index bbc8959d..480b9eb1 100644 --- a/src/components/task-detail/TaskDetailFiles.vue +++ b/src/components/task-detail/TaskDetailFiles.vue @@ -18,7 +18,7 @@ class="flex w-full justify-between items-center h-8 text-xs border-b border-b-border-2 text-black px-4 shrink-0">

{{ file.fileName }}

-

{{ formatFileSize(Number(file.fileSize)) }}

+

{{ file.fileSize }}

{{ new Date().toLocaleString() }}

import { downloadIcon } from '@/constants/iconPath' import type { AttachmentResponse } from '@/types/user' -import { formatFileSize } from '@/utils/unit' import CommonIcons from '../common/CommonIcons.vue' const { files } = defineProps<{ files: AttachmentResponse[] }>() + const downloadFile = (file: AttachmentResponse) => { - console.log('향후 파일 다운 로직 추가', file) + const link = document.createElement('a') + link.href = file.fileUrl + link.download = file.fileName + document.body.appendChild(link) + link.click() + document.body.removeChild(link) } diff --git a/src/components/task-detail/TaskDetailLeft.vue b/src/components/task-detail/TaskDetailLeft.vue index 5cbe6c0e..0f466524 100644 --- a/src/components/task-detail/TaskDetailLeft.vue +++ b/src/components/task-detail/TaskDetailLeft.vue @@ -18,7 +18,7 @@

첨부 파일

- +
diff --git a/src/components/task-detail/TaskDetailRight.vue b/src/components/task-detail/TaskDetailRight.vue index 1870a782..614db82f 100644 --- a/src/components/task-detail/TaskDetailRight.vue +++ b/src/components/task-detail/TaskDetailRight.vue @@ -10,7 +10,9 @@

종료일

-

{{ formatDate(data.finishedAt) || '-' }}

+

+ {{ formatDate(data.finishedAt) || '-' }} +

상태

@@ -22,7 +24,7 @@

요청자

requesterImg

{{ data.requesterNickName }}

@@ -30,7 +32,7 @@

처리자

-
+
{{ data.processorNickName || '-' }}

-
+

마감기한

{{ data.dueDate || '-' }}까지

@@ -55,7 +57,7 @@

3일 전

-
+

구분

info.value.memberRole === 'ROLE_MANAGER') - const { data } = defineProps<{ data: TaskDetailDatas }>() const processor = ref(DUMMY_PROCESSOR.nickName) const labeling = ref(DUMMY_TASK_LABELS[0].labelName) - diff --git a/src/types/user.ts b/src/types/user.ts index 6e852f7f..97688607 100644 --- a/src/types/user.ts +++ b/src/types/user.ts @@ -61,7 +61,7 @@ export interface TaskDetailDatas { categoryName: string title: string description: string - attachmentResponse: AttachmentResponse[] + attachmentResponses: AttachmentResponse[] dueDate?: string labelName?: string } diff --git a/src/utils/date.ts b/src/utils/date.ts index a8aabe8b..ea13a64d 100644 --- a/src/utils/date.ts +++ b/src/utils/date.ts @@ -1,4 +1,5 @@ -export const formatDate = (dateString: string) => { +export const formatDate = (dateString: string | null) => { + if (dateString === null) return null const date = new Date(dateString) const year = date.getFullYear() From 8d1b849bb209109ea11d04d0f1516f4807364e14 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Mon, 3 Feb 2025 15:22:15 +0900 Subject: [PATCH 087/180] =?UTF-8?q?:sparkles:=20[feat]=20:=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=EC=9E=90=EC=9D=98=20=EA=B6=8C=ED=95=9C=EC=97=90=20?= =?UTF-8?q?=EB=A7=9E=EB=8A=94=20top=20bar=20+=20icon=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/task-detail/TaskDetailTopBar.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/task-detail/TaskDetailTopBar.vue b/src/components/task-detail/TaskDetailTopBar.vue index d1c3cbf5..f92730d7 100644 --- a/src/components/task-detail/TaskDetailTopBar.vue +++ b/src/components/task-detail/TaskDetailTopBar.vue @@ -17,7 +17,7 @@ @click="ApproveTask" v-if="isManager && !isApproved" class="flex gap-1 items-center cursor-pointer"> - +

요청 승인

- diff --git a/src/utils/date.ts b/src/utils/date.ts index ea13a64d..a8aabe8b 100644 --- a/src/utils/date.ts +++ b/src/utils/date.ts @@ -1,5 +1,4 @@ -export const formatDate = (dateString: string | null) => { - if (dateString === null) return null +export const formatDate = (dateString: string) => { const date = new Date(dateString) const year = date.getFullYear() From afef79f2b60b1e30b29a25c989b6605c39841955 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Mon, 3 Feb 2025 16:04:33 +0900 Subject: [PATCH 089/180] =?UTF-8?q?:recycle:=20[refactor]=20:=20=EC=B9=B4?= =?UTF-8?q?=ED=85=8C=EA=B3=A0=EB=A6=AC=20=ED=83=80=EC=9E=85=20=ED=86=B5?= =?UTF-8?q?=ED=95=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../request-task/CategoryDropDown.vue | 4 +-- src/components/request-task/RequestTask.vue | 12 ++++----- src/constants/admin.ts | 6 ++--- src/types/admin.ts | 11 ++------ src/types/common.ts | 26 +++++++------------ 5 files changed, 23 insertions(+), 36 deletions(-) diff --git a/src/components/request-task/CategoryDropDown.vue b/src/components/request-task/CategoryDropDown.vue index 7f377299..030e3e62 100644 --- a/src/components/request-task/CategoryDropDown.vue +++ b/src/components/request-task/CategoryDropDown.vue @@ -41,7 +41,7 @@ - - diff --git a/src/components/task-detail/TaskDetail.vue b/src/components/task-detail/TaskDetail.vue index 2b6039e6..90b4cb43 100644 --- a/src/components/task-detail/TaskDetail.vue +++ b/src/components/task-detail/TaskDetail.vue @@ -10,7 +10,7 @@ v-if="data">
-
+
diff --git a/src/components/task-detail/TaskDetailRight.vue b/src/components/task-detail/TaskDetailRight.vue index 6a29766f..8475afbf 100644 --- a/src/components/task-detail/TaskDetailRight.vue +++ b/src/components/task-detail/TaskDetailRight.vue @@ -1,5 +1,5 @@ From f0cae4e115efc3ebc9086c5613a900f84c55ecb2 Mon Sep 17 00:00:00 2001 From: seorang42 Date: Sun, 2 Feb 2025 23:59:19 +0900 Subject: [PATCH 098/180] =?UTF-8?q?:sparkles:=20[feat]=20:=20StatisticsCat?= =?UTF-8?q?egoryCard=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20API=20?= =?UTF-8?q?=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/statistics/StatisticsCard.vue | 19 ++--- .../statistics/StatisticsCategoryCard.vue | 69 ++++++++++++++++--- src/types/admin.ts | 5 ++ 3 files changed, 74 insertions(+), 19 deletions(-) diff --git a/src/components/statistics/StatisticsCard.vue b/src/components/statistics/StatisticsCard.vue index b106cea8..76d9a991 100644 --- a/src/components/statistics/StatisticsCard.vue +++ b/src/components/statistics/StatisticsCard.vue @@ -10,15 +10,15 @@
+ :labels="labels" + :series="series" />
@@ -32,6 +32,7 @@ import PeriodButtons from './PeriodButtons.vue' import type { PeriodType } from '@/types/manager' import axiosInstance from '@/utils/axios' import { useQuery } from '@tanstack/vue-query' +import type { StatisticsData } from '@/types/admin' const { title, statisticsType, chartType } = defineProps<{ title: string @@ -64,16 +65,16 @@ const fetchStatistics = async () => { return response.data } -const { data } = useQuery<{ key: string; count: number }[]>({ +const { data } = useQuery({ queryKey: [statisticsType, periodType], queryFn: fetchStatistics }) const labels = computed(() => { - return data.value?.map(el => el.key) + return data.value?.map(el => el.key) || [] }) const series = computed(() => { - return data.value?.map(el => el.count) + return data.value?.map(el => el.count) || [] }) diff --git a/src/components/statistics/StatisticsCategoryCard.vue b/src/components/statistics/StatisticsCategoryCard.vue index b7c1de43..6022c947 100644 --- a/src/components/statistics/StatisticsCategoryCard.vue +++ b/src/components/statistics/StatisticsCategoryCard.vue @@ -11,29 +11,29 @@
+ :key="JSON.stringify(subLabels) + mainCategory + periodType" + :labels="subLabels" + :series="subSeries" />
diff --git a/src/types/admin.ts b/src/types/admin.ts index 08589211..3f27bc28 100644 --- a/src/types/admin.ts +++ b/src/types/admin.ts @@ -56,3 +56,8 @@ export interface NewLabelTypes { labelName: string labelColor: string } + +export interface StatisticsData { + key: string + count: number +} From beef6e8bd105dce47be416d55202ddf38627c568 Mon Sep 17 00:00:00 2001 From: seorang42 Date: Mon, 3 Feb 2025 01:06:41 +0900 Subject: [PATCH 099/180] =?UTF-8?q?:sparkles:=20[feat]=20:=20=ED=86=B5?= =?UTF-8?q?=EA=B3=84=20=EB=8D=B0=EC=9D=B4=ED=84=B0=EA=B0=80=20=EC=97=86?= =?UTF-8?q?=EC=9D=84=20=EB=95=8C=EC=9D=98=20=EC=98=88=EC=99=B8=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/LineChart.vue | 5 +++++ src/components/PieChart.vue | 5 +++++ src/components/statistics/StatisticsCategoryCard.vue | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/LineChart.vue b/src/components/LineChart.vue index 3869debb..d0f3fe06 100644 --- a/src/components/LineChart.vue +++ b/src/components/LineChart.vue @@ -1,7 +1,11 @@ diff --git a/src/constants/admin.ts b/src/constants/admin.ts index 44c1e4be..80d934e3 100644 --- a/src/constants/admin.ts +++ b/src/constants/admin.ts @@ -41,6 +41,12 @@ export const CATEGORY_FORM: CategoryForm = { code: '' } +export const CATEGORY_SECOND_ADD: SubCategoryTypes = { + name: '', + mainCategoryId: 0, + code: '' +} + export const INITIAL_USER_REGISTRATION: UserRegistrationProps = { name: '', email: '', diff --git a/src/types/common.ts b/src/types/common.ts index b742633a..81d7afe7 100644 --- a/src/types/common.ts +++ b/src/types/common.ts @@ -111,14 +111,12 @@ export interface LabelDataTypes { labelColor: string } -export interface LabelColorTypes { - borderColor: string - fillColor: string - colorEnum: string +export interface MainCategoryTypes { + name: string + code: string } export interface SubCategoryTypes { - id: number mainCategoryId: number name: string code: string From 43f5db62fecd7899bd59bdcc7092d04a63bfae5a Mon Sep 17 00:00:00 2001 From: seorang42 Date: Sun, 2 Feb 2025 19:58:46 +0900 Subject: [PATCH 107/180] =?UTF-8?q?:sparkles:=20[feat]=20:=202=EC=B0=A8=20?= =?UTF-8?q?=EC=B9=B4=ED=85=8C=EA=B3=A0=EB=A6=AC=20=EC=B6=94=EA=B0=80=20API?= =?UTF-8?q?=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../task-management/CategoryAdd.vue | 42 ++++++++++++------- src/constants/admin.ts | 6 --- src/types/common.ts | 14 ++----- 3 files changed, 32 insertions(+), 30 deletions(-) diff --git a/src/components/task-management/CategoryAdd.vue b/src/components/task-management/CategoryAdd.vue index fc05ddc5..f96c4c2e 100644 --- a/src/components/task-management/CategoryAdd.vue +++ b/src/components/task-management/CategoryAdd.vue @@ -22,15 +22,15 @@ + v-if="categoryStep == '2'" /> + :label-name="`${categoryStep}차 카테고리명`" /> diff --git a/src/constants/admin.ts b/src/constants/admin.ts index 80d934e3..44c1e4be 100644 --- a/src/constants/admin.ts +++ b/src/constants/admin.ts @@ -41,12 +41,6 @@ export const CATEGORY_FORM: CategoryForm = { code: '' } -export const CATEGORY_SECOND_ADD: SubCategoryTypes = { - name: '', - mainCategoryId: 0, - code: '' -} - export const INITIAL_USER_REGISTRATION: UserRegistrationProps = { name: '', email: '', diff --git a/src/types/common.ts b/src/types/common.ts index 81d7afe7..5d69ec27 100644 --- a/src/types/common.ts +++ b/src/types/common.ts @@ -111,22 +111,16 @@ export interface LabelDataTypes { labelColor: string } -export interface MainCategoryTypes { - name: string - code: string -} - -export interface SubCategoryTypes { - mainCategoryId: number +export interface CategoryForm { name: string code: string + mainCategoryId?: number } export interface CategoryDropdownProps { - placeholderText: string - options: MainCategoryTypes[] | SubCategoryTypes[] + options: CategoryForm labelName: string - modelValue: MainCategoryTypes | SubCategoryTypes | null + modelValue?: CategoryForm isLabel?: boolean isDisabled?: boolean isInvalidate?: string From f10015e62f2e5b6207c64c65f0cd6c8520b7d865 Mon Sep 17 00:00:00 2001 From: seorang42 Date: Sun, 2 Feb 2025 00:56:14 +0900 Subject: [PATCH 108/180] =?UTF-8?q?=EC=A0=84=EC=B2=B4=20=EC=9A=94=EC=B2=AD?= =?UTF-8?q?=20=EA=B8=B0=EB=A1=9D=20=EB=AA=A9=EB=A1=9D=20=EC=A1=B0=ED=9A=8C?= =?UTF-8?q?=20API=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/my-request/MyRequestList.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/my-request/MyRequestList.vue b/src/components/my-request/MyRequestList.vue index 78d4b07e..849a36eb 100644 --- a/src/components/my-request/MyRequestList.vue +++ b/src/components/my-request/MyRequestList.vue @@ -26,13 +26,13 @@ import { useRequestParamsStore } from '@/stores/params' import type { MyRequestResponse } from '@/types/user' import { axiosInstance } from '@/utils/axios' import { useQuery } from '@tanstack/vue-query' -import { computed, ref, watch } from 'vue' import { useParseParams } from '../hooks/useParseParams' import ListContainer from '../lists/ListContainer.vue' import ListPagination from '../lists/ListPagination.vue' import NoContent from '../lists/NoContent.vue' import MyRequestListBar from './MyRequestListBar.vue' import MyRequestListCard from './MyRequestListCard.vue' +import { computed } from 'vue' const { params } = useRequestParamsStore() const onPageChange = (value: number) => { From 5d64277c487f93b89667fa5795a72316349176ba Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sat, 1 Feb 2025 20:03:17 +0900 Subject: [PATCH 109/180] =?UTF-8?q?:recycle:=20[refactor]=20:=20prop?= =?UTF-8?q?=EB=8C=80=EC=8B=A0=20=EC=A7=81=EC=A0=91=20=EA=B0=80=EC=A0=B8?= =?UTF-8?q?=EC=98=A4=EA=B8=B0,=20=ED=8C=8C=EC=9D=BC=20=EC=B4=88=EA=B8=B0?= =?UTF-8?q?=EA=B0=92=20=EB=B0=B0=EC=97=B4=EB=A1=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/request-task/RequestTask.vue | 19 +++++-------------- .../task-management/CategoryAdd.vue | 3 --- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/src/components/request-task/RequestTask.vue b/src/components/request-task/RequestTask.vue index 15fa33fb..5ae9e3ac 100644 --- a/src/components/request-task/RequestTask.vue +++ b/src/components/request-task/RequestTask.vue @@ -38,11 +38,10 @@ diff --git a/src/components/task-management/LabelManagement.vue b/src/components/task-management/LabelManagement.vue index 771f512d..cd248122 100644 --- a/src/components/task-management/LabelManagement.vue +++ b/src/components/task-management/LabelManagement.vue @@ -7,67 +7,78 @@

구분명

-
- -
- - 새 구분 추가 +
+ +
+
+ +

새 구분 추가

+
+
+
+
+ +
-
-
-
- - -
-
- - -
+
+ +
+
+ +
diff --git a/src/components/task-management/LabelManagementLine.vue b/src/components/task-management/LabelManagementLine.vue index d954c18d..2d797853 100644 --- a/src/components/task-management/LabelManagementLine.vue +++ b/src/components/task-management/LabelManagementLine.vue @@ -15,19 +15,20 @@ @click="isEdit && clickColor(label.labelId)">
+ :is-open="isColorModalVisible" + :label-id="label.labelId" + :selectedLabelId="selectedLabelId" + @close="closeColor" />

- {{ label.labelName }} + {{ labelData[0].labelName }}

@@ -37,11 +38,15 @@ {{ isEdit && editValue.labelId === label.labelId ? '확인' : '수정' }}
+<<<<<<< HEAD
구분을 삭제 하시겠습니까? +======= + + + + +
+>>>>>>> f078305 (:recycle: [refactor] : division -> label로 변경)
diff --git a/src/types/admin.ts b/src/types/admin.ts index 3f27bc28..8d5952f5 100644 --- a/src/types/admin.ts +++ b/src/types/admin.ts @@ -53,11 +53,6 @@ export interface LabelDataTypes { } export interface NewLabelTypes { - labelName: string - labelColor: string -} - -export interface StatisticsData { - key: string - count: number + divisionName: string + divisionColor: string } diff --git a/src/types/common.ts b/src/types/common.ts index ef3f1c5c..204f0aee 100644 --- a/src/types/common.ts +++ b/src/types/common.ts @@ -75,61 +75,7 @@ export interface FormCheckboxProps { } export interface ColorSelectProps { - isOpen: boolean -} - -export interface LabelDataTypes { labelId: number - labelName: string - labelColor: string -} - -export interface CategoryForm { - name: string - code: string - mainCategoryId?: number -} - -export interface CategoryForm { - name: string - code: string - mainCategoryId?: number -} - -export interface CategoryDropdownProps { - options: CategoryForm - labelName: string - modelValue?: CategoryForm - isLabel?: boolean - isDisabled?: boolean - isInvalidate?: string -} - -export interface LabelDataTypes { - labelId?: number - labelName: string - labelColor: string -} - -export interface MainCategoryTypes { - id: number - name: string - code: string -} - -export interface SubCategoryTypes { - id: number - mainCategoryId: number - name: string - code: string -} - -export interface CategoryDropdownProps { - placeholderText: string - options: MainCategoryTypes[] | SubCategoryTypes[] - labelName: string - modelValue: MainCategoryTypes | SubCategoryTypes | null - isLabel?: boolean - isDisabled?: boolean - isInvalidate?: string + selectedLabelId: number | null + isOpen: boolean } From 9e3f70b2429d4374f79994bd04849734948d3460 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sun, 2 Feb 2025 13:58:03 +0900 Subject: [PATCH 115/180] =?UTF-8?q?:recycle:=20[refactor]=20:=20=EB=9D=BC?= =?UTF-8?q?=EB=B2=A8=20=ED=83=80=EC=9E=85=20=EC=B6=94=EA=B0=80,=20division?= =?UTF-8?q?=20->=20label=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/types/common.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/types/common.ts b/src/types/common.ts index 204f0aee..dae879e7 100644 --- a/src/types/common.ts +++ b/src/types/common.ts @@ -79,3 +79,9 @@ export interface ColorSelectProps { selectedLabelId: number | null isOpen: boolean } + +export interface LabelDataTypes { + labelId: number + labelName: string + labelColor: string +} From 7f8459a0807500fa815b333a6bc62035252e6f20 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sun, 2 Feb 2025 14:18:16 +0900 Subject: [PATCH 116/180] =?UTF-8?q?:sparkles:=20[feat]=20:=20=EA=B4=80?= =?UTF-8?q?=EB=A6=AC=EC=9E=90=20=EA=B5=AC=EB=B6=84=EB=AA=A9=EB=A1=9D=20get?= =?UTF-8?q?=20api=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/admin.ts | 2 +- .../task-management/LabelManagement.vue | 127 ++++++------------ .../task-management/LabelManagementLine.vue | 2 +- src/datas/taskmanagement.ts | 50 +++++++ src/types/admin.ts | 4 +- src/types/common.ts | 22 +++ 6 files changed, 120 insertions(+), 87 deletions(-) create mode 100644 src/datas/taskmanagement.ts diff --git a/src/api/admin.ts b/src/api/admin.ts index 724a89b1..ee143eac 100644 --- a/src/api/admin.ts +++ b/src/api/admin.ts @@ -1,6 +1,6 @@ import { axiosInstance } from '@/utils/axios' -export const getDivisionsAdmin = async () => { +export const getLabelsAdmin = async () => { const response = await axiosInstance.get('/api/managements/labels') return response.data } diff --git a/src/components/task-management/LabelManagement.vue b/src/components/task-management/LabelManagement.vue index cd248122..771f512d 100644 --- a/src/components/task-management/LabelManagement.vue +++ b/src/components/task-management/LabelManagement.vue @@ -7,78 +7,67 @@

구분명

-
- -
-
- -

새 구분 추가

-
-
-
-
- - +
+ +
+ + 새 구분 추가
-
- - +
+
+
+ + +
+
+ + +
-
- -
diff --git a/src/components/task-management/LabelManagementLine.vue b/src/components/task-management/LabelManagementLine.vue index 2d797853..3db3fa4b 100644 --- a/src/components/task-management/LabelManagementLine.vue +++ b/src/components/task-management/LabelManagementLine.vue @@ -28,7 +28,7 @@

- {{ labelData[0].labelName }} + {{ label.labelName }}

diff --git a/src/datas/taskmanagement.ts b/src/datas/taskmanagement.ts new file mode 100644 index 00000000..822c2eab --- /dev/null +++ b/src/datas/taskmanagement.ts @@ -0,0 +1,50 @@ +import type { CategoryAllData } from '@/types/admin' + +export const mockCategoryAllData: CategoryAllData = { + categories: [ + { + id: 1, + name: 'VM', + code: 'VM001', + subCategory: [ + { + id: 1, + mainCategoryId: 1, + name: 'VM 생성', + code: 'VM_CR' + }, + { + id: 2, + mainCategoryId: 1, + name: 'VM 수정', + code: 'VM_UD' + }, + { + id: 3, + mainCategoryId: 1, + name: 'VM 삭제', + code: 'VM_DE' + } + ] + }, + { + id: 2, + name: 'NFS', + code: 'NFS001', + subCategory: [ + { + id: 4, + mainCategoryId: 2, + name: 'NFS 생성', + code: 'NFS_CR' + }, + { + id: 5, + mainCategoryId: 2, + name: 'NFS 수정', + code: 'NFS_UD' + } + ] + } + ] +} diff --git a/src/types/admin.ts b/src/types/admin.ts index 8d5952f5..08589211 100644 --- a/src/types/admin.ts +++ b/src/types/admin.ts @@ -53,6 +53,6 @@ export interface LabelDataTypes { } export interface NewLabelTypes { - divisionName: string - divisionColor: string + labelName: string + labelColor: string } diff --git a/src/types/common.ts b/src/types/common.ts index dae879e7..8e9eba27 100644 --- a/src/types/common.ts +++ b/src/types/common.ts @@ -80,6 +80,28 @@ export interface ColorSelectProps { isOpen: boolean } +export interface MainCategoryTypes { + id: number + name: string + code: string +} + +export interface SubCategoryTypes { + id: number + mainCategoryId: number + name: string + code: string +} + +export interface CategoryDropdownProps { + options: MainCategoryTypes[] | SubCategoryTypes[] + labelName: string + modelValue: MainCategoryTypes | SubCategoryTypes | null + isLabel?: boolean + isDisabled?: boolean + isInvalidate?: string +} + export interface LabelDataTypes { labelId: number labelName: string From 12b07a8a49af43a7483bffb1e7abdec86a9a9d57 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sun, 2 Feb 2025 14:45:41 +0900 Subject: [PATCH 117/180] =?UTF-8?q?:recycle:=20[refactor]=20:=20=EB=AA=A8?= =?UTF-8?q?=EB=8B=AC=20=EB=B0=8F=20=EC=83=81=ED=83=9C=EA=B4=80=EB=A6=AC=20?= =?UTF-8?q?=ED=95=A8=EC=88=98=20=ED=95=98=EB=82=98=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/admin.ts | 5 ++ .../task-management/LabelManagementLine.vue | 68 ++----------------- 2 files changed, 9 insertions(+), 64 deletions(-) diff --git a/src/api/admin.ts b/src/api/admin.ts index ee143eac..f8e075f6 100644 --- a/src/api/admin.ts +++ b/src/api/admin.ts @@ -4,3 +4,8 @@ export const getLabelsAdmin = async () => { const response = await axiosInstance.get('/api/managements/labels') return response.data } + +export const deleteLabelAdmin = async (id: string) => { + const response = await axiosInstance.delete(`/api/managements/labels/${id}`) + return response.data +} diff --git a/src/components/task-management/LabelManagementLine.vue b/src/components/task-management/LabelManagementLine.vue index 3db3fa4b..d954c18d 100644 --- a/src/components/task-management/LabelManagementLine.vue +++ b/src/components/task-management/LabelManagementLine.vue @@ -15,14 +15,13 @@ @click="isEdit && clickColor(label.labelId)">
+ :is-open="isColorModalVisible && editValue.labelId === label.labelId" + :new-label="editValue" + @update-color="updateLabelColor" + @close="handleColorModal" />

-<<<<<<< HEAD 구분을 삭제 하시겠습니까? -======= - - - - - ->>>>>>> f078305 (:recycle: [refactor] : division -> label로 변경) From ea8e76242c3059d8e160c8f17b85a405ff5930f4 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sun, 2 Feb 2025 14:59:57 +0900 Subject: [PATCH 118/180] =?UTF-8?q?:recycle:=20[refactor]=20:=20=EA=B5=AC?= =?UTF-8?q?=EB=B6=84=20=EC=82=AD=EC=A0=9C=20api=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/admin.ts | 4 +-- .../task-management/LabelManagementLine.vue | 26 +++++++++++-------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/api/admin.ts b/src/api/admin.ts index f8e075f6..c3d4d687 100644 --- a/src/api/admin.ts +++ b/src/api/admin.ts @@ -5,7 +5,7 @@ export const getLabelsAdmin = async () => { return response.data } -export const deleteLabelAdmin = async (id: string) => { - const response = await axiosInstance.delete(`/api/managements/labels/${id}`) +export const deleteLabelAdmin = async (id: number) => { + const response = await axiosInstance.delete(`/api/management/labels/${id}`) return response.data } diff --git a/src/components/task-management/LabelManagementLine.vue b/src/components/task-management/LabelManagementLine.vue index d954c18d..d118b3c1 100644 --- a/src/components/task-management/LabelManagementLine.vue +++ b/src/components/task-management/LabelManagementLine.vue @@ -51,6 +51,14 @@ + + + + diff --git a/src/components/task-management/LabelManagementLine.vue b/src/components/task-management/LabelManagementLine.vue index 75e8ff27..40620b57 100644 --- a/src/components/task-management/LabelManagementLine.vue +++ b/src/components/task-management/LabelManagementLine.vue @@ -15,9 +15,7 @@ @click="isEdit && clickColor(label.labelId)"> - - - - - + @@ -94,15 +84,18 @@ const editValue = ref({ labelId: 0 }) -const handleDeleteModal = () => (isModalVisible.value = !isModalVisible.value) +const handleDeleteModal = (labelId: number | null) => { + isModalVisible.value = !isModalVisible.value + selectedLabelId.value = labelId +} const handleColorModal = () => (isColorModalVisible.value = !isColorModalVisible.value) const handleEdit = () => (isEdit.value = !isEdit.value) -const deleteLabel = async (id: number) => { - deleteLabelAdmin(id) - handleDeleteModal() +const deleteLabel = async (labelId: number) => { + deleteLabelAdmin(labelId) + handleDeleteModal(0) } const clickColor = (labelId: number) => { From 00e62cf9ec4e6d8555ab7fb59d307994a666d20a Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sun, 2 Feb 2025 17:02:22 +0900 Subject: [PATCH 121/180] =?UTF-8?q?:recycle:=20[refactor]=20:=20=EC=83=89?= =?UTF-8?q?=EC=83=81=20=ED=83=80=EC=9E=85=EC=97=90=20enum=20=ED=83=80?= =?UTF-8?q?=EC=9E=85=20=EC=B6=94=EA=B0=80=EB=A5=BC=20=ED=86=B5=ED=95=9C=20?= =?UTF-8?q?=EC=83=89=EA=B9=94=20=EB=B3=80=EA=B2=BD=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/task-management/ColorSelectModal.vue | 6 +++--- src/types/common.ts | 11 ++++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/components/task-management/ColorSelectModal.vue b/src/components/task-management/ColorSelectModal.vue index 79688b9c..1679d10a 100644 --- a/src/components/task-management/ColorSelectModal.vue +++ b/src/components/task-management/ColorSelectModal.vue @@ -1,6 +1,6 @@ diff --git a/src/components/task-detail/TaskDetailRight.vue b/src/components/task-detail/TaskDetailRight.vue index 66c6c2ef..a57c4b2c 100644 --- a/src/components/task-detail/TaskDetailRight.vue +++ b/src/components/task-detail/TaskDetailRight.vue @@ -10,26 +10,19 @@

종료일

-

- {{ (data.finishedAt && formatDate(data.finishedAt)) || '-' }} -

+

{{ formatDate(data.finishedAt) || '-' }}

상태

-
+
-
- -

요청자

requesterImg

{{ data.requesterNickName }}

@@ -47,8 +40,8 @@ v-else class="flex gap-2"> processorImg

{{ data.processorNickName || '-' }}

@@ -86,10 +79,9 @@ import TaskStatusList from './TaskStatusList.vue' const memberStore = useMemberStore() const { info } = storeToRefs(memberStore) -const isManager = computed(() => info.value.memberName === data.processorNickName) +const isManager = computed(() => info.value.memberRole === 'ROLE_MANAGER') const { data } = defineProps<{ data: TaskDetailDatas }>() -console.log(data, '가져온 데이터') const processor = ref(DUMMY_PROCESSOR.nickName) const labeling = ref(DUMMY_TASK_LABELS[0].labelName) diff --git a/src/components/task-detail/TaskDetailTopBar.vue b/src/components/task-detail/TaskDetailTopBar.vue index 3674414d..51ed2096 100644 --- a/src/components/task-detail/TaskDetailTopBar.vue +++ b/src/components/task-detail/TaskDetailTopBar.vue @@ -43,23 +43,15 @@ From 286c46f661cc3968cf6ed7a964e0e60a277b8cb2 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Mon, 3 Feb 2025 15:20:11 +0900 Subject: [PATCH 165/180] =?UTF-8?q?:sparkles:=20[feat]=20:=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=EC=9E=90=EC=9D=98=20=EA=B6=8C=ED=95=9C=EC=97=90=20?= =?UTF-8?q?=EB=A7=9E=EB=8A=94=20=EB=B3=B4=EC=97=AC=EC=A3=BC=EA=B8=B0,=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EB=8B=A4=EC=9A=B4,=20=EC=9A=A9=ED=96=98?= =?UTF-8?q?=20=ED=91=9C=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/task-detail/TaskDetail.vue | 3 --- src/components/task-detail/TaskDetailLeft.vue | 2 +- src/components/task-detail/TaskDetailRight.vue | 7 ++++--- src/utils/date.ts | 3 ++- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/components/task-detail/TaskDetail.vue b/src/components/task-detail/TaskDetail.vue index 676f1646..2b6039e6 100644 --- a/src/components/task-detail/TaskDetail.vue +++ b/src/components/task-detail/TaskDetail.vue @@ -2,7 +2,6 @@
- {{ selectedId }} 요청 번호 @@ -40,6 +39,4 @@ const { data } = useQuery({ queryKey: ['taskDetailUser', selectedId], queryFn: () => getTaskDetailUser(selectedId) }) - -console.log(data, 'data') diff --git a/src/components/task-detail/TaskDetailLeft.vue b/src/components/task-detail/TaskDetailLeft.vue index 5cbe6c0e..0f466524 100644 --- a/src/components/task-detail/TaskDetailLeft.vue +++ b/src/components/task-detail/TaskDetailLeft.vue @@ -18,7 +18,7 @@

첨부 파일

- +
diff --git a/src/components/task-detail/TaskDetailRight.vue b/src/components/task-detail/TaskDetailRight.vue index a57c4b2c..6621fc70 100644 --- a/src/components/task-detail/TaskDetailRight.vue +++ b/src/components/task-detail/TaskDetailRight.vue @@ -10,7 +10,9 @@

종료일

-

{{ formatDate(data.finishedAt) || '-' }}

+

+ {{ formatDate(data.finishedAt) || '-' }} +

상태

@@ -22,7 +24,7 @@

요청자

requesterImg

{{ data.requesterNickName }}

@@ -80,7 +82,6 @@ import TaskStatusList from './TaskStatusList.vue' const memberStore = useMemberStore() const { info } = storeToRefs(memberStore) const isManager = computed(() => info.value.memberRole === 'ROLE_MANAGER') - const { data } = defineProps<{ data: TaskDetailDatas }>() const processor = ref(DUMMY_PROCESSOR.nickName) diff --git a/src/utils/date.ts b/src/utils/date.ts index a8aabe8b..ea13a64d 100644 --- a/src/utils/date.ts +++ b/src/utils/date.ts @@ -1,4 +1,5 @@ -export const formatDate = (dateString: string) => { +export const formatDate = (dateString: string | null) => { + if (dateString === null) return null const date = new Date(dateString) const year = date.getFullYear() From 0336eaa87856c6c7da853f68a02cb30913c4622a Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Mon, 3 Feb 2025 15:22:15 +0900 Subject: [PATCH 166/180] =?UTF-8?q?:sparkles:=20[feat]=20:=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=EC=9E=90=EC=9D=98=20=EA=B6=8C=ED=95=9C=EC=97=90=20?= =?UTF-8?q?=EB=A7=9E=EB=8A=94=20top=20bar=20+=20icon=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/task-detail/TaskDetailTopBar.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/task-detail/TaskDetailTopBar.vue b/src/components/task-detail/TaskDetailTopBar.vue index 51ed2096..59541af7 100644 --- a/src/components/task-detail/TaskDetailTopBar.vue +++ b/src/components/task-detail/TaskDetailTopBar.vue @@ -43,7 +43,7 @@ diff --git a/src/components/task-detail/TaskDetailTopBar.vue b/src/components/task-detail/TaskDetailTopBar.vue index 59541af7..3674414d 100644 --- a/src/components/task-detail/TaskDetailTopBar.vue +++ b/src/components/task-detail/TaskDetailTopBar.vue @@ -43,15 +43,23 @@ From 10ae97917dc0b0d8985b987f05c79e65559314ed Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Mon, 3 Feb 2025 16:52:09 +0900 Subject: [PATCH 171/180] =?UTF-8?q?:recycle:=20[refactor]=20:=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=ED=8F=AC=EB=A7=A4=ED=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/task-detail/TaskDetailRight.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/task-detail/TaskDetailRight.vue b/src/components/task-detail/TaskDetailRight.vue index 8475afbf..66c6c2ef 100644 --- a/src/components/task-detail/TaskDetailRight.vue +++ b/src/components/task-detail/TaskDetailRight.vue @@ -16,7 +16,9 @@

상태

-
+
From e81bd15f6fcbdfd5e3882e7d72d6d83f4bc6e9ac Mon Sep 17 00:00:00 2001 From: seorang42 Date: Sun, 2 Feb 2025 19:24:24 +0900 Subject: [PATCH 172/180] =?UTF-8?q?:sparkles:=20[feat]=20:=201=EC=B0=A8=20?= =?UTF-8?q?=EC=B9=B4=ED=85=8C=EA=B3=A0=EB=A6=AC=20=EC=B6=94=EA=B0=80=20API?= =?UTF-8?q?=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../request-task/RequestTaskInput.vue | 5 --- .../task-management/CategoryAdd.vue | 41 +++++++------------ src/components/top-bar/SideBar.vue | 7 ++-- src/constants/admin.ts | 6 +-- src/types/common.ts | 18 +++++++- 5 files changed, 38 insertions(+), 39 deletions(-) diff --git a/src/components/request-task/RequestTaskInput.vue b/src/components/request-task/RequestTaskInput.vue index 5a411979..08949f94 100644 --- a/src/components/request-task/RequestTaskInput.vue +++ b/src/components/request-task/RequestTaskInput.vue @@ -7,11 +7,6 @@ class="text-red-1"> *

-

- {{ labelName }}을 입력해주세요 -

+ v-if="props.categoryStep == '2'" /> + :label-name="`${props.categoryStep}차 카테고리명`" /> diff --git a/src/components/top-bar/SideBar.vue b/src/components/top-bar/SideBar.vue index 80a1dc20..40f64455 100644 --- a/src/components/top-bar/SideBar.vue +++ b/src/components/top-bar/SideBar.vue @@ -79,9 +79,10 @@ const { info } = storeToRefs(memberStore) const route = useRoute() -const role = computed(() => info.value.memberRole) -const name = computed(() => info.value.memberName) -const nickname = computed(() => info.value.nickname) +// 회원 역할, 닉네임 필요 +const role = ref('admin') +const name = ref('백지연') +const nickname = ref('Chloe.yeon') const filteredMenu = computed(() => { return role.value === 'ROLE_USER' diff --git a/src/constants/admin.ts b/src/constants/admin.ts index 4a848952..166e0c6a 100644 --- a/src/constants/admin.ts +++ b/src/constants/admin.ts @@ -38,15 +38,13 @@ import type { RoleTypes, RoleTypesEnum, UserRegistrationProps } from '@/types/ad export const CATEGORY_FIRST_ADD: Category = { name: '', - code: '', - id: 0 + code: '' } export const CATEGORY_SECOND_ADD: SubCategory = { name: '', mainCategoryId: 0, - code: '', - id: 0 + code: '' } export const INITIAL_USER_REGISTRATION: UserRegistrationProps = { diff --git a/src/types/common.ts b/src/types/common.ts index 6a4ecc51..612630e2 100644 --- a/src/types/common.ts +++ b/src/types/common.ts @@ -76,7 +76,23 @@ export interface FormCheckboxProps { export interface ColorSelectProps { isOpen: boolean - newLabel: LabelDataTypes +} + +export interface LabelDataTypes { + labelId: number + labelName: string + labelColor: string +} + +export interface MainCategoryTypes { + name: string + code: string +} + +export interface SubCategoryTypes { + mainCategoryId: number + name: string + code: string } export interface CategoryDropdownProps { From 28d6bc5c011f0315b11acac1d92edfb6c457ea98 Mon Sep 17 00:00:00 2001 From: seorang42 Date: Sun, 2 Feb 2025 19:58:46 +0900 Subject: [PATCH 173/180] =?UTF-8?q?:sparkles:=20[feat]=20:=202=EC=B0=A8=20?= =?UTF-8?q?=EC=B9=B4=ED=85=8C=EA=B3=A0=EB=A6=AC=20=EC=B6=94=EA=B0=80=20API?= =?UTF-8?q?=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../task-management/CategoryAdd.vue | 42 ++++++++++++------- src/constants/admin.ts | 10 +---- src/types/common.ts | 13 ++---- 3 files changed, 34 insertions(+), 31 deletions(-) diff --git a/src/components/task-management/CategoryAdd.vue b/src/components/task-management/CategoryAdd.vue index fc05ddc5..f96c4c2e 100644 --- a/src/components/task-management/CategoryAdd.vue +++ b/src/components/task-management/CategoryAdd.vue @@ -22,15 +22,15 @@ + v-if="categoryStep == '2'" /> + :label-name="`${categoryStep}차 카테고리명`" /> diff --git a/src/constants/admin.ts b/src/constants/admin.ts index 166e0c6a..44c1e4be 100644 --- a/src/constants/admin.ts +++ b/src/constants/admin.ts @@ -1,4 +1,4 @@ -import type { Category, ListBarTabProps, Option, SubCategory } from '@/types/common' +import type { CategoryForm, ListBarTabProps, Option } from '@/types/common' export const MEMBER_MANAGEMENT_LIST_BAR_TAB: ListBarTabProps[] = [ { content: '이름', width: 60 }, @@ -36,17 +36,11 @@ export const LOGS_LIST_BAR_TAB: ListBarTabProps[] = [ import type { RoleTypes, RoleTypesEnum, UserRegistrationProps } from '@/types/admin' -export const CATEGORY_FIRST_ADD: Category = { +export const CATEGORY_FORM: CategoryForm = { name: '', code: '' } -export const CATEGORY_SECOND_ADD: SubCategory = { - name: '', - mainCategoryId: 0, - code: '' -} - export const INITIAL_USER_REGISTRATION: UserRegistrationProps = { name: '', email: '', diff --git a/src/types/common.ts b/src/types/common.ts index 612630e2..028f44f1 100644 --- a/src/types/common.ts +++ b/src/types/common.ts @@ -84,21 +84,16 @@ export interface LabelDataTypes { labelColor: string } -export interface MainCategoryTypes { - name: string - code: string -} - -export interface SubCategoryTypes { - mainCategoryId: number +export interface CategoryForm { name: string code: string + mainCategoryId?: number } export interface CategoryDropdownProps { - options: Category[] | SubCategory[] + options: CategoryForm labelName: string - modelValue: Category | SubCategory | null + modelValue?: CategoryForm isLabel?: boolean isDisabled?: boolean isInvalidate?: string From bcb4d862a43cfdbf6ce999fb8d2122f0cff61a2a Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Mon, 3 Feb 2025 22:16:58 +0900 Subject: [PATCH 174/180] =?UTF-8?q?:recycle:=20[refactor]=20:=20=EB=88=84?= =?UTF-8?q?=EB=9D=BD=20=ED=83=80=EC=9E=85=20=EC=A0=81=EC=9A=A9=20=EB=B6=88?= =?UTF-8?q?=ED=95=84=EC=9A=94=20=EB=B7=B0=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/types/common.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/types/common.ts b/src/types/common.ts index 028f44f1..8b2a526f 100644 --- a/src/types/common.ts +++ b/src/types/common.ts @@ -90,6 +90,12 @@ export interface CategoryForm { mainCategoryId?: number } +export interface CategoryForm { + name: string + code: string + mainCategoryId?: number +} + export interface CategoryDropdownProps { options: CategoryForm labelName: string From 440a12c76f583355ecd30711a4d1f2a06e3c2b64 Mon Sep 17 00:00:00 2001 From: seorang42 Date: Sun, 2 Feb 2025 18:04:12 +0900 Subject: [PATCH 175/180] =?UTF-8?q?:sparkles:=20[feat]=20:=20=ED=86=B5?= =?UTF-8?q?=EA=B3=84=20API=20=EC=97=B0=EA=B2=B0=20=ED=85=8C=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/statistics/StatisticsCard.vue | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/components/statistics/StatisticsCard.vue b/src/components/statistics/StatisticsCard.vue index 9a547990..c3d91598 100644 --- a/src/components/statistics/StatisticsCard.vue +++ b/src/components/statistics/StatisticsCard.vue @@ -30,9 +30,8 @@ import PieChart from '../PieChart.vue' import LineChart from '../LineChart.vue' import PeriodButtons from './PeriodButtons.vue' import type { PeriodType } from '@/types/manager' -import { axiosInstance } from '@/utils/axios' +import axiosInstance from '@/utils/axios' import { useQuery } from '@tanstack/vue-query' -import type { StatisticsData } from '@/types/admin' const { title, statisticsType, chartType } = defineProps<{ title: string @@ -65,16 +64,9 @@ const fetchStatistics = async () => { return response.data } -const { data } = useQuery({ +const { data } = useQuery<{ key: string; value: number }[]>({ queryKey: [statisticsType, periodType], queryFn: fetchStatistics }) - -const labels = computed(() => { - return data.value?.map(el => el.key) || [] -}) - -const series = computed(() => { - return data.value?.map(el => el.count) || [] -}) +console.log(data.value) From 23ff42624f3d997eb06fc0a11902460055ecd78d Mon Sep 17 00:00:00 2001 From: seorang42 Date: Sun, 2 Feb 2025 23:25:02 +0900 Subject: [PATCH 176/180] =?UTF-8?q?:sparkles:=20[feat]=20:=20StatisticsCar?= =?UTF-8?q?d=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20API=20=EC=97=B0?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/statistics/StatisticsCard.vue | 23 +++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/components/statistics/StatisticsCard.vue b/src/components/statistics/StatisticsCard.vue index c3d91598..b106cea8 100644 --- a/src/components/statistics/StatisticsCard.vue +++ b/src/components/statistics/StatisticsCard.vue @@ -10,15 +10,15 @@
+ :labels="labels || []" + :series="series || []" />
@@ -64,9 +64,16 @@ const fetchStatistics = async () => { return response.data } -const { data } = useQuery<{ key: string; value: number }[]>({ +const { data } = useQuery<{ key: string; count: number }[]>({ queryKey: [statisticsType, periodType], queryFn: fetchStatistics }) -console.log(data.value) + +const labels = computed(() => { + return data.value?.map(el => el.key) +}) + +const series = computed(() => { + return data.value?.map(el => el.count) +}) From ed259593d65187bee0b743526e6a0accdddb1be2 Mon Sep 17 00:00:00 2001 From: seorang42 Date: Sun, 2 Feb 2025 23:59:19 +0900 Subject: [PATCH 177/180] =?UTF-8?q?:sparkles:=20[feat]=20:=20StatisticsCat?= =?UTF-8?q?egoryCard=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20API=20?= =?UTF-8?q?=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/statistics/StatisticsCard.vue | 19 ++++++++++--------- .../statistics/StatisticsCategoryCard.vue | 4 ++-- src/types/admin.ts | 5 +++++ 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/components/statistics/StatisticsCard.vue b/src/components/statistics/StatisticsCard.vue index b106cea8..76d9a991 100644 --- a/src/components/statistics/StatisticsCard.vue +++ b/src/components/statistics/StatisticsCard.vue @@ -10,15 +10,15 @@
+ :labels="labels" + :series="series" />
@@ -32,6 +32,7 @@ import PeriodButtons from './PeriodButtons.vue' import type { PeriodType } from '@/types/manager' import axiosInstance from '@/utils/axios' import { useQuery } from '@tanstack/vue-query' +import type { StatisticsData } from '@/types/admin' const { title, statisticsType, chartType } = defineProps<{ title: string @@ -64,16 +65,16 @@ const fetchStatistics = async () => { return response.data } -const { data } = useQuery<{ key: string; count: number }[]>({ +const { data } = useQuery({ queryKey: [statisticsType, periodType], queryFn: fetchStatistics }) const labels = computed(() => { - return data.value?.map(el => el.key) + return data.value?.map(el => el.key) || [] }) const series = computed(() => { - return data.value?.map(el => el.count) + return data.value?.map(el => el.count) || [] }) diff --git a/src/components/statistics/StatisticsCategoryCard.vue b/src/components/statistics/StatisticsCategoryCard.vue index 6fae0d6c..6022c947 100644 --- a/src/components/statistics/StatisticsCategoryCard.vue +++ b/src/components/statistics/StatisticsCategoryCard.vue @@ -31,7 +31,7 @@ import { computed, ref } from 'vue' import PieChart from '../PieChart.vue' import PeriodButtons from './PeriodButtons.vue' import type { PeriodType } from '@/types/manager' -import { axiosInstance } from '@/utils/axios' +import axiosInstance from '@/utils/axios' import { useQuery } from '@tanstack/vue-query' import type { StatisticsData } from '@/types/admin' @@ -86,7 +86,7 @@ const { data: subData } = useQuery({ enabled: computed(() => mainCategory.value !== '') }) const subLabels = computed(() => { - return subData.value?.map(el => el.key) || [] + return subData.value?.map(el => el.key) || ['카테고리를 선택해주세요'] }) const subSeries = computed(() => { return subData.value?.map(el => el.count) || [] diff --git a/src/types/admin.ts b/src/types/admin.ts index 08589211..3f27bc28 100644 --- a/src/types/admin.ts +++ b/src/types/admin.ts @@ -56,3 +56,8 @@ export interface NewLabelTypes { labelName: string labelColor: string } + +export interface StatisticsData { + key: string + count: number +} From 9bc7f5e676f3c1492f9db3548fdb6fb027321251 Mon Sep 17 00:00:00 2001 From: seorang42 Date: Mon, 3 Feb 2025 01:06:41 +0900 Subject: [PATCH 178/180] =?UTF-8?q?:sparkles:=20[feat]=20:=20=ED=86=B5?= =?UTF-8?q?=EA=B3=84=20=EB=8D=B0=EC=9D=B4=ED=84=B0=EA=B0=80=20=EC=97=86?= =?UTF-8?q?=EC=9D=84=20=EB=95=8C=EC=9D=98=20=EC=98=88=EC=99=B8=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/statistics/StatisticsCategoryCard.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/statistics/StatisticsCategoryCard.vue b/src/components/statistics/StatisticsCategoryCard.vue index 6022c947..66c16fea 100644 --- a/src/components/statistics/StatisticsCategoryCard.vue +++ b/src/components/statistics/StatisticsCategoryCard.vue @@ -86,7 +86,7 @@ const { data: subData } = useQuery({ enabled: computed(() => mainCategory.value !== '') }) const subLabels = computed(() => { - return subData.value?.map(el => el.key) || ['카테고리를 선택해주세요'] + return subData.value?.map(el => el.key) || [] }) const subSeries = computed(() => { return subData.value?.map(el => el.count) || [] From 52871879e553da8ed24856e71f63ac3a7fe7cb80 Mon Sep 17 00:00:00 2001 From: seorang42 Date: Tue, 4 Feb 2025 00:29:22 +0900 Subject: [PATCH 179/180] =?UTF-8?q?:bug:=20[fix]=20=EB=B9=8C=EB=93=9C=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/statistics/StatisticsCard.vue | 2 +- src/components/statistics/StatisticsCategoryCard.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/statistics/StatisticsCard.vue b/src/components/statistics/StatisticsCard.vue index 76d9a991..9a547990 100644 --- a/src/components/statistics/StatisticsCard.vue +++ b/src/components/statistics/StatisticsCard.vue @@ -30,7 +30,7 @@ import PieChart from '../PieChart.vue' import LineChart from '../LineChart.vue' import PeriodButtons from './PeriodButtons.vue' import type { PeriodType } from '@/types/manager' -import axiosInstance from '@/utils/axios' +import { axiosInstance } from '@/utils/axios' import { useQuery } from '@tanstack/vue-query' import type { StatisticsData } from '@/types/admin' diff --git a/src/components/statistics/StatisticsCategoryCard.vue b/src/components/statistics/StatisticsCategoryCard.vue index 66c16fea..6fae0d6c 100644 --- a/src/components/statistics/StatisticsCategoryCard.vue +++ b/src/components/statistics/StatisticsCategoryCard.vue @@ -31,7 +31,7 @@ import { computed, ref } from 'vue' import PieChart from '../PieChart.vue' import PeriodButtons from './PeriodButtons.vue' import type { PeriodType } from '@/types/manager' -import axiosInstance from '@/utils/axios' +import { axiosInstance } from '@/utils/axios' import { useQuery } from '@tanstack/vue-query' import type { StatisticsData } from '@/types/admin' From 8fbbe1c4e9121a0715452180a48dfdaea9f5ca91 Mon Sep 17 00:00:00 2001 From: jiyeon Date: Tue, 4 Feb 2025 10:00:27 +0900 Subject: [PATCH 180/180] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20[refactor]=20:=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EB=B3=80=EA=B2=BD=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/top-bar/SideBar.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/top-bar/SideBar.vue b/src/components/top-bar/SideBar.vue index 80a1dc20..7ba44dde 100644 --- a/src/components/top-bar/SideBar.vue +++ b/src/components/top-bar/SideBar.vue @@ -68,7 +68,7 @@