Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions src/assets/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -99,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-[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;
@apply w-full max-h-[160px] overflow-y-auto scrollbar-hide 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 All @@ -117,7 +117,7 @@ body {
@apply flex w-full h-11 items-center rounded p-4 bg-white border border-border-1 cursor-pointer;
}
.request-task-dropdown-option-list {
@apply absolute w-full h-40 overflow-y-auto top-[52px] flex flex-col gap-2 p-2 bg-white rounded z-10 shadow-custom;
@apply absolute w-full h-40 overflow-y-auto scrollbar-hide top-[52px] flex flex-col gap-2 p-2 bg-white rounded z-10 shadow-custom;
}
.request-task-dropdown-option {
@apply w-full flex items-center h-11 p-2 rounded hover:bg-background-2 cursor-pointer;
Expand All @@ -140,7 +140,7 @@ body {
@apply flex w-full h-10 items-center text-sm rounded pl-4 pr-3 bg-white border border-border-1 cursor-pointer;
}
.task-detail-dropdown-option-list {
@apply absolute w-full h-40 overflow-y-auto top-11 flex flex-col gap-2 p-2 bg-white rounded z-10 shadow border-t border-t-border-2;
@apply absolute w-full h-40 overflow-y-auto scrollbar-hide top-11 flex flex-col gap-2 p-2 bg-white rounded z-10 shadow border-t border-t-border-2;
}
.task-detail-dropdown-option {
@apply w-full flex items-center h-10 p-2 rounded hover:bg-background-2 cursor-pointer;
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/ModalView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</div>

<div
v-if="type != 'inputType' && $slots.header"
v-if="type != 'inputType' && $slots.body"
class="flex text-sm font-semibold text-body justify-center whitespace-pre-wrap text-center">
<slot name="body"></slot>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/lists/ListContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="w-full flex flex-col grow overflow-hidden">
<slot name="listBar" />

<div class="grow overflow-y-auto">
<div class="grow overflow-y-auto scrollbar-hide">
<slot name="listCards" />
</div>
</div>
Expand Down
10 changes: 10 additions & 0 deletions src/components/member-management/MemberManagementListCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ import { useRouter } from 'vue-router'
import ResultModal from '../common/ResultModal.vue'
import ListCardTab from '../lists/ListCardTab.vue'
import ModalView from '../common/ModalView.vue'
import { useMemberStore } from '@/stores/member'
import { storeToRefs } from 'pinia'
import { useErrorStore } from '@/stores/error'

const roleContent = (role: Role) => {
return role === 'ROLE_USER' ? '사용자' : role === 'ROLE_MANAGER' ? '담당자' : '관리자'
Expand All @@ -84,7 +87,14 @@ const isModalVisible = ref({
})
const resultModalType = ref('')
const message = ref('')
const memberStore = useMemberStore()
const { info: myInfo } = storeToRefs(memberStore)
const { setError } = useErrorStore()
const toggleModal = (key: keyof typeof isModalVisible.value) => {
if (key === 'delete' && info.nickname === myInfo.value.nickname) {
setError('자신의 계정은\n삭제할 수 없습니다')
return
}
isModalVisible.value = Object.fromEntries(
Object.keys(isModalVisible.value).map(k => [k, k === key])
) as typeof isModalVisible.value
Expand Down
5 changes: 3 additions & 2 deletions src/components/request-approve/DueDateInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<input
:type="inputType"
:value="modelValue"
class="w-full border border-gray-300 rounded px-3 py-2 cursor-pointer focus:outline-none text-center"
class="w-full border border-border-1 rounded px-3 py-2 cursor-pointer focus:outline-none text-center"
:class="isInvalidate ? 'border-red-1' : 'border-border-1'"
:min="inputType === 'date' ? minValue : undefined"
@focus="e => (e.target as HTMLInputElement).showPicker()"
@input="updateValue(($event.target as HTMLInputElement).value)" />
Expand All @@ -12,7 +13,7 @@
import type { DueDateInputProps } from '@/types/common'
import { computed, defineEmits, defineProps, onMounted } from 'vue'

const { modelValue, inputType } = defineProps<DueDateInputProps>()
const { modelValue, inputType, isInvalidate } = defineProps<DueDateInputProps>()

const emit = defineEmits(['update:modelValue'])

Expand Down
2 changes: 1 addition & 1 deletion src/components/request-approve/LabelDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</div>
<div
v-if="dropdownOpen"
class="absolute w-full 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">
class="absolute w-full h-40 overflow-y-auto scrollbar-hide 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 labelArr"
:key="option.labelId"
Expand Down
1 change: 1 addition & 0 deletions src/components/request-approve/ManagerDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
class="relative flex">
<div
class="request-task-dropdown"
:class="isInvalidateState ? '!border-red-1' : ''"
@click="toggleDropdown">
<div class="flex gap-2 items-center">
<ImageContainer
Expand Down
20 changes: 13 additions & 7 deletions src/components/request-approve/RequestApprove.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
v-model="category1"
:options="mainCategoryArr"
:label-name="'1차 카테고리'"
:isInvalidate="isInvalidate"
:isInvalidate="isInvalidate === 'category1' ? 'category' : ''"
:isDisabled="false" />
<CategoryDropDown
v-model="category2"
:options="afterSubCategoryArr"
:label-name="'2차 카테고리'"
:is-invalidate="isInvalidate"
:isInvalidate="isInvalidate === 'category2' ? 'category' : ''"
:isDisabled="!category1" />
<ManagerDropdown
v-model="approveData.processor"
:placeholderText="'담당자를 선택해주세요'"
:is-invalidate="isInvalidate" />
:is-invalidate="isInvalidate === 'manager' ? 'manager' : ''" />
<div class="flex flex-col gap-2">
<div class="flex gap-2">
<p class="text-body text-xs font-semibold">마감기한</p>
Expand All @@ -40,10 +40,12 @@
<div class="flex w-full justify-center gap-6">
<DueDateInput
v-model="approveData.dueDate"
inputType="date" />
inputType="date"
:is-invalidate="isInvalidate === 'date' ? 'date' : ''" />
<DueDateInput
v-model="approveData.dueTime"
inputType="time" />
inputType="time"
:is-invalidate="isInvalidate === 'date' ? 'date' : ''" />
</div>
</div>
<LabelDropdown
Expand Down Expand Up @@ -141,8 +143,12 @@ const handleCancel = () => {
}

const handleSubmit = async () => {
if (!category1.value || !category2.value) {
isInvalidate.value = 'category'
if (!category1.value) {
isInvalidate.value = 'category1'
return
}
if (!category2.value) {
isInvalidate.value = 'category2'
return
}
if (!approveData.value.processor?.memberId) {
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 @@ -17,8 +17,8 @@
ref="htmlRef"
class="relative flex">
<div
class="flex w-full h-11 items-center rounded p-4 border border-border-1"
:class="isDisabled ? 'bg-background-2 cursor-default' : 'bg-white cursor-pointer'"
class="flex w-full h-11 items-center rounded p-4 border"
:class="`${isDisabled ? 'bg-background-2 cursor-default' : 'bg-white cursor-pointer'} ${isInvalidate ? 'border-red-1' : 'border-border-1'}`"
@click="toggleDropdown">
<p :class="{ 'text-disabled': !modelValue?.name }">
{{ modelValue?.name ?? labelName + '를 선택해주세요' }}
Expand All @@ -29,7 +29,7 @@
</div>
<div
v-if="dropdownOpen"
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">
class="absolute w-full max-h-40 overflow-y-auto scrollbar-hide 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="'subCategoryId' in option ? option.subCategoryId : option.mainCategoryId"
Expand Down
2 changes: 1 addition & 1 deletion src/components/request-task/ReRequestTask.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
:placeholderText="'제목을 입력해주세요'"
:label-name="'제목'"
:limit-length="30"
:is-invalidate="isInvalidate" />
:is-invalidate="isInvalidate === 'input' ? 'input' : ''" />
<RequestTaskTextArea
v-model="description"
:is-invalidate="isInvalidate"
Expand Down
2 changes: 1 addition & 1 deletion src/components/request-task/RequestTask.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
v-model="title"
:placeholderText="'제목을 입력해주세요'"
:label-name="'제목'"
:is-invalidate="isInvalidate"
:is-invalidate="isInvalidate === 'input' ? 'input' : ''"
:limit-length="30" />
<RequestTaskTextArea
v-model="description"
Expand Down
2 changes: 1 addition & 1 deletion src/components/request-task/RequestTaskDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</div>
<div
v-if="dropdownOpen"
class="absolute w-full 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">
class="absolute w-full h-40 overflow-y-auto scrollbar-hide 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"
Expand Down
2 changes: 1 addition & 1 deletion src/components/request-task/RequestTaskFileInputAfter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</div>
<div
v-if="files && files.length > 0"
class="flex flex-col h-[102px] overflow-hidden overflow-y-auto">
class="flex flex-col h-[102px] overflow-hidden overflow-y-auto scrollbar-hide">
<div
v-for="(file, index) in files"
:key="file.name"
Expand Down
4 changes: 2 additions & 2 deletions src/components/request-task/RequestTaskInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
</p>
</div>
<input
class="w-full h-11 border border-border-1 px-4 focus:outline-none rounded"
class="w-full h-11 border px-4 focus:outline-none rounded"
:value="modelValue"
:disabled="isEdit"
@input="updateValue(($event.target as HTMLInputElement).value)"
:placeholder="placeholderText"
:class="{ 'text-gray-500': isEdit }"
:class="`${isEdit ? 'text-gray-500' : ''} ${isInvalidate ? 'border-red-1' : 'border-border-1'}`"
:maxlength="labelName === '제목' ? 30 : undefined" />
<p
v-if="limitLength"
Expand Down
2 changes: 1 addition & 1 deletion src/components/task-management/CategoryManagement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<p>2차 카테고리</p>
</div>
</div>
<div class="flex flex-col w-full grow overflow-y-auto">
<div class="flex flex-col w-full grow overflow-y-auto scrollbar-hide">
<div class="flex">
<CategoryLine :categories="data || []" />
<div class="bg-border-1 w-0.5"></div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/task-management/LabelManagement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<p>구분명</p>
</div>
</div>
<div class="flex flex-col w-full grow overflow-y-auto pb-32">
<div class="flex flex-col w-full grow overflow-y-auto scrollbar-hide pb-32">
<LabelManagementLine
:label-data="labelData"
@updateLabels="fetchLabels" />
Expand Down
3 changes: 1 addition & 2 deletions src/components/team-board/CurrentTaskRatio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
</div>
<span class="text-xs font-semibold text-primary1">총 {{ teamSummary.totalTasks }}건</span>
</div>
<div
class="w-full h-[360px] rounded-lg bg-primary2 shadow-custom overflow-y-scroll items-center p-6 gap-4">
<div class="w-full h-[360px] rounded-lg bg-primary2 shadow-custom items-center p-6 gap-4">
<PieChart
:key="chartLabels.length || 0"
:labels="chartLabels"
Expand Down
2 changes: 1 addition & 1 deletion src/components/team-board/TeamBoard.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="grow overflow-y-scroll p-6">
<div class="grow overflow-y-auto scrollbar-hide p-6">
<div class="grid grid-cols-3 gap-12">
<CurrentTaskRatio
:team-summary="teamSummary"
Expand Down
2 changes: 1 addition & 1 deletion src/components/team-board/TeamBoardCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<span class="text-xs font-semibold text-primary1">총 {{ info.totalTaskCount }}건</span>
</div>
<div
class="w-full h-[360px] rounded-lg bg-primary2 shadow-custom overflow-y-scroll flex flex-col items-center p-6 gap-4">
class="w-full h-[360px] rounded-lg bg-primary2 shadow-custom overflow-y-auto flex flex-col items-center p-6 gap-4">
<TaskCard
v-for="task in info.tasks"
:key="task.taskId"
Expand Down
2 changes: 1 addition & 1 deletion src/components/top-bar/NotificationModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</button>
</div>
</div>
<div class="grow h-full flex flex-col overflow-y-auto">
<div class="grow h-full flex flex-col overflow-y-auto scrollbar-hide">
<template v-if="notifications">
<NotificationMessage
v-for="notification in notifications"
Expand Down
16 changes: 12 additions & 4 deletions src/components/top-bar/SideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
@click="$emit('close')"
class="cursor-pointer"
:name="hamburgerIcon" />
<img src="/MainLogo.svg" />
<button @click="onLogoClick">
<img src="/MainLogo.svg" />
</button>
</div>
<div class="flex-1 overflow-y-auto flex flex-col gap-6">
<div class="flex-1 overflow-y-auto scrollbar-hide flex flex-col gap-6">
<div
v-for="menuGroup in filteredMenu"
:key="menuGroup.groupId">
Expand Down Expand Up @@ -65,7 +67,7 @@
</template>

<script setup lang="ts">
import { useRoute } from 'vue-router'
import { useRoute, useRouter } from 'vue-router'
import { computed } from 'vue'
import CommonIcons from '../common/CommonIcons.vue'
import { hamburgerIcon } from '@/constants/iconPath'
Expand All @@ -78,9 +80,10 @@ const memberStore = useMemberStore()
const { info } = storeToRefs(memberStore)

const { isOpen } = defineProps<{ isOpen: boolean }>()
defineEmits(['close'])
const emit = defineEmits(['close'])

const route = useRoute()
const router = useRouter()

const role = computed(() => info.value.role)
const name = computed(() => info.value.name)
Expand All @@ -93,4 +96,9 @@ const filteredMenu = computed(() => {
? SIDE_MANAGER_MENU
: SIDE_ADMIN_MENU
})

const onLogoClick = () => {
emit('close')
router.push('/')
}
</script>
7 changes: 6 additions & 1 deletion src/components/top-bar/TopBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@
@click="onOpenSide">
<CommonIcons :name="hamburgerIcon" />
</button>
<img src="/MainLogo.svg" />
<button @click="router.push('/')">
<img src="/MainLogo.svg" />
</button>
</div>
<div
v-if="isLogined"
class="flex items-center gap-5">
<div
v-if="info.role !== 'ROLE_ADMIN'"
:key="isNotifiVisible + ''"
ref="notifiRef"
class="flex">
Expand Down Expand Up @@ -63,9 +66,11 @@ import ProfileModal from './ProfileModal.vue'
import { getNotifiCount } from '@/api/common'
import ImageContainer from '../common/ImageContainer.vue'
import { useOutsideClick } from '@/hooks/useOutsideClick'
import { useRouter } from 'vue-router'

const memberStore = useMemberStore()
const { isLogined, info } = storeToRefs(memberStore)
const router = useRouter()

onMounted(async () => {
if (isLogined.value) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/user-manage/DepartmentDropDown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</div>
<div
v-if="dropdownOpen"
class="absolute w-full 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">
class="absolute w-full h-40 overflow-y-auto scrollbar-hide top-[52px] flex flex-col gap-2 p-2 bg-white rounded z-10 shadow border-t border-t-border-2">
<div
v-for="department in dePartments"
:key="department.departmentId"
Expand Down
Loading