Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
9324ac5
:recycle: [refactor] : 비밀번호 재설정 관련 페이지 뒤로가기 버튼 누락 수정
seorang42 Feb 11, 2025
75d44cc
:recycle: [refactor] : 비밀번호 재설정 모달 표시 중 엔터로 submit 재실행 방지, 모달 외 스크롤 방…
seorang42 Feb 11, 2025
c3dce6e
:bug: [fix] 작업 없을 시 높이 비정상적으로 표시되는 오류 수정
seorang42 Feb 11, 2025
a0493ed
:bug: [fix] 알림에 시간 표시 누락 수정
seorang42 Feb 11, 2025
fd3f02f
:recycle: [refactor] : ModalView에 overflow-hidden, preventEnter 적용
seorang42 Feb 11, 2025
6ad5dba
:recycle: [refactor] : TaskDetail에 overflow-hidden 적용
seorang42 Feb 11, 2025
2cdec10
:bug: [fix] ModalView 닫힐 때 overflow-hidden 미해제 오류 수정
seorang42 Feb 11, 2025
76db077
:recycle: [refactor] : 알림에서 TaskDetail 열람 시 replace로 이동
seorang42 Feb 11, 2025
489071a
:recycle: [refactor] : 카테고리 중복 검사 및 등록 -> 추가 단어 변경
seorang42 Feb 11, 2025
486ecbb
:recycle: [refactor] : 카테고리 등록 -> 추가 단어 변경
seorang42 Feb 11, 2025
1f5c22a
:bug: [fix] TaskStatusList에 요청 표시 삭제
seorang42 Feb 11, 2025
10cdc07
:recycle: [refactor] : Route Guard 오작동 해결을 위한 리팩토링 및 전역 오류 핸들링 추가
seorang42 Feb 11, 2025
b993d16
:bug: [fix] ModalView z-index 조정
seorang42 Feb 11, 2025
36af221
:recycle: [refactor] : Category, SubCategory Dto 리팩토링
seorang42 Feb 11, 2025
4c0433e
:lipstick: [design] : 필터 드롭다운 max-h 증가
seorang42 Feb 11, 2025
089ab99
:lipstick: [design] : 알림 hover 속성 설정 및 button-small hover 색상 수정
seorang42 Feb 11, 2025
6171703
:bug: [fix] 이미 가입된 사용자 이메일 초대 가능했던 현상 수정
seorang42 Feb 11, 2025
a5429fb
:twisted_rightwards_arrows: [fix] : conflict resolved
seorang42 Feb 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/api/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const postLogin = async (nickName: string, password: string) => {
}

export const patchPassword = async (password: string) => {
const request = { password: password }
const request = { password }
const response = await axiosInstance.patch('/api/members/password', request)
return response.data
}
Expand Down
11 changes: 7 additions & 4 deletions src/assets/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,22 @@ body {
}

