diff --git a/src/app/modules/admin/member/partner/components/list.component.html b/src/app/modules/admin/member/partner/components/list.component.html
index b897698..bc3986a 100644
--- a/src/app/modules/admin/member/partner/components/list.component.html
+++ b/src/app/modules/admin/member/partner/components/list.component.html
@@ -29,6 +29,14 @@
+
diff --git a/src/app/modules/admin/member/partner/components/list.component.ts b/src/app/modules/admin/member/partner/components/list.component.ts
index b2d0ce5..67c1c01 100644
--- a/src/app/modules/admin/member/partner/components/list.component.ts
+++ b/src/app/modules/admin/member/partner/components/list.component.ts
@@ -130,7 +130,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
case '/member/partner/all':
this.title = '전체목록';
this.btnTitle = '대본등록';
- this.memberClassId = 'ae9b874e-5d0e-4c4d-8432-f45f02691ceb';
+ this.memberClassId = '4b014ef5-3bab-4413-aaf9-b0040a70ec77';
break;
case '/member/partner/main-office':
this.title = '본사목록';
@@ -304,7 +304,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
return item.id || index;
}
- __onClickRegist(event: MouseEvent, partner: MemberModel): void {
+ __onClickRegist(event: MouseEvent, partner?: MemberModel): void {
const dialogRef = this._matDialog.open(RegistComposeComponent, {
data: {
title: this.btnTitle,
diff --git a/src/app/modules/admin/member/partner/compose/regist-compose.component.ts b/src/app/modules/admin/member/partner/compose/regist-compose.component.ts
index b84305f..bd307dd 100644
--- a/src/app/modules/admin/member/partner/compose/regist-compose.component.ts
+++ b/src/app/modules/admin/member/partner/compose/regist-compose.component.ts
@@ -23,7 +23,7 @@ import { BankService } from 'app/modules/polyglot/bank/services/bank.service';
export interface RegistComposeData {
title: string;
- parent: MemberModel;
+ parent?: MemberModel;
classId: string;
}
export interface RegistComposeResult {
@@ -72,7 +72,7 @@ export class RegistComposeComponent implements OnInit {
ngOnInit(): void {
// Create the form
this.composeForm = this._formBuilder.group({
- partnerId: [{ value: this.data.parent.getUsername(), disabled: true }],
+ partnerId: [{ value: this.data.parent?.getUsername(), disabled: true }],
siteId: ['', [Validators.required]],
username: ['', [Validators.required]],
password: ['beteran', [Validators.required]],
@@ -159,6 +159,9 @@ export class RegistComposeComponent implements OnInit {
const member = new CreateMemberRequest();
const site = new Site();
+ const parentUsername = !!this.data.parent?.getUsername()
+ ? this.data.parent?.getUsername()
+ : '';
site.setId(siteId);
member.setSiteId(siteId);
@@ -166,7 +169,7 @@ export class RegistComposeComponent implements OnInit {
member.setPassword(password);
member.setMemberClassId(this.data.classId);
member.setMemberLevelId('c56231ac-2120-4a81-a30a-5d41fafb6c57');
- member.setReferrerMemberUsername(this.data.parent.getUsername());
+ member.setReferrerMemberUsername(parentUsername);
member.setNickname(nickname);
member.setMobilePhoneNumber(mobilePhoneNumber);
member.setBankAccount(bank_account);
@@ -177,11 +180,12 @@ export class RegistComposeComponent implements OnInit {
console.log(res.getMember());
this.showAlert = true;
})
+ .then(() => setTimeout(() => this.close(), 5000))
.catch((e) => {
this.showAlert = true;
this.alert = { type: 'error', message: '등록에 실패하였습니다.' };
- })
- .finally(() => setTimeout(() => this.close(), 5000));
+ this.isSendDisable = false;
+ });
}
close(): void {