-
- test {{ idx }}
+ {{ __getMemberClassesByMemberId(deposit.getMemberId()) }}
+
+
+
+ {{ __getMemberLevelByMemberId(deposit.getMemberId()) }}
+
+
+ {{
+ __getMemberById(deposit.getMemberId())?.getUsername()
+ }}
- test {{ idx }}
+ {{ __getMemberById(deposit.getMemberId())?.getNickname() }}
-
+
- test {{ idx }}
+ {{ deposit.getAmount() }}
- test {{ idx }}
+ {{ __getMemberBankByMemberId(deposit.getMemberId()) }}
- test {{ idx }}
-
-
-
{{ deposit.getName() }}
-
-
{{ idx % 2 === 0 ? "롤링" : "콤프" }}
-
-
test {{ idx }}
-
-
test {{ idx }}
-
+
+
+
+ {{ __getMemberSettlementByMemberId(deposit.getMemberId()) }}
+
+ {{ deposit.getMemo() }}
+
+
+
{{ deposit.getCreatedAt() | date: "yyyy-MM-dd HH:mm" }}
{{ deposit.getStateChangedAt() | date: "yyyy-MM-dd HH:mm" }}
+
+ {{ __getDepositState(deposit) }}
-
+
41,200,000원
@@ -235,7 +254,7 @@
22,200,000원
-
test {{ idx }}
+
22,200,000원
+
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 67c945e..7675b8f 100644
--- a/src/app/modules/admin/bank/deposit/components/list.component.ts
+++ b/src/app/modules/admin/bank/deposit/components/list.component.ts
@@ -35,7 +35,14 @@ import { DepositPagination } from '../models/deposit-pagination';
import { DepositService } from '../services/deposit.service';
import { ActivatedRoute, Router } from '@angular/router';
import { ListMemberBankDepositsResponse } from 'app/modules/proto/c2se/member_bank_deposit_pb';
-import { MemberBankDeposit } from 'app/modules/proto/models/member_bank_deposit_pb';
+import {
+ MemberBankDeposit,
+ MemberBankDepositState,
+} from 'app/modules/proto/models/member_bank_deposit_pb';
+import { MemberModel } from 'app/modules/proto/models/member_pb';
+import { ListMembersResponse } from 'app/modules/proto/c2se/member_pb';
+import { ListMemberClassesResponse } from 'app/modules/proto/c2se/member_class_pb';
+import { MemberClass } from 'app/modules/proto/models/member_class_pb';
@Component({
selector: 'deposit-list',
@@ -45,21 +52,21 @@ import { MemberBankDeposit } from 'app/modules/proto/models/member_bank_deposit_
`
.deposit-grid {
/* CB 상부 아이디 등급 예금주 정산종류 */
- grid-template-columns: 20px 100px 100px 80px auto 40px;
+ grid-template-columns: 20px 80px 100px auto 60px 140px;
@screen sm {
/* CB 상부 아이디 등급 예금주 정산종류 비고 예정 등록*/
- grid-template-columns: 20px 100px 100px 80px auto 40px 20px 140px 140px;
+ grid-template-columns: 20px 80px 100px auto 60px 140px 120px;
}
@screen md {
/* CB 상부 아이디 등급 예금주 정산종류 비고 예정 등록 입금출금 */
- grid-template-columns: 20px 100px 100px 80px auto 40px 20px 100px 100px 100px;
+ grid-template-columns: 20px 80px 100px auto 60px 140px 120px 140px;
}
@screen lg {
- /* CB 상부 아이디 등급 예금주 정산종류 비고 예정 등록 입금출금 게임중 카지노 회원 배팅 삭제*/
- grid-template-columns: 20px 100px 100px 80px auto 40px 20px 140px 140px 140px 100px 100px 100px 100px 100px;
+ /* CB 구분 아이디 입금정보 정산종류 등록날짜 입금출금 게임중머니 카지노 상위 배팅 삭제*/
+ grid-template-columns: 20px 80px 100px auto 60px 140px 120px 140px 80px 120px 80px 60px;
}
}
`,
@@ -72,6 +79,8 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
@ViewChild(MatSort) private _sort!: MatSort;
+ listMember!: MemberModel[];
+ memberClasses!: MemberClass[];
bankDeposit$!: Observable
;
__isSearchOpened = false;
@@ -116,9 +125,15 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
// Get the products
this._activatedRoute.data.subscribe((data) => {
+ let listMemberResult: ListMembersResponse.Result = data['listMember'];
let listBankDepositResult: ListMemberBankDepositsResponse.Result =
data['bankDeposit'];
+ let listMemberClasses: ListMemberClassesResponse.Result =
+ data['listMemberClasses'];
+
+ this.listMember = listMemberResult.getMembersList();
this.bankDeposit$ = of(listBankDepositResult.getMemberBankDepositsList());
+ this.memberClasses = listMemberClasses.getMemberClassesList();
console.log(
'bankDeposit: ',
@@ -223,4 +238,82 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
__trackByFn(index: number, item: any): any {
return item.id || index;
}
+
+ __getMemberRefferByMemberId(memberId: string): string | undefined {
+ const member = this.__getMemberById(memberId);
+
+ if (!!member) {
+ const parentUserName = member.getParentMember()?.getUsername();
+ const parentClassesId = member.getParentMember()?.getMemberClassId();
+ const parentClass = this.memberClasses.find(
+ (v) => v.getId() === parentClassesId
+ );
+
+ const parentClassName = parentClass?.getName();
+
+ return `[${parentClassName}]${parentUserName}`;
+ }
+
+ return undefined;
+ }
+ __getDepositState(deposit: MemberBankDeposit): string | undefined {
+ const state = deposit.getState();
+ let result: string = '';
+
+ switch (state) {
+ case MemberBankDepositState.APPLICATION:
+ result = '신청';
+ break;
+ case MemberBankDepositState.COMPLETE:
+ result = '완료';
+ break;
+ default:
+ break;
+ }
+
+ return result;
+ }
+
+ __getMemberSettlementByMemberId(memberId: string): string | undefined {
+ const member = this.__getMemberById(memberId);
+
+ if (!!member) {
+ const type = member.getMemberSettlementSetting()?.getSettlementType();
+ return type === 1 ? '롤링' : '';
+ }
+
+ return undefined;
+ }
+ __getMemberLevelByMemberId(memberId: string): string | undefined {
+ const member = this.__getMemberById(memberId);
+
+ if (!!member) {
+ return member.getMemberLevel()?.getName();
+ }
+
+ return undefined;
+ }
+
+ __getMemberBankByMemberId(memberId: string): string | undefined {
+ const member = this.__getMemberById(memberId);
+
+ if (!!member) {
+ return member.getBankAccount()?.getBank()?.getName();
+ }
+
+ return undefined;
+ }
+
+ __getMemberClassesByMemberId(memberId: string): string | undefined {
+ const member = this.__getMemberById(memberId);
+
+ if (!!member) {
+ return member.getMemberClass()?.getName();
+ }
+
+ return undefined;
+ }
+ __getMemberById(memberId: string): MemberModel | undefined {
+ return this.listMember.find((v) => v.getId() === memberId);
+ }
}
diff --git a/src/app/modules/admin/bank/deposit/deposit.routing.ts b/src/app/modules/admin/bank/deposit/deposit.routing.ts
index f0c5dc9..afcabde 100644
--- a/src/app/modules/admin/bank/deposit/deposit.routing.ts
+++ b/src/app/modules/admin/bank/deposit/deposit.routing.ts
@@ -8,13 +8,17 @@ import {
DepositsResolver,
} from './resolvers/deposit.resolver';
import { UserResolver } from '../../dashboards/user/user.resolvers';
+import { ListMemberResolver } from 'app/shared/resolvers/member.resolver';
+import { ListMemberClassesResolver } from 'app/shared/resolvers/member-class.resolver';
export const depositRoutes: Route[] = [
{
path: '',
component: ListComponent,
resolve: {
+ listMember: ListMemberResolver,
bankDeposit: BankDepositResolver,
+ listMemberClasses: ListMemberClassesResolver,
},
},
{
diff --git a/src/app/modules/admin/member/user/resolvers/user.resolver.ts b/src/app/modules/admin/member/user/resolvers/user.resolver.ts
index 8608dfa..7c12fbb 100644
--- a/src/app/modules/admin/member/user/resolvers/user.resolver.ts
+++ b/src/app/modules/admin/member/user/resolvers/user.resolver.ts
@@ -95,69 +95,3 @@ export class UsersResolver implements Resolve {
return this._userService.getUsers();
}
}
-
-@Injectable({
- providedIn: 'root',
-})
-export class ListMemberResolver implements Resolve {
- /**
- * Constructor
- */
- constructor(private _router: Router, private _memberService: MemberService) {}
-
- // -----------------------------------------------------------------------------------------------------
- // @ Public methods
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Resolver
- *
- * @param route
- * @param state
- */
-
- resolve(
- route: ActivatedRouteSnapshot,
- state: RouterStateSnapshot
- ):
- | Observable
- | Promise
- | ListMembersResponse.Result {
- return this._memberService.listMembers();
- }
-}
-
-@Injectable({
- providedIn: 'root',
-})
-export class MemberResolver implements Resolve {
- /**
- * Constructor
- */
- constructor(private _router: Router, private _memberService: MemberService) {}
-
- // -----------------------------------------------------------------------------------------------------
- // @ Public methods
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Resolver
- *
- * @param route
- * @param state
- */
-
- resolve(
- route: ActivatedRouteSnapshot,
- state: RouterStateSnapshot
- ):
- | Observable
- | Promise
- | GetMemberResponse.Result {
- let memberId = route.paramMap.get('id');
- if (!memberId) {
- console.error('user.resolver memberId is null');
- }
- return this._memberService.getMember(memberId!);
- }
-}
diff --git a/src/app/modules/admin/member/user/user.routing.ts b/src/app/modules/admin/member/user/user.routing.ts
index eef58e6..34e9874 100644
--- a/src/app/modules/admin/member/user/user.routing.ts
+++ b/src/app/modules/admin/member/user/user.routing.ts
@@ -2,15 +2,17 @@ import { Route } from '@angular/router';
import { ListComponent } from 'app/modules/admin/member/user/components/list.component';
import { ViewComponent } from 'app/modules/admin/member/user/components/view.component';
+import {
+ ListMemberResolver,
+ MemberResolver,
+} from 'app/shared/resolvers/member.resolver';
import { SiteResolver } from 'app/shared/resolvers/site.resolver';
import { ListMemberBanksResolver } from './resolvers/member-bank.resolver';
-import { ListMemberClassesResolver } from './resolvers/member-class.resolver';
+import { ListMemberClassesResolver } from 'app/shared/resolvers/member-class.resolver';
import { MemberGameSettingResolver } from './resolvers/member-game-setting.resolver';
import { ListMemberLevelsResolver } from './resolvers/member-level.resolver';
import { MemberSettlementResolver } from './resolvers/member-settlement-setting.resolver';
-import { MemberResolver, ListMemberResolver } from './resolvers/user.resolver';
-
export const userRoutes: Route[] = [
{
path: '',
diff --git a/src/app/modules/admin/member/user/resolvers/member-class.resolver.ts b/src/app/shared/resolvers/member-class.resolver.ts
similarity index 100%
rename from src/app/modules/admin/member/user/resolvers/member-class.resolver.ts
rename to src/app/shared/resolvers/member-class.resolver.ts
diff --git a/src/app/shared/resolvers/member.resolver.ts b/src/app/shared/resolvers/member.resolver.ts
new file mode 100644
index 0000000..c421ee1
--- /dev/null
+++ b/src/app/shared/resolvers/member.resolver.ts
@@ -0,0 +1,78 @@
+import { Injectable } from '@angular/core';
+import {
+ ActivatedRouteSnapshot,
+ Resolve,
+ Router,
+ RouterStateSnapshot,
+} from '@angular/router';
+import { MemberService } from 'app/modules/polyglot/member/services/member.service';
+import { ListMembersResponse } from 'app/modules/proto/c2se/member_pb';
+import { GetMemberResponse } from 'app/modules/proto/c2se/member_pb';
+
+import { Observable } from 'rxjs';
+
+@Injectable({
+ providedIn: 'root',
+})
+export class ListMemberResolver implements Resolve {
+ /**
+ * Constructor
+ */
+ constructor(private _router: Router, private _memberService: MemberService) {}
+
+ // -----------------------------------------------------------------------------------------------------
+ // @ Public methods
+ // -----------------------------------------------------------------------------------------------------
+
+ /**
+ * Resolver
+ *
+ * @param route
+ * @param state
+ */
+
+ resolve(
+ route: ActivatedRouteSnapshot,
+ state: RouterStateSnapshot
+ ):
+ | Observable
+ | Promise
+ | ListMembersResponse.Result {
+ return this._memberService.listMembers();
+ }
+}
+
+@Injectable({
+ providedIn: 'root',
+})
+export class MemberResolver implements Resolve {
+ /**
+ * Constructor
+ */
+ constructor(private _router: Router, private _memberService: MemberService) {}
+
+ // -----------------------------------------------------------------------------------------------------
+ // @ Public methods
+ // -----------------------------------------------------------------------------------------------------
+
+ /**
+ * Resolver
+ *
+ * @param route
+ * @param state
+ */
+
+ resolve(
+ route: ActivatedRouteSnapshot,
+ state: RouterStateSnapshot
+ ):
+ | Observable
+ | Promise
+ | GetMemberResponse.Result {
+ let memberId = route.paramMap.get('id');
+ if (!memberId) {
+ console.error('user.resolver memberId is null');
+ }
+ return this._memberService.getMember(memberId!);
+ }
+}