bug fixed
This commit is contained in:
parent
3a560e2e0d
commit
453cb9dcbf
|
@ -47,12 +47,12 @@
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-label>사이트명</mat-label>
|
<mat-label>사이트명</mat-label>
|
||||||
|
|
||||||
<mat-select [formControlName]="'siteName'" placeholder="사이트 선택">
|
<mat-select [formControlName]="'siteId'" placeholder="사이트 선택">
|
||||||
<mat-option *ngFor="let site of sites" [value]="site.getId()">
|
<mat-option *ngFor="let site of sites" [value]="site.getId()">
|
||||||
{{ site.getUrl() }}
|
{{ site.getUrl() }}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="composeForm.get('siteName')?.hasError('required')">
|
<mat-error *ngIf="composeForm.get('siteId')?.hasError('required')">
|
||||||
사이트명은 필수 입력입니다.
|
사이트명은 필수 입력입니다.
|
||||||
</mat-error>
|
</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
@ -62,14 +62,14 @@
|
||||||
<mat-label>회원 아이디</mat-label>
|
<mat-label>회원 아이디</mat-label>
|
||||||
<input
|
<input
|
||||||
matInput
|
matInput
|
||||||
[formControlName]="'signinId'"
|
[formControlName]="'username'"
|
||||||
(focusout)="__checkSigninId($event)"
|
(focusout)="__checkUsernameDuplicate($event)"
|
||||||
/>
|
/>
|
||||||
<mat-error *ngIf="composeForm.get('signinId')?.hasError('required')">
|
<mat-error *ngIf="composeForm.get('username')?.hasError('required')">
|
||||||
아이디는 필수 입력입니다.
|
아이디는 필수 입력입니다.
|
||||||
</mat-error>
|
</mat-error>
|
||||||
<mat-error
|
<mat-error
|
||||||
*ngIf="composeForm.get('signinId')?.hasError('signinIdDuplicate')"
|
*ngIf="composeForm.get('username')?.hasError('usernameDuplicate')"
|
||||||
>
|
>
|
||||||
아이디가 중복됩니다.
|
아이디가 중복됩니다.
|
||||||
</mat-error>
|
</mat-error>
|
||||||
|
@ -130,8 +130,10 @@
|
||||||
|
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-label>휴대폰번호</mat-label>
|
<mat-label>휴대폰번호</mat-label>
|
||||||
<input matInput [formControlName]="'phoneNumber'" />
|
<input matInput [formControlName]="'mobilePhoneNumber'" />
|
||||||
<mat-error *ngIf="composeForm.get('phoneNumber')?.hasError('required')">
|
<mat-error
|
||||||
|
*ngIf="composeForm.get('mobilePhoneNumber')?.hasError('required')"
|
||||||
|
>
|
||||||
휴대폰번호는 필수 입력입니다.
|
휴대폰번호는 필수 입력입니다.
|
||||||
</mat-error>
|
</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
@ -139,13 +141,13 @@
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-label>은행명</mat-label>
|
<mat-label>은행명</mat-label>
|
||||||
|
|
||||||
<mat-select [formControlName]="'bankName'" placeholder="은행 선택">
|
<mat-select [formControlName]="'bankId'" placeholder="은행 선택">
|
||||||
<mat-option *ngFor="let bank of banks" [value]="bank.getId()">
|
<mat-option *ngFor="let bank of banks" [value]="bank.getId()">
|
||||||
{{ bank.getName() }}
|
{{ bank.getName() }}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
<!-- <mat-option [value]="'0'"> 국민은행 </mat-option> -->
|
<!-- <mat-option [value]="'0'"> 국민은행 </mat-option> -->
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="composeForm.get('bankName')?.hasError('required')">
|
<mat-error *ngIf="composeForm.get('bankId')?.hasError('required')">
|
||||||
은행명은 필수 입력입니다.
|
은행명은 필수 입력입니다.
|
||||||
</mat-error>
|
</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
@ -187,7 +189,7 @@
|
||||||
>
|
>
|
||||||
<div class="flex items-center mt-4 sm:mt-0">
|
<div class="flex items-center mt-4 sm:mt-0">
|
||||||
<!-- Save as draft -->
|
<!-- Save as draft -->
|
||||||
<button class="sm:mx-3" mat-stroked-button (click)="saveAsDraft()">
|
<button class="sm:mx-3" mat-stroked-button (click)="close()">
|
||||||
<span>취소</span>
|
<span>취소</span>
|
||||||
</button>
|
</button>
|
||||||
<!-- Send -->
|
<!-- Send -->
|
||||||
|
|
|
@ -73,14 +73,14 @@ export class RegistComposeComponent implements OnInit {
|
||||||
// Create the form
|
// Create the form
|
||||||
this.composeForm = this._formBuilder.group({
|
this.composeForm = this._formBuilder.group({
|
||||||
partnerId: [{ value: this.data.parent.getUsername(), disabled: true }],
|
partnerId: [{ value: this.data.parent.getUsername(), disabled: true }],
|
||||||
siteName: ['', [Validators.required]],
|
siteId: ['', [Validators.required]],
|
||||||
signinId: ['', [Validators.required]],
|
username: ['', [Validators.required]],
|
||||||
password: ['beteran', [Validators.required]],
|
password: ['beteran', [Validators.required]],
|
||||||
exchangePw: ['', [Validators.required]],
|
exchangePw: ['', [Validators.required]],
|
||||||
nickname: ['', [Validators.required]],
|
nickname: ['', [Validators.required]],
|
||||||
calculateType: ['', [Validators.required]],
|
calculateType: ['', [Validators.required]],
|
||||||
phoneNumber: ['', [Validators.required]],
|
mobilePhoneNumber: ['', [Validators.required]],
|
||||||
bankName: ['', [Validators.required]],
|
bankId: ['', [Validators.required]],
|
||||||
accountNumber: ['', [Validators.required]],
|
accountNumber: ['', [Validators.required]],
|
||||||
accountHolder: ['', [Validators.required]],
|
accountHolder: ['', [Validators.required]],
|
||||||
});
|
});
|
||||||
|
@ -139,35 +139,35 @@ export class RegistComposeComponent implements OnInit {
|
||||||
|
|
||||||
const {
|
const {
|
||||||
partnerId,
|
partnerId,
|
||||||
siteName,
|
siteId,
|
||||||
signinId,
|
username,
|
||||||
password,
|
password,
|
||||||
exchangePassword,
|
exchangePassword,
|
||||||
nickname,
|
nickname,
|
||||||
calculateType,
|
calculateType,
|
||||||
phoneNumber,
|
mobilePhoneNumber,
|
||||||
bankName,
|
bankId,
|
||||||
accountNumber,
|
accountNumber,
|
||||||
accountHolder,
|
accountHolder,
|
||||||
} = this.composeForm.value;
|
} = this.composeForm.value;
|
||||||
|
|
||||||
let bank_account = new CreateMemberRequest.BankAccount();
|
let bank_account = new CreateMemberRequest.BankAccount();
|
||||||
bank_account.setBankId(bankName);
|
bank_account.setBankId(bankId);
|
||||||
bank_account.setName(accountHolder);
|
bank_account.setName(accountHolder);
|
||||||
bank_account.setAccountNumber(accountNumber);
|
bank_account.setAccountNumber(accountNumber);
|
||||||
|
|
||||||
const member = new CreateMemberRequest();
|
const member = new CreateMemberRequest();
|
||||||
const site = new Site();
|
const site = new Site();
|
||||||
site.setId(siteName);
|
site.setId(siteId);
|
||||||
|
|
||||||
member.setSiteId(siteName);
|
member.setSiteId(siteId);
|
||||||
member.setUsername(signinId);
|
member.setUsername(username);
|
||||||
member.setPassword('beteran');
|
member.setPassword('beteran');
|
||||||
member.setMemberClassId(this.data.classId);
|
member.setMemberClassId(this.data.classId);
|
||||||
member.setMemberLevelId('c56231ac-2120-4a81-a30a-5d41fafb6c57');
|
member.setMemberLevelId('c56231ac-2120-4a81-a30a-5d41fafb6c57');
|
||||||
member.setReferrerMemberUsername(this.data.parent.getUsername());
|
member.setReferrerMemberUsername(this.data.parent.getUsername());
|
||||||
member.setNickname(nickname);
|
member.setNickname(nickname);
|
||||||
member.setMobilePhoneNumber(phoneNumber);
|
member.setMobilePhoneNumber(mobilePhoneNumber);
|
||||||
member.setBankAccount(bank_account);
|
member.setBankAccount(bank_account);
|
||||||
|
|
||||||
this._memberService
|
this._memberService
|
||||||
|
@ -183,21 +183,21 @@ export class RegistComposeComponent implements OnInit {
|
||||||
.finally(() => setTimeout(() => this.close(), 5000));
|
.finally(() => setTimeout(() => this.close(), 5000));
|
||||||
}
|
}
|
||||||
|
|
||||||
private close(): void {
|
close(): void {
|
||||||
this.matDialogRef.close({
|
this.matDialogRef.close({
|
||||||
choice: true,
|
choice: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
__checkSigninId(event: FocusEvent): void {
|
__checkUsernameDuplicate(event: FocusEvent): void {
|
||||||
const signinId = this.composeForm.get('signinId')?.value;
|
const username = this.composeForm.get('username')?.value;
|
||||||
// console.log(event, '::', signinId);
|
// console.log(event, '::', username);
|
||||||
this._identityService
|
this._identityService
|
||||||
.checkUsernameForDuplication(signinId)
|
.checkUsernameForDuplication(username)
|
||||||
.then((isUse: boolean) => {
|
.then((isUse: boolean) => {
|
||||||
if (!!isUse) {
|
if (!!isUse) {
|
||||||
this.composeForm
|
this.composeForm
|
||||||
.get('signinId')
|
.get('username')
|
||||||
?.setErrors({ signinIdDuplicate: true });
|
?.setErrors({ usernameDuplicate: true });
|
||||||
}
|
}
|
||||||
// this._changeDetectorRef.markForCheck();
|
// this._changeDetectorRef.markForCheck();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user