.button-medium {
@apply flex items-center justify-center rounded px-4 py-2 font-bold gap-1 text-xs cursor-pointer shrink-0;
@apply flex items-center justify-center rounded px-4 py-2 font-bold gap-1 text-xs cursor-pointer shrink-0 h-full;
}
.button-medium-primary {
@apply button-medium bg-primary1 text-white hover:bg-[#6869DE];
}
.button-medium-secondary {
@apply button-medium bg-white border border-primary1 text-primary1 hover:bg-background-2;
@apply button-medium bg-white border border-primary1 text-primary1 hover:bg-primary2;
}
.button-medium-default {
@apply button-medium bg-white border border-border-1 text-disabled hover:bg-background-2;
}
.button-medium-red {
@apply button-medium bg-white border border-red-1 text-red-1 hover:bg-background-2;
@apply button-medium bg-white border border-red-1 text-red-1 hover:bg-red-2;
}
.button-medium-disabled {
@apply button-medium text-disabled bg-background-1;
}

.button-small {
Expand Down Expand Up @@ -96,7 +99,7 @@ body {
@apply flex justify-center items-center w-full h-8 px-2 border-b border-border-1 relative text-xs cursor-pointer;
}
.filter-dropdown-option-list {
@apply w-full max-h-[120px] overflow-y-scroll absolute left-0 top-[calc(100%+8px)] shadow-custom p-2 flex flex-col gap-2 rounded bg-white cursor-auto;
@apply w-full max-h-[160px] overflow-y-scroll absolute left-0 top-[calc(100%+8px)] shadow-custom p-2 flex flex-col gap-2 rounded bg-white cursor-auto;
}
.filter-dropdown-option {
@apply text-xs p-2 rounded text-center cursor-pointer;
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/EditInformation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ const handlePwChange = () => {
}

const changePw = () => {
router.replace('/pw-check')
router.replace('/pw-change')
}

const warningModalToggle = () => {
Expand Down
37 changes: 29 additions & 8 deletions src/components/common/ModalView.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<template>
<div
v-if="isOpen"
class="fixed inset-0 bg-black bg-opacity-15 flex justify-center items-center z-50"
class="fixed inset-0 bg-black bg-opacity-15 flex justify-center items-center z-[99]"
@click.self="closeModal" />
<Transition name="modal">
<div
v-if="isOpen"
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">
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-[99]">
<div class="flex flex-col gap-8 w-[300px]">
<div class="flex flex-col gap-6">
<div class="flex flex-col items-center gap-2">
Expand All @@ -20,13 +20,15 @@
v-if="type == 'warningType'"
:name="warningIcon" />

<div class="flex text-2xl font-bold justify-center">
<div
v-if="$slots.header"
class="flex text-2xl font-bold justify-center whitespace-pre-wrap text-center">
<slot name="header"></slot>
</div>

<div
v-if="type != 'inputType'"
class="flex text-sm font-bold text-body justify-center whitespace-pre-line text-center">
v-if="type != 'inputType' && $slots.header"
class="flex text-sm font-bold text-body justify-center whitespace-pre-wrap text-center">
<slot name="body"></slot>
</div>
</div>
Expand Down Expand Up @@ -79,10 +81,11 @@

<script setup lang="ts">
import { failIcon, successIcon, warningIcon } from '@/constants/iconPath'
import { ref, watch } from 'vue'
import { onUnmounted, ref, watch } from 'vue'
import CommonIcons from './CommonIcons.vue'
import { preventEnter } from '@/utils/preventEnter'

const props = defineProps<{
const { isOpen, type, modelValue } = defineProps<{
isOpen: boolean
type?: string
modelValue?: string
Expand All @@ -94,7 +97,7 @@ const emit = defineEmits<{
(e: 'update:modelValue', value: string): void
}>()

const textValue = ref(props.modelValue || '')
const textValue = ref(modelValue || '')

watch(textValue, newValue => {
emit('update:modelValue', newValue)
Expand All @@ -108,4 +111,22 @@ const closeModal = () => {
const confirmModal = () => {
emit('click')
}

watch(
() => isOpen,
() => {
if (isOpen) {
document.body.style.overflow = 'hidden'
window.addEventListener('keydown', preventEnter)
} else {
document.body.style.overflow = ''
window.removeEventListener('keydown', preventEnter)
}
}
)

onUnmounted(() => {
document.body.style.overflow = ''
window.removeEventListener('keydown', preventEnter)
})
</script>
2 changes: 0 additions & 2 deletions src/components/common/TaskCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ const borderLeft = computed(() => {
})

const handleModal = (id: number | null) => {
if (id) document.body.style.overflow = 'hidden'
else document.body.style.overflow = ''
emit('toggleModal')
selectedID.value = id
}
Expand Down
20 changes: 10 additions & 10 deletions src/components/filters/FilterCategory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<li
class="filter-dropdown-option"
v-for="category in categoryList"
:key="category.id"
:key="category.mainCategoryId"
:class="
(main as number[]).includes(category.id)
(main as number[]).includes(category.mainCategoryId)
? 'bg-primary1 text-white font-bold'
: 'hover:bg-background-2'
"
Expand Down Expand Up @@ -58,13 +58,13 @@
<li
class="filter-dropdown-option"
v-for="subCategory in category.subCategory"
:key="subCategory.id"
:key="subCategory.subCategoryId"
:class="
(sub as number[]).includes(subCategory.id)
(sub as number[]).includes(subCategory.subCategoryId)
? 'bg-primary1 text-white font-bold'
: 'hover:bg-background-2'
"
@click="() => onSubClick(subCategory.id)">
@click="() => onSubClick(subCategory.subCategoryId)">
{{ subCategory.name }}
</li>
</ul>
Expand All @@ -76,7 +76,7 @@

<script setup lang="ts">
import { dropdownIcon } from '@/constants/iconPath'
import type { Category, FilterCategoryProps } from '@/types/common'
import type { Category, FilterCategoryProps, SubCategory } from '@/types/common'
import { computed, ref, watchEffect } from 'vue'
import CommonIcons from '../common/CommonIcons.vue'
import { useOutsideClick } from '@/hooks/useOutsideClick'
Expand All @@ -91,7 +91,7 @@ const toggleDropdown = (type: 'main' | 'sub') =>
? (isMainOpened.value = !isMainOpened.value)
: (isSubOpened.value = !isSubOpened.value)

const selectedCategoryList = ref<{ name: string; subCategory: Category[] }[]>([])
const selectedCategoryList = ref<{ name: string; subCategory: SubCategory[] }[]>([])
const isDisabled = computed(() => {
return selectedCategoryList.value.length === 0
})
Expand All @@ -106,8 +106,8 @@ const onMainClick = (category: Category) => {
)
if (category.subCategory) {
category.subCategory.forEach(el => {
if ((sub as number[]).includes(el.id)) {
emit('update:sub', el.id)
if ((sub as number[]).includes(el.subCategoryId)) {
emit('update:sub', el.subCategoryId)
}
})
}
Expand All @@ -119,7 +119,7 @@ const onMainClick = (category: Category) => {
})
}
}
emit('update:main', category.id)
emit('update:main', category.mainCategoryId)
}
const onSubClick = (value: number) => {
emit('update:sub', value)
Expand Down
6 changes: 4 additions & 2 deletions src/components/member-management/MemberManagementListCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
</button>
<button
type="button"
class="button-medium-secondary"
@click="onMemberInvite(info.memberId)">
:class="
info.memberStatus !== 'ACTIVE' ? 'button-medium-secondary' : 'button-medium-disabled'
"
@click="info.memberStatus !== 'ACTIVE' && onMemberInvite(info.memberId)">
초대
</button>
</div>
Expand Down
2 changes: 0 additions & 2 deletions src/components/my-request/MyRequestListCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ const { info } = defineProps<{ info: MyRequestListData }>()
const selectedID = ref<number | null>(null)

const handleModal = (id: number | null) => {
if (id) document.body.style.overflow = 'hidden'
else document.body.style.overflow = ''
selectedID.value = id
}

Expand Down
2 changes: 0 additions & 2 deletions src/components/my-task/MyTaskListCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ const { info } = defineProps<{ info: MyTaskListData }>()
const selectedID = ref<number | null>(null)

const handleModal = (id: number | null) => {
if (id) document.body.style.overflow = 'hidden'
else document.body.style.overflow = ''
selectedID.value = id
}
const myRequestTabList: ListCardProps[] = [
Expand Down
8 changes: 4 additions & 4 deletions src/components/request-approve/RequestApprove.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ import ManagerDropdown from './ManagerDropdown.vue'

const isModalVisible = ref(false)
const category1 = ref<Category | null>(null)
const category2 = ref<Category | null>(null)
const category2 = ref<SubCategory | null>(null)
const mainCategoryArr = ref<Category[]>([])
const subCategoryArr = ref<SubCategory[]>([])
const afterSubCategoryArr = ref<SubCategory[]>([])
Expand Down Expand Up @@ -116,15 +116,15 @@ onMounted(async () => {
category1.value = selected
category2.value = subCategoryArr.value.find(ct => ct.name === data.categoryName) || null
afterSubCategoryArr.value = subCategoryArr.value.filter(
subCategory => subCategory.mainCategoryId === selected?.id
subCategory => subCategory.mainCategoryId === selected?.mainCategoryId
)
})

watch(category1, async newValue => {
if (isFirst.value) isFirst.value = false
else category2.value = null
afterSubCategoryArr.value = subCategoryArr.value.filter(
subCategory => subCategory.mainCategoryId === newValue?.id
subCategory => subCategory.mainCategoryId === newValue?.mainCategoryId
)
})

Expand All @@ -151,7 +151,7 @@ const handleSubmit = async () => {
return
}
const requestData = {
categoryId: category2.value.id,
categoryId: category2.value.subCategoryId,
processorId: approveData.value.processor.memberId,
dueDate: isTimeFilled.value
? convertToISO(approveData.value.dueDate, approveData.value.dueTime)
Expand Down
2 changes: 0 additions & 2 deletions src/components/request-history/RequestHistoryListCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ const { info } = defineProps<{ info: RequestHistoryListData }>()
const selectedID = ref<number | null>(null)

const handleModal = (id: number | null) => {
if (id) document.body.style.overflow = 'hidden'
else document.body.style.overflow = ''
selectedID.value = id
}
const myRequestTabList: ListCardProps[] = [
Expand Down
6 changes: 3 additions & 3 deletions src/components/request-task/CategoryDropDown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
class="absolute w-full max-h-40 overflow-y-auto top-[52px] flex flex-col gap-2 p-2 bg-white rounded z-10 shadow border-t border-t-border-2">
<div
v-for="option in options"
:key="option.id"
:key="'subCategoryId' in option ? option.subCategoryId : option.mainCategoryId"
class="w-full flex items-center h-11 p-2 rounded hover:bg-background-2 cursor-pointer"
@click="selectOption(option)">
{{ option.name }}
Expand All @@ -45,7 +45,7 @@
<script lang="ts" setup>
import { dropdownIcon } from '@/constants/iconPath'
import { useOutsideClick } from '@/hooks/useOutsideClick'
import type { Category, CategoryDropdownProps } from '@/types/common'
import type { Category, CategoryDropdownProps, SubCategory } from '@/types/common'
import { computed, ref } from 'vue'
import CommonIcons from '../common/CommonIcons.vue'

Expand All @@ -62,7 +62,7 @@ const toggleDropdown = () => {
dropdownOpen.value = !dropdownOpen.value
}

const selectOption = (option: Category) => {
const selectOption = (option: Category | SubCategory) => {
emit('update:modelValue', option)
dropdownOpen.value = false
}
Expand Down
8 changes: 4 additions & 4 deletions src/components/request-task/ReRequestTask.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import RequestTaskInput from './RequestTaskInput.vue'
import RequestTaskTextArea from './RequestTaskTextArea.vue'

const category1 = ref<Category | null>(null)
const category2 = ref<Category | null>(null)
const category2 = ref<SubCategory | null>(null)

const title = ref('')
const description = ref('')
Expand Down Expand Up @@ -83,7 +83,7 @@ onMounted(async () => {
category1.value = selected
category2.value = subCategoryArr.value.find(ct => ct.name === data.categoryName) || null
afterSubCategoryArr.value = subCategoryArr.value.filter(
subCategory => subCategory.mainCategoryId === selected?.id
subCategory => subCategory.mainCategoryId === selected?.mainCategoryId
)
title.value = data.title
description.value = data.description
Expand All @@ -100,7 +100,7 @@ watch(category1, async newValue => {
category2.value = null
}
afterSubCategoryArr.value = subCategoryArr.value.filter(
subCategory => subCategory.mainCategoryId === newValue?.id
subCategory => subCategory.mainCategoryId === newValue?.mainCategoryId
)
})

Expand All @@ -125,7 +125,7 @@ const handleSubmit = async () => {
.map(initFile => initFile.fileId)

const taskInfo = {
categoryId: category2.value.id,
categoryId: category2.value.subCategoryId,
title: title.value,
description: description.value
}
Expand Down
8 changes: 4 additions & 4 deletions src/components/request-task/RequestTask.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import RequestTaskInput from './RequestTaskInput.vue'
import RequestTaskTextArea from './RequestTaskTextArea.vue'

const category1 = ref<Category | null>(null)
const category2 = ref<Category | null>(null)
const category2 = ref<SubCategory | null>(null)

const title = ref('')
const description = ref('')
Expand All @@ -73,13 +73,13 @@ onMounted(async () => {
watch(category1, async newValue => {
category2.value = null
afterSubCategoryArr.value = subCategoryArr.value.filter(
subCategory => subCategory.mainCategoryId === newValue?.id
subCategory => subCategory.mainCategoryId === newValue?.mainCategoryId
)
})

watch(category2, async newVal => {
if (newVal) {
const res = await getSubCategoryDetail(newVal.id)
const res = await getSubCategoryDetail(newVal.subCategoryId)
description.value = res.descriptionExample
}
})
Expand Down Expand Up @@ -111,7 +111,7 @@ const handleSubmit = async () => {
}
const formData = new FormData()
const taskInfo = {
categoryId: category2.value.id,
categoryId: category2.value.subCategoryId,
title: title.value,
description: description.value
}
Expand Down
Loading