Skip to content

Commit 8cb334c

Browse files
committed
🔀 [fix] : conflict resolved
2 parents d67aae7 + b4b0252 commit 8cb334c

33 files changed

+967
-144
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ dist
1313
dist-ssr
1414
coverage
1515
*.local
16+
.env
1617

1718
/cypress/videos/
1819
/cypress/screenshots/
@@ -27,4 +28,5 @@ coverage
2728
*.sln
2829
*.sw?
2930

31+
3032
*.tsbuildinfo

package-lock.json

Lines changed: 46 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,17 @@
1414
},
1515
"dependencies": {
1616
"axios": "^1.7.9",
17+
"js-cookie": "^3.0.5",
1718
"pinia": "^2.3.0",
1819
"vue": "^3.5.13",
19-
"vue-router": "^4.5.0"
20+
"vue-router": "^4.5.0",
21+
"vuedraggable": "^4.1.0"
2022
},
2123
"devDependencies": {
2224
"@tsconfig/node22": "^22.0.0",
25+
"@types/js-cookie": "^3.0.6",
2326
"@types/node": "^22.10.2",
27+
"@types/sortablejs": "^1.15.8",
2428
"@typescript-eslint/eslint-plugin": "^8.20.0",
2529
"@typescript-eslint/parser": "^8.20.0",
2630
"@vitejs/plugin-vue": "^5.2.1",

public/images/mockProfile.jpg

24.7 KB
Loading

src/api/test.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import axiosInstance from '../utils/axios'
2+
3+
export const getNotifications = async () => {
4+
const response = await axiosInstance.get('/api/notifications?page=0&size=5')
5+
return response.data
6+
}
7+
8+
export const postLogin = async (nickname: string, password: string) => {
9+
const response = await axiosInstance.post('/api/auths/login', { nickname, password })
10+
return response.data
11+
}
12+
13+
export const patchReadNotification = async (notificationId: number) => {
14+
const response = await axiosInstance.patch(`/api/notification/${notificationId}`)
15+
return response.data
16+
}

src/assets/styles.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,7 @@ body {
100100
.input-box {
101101
@apply block w-full px-4 py-4 border border-zinc-300 rounded focus:outline-none;
102102
}
103+
104+
.task-detail {
105+
@apply text-xs text-body font-bold mb-2;
106+
}

src/components/TaskCard.vue

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<template>
2+
<div
3+
class="w-full max-w-80 border-l-8 bg-white py-4 pl-6 pr-4 flex flex-col gap-6 rounded-lg shadow-custom hover:bg-background-2"
4+
:class="borderLeft"
5+
@click="onTaskClick">
6+
<div class="flex flex-col gap-1">
7+
<div class="flex justify-between items-center gap-4">
8+
<span class="text-black">{{ data.title }}</span>
9+
<CommonIcons :name="bentoIcon" />
10+
</div>
11+
<span class="text-xs text-body">{{ data.mainCategoryName }} - {{ data.categoryName }}</span>
12+
</div>
13+
<div class="flex justify-between items-end">
14+
<span class="text-xs font-bold text-black">{{ data.taskCode }}</span>
15+
<div class="flex flex-col gap-1 items-end">
16+
<span class="text-xs font-bold text-body">{{ data.requesterDepartment }}</span>
17+
<div class="flex items-center gap-1">
18+
<div class="w-4 h-4 rounded-full bg-background-1 overflow-hidden">
19+
<img :src="data.requesterImageUrl" />
20+
</div>
21+
<span class="text-xs font-bold text-black">{{ data.requesterNickName }}</span>
22+
</div>
23+
</div>
24+
</div>
25+
</div>
26+
</template>
27+
28+
<script setup lang="ts">
29+
import { bentoIcon } from '@/constants/iconPath'
30+
import type { Status } from '@/types/common'
31+
import { computed } from 'vue'
32+
import type { TaskCardProps } from '@/types/manager'
33+
import CommonIcons from './common/CommonIcons.vue'
34+
import { statusAsColor } from '@/utils/statusAsColor'
35+
36+
const { data } = defineProps<{ data: TaskCardProps }>()
37+
38+
const borderLeft = computed(() => {
39+
return `border-${statusAsColor(data.taskStatus as Status)}-1`
40+
})
41+
42+
const onTaskClick = () => {
43+
console.log('clicked')
44+
}
45+
</script>

src/components/TaskStatus.vue

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,27 @@
44
:class="bgColor">
55
<span
66
class="text-xs font-bold"
7-
:class="textColor"
8-
>{{ status }}</span
9-
>
7+
:class="textColor">
8+
{{ status }}
9+
</span>
1010
</div>
1111
</template>
1212

1313
<script setup lang="ts">
14+
import type { Status } from '@/types/common'
15+
import { statusAsColor } from '@/utils/statusAsColor'
1416
import { computed } from 'vue'
1517
1618
const { status, isActive } = defineProps<{
17-
status?: string
19+
status: Status
1820
isActive?: boolean
1921
}>()
2022
21-
const defaultColor = {
22-
요청: 'gray',
23-
'진행 중': 'blue',
24-
'검토 중': 'orange',
25-
완료: 'green',
26-
종료: 'red'
27-
}
28-
29-
const key = status as keyof typeof defaultColor
30-
3123
const textColor = computed(() => {
32-
return isActive ? 'text-white' : `text-${defaultColor[key]}-1`
24+
return isActive ? 'text-white' : `text-${statusAsColor(status)}-1`
3325
})
3426
const bgColor = computed(() => {
35-
return isActive ? `bg-${defaultColor[key]}-1` : `bg-${defaultColor[key]}-2`
27+
return isActive ? `bg-${statusAsColor(status)}-1` : `bg-${statusAsColor(status)}-2`
3628
})
3729
</script>
3830

src/components/lists/ListCardTab.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</div>
1111
<TaskStatus
1212
v-if="isStatus"
13-
:status="content" />
13+
:status="content as Status" />
1414
<span
1515
v-else
1616
class="break-all"
@@ -21,7 +21,7 @@
2121
</template>
2222

2323
<script setup lang="ts">
24-
import type { ListCardProps } from '@/types/common'
24+
import type { ListCardProps, Status } from '@/types/common'
2525
import TaskStatus from '../TaskStatus.vue'
2626
2727
const { content, width, isTextXs, profileImg, isStatus, isStatusCode, isTextBody } =

src/components/lists/ListPagination.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<script setup lang="ts">
4343
import { nextIcon, nextSetIcon, prevIcon, prevSetIcon } from '@/constants/iconPath'
4444
import { computed } from 'vue'
45-
import CommonIcons from '../common/CommonIcons.vue';
45+
import CommonIcons from '../common/CommonIcons.vue'
4646
4747
const { pageNumber, totalPage } = defineProps<{ pageNumber: number; totalPage: number }>()
4848
const emit = defineEmits(['update:pageNumber'])

0 commit comments

Comments
 (0)