Merge branch 'feature/BETERAN-BACKEND-APP-BROWSER-init' of https://gitlab.loafle.net/bet/beteran-backend-app-browser into feature/BETERAN-BACKEND-APP-BROWSER-init
This commit is contained in:
commit
9fef46d48b
|
@ -105,8 +105,8 @@
|
|||
<div
|
||||
class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto"
|
||||
>
|
||||
<ng-container *ngIf="deposits$ | async as deposits">
|
||||
<ng-container *ngIf="deposits.length > 0; else noDeposit">
|
||||
<ng-container *ngIf="bankDeposit$ | async as bankDeposit">
|
||||
<ng-container *ngIf="bankDeposit.length > 0; else noDeposit">
|
||||
<div class="grid">
|
||||
<!-- Header -->
|
||||
<div
|
||||
|
@ -145,9 +145,13 @@
|
|||
<div class="hidden lg:block">삭제</div>
|
||||
</div>
|
||||
<!-- Rows -->
|
||||
<ng-container *ngIf="deposits$ | async as deposits">
|
||||
<ng-container *ngIf="bankDeposit$ | async as bankDeposit">
|
||||
<ng-container
|
||||
*ngFor="let deposit of deposits; trackBy: __trackByFn"
|
||||
*ngFor="
|
||||
let deposit of bankDeposit;
|
||||
trackBy: __trackByFn;
|
||||
let idx = index
|
||||
"
|
||||
>
|
||||
<div
|
||||
class="deposit-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
|
||||
|
@ -155,45 +159,55 @@
|
|||
<div>
|
||||
<mat-checkbox></mat-checkbox>
|
||||
</div>
|
||||
<div>{{ deposit.highRank }}</div>
|
||||
<!-- 상부 -->
|
||||
<div>test {{ idx }}</div>
|
||||
<!-- 아이디, 닉네임 -->
|
||||
<div>
|
||||
<div
|
||||
(click)="viewUserDetail(deposit.id!)"
|
||||
(click)="viewUserDetail(deposit.getMemberId())"
|
||||
style="cursor: pointer"
|
||||
>
|
||||
{{ deposit.signinId }}
|
||||
test {{ idx }}
|
||||
</div>
|
||||
<hr style="margin: 7px 0px" />
|
||||
{{ deposit.nickname }}
|
||||
test {{ idx }}
|
||||
</div>
|
||||
<!-- 등급, 레벨, 상태 -->
|
||||
<div>
|
||||
{{ deposit.rank }}
|
||||
test {{ idx }}
|
||||
<hr style="margin: 7px 0px" />
|
||||
LV{{ deposit.level }}
|
||||
test {{ idx }}
|
||||
<hr style="margin: 7px 0px" />
|
||||
{{ deposit.state }}
|
||||
test {{ idx }}
|
||||
</div>
|
||||
<!-- 예금주 -->
|
||||
<div class="hidden sm:block">
|
||||
{{ deposit.accountHolder }}
|
||||
{{ deposit.getName() }}
|
||||
</div>
|
||||
<div>{{ deposit.calculateType }}</div>
|
||||
<div>{{ deposit.note }}</div>
|
||||
<div>{{ deposit.depositAmount }}</div>
|
||||
<!-- 정산종류 -->
|
||||
<div>{{ idx % 2 === 0 ? "롤링" : "콤프" }}</div>
|
||||
<!-- 비고 -->
|
||||
<div>test {{ idx }}</div>
|
||||
<!-- 입금예정금액 -->
|
||||
<div>test {{ idx }}</div>
|
||||
<!-- 등록날짜, 처리날짜 -->
|
||||
<div class="hidden md:block">
|
||||
{{ deposit.registrationDate }}
|
||||
{{ deposit.getCreatedAt() | date: "yyyy-MM-dd HH:mm" }}
|
||||
<hr style="margin: 7px 0px" />
|
||||
{{ deposit.processDate }}
|
||||
{{ deposit.getStateChangedAt() | date: "yyyy-MM-dd HH:mm" }}
|
||||
</div>
|
||||
<!-- 입금, 출금 -->
|
||||
<div class="hidden md:block">
|
||||
입금{{ deposit.deposit }}
|
||||
<span>41,200,000원</span>
|
||||
|
||||
<hr style="margin: 7px 0px" />
|
||||
출금{{ deposit.withdraw }}
|
||||
<span>19,000,000원</span>
|
||||
|
||||
<hr style="margin: 7px 0px" />
|
||||
계{{ deposit.totalMoney }}
|
||||
</div>
|
||||
<div class="hidden md:block">
|
||||
{{ deposit.gameMoney }}
|
||||
<span>22,200,000원</span>
|
||||
</div>
|
||||
<!-- 게임중머니 -->
|
||||
<div class="hidden md:block">test {{ idx }}</div>
|
||||
<div class="hidden lg:block">
|
||||
<button
|
||||
mat-flat-button
|
||||
|
|
|
@ -22,6 +22,7 @@ import {
|
|||
map,
|
||||
merge,
|
||||
Observable,
|
||||
of,
|
||||
Subject,
|
||||
switchMap,
|
||||
takeUntil,
|
||||
|
@ -32,7 +33,9 @@ import { FuseConfirmationService } from '@fuse/services/confirmation';
|
|||
import { Deposit } from '../models/deposit';
|
||||
import { DepositPagination } from '../models/deposit-pagination';
|
||||
import { DepositService } from '../services/deposit.service';
|
||||
import { Router } from '@angular/router';
|
||||
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';
|
||||
|
||||
@Component({
|
||||
selector: 'deposit-list',
|
||||
|
@ -69,7 +72,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
|
||||
@ViewChild(MatSort) private _sort!: MatSort;
|
||||
|
||||
deposits$!: Observable<Deposit[] | undefined>;
|
||||
bankDeposit$!: Observable<MemberBankDeposit[] | undefined>;
|
||||
|
||||
__isSearchOpened = false;
|
||||
isLoading = false;
|
||||
|
@ -83,6 +86,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
* Constructor
|
||||
*/
|
||||
constructor(
|
||||
private _activatedRoute: ActivatedRoute,
|
||||
private _changeDetectorRef: ChangeDetectorRef,
|
||||
private _fuseConfirmationService: FuseConfirmationService,
|
||||
private _formBuilder: FormBuilder,
|
||||
|
@ -110,7 +114,20 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
});
|
||||
|
||||
// Get the products
|
||||
this.deposits$ = this._depositService.deposits$;
|
||||
|
||||
this._activatedRoute.data.subscribe((data) => {
|
||||
let listBankDepositResult: ListMemberBankDepositsResponse.Result =
|
||||
data['bankDeposit'];
|
||||
this.bankDeposit$ = of(listBankDepositResult.getMemberBankDepositsList());
|
||||
|
||||
console.log(
|
||||
'bankWithdraw: ',
|
||||
listBankDepositResult.getMemberBankDepositsList()
|
||||
);
|
||||
|
||||
// Mark for check
|
||||
this._changeDetectorRef.markForCheck();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,7 +3,10 @@ import { Route } from '@angular/router';
|
|||
import { ListComponent } from './components/list.component';
|
||||
import { ViewComponent } from '../../member/user/components/view.component';
|
||||
|
||||
import { DepositsResolver } from './resolvers/deposit.resolver';
|
||||
import {
|
||||
BankDepositResolver,
|
||||
DepositsResolver,
|
||||
} from './resolvers/deposit.resolver';
|
||||
import { UserResolver } from '../../dashboards/user/user.resolvers';
|
||||
|
||||
export const depositRoutes: Route[] = [
|
||||
|
@ -11,7 +14,7 @@ export const depositRoutes: Route[] = [
|
|||
path: '',
|
||||
component: ListComponent,
|
||||
resolve: {
|
||||
deposits: DepositsResolver,
|
||||
bankDeposit: BankDepositResolver,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -5,6 +5,8 @@ import {
|
|||
Router,
|
||||
RouterStateSnapshot,
|
||||
} from '@angular/router';
|
||||
import { MemberBankDepositService } from 'app/modules/polyglot/member_bank_deposit/services/member_bank_deposit.service';
|
||||
import { ListMemberBankDepositsResponse } from 'app/modules/proto/c2se/member_bank_deposit_pb';
|
||||
import { catchError, Observable, throwError } from 'rxjs';
|
||||
|
||||
import { Deposit } from '../models/deposit';
|
||||
|
@ -85,3 +87,33 @@ export class DepositsResolver implements Resolve<any> {
|
|||
return this._depositService.getDeposits();
|
||||
}
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class BankDepositResolver implements Resolve<any> {
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
constructor(private _bankDepositService: MemberBankDepositService) {}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
// @ Public methods
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Resolver
|
||||
*
|
||||
* @param route
|
||||
* @param state
|
||||
*/
|
||||
resolve(
|
||||
route: ActivatedRouteSnapshot,
|
||||
state: RouterStateSnapshot
|
||||
):
|
||||
| Observable<ListMemberBankDepositsResponse.Result>
|
||||
| Promise<ListMemberBankDepositsResponse.Result>
|
||||
| ListMemberBankDepositsResponse.Result {
|
||||
return this._bankDepositService.listMemberBankDeposits();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user