This commit is contained in:
Park Byung Eun 2022-08-29 02:30:22 +00:00
parent b1b5b6f7fb
commit d9c39cbb7b
4 changed files with 76 additions and 21 deletions

View File

@ -221,35 +221,51 @@
</div> </div>
<!-- 구분 --> <!-- 구분 -->
<div> <div>
{{ __getMemberClassesByMemberId(deposit.getMemberId()) }} {{
__getMemberClassesByMemberId(deposit.getMember()?.getId())
}}
</div> </div>
<!-- 등급, 아이디, 닉네임 --> <!-- 등급, 아이디, 닉네임 -->
<div <div
(click)="viewUserDetail(deposit.getMemberId())" (click)="viewUserDetail(deposit.getMember()?.getId())"
style="cursor: pointer" style="cursor: pointer"
> >
{{ __getMemberLevelByMemberId(deposit.getMemberId()) }} {{
__getMemberLevelByMemberId(deposit.getMember()?.getId())
}}
<hr style="margin: 7px 0px" /> <hr style="margin: 7px 0px" />
<div> <div>
{{ {{
__getMemberById(deposit.getMemberId())?.getUsername() __getMemberById(
deposit.getMember()?.getId()
)?.getUsername()
}} }}
</div> </div>
<hr style="margin: 7px 0px" /> <hr style="margin: 7px 0px" />
{{ __getMemberById(deposit.getMemberId())?.getNickname() }} {{
__getMemberById(
deposit.getMember()?.getId()
)?.getNickname()
}}
</div> </div>
<!-- 입금예정금액, 은행, 예금주 --> <!-- 입금예정금액, 은행, 예금주 -->
<div> <div>
{{ deposit.getAmount() }} {{ deposit.getAmount() }}
<hr style="margin: 7px 0px" /> <hr style="margin: 7px 0px" />
{{ __getMemberBankByMemberId(deposit.getMemberId()) }} {{
__getMemberBankByMemberId(deposit.getMember()?.getId())
}}
<hr style="margin: 7px 0px" /> <hr style="margin: 7px 0px" />
{{ deposit.getName() }} {{ deposit.getName() }}
</div> </div>
<!-- 정산종류, 비고 --> <!-- 정산종류, 비고 -->
<div> <div>
{{ __getMemberSettlementByMemberId(deposit.getMemberId()) }} {{
__getMemberSettlementByMemberId(
deposit.getMember()?.getId()
)
}}
<hr style="margin: 7px 0px" /> <hr style="margin: 7px 0px" />
{{ deposit.getMemo() }} {{ deposit.getMemo() }}
</div> </div>
@ -298,7 +314,11 @@
class="bet-mat-small-8" class="bet-mat-small-8"
[color]="'primary'" [color]="'primary'"
> >
{{ __getMemberRefferByMemberId(deposit.getMemberId()) }} {{
__getMemberRefferByMemberId(
deposit.getMember()?.getId()
)
}}
</button> </button>
</div> </div>
<div class="hidden lg:block"> <div class="hidden lg:block">

View File

