Skip to content

Commit 0b171a7

Browse files
committed
🐛 [fix] 부가설명 칸 벗어나는 오류 수정 및 Vue Warning 제거
1 parent e2a5d60 commit 0b171a7

File tree

7 files changed

+17
-8
lines changed

7 files changed

+17
-8
lines changed

src/components/charts/LineChart.vue

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,13 +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: {
6576
ticks: {
66-
stepSize: 1
77+
stepSize: calculateStepSize(series),
78+
maxTicksLimit: 10,
79+
autoSkip: true
6780
},
6881
suggestedMax: Math.max(...series) + 1
6982
}

src/components/common/TaskCard.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@
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/my-request/MyRequestListCard.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
</div>
1414
<TaskDetail
1515
v-if="selectedID"
16-
:is-approved="info.taskStatus !== 'REQUESTED'"
1716
:selected-id="selectedID"
1817
:close-task-detail="() => handleModal(null)" />
1918
</template>

src/components/my-task/MyTaskListCard.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
</div>
1414
<TaskDetail
1515
v-if="selectedID"
16-
:is-approved="info.taskStatus !== 'REQUESTED'"
1716
:selected-id="selectedID"
1817
:close-task-detail="() => handleModal(null)" />
1918
</template>

src/components/request-history/RequestHistoryListCard.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
</div>
1414
<TaskDetail
1515
v-if="selectedID"
16-
:is-approved="info.taskStatus !== 'REQUESTED'"
1716
:selected-id="selectedID"
1817
:close-task-detail="() => handleModal(null)" />
1918
</template>

src/components/requested/RequestedListCard.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
</div>
3030
<TaskDetail
3131
v-if="selectedID"
32-
:is-approved="true"
3332
:selected-id="selectedID"
3433
:close-task-detail="() => handleModal(null)" />
3534
<ModalView

src/components/task-detail/TaskDetailLeft.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
</div>
1515
<div v-if="data.description">
1616
<p class="task-detail">부가 설명</p>
17-
<p class="px-6 py-4 bg-primary2 rounded-lg font-normal min-h-[120px] whitespace-pre-wrap">
17+
<p
18+
class="px-6 py-4 bg-primary2 rounded-lg font-normal min-h-[120px] whitespace-pre-wrap break-all">
1819
{{ data.description }}
1920
</p>
2021
</div>

0 commit comments

Comments
 (0)