diff --git a/src/components/request-task/RequestTaskInput.vue b/src/components/request-task/RequestTaskInput.vue index df55151e..08949f94 100644 --- a/src/components/request-task/RequestTaskInput.vue +++ b/src/components/request-task/RequestTaskInput.vue @@ -1,5 +1,5 @@ diff --git a/src/components/task-management/CategoryAdd.vue b/src/components/task-management/CategoryAdd.vue index 22686e00..f96c4c2e 100644 --- a/src/components/task-management/CategoryAdd.vue +++ b/src/components/task-management/CategoryAdd.vue @@ -1,69 +1,81 @@ diff --git a/src/constants/admin.ts b/src/constants/admin.ts index 15fef027..44c1e4be 100644 --- a/src/constants/admin.ts +++ b/src/constants/admin.ts @@ -1,4 +1,4 @@ -import type { ListBarTabProps, MainCategoryTypes, Option, SubCategoryTypes } from '@/types/common' +import type { CategoryForm, ListBarTabProps, Option } from '@/types/common' export const MEMBER_MANAGEMENT_LIST_BAR_TAB: ListBarTabProps[] = [ { content: '이름', width: 60 }, @@ -36,17 +36,9 @@ export const LOGS_LIST_BAR_TAB: ListBarTabProps[] = [ import type { RoleTypes, RoleTypesEnum, UserRegistrationProps } from '@/types/admin' -export const CATEGORY_FIRST_ADD: MainCategoryTypes = { +export const CATEGORY_FORM: CategoryForm = { name: '', - code: '', - id: 0 -} - -export const CATEGORY_SECOND_ADD: SubCategoryTypes = { - name: '', - mainCategoryId: 0, - code: '', - id: 0 + code: '' } export const INITIAL_USER_REGISTRATION: UserRegistrationProps = { diff --git a/src/types/common.ts b/src/types/common.ts index 3cb18d94..4f87c7cd 100644 --- a/src/types/common.ts +++ b/src/types/common.ts @@ -79,23 +79,16 @@ export interface LabelDataTypes { labelColor: string } -export interface MainCategoryTypes { - id: number - name: string - code: string -} - -export interface SubCategoryTypes { - id: number - mainCategoryId: number +export interface CategoryForm { name: string code: string + mainCategoryId?: number } export interface CategoryDropdownProps { - options: MainCategoryTypes[] | SubCategoryTypes[] + options: CategoryForm labelName: string - modelValue: MainCategoryTypes | SubCategoryTypes | null + modelValue?: CategoryForm isLabel?: boolean isDisabled?: boolean isInvalidate?: string