From 333491cf3f4b26a82eaf57b49cf1f725cba136fe Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Tue, 4 Feb 2025 14:55:51 +0900 Subject: [PATCH 01/17] =?UTF-8?q?:sparkles:=20[feat]=20:=20=EB=8B=B4?= =?UTF-8?q?=EB=8B=B9=EC=9E=90=20=EB=B3=80=EA=B2=BD=20=EB=93=9C=EB=A1=AD?= =?UTF-8?q?=EB=8B=A4=EC=9A=B4=20api=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../task-detail/TaskDetailManagerDropdown.vue | 74 +++++++++++++++++++ .../task-detail/TaskDetailRight.vue | 48 +++++++----- 2 files changed, 105 insertions(+), 17 deletions(-) create mode 100644 src/components/task-detail/TaskDetailManagerDropdown.vue diff --git a/src/components/task-detail/TaskDetailManagerDropdown.vue b/src/components/task-detail/TaskDetailManagerDropdown.vue new file mode 100644 index 00000000..d4437cd0 --- /dev/null +++ b/src/components/task-detail/TaskDetailManagerDropdown.vue @@ -0,0 +1,74 @@ + + + diff --git a/src/components/task-detail/TaskDetailRight.vue b/src/components/task-detail/TaskDetailRight.vue index c0055646..89262576 100644 --- a/src/components/task-detail/TaskDetailRight.vue +++ b/src/components/task-detail/TaskDetailRight.vue @@ -36,12 +36,10 @@
-

처리자

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

-
+

마감기한

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

@@ -62,7 +60,7 @@

3일 전

-
+

구분

