Skip to content

Commit 27fa177

Browse files
authored
Merge pull request #178 from TaskFlow-CLAP/CLAP-391
�CLAP-391 UI/UX 개선 Tony.tsx
2 parents 23ec9d7 + f2a83f2 commit 27fa177

File tree

77 files changed

+302
-577
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+302
-577
lines changed

src/api/common.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,56 @@
1+
import { useMemberStore } from '@/stores/member'
12
import { axiosInstance, formDataAxiosInstance } from '../utils/axios'
3+
import { createPinia, setActivePinia, storeToRefs } from 'pinia'
4+
5+
setActivePinia(createPinia())
6+
7+
const memberStore = useMemberStore()
8+
const { isLogined } = storeToRefs(memberStore)
29

310
export const patchEditInfo = async (formdata: FormData) => {
11+
if (!isLogined) return
412
const response = await formDataAxiosInstance.patch('/api/members/info', formdata)
513
return response.data
614
}
715

816
export const getNotification = async (pageNum: number, sizeNum: number) => {
17+
if (!isLogined) return
918
const response = await axiosInstance.get(`/api/notifications?page=${pageNum}&size=${sizeNum}`)
10-
1119
return response.data
1220
}
1321

1422
export const patchNotificationRead = async (notificationId: number) => {
23+
if (!isLogined) return
1524
const response = await axiosInstance.patch(`/api/notifications/${notificationId}`)
1625
return response.data
1726
}
1827

1928
export const getNotifiCount = async () => {
29+
if (!isLogined) return
2030
const response = await axiosInstance.get(`/api/notifications/count`)
2131
return response.data
2232
}
2333

2434
export const getMainCategory = async () => {
35+
if (!isLogined) return
2536
const response = await axiosInstance.get('/api/main-category')
2637
return response.data
2738
}
2839

2940
export const getSubCategory = async () => {
41+
if (!isLogined) return
3042
const response = await axiosInstance.get('/api/sub-category')
3143
return response.data
3244
}
3345

3446
export const getLabels = async () => {
47+
if (!isLogined) return
3548
const response = await axiosInstance.get('/api/labels')
3649
return response.data
3750
}
3851

3952
export const getCategory = async () => {
53+
if (!isLogined) return
4054
const response = await axiosInstance.get('/api/category')
4155
return response.data
4256
}

src/assets/styles.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ body {
3838
}
3939

