Skip to content

Commit 1b7f09b

Browse files
authored
Merge pull request #112 from TaskFlow-CLAP/CLAP-311
CLAP-311 애니메이션 적용
2 parents 535d160 + cf22d65 commit 1b7f09b

File tree

14 files changed

+76
-30
lines changed

14 files changed

+76
-30
lines changed

src/api/user.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type { Status } from '@/types/common'
22
import type { RequestApprovePostTypes } from '@/types/manager'
3-
import type { userInfo } from '@/types/user'
43
import { axiosInstance, formDataAxiosInstance } from '@/utils/axios'
54

65
export const postTaskRequest = async (formdata: FormData) => {
@@ -48,7 +47,8 @@ export const changeLabel = async (taskID: number, labelId: number) => {
4847
return response.data
4948
}
5049

51-
export const getHistory = async (taskID: number) => {
50+
export const getHistory = async (taskID: number | null) => {
51+
if (taskID === null) return null
5252
const response = await axiosInstance.get(`/api/tasks/${taskID}/histories`)
5353
return response.data
5454
}

src/assets/styles.css

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,37 @@ body {
142142
.task-detail-manager-dropdown {
143143
@apply flex w-full h-10 items-center rounded p-4 bg-white border border-border-1 cursor-pointer text-black;
144144
}
145+
146+
.modal-enter-active,
147+
.modal-leave-active {
148+
transition:
149+
transform 0.25s ease-in-out,
150+
opacity 0.25s ease-in-out;
151+
}
152+
153+
.modal-enter-from,
154+
.modal-leave-to {
155+
transform: translate(-50%, -40%);
156+
opacity: 0;
157+
}
158+
159+
.modal-enter-to,
160+
.modal-leave-from {
161+
transform: translate(-50%, -50%);
162+
opacity: 1;
163+
}
164+
165+
.sidebar-enter-active,
166+
.sidebar-leave-active {
167+
transition: transform 0.25s ease-in-out;
168+
}
169+
170+
.sidebar-enter-from,
171+
.sidebar-leave-to {
172+
transform: translateX(-100%);
173+
}
174+
175+
.sidebar-enter-to,
176+
.sidebar-leave-from {
177+
transform: translateX(0);
178+
}

src/components/LineChart.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ import {
1919
PointElement,
2020
CategoryScale,
2121
LinearScale,
22-
Colors
22+
Colors,
23+
Filler
2324
} from 'chart.js'
2425
import NoContent from './lists/NoContent.vue'
2526
import type { PeriodType } from '@/types/manager'
@@ -32,7 +33,8 @@ ChartJS.register(
3233
PointElement,
3334
CategoryScale,
3435
LinearScale,
35-
Colors
36+
Colors,
37+
Filler
3638
)
3739
3840
const { labels, series, dataLabel, periodType } = defineProps<{

src/components/ModalView.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
<div
33
v-if="isOpen"
44
class="fixed inset-0 bg-black bg-opacity-15 flex justify-center items-center z-50"
5-
@click.self="closeModal">
6-
<div class="bg-white rounded-lg shadow-lg px-8 py-8">
5+
@click.self="closeModal" />
6+
<Transition name="modal">
7+
<div
8+
v-if="isOpen"
9+
class="bg-white rounded-lg shadow-lg px-8 py-8 fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-50">
710
<div class="flex flex-col gap-8 w-[300px]">
811
<div class="flex flex-col gap-6">
912
<div class="flex flex-col items-center gap-2">
@@ -65,7 +68,7 @@
6568
</div>
6669
</div>
6770
</div>
68-
</div>
71+
</Transition>
6972
</template>
7073

7174
<script setup lang="ts">

src/components/api-logs/ApiLogsListCard.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import type { ListCardProps } from '@/types/common'
1717
import ListCardTab from '../lists/ListCardTab.vue'
1818
import type { ApiLogsListData } from '@/types/admin'
19-
import { formatDate } from '@/utils/date'
19+
import { formatFullDateTime } from '@/utils/date'
2020
import { API_LOGS_DIVISION_LIST } from '@/constants/admin'
2121
2222
const { info } = defineProps<{ info: ApiLogsListData }>()
@@ -27,7 +27,7 @@ const myRequestTabList: ListCardProps[] = [
2727
isTextXs: true,
2828
isTextBody: true
2929
},
30-
{ content: formatDate(info.requestAt), width: 180, isTextXs: true },
30+
{ content: formatFullDateTime(info.requestAt), width: 180, isTextXs: true },
3131
{ content: info.nickName, width: 80 },
3232
{ content: info.clientIp, width: 120, isTextXs: true },
3333
{ content: String(info.statusCode), width: 40, isTextXs: true, isStatusCode: true },

src/components/my-request/MyRequestListCard.vue

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

src/components/my-task/MyTaskListCard.vue

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

src/components/request-history/RequestHistoryListCard.vue

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

src/components/request-task/CategoryDropDown.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
class="relative flex">
1919
<div
2020
class="flex w-full h-11 items-center rounded p-4 border border-border-1 cursor-pointer text-black"
21-
:class="isDisabled ? 'bg-background-1' : 'bg-white'"
21+
:class="isDisabled ? 'bg-background-2' : 'bg-white'"
2222
@click="toggleDropdown">
2323
<p :class="{ 'text-disabled': !modelValue?.name }">
2424
{{ modelValue?.name ?? labelName + '를 선택해주세요' }}

src/components/requested/RequestedListCard.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
</div>
2525
</div>
2626
<TaskDetail
27-
v-if="selectedID"
2827
:is-approved="true"
2928
:selected-id="selectedID"
3029
:close-task-detail="() => handleModal(null)" />

0 commit comments

Comments
 (0)