파트너 일일현황 수정
This commit is contained in:
parent
b9b9514bb3
commit
d6705efef5
|
@ -33,12 +33,32 @@ export class ReportDailyPartnerMockApi {
|
||||||
.reply(({ request }) => {
|
.reply(({ request }) => {
|
||||||
// Get available queries
|
// Get available queries
|
||||||
const search = request.params.get('search');
|
const search = request.params.get('search');
|
||||||
const sort = request.params.get('sort') || 'name';
|
const sort = request.params.get('sort') || 'lastDayHoldingMoney';
|
||||||
const order = request.params.get('order') || 'asc';
|
const order = request.params.get('order') || 'asc';
|
||||||
|
const page = parseInt(request.params.get('page') ?? '1', 10);
|
||||||
|
const size = parseInt(request.params.get('size') ?? '10', 10);
|
||||||
|
|
||||||
// Clone the dailyPartners
|
// Clone the dailyPartners
|
||||||
let dailyPartners: any[] | null = cloneDeep(this._dailyPartners);
|
let dailyPartners: any[] | null = cloneDeep(this._dailyPartners);
|
||||||
|
|
||||||
|
// Sort the dailys
|
||||||
|
if (
|
||||||
|
sort === 'lastDayHoldingMoney' ||
|
||||||
|
sort === 'memberCharge' ||
|
||||||
|
sort === 'memberExchange'
|
||||||
|
) {
|
||||||
|
dailyPartners.sort((a, b) => {
|
||||||
|
const fieldA = a[sort].toString().toUpperCase();
|
||||||
|
const fieldB = b[sort].toString().toUpperCase();
|
||||||
|
return order === 'asc'
|
||||||
|
? fieldA.localeCompare(fieldB)
|
||||||
|
: fieldB.localeCompare(fieldA);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
dailyPartners.sort((a, b) =>
|
||||||
|
order === 'asc' ? a[sort] - b[sort] : b[sort] - a[sort]
|
||||||
|
);
|
||||||
|
}
|
||||||
// If search exists...
|
// If search exists...
|
||||||
if (search) {
|
if (search) {
|
||||||
// Filter the dailyPartners
|
// Filter the dailyPartners
|
||||||
|
@ -49,6 +69,41 @@ export class ReportDailyPartnerMockApi {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Paginate - Start
|
||||||
|
const dailysLength = dailyPartners.length;
|
||||||
|
|
||||||
|
// Calculate pagination details
|
||||||
|
const begin = page * size;
|
||||||
|
const end = Math.min(size * (page + 1), dailysLength);
|
||||||
|
const lastPage = Math.max(Math.ceil(dailysLength / size), 1);
|
||||||
|
|
||||||
|
// Prepare the pagination object
|
||||||
|
let pagination = {};
|
||||||
|
|
||||||
|
// If the requested page number is bigger than
|
||||||
|
// the last possible page number, return null for
|
||||||
|
// dailys but also send the last possible page so
|
||||||
|
// the app can navigate to there
|
||||||
|
if (page > lastPage) {
|
||||||
|
dailyPartners = null;
|
||||||
|
pagination = {
|
||||||
|
lastPage,
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
// Paginate the results by size
|
||||||
|
dailyPartners = dailyPartners.slice(begin, end);
|
||||||
|
|
||||||
|
// Prepare the pagination mock-api
|
||||||
|
pagination = {
|
||||||
|
length: dailysLength,
|
||||||
|
size: size,
|
||||||
|
page: page,
|
||||||
|
lastPage: lastPage,
|
||||||
|
startIndex: begin,
|
||||||
|
endIndex: end - 1,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// Return the response
|
// Return the response
|
||||||
return [
|
return [
|
||||||
200,
|
200,
|
||||||
|
@ -61,21 +116,21 @@ export class ReportDailyPartnerMockApi {
|
||||||
// -----------------------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------------------
|
||||||
// @ DailyPartner - GET
|
// @ DailyPartner - GET
|
||||||
// -----------------------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------------------
|
||||||
// this._fuseMockApiService
|
this._fuseMockApiService
|
||||||
// .onGet('api/apps/report/daily-partner')
|
.onGet('api/apps/report/daily-partner')
|
||||||
// .reply(({ request }) => {
|
.reply(({ request }) => {
|
||||||
// // Get the id from the params
|
// Get the id from the params
|
||||||
// const id = request.params.get('id');
|
const id = request.params.get('id');
|
||||||
|
|
||||||
// // Clone the dailyPartners
|
// Clone the dailyPartners
|
||||||
// const dailyPartners = cloneDeep(this._dailyPartners);
|
const dailyPartners = cloneDeep(this._dailyPartners);
|
||||||
|
|
||||||
// // Find the dailyPartner
|
// Find the dailyPartner
|
||||||
// const dailyPartner = dailyPartners.find((item: any) => item.id === id);
|
const dailyPartner = dailyPartners.find((item: any) => item.id === id);
|
||||||
|
|
||||||
// // Return the response
|
// Return the response
|
||||||
// return [200, dailyPartner];
|
return [200, dailyPartner];
|
||||||
// });
|
});
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------------------
|
||||||
// @ DailyPartner - POST
|
// @ DailyPartner - POST
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,348 +1,230 @@
|
||||||
<div class="flex flex-col flex-auto min-w-0">
|
<div
|
||||||
<div class="flex-auto border-t -mt-px pt-4 sm:pt-6">
|
class="sm:absolute sm:inset-0 flex flex-col flex-auto min-w-0 sm:overflow-hidden bg-card dark:bg-transparent"
|
||||||
<div class="w-full max-w-screen-xl mx-auto">
|
>
|
||||||
<div class="grid grid-cols-1 sm:grid-cols-6 gap-6 w-full min-w-0">
|
<!-- Header -->
|
||||||
<!-- Budget distribution -->
|
<div
|
||||||
<div
|
class="relative flex flex-col sm:flex-row flex-0 sm:items-center sm:justify-between py-8 px-6 md:px-8 border-b"
|
||||||
class="sm:col-span-6 flex flex-col flex-auto p-6 bg-card shadow rounded-2xl overflow-hidden"
|
>
|
||||||
>
|
<!-- Loader -->
|
||||||
<div class="text-lg font-medium tracking-tight leading-6 truncate">
|
<div class="absolute inset-x-0 bottom-0" *ngIf="isLoading">
|
||||||
파트너일일현황
|
<mat-progress-bar [mode]="'indeterminate'"></mat-progress-bar>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<!-- Title -->
|
||||||
<!-- Section -->
|
<div class="text-4xl font-extrabold tracking-tight">파트너일일현황</div>
|
||||||
|
<!-- Actions -->
|
||||||
|
<div class="flex shrink-0 items-center mt-6 sm:mt-0 sm:ml-4">
|
||||||
|
<!-- Search -->
|
||||||
|
<button mat-icon-button (click)="__onClickSearch()">
|
||||||
|
<mat-icon [svgIcon]="'heroicons_outline:search'"></mat-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Search -->
|
||||||
|
<div
|
||||||
|
*ngIf="__isSearchOpened"
|
||||||
|
class="relative flex flex-col sm:flex-row flex-0 sm:items-center sm:justify-between py-4 px-6 md:px-8 border-b"
|
||||||
|
>
|
||||||
|
<!-- Actions -->
|
||||||
|
<div fxLayout="row wrap" class="items-center mt-6 sm:mt-0 sm:ml-0">
|
||||||
|
<!-- SelectBox -->
|
||||||
|
<mat-form-field fxFlex class="bet-mat-form-field-wrapper-mb-0 mr-2">
|
||||||
|
<mat-select placeholder="전체">
|
||||||
|
<mat-option value="">전체</mat-option>
|
||||||
|
<mat-option value="">파워볼</mat-option>
|
||||||
|
<mat-option value="">카지노</mat-option>
|
||||||
|
<mat-option value="">슬롯</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<!-- Search -->
|
||||||
|
<!-- Add user button -->
|
||||||
|
<button
|
||||||
|
mat-flat-button
|
||||||
|
[color]="'primary'"
|
||||||
|
fxFlex
|
||||||
|
(click)="__createProduct()"
|
||||||
|
>
|
||||||
|
<mat-icon [svgIcon]="'heroicons_outline:search'"></mat-icon>
|
||||||
|
<span class="ml-2 mr-1">Search</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<!-- Card inception -->
|
||||||
|
<div class="col-span-2 sm:col-span-1">
|
||||||
|
<mat-form-field
|
||||||
|
class="fuse-mat-no-subscript w-full"
|
||||||
|
[floatLabel]="'always'"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
matInput
|
||||||
|
[matDatepicker]="picker1"
|
||||||
|
[placeholder]="'Choose a date'"
|
||||||
|
/>
|
||||||
|
<mat-datepicker-toggle
|
||||||
|
matSuffix
|
||||||
|
[for]="picker1"
|
||||||
|
></mat-datepicker-toggle>
|
||||||
|
<mat-datepicker #picker1></mat-datepicker>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
<!-- Card expiration -->
|
||||||
|
<div class="col-span-2 sm:col-span-1">
|
||||||
|
<mat-form-field
|
||||||
|
class="fuse-mat-no-subscript w-full"
|
||||||
|
[floatLabel]="'always'"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
matInput
|
||||||
|
[matDatepicker]="picker2"
|
||||||
|
[placeholder]="'Choose a date'"
|
||||||
|
/>
|
||||||
|
<mat-datepicker-toggle
|
||||||
|
matSuffix
|
||||||
|
[for]="picker2"
|
||||||
|
></mat-datepicker-toggle>
|
||||||
|
<mat-datepicker #picker2></mat-datepicker>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="grid grid-cols-8 gap-6 w-full mt-8">
|
<div>
|
||||||
<!-- Card number -->
|
<button mat-flat-button class="bet-mat-small-8" [color]="'primary'">
|
||||||
<div class="col-span-2 sm:col-span-1">
|
어제
|
||||||
<mat-form-field class="fuse-mat-no-subscript w-full">
|
</button>
|
||||||
<mat-select
|
</div>
|
||||||
[value]="'전체'"
|
<div>
|
||||||
disableOptionCentering
|
<button mat-flat-button class="bet-mat-small-8" [color]="'primary'">
|
||||||
#roleSelect="matSelect"
|
오늘
|
||||||
>
|
</button>
|
||||||
<mat-select-trigger class="text-md">
|
</div>
|
||||||
<span class="ml-1 font-medium">{{
|
<div>
|
||||||
roleSelect.value | titlecase
|
<button mat-flat-button class="bet-mat-small-8" [color]="'primary'">
|
||||||
}}</span>
|
7일
|
||||||
</mat-select-trigger>
|
</button>
|
||||||
<ng-container *ngFor="let role of roles">
|
</div>
|
||||||
<mat-option
|
</div>
|
||||||
class="h-auto py-4 leading-none"
|
|
||||||
[value]="role.value"
|
<!-- Main -->
|
||||||
>
|
<div class="flex flex-auto overflow-hidden">
|
||||||
<div class="font-medium">{{ role.label }}</div>
|
<!-- Products list -->
|
||||||
</mat-option>
|
<div
|
||||||
</ng-container>
|
class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto"
|
||||||
</mat-select>
|
>
|
||||||
</mat-form-field>
|
<ng-container *ngIf="dailyPartners$ | async as dailyPartners">
|
||||||
|
<ng-container *ngIf="dailyPartners.length > 0; else noDailyPartner">
|
||||||
|
<div class="grid">
|
||||||
|
<!-- Header -->
|
||||||
|
<div
|
||||||
|
class="inventory-grid z-10 sticky top-0 grid gap-4 py-4 px-6 md:px-8 shadow text-md font-semibold text-secondary bg-gray-50 dark:bg-black dark:bg-opacity-5"
|
||||||
|
>
|
||||||
|
<div>요율</div>
|
||||||
|
<div>상부</div>
|
||||||
|
<div>
|
||||||
|
아이디
|
||||||
|
<hr style="margin: 7px 0px" />
|
||||||
|
닉네임
|
||||||
|
<hr style="margin: 7px 0px" />
|
||||||
|
연락처
|
||||||
</div>
|
</div>
|
||||||
<!-- Card inception -->
|
<div>
|
||||||
<div class="col-span-2 sm:col-span-1">
|
등급
|
||||||
<mat-form-field
|
<hr style="margin: 7px 0px" />
|
||||||
class="fuse-mat-no-subscript w-full"
|
레벨
|
||||||
[floatLabel]="'always'"
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
matInput
|
|
||||||
[matDatepicker]="picker1"
|
|
||||||
[placeholder]="'Choose a date'"
|
|
||||||
/>
|
|
||||||
<mat-datepicker-toggle
|
|
||||||
matSuffix
|
|
||||||
[for]="picker1"
|
|
||||||
></mat-datepicker-toggle>
|
|
||||||
<mat-datepicker #picker1></mat-datepicker>
|
|
||||||
</mat-form-field>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- Card expiration -->
|
<div class="hidden sm:block">예금주</div>
|
||||||
<div class="col-span-2 sm:col-span-1">
|
<div class="hidden md:block">보유금</div>
|
||||||
<mat-form-field
|
<div class="hidden md:block">
|
||||||
class="fuse-mat-no-subscript w-full"
|
게임중머니
|
||||||
[floatLabel]="'always'"
|
<hr style="margin: 7px 0px" />
|
||||||
>
|
금일콤프
|
||||||
<input
|
|
||||||
matInput
|
|
||||||
[matDatepicker]="picker2"
|
|
||||||
[placeholder]="'Choose a date'"
|
|
||||||
/>
|
|
||||||
<mat-datepicker-toggle
|
|
||||||
matSuffix
|
|
||||||
[for]="picker2"
|
|
||||||
></mat-datepicker-toggle>
|
|
||||||
<mat-datepicker #picker2></mat-datepicker>
|
|
||||||
</mat-form-field>
|
|
||||||
</div>
|
|
||||||
<!-- Actions -->
|
|
||||||
<div class="col-span-4 sm:col-span-4">
|
|
||||||
<div class="flex items-center mt-6 sm:mt-0 sm:ml-2 space-x-3">
|
|
||||||
<button
|
|
||||||
class="fuse-mat-button-rounded bg-accent-700"
|
|
||||||
mat-flat-button
|
|
||||||
[color]="'primary'"
|
|
||||||
>
|
|
||||||
<mat-icon
|
|
||||||
class="icon-size-5"
|
|
||||||
[svgIcon]="'heroicons_solid:mail'"
|
|
||||||
></mat-icon>
|
|
||||||
<span class="ml-2">검색하기</span>
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
class="fuse-mat-button-rounded"
|
|
||||||
mat-flat-button
|
|
||||||
[color]="'primary'"
|
|
||||||
>
|
|
||||||
<mat-icon
|
|
||||||
class="icon-size-5"
|
|
||||||
[svgIcon]="'heroicons_solid:mail'"
|
|
||||||
></mat-icon>
|
|
||||||
<span class="ml-2">어제</span>
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
class="fuse-mat-button-rounded"
|
|
||||||
mat-flat-button
|
|
||||||
[color]="'primary'"
|
|
||||||
>
|
|
||||||
<mat-icon
|
|
||||||
class="icon-size-5"
|
|
||||||
[svgIcon]="'heroicons_solid:cog'"
|
|
||||||
></mat-icon>
|
|
||||||
<span class="ml-2">오늘</span>
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
class="fuse-mat-button-rounded"
|
|
||||||
mat-flat-button
|
|
||||||
[color]="'primary'"
|
|
||||||
>
|
|
||||||
<mat-icon
|
|
||||||
class="icon-size-5"
|
|
||||||
[svgIcon]="'heroicons_solid:cog'"
|
|
||||||
></mat-icon>
|
|
||||||
<span class="ml-2">7일</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="hidden md:block">총입출</div>
|
||||||
|
<div class="hidden lg:block">카지노->캐쉬</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- Rows -->
|
||||||
<div class="flex flex-col flex-auto mt-2 overflow-x-auto">
|
<ng-container *ngIf="dailyPartners$ | async as dailyPartners">
|
||||||
<form [formGroup]="dailyParthnerForm" autocomplete="off">
|
<ng-container
|
||||||
<table
|
*ngFor="let dailyPartner of dailyPartners; trackBy: __trackByFn"
|
||||||
class="min-w-240 overflow-y-visible"
|
|
||||||
mat-table
|
|
||||||
[dataSource]="dailyPartnerDataSource"
|
|
||||||
>
|
>
|
||||||
<!-- 정보 -->
|
<div
|
||||||
<ng-container matColumnDef="partnerInfo">
|
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
|
||||||
<th mat-header-cell *matHeaderCellDef>정보</th>
|
>
|
||||||
<td mat-cell *matCellDef="let info">
|
<div>요율</div>
|
||||||
<span class="font-medium text-right">
|
<div>
|
||||||
{{ info?.user.signinId }}
|
{{ dailyPartner.highRank }}
|
||||||
</span>
|
</div>
|
||||||
<span class="font-medium text-right">
|
<div>
|
||||||
{{ info?.user.type }}
|
{{ dailyPartner.signinId }}
|
||||||
</span>
|
<hr style="margin: 7px 0px" />
|
||||||
<span class="font-medium text-right"> 매출보기 </span>
|
{{ dailyPartner.nickname }}
|
||||||
</td>
|
<hr style="margin: 7px 0px" />
|
||||||
</ng-container>
|
{{ dailyPartner.phoneNumber }}
|
||||||
<!-- 정보 -->
|
</div>
|
||||||
<ng-container matColumnDef="expansionBtn">
|
<div>
|
||||||
<th mat-header-cell *matHeaderCellDef></th>
|
{{ dailyPartner.rank }}
|
||||||
<td mat-cell *matCellDef="let info">+</td>
|
<hr style="margin: 7px 0px" />
|
||||||
</ng-container>
|
LV{{ dailyPartner.level }}
|
||||||
|
</div>
|
||||||
<!-- 정보 -->
|
<div class="hidden sm:block">
|
||||||
<!-- <ng-container matColumnDef="betInfo">
|
{{ dailyPartner.accountHolder }}
|
||||||
<th
|
</div>
|
||||||
mat-header-cell
|
<div class="hidden md:block">
|
||||||
*matHeaderCellDef
|
캐쉬{{ dailyPartner.ownCash }}
|
||||||
[attr.rowspan]="2"
|
<hr style="margin: 7px 0px" />
|
||||||
[attr.colspan]="2"
|
콤프{{ dailyPartner.ownComp }}P
|
||||||
></th>
|
<hr style="margin: 7px 0px" />
|
||||||
</ng-container> -->
|
쿠폰{{ dailyPartner.ownCoupon }}
|
||||||
|
</div>
|
||||||
<!-- 회원입출 -->
|
<div class="hidden md:block">
|
||||||
<ng-container matColumnDef="depositDetails">
|
{{ dailyPartner.gameMoney }}
|
||||||
<th mat-header-cell *matHeaderCellDef>회원입출</th>
|
<hr style="margin: 7px 0px" />
|
||||||
<td mat-cell *matCellDef="let info">
|
{{ dailyPartner.todayComp }}P
|
||||||
<span>{{ info?.bank.users.deposit }}</span>
|
</div>
|
||||||
<span>{{ info?.bank.users.withdraw }}</span>
|
<div class="hidden md:block">
|
||||||
<span>{{ info?.bank.users.netProfit }}</span>
|
입금{{ dailyPartner.totalDeposit }}
|
||||||
</td>
|
<hr style="margin: 7px 0px" />
|
||||||
</ng-container>
|
출금{{ dailyPartner.totalWithdraw }}
|
||||||
|
<hr style="margin: 7px 0px" />
|
||||||
<!-- 파트너입출 -->
|
차익{{ dailyPartner.balance }}
|
||||||
<ng-container matColumnDef="depositPartnerDetails">
|
</div>
|
||||||
<th mat-header-cell *matHeaderCellDef>파트너입출</th>
|
<div class="hidden lg:block">
|
||||||
<td mat-cell *matCellDef="let info">
|
<button
|
||||||
<span>{{ info?.bank.parthners.deposit }}</span>
|
mat-flat-button
|
||||||
<span>{{ info?.bank.parthners.withdraw }}</span>
|
class="bet-mat-small-8"
|
||||||
<span>{{ info?.bank.parthners.netProfit }}</span>
|
[color]="'primary'"
|
||||||
</td>
|
>
|
||||||
</ng-container>
|
게임머니확인
|
||||||
|
</button>
|
||||||
<!-- 총손익 -->
|
<hr style="margin: 7px 0px" />
|
||||||
<ng-container matColumnDef="totalProfit">
|
<button
|
||||||
<th mat-header-cell *matHeaderCellDef>총손익</th>
|
mat-flat-button
|
||||||
<td mat-cell *matCellDef="let info">
|
class="bet-mat-small-8"
|
||||||
{{ info?.bank.totalNetProfit }}
|
[color]="'primary'"
|
||||||
</td>
|
>
|
||||||
</ng-container>
|
게임머니회수
|
||||||
<!-- 수동머니 -->
|
</button>
|
||||||
<ng-container matColumnDef="passiveMoney">
|
</div>
|
||||||
<th mat-header-cell *matHeaderCellDef>수동머니</th>
|
</div>
|
||||||
<td mat-cell *matCellDef="let info">
|
</ng-container>
|
||||||
{{ info?.bank.passiveMoney }}
|
</ng-container>
|
||||||
</td>
|
|
||||||
</ng-container>
|
|
||||||
<!-- 수동콤프 -->
|
|
||||||
<ng-container matColumnDef="passiveComp">
|
|
||||||
<th mat-header-cell *matHeaderCellDef>수동콤프</th>
|
|
||||||
<td mat-cell *matCellDef="let info">
|
|
||||||
{{ info?.bank.passiveComp }}
|
|
||||||
</td>
|
|
||||||
</ng-container>
|
|
||||||
<!-- 배팅 -->
|
|
||||||
<ng-container matColumnDef="casinoBetDetails">
|
|
||||||
<th mat-header-cell *matHeaderCellDef>배팅</th>
|
|
||||||
<td mat-cell *matCellDef="let info">
|
|
||||||
{{ info?.bank.casino.betting }}
|
|
||||||
</td>
|
|
||||||
</ng-container>
|
|
||||||
<!-- 당첨 -->
|
|
||||||
<ng-container matColumnDef="casinoWinningDetails">
|
|
||||||
<th mat-header-cell *matHeaderCellDef>당첨</th>
|
|
||||||
<td mat-cell *matCellDef="let info">
|
|
||||||
{{ info?.bank.casino.bettingWin }}
|
|
||||||
</td>
|
|
||||||
</ng-container>
|
|
||||||
<!-- 윈로스(A) -->
|
|
||||||
<ng-container matColumnDef="casinoWinLoss">
|
|
||||||
<th mat-header-cell *matHeaderCellDef>윈로스(A)</th>
|
|
||||||
<td mat-cell *matCellDef="let info">
|
|
||||||
{{ info?.bank.casino.winLoss }}
|
|
||||||
</td>
|
|
||||||
</ng-container>
|
|
||||||
<!-- 수수료(B) -->
|
|
||||||
<ng-container matColumnDef="casinoCommission">
|
|
||||||
<th mat-header-cell *matHeaderCellDef>수수료(B)</th>
|
|
||||||
<td mat-cell *matCellDef="let info">
|
|
||||||
{{ info?.bank.casino.commission.total }}
|
|
||||||
</td>
|
|
||||||
</ng-container>
|
|
||||||
<!-- 벳윈정산(A-B) -->
|
|
||||||
<ng-container matColumnDef="casinoSettle">
|
|
||||||
<th mat-header-cell *matHeaderCellDef>벳윈정산(A-B)</th>
|
|
||||||
<td mat-cell *matCellDef="let info">
|
|
||||||
{{ info?.bank.casino.betWinSettle }}
|
|
||||||
</td>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<!-- 배팅 -->
|
|
||||||
<ng-container matColumnDef="slotBetDetails">
|
|
||||||
<th mat-header-cell *matHeaderCellDef>배팅</th>
|
|
||||||
<td mat-cell *matCellDef="let info">
|
|
||||||
{{ info?.bank.slot.betting }}
|
|
||||||
</td>
|
|
||||||
</ng-container>
|
|
||||||
<!-- 당첨 -->
|
|
||||||
<ng-container matColumnDef="slotWinningDetails">
|
|
||||||
<th mat-header-cell *matHeaderCellDef>당첨</th>
|
|
||||||
<td mat-cell *matCellDef="let info">
|
|
||||||
{{ info?.bank.slot.bettingWin }}
|
|
||||||
</td>
|
|
||||||
</ng-container>
|
|
||||||
<!-- 윈로스(D) -->
|
|
||||||
<ng-container matColumnDef="slotWinLoss">
|
|
||||||
<th mat-header-cell *matHeaderCellDef>윈로스(D)</th>
|
|
||||||
<td mat-cell *matCellDef="let info">
|
|
||||||
{{ info?.bank.slot.winLoss }}
|
|
||||||
</td>
|
|
||||||
</ng-container>
|
|
||||||
<!-- 수수료(E) -->
|
|
||||||
<ng-container matColumnDef="slotCommission">
|
|
||||||
<th mat-header-cell *matHeaderCellDef>수수료(E)</th>
|
|
||||||
<td mat-cell *matCellDef="let info">
|
|
||||||
{{ info?.bank.slot.commission.total }}
|
|
||||||
</td>
|
|
||||||
</ng-container>
|
|
||||||
<!-- 벳윈정산(A-B) -->
|
|
||||||
<ng-container matColumnDef="slotSettle">
|
|
||||||
<th mat-header-cell *matHeaderCellDef>벳윈정산(A-B)</th>
|
|
||||||
<td mat-cell *matCellDef="let info">
|
|
||||||
{{ info?.bank.slot.betWinSettle }}
|
|
||||||
</td>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<!-- 배팅 -->
|
|
||||||
<ng-container matColumnDef="powerballBetDetails">
|
|
||||||
<th mat-header-cell *matHeaderCellDef>배팅</th>
|
|
||||||
<td mat-cell *matCellDef="let info">
|
|
||||||
{{ info?.bank.powerball.betting }}
|
|
||||||
</td>
|
|
||||||
</ng-container>
|
|
||||||
<!-- 당첨 -->
|
|
||||||
<ng-container matColumnDef="powerballWinningDetails">
|
|
||||||
<th mat-header-cell *matHeaderCellDef>당첨</th>
|
|
||||||
<td mat-cell *matCellDef="let info">
|
|
||||||
{{ info?.bank.powerball.bettingWin }}
|
|
||||||
</td>
|
|
||||||
</ng-container>
|
|
||||||
<!-- 윈로스(G) -->
|
|
||||||
<ng-container matColumnDef="powerballWinLoss">
|
|
||||||
<th mat-header-cell *matHeaderCellDef>윈로스(G)</th>
|
|
||||||
<td mat-cell *matCellDef="let info">
|
|
||||||
{{ info?.bank.powerball.winLoss }}
|
|
||||||
</td>
|
|
||||||
</ng-container>
|
|
||||||
<!-- 수수료(G) -->
|
|
||||||
<ng-container matColumnDef="powerballCommission">
|
|
||||||
<th mat-header-cell *matHeaderCellDef>수수료(H)</th>
|
|
||||||
<td mat-cell *matCellDef="let info">
|
|
||||||
{{ info?.bank.powerball.commission.total }}
|
|
||||||
</td>
|
|
||||||
</ng-container>
|
|
||||||
<!-- 벳윈정산(G-H) -->
|
|
||||||
<ng-container matColumnDef="powerballSettle">
|
|
||||||
<th mat-header-cell *matHeaderCellDef>벳윈정산(G-H)</th>
|
|
||||||
<td mat-cell *matCellDef="let info">
|
|
||||||
{{ info?.bank.powerball.betWinSettle }}
|
|
||||||
</td>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<!-- 총벳윈정산 -->
|
|
||||||
<ng-container matColumnDef="totalBetWinSettle">
|
|
||||||
<th mat-header-cell *matHeaderCellDef>총벳윈정산</th>
|
|
||||||
<td mat-cell *matCellDef="let info">
|
|
||||||
{{ info?.totalBetSettle }}
|
|
||||||
</td>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<!-- Header row second group -->
|
|
||||||
<ng-container matColumnDef="header-row-info-group">
|
|
||||||
<th
|
|
||||||
mat-header-cell
|
|
||||||
*matHeaderCellDef
|
|
||||||
[attr.colspan]="2"
|
|
||||||
[attr.rowspan]="2"
|
|
||||||
>
|
|
||||||
Second group
|
|
||||||
</th>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<!-- <tr mat-header-row *matHeaderRowDef="['betInfo']"></tr> -->
|
|
||||||
<tr
|
|
||||||
mat-header-row
|
|
||||||
*matHeaderRowDef="dailyPartnerTableColumns"
|
|
||||||
></tr>
|
|
||||||
<tr
|
|
||||||
mat-row
|
|
||||||
*matRowDef="let row; columns: dailyPartnerTableColumns"
|
|
||||||
></tr>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<mat-paginator
|
||||||
|
class="sm:absolute sm:inset-x-0 sm:bottom-0 border-b sm:border-t sm:border-b-0 z-10 bg-gray-50 dark:bg-transparent"
|
||||||
|
[ngClass]="{ 'pointer-events-none': isLoading }"
|
||||||
|
[length]="pagination?.length"
|
||||||
|
[pageIndex]="pagination?.page"
|
||||||
|
[pageSize]="pagination?.size"
|
||||||
|
[pageSizeOptions]="[5, 10, 25, 100]"
|
||||||
|
[showFirstLastButtons]="true"
|
||||||
|
></mat-paginator>
|
||||||
|
</ng-container>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<ng-template #noDailyPartner>
|
||||||
|
<div
|
||||||
|
class="p-8 sm:p-16 border-t text-4xl font-semibold tracking-tight text-center"
|
||||||
|
>
|
||||||
|
There are no data!
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</ng-template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -14,7 +14,8 @@ import {
|
||||||
FormGroup,
|
FormGroup,
|
||||||
Validators,
|
Validators,
|
||||||
} from '@angular/forms';
|
} from '@angular/forms';
|
||||||
|
import { MatPaginator } from '@angular/material/paginator';
|
||||||
|
import { MatSort } from '@angular/material/sort';
|
||||||
import {
|
import {
|
||||||
debounceTime,
|
debounceTime,
|
||||||
map,
|
map,
|
||||||
|
@ -24,9 +25,6 @@ import {
|
||||||
switchMap,
|
switchMap,
|
||||||
takeUntil,
|
takeUntil,
|
||||||
} from 'rxjs';
|
} from 'rxjs';
|
||||||
|
|
||||||
import { MatTableDataSource } from '@angular/material/table';
|
|
||||||
|
|
||||||
import { fuseAnimations } from '@fuse/animations';
|
import { fuseAnimations } from '@fuse/animations';
|
||||||
import { FuseConfirmationService } from '@fuse/services/confirmation';
|
import { FuseConfirmationService } from '@fuse/services/confirmation';
|
||||||
|
|
||||||
|
@ -64,46 +62,20 @@ import { Router } from '@angular/router';
|
||||||
animations: fuseAnimations,
|
animations: fuseAnimations,
|
||||||
})
|
})
|
||||||
export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
|
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
|
||||||
|
@ViewChild(MatSort) private _sort!: MatSort;
|
||||||
|
|
||||||
dailyPartners$!: Observable<any | undefined>;
|
dailyPartners$!: Observable<any | undefined>;
|
||||||
users$!: Observable<User[] | undefined>;
|
users$!: Observable<User[] | undefined>;
|
||||||
|
|
||||||
|
__isSearchOpened = false;
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
searchInputControl = new FormControl();
|
searchInputControl = new FormControl();
|
||||||
selectedDailyPartner?: DailyPartner;
|
selectedDailyPartner?: DailyPartner;
|
||||||
|
pagination?: DailyPartnerPagination;
|
||||||
|
|
||||||
dailyParthnerForm!: FormGroup;
|
|
||||||
|
|
||||||
dailyPartnerDataSource: MatTableDataSource<any> = new MatTableDataSource();
|
|
||||||
dailyPartnerTableColumns: string[] = [
|
|
||||||
'partnerInfo',
|
|
||||||
'expansionBtn',
|
|
||||||
'depositDetails',
|
|
||||||
'depositPartnerDetails',
|
|
||||||
'totalProfit',
|
|
||||||
'passiveMoney',
|
|
||||||
'passiveComp',
|
|
||||||
'casinoBetDetails',
|
|
||||||
'casinoWinningDetails',
|
|
||||||
'casinoWinLoss',
|
|
||||||
'casinoCommission',
|
|
||||||
'casinoSettle',
|
|
||||||
'slotBetDetails',
|
|
||||||
'slotWinningDetails',
|
|
||||||
'slotWinLoss',
|
|
||||||
'slotCommission',
|
|
||||||
'slotSettle',
|
|
||||||
'powerballBetDetails',
|
|
||||||
'powerballWinningDetails',
|
|
||||||
'powerballWinLoss',
|
|
||||||
'powerballCommission',
|
|
||||||
'powerballSettle',
|
|
||||||
'totalBetWinSettle',
|
|
||||||
];
|
|
||||||
private _unsubscribeAll: Subject<any> = new Subject<any>();
|
private _unsubscribeAll: Subject<any> = new Subject<any>();
|
||||||
|
|
||||||
roles: any[];
|
|
||||||
roles2: any[];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
|
@ -113,37 +85,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
private _formBuilder: FormBuilder,
|
private _formBuilder: FormBuilder,
|
||||||
private _dailyPartnerService: DailyPartnerService,
|
private _dailyPartnerService: DailyPartnerService,
|
||||||
private router: Router
|
private router: Router
|
||||||
) {
|
) {}
|
||||||
this.roles = [
|
|
||||||
{
|
|
||||||
label: '전체',
|
|
||||||
value: '전체',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '파워볼',
|
|
||||||
value: '파워볼',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '카지노',
|
|
||||||
value: '카지노',
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
label: '슬롯',
|
|
||||||
value: '슬롯',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
this.roles2 = [
|
|
||||||
{
|
|
||||||
label: '회원아이디',
|
|
||||||
value: '전체',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '닉네임',
|
|
||||||
value: '파워볼',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------------------
|
||||||
// @ Lifecycle hooks
|
// @ Lifecycle hooks
|
||||||
|
@ -153,27 +95,63 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
* On init
|
* On init
|
||||||
*/
|
*/
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.dailyParthnerForm = this._formBuilder.group({
|
|
||||||
bankName: [''],
|
|
||||||
accountNumber: [''],
|
|
||||||
accountHolder: [''],
|
|
||||||
});
|
|
||||||
// Get the pagination
|
// Get the pagination
|
||||||
this._dailyPartnerService
|
this._dailyPartnerService.pagination$
|
||||||
.getDailyPartners()
|
|
||||||
.pipe(takeUntil(this._unsubscribeAll))
|
.pipe(takeUntil(this._unsubscribeAll))
|
||||||
.subscribe((dailyPartners: any) => {
|
.subscribe((pagination: DailyPartnerPagination | undefined) => {
|
||||||
|
// Update the pagination
|
||||||
|
this.pagination = pagination;
|
||||||
|
|
||||||
// Mark for check
|
// Mark for check
|
||||||
this.dailyPartnerDataSource = dailyPartners.dailyPartners;
|
|
||||||
console.log(dailyPartners);
|
|
||||||
this._changeDetectorRef.markForCheck();
|
this._changeDetectorRef.markForCheck();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Get the products
|
||||||
|
this.dailyPartners$ = this._dailyPartnerService.dailyPartners$;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* After view init
|
* After view init
|
||||||
*/
|
*/
|
||||||
ngAfterViewInit(): void {}
|
ngAfterViewInit(): void {
|
||||||
|
if (this._sort && this._paginator) {
|
||||||
|
// Set the initial sort
|
||||||
|
this._sort.sort({
|
||||||
|
id: 'lastDayHoldingMoney',
|
||||||
|
start: 'asc',
|
||||||
|
disableClear: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
// Mark for check
|
||||||
|
this._changeDetectorRef.markForCheck();
|
||||||
|
|
||||||
|
// If the daily changes the sort order...
|
||||||
|
this._sort.sortChange
|
||||||
|
.pipe(takeUntil(this._unsubscribeAll))
|
||||||
|
.subscribe(() => {
|
||||||
|
// Reset back to the first page
|
||||||
|
this._paginator.pageIndex = 0;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Get products if sort or page changes
|
||||||
|
merge(this._sort.sortChange, this._paginator.page)
|
||||||
|
.pipe(
|
||||||
|
switchMap(() => {
|
||||||
|
this.isLoading = true;
|
||||||
|
return this._dailyPartnerService.getDailyPartners(
|
||||||
|
this._paginator.pageIndex,
|
||||||
|
this._paginator.pageSize,
|
||||||
|
this._sort.active,
|
||||||
|
this._sort.direction
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
map(() => {
|
||||||
|
this.isLoading = false;
|
||||||
|
})
|
||||||
|
)
|
||||||
|
.subscribe();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* On destroy
|
* On destroy
|
||||||
|
@ -208,6 +186,14 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
*/
|
*/
|
||||||
__toggleDetails(productId: string): void {}
|
__toggleDetails(productId: string): void {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* toggle the search
|
||||||
|
* Used in 'bar'
|
||||||
|
*/
|
||||||
|
__onClickSearch(): void {
|
||||||
|
this.__isSearchOpened = !this.__isSearchOpened;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Track by function for ngFor loops
|
* Track by function for ngFor loops
|
||||||
*
|
*
|
||||||
|
@ -217,7 +203,4 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
__trackByFn(index: number, item: any): any {
|
__trackByFn(index: number, item: any): any {
|
||||||
return item.id || index;
|
return item.id || index;
|
||||||
}
|
}
|
||||||
__testData(info: any): any {
|
|
||||||
console.log(info);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,29 +1,38 @@
|
||||||
export interface DailyPartner {
|
export interface DailyPartner {
|
||||||
id?: string;
|
id: string;
|
||||||
totalPartnerCount?: number;
|
signinId?: string;
|
||||||
totalHoldingMoney?: number;
|
rank?: string;
|
||||||
totalComp?: number;
|
|
||||||
total?: number;
|
|
||||||
branchCount?: number;
|
|
||||||
divisionCount?: number;
|
|
||||||
officeCount?: number;
|
|
||||||
storeCount?: number;
|
|
||||||
memberCount?: number;
|
|
||||||
nickname?: string;
|
nickname?: string;
|
||||||
accountHolder?: string;
|
memberCharge?: number; // 회원충전
|
||||||
phoneNumber?: string;
|
memberExchange?: number; // 회원환전
|
||||||
calculateType?: string;
|
memberProfitLoss?: number; // 회원손익
|
||||||
ownCash?: number;
|
partnerCharge?: number; // 파트너충전
|
||||||
ownComp?: number;
|
partnerExchange?: number; // 파트너환전
|
||||||
ownCoupon?: number;
|
partnerProfitLoss?: number; // 파트너손익
|
||||||
gameMoney?: number;
|
totalProfitLoss?: number; // 전체손익
|
||||||
todayComp?: number;
|
passiveMoney?: number;
|
||||||
totalDeposit?: number;
|
passiveComp?: number;
|
||||||
totalWithdraw?: number;
|
casinoBetting?: number; // 카지노배팅
|
||||||
balance?: number;
|
casinoTie?: number; // 카지노타이
|
||||||
registDate?: string;
|
casinoCancel?: number; // 카지노취소
|
||||||
finalSigninDate?: string;
|
casinoAvailable?: number; // 카지노유효
|
||||||
ip?: string;
|
casinoWinning?: number; // 카지노당첨
|
||||||
state?: string;
|
casinoWinLoss?: number; // 카지노윈로스(A)
|
||||||
note?: string;
|
casinoCommission?: number; // 카지노수수료(B)
|
||||||
|
casinoBetWinCalculate?: number; // 카지노벳윈정산 (A-B)
|
||||||
|
slotBetting?: number; // 슬롯배팅
|
||||||
|
slotCancel?: number; // 슬롯취소
|
||||||
|
slotAvailable?: number; // 슬롯유효
|
||||||
|
slotWinning?: number; // 슬롯당첨
|
||||||
|
slotWinLoss?: number; // 슬롯윈로스(D)
|
||||||
|
slotTotalCommission?: number; // 슬롯전체수수료(E)
|
||||||
|
slotBottomCommission?: number; // 슬롯하부수수료(E)
|
||||||
|
slotOwnCommission?: number; // 슬롯본인수수료(E)
|
||||||
|
slotBetWinCalculate?: number; // 슬롯벳윈정산(D-E)
|
||||||
|
powerballBetting?: number; // 파워볼배팅
|
||||||
|
powerballWinning?: number; // 파워볼당첨
|
||||||
|
powerballWinLoss?: number; // 파워볼윈로스(H)
|
||||||
|
powerballCommission?: number; // 파워볼수수료(I)
|
||||||
|
powerballBetWinCalculate?: number; // 파워볼벳윈정산(H-I)
|
||||||
|
totalBetWinCalculate?: number; // 총벳윈정산
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,8 +81,9 @@ export class DailyPartnersResolver implements Resolve<any> {
|
||||||
route: ActivatedRouteSnapshot,
|
route: ActivatedRouteSnapshot,
|
||||||
state: RouterStateSnapshot
|
state: RouterStateSnapshot
|
||||||
): Observable<{
|
): Observable<{
|
||||||
|
pagination: DailyPartnerPagination;
|
||||||
dailyPartners: DailyPartner[];
|
dailyPartners: DailyPartner[];
|
||||||
}> {
|
}> {
|
||||||
return this._dailyPartnerService.getDailyPartners('');
|
return this._dailyPartnerService.getDailyPartners();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,19 +74,32 @@ export class DailyPartnerService {
|
||||||
* @param order
|
* @param order
|
||||||
* @param search
|
* @param search
|
||||||
*/
|
*/
|
||||||
getDailyPartners(search: string = ''): Observable<{
|
getDailyPartners(
|
||||||
dailyPartners: any;
|
page: number = 0,
|
||||||
|
size: number = 10,
|
||||||
|
sort: string = 'name',
|
||||||
|
order: 'asc' | 'desc' | '' = 'asc',
|
||||||
|
search: string = ''
|
||||||
|
): Observable<{
|
||||||
|
pagination: DailyPartnerPagination;
|
||||||
|
dailyPartners: DailyPartner[];
|
||||||
}> {
|
}> {
|
||||||
return this._httpClient
|
return this._httpClient
|
||||||
.get<{
|
.get<{
|
||||||
dailyPartners: any;
|
pagination: DailyPartnerPagination;
|
||||||
}>('api/apps/report/daily-partner', {
|
dailyPartners: DailyPartner[];
|
||||||
|
}>('api/apps/report/daily-partner/daily-partners', {
|
||||||
params: {
|
params: {
|
||||||
|
page: '' + page,
|
||||||
|
size: '' + size,
|
||||||
|
sort,
|
||||||
|
order,
|
||||||
search,
|
search,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.pipe(
|
.pipe(
|
||||||
tap((response) => {
|
tap((response) => {
|
||||||
|
this.__pagination.next(response.pagination);
|
||||||
this.__dailyPartners.next(response.dailyPartners);
|
this.__dailyPartners.next(response.dailyPartners);
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user