4040
.button-large {
41-
@apply flex w-full py-3 font-bold border rounded items-center justify-center min-w-[138px];
41+
@apply flex w-full py-3 font-semibold border rounded items-center justify-center min-w-[138px];
4242
}
4343
.button-large-default {
4444
@apply button-large bg-white text-disabled border-border-1 hover:bg-background-2;
@@ -51,7 +51,7 @@ body {
5151
}
5252

5353
.button-medium {
54-
@apply flex items-center justify-center rounded px-4 py-2 font-bold gap-1 text-xs cursor-pointer shrink-0 h-full;
54+
@apply flex items-center justify-center rounded px-4 py-2 font-semibold gap-1 text-xs cursor-pointer shrink-0 h-full max-h-[34px];
5555
}
5656
.button-medium-primary {
5757
@apply button-medium bg-primary1 text-white hover:bg-[#6869DE];
@@ -70,7 +70,7 @@ body {
7070
}
7171

7272
.button-small {
73-
@apply flex items-center gap-1 text-xs font-bold;
73+
@apply flex items-center gap-1 text-xs font-semibold;
7474
}
7575
.button-small-primary {
7676
@apply text-primary1;
@@ -93,7 +93,7 @@ body {
9393
@apply flex flex-col gap-1 shrink-0;
9494
}
9595
.filter-title {
96-
@apply text-[10px] font-bold text-body;
96+
@apply text-[10px] font-semibold text-body;
9797
}
9898
.filter-dropdown {
9999
@apply flex justify-center items-center w-full h-8 px-2 border-b border-border-1 relative text-xs cursor-pointer;
@@ -110,7 +110,7 @@ body {
110110
}
111111

112112
.task-detail {
113-
@apply text-xs text-body font-bold mb-2;
113+
@apply text-xs text-body font-semibold mb-2;
114114
}
115115

116116
.request-task-dropdown {
@@ -131,7 +131,7 @@ body {
131131
@apply max-w-1200 min-h-screen flex flex-col gap-6;
132132
}
133133
.task-management-title {
134-
@apply flex w-full h-8 pl-6 gap-6 items-center text-xs bg-background-2 text-body font-bold border-b border-b-border-1;
134+
@apply flex w-full h-8 pl-6 gap-6 items-center text-xs bg-background-2 text-body font-semibold border-b border-b-border-1;
135135
}
136136
.category-management-line {
137137
@apply flex items-center px-4 w-full h-11 border-b border-b-border-1;

src/components/charts/LineChart.vue

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,26 @@ const teamData = {
5757
]
5858
}
5959
60+
const calculateStepSize = (data: number[]) => {
61+
const max = Math.max(...data)
62+
const min = Math.min(...data)
63+
const range = max - min
64+
65+
if (range <= 10) return 1
66+
if (range <= 100) return 5
67+
if (range <= 1000) return 50
68+
return Math.ceil(range / 10)
69+
}
70+
6071
const options = {
6172
responsive: true,
6273
maintainAspectRatio: false,
6374
scales: {
6475
y: {
65-
beginAtZero: true,
6676
ticks: {
67-
stepSize: 1
77+
stepSize: calculateStepSize(series),
78+
maxTicksLimit: 10,
79+
autoSkip: true
6880
},
6981
suggestedMax: Math.max(...series) + 1
7082
}

src/components/common/EditInformation.vue

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<ModalView
44
:isOpen="isModalVisible"
55
:type="'successType'"
6-
@close="handleCancel">
6+
@close="isModalVisible = !isModalVisible">
77
<template #header>정보가 수정되었습니다</template>
88
</ModalView>
99

@@ -26,20 +26,20 @@
2626
</ModalView>
2727

2828
<div class="profile">
29-
<p class="text-body text-xs font-bold">프로필 사진</p>
29+
<p class="text-body text-xs font-semibold">프로필 사진</p>
3030
<ImageContainer
3131
class="mt-3"
3232
:url="previewUrl || info.profileImageUrl"
3333
:size="96" />
3434
<div class="flex gap-6">
3535
<label
3636
for="fileInput"
37-
class="mt-3 text-xs text-primary1 font-bold cursor-pointer hover:underline"
37+
class="mt-3 text-xs text-primary1 font-semibold cursor-pointer hover:underline"
3838
>변경</label
3939
>
4040
<label
4141
for="fileDelete"
42-
class="mt-3 text-xs text-red-1 font-bold cursor-pointer hover:underline"
42+
class="mt-3 text-xs text-red-1 font-semibold cursor-pointer hover:underline"
4343
>삭제</label
4444
>
4545
</div>
@@ -56,7 +56,7 @@
5656
class="hidden" />
5757
</div>
5858
<div class="flex flex-col relative">
59-
<p class="text-body text-xs font-bold">이름</p>
59+
<p class="text-body text-xs font-semibold">이름</p>
6060
<span class="absolute top-1 right-2 text-xs text-gray-500"> {{ name.length }} / 10 </span>
6161
<input
6262
:class="[
@@ -71,31 +71,31 @@
7171
<div class="mb-1">
7272
<span
7373
v-show="isInvalid || isFull"
74-
class="absolute text-red-1 text-xs font-bold mt-1"
74+
class="absolute text-red-1 text-xs font-semibold mt-1"
7575
>{{ nameError }}</span
7676
>
7777
</div>
7878
</div>
7979
<div class="flex flex-col">
80-
<p class="text-body text-xs font-bold">아이디</p>
80+
<p class="text-body text-xs font-semibold">아이디</p>
8181
<p class="mt-2">{{ info.nickname }}</p>
8282
</div>
8383
<div class="flex flex-col">
84-
<p class="text-body text-xs font-bold">이메일</p>
84+
<p class="text-body text-xs font-semibold">이메일</p>
8585
<p class="mt-2">{{ info.email }}</p>
8686
</div>
8787
<div class="flex flex-col">
88-
<p class="text-body text-xs font-bold">부서</p>
88+
<p class="text-body text-xs font-semibold">부서</p>
8989
<p class="mt-2">{{ info.departmentName }}</p>
9090
</div>
9191
<div
9292
v-if="info.departmentRole"
9393
class="flex flex-col">
94-
<p class="text-body text-xs font-bold">직무</p>
94+
<p class="text-body text-xs font-semibold">직무</p>
9595
<p class="mt-2">{{ info.departmentRole }}</p>
9696
</div>
9797
<div>
98-
<p class="text-body text-xs font-bold">알림 수신 여부</p>
98+
<p class="text-body text-xs font-semibold">알림 수신 여부</p>
9999
<div class="flex flex-col mt-2 gap-2">
100100
<FormCheckbox
101101
v-model="kakaoWorkCheck"
@@ -108,7 +108,7 @@
108108
</div>
109109
</div>
110110
<div>
111-
<p class="text-body text-xs font-bold">비밀번호 재설정</p>
111+
<p class="text-body text-xs font-semibold">비밀번호 재설정</p>
112112
<button
113113
type="button"
114114
class="button-medium-secondary mt-2"
@@ -279,13 +279,9 @@ const handleSubmit = async () => {
279279
selectedFile.value = null
280280
}
281281
282-
try {
283-
await patchEditInfo(formData)
284-
isModalVisible.value = true
285-
await memberStore.updateMemberInfoWithToken()
286-
} catch (error) {
287-
console.error('요청 실패:', error)
288-
}
282+
await patchEditInfo(formData)
283+
isModalVisible.value = true
284+
await memberStore.updateMemberInfoWithToken()
289285
}
290286
}
291287
</script>

src/components/common/FormCheckbox.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="text-xs font-bold">
2+
<div class="text-xs font-semibold">
33
<p class="text-body mb-2">{{ labelName }}</p>
44
<div
55
@click="!isDisabled && updateValue()"

src/components/common/ModalView.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222

2323
<div
2424
v-if="$slots.header"
25-
class="flex text-2xl font-bold justify-center whitespace-pre-wrap text-center">
25+
class="flex text-2xl font-semibold justify-center whitespace-pre-wrap text-center">
2626
<slot name="header"></slot>
2727
</div>
2828

2929
<div
3030
v-if="type != 'inputType' && $slots.header"
31-
class="flex text-sm font-bold text-body justify-center whitespace-pre-wrap text-center">
31+
class="flex text-sm font-semibold text-body justify-center whitespace-pre-wrap text-center">
3232
<slot name="body"></slot>
3333
</div>
3434
</div>

src/components/common/TaskCard.vue

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,24 @@
1919
<span class="text-xs text-body">{{ data.mainCategoryName }} - {{ data.categoryName }}</span>
2020
</div>
2121
<div class="flex justify-between items-end">
22-
<span class="text-xs font-bold whitespace-nowrap overflow-hidden text-ellipsis">
22+
<span class="text-xs font-semibold whitespace-nowrap overflow-hidden text-ellipsis">
2323
{{ data.taskCode }}
2424
</span>
2525
<div class="flex flex-col gap-1 items-end">
26-
<span class="text-xs font-bold text-body">{{ data.requesterDepartment }}</span>
26+
<span class="text-xs font-semibold text-body">{{ data.requesterDepartment }}</span>
2727
<div class="flex items-center gap-1.5">
2828
<ImageContainer
2929
:url="data.requesterImageUrl"
3030
:size="16" />
31-
<span class="text-xs font-bold">{{ data.requesterNickname }}</span>
31+
<span class="text-xs font-semibold">{{ data.requesterNickname }}</span>
3232
</div>
3333
</div>
3434
</div>
3535
</div>
3636
<TaskDetail
3737
v-if="selectedID"
3838
:selected-id="selectedID"
39-
:close-task-detail="() => handleModal(null)"
40-
click.stop />
39+
:close-task-detail="() => handleModal(null)" />
4140
</template>
4241

4342
<script setup lang="ts">

src/components/common/TaskLabel.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<span
3-
class="px-2 py-0.5 text-[10px] font-bold border-2 rounded-full whitespace-nowrap"
3+
class="px-2 py-0.5 text-[10px] font-semibold border-2 rounded-full whitespace-nowrap"
44
:style="{ borderColor, backgroundColor }">
55
{{ content }}
66
</span>

src/components/common/TaskStatus.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
class="flex px-3 py-1 rounded-full"
44
:class="bgColor">
55
<span
6-
class="text-xs font-bold"
6+
class="text-xs font-semibold"
77
:class="textColor">
88
{{ statusAsText(status) }}
99
</span>

src/components/common/TitleBar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div class="flex justify-between items-center px-6 py-3 border-l-8 border-primary1">
3-
<span class="text-2xl font-bold">{{ title }}</span>
3+
<span class="text-2xl font-semibold">{{ title }}</span>
44
<div
55
v-if="$slots.button"
66
class="flex gap-2">

0 commit comments

Comments
 (0)