회원수정 진행중
This commit is contained in:
parent
31e3bc0943
commit
18a6593b31
|
@ -40,7 +40,7 @@
|
||||||
<span>가입일자</span>
|
<span>가입일자</span>
|
||||||
<span class="mx-2">•</span>
|
<span class="mx-2">•</span>
|
||||||
<span>{{
|
<span>{{
|
||||||
selectedUser?.getCreatedAt() | date: "yyyy/MM/dd HH:mm"
|
currentMember?.getCreatedAt() | date: "yyyy/MM/dd HH:mm"
|
||||||
}}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center text-secondary my-1">
|
<div class="flex items-center text-secondary my-1">
|
||||||
|
@ -130,7 +130,6 @@
|
||||||
|
|
||||||
<!-- Drawer content -->
|
<!-- Drawer content -->
|
||||||
<mat-drawer-content class="flex flex-col">
|
<mat-drawer-content class="flex flex-col">
|
||||||
<form class="flex flex-col w-full" [formGroup]="memberViewForm">
|
|
||||||
<!-- Main -->
|
<!-- Main -->
|
||||||
<div class="flex-auto px-6 pt-9 pb-12 md:p-8 md:pb-12 lg:p-12">
|
<div class="flex-auto px-6 pt-9 pb-12 md:p-8 md:pb-12 lg:p-12">
|
||||||
<!-- Panel header -->
|
<!-- Panel header -->
|
||||||
|
@ -156,7 +155,11 @@
|
||||||
<div class="mt-8">
|
<div class="mt-8">
|
||||||
<ng-container [ngSwitch]="selectedPanel">
|
<ng-container [ngSwitch]="selectedPanel">
|
||||||
<!-- Account -->
|
<!-- Account -->
|
||||||
<ng-container *ngSwitchCase="'account'">
|
<ng-container *ngSwitchCase="'accountInfo'">
|
||||||
|
<form
|
||||||
|
class="flex flex-col w-full"
|
||||||
|
[formGroup]="memberDefaultForm"
|
||||||
|
>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<mat-form-field class="w-1/3 pr-2">
|
<mat-form-field class="w-1/3 pr-2">
|
||||||
<mat-label>아이디</mat-label>
|
<mat-label>아이디</mat-label>
|
||||||
|
@ -174,14 +177,6 @@
|
||||||
[formControlName]="'signinPw'"
|
[formControlName]="'signinPw'"
|
||||||
/>
|
/>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field class="w-1/3 pr-2">
|
|
||||||
<mat-label>환전비밀번호</mat-label>
|
|
||||||
<input
|
|
||||||
id="exchangePw"
|
|
||||||
matInput
|
|
||||||
[formControlName]="'exchangePw'"
|
|
||||||
/>
|
|
||||||
</mat-form-field>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<mat-form-field class="w-1/3 pr-2">
|
<mat-form-field class="w-1/3 pr-2">
|
||||||
|
@ -242,49 +237,7 @@
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex">
|
|
||||||
<mat-form-field class="w-1/3 pr-2">
|
|
||||||
<mat-label>은행명</mat-label>
|
|
||||||
|
|
||||||
<mat-select
|
|
||||||
[formControlName]="'bankId'"
|
|
||||||
placeholder="은행 선택"
|
|
||||||
>
|
|
||||||
<mat-option
|
|
||||||
*ngFor="let bank of banks"
|
|
||||||
[value]="bank.getId()"
|
|
||||||
>
|
|
||||||
{{ bank.getName() }}
|
|
||||||
</mat-option>
|
|
||||||
<!-- <mat-option [value]="'0'"> 국민은행 </mat-option> -->
|
|
||||||
</mat-select>
|
|
||||||
<!-- <mat-error
|
|
||||||
*ngIf="
|
|
||||||
composeForm.get('bankId')?.hasError('required')
|
|
||||||
"
|
|
||||||
>
|
|
||||||
은행명은 필수 입력입니다.
|
|
||||||
</mat-error> -->
|
|
||||||
</mat-form-field>
|
|
||||||
|
|
||||||
<mat-form-field class="w-1/3 pr-2">
|
|
||||||
<mat-label>계좌번호</mat-label>
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
matInput
|
|
||||||
[formControlName]="'accountNumber'"
|
|
||||||
/>
|
|
||||||
</mat-form-field>
|
|
||||||
<mat-form-field class="w-1/3 pr-2">
|
|
||||||
<mat-label>예금주</mat-label>
|
|
||||||
<input
|
|
||||||
id="accountHolder"
|
|
||||||
type="text"
|
|
||||||
matInput
|
|
||||||
[formControlName]="'accountHolder'"
|
|
||||||
/>
|
|
||||||
</mat-form-field>
|
|
||||||
</div>
|
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<mat-form-field class="w-1/3 pr-2">
|
<mat-form-field class="w-1/3 pr-2">
|
||||||
<mat-label>콤프</mat-label>
|
<mat-label>콤프</mat-label>
|
||||||
|
@ -318,7 +271,7 @@
|
||||||
<mat-label>사이트변경</mat-label>
|
<mat-label>사이트변경</mat-label>
|
||||||
|
|
||||||
<mat-select
|
<mat-select
|
||||||
[formControlName]="'changeSite'"
|
[formControlName]="'siteId'"
|
||||||
placeholder="사이트 선택"
|
placeholder="사이트 선택"
|
||||||
>
|
>
|
||||||
<mat-option
|
<mat-option
|
||||||
|
@ -361,13 +314,80 @@
|
||||||
게임머니확인
|
게임머니확인
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<ng-container *ngTemplateOutlet="commonButton"></ng-container>
|
||||||
|
</form>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngSwitchCase="'bankInfo'">
|
||||||
|
<form class="flex flex-col w-full" [formGroup]="memberBankForm">
|
||||||
|
<div class="flex">
|
||||||
|
<mat-form-field class="w-1/2 pr-2">
|
||||||
|
<mat-label>환전비밀번호</mat-label>
|
||||||
|
<input
|
||||||
|
id="exchangePw"
|
||||||
|
matInput
|
||||||
|
[formControlName]="'exchangePw'"
|
||||||
|
/>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field class="w-1/2 pr-2">
|
||||||
|
<mat-label>은행명</mat-label>
|
||||||
|
|
||||||
|
<mat-select
|
||||||
|
[formControlName]="'bankId'"
|
||||||
|
placeholder="은행 선택"
|
||||||
|
>
|
||||||
|
<mat-option
|
||||||
|
*ngFor="let bank of banks"
|
||||||
|
[value]="bank.getId()"
|
||||||
|
>
|
||||||
|
{{ bank.getName() }}
|
||||||
|
</mat-option>
|
||||||
|
<!-- <mat-option [value]="'0'"> 국민은행 </mat-option> -->
|
||||||
|
</mat-select>
|
||||||
|
<!-- <mat-error
|
||||||
|
*ngIf="
|
||||||
|
composeForm.get('bankId')?.hasError('required')
|
||||||
|
"
|
||||||
|
>
|
||||||
|
은행명은 필수 입력입니다.
|
||||||
|
</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
<div class="flex">
|
||||||
|
<mat-form-field class="w-1/2 pr-2">
|
||||||
|
<mat-label>계좌번호</mat-label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
matInput
|
||||||
|
[formControlName]="'accountNumber'"
|
||||||
|
/>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field class="w-1/2 pr-2">
|
||||||
|
<mat-label>예금주</mat-label>
|
||||||
|
<input
|
||||||
|
id="accountHolder"
|
||||||
|
type="text"
|
||||||
|
matInput
|
||||||
|
[formControlName]="'accountHolder'"
|
||||||
|
/>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
<mat-form-field class="w-full fuse-mat-textarea">
|
<mat-form-field class="w-full fuse-mat-textarea">
|
||||||
<mat-label>메모</mat-label>
|
<mat-label>메모</mat-label>
|
||||||
<textarea matInput name="memo" row="5"></textarea>
|
<textarea
|
||||||
|
matInput
|
||||||
|
name="memo"
|
||||||
|
[formControlName]="'description'"
|
||||||
|
row="5"
|
||||||
|
></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<ng-container *ngTemplateOutlet="commonButton"></ng-container>
|
||||||
|
</form>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<!-- Security -->
|
<!-- Security -->
|
||||||
<ng-container *ngSwitchCase="'security'">
|
<ng-container *ngSwitchCase="'settleInfo'">
|
||||||
|
<form class="flex flex-col w-full" [formGroup]="memberSettleForm">
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<mat-form-field class="w-1/3 pr-2">
|
<mat-form-field class="w-1/3 pr-2">
|
||||||
<mat-label>바카라 요율</mat-label>
|
<mat-label>바카라 요율</mat-label>
|
||||||
|
@ -403,6 +423,7 @@
|
||||||
</div>
|
</div>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<mat-form-field class="w-1/3 pr-2">
|
<mat-form-field class="w-1/3 pr-2">
|
||||||
<mat-label>기타 게임 요율</mat-label>
|
<mat-label>기타 게임 요율</mat-label>
|
||||||
|
@ -475,9 +496,15 @@
|
||||||
</mat-radio-button>
|
</mat-radio-button>
|
||||||
</mat-radio-group>
|
</mat-radio-group>
|
||||||
</div>
|
</div>
|
||||||
|
</form>
|
||||||
|
<ng-container *ngTemplateOutlet="commonButton"></ng-container>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<!-- Plan & Billing -->
|
<!-- Plan & Billing -->
|
||||||
<ng-container *ngSwitchCase="'plan-billing'">
|
<ng-container *ngSwitchCase="'gameInfo'">
|
||||||
|
<form
|
||||||
|
class="flex flex-col w-full"
|
||||||
|
[formGroup]="memberGameSettingForm"
|
||||||
|
>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<span class="w-1/3 pr-2">
|
<span class="w-1/3 pr-2">
|
||||||
<mat-slide-toggle [color]="'primary'">
|
<mat-slide-toggle [color]="'primary'">
|
||||||
|
@ -510,15 +537,30 @@
|
||||||
<mat-label>/ 0원(이전일: 0원)</mat-label>
|
<mat-label>/ 0원(이전일: 0원)</mat-label>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
</form>
|
||||||
|
<ng-container *ngTemplateOutlet="commonButton"></ng-container>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<!-- Notifications -->
|
<!-- Notifications -->
|
||||||
<ng-container *ngSwitchCase="'notifications'"
|
<ng-container *ngSwitchCase="'historyInfo'"
|
||||||
><div>내역</div>
|
><div>내역</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
|
||||||
</mat-drawer-content>
|
</mat-drawer-content>
|
||||||
</mat-drawer-container>
|
</mat-drawer-container>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<ng-template #commonButton>
|
||||||
|
<div class="flex items-center w-full border-t divide-x">
|
||||||
|
<button
|
||||||
|
class="-ml-4"
|
||||||
|
mat-flat-button
|
||||||
|
[color]="'primary'"
|
||||||
|
(click)="__modifyMember()"
|
||||||
|
>
|
||||||
|
수정
|
||||||
|
</button>
|
||||||
|
<button class="-ml-4" mat-flat-button [color]="'primary'">목록으로</button>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
|
|
|
@ -32,7 +32,10 @@ import { FuseConfirmationService } from '@fuse/services/confirmation';
|
||||||
import { User } from '../models/user';
|
import { User } from '../models/user';
|
||||||
import { UserService } from '../services/user.service';
|
import { UserService } from '../services/user.service';
|
||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
import { GetMemberResponse } from 'app/modules/proto/c2se/member_pb';
|
import {
|
||||||
|
GetMemberResponse,
|
||||||
|
UpdateMemberRequest,
|
||||||
|
} from 'app/modules/proto/c2se/member_pb';
|
||||||
import { MemberModel } from 'app/modules/proto/models/member_pb';
|
import { MemberModel } from 'app/modules/proto/models/member_pb';
|
||||||
import { MemberService } from 'app/modules/polyglot/member/services/member.service';
|
import { MemberService } from 'app/modules/polyglot/member/services/member.service';
|
||||||
import { MemberLevelService } from 'app/modules/polyglot/member_level/services/member_level.service';
|
import { MemberLevelService } from 'app/modules/polyglot/member_level/services/member_level.service';
|
||||||
|
@ -44,6 +47,7 @@ import { Site } from 'app/modules/proto/models/site_pb';
|
||||||
import { MatDrawer } from '@angular/material/sidenav';
|
import { MatDrawer } from '@angular/material/sidenav';
|
||||||
|
|
||||||
import { FuseMediaWatcherService } from '@fuse/services/media-watcher';
|
import { FuseMediaWatcherService } from '@fuse/services/media-watcher';
|
||||||
|
import { UpdateBankRequest } from 'app/modules/proto/c2se/bank_pb';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'user-view',
|
selector: 'user-view',
|
||||||
|
@ -82,12 +86,17 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
|
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
searchInputControl = new FormControl();
|
searchInputControl = new FormControl();
|
||||||
memberViewForm!: FormGroup;
|
|
||||||
/* selectedUser?: User; */
|
memberDefaultForm!: FormGroup;
|
||||||
selectedUser?: MemberModel;
|
memberBankForm!: FormGroup;
|
||||||
|
memberSettleForm!: FormGroup;
|
||||||
|
memberGameSettingForm!: FormGroup;
|
||||||
|
|
||||||
|
/* currentMember?: User; */
|
||||||
|
currentMember?: MemberModel;
|
||||||
|
|
||||||
panels: any[] = [];
|
panels: any[] = [];
|
||||||
selectedPanel: string = 'account';
|
selectedPanel: string = 'accountInfo';
|
||||||
|
|
||||||
memberLevels!: MemberLevel[];
|
memberLevels!: MemberLevel[];
|
||||||
banks!: Bank[];
|
banks!: Bank[];
|
||||||
|
@ -119,29 +128,34 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
* On init
|
* On init
|
||||||
*/
|
*/
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.memberViewForm = this._formBuilder.group({
|
this.memberDefaultForm = this._formBuilder.group({
|
||||||
id: [''],
|
id: [''],
|
||||||
username: [{ value: '', disabled: true }],
|
username: [{ value: '', disabled: true }],
|
||||||
signinPw: [{ value: '' }],
|
signinPw: [{ value: '' }],
|
||||||
exchangePw: [''],
|
|
||||||
description: [''],
|
|
||||||
tags: [[]],
|
|
||||||
nickname: [{ value: '', disabled: true }],
|
nickname: [{ value: '', disabled: true }],
|
||||||
ownCash: [''],
|
ownCash: [''],
|
||||||
mobilePhoneNumber: [''],
|
mobilePhoneNumber: [''],
|
||||||
levelId: [''],
|
levelId: [''],
|
||||||
state: [''],
|
state: [''],
|
||||||
isExcahngeMoney: [''],
|
isExcahngeMoney: [''],
|
||||||
bankId: [''],
|
|
||||||
accountNumber: [''],
|
|
||||||
accountHolder: [''],
|
|
||||||
comp: [''],
|
comp: [''],
|
||||||
coupon: [''],
|
coupon: [''],
|
||||||
recommender: [{ value: '', disabled: true }],
|
recommender: [{ value: '', disabled: true }],
|
||||||
changeSite: [''],
|
siteId: [''],
|
||||||
recommendCount: [''],
|
recommendCount: [''],
|
||||||
hodingGameMoney: [{ value: '0', disabled: true }],
|
hodingGameMoney: [{ value: '0', disabled: true }],
|
||||||
memo: [''],
|
});
|
||||||
|
|
||||||
|
this.memberBankForm = this._formBuilder.group({
|
||||||
|
bankId: [''],
|
||||||
|
accountNumber: [''],
|
||||||
|
accountHolder: [''],
|
||||||
|
exchangePw: [''],
|
||||||
|
description: [''],
|
||||||
|
});
|
||||||
|
|
||||||
|
this.memberSettleForm = this._formBuilder.group({
|
||||||
bacaraRate: [],
|
bacaraRate: [],
|
||||||
rulletRate: [],
|
rulletRate: [],
|
||||||
dragonRate: [],
|
dragonRate: [],
|
||||||
|
@ -151,28 +165,36 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
slotRusingRate: [],
|
slotRusingRate: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.memberGameSettingForm = this._formBuilder.group({});
|
||||||
|
|
||||||
this.panels = [
|
this.panels = [
|
||||||
{
|
{
|
||||||
id: 'account',
|
id: 'accountInfo',
|
||||||
icon: 'heroicons_outline:user-circle',
|
icon: 'heroicons_outline:user-circle',
|
||||||
title: '기본정보',
|
title: '기본정보',
|
||||||
description: 'Manage your public profile and private information',
|
description: 'Manage your public profile and private information',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'security',
|
id: 'bankInfo',
|
||||||
|
icon: 'heroicons_outline:user-circle',
|
||||||
|
title: '계좌정보',
|
||||||
|
description: 'Manage your public profile and private information',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'settleInfo',
|
||||||
icon: 'heroicons_outline:lock-closed',
|
icon: 'heroicons_outline:lock-closed',
|
||||||
title: '정산설정',
|
title: '정산설정',
|
||||||
description: 'Manage your password and 2-step verification preferences',
|
description: 'Manage your password and 2-step verification preferences',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'plan-billing',
|
id: 'gameInfo',
|
||||||
icon: 'heroicons_outline:credit-card',
|
icon: 'heroicons_outline:credit-card',
|
||||||
title: '게임설정',
|
title: '게임설정',
|
||||||
description:
|
description:
|
||||||
'Manage your subscription plan, payment method and billing information',
|
'Manage your subscription plan, payment method and billing information',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'notifications',
|
id: 'historyInfo',
|
||||||
icon: 'heroicons_outline:bell',
|
icon: 'heroicons_outline:bell',
|
||||||
title: '내역',
|
title: '내역',
|
||||||
description: "Manage when you'll be notified on which channels",
|
description: "Manage when you'll be notified on which channels",
|
||||||
|
@ -211,18 +233,18 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
this._activatedRoute.data.subscribe((data) => {
|
this._activatedRoute.data.subscribe((data) => {
|
||||||
let member: GetMemberResponse.Result = data['member'];
|
let member: GetMemberResponse.Result = data['member'];
|
||||||
|
|
||||||
this.selectedUser = member.getMember();
|
this.currentMember = member.getMember();
|
||||||
|
|
||||||
/* console.log('dddd', listMemberResult.getMembersList()); */
|
/* console.log('dddd', listMemberResult.getMembersList()); */
|
||||||
this.memberViewForm.patchValue({
|
this.memberDefaultForm.patchValue({
|
||||||
username: this.selectedUser?.getUsername(),
|
username: this.currentMember?.getUsername(),
|
||||||
signinPw: '',
|
signinPw: '',
|
||||||
exchangePw: '',
|
exchangePw: '',
|
||||||
mobilePhoneNumber: this.selectedUser?.getMobilePhoneNumber(),
|
mobilePhoneNumber: this.currentMember?.getMobilePhoneNumber(),
|
||||||
levelId: this.selectedUser?.getMemberLevel()?.getId(),
|
levelId: this.currentMember?.getMemberLevel()?.getId(),
|
||||||
state: this.selectedUser?.getState(),
|
state: this.currentMember?.getState(),
|
||||||
nickname: this.selectedUser?.getNickname(),
|
nickname: this.currentMember?.getNickname(),
|
||||||
bankId: this.selectedUser?.getBankAccount()?.getId(),
|
bankId: this.currentMember?.getBankAccount()?.getId(),
|
||||||
});
|
});
|
||||||
// Mark for check
|
// Mark for check
|
||||||
this._changeDetectorRef.markForCheck();
|
this._changeDetectorRef.markForCheck();
|
||||||
|
@ -274,15 +296,77 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
}
|
}
|
||||||
|
|
||||||
__modifyMember(): void {
|
__modifyMember(): void {
|
||||||
const valueForm = this.memberViewForm.value;
|
if (!this.currentMember?.getId()) {
|
||||||
console.log('v: ', valueForm);
|
return;
|
||||||
/* this._memberService.updateMember(
|
}
|
||||||
this.selectedUser!.getId(),
|
|
||||||
this.selectedUser!.getSite()!.getId(),
|
const req = new UpdateMemberRequest();
|
||||||
this.selectedUser!.getMemberLevel()!.getId(),
|
req.setId(this.currentMember?.getId());
|
||||||
'beteran',
|
|
||||||
valueForm.mobilePhoneNumber
|
switch (this.selectedPanel) {
|
||||||
); */
|
case 'accountInfo':
|
||||||
|
{
|
||||||
|
const {
|
||||||
|
username,
|
||||||
|
signinPw,
|
||||||
|
nickname,
|
||||||
|
ownCash,
|
||||||
|
mobilePhoneNumber,
|
||||||
|
levelId,
|
||||||
|
state,
|
||||||
|
isExcahngeMoney,
|
||||||
|
comp,
|
||||||
|
coupon,
|
||||||
|
siteId,
|
||||||
|
hodingGameMoney,
|
||||||
|
} = this.memberDefaultForm.value;
|
||||||
|
if (!!signinPw && signinPw == '') {
|
||||||
|
req.setPassword(signinPw);
|
||||||
|
}
|
||||||
|
if (!!levelId && levelId == '') {
|
||||||
|
req.setMemberLevelId(levelId);
|
||||||
|
}
|
||||||
|
if (!!mobilePhoneNumber && mobilePhoneNumber == '') {
|
||||||
|
req.setMobilePhoneNumber(mobilePhoneNumber);
|
||||||
|
}
|
||||||
|
if (!!siteId && siteId == '') {
|
||||||
|
req.setSiteId(siteId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 'bankInfo':
|
||||||
|
{
|
||||||
|
if (!this.memberBankForm.valid) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const { exchangePw, accountHolder, accountNumber, description } =
|
||||||
|
this.memberBankForm.value;
|
||||||
|
|
||||||
|
const bank = new UpdateMemberRequest.BankAccount();
|
||||||
|
const bankId = this.currentMember?.getBankAccount()?.getId();
|
||||||
|
if (!!bankId) {
|
||||||
|
bank.setId(bankId);
|
||||||
|
bank.setAccountNumber(accountNumber);
|
||||||
|
bank.setName(accountHolder);
|
||||||
|
bank.setExchangePassword(exchangePw);
|
||||||
|
}
|
||||||
|
req.setBankAccount(bank);
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 'settleInfo':
|
||||||
|
break;
|
||||||
|
case 'gameInfo':
|
||||||
|
break;
|
||||||
|
case 'historyInfo':
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
this._memberService.updateMember(req).then((result) => {
|
||||||
|
console.log(result);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -117,30 +117,8 @@ export class MemberService {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateMember(
|
updateMember(req: UpdateMemberRequest): Promise<UpdateMemberResponse.Result> {
|
||||||
id: string,
|
|
||||||
siteId: string,
|
|
||||||
memberLevelId: string,
|
|
||||||
password: string,
|
|
||||||
mobilePhoneNumber: string
|
|
||||||
): Promise<UpdateMemberResponse.Result> {
|
|
||||||
return new Promise<UpdateMemberResponse.Result>((resolve, reject) => {
|
return new Promise<UpdateMemberResponse.Result>((resolve, reject) => {
|
||||||
let req = new UpdateMemberRequest();
|
|
||||||
req.setId(id);
|
|
||||||
|
|
||||||
if (!!siteId) {
|
|
||||||
req.setSiteId(siteId);
|
|
||||||
}
|
|
||||||
if (!!memberLevelId) {
|
|
||||||
req.setMemberLevelId(memberLevelId);
|
|
||||||
}
|
|
||||||
if (!!password) {
|
|
||||||
req.setPassword(password);
|
|
||||||
}
|
|
||||||
if (!!mobilePhoneNumber) {
|
|
||||||
req.setMobilePhoneNumber(mobilePhoneNumber);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.__natsService
|
this.__natsService
|
||||||
.request<UpdateMemberResponse.Result>(
|
.request<UpdateMemberResponse.Result>(
|
||||||
SUBJECT_UPDATE_MEMBER,
|
SUBJECT_UPDATE_MEMBER,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user