사용자 정보 수정

This commit is contained in:
Park Byung Eun 2022-09-30 06:22:13 +00:00
parent 09ac08ce37
commit de8e3ddd1e
2 changed files with 13 additions and 7 deletions

View File

@ -164,7 +164,7 @@ export class HomeComponent implements OnInit {
*/ */
__onClickCompose(composeMenuType: ComposeMenuType): void { __onClickCompose(composeMenuType: ComposeMenuType): void {
let selectType: any; let selectType: any;
let data = {};
if ( if (
!this.loggedIn && !this.loggedIn &&
composeMenuType !== ComposeMenuType.signIn && composeMenuType !== ComposeMenuType.signIn &&
@ -188,6 +188,7 @@ export class HomeComponent implements OnInit {
break; break;
case ComposeMenuType.modifyMember: case ComposeMenuType.modifyMember:
selectType = ModifyMemberComposeComponent; selectType = ModifyMemberComposeComponent;
data = { member: this.member };
break; break;
case ComposeMenuType.deposit: case ComposeMenuType.deposit:
selectType = DepositComposeComponent; selectType = DepositComposeComponent;
@ -212,7 +213,7 @@ export class HomeComponent implements OnInit {
break; break;
} }
const dialogRef = this._matDialog.open(selectType); const dialogRef = this._matDialog.open(selectType, { data });
dialogRef.afterClosed().subscribe((result) => { dialogRef.afterClosed().subscribe((result) => {
if (ComposeMenuType.signIn === composeMenuType && !!result.choice) { if (ComposeMenuType.signIn === composeMenuType && !!result.choice) {

View File

@ -1,4 +1,4 @@
import { Component, OnInit, ViewEncapsulation } from '@angular/core'; import { Component, Inject, OnInit, ViewEncapsulation } from '@angular/core';
import { import {
AbstractControl, AbstractControl,
FormBuilder, FormBuilder,
@ -6,7 +6,7 @@ import {
ValidatorFn, ValidatorFn,
Validators, Validators,
} from '@angular/forms'; } from '@angular/forms';
import { MatDialogRef } from '@angular/material/dialog'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { fuseAnimations } from '@fuse/animations'; import { fuseAnimations } from '@fuse/animations';
import { FuseAlertType } from '@fuse/components/alert'; import { FuseAlertType } from '@fuse/components/alert';
import { BankService } from 'app/modules/polyglot/bank/services/bank.service'; import { BankService } from 'app/modules/polyglot/bank/services/bank.service';
@ -19,7 +19,11 @@ import {
UpdateMemberForPasswordRequest, UpdateMemberForPasswordRequest,
UpdateMemberForPasswordResponse, UpdateMemberForPasswordResponse,
} from 'app/modules/proto/c2se/member_pb'; } from 'app/modules/proto/c2se/member_pb';
import { MemberModel } from 'app/modules/proto/models/member_pb';
export interface ModifyMemberComposeData {
member: MemberModel;
}
export interface ModifyMemberComposeResult {}
@Component({ @Component({
selector: 'modify-member-compose', selector: 'modify-member-compose',
templateUrl: './modify-member-compose.component.html', templateUrl: './modify-member-compose.component.html',
@ -44,6 +48,7 @@ export class ModifyMemberComposeComponent implements OnInit {
*/ */
constructor( constructor(
public matDialogRef: MatDialogRef<ModifyMemberComposeComponent>, public matDialogRef: MatDialogRef<ModifyMemberComposeComponent>,
@Inject(MAT_DIALOG_DATA) public data: ModifyMemberComposeData,
private _formBuilder: FormBuilder, private _formBuilder: FormBuilder,
private _identityService: IdentityService, private _identityService: IdentityService,
private _memberService: MemberService, private _memberService: MemberService,
@ -60,8 +65,8 @@ export class ModifyMemberComposeComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
// Create the form // Create the form
this.modifyMemberComposeForm = this._formBuilder.group({ this.modifyMemberComposeForm = this._formBuilder.group({
username: [{ value: '', disabled: true }], username: [{ value: this.data.member.getUsername(), disabled: true }],
nickname: [{ value: '', disabled: true }], nickname: [{ value: this.data.member.getNickname(), disabled: true }],
currentPassword: ['1234', [Validators.required]], currentPassword: ['1234', [Validators.required]],
password: [ password: [
'1234', '1234',