From 4d56eea01e5d14af3e6e35e60bcff997b74d385d Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Tue, 4 Feb 2025 14:58:07 +0900 Subject: [PATCH 02/17] =?UTF-8?q?:sparkles:=20[feat]=20:=20=EB=8B=B4?= =?UTF-8?q?=EB=8B=B9=EC=9E=90=20=EB=B3=80=EA=B2=BD=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/api/user.ts | 5 +++++ src/assets/styles.css | 3 +++ src/types/user.ts | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/src/api/user.ts b/src/api/user.ts index 00bcc2d9..f64a3325 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -30,3 +30,8 @@ export const getManager = async () => { const response = await axiosInstance.get('/api/managers') return response.data } + +export const changeProcessor = async (taskID: number, processorId: number) => { + const response = await axiosInstance.patch(`/api/tasks/${taskID}/processor`, { processorId }) + return response.data +} diff --git a/src/assets/styles.css b/src/assets/styles.css index cce74742..f63b503c 100644 --- a/src/assets/styles.css +++ b/src/assets/styles.css @@ -138,3 +138,6 @@ body { .task-detail-dropdown-option { @apply w-full flex items-center h-10 p-2 rounded hover:bg-background-2 cursor-pointer; } +.task-detail-manager-dropdown { + @apply flex w-full h-10 items-center rounded p-4 bg-white border border-border-1 cursor-pointer text-black; +} diff --git a/src/types/user.ts b/src/types/user.ts index d1c0ce1e..adb83f8d 100644 --- a/src/types/user.ts +++ b/src/types/user.ts @@ -162,3 +162,7 @@ export interface ManagerDropdownProps { placeholderText: string isInvalidate: string } + +export interface DetailManagerDropdownProps { + modelValue: ManagerTypes +} From 3f441a660de7be76c1f02c65938b30db38421892 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Tue, 4 Feb 2025 14:58:52 +0900 Subject: [PATCH 03/17] =?UTF-8?q?:recycle:=20[refactor]=20:=20isManager?= =?UTF-8?q?=EC=9D=84=20=EC=B2=98=EB=A6=AC=EC=9E=90=EC=99=80=20=EC=9C=A0?= =?UTF-8?q?=EC=A0=80=EC=A0=95=EB=B3=B4=EB=A5=BC=20=EB=B9=84=EA=B5=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/my-task/MyTaskListCard.vue | 15 ++++++++++++++- src/components/task-detail/TaskDetail.vue | 11 +++++++++-- .../task-detail/TaskDetailTopBar.vue | 18 ++++++------------ src/types/manager.ts | 1 + 4 files changed, 30 insertions(+), 15 deletions(-) diff --git a/src/components/my-task/MyTaskListCard.vue b/src/components/my-task/MyTaskListCard.vue index 1130aaed..6f65758b 100644 --- a/src/components/my-task/MyTaskListCard.vue +++ b/src/components/my-task/MyTaskListCard.vue @@ -2,6 +2,7 @@
+ - - diff --git a/src/types/manager.ts b/src/types/manager.ts index 0afe8950..fa34785c 100644 --- a/src/types/manager.ts +++ b/src/types/manager.ts @@ -102,6 +102,7 @@ export interface TaskDetailTopBarProps { isApproved: boolean closeTaskDetail: () => void id: number + isProcessor: boolean } export interface DraggableEvent { From a2bddc830884cd5da5f38c4044520a1fe57247b4 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Tue, 4 Feb 2025 15:32:48 +0900 Subject: [PATCH 04/17] =?UTF-8?q?:sparkles:=20[feat]=20:=20=EB=A7=88?= =?UTF-8?q?=EA=B0=90=EA=B8=B0=ED=95=9C=20=EB=B0=8F=20=EB=82=A8=EC=9D=80=20?= =?UTF-8?q?=EB=82=A0=EC=A7=9C=20=ED=8F=AC=EB=A7=B7=20=EC=9C=A0=ED=8B=B8?= =?UTF-8?q?=ED=95=A8=EC=88=98=20=EC=A0=9C=EC=9E=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/task-detail/TaskStatusList.vue | 48 +++++++++++++++---- src/utils/date.ts | 26 ++++++++++ 2 files changed, 64 insertions(+), 10 deletions(-) diff --git a/src/components/task-detail/TaskStatusList.vue b/src/components/task-detail/TaskStatusList.vue index 6b7edcad..f7867ea2 100644 --- a/src/components/task-detail/TaskStatusList.vue +++ b/src/components/task-detail/TaskStatusList.vue @@ -1,34 +1,62 @@ diff --git a/src/utils/date.ts b/src/utils/date.ts index 753a9b85..48a7ef26 100644 --- a/src/utils/date.ts +++ b/src/utils/date.ts @@ -24,3 +24,29 @@ export const convertToISO = (dateStr: string, timeStr: string) => { const date = new Date(`${dateStr}T${timeStr}:00`) return date.toISOString() } + +export const formatDueDate = (dateString: string) => { + const date = new Date(dateString) + + const year = date.getFullYear() + const month = date.getMonth() + 1 + const day = date.getDate() + const hours = date.getHours() + const minutes = date.getMinutes() + + return `${year}년 ${month}월 ${day}일, ${hours}시 ${minutes}분까지` +} + +export const formatDaysBefore = (dateString: string) => { + const date = new Date(dateString) + const today = new Date() + + const koreaOffset = 9 * 60 * 60 * 1000 + const koreaDate = new Date(date.getTime() + koreaOffset) + const koreaToday = new Date(today.getTime() + koreaOffset) + + const diffTime = koreaDate.getTime() - koreaToday.getTime() + const diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24)) + + return `${diffDays}일 남음` +} From 756a7ad5fb9fbe94906daadc886b9ae344654307 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Tue, 4 Feb 2025 15:33:09 +0900 Subject: [PATCH 05/17] =?UTF-8?q?:sparkles:=20[feat]=20:=20=EC=83=81?= =?UTF-8?q?=ED=83=9C=20=EB=B3=80=EA=B2=BD=EC=97=90=20=EB=8C=80=ED=95=9C=20?= =?UTF-8?q?api=20=EC=97=B0=EA=B2=B0=20=EC=99=84=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/user.ts | 6 ++++++ src/components/task-detail/TaskDetailRight.vue | 16 ++++++++++------ src/types/user.ts | 6 ++++++ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/api/user.ts b/src/api/user.ts index f64a3325..8a8fc717 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -1,3 +1,4 @@ +import type { Status } from '@/types/common' import type { RequestApprovePostTypes } from '@/types/manager' import { axiosInstance, formDataAxiosInstance } from '@/utils/axios' @@ -35,3 +36,8 @@ export const changeProcessor = async (taskID: number, processorId: number) => { const response = await axiosInstance.patch(`/api/tasks/${taskID}/processor`, { processorId }) return response.data } + +export const patchChangeStatus = async (taskID: number, status: Status) => { + const response = await axiosInstance.patch(`/api/tasks/${taskID}/status`, status) + return response.data +} diff --git a/src/components/task-detail/TaskDetailRight.vue b/src/components/task-detail/TaskDetailRight.vue index 89262576..643c9b71 100644 --- a/src/components/task-detail/TaskDetailRight.vue +++ b/src/components/task-detail/TaskDetailRight.vue @@ -22,7 +22,10 @@
- +
@@ -55,10 +58,9 @@

