bug fix
This commit is contained in:
parent
3eda379160
commit
b1d1889210
|
@ -111,9 +111,9 @@
|
||||||
<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>
|
||||||
<input
|
<input
|
||||||
id="signinId"
|
id="username"
|
||||||
matInput
|
matInput
|
||||||
[formControlName]="'signinId'"
|
[formControlName]="'username'"
|
||||||
/>
|
/>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field class="w-1/3 pr-2">
|
<mat-form-field class="w-1/3 pr-2">
|
||||||
|
@ -155,9 +155,9 @@
|
||||||
<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>
|
||||||
<input
|
<input
|
||||||
id="phoneNumber"
|
id="mobilePhoneNumber"
|
||||||
matInput
|
matInput
|
||||||
[formControlName]="'phoneNumber'"
|
[formControlName]="'mobilePhoneNumber'"
|
||||||
/>
|
/>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
@ -166,17 +166,22 @@
|
||||||
<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>
|
||||||
<mat-select id="level" [formControlName]="'level'">
|
<mat-select
|
||||||
<!-- <ng-container *ngFor="let category of categories"> -->
|
[formControlName]="'levelId'"
|
||||||
<mat-option value="level">
|
placeholder="레벨 선택"
|
||||||
cartegory option
|
>
|
||||||
|
<mat-option
|
||||||
|
*ngFor="let level of memberLevels"
|
||||||
|
[value]="'level.getId()'"
|
||||||
|
>
|
||||||
|
{{ level.getName() }}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
<!-- </ng-container> -->
|
<!-- <mat-option [value]="'0'"> 국민은행 </mat-option> -->
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<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>
|
||||||
<mat-select id="state" [formControlName]="'status'">
|
<mat-select id="state" [formControlName]="'state'">
|
||||||
<!-- <ng-container *ngFor="let brand of brands"> -->
|
<!-- <ng-container *ngFor="let brand of brands"> -->
|
||||||
<mat-option value="brand.id">
|
<mat-option value="brand.id">
|
||||||
brand option
|
brand option
|
||||||
|
@ -200,14 +205,28 @@
|
||||||
<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>
|
||||||
<mat-select [formControlName]="'bankname'">
|
|
||||||
<!-- <ng-container *ngFor="let brand of brands"> -->
|
<mat-select
|
||||||
<mat-option value="brand.id">
|
[formControlName]="'bankId'"
|
||||||
brand option
|
placeholder="은행 선택"
|
||||||
|
>
|
||||||
|
<mat-option
|
||||||
|
*ngFor="let bank of banks"
|
||||||
|
[value]="bank.getId()"
|
||||||
|
>
|
||||||
|
{{ bank.getName() }}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
<!-- </ng-container> -->
|
<!-- <mat-option [value]="'0'"> 국민은행 </mat-option> -->
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
<!-- <mat-error
|
||||||
|
*ngIf="
|
||||||
|
composeForm.get('bankId')?.hasError('required')
|
||||||
|
"
|
||||||
|
>
|
||||||
|
은행명은 필수 입력입니다.
|
||||||
|
</mat-error> -->
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<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>
|
||||||
<input
|
<input
|
||||||
|
@ -257,14 +276,23 @@
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<mat-form-field class="w-2/3 pr-2">
|
<mat-form-field class="w-2/3 pr-2">
|
||||||
<mat-label>사이트변경</mat-label>
|
<mat-label>사이트변경</mat-label>
|
||||||
<mat-select [formControlName]="'changeSite'">
|
|
||||||
<!-- <ng-container *ngFor="let vendor of vendors"> -->
|
<mat-select
|
||||||
<mat-option value="vendor.id">
|
[formControlName]="'changeSite'"
|
||||||
vendor option
|
placeholder="사이트 선택"
|
||||||
|
>
|
||||||
|
<mat-option
|
||||||
|
*ngFor="let site of sites"
|
||||||
|
[value]="site.getId()"
|
||||||
|
>
|
||||||
|
{{ site.getUrl() }}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
<!-- </ng-container> -->
|
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
<!-- <mat-error *ngIf="composeForm.get('siteId')?.hasError('required')">
|
||||||
|
사이트명은 필수 입력입니다.
|
||||||
|
</mat-error> -->
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<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>
|
||||||
<input
|
<input
|
||||||
|
|
|
@ -35,6 +35,12 @@ import { ActivatedRoute } from '@angular/router';
|
||||||
import { GetMemberResponse } from 'app/modules/proto/c2se/member_pb';
|
import { GetMemberResponse } 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 { BankService } from 'app/modules/polyglot/bank/services/bank.service';
|
||||||
|
import { MemberLevel } from 'app/modules/proto/models/member_level_pb';
|
||||||
|
import { Bank } from 'app/modules/proto/models/bank_pb';
|
||||||
|
import { SiteService } from 'app/modules/polyglot/site/services/site.service';
|
||||||
|
import { Site } from 'app/modules/proto/models/site_pb';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'user-view',
|
selector: 'user-view',
|
||||||
|
@ -73,6 +79,10 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
/* selectedUser?: User; */
|
/* selectedUser?: User; */
|
||||||
selectedUser?: MemberModel;
|
selectedUser?: MemberModel;
|
||||||
|
|
||||||
|
memberLevels!: MemberLevel[];
|
||||||
|
banks!: Bank[];
|
||||||
|
sites!: Site[];
|
||||||
|
|
||||||
private _unsubscribeAll: Subject<any> = new Subject<any>();
|
private _unsubscribeAll: Subject<any> = new Subject<any>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -84,7 +94,10 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
private _fuseConfirmationService: FuseConfirmationService,
|
private _fuseConfirmationService: FuseConfirmationService,
|
||||||
private _formBuilder: FormBuilder,
|
private _formBuilder: FormBuilder,
|
||||||
private _userService: UserService,
|
private _userService: UserService,
|
||||||
private _memberService: MemberService
|
private _memberService: MemberService,
|
||||||
|
private _memberLevelService: MemberLevelService,
|
||||||
|
private _bankService: BankService,
|
||||||
|
private _siteService: SiteService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------------------
|
||||||
|
@ -97,18 +110,18 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.memberViewForm = this._formBuilder.group({
|
this.memberViewForm = this._formBuilder.group({
|
||||||
id: [''],
|
id: [''],
|
||||||
signinId: [{ value: '', disabled: true }],
|
username: [{ value: '', disabled: true }],
|
||||||
signinPw: [{ value: '' }],
|
signinPw: [{ value: '' }],
|
||||||
exchangePw: [''],
|
exchangePw: [''],
|
||||||
description: [''],
|
description: [''],
|
||||||
tags: [[]],
|
tags: [[]],
|
||||||
nickname: [{ value: '', disabled: true }],
|
nickname: [{ value: '', disabled: true }],
|
||||||
ownCash: [''],
|
ownCash: [''],
|
||||||
phoneNumber: [''],
|
mobilePhoneNumber: [''],
|
||||||
level: [''],
|
level: [''],
|
||||||
status: [''],
|
state: [''],
|
||||||
isExcahngeMoney: [''],
|
isExcahngeMoney: [''],
|
||||||
bankname: [''],
|
bankId: [''],
|
||||||
accountNumber: [''],
|
accountNumber: [''],
|
||||||
accountHolder: [''],
|
accountHolder: [''],
|
||||||
comp: [''],
|
comp: [''],
|
||||||
|
@ -143,6 +156,18 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
|
|
||||||
/* this.user$ = this._userService.user$; */
|
/* this.user$ = this._userService.user$; */
|
||||||
|
|
||||||
|
this._siteService
|
||||||
|
.listSites()
|
||||||
|
.then((result) => (this.sites = result.getSitesList()));
|
||||||
|
this._memberLevelService.listMemberLevels().then((result) => {
|
||||||
|
this.memberLevels = result
|
||||||
|
.getMemberLevelsList()
|
||||||
|
.filter((v) => !!v.getShow());
|
||||||
|
});
|
||||||
|
this._bankService
|
||||||
|
.listBanks()
|
||||||
|
.then((result) => (this.banks = result.getBanksList()));
|
||||||
|
|
||||||
this._activatedRoute.data.subscribe((data) => {
|
this._activatedRoute.data.subscribe((data) => {
|
||||||
let member: GetMemberResponse.Result = data['member'];
|
let member: GetMemberResponse.Result = data['member'];
|
||||||
|
|
||||||
|
@ -150,13 +175,14 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
|
|
||||||
/* console.log('dddd', listMemberResult.getMembersList()); */
|
/* console.log('dddd', listMemberResult.getMembersList()); */
|
||||||
this.memberViewForm.patchValue({
|
this.memberViewForm.patchValue({
|
||||||
signinId: this.selectedUser?.getUsername(),
|
username: this.selectedUser?.getUsername(),
|
||||||
signinPw: '1234',
|
signinPw: '',
|
||||||
exchangePw: '1234',
|
exchangePw: '',
|
||||||
phoneNumber: this.selectedUser?.getMobilePhoneNumber(),
|
mobilePhoneNumber: this.selectedUser?.getMobilePhoneNumber(),
|
||||||
level: this.selectedUser?.getMemberLevel()?.getName(),
|
levelId: this.selectedUser?.getMemberLevel()?.getId(),
|
||||||
status: this.selectedUser?.getState(),
|
state: this.selectedUser?.getState(),
|
||||||
nickname: this.selectedUser?.getNickname(),
|
nickname: this.selectedUser?.getNickname(),
|
||||||
|
bankId: this.selectedUser?.getBankAccount()?.getId(),
|
||||||
});
|
});
|
||||||
// Mark for check
|
// Mark for check
|
||||||
this._changeDetectorRef.markForCheck();
|
this._changeDetectorRef.markForCheck();
|
||||||
|
@ -210,12 +236,12 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
__modifyMember(): void {
|
__modifyMember(): void {
|
||||||
const valueForm = this.memberViewForm.value;
|
const valueForm = this.memberViewForm.value;
|
||||||
console.log('v: ', valueForm);
|
console.log('v: ', valueForm);
|
||||||
this._memberService.updateMember(
|
/* this._memberService.updateMember(
|
||||||
this.selectedUser!.getId(),
|
this.selectedUser!.getId(),
|
||||||
this.selectedUser!.getSite()!.getId(),
|
this.selectedUser!.getSite()!.getId(),
|
||||||
this.selectedUser!.getMemberLevel()!.getId(),
|
this.selectedUser!.getMemberLevel()!.getId(),
|
||||||
'beteran',
|
'beteran',
|
||||||
valueForm.phoneNumber
|
valueForm.mobilePhoneNumber
|
||||||
);
|
); */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user