@ -42,6 +42,7 @@ import {
} from 'app/modules/proto/c2se/member_bank_deposit_pb'; } from 'app/modules/proto/c2se/member_bank_deposit_pb';
import { import {
MemberBankDeposit, MemberBankDeposit,
MemberBankDepositModel,
MemberBankDepositState, MemberBankDepositState,
} from 'app/modules/proto/models/member_bank_deposit_pb'; } from 'app/modules/proto/models/member_bank_deposit_pb';
import { MemberModel } from 'app/modules/proto/models/member_pb'; import { MemberModel } from 'app/modules/proto/models/member_pb';
@ -89,7 +90,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
listMember!: MemberModel[]; listMember!: MemberModel[];
memberClasses!: MemberClass[]; memberClasses!: MemberClass[];
bankDeposit$!: Observable<MemberBankDeposit[] | undefined>; bankDeposit$!: Observable<MemberBankDepositModel[] | undefined>;
__checkedDeposits: string[] = []; __checkedDeposits: string[] = [];
__isSearchOpened = false; __isSearchOpened = false;
@ -211,7 +212,10 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
// @ Public methods // @ Public methods
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
viewUserDetail(id: string): void { viewUserDetail(id: string | undefined): void {
if (!id) {
return;
}
let url: string = 'member/user/' + id; let url: string = 'member/user/' + id;
this.router.navigateByUrl(url); this.router.navigateByUrl(url);
} }
@ -289,7 +293,12 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
}); });
} }
__getMemberRefferByMemberId(memberId: string): string | undefined { __getMemberRefferByMemberId(
memberId: string | undefined
): string | undefined {
if (!memberId) {
return;
}
const member = this.__getMemberById(memberId); const member = this.__getMemberById(memberId);
if (!!member) { if (!!member) {
@ -306,7 +315,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
return undefined; return undefined;
} }
__getDepositState(deposit: MemberBankDeposit): string | undefined { __getDepositState(deposit: MemberBankDepositModel): string | undefined {
const state = deposit.getState(); const state = deposit.getState();
let result: string = ''; let result: string = '';
@ -314,6 +323,9 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
case MemberBankDepositState.APPLICATION: case MemberBankDepositState.APPLICATION:
result = '신청'; result = '신청';
break; break;
case MemberBankDepositState.PENDING:
result = '대기';
break;
case MemberBankDepositState.COMPLETE: case MemberBankDepositState.COMPLETE:
result = '완료'; result = '완료';
break; break;
@ -324,7 +336,13 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
return result; return result;
} }
__getMemberSettlementByMemberId(memberId: string): string | undefined { __getMemberSettlementByMemberId(
memberId: string | undefined
): string | undefined {
if (!memberId) {
return;
}
const member = this.__getMemberById(memberId); const member = this.__getMemberById(memberId);
if (!!member) { if (!!member) {
@ -334,7 +352,10 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
return undefined; return undefined;
} }
__getMemberLevelByMemberId(memberId: string): string | undefined { __getMemberLevelByMemberId(memberId: string | undefined): string | undefined {
if (!memberId) {
return;
}
const member = this.__getMemberById(memberId); const member = this.__getMemberById(memberId);
if (!!member) { if (!!member) {
@ -344,7 +365,10 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
return undefined; return undefined;
} }
__getMemberBankByMemberId(memberId: string): string | undefined { __getMemberBankByMemberId(memberId: string | undefined): string | undefined {
if (!memberId) {
return;
}
const member = this.__getMemberById(memberId); const member = this.__getMemberById(memberId);
if (!!member) { if (!!member) {
@ -354,7 +378,12 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
return undefined; return undefined;
} }
__getMemberClassesByMemberId(memberId: string): string | undefined { __getMemberClassesByMemberId(
memberId: string | undefined
): string | undefined {
if (!memberId) {
return;
}
const member = this.__getMemberById(memberId); const member = this.__getMemberById(memberId);
if (!!member) { if (!!member) {
@ -363,7 +392,10 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
return undefined; return undefined;
} }
__getMemberById(memberId: string): MemberModel | undefined { __getMemberById(memberId: string | undefined): MemberModel | undefined {
if (!memberId) {
return;
}
return this.listMember.find((v) => v.getId() === memberId); return this.listMember.find((v) => v.getId() === memberId);
} }
} }

View File

@ -206,7 +206,7 @@
회원 회원
<hr style="margin: 7px 0px" /> <hr style="margin: 7px 0px" />
<div <div
(click)="viewUserDetail(withdraw.getMemberId())" (click)="viewUserDetail(withdraw.getMember()!.getId())"
style="cursor: pointer" style="cursor: pointer"
> >
test {{ idx }} test {{ idx }}

View File

@ -35,7 +35,10 @@ import { WithdrawPagination } from '../models/withdraw-pagination';
import { WithdrawService } from '../services/withdraw.service'; import { WithdrawService } from '../services/withdraw.service';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { ListMemberBankWithdrawsResponse } from 'app/modules/proto/c2se/member_bank_withdraw_pb'; import { ListMemberBankWithdrawsResponse } from 'app/modules/proto/c2se/member_bank_withdraw_pb';
import { MemberBankWithdraw } from 'app/modules/proto/models/member_bank_withdraw_pb'; import {
MemberBankWithdraw,
MemberBankWithdrawModel,
} from 'app/modules/proto/models/member_bank_withdraw_pb';
@Component({ @Component({
selector: 'withdraw-list', selector: 'withdraw-list',
@ -72,7 +75,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild(MatPaginator) private _paginator!: MatPaginator; @ViewChild(MatPaginator) private _paginator!: MatPaginator;
@ViewChild(MatSort) private _sort!: MatSort; @ViewChild(MatSort) private _sort!: MatSort;
bankWithdraw$!: Observable<MemberBankWithdraw[] | undefined>; bankWithdraw$!: Observable<MemberBankWithdrawModel[] | undefined>;
__isSearchOpened = false; __isSearchOpened = false;
isLoading = false; isLoading = false;
@ -226,7 +229,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
return item.id || index; return item.id || index;
} }
__getMemoTooltop(withdraw: MemberBankWithdraw): string { __getMemoTooltop(withdraw: MemberBankWithdrawModel): string {
if (!withdraw.getMemo() || withdraw.getMemo() === '') { if (!withdraw.getMemo() || withdraw.getMemo() === '') {
return '메모없음'; return '메모없음';
} }