마감기한

-

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

-

변경

+

{{ formatDueDate(data.dueDate) || '-' }}

-

3일 전

+

{{ formatDaysBefore(data.dueDate) }}

구분

@@ -75,7 +77,7 @@ import { changeProcessor } from '@/api/user' import { DUMMY_TASK_LABELS } from '@/datas/taskdetail' import type { ManagerTypes } from '@/types/manager' import type { TaskDetailDatas } from '@/types/user' -import { formatDate } from '@/utils/date' +import { formatDate, formatDaysBefore, formatDueDate } from '@/utils/date' import { defineProps, ref, watch } from 'vue' import TaskStatus from '../TaskStatus.vue' import TaskDetailLabelDropdown from './TaskDetailLabelDropdown.vue' @@ -83,7 +85,9 @@ import TaskDetailManagerDropdown from './TaskDetailManagerDropdown.vue' import TaskStatusList from './TaskStatusList.vue' const { data, isProcessor } = defineProps<{ data: TaskDetailDatas; isProcessor: boolean }>() -console.log(data, '가져온 데이터') +console.log(data.dueDate) + +const taskStatus = ref(data.taskStatus) const selectedManager = ref({ memberId: -1, diff --git a/src/types/user.ts b/src/types/user.ts index adb83f8d..4e38d3bd 100644 --- a/src/types/user.ts +++ b/src/types/user.ts @@ -166,3 +166,9 @@ export interface ManagerDropdownProps { export interface DetailManagerDropdownProps { modelValue: ManagerTypes } + +export interface TaskStatusListProps { + modelValue: Status + isProcessor: boolean + taskId?: number +} From 0782839e6c3b9c99ff09181c462e83cddbe458c6 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Tue, 4 Feb 2025 15:40:33 +0900 Subject: [PATCH 06/17] =?UTF-8?q?:recycle:=20[refactor]=20:=20=EB=B6=88?= =?UTF-8?q?=ED=95=84=EC=9A=94=20mockup=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/datas/taskdetail.ts | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/src/datas/taskdetail.ts b/src/datas/taskdetail.ts index 06afc167..cafea856 100644 --- a/src/datas/taskdetail.ts +++ b/src/datas/taskdetail.ts @@ -1,4 +1,3 @@ -import type { LabelDataTypes } from '@/types/common' import type { TaskDetailHistoryProps } from '@/types/user' export const DUMMY_REQUEST_TASK_CATEGORIES: string[] = [ @@ -66,36 +65,3 @@ export const DUMMY_TASK_DETAIL_HISTORY: TaskDetailHistoryProps[] = [ } } ] - -export const DUMMY_REQUEST_TASK_LABELS: string[] = ['긴급', '정기', '오류', '점검'] - -export const DUMMY_PROCESSOR = { - nickName: 'Tony', - profileUrl: 'images/mockProfile.jpg', - totalAssignedTasks: 5 -} - -export const DUMMY_TASK_DETAIL_LABELS: string[] = ['긴급', '정기', '오류', '점검'] - -export const DUMMY_TASK_LABELS: LabelDataTypes[] = [ - { - labelId: 1, - labelName: '긴급', - labelColor: 'red' - }, - { - labelId: 2, - labelName: '정기', - labelColor: 'green' - }, - { - labelId: 3, - labelName: '오류', - labelColor: 'blue' - }, - { - labelId: 4, - labelName: '점검', - labelColor: 'gray' - } -] From ce47a5b7cd7d4f6e083d0c9d95b8f3c07d02cff0 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Tue, 4 Feb 2025 16:26:19 +0900 Subject: [PATCH 07/17] =?UTF-8?q?:recycle:=20[refactor]=20:=20=EA=B5=AC?= =?UTF-8?q?=EB=B6=84=20=EB=B3=80=EA=B2=BD=20api=20=EC=97=B0=EA=B2=B0?= =?UTF-8?q?=EC=99=84=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/user.ts | 5 ++ .../task-detail/TaskDetailLabelDropdown.vue | 66 +++++++++---------- .../task-detail/TaskDetailRight.vue | 26 +++++--- src/types/user.ts | 3 +- 4 files changed, 55 insertions(+), 45 deletions(-) diff --git a/src/api/user.ts b/src/api/user.ts index 8a8fc717..7fb748bb 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -41,3 +41,8 @@ export const patchChangeStatus = async (taskID: number, status: Status) => { const response = await axiosInstance.patch(`/api/tasks/${taskID}/status`, status) return response.data } + +export const changeLabel = async (taskID: number, labelId: number) => { + const response = await axiosInstance.patch(`/api/tasks/${taskID}/label`, { labelId }) + return response.data +} diff --git a/src/components/task-detail/TaskDetailLabelDropdown.vue b/src/components/task-detail/TaskDetailLabelDropdown.vue index 5a931857..bb5c46d8 100644 --- a/src/components/task-detail/TaskDetailLabelDropdown.vue +++ b/src/components/task-detail/TaskDetailLabelDropdown.vue @@ -1,57 +1,53 @@ diff --git a/src/components/task-detail/TaskDetailRight.vue b/src/components/task-detail/TaskDetailRight.vue index 643c9b71..53dabecd 100644 --- a/src/components/task-detail/TaskDetailRight.vue +++ b/src/components/task-detail/TaskDetailRight.vue @@ -55,26 +55,31 @@

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

-
+

마감기한

{{ formatDueDate(data.dueDate) || '-' }}

{{ formatDaysBefore(data.dueDate) }}

-
+

구분

+ v-if="isProcessor && data.labelName" + v-model="taskLabel" + :placeholder-text="'라벨을 선택해주세요'" + :task-id="data.taskId" /> +
+ {{ data.labelName }} +
diff --git a/src/types/user.ts b/src/types/user.ts index 4e38d3bd..1c7f8bc8 100644 --- a/src/types/user.ts +++ b/src/types/user.ts @@ -120,7 +120,7 @@ export interface TaskDetailRightProps { export interface TaskDetailLabelDropdownProps { options: LabelDataTypes[] - modelValue: string + modelValue: LabelDataTypes } export interface TaskHistoryDatas { @@ -153,6 +153,7 @@ export interface MyRequestResponse { } export interface LabelDropdownProps { + taskId?:number modelValue: LabelDataTypes | null placeholderText: string } From 05db462e750aa9899e231de059942d38e79f33fa Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Wed, 5 Feb 2025 00:19:07 +0900 Subject: [PATCH 08/17] =?UTF-8?q?:recycle:=20[refactor]=20:=20=EB=B6=88?= =?UTF-8?q?=ED=95=84=EC=9A=94=20mockup=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/datas/taskdetail.ts | 67 ----------------------------------------- 1 file changed, 67 deletions(-) delete mode 100644 src/datas/taskdetail.ts diff --git a/src/datas/taskdetail.ts b/src/datas/taskdetail.ts deleted file mode 100644 index cafea856..00000000 --- a/src/datas/taskdetail.ts +++ /dev/null @@ -1,67 +0,0 @@ -import type { TaskDetailHistoryProps } from '@/types/user' - -export const DUMMY_REQUEST_TASK_CATEGORIES: string[] = [ - 'Categroy 1', - 'Categroy 2', - 'Categroy 3', - 'Categroy 4' -] - -export const DUMMY_TASK_DETAIL_HISTORY: TaskDetailHistoryProps[] = [ - { - date: '2023-10-01', - time: '10:00', - name: 'John Doe', - profileImageUrl: 'images/mockProfile.jpg', - TaskHistoryType: 'COMMENT', - isModified: false, - details: { - previousProcessor: 'Hello.world', - currentProcessor: 'Tony.tsx', - comment: 'Initial comment on the task.' - } - }, - { - date: '2023-10-02', - time: '11:30', - name: 'Jane Smith', - profileImageUrl: 'images/mockProfile.jpg', - TaskHistoryType: 'STATUS_SWITCHED', - isModified: true, - details: { - previousProcessor: 'Hello.world', - currentProcessor: 'Tony.tsx', - taskStatus: 'In Progress' - } - }, - { - date: '2023-10-03', - time: '14:45', - name: 'Alice Johnson', - profileImageUrl: 'images/mockProfile.jpg', - TaskHistoryType: 'PROCESSOR_ASSIGNED', - isModified: false, - details: { - previousProcessor: 'Hello.world', - currentProcessor: 'Tony.tsx', - updateDetails: 'Processor assigned to Tony.' - } - }, - { - date: '2023-10-04', - time: '16:20', - name: 'Bob Brown', - profileImageUrl: 'images/mockProfile.jpg', - TaskHistoryType: 'COMMENT_FILE', - isModified: true, - details: { - previousProcessor: 'Hello.world', - currentProcessor: 'Tony.tsx', - file: { - fileId: 1, - fileUrl: 'https://example.com/file1.pdf', - fileName: 'file1.pdf' - } - } - } -] From ad1d77d911052e155d3ed36af043c7cf9e716757 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Wed, 5 Feb 2025 00:19:56 +0900 Subject: [PATCH 09/17] =?UTF-8?q?:sparkles:=20[feat]=20:=20=ED=9E=88?= =?UTF-8?q?=EC=8A=A4=ED=86=A0=EB=A6=AC=20=EC=83=81=EC=84=B8=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20=EC=97=B0=EA=B2=B0=20=EB=B0=8F=20=EC=83=81=ED=83=9C?= =?UTF-8?q?,=20=EB=8B=B4=EB=8B=B9=EC=9E=90=20=EB=B3=80=EA=B2=BD=EC=8B=9C?= =?UTF-8?q?=20invalidate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/user.ts | 5 ++ src/assets/styles.css | 2 +- src/components/task-detail/TaskDetail.vue | 18 ++++--- .../task-detail/TaskDetailHistory.vue | 29 +++++------ .../task-detail/TaskDetailHistoryInput.vue | 10 ++-- .../task-detail/TaskDetailLabelDropdown.vue | 2 +- .../task-detail/TaskDetailManagerDropdown.vue | 2 +- .../task-detail/TaskDetailRight.vue | 5 +- src/components/task-detail/TaskStatusList.vue | 5 +- src/constants/user.ts | 6 ++- src/types/user.ts | 48 ++++++++++++------- 11 files changed, 84 insertions(+), 48 deletions(-) diff --git a/src/api/user.ts b/src/api/user.ts index 7fb748bb..0315d6e2 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -46,3 +46,8 @@ export const changeLabel = async (taskID: number, labelId: number) => { const response = await axiosInstance.patch(`/api/tasks/${taskID}/label`, { labelId }) return response.data } + +export const getHistory = async (taskID: number) => { + const response = await axiosInstance.get(`/api/tasks/${taskID}/histories`) + return response.data +} diff --git a/src/assets/styles.css b/src/assets/styles.css index f63b503c..4627248b 100644 --- a/src/assets/styles.css +++ b/src/assets/styles.css @@ -110,7 +110,7 @@ body { @apply flex w-full h-11 items-center rounded p-4 bg-white border border-border-1 cursor-pointer text-black; } .request-task-dropdown-option-list { - @apply absolute w-full h-40 overflow-y-auto top-[52px] flex flex-col gap-2 p-2 bg-white rounded z-10 shadow border-t border-t-border-2 text-black; + @apply absolute w-full h-40 overflow-y-auto top-[52px] flex flex-col gap-2 p-2 bg-white rounded z-10 shadow-custom text-black; } .request-task-dropdown-option { @apply w-full flex items-center h-11 p-2 rounded hover:bg-background-2 cursor-pointer; diff --git a/src/components/task-detail/TaskDetail.vue b/src/components/task-detail/TaskDetail.vue index 33397aa4..69e9beaa 100644 --- a/src/components/task-detail/TaskDetail.vue +++ b/src/components/task-detail/TaskDetail.vue @@ -14,8 +14,8 @@
+ :historyData="historyData?.histories || []" + :is-approved="isApproved" />
diff --git a/src/components/task-detail/TaskDetailHistory.vue b/src/components/task-detail/TaskDetailHistory.vue index 4be13103..d6670ad3 100644 --- a/src/components/task-detail/TaskDetailHistory.vue +++ b/src/components/task-detail/TaskDetailHistory.vue @@ -1,33 +1,33 @@ diff --git a/src/types/user.ts b/src/types/user.ts index 92059fae..a4cc9d52 100644 --- a/src/types/user.ts +++ b/src/types/user.ts @@ -23,7 +23,7 @@ export interface RequestTaskDropdownProps { } export interface RequestTaskInputProps { - modelValue: string + modelValue: string|number placeholderText: string labelName: string isNotRequired?: boolean From 2f8ecf9ad2fea79893e0f880f1c55a5a8d363d1e Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Wed, 5 Feb 2025 09:49:53 +0900 Subject: [PATCH 12/17] =?UTF-8?q?:sparkles:=20[feat]=20:=20=ED=9A=8C?= =?UTF-8?q?=EC=9B=90=EC=B6=94=EA=B0=80=20api=20=EC=9E=84=EC=8B=9C=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/admin.ts | 15 +++++++++++---- src/components/request-task/RequestTaskInput.vue | 1 + src/components/user-manage/UserRegistration.vue | 12 ++++++++---- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/api/admin.ts b/src/api/admin.ts index 1bb7b488..18e2b801 100644 --- a/src/api/admin.ts +++ b/src/api/admin.ts @@ -1,4 +1,4 @@ -import type { NewLabelTypes } from '@/types/admin' +import type { NewLabelTypes, UserRegistrationProps } from '@/types/admin' import type { LabelDataTypes } from '@/types/common' import { axiosInstance } from '@/utils/axios' @@ -8,17 +8,17 @@ export const getLabelsAdmin = async () => { } export const deleteLabelAdmin = async (id: number) => { - const response = await axiosInstance.delete(`/api/management/labels/${id}`) + const response = await axiosInstance.delete(`/api/managements/labels/${id}`) return response.data } export const postAddLabelAdmin = async (newLabel: NewLabelTypes) => { - const response = await axiosInstance.post('/api/management/labels', newLabel) + const response = await axiosInstance.post('/api/managements/labels', newLabel) return response.data } export const patchLabelAdmin = async (editLabel: LabelDataTypes) => { - const response = await axiosInstance.patch(`/api/management/labels/${editLabel.labelId}`, { + const response = await axiosInstance.patch(`/api/managements/labels/${editLabel.labelId}`, { labelName: editLabel.labelName, labelColor: editLabel.labelColor }) @@ -29,3 +29,10 @@ export const deleteCategoryAdmin = async (id: number) => { const response = await axiosInstance.delete(`/api/managements/categories/${id}`) return response.data } + +export const addMemberAdmin = async (memberData: UserRegistrationProps) => { + console.log(memberData, '요청 데이터') + + const response = await axiosInstance.post('/api/managements/members', { memberData }) + return response.data +} diff --git a/src/components/request-task/RequestTaskInput.vue b/src/components/request-task/RequestTaskInput.vue index 08949f94..ed6343b6 100644 --- a/src/components/request-task/RequestTaskInput.vue +++ b/src/components/request-task/RequestTaskInput.vue @@ -11,6 +11,7 @@ diff --git a/src/components/user-manage/UserRegistration.vue b/src/components/user-manage/UserRegistration.vue index d3221d82..7ecc75bd 100644 --- a/src/components/user-manage/UserRegistration.vue +++ b/src/components/user-manage/UserRegistration.vue @@ -47,27 +47,31 @@ From ab0c3b3bba3b2e6d79e1de28ed8e7cc30f58a616 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Wed, 5 Feb 2025 09:50:15 +0900 Subject: [PATCH 13/17] =?UTF-8?q?:recycle:=20[refactor]=20:=20=EC=9A=94?= =?UTF-8?q?=EC=B2=AD=20=EC=84=B8=EB=B6=80=EC=82=AC=ED=95=AD=20=EB=88=84?= =?UTF-8?q?=EB=9D=BD=EC=A0=95=EB=B3=B4=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-detail/TaskDetailManagerDropdown.vue | 1 - src/components/task-detail/TaskDetailRight.vue | 9 +++++---- src/components/task-management/LabelManagement.vue | 5 +++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/components/task-detail/TaskDetailManagerDropdown.vue b/src/components/task-detail/TaskDetailManagerDropdown.vue index 8a04bb09..cc88e0ea 100644 --- a/src/components/task-detail/TaskDetailManagerDropdown.vue +++ b/src/components/task-detail/TaskDetailManagerDropdown.vue @@ -1,6 +1,5 @@