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
|
<div
|
||||||
class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto"
|
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="bankDeposit$ | async as bankDeposit">
|
||||||
<ng-container *ngIf="deposits.length > 0; else noDeposit">
|
<ng-container *ngIf="bankDeposit.length > 0; else noDeposit">
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
<div
|
<div
|
||||||
|
@ -145,9 +145,13 @@
|
||||||
<div class="hidden lg:block">삭제</div>
|
<div class="hidden lg:block">삭제</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Rows -->
|
<!-- Rows -->
|
||||||
<ng-container *ngIf="deposits$ | async as deposits">
|
<ng-container *ngIf="bankDeposit$ | async as bankDeposit">
|
||||||
<ng-container
|
<ng-container
|
||||||
*ngFor="let deposit of deposits; trackBy: __trackByFn"
|
*ngFor="
|
||||||
|
let deposit of bankDeposit;
|
||||||
|
trackBy: __trackByFn;
|
||||||
|
let idx = index
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="deposit-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
|
class="deposit-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
|
||||||
|
@ -155,45 +159,55 @@
|
||||||
<div>
|
<div>
|
||||||
<mat-checkbox></mat-checkbox>
|
<mat-checkbox></mat-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<div>{{ deposit.highRank }}</div>
|
<!-- 상부 -->
|
||||||
|
<div>test {{ idx }}</div>
|
||||||
|
<!-- 아이디, 닉네임 -->
|
||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
(click)="viewUserDetail(deposit.id!)"
|
(click)="viewUserDetail(deposit.getMemberId())"
|
||||||
style="cursor: pointer"
|
style="cursor: pointer"
|
||||||
>
|
>
|
||||||
{{ deposit.signinId }}
|
test {{ idx }}
|
||||||
</div>
|
</div>
|
||||||
<hr style="margin: 7px 0px" />
|
<hr style="margin: 7px 0px" />
|
||||||
{{ deposit.nickname }}
|
test {{ idx }}
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 등급, 레벨, 상태 -->
|
||||||
<div>
|
<div>
|
||||||
{{ deposit.rank }}
|
test {{ idx }}
|
||||||
<hr style="margin: 7px 0px" />
|
<hr style="margin: 7px 0px" />
|
||||||
LV{{ deposit.level }}
|
test {{ idx }}
|
||||||
<hr style="margin: 7px 0px" />
|
<hr style="margin: 7px 0px" />
|
||||||
{{ deposit.state }}
|
test {{ idx }}
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 예금주 -->
|
||||||
<div class="hidden sm:block">
|
<div class="hidden sm:block">
|
||||||
{{ deposit.accountHolder }}
|
{{ deposit.getName() }}
|
||||||
</div>
|
</div>
|
||||||
<div>{{ deposit.calculateType }}</div>
|
<!-- 정산종류 -->
|
||||||
<div>{{ deposit.note }}</div>
|
<div>{{ idx % 2 === 0 ? "롤링" : "콤프" }}</div>
|
||||||
<div>{{ deposit.depositAmount }}</div>
|
<!-- 비고 -->
|
||||||
|
<div>test {{ idx }}</div>
|
||||||
|
<!-- 입금예정금액 -->
|
||||||
|
<div>test {{ idx }}</div>
|
||||||
|
<!-- 등록날짜, 처리날짜 -->
|
||||||
<div class="hidden md:block">
|
<div class="hidden md:block">
|
||||||
{{ deposit.registrationDate }}
|
{{ deposit.getCreatedAt() | date: "yyyy-MM-dd HH:mm" }}
|
||||||
<hr style="margin: 7px 0px" />
|
<hr style="margin: 7px 0px" />
|
||||||
{{ deposit.processDate }}
|
{{ deposit.getStateChangedAt() | date: "yyyy-MM-dd HH:mm" }}
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 입금, 출금 -->
|
||||||
<div class="hidden md:block">
|
<div class="hidden md:block">
|
||||||
입금{{ deposit.deposit }}
|
<span>41,200,000원</span>
|
||||||
|
|
||||||
<hr style="margin: 7px 0px" />
|
<hr style="margin: 7px 0px" />
|
||||||
출금{{ deposit.withdraw }}
|
<span>19,000,000원</span>
|
||||||
|
|
||||||
<hr style="margin: 7px 0px" />
|
<hr style="margin: 7px 0px" />
|
||||||
계{{ deposit.totalMoney }}
|
<span>22,200,000원</span>
|
||||||
</div>
|
|
||||||
<div class="hidden md:block">
|
|
||||||
{{ deposit.gameMoney }}
|
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 게임중머니 -->
|
||||||
|
<div class="hidden md:block">test {{ idx }}</div>
|
||||||
<div class="hidden lg:block">
|
<div class="hidden lg:block">
|
||||||
<button
|
<button
|
||||||
mat-flat-button
|
mat-flat-button
|
||||||
|
|
|
@ -22,6 +22,7 @@ import {
|
||||||
map,
|
map,
|
||||||
merge,
|
merge,
|
||||||
Observable,
|
Observable,
|
||||||
|
of,
|
||||||
Subject,
|
Subject,
|
||||||
switchMap,
|
switchMap,
|
||||||
takeUntil,
|
takeUntil,
|
||||||
|
@ -32,7 +33,9 @@ import { FuseConfirmationService } from '@fuse/services/confirmation';
|
||||||
import { Deposit } from '../models/deposit';
|
import { Deposit } from '../models/deposit';
|
||||||
import { DepositPagination } from '../models/deposit-pagination';
|
import { DepositPagination } from '../models/deposit-pagination';
|
||||||
import { DepositService } from '../services/deposit.service';
|
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({
|
@Component({
|
||||||
selector: 'deposit-list',
|
selector: 'deposit-list',
|
||||||
|
@ -69,7 +72,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;
|
||||||
|
|
||||||
deposits$!: Observable<Deposit[] | undefined>;
|
bankDeposit$!: Observable<MemberBankDeposit[] | undefined>;
|
||||||
|
|
||||||
__isSearchOpened = false;
|
__isSearchOpened = false;
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
|
@ -83,6 +86,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
constructor(
|
constructor(
|
||||||
|
private _activatedRoute: ActivatedRoute,
|
||||||
private _changeDetectorRef: ChangeDetectorRef,
|
private _changeDetectorRef: ChangeDetectorRef,
|
||||||
private _fuseConfirmationService: FuseConfirmationService,
|
private _fuseConfirmationService: FuseConfirmationService,
|
||||||
private _formBuilder: FormBuilder,
|
private _formBuilder: FormBuilder,
|
||||||
|
@ -110,7 +114,20 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Get the products
|
// 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 { ListComponent } from './components/list.component';
|
||||||
import { ViewComponent } from '../../member/user/components/view.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';
|
import { UserResolver } from '../../dashboards/user/user.resolvers';
|
||||||
|
|
||||||
export const depositRoutes: Route[] = [
|
export const depositRoutes: Route[] = [
|
||||||
|
@ -11,7 +14,7 @@ export const depositRoutes: Route[] = [
|
||||||
path: '',
|
path: '',
|
||||||
component: ListComponent,
|
component: ListComponent,
|
||||||
resolve: {
|
resolve: {
|
||||||
deposits: DepositsResolver,
|
bankDeposit: BankDepositResolver,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,6 +5,8 @@ import {
|
||||||
Router,
|
Router,
|
||||||
RouterStateSnapshot,
|
RouterStateSnapshot,
|
||||||
} from '@angular/router';
|
} 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 { catchError, Observable, throwError } from 'rxjs';
|
||||||
|
|
||||||
import { Deposit } from '../models/deposit';
|
import { Deposit } from '../models/deposit';
|
||||||
|
@ -85,3 +87,33 @@ export class DepositsResolver implements Resolve<any> {
|
||||||
return this._depositService.getDeposits();
|
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