Skip to content

Commit 1f5b1dd

Browse files
authored
Merge pull request #185 from TaskFlow-CLAP/CLAP-412
CLAP-412 오류 수정 Tony.tsx
2 parents c4faa85 + 775e5eb commit 1f5b1dd

28 files changed

+103
-69
lines changed

src/assets/styles.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ body {
9999
@apply flex justify-center items-center w-full h-8 px-2 border-b border-border-1 relative text-xs cursor-pointer;
100100
}
101101
.filter-dropdown-option-list {
102-
@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;
102+
@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;
103103
}
104104
.filter-dropdown-option {
105105
@apply text-xs p-2 rounded text-center cursor-pointer;
@@ -117,7 +117,7 @@ body {
117117
@apply flex w-full h-11 items-center rounded p-4 bg-white border border-border-1 cursor-pointer;
118118
}
119119
.request-task-dropdown-option-list {
120-
@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;
120+
@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;
121121
}
122122
.request-task-dropdown-option {
123123
@apply w-full flex items-center h-11 p-2 rounded hover:bg-background-2 cursor-pointer;
@@ -140,7 +140,7 @@ body {
140140
@apply flex w-full h-10 items-center text-sm rounded pl-4 pr-3 bg-white border border-border-1 cursor-pointer;
141141
}
142142
.task-detail-dropdown-option-list {
143-
@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;
143+
@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;
144144
}
145145
.task-detail-dropdown-option {
146146
@apply w-full flex items-center h-10 p-2 rounded hover:bg-background-2 cursor-pointer;

src/components/common/ModalView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</div>
2828

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

src/components/lists/ListContainer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="w-full flex flex-col grow overflow-hidden">
44
<slot name="listBar" />
55

6-
<div class="grow overflow-y-auto">
6+
<div class="grow overflow-y-auto scrollbar-hide">
77
<slot name="listCards" />
88
</div>
99
</div>

src/components/member-management/MemberManagementListCard.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ import { useRouter } from 'vue-router'
5858
import ResultModal from '../common/ResultModal.vue'
5959
import ListCardTab from '../lists/ListCardTab.vue'
6060
import ModalView from '../common/ModalView.vue'
61+
import { useMemberStore } from '@/stores/member'
62+
import { storeToRefs } from 'pinia'
63+
import { useErrorStore } from '@/stores/error'
6164
6265
const roleContent = (role: Role) => {
6366
return role === 'ROLE_USER' ? '사용자' : role === 'ROLE_MANAGER' ? '담당자' : '관리자'
@@ -84,7 +87,14 @@ const isModalVisible = ref({
8487
})
8588
const resultModalType = ref('')
8689
const message = ref('')
90+
const memberStore = useMemberStore()
91+
const { info: myInfo } = storeToRefs(memberStore)
92+
const { setError } = useErrorStore()
8793
const toggleModal = (key: keyof typeof isModalVisible.value) => {
94+
if (key === 'delete' && info.nickname === myInfo.value.nickname) {
95+
setError('자신의 계정은\n삭제할 수 없습니다')
96+
return
97+
}
8898
isModalVisible.value = Object.fromEntries(
8999
Object.keys(isModalVisible.value).map(k => [k, k === key])
90100
) as typeof isModalVisible.value

src/components/request-approve/DueDateInput.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
<input
33
:type="inputType"
44
:value="modelValue"
5-
class="w-full border border-gray-300 rounded px-3 py-2 cursor-pointer focus:outline-none text-center"
5+
class="w-full border border-border-1 rounded px-3 py-2 cursor-pointer focus:outline-none text-center"
6+
:class="isInvalidate ? 'border-red-1' : 'border-border-1'"
67
:min="inputType === 'date' ? minValue : undefined"
78
@focus="e => (e.target as HTMLInputElement).showPicker()"
89
@input="updateValue(($event.target as HTMLInputElement).value)" />
@@ -12,7 +13,7 @@
1213
import type { DueDateInputProps } from '@/types/common'
1314
import { computed, defineEmits, defineProps, onMounted } from 'vue'
1415
15-
const { modelValue, inputType } = defineProps<DueDateInputProps>()
16+
const { modelValue, inputType, isInvalidate } = defineProps<DueDateInputProps>()
1617
1718
const emit = defineEmits(['update:modelValue'])
1819

src/components/request-approve/LabelDropdown.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</div>
1717
<div
1818
v-if="dropdownOpen"
19-
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">
19+
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">
2020
<div
2121
v-for="option in labelArr"
2222
:key="option.labelId"

src/components/request-approve/ManagerDropdown.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
class="relative flex">
1515
<div
1616
class="request-task-dropdown"
17+
:class="isInvalidateState ? '!border-red-1' : ''"
1718
@click="toggleDropdown">
1819
<div class="flex gap-2 items-center">
1920
<ImageContainer

src/components/request-approve/RequestApprove.vue

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@
1010
v-model="category1"
1111
:options="mainCategoryArr"
1212
:label-name="'1차 카테고리'"
13-
:isInvalidate="isInvalidate"
13+
:isInvalidate="isInvalidate === 'category1' ? 'category' : ''"
1414
:isDisabled="false" />
1515
<CategoryDropDown
1616
v-model="category2"
1717
:options="afterSubCategoryArr"
1818
:label-name="'2차 카테고리'"
19-
:is-invalidate="isInvalidate"
19+
:isInvalidate="isInvalidate === 'category2' ? 'category' : ''"
2020
:isDisabled="!category1" />
2121
<ManagerDropdown
2222
v-model="approveData.processor"
2323
:placeholderText="'담당자를 선택해주세요'"
24-
:is-invalidate="isInvalidate" />
24+
:is-invalidate="isInvalidate === 'manager' ? 'manager' : ''" />
2525
<div class="flex flex-col gap-2">
2626
<div class="flex gap-2">
2727
<p class="text-body text-xs font-semibold">마감기한</p>
@@ -40,10 +40,12 @@
4040
<div class="flex w-full justify-center gap-6">
4141
<DueDateInput
4242
v-model="approveData.dueDate"
43-
inputType="date" />
43+
inputType="date"
44+
:is-invalidate="isInvalidate === 'date' ? 'date' : ''" />
4445
<DueDateInput
4546
v-model="approveData.dueTime"
46-
inputType="time" />
47+
inputType="time"
48+
:is-invalidate="isInvalidate === 'date' ? 'date' : ''" />
4749
</div>
4850
</div>
4951
<LabelDropdown
@@ -141,8 +143,12 @@ const handleCancel = () => {
141143
}
142144
143145
const handleSubmit = async () => {
144-
if (!category1.value || !category2.value) {
145-
isInvalidate.value = 'category'
146+
if (!category1.value) {
147+
isInvalidate.value = 'category1'
148+
return
149+
}
150+
if (!category2.value) {
151+
isInvalidate.value = 'category2'
146152
return
147153
}
148154
if (!approveData.value.processor?.memberId) {

src/components/request-task/CategoryDropDown.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
ref="htmlRef"
1818
class="relative flex">
1919
<div
20-
class="flex w-full h-11 items-center rounded p-4 border border-border-1"
21-
:class="isDisabled ? 'bg-background-2 cursor-default' : 'bg-white cursor-pointer'"
20+
class="flex w-full h-11 items-center rounded p-4 border"
21+
:class="`${isDisabled ? 'bg-background-2 cursor-default' : 'bg-white cursor-pointer'} ${isInvalidate ? 'border-red-1' : 'border-border-1'}`"
2222
@click="toggleDropdown">
2323
<p :class="{ 'text-disabled': !modelValue?.name }">
2424
{{ modelValue?.name ?? labelName + '를 선택해주세요' }}
@@ -29,7 +29,7 @@
2929
</div>
3030
<div
3131
v-if="dropdownOpen"
32-
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">
32+
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">
3333
<div
3434
v-for="option in options"
3535
:key="'subCategoryId' in option ? option.subCategoryId : option.mainCategoryId"

src/components/request-task/ReRequestTask.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
:placeholderText="'제목을 입력해주세요'"
2020
:label-name="'제목'"
2121
:limit-length="30"
22-
:is-invalidate="isInvalidate" />
22+
:is-invalidate="isInvalidate === 'input' ? 'input' : ''" />
2323
<RequestTaskTextArea
2424
v-model="description"
2525
:is-invalidate="isInvalidate"

0 commit comments

Comments
 (0)