출금관리 리스트 완료
This commit is contained in:
parent
6bb671d3a5
commit
7c89e9f1ab
|
@ -113,8 +113,8 @@
|
|||
<div
|
||||
class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto"
|
||||
>
|
||||
<ng-container *ngIf="withdraws$ | async as withdraws">
|
||||
<ng-container *ngIf="withdraws.length > 0; else noWithdraw">
|
||||
<ng-container *ngIf="bankWithdraw$ | async as bankWithdraw">
|
||||
<ng-container *ngIf="bankWithdraw.length > 0; else noWithdraw">
|
||||
<div class="grid">
|
||||
<!-- Header -->
|
||||
<div
|
||||
|
@ -164,9 +164,13 @@
|
|||
<div class="hidden lg:block">삭제</div>
|
||||
</div>
|
||||
<!-- Rows -->
|
||||
<ng-container *ngIf="withdraws$ | async as withdraws">
|
||||
<ng-container *ngIf="bankWithdraw$ | async as bankWithdraw">
|
||||
<ng-container
|
||||
*ngFor="let withdraw of withdraws; trackBy: __trackByFn"
|
||||
*ngFor="
|
||||
let withdraw of bankWithdraw;
|
||||
trackBy: __trackByFn;
|
||||
let idx = index
|
||||
"
|
||||
>
|
||||
<div
|
||||
class="withdraw-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
|
||||
|
@ -176,44 +180,50 @@
|
|||
</div>
|
||||
|
||||
<div>
|
||||
{{ withdraw.highRank }}
|
||||
회원
|
||||
<hr style="margin: 7px 0px" />
|
||||
<div
|
||||
(click)="viewUserDetail(withdraw.id!)"
|
||||
(click)="viewUserDetail(withdraw.getMemberId())"
|
||||
style="cursor: pointer"
|
||||
>
|
||||
{{ withdraw.signinId }}
|
||||
test {{ idx }}
|
||||
</div>
|
||||
<hr style="margin: 7px 0px" />
|
||||
{{ withdraw.nickname }}
|
||||
test {{ idx }}
|
||||
</div>
|
||||
<!--환전신청금액-->
|
||||
<div>{{ withdraw.exchangeApplicationAmount }}</div>
|
||||
<div>{{ withdraw.getAccountNumber() }}</div>
|
||||
<!--정산종류-->
|
||||
<div>{{ withdraw.calculateType }}</div>
|
||||
<div>{{ idx % 2 === 0 ? "롤링" : "콤프" }}</div>
|
||||
|
||||
<div>
|
||||
<!-- 은행명, 계좌번호, 예금주-->
|
||||
{{ withdraw.rank }}
|
||||
{{ withdraw.getBankName() }}
|
||||
<hr style="margin: 7px 0px" />
|
||||
LV{{ withdraw.level }}
|
||||
LV{{ withdraw.getAccountNumber() }}
|
||||
<hr style="margin: 7px 0px" />
|
||||
{{ withdraw.accountHolder }}
|
||||
{{ withdraw.getName() }}
|
||||
</div>
|
||||
<!-- 비고 -->
|
||||
<div>{{ withdraw.note }}</div>
|
||||
<div [matTooltip]="__getMemoTooltop(withdraw)">@</div>
|
||||
|
||||
<!-- 등록날짜/처리날짜-->
|
||||
<div class="hidden md:block">
|
||||
{{ withdraw.registrationDate }}
|
||||
{{ withdraw.getCreatedAt() | date: "yyyy-MM-dd HH:mm" }}
|
||||
<hr style="margin: 7px 0px" />
|
||||
{{ withdraw.processDate }}
|
||||
{{
|
||||
withdraw.getStateChangedAt() | date: "yyyy-MM-dd HH:mm"
|
||||
}}
|
||||
</div>
|
||||
<!-- 입금/출금/보유금-->
|
||||
<div class="hidden md:block">
|
||||
{{ withdraw.deposit }}
|
||||
<span>41,200,000원</span>
|
||||
|
||||
<hr style="margin: 7px 0px" />
|
||||
{{ withdraw.withdraw }}
|
||||
<span>19,000,000원</span>
|
||||
|
||||
<hr style="margin: 7px 0px" />
|
||||
{{ withdraw.totalMoney }}
|
||||
<span>22,200,000원</span>
|
||||
</div>
|
||||
<div class="hidden lg:block">
|
||||
<button
|
||||
|
@ -221,7 +231,7 @@
|
|||
class="bet-mat-small-8"
|
||||
[color]="'primary'"
|
||||
>
|
||||
{{ withdraw.highRank }}
|
||||
[매장]kgon5
|
||||
</button>
|
||||
<hr style="margin: 7px 0px" />
|
||||
<button
|
||||
|
|
|
@ -22,6 +22,7 @@ import {
|
|||
map,
|
||||
merge,
|
||||
Observable,
|
||||
of,
|
||||
Subject,
|
||||
switchMap,
|
||||
takeUntil,
|
||||
|
@ -32,7 +33,9 @@ import { FuseConfirmationService } from '@fuse/services/confirmation';
|
|||
import { Withdraw } from '../models/withdraw';
|
||||
import { WithdrawPagination } from '../models/withdraw-pagination';
|
||||
import { WithdrawService } from '../services/withdraw.service';
|
||||
import { Router } from '@angular/router';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ListMemberBankWithdrawsResponse } from 'app/modules/proto/c2se/member_bank_withdraw_pb';
|
||||
import { MemberBankWithdraw } from 'app/modules/proto/models/member_bank_withdraw_pb';
|
||||
|
||||
@Component({
|
||||
selector: 'withdraw-list',
|
||||
|
@ -55,6 +58,10 @@ import { Router } from '@angular/router';
|
|||
grid-template-columns: 40px 140px auto 80px 140px 40px 120px 120px 120px 40px 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-tooltip {
|
||||
white-space: pre-line;
|
||||
}
|
||||
`,
|
||||
],
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
|
@ -65,7 +72,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
|
||||
@ViewChild(MatSort) private _sort!: MatSort;
|
||||
|
||||
withdraws$!: Observable<Withdraw[] | undefined>;
|
||||
bankWithdraw$!: Observable<MemberBankWithdraw[] | undefined>;
|
||||
|
||||
__isSearchOpened = false;
|
||||
isLoading = false;
|
||||
|
@ -79,6 +86,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
* Constructor
|
||||
*/
|
||||
constructor(
|
||||
private _activatedRoute: ActivatedRoute,
|
||||
private _changeDetectorRef: ChangeDetectorRef,
|
||||
private _fuseConfirmationService: FuseConfirmationService,
|
||||
private _formBuilder: FormBuilder,
|
||||
|
@ -106,7 +114,22 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
});
|
||||
|
||||
// Get the products
|
||||
this.withdraws$ = this._withdrawService.withdraws$;
|
||||
|
||||
this._activatedRoute.data.subscribe((data) => {
|
||||
let listBankWithdrawResult: ListMemberBankWithdrawsResponse.Result =
|
||||
data['bankWithdraw'];
|
||||
this.bankWithdraw$ = of(
|
||||
listBankWithdrawResult.getMemberBankWithdrawsList()
|
||||
);
|
||||
|
||||
console.log(
|
||||
'bankWithdraw: ',
|
||||
listBankWithdrawResult.getMemberBankWithdrawsList()
|
||||
);
|
||||
|
||||
// Mark for check
|
||||
this._changeDetectorRef.markForCheck();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -202,4 +225,13 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
__trackByFn(index: number, item: any): any {
|
||||
return item.id || index;
|
||||
}
|
||||
|
||||
__getMemoTooltop(withdraw: MemberBankWithdraw): string {
|
||||
if (!withdraw.getMemo() || withdraw.getMemo() === '') {
|
||||
return '메모없음';
|
||||
}
|
||||
|
||||
const resultMemoTooltip = withdraw.getMemo();
|
||||
return resultMemoTooltip;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@ import {
|
|||
Router,
|
||||
RouterStateSnapshot,
|
||||
} from '@angular/router';
|
||||
import { MemberBankWithdrawService } from 'app/modules/polyglot/member_bank_withdraw/services/member_bank_withdraw.service';
|
||||
import { ListMemberBankWithdrawsResponse } from 'app/modules/proto/c2se/member_bank_withdraw_pb';
|
||||
import { catchError, Observable, throwError } from 'rxjs';
|
||||
|
||||
import { Withdraw } from '../models/withdraw';
|
||||
|
@ -85,3 +87,33 @@ export class WithdrawsResolver implements Resolve<any> {
|
|||
return this._withdrawService.getWithdraws();
|
||||
}
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class BankWithdrawResolver implements Resolve<any> {
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
constructor(private _bankWithdrawService: MemberBankWithdrawService) {}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
// @ Public methods
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Resolver
|
||||
*
|
||||
* @param route
|
||||
* @param state
|
||||
*/
|
||||
resolve(
|
||||
route: ActivatedRouteSnapshot,
|
||||
state: RouterStateSnapshot
|
||||
):
|
||||
| Observable<ListMemberBankWithdrawsResponse.Result>
|
||||
| Promise<ListMemberBankWithdrawsResponse.Result>
|
||||
| ListMemberBankWithdrawsResponse.Result {
|
||||
return this._bankWithdrawService.listMemberBankWithdraws();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,10 @@ import { Route } from '@angular/router';
|
|||
import { ListComponent } from './components/list.component';
|
||||
import { ViewComponent } from '../../member/user/components/view.component';
|
||||
|
||||
import { WithdrawsResolver } from './resolvers/withdraw.resolver';
|
||||
import {
|
||||
BankWithdrawResolver,
|
||||
WithdrawsResolver,
|
||||
} from './resolvers/withdraw.resolver';
|
||||
import { UserResolver } from '../../dashboards/user/user.resolvers';
|
||||
|
||||
export const withdrawRoutes: Route[] = [
|
||||
|
@ -11,7 +14,7 @@ export const withdrawRoutes: Route[] = [
|
|||
path: '',
|
||||
component: ListComponent,
|
||||
resolve: {
|
||||
withdraws: WithdrawsResolver,
|
||||
bankWithdraw: BankWithdrawResolver,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user