Skip to content

Commit e1e2643

Browse files
committed
♻️ [refactor] : 유저 추가 부서 id 요청전까지
1 parent 5a2f53f commit e1e2643

File tree

6 files changed

+13
-14
lines changed

6 files changed

+13
-14
lines changed

src/api/admin.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ export const deleteCategoryAdmin = async (id: number) => {
2727

2828
export const addMemberAdmin = async (memberData: UserRegistrationProps) => {
2929
console.log(memberData, '요청 데이터')
30-
31-
const response = await axiosInstance.post('/api/managements/members', { memberData })
30+
const response = await axiosInstance.post('/api/managements/members', memberData)
3231
return response.data
3332
}

src/components/request-task/RequestTaskInput.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<input
1212
class="w-full h-11 border border-border-1 px-4 focus:outline-none text-black rounded"
1313
:value="modelValue"
14-
type="number"
1514
:disabled="isEdit"
1615
@input="updateValue(($event.target as HTMLInputElement).value)"
1716
:placeholder="placeholderText" />

src/components/user-manage/UserRegistration.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
:labelName="'요청 승인 권한'"
2929
:checkButtonName="'허용'"
3030
:isChecked="userRegistrationForm.isReviewer" />
31-
<RequestTaskInput
31+
<!-- <RequestTaskInput
3232
v-model="userRegistrationForm.departmentId"
3333
:placeholderText="'회원의 부서를 입력해주세요'"
3434
:is-not-required="true"
35-
:labelName="'부서'" />
35+
:labelName="'부서'" /> -->
3636
<RequestTaskInput
3737
v-model="userRegistrationForm.departmentRole"
3838
:placeholderText="'회원의 직무를 입력해주세요'"
@@ -70,7 +70,8 @@ const handleCancel = () => {
7070
7171
const handleSubmit = async () => {
7272
console.log(userRegistrationForm.value)
73-
const formData = { ...userRegistrationForm.value, role: 'ROLE_USER' }
73+
const formData = { ...userRegistrationForm.value, role: 'ROLE_USER', departmentId: 1 }
74+
console.log(formData, '요청정보')
7475
await addMemberAdmin(formData)
7576
isModalVisible.value = true
7677
}

src/constants/admin.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ export const CATEGORY_FORM: CategoryForm = {
4242
}
4343

4444
export const INITIAL_USER_REGISTRATION: UserRegistrationProps = {
45-
name: '',
46-
email: '',
47-
nickname: '',
45+
name: '조철득',
46+
47+
nickname: 'iron.ch',
4848
isReviewer: false,
49-
departmentId: '',
50-
role: '회원의 역할을 선택해주세요',
51-
departmentRole: ''
49+
departmentId: 1,
50+
role: 'ROLE_USER',
51+
departmentRole: 'FE'
5252
}
5353

5454
export const RoleTypeMapping: { [key in RoleTypes]: RoleTypesEnum } = {

src/types/admin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export interface UserRegistrationProps {
2727
email: string
2828
nickname: string
2929
isReviewer: boolean
30-
departmentId: string
30+
departmentId: number
3131
role: string
3232
departmentRole: string
3333
}

src/types/user.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export interface RequestTaskDropdownProps {
2424
}
2525

2626
export interface RequestTaskInputProps {
27-
modelValue: string | number
27+
modelValue: string
2828
placeholderText: string
2929
labelName: string
3030
isNotRequired?: boolean

0 commit comments

Comments
 (0)