|
1 | 1 | <template> |
2 | | - <div class="flex flex-col rounded-lg max-w-1200 bg-white"> |
3 | | - <div class="w-full flex justify-between items-center"> |
4 | | - <div class="flex gap-4 text-sm font-bold"> |
5 | | - <div |
6 | | - v-if="!isManager" |
7 | | - class="flex gap-1 items-center cursor-pointer"> |
8 | | - <CommonIcons :name="reRequestIcon" /> |
9 | | - <p class="text-body">재요청</p> |
10 | | - </div> |
11 | | - <div |
12 | | - v-if="status.iconName && status.text" |
13 | | - class="flex gap-1 items-center cursor-pointer"> |
14 | | - <CommonIcons :name="status.iconName" /> |
15 | | - <p class="text-primary1">{{ status.text }}</p> |
16 | | - </div> |
17 | | - <div |
18 | | - v-if="isManager" |
19 | | - class="flex gap-1 items-center cursor-pointer"> |
20 | | - <CommonIcons :name="cancelIcon" /> |
21 | | - <p class="text-red-1">요청취소</p> |
22 | | - </div> |
23 | | - </div> |
24 | | - <CommonIcons |
25 | | - :name="closeIcon" |
26 | | - @click="closeTaskDetail" |
27 | | - class="cursor-pointer" /> |
28 | | - </div> |
| 2 | + <div |
| 3 | + class="flex flex-col overflow-y-auto rounded-lg w-full max-w-[1200px] min-w-[1024px] bg-white p-6"> |
| 4 | + <TaskDetailTopBar |
| 5 | + :is-manager="isManager" |
| 6 | + :is-approved="isApproved" |
| 7 | + :close-task-detail="closeTaskDetail" /> |
29 | 8 | <div class="w-full flex gap-6"> |
30 | | - <div class="w-full flex flex-col gap-y-8 overflow-y-auto scrollbar-hide"> |
31 | | - <TaskDetailLeft :task-detail="DUMMY_TASK_DETAIL_LEFT" /> |
| 9 | + <div class="w-full h-[718px] flex flex-col gap-y-8 overflow-y-auto scrollbar-hide"> |
| 10 | + <TaskDetailLeft :task-detail="DUMMY_TASK_DETAIL" /> |
32 | 11 | <div class="w-full border-border-1 border"></div> |
33 | 12 | <TaskDetailHistory |
34 | 13 | :history="DUMMY_TASK_DETAIL_HISTORY" |
35 | 14 | :is-approved="false" |
36 | 15 | :is-manager="false" /> |
37 | 16 | </div> |
38 | 17 | <div class="w-[1px] bg-border-1"></div> |
39 | | - <TaskDetailRight :task-detail="DUMMY_TASK_DETAIL_RIGHT" /> |
| 18 | + <TaskDetailRight |
| 19 | + :task-detail="DUMMY_TASK_DETAIL" |
| 20 | + :is-manager="true" /> |
40 | 21 | </div> |
41 | 22 | </div> |
42 | 23 | </template> |
43 | 24 |
|
44 | 25 | <script setup lang="ts"> |
45 | | -import { |
46 | | - approveIcon, |
47 | | - cancelIcon, |
48 | | - closeIcon, |
49 | | - modificationIcon, |
50 | | - reRequestIcon |
51 | | -} from '@/constants/iconPath' |
52 | 26 | import * as taskDetailData from '@/datas/taskdetail' |
53 | 27 | import type { TaskDetailProps } from '@/types/user' |
54 | | -import CommonIcons from '../common/CommonIcons.vue' |
55 | 28 | import TaskDetailHistory from './TaskDetailHistory.vue' |
56 | 29 | import TaskDetailLeft from './TaskDetailLeft.vue' |
57 | 30 | import TaskDetailRight from './TaskDetailRight.vue' |
| 31 | +import TaskDetailTopBar from './TaskDetailTopBar.vue' |
58 | 32 |
|
59 | | -const { DUMMY_TASK_DETAIL_HISTORY, DUMMY_TASK_DETAIL_LEFT, DUMMY_TASK_DETAIL_RIGHT } = |
60 | | - taskDetailData |
| 33 | +const { DUMMY_TASK_DETAIL_HISTORY, DUMMY_TASK_DETAIL } = taskDetailData |
61 | 34 |
|
62 | 35 | const { isManager, isApproved, closeTaskDetail } = defineProps<TaskDetailProps>() |
63 | | -
|
64 | | -const getStatus = (isManager: boolean) => { |
65 | | - if (!isManager && !isApproved) { |
66 | | - return { |
67 | | - iconName: modificationIcon, |
68 | | - text: '요청 수정' |
69 | | - } |
70 | | - } else if (isManager && !isApproved) { |
71 | | - return { |
72 | | - iconName: approveIcon, |
73 | | - text: '요청 승인' |
74 | | - } |
75 | | - } else { |
76 | | - return {} |
77 | | - } |
78 | | -} |
79 | | -
|
80 | | -const status = getStatus(isManager) |
81 | 36 | </script> |
0 commit comments