diff --git a/src/ts/@overflow/member/react/Modify.tsx b/src/ts/@overflow/member/react/Modify.tsx index fba55c9..e8002bb 100644 --- a/src/ts/@overflow/member/react/Modify.tsx +++ b/src/ts/@overflow/member/react/Modify.tsx @@ -22,8 +22,8 @@ export function mapStateToProps(state: State, ownProps?:ModifyStateProps): Modif export function mapDispatchToProps(dispatch: Dispatch): ModifyDispatchProps { return { - onModify: (member: Member) => { - dispatch(asyncRequestActions.request('MemberService', 'modify', modifyActions.REQUEST, JSON.stringify(member))); + onModify: (member: Member, pw: string) => { + dispatch(asyncRequestActions.request('MemberService', 'modify', modifyActions.REQUEST, JSON.stringify(member), pw)); }, onReadMember: (id: number) => { dispatch(asyncRequestActions.request('MemberService', 'read', readActions.REQUEST, JSON.stringify(id))); diff --git a/src/ts/@overflow/member/react/components/Modify.tsx b/src/ts/@overflow/member/react/components/Modify.tsx index c09ef1d..377f016 100644 --- a/src/ts/@overflow/member/react/components/Modify.tsx +++ b/src/ts/@overflow/member/react/components/Modify.tsx @@ -14,7 +14,7 @@ export interface StateProps { } export interface DispatchProps { - onModify?(member: Member): void; + onModify?(member: Member, pw: string): void; onReadMember?(id: Number): void; onRedirectHome():void; } @@ -64,16 +64,15 @@ export class Modify extends React.Component { } public render(): JSX.Element { - console.log('dddddddddddddddddddddddd'); - console.log(this.props.member); + let modifyElement = null; if (this.props.member === null || this.props.member === undefined) { return null; } modifyElement =
- - + , data: InputOnChangeData) => { this.setState({ name: data.value }); } @@ -88,7 +87,7 @@ export class Modify extends React.Component { this.setState({ passCon: data.value }); } } /> - , data: InputOnChangeData) => { this.setState({ company: data.value }); } @@ -98,7 +97,7 @@ export class Modify extends React.Component { this.setState({ country: data.value }); } } /> - , data: InputOnChangeData) => { this.setState({ phone: data.value }); } @@ -126,13 +125,15 @@ export class Modify extends React.Component { return; } - member.email = this.state.email; + member.id = this.props.member.id; + member.email = this.props.member.email; member.name = this.state.name; member.companyName = this.state.company; member.phone = this.state.phone; + member.status = this.props.member.status; // member.status = MemberStatus.NOAUTH; - this.props.onModify(member); + this.props.onModify(member, this.state.pass); } }