Skip to content

Commit 315843f

Browse files
committed
♻️ [refactor] : api 등록 및 메뉴 점 아이콘 등록
1 parent fe9be6f commit 315843f

File tree

3 files changed

+36
-4
lines changed

3 files changed

+36
-4
lines changed

src/api/user.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,23 @@ export const getHistory = async (taskID: number) => {
5151
const response = await axiosInstance.get(`/api/tasks/${taskID}/histories`)
5252
return response.data
5353
}
54+
55+
export const postComment = async (taskID: number, content: string) => {
56+
const response = await axiosInstance.post(`/api/comment/${taskID}`, { content })
57+
return response.data
58+
}
59+
60+
export const postCommentAttachment = async (taskID: number, formdata: FormData) => {
61+
const response = await formDataAxiosInstance.post(`/api/comment/attachment/${taskID}`, formdata)
62+
return response.data
63+
}
64+
65+
export const patchComment = async (commentId: number, content: string) => {
66+
const response = await axiosInstance.patch(`/api/comment/${commentId}`, { content })
67+
return response.data
68+
}
69+
70+
export const deleteComment = async (commentId: number) => {
71+
const response = await axiosInstance.delete(`/api/comment/${commentId}`)
72+
return response.data
73+
}

src/components/task-detail/TaskDetailHistoryChat.vue

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,24 @@
1717
</div>
1818
<div
1919
:class="[
20-
'flex h-full items-end text-xs font-bold text-body',
21-
isProcessor ? 'ml-4 order-1' : 'ml-2 order-3'
20+
'flex flex-col h-full justify-end text-xs font-bold text-body gap-1',
21+
isProcessor ? 'order-1 items-end' : 'order-3 items-start'
2222
]">
23-
{{ history.details.commentDetails?.isModified ? '(수정됨)' : '' }}
24-
{{ formatTodayOrNot(history.date, history.time) }}
23+
<CommonIcons :name="menuDotIcon" />
24+
<div>
25+
{{ history.details.commentDetails?.isModified ? '(수정됨)' : '' }}
26+
{{ formatTodayOrNot(history.date, history.time) }}
27+
</div>
2528
</div>
2629
</div>
2730
</template>
2831

2932
<script setup lang="ts">
33+
import { menuDotIcon } from '@/constants/iconPath'
3034
import type { TaskHistory } from '@/types/user'
3135
import { formatTodayOrNot } from '@/utils/date'
3236
import { computed, defineProps } from 'vue'
37+
import CommonIcons from '../common/CommonIcons.vue'
3338
const { history, requestorName } = defineProps<{
3439
history: TaskHistory
3540
requestorName: string

src/constants/iconPath.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,3 +240,10 @@ export const fileIcon = {
240240
'stroke-linejoin': 'round' as const
241241
}
242242
}
243+
244+
export const menuDotIcon = {
245+
path: 'M8.75 4.99973C8.75 4.82598 8.75 4.73848 8.76 4.66598C8.792 4.43727 8.89765 4.22522 9.06095 4.06192C9.22424 3.89863 9.43629 3.79298 9.665 3.76098C9.73875 3.75098 9.825 3.75098 9.99875 3.75098C10.1725 3.75098 10.2612 3.75098 10.3325 3.76098C10.5612 3.79298 10.7733 3.89863 10.9366 4.06192C11.0998 4.22522 11.2055 4.43727 11.2375 4.66598C11.2475 4.73848 11.2475 4.82598 11.2475 4.99973C11.2475 5.17348 11.2475 5.26098 11.2375 5.33348C11.2055 5.56218 11.0998 5.77423 10.9366 5.93753C10.7733 6.10083 10.5612 6.20647 10.3325 6.23848C10.26 6.24848 10.1725 6.24848 9.99875 6.24848C9.825 6.24848 9.7375 6.24848 9.665 6.23848C9.43629 6.20647 9.22424 6.10083 9.06095 5.93753C8.89765 5.77423 8.792 5.56218 8.76 5.33348C8.75 5.26098 8.75 5.17348 8.75 4.99973ZM8.75 9.99973C8.75 9.82598 8.75 9.73848 8.76 9.66598C8.792 9.43727 8.89765 9.22522 9.06095 9.06192C9.22424 8.89863 9.43629 8.79298 9.665 8.76098C9.73875 8.75098 9.825 8.75098 9.99875 8.75098C10.1725 8.75098 10.2612 8.75098 10.3325 8.76098C10.5612 8.79298 10.7733 8.89863 10.9366 9.06192C11.0998 9.22522 11.2055 9.43727 11.2375 9.66598C11.2475 9.73848 11.2475 9.82598 11.2475 9.99973C11.2475 10.1735 11.2475 10.261 11.2375 10.3335C11.2055 10.5622 11.0998 10.7742 10.9366 10.9375C10.7733 11.1008 10.5612 11.2065 10.3325 11.2385C10.26 11.2485 10.1725 11.2485 9.99875 11.2485C9.825 11.2485 9.7375 11.2485 9.665 11.2385C9.43629 11.2065 9.22424 11.1008 9.06095 10.9375C8.89765 10.7742 8.792 10.5622 8.76 10.3335C8.75 10.261 8.75 10.1735 8.75 9.99973ZM8.75 14.9997C8.75 14.826 8.75 14.7385 8.76 14.666C8.792 14.4373 8.89765 14.2252 9.06095 14.0619C9.22424 13.8986 9.43629 13.793 9.665 13.761C9.73875 13.751 9.825 13.751 9.99875 13.751C10.1725 13.751 10.2612 13.751 10.3325 13.761C10.5612 13.793 10.7733 13.8986 10.9366 14.0619C11.0998 14.2252 11.2055 14.4373 11.2375 14.666C11.2475 14.7385 11.2475 14.826 11.2475 14.9997C11.2475 15.1735 11.2475 15.261 11.2375 15.3347C11.2055 15.5634 11.0998 15.7755 10.9366 15.9388C10.7733 16.1021 10.5612 16.2077 10.3325 16.2397C10.26 16.2497 10.1725 16.2497 10 16.2497C9.8275 16.2497 9.73875 16.2497 9.66625 16.2397C9.43754 16.2077 9.22549 16.1021 9.0622 15.9388C8.8989 15.7755 8.79325 15.5634 8.76125 15.3347C8.75 15.2622 8.75 15.1747 8.75 14.9997Z',
246+
width: 12,
247+
height: 20,
248+
fill: '#71717A'
249+
}

0 commit comments

Comments
 (0)