diff --git a/src/app/modules/admin/bank/deposit/components/list.component.html b/src/app/modules/admin/bank/deposit/components/list.component.html index b9cf453..ad1c6ce 100644 --- a/src/app/modules/admin/bank/deposit/components/list.component.html +++ b/src/app/modules/admin/bank/deposit/components/list.component.html @@ -43,7 +43,7 @@ mat-flat-button class="bet-mat-small-8" [color]="'primary'" - (click)="onClickDeposit(0)" + (click)="onClickDeposit(MemberBankDepositState.COMPLETE)" > 입금처리 @@ -53,7 +53,7 @@ mat-flat-button class="bet-mat-small-8" [color]="'primary'" - (click)="onClickDeposit(1)" + (click)="onClickDeposit(MemberBankDepositState.PENDING)" > 대기처리 diff --git a/src/app/modules/admin/bank/deposit/components/list.component.ts b/src/app/modules/admin/bank/deposit/components/list.component.ts index f0bed2c..3ba93fd 100644 --- a/src/app/modules/admin/bank/deposit/components/list.component.ts +++ b/src/app/modules/admin/bank/deposit/components/list.component.ts @@ -98,6 +98,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { searchInputControl = new FormControl(); selectedDeposit?: Deposit; pagination?: DepositPagination; + MemberBankDepositState = MemberBankDepositState; private _unsubscribeAll: Subject = new Subject(); @@ -253,19 +254,24 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { return item.id || index; } - onClickDeposit(type: number): void { + onClickDeposit(typeNum: number): void { if (this.__checkedDeposits.length === 0) { return; } + let state = + typeNum === 3 + ? MemberBankDepositState.COMPLETE + : MemberBankDepositState.PENDING; let req: UpdateMemberBankDepositForStateRequest; this.__checkedDeposits.map((v) => { req = new UpdateMemberBankDepositForStateRequest(); req.setId(v); - req.setState(2); + req.setState(state); + this._bankDepositService - .updateMemberBankDepositForState() + .updateMemberBankDepositForState(req) .then((result) => { console.log(result); }) diff --git a/src/app/modules/polyglot/member_bank_deposit/services/member_bank_deposit.service.ts b/src/app/modules/polyglot/member_bank_deposit/services/member_bank_deposit.service.ts index a6f50f6..28249dc 100644 --- a/src/app/modules/polyglot/member_bank_deposit/services/member_bank_deposit.service.ts +++ b/src/app/modules/polyglot/member_bank_deposit/services/member_bank_deposit.service.ts @@ -136,11 +136,11 @@ export class MemberBankDepositService { ); } - updateMemberBankDepositForState(): Promise { + updateMemberBankDepositForState( + req: UpdateMemberBankDepositForStateRequest + ): Promise { return new Promise( (resolve, reject) => { - let req = new UpdateMemberBankDepositForStateRequest(); - this.__natsService .request( SUBJECT_UPDATE_MEMBER_BANK_DEPOSIT_FOR_STATE,