From 711c66df73ac75f10316fec951ab8ce39d34ff5f Mon Sep 17 00:00:00 2001 From: seorang42 Date: Sun, 2 Feb 2025 19:24:24 +0900 Subject: [PATCH 1/2] =?UTF-8?q?:sparkles:=20[feat]=20:=201=EC=B0=A8=20?= =?UTF-8?q?=EC=B9=B4=ED=85=8C=EA=B3=A0=EB=A6=AC=20=EC=B6=94=EA=B0=80=20API?= =?UTF-8?q?=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SideBar.vue | 2 +- .../request-task/RequestTaskInput.vue | 17 ++-- .../task-management/CategoryAdd.vue | 81 ++++++++++++++----- src/constants/admin.ts | 6 +- src/types/common.ts | 2 - 5 files changed, 73 insertions(+), 35 deletions(-) diff --git a/src/components/SideBar.vue b/src/components/SideBar.vue index fe08f51f..192a0811 100644 --- a/src/components/SideBar.vue +++ b/src/components/SideBar.vue @@ -69,7 +69,7 @@ import { SIDE_USER_MENU, SIDE_MANAGER_MENU, SIDE_ADMIN_MENU } from '@/constants/ const route = useRoute() // 회원 역할, 닉네임 필요 -const role = ref('manager') +const role = ref('admin') const name = ref('백지연') const nickname = ref('Chloe.yeon') 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..e7f7e22f 100644 --- a/src/components/task-management/CategoryAdd.vue +++ b/src/components/task-management/CategoryAdd.vue @@ -1,51 +1,59 @@ diff --git a/src/constants/admin.ts b/src/constants/admin.ts index 15fef027..cde5b529 100644 --- a/src/constants/admin.ts +++ b/src/constants/admin.ts @@ -38,15 +38,13 @@ import type { RoleTypes, RoleTypesEnum, UserRegistrationProps } from '@/types/ad export const CATEGORY_FIRST_ADD: MainCategoryTypes = { name: '', - code: '', - id: 0 + code: '' } 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..19b9643c 100644 --- a/src/types/common.ts +++ b/src/types/common.ts @@ -80,13 +80,11 @@ export interface LabelDataTypes { } export interface MainCategoryTypes { - id: number name: string code: string } export interface SubCategoryTypes { - id: number mainCategoryId: number name: string code: string From 5871f4eff22eea1764bd2462b7cdf8698194c943 Mon Sep 17 00:00:00 2001 From: seorang42 Date: Sun, 2 Feb 2025 19:58:46 +0900 Subject: [PATCH 2/2] =?UTF-8?q?:sparkles:=20[feat]=20:=202=EC=B0=A8=20?= =?UTF-8?q?=EC=B9=B4=ED=85=8C=EA=B3=A0=EB=A6=AC=20=EC=B6=94=EA=B0=80=20API?= =?UTF-8?q?=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../task-management/CategoryAdd.vue | 46 ++++++++++++------- src/constants/admin.ts | 10 +--- src/types/common.ts | 13 ++---- 3 files changed, 36 insertions(+), 33 deletions(-) diff --git a/src/components/task-management/CategoryAdd.vue b/src/components/task-management/CategoryAdd.vue index e7f7e22f..f96c4c2e 100644 --- a/src/components/task-management/CategoryAdd.vue +++ b/src/components/task-management/CategoryAdd.vue @@ -22,15 +22,15 @@ + v-if="categoryStep == '2'" /> + :label-name="`${categoryStep}차 카테고리명`" /> diff --git a/src/constants/admin.ts b/src/constants/admin.ts index cde5b529..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,11 @@ 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: '' } -export const CATEGORY_SECOND_ADD: SubCategoryTypes = { - name: '', - mainCategoryId: 0, - code: '' -} - export const INITIAL_USER_REGISTRATION: UserRegistrationProps = { name: '', email: '', diff --git a/src/types/common.ts b/src/types/common.ts index 19b9643c..4f87c7cd 100644 --- a/src/types/common.ts +++ b/src/types/common.ts @@ -79,21 +79,16 @@ export interface LabelDataTypes { labelColor: string } -export interface MainCategoryTypes { - name: string - code: string -} - -export interface SubCategoryTypes { - 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