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:
Park Byung Eun 2022-08-01 08:03:37 +00:00
commit b4643ed501
6 changed files with 178 additions and 322 deletions

View File

@ -33,7 +33,7 @@ export class ReportMoneyLogMockApi {
.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') || 'signinId';
const order = request.params.get('order') || 'asc'; const order = request.params.get('order') || 'asc';
const page = parseInt(request.params.get('page') ?? '1', 10); const page = parseInt(request.params.get('page') ?? '1', 10);
const size = parseInt(request.params.get('size') ?? '10', 10); const size = parseInt(request.params.get('size') ?? '10', 10);
@ -42,7 +42,7 @@ export class ReportMoneyLogMockApi {
let moneyLogs: any[] | null = cloneDeep(this._moneyLogs); let moneyLogs: any[] | null = cloneDeep(this._moneyLogs);
// Sort the moneyLogs // Sort the moneyLogs
if (sort === 'sku' || sort === 'name' || sort === 'active') { if (sort === 'signinId' || sort === 'nickname' || sort === 'momo') {
moneyLogs.sort((a, b) => { moneyLogs.sort((a, b) => {
const fieldA = a[sort].toString().toUpperCase(); const fieldA = a[sort].toString().toUpperCase();
const fieldB = b[sort].toString().toUpperCase(); const fieldB = b[sort].toString().toUpperCase();

View File

@ -2,32 +2,39 @@
export const moneyLogs = [ export const moneyLogs = [
{ {
id: 'on00', id: '7eb7c859-1347-4317-96b6-9476a7e2ba3c',
totalPartnerCount: '5', finalSigninDate: '2022-06-21 16:17:30',
totalHoldingMoney: 303675, signinId: 'aa100',
totalComp: 108933, nickname: 'aa100',
total: 412608, history: '[출금]카지노 게임 입금',
branchCount: 1, beforeMoney: 67131,
divisionCount: 1, changeMoney: -67131,
officeCount: 1, afterMoney: 0,
storeCount: 1, memo: '',
memberCount: 1, bettingNumber: 0,
nickname: 'on00', },
accountHolder: '11', {
phoneNumber: '010-1111-1111', id: '00b0292f-3d50-4669-a0c4-7a9d85efc98d',
calculateType: '롤링', finalSigninDate: '2022-06-19 22:03:10',
ownCash: 50000, signinId: 'aa100',
ownComp: 1711, nickname: 'aa100',
ownCoupon: 50000, history: '[입금]카지노 게임 출금',
gameMoney: 0, beforeMoney: 0,
todayComp: 0, changeMoney: 67131,
totalDeposit: 0, afterMoney: 67131,
totalWithdraw: 0, memo: '',
balance: 0, bettingNumber: 0,
registDate: '2022-06-12 15:38', },
finalSigninDate: '', {
ip: '', id: 'b899ec30-b85a-40ab-bb1f-18a596d5c6de',
state: '정상', finalSigninDate: '2022-06-17 16:27:03',
note: '', signinId: 'onon6',
nickname: '가가가',
history: '[회수]관리자차감',
beforeMoney: 263737,
changeMoney: -263737,
afterMoney: 0,
memo: '',
bettingNumber: 0,
}, },
]; ];

View File

@ -10,113 +10,73 @@
<mat-progress-bar [mode]="'indeterminate'"></mat-progress-bar> <mat-progress-bar [mode]="'indeterminate'"></mat-progress-bar>
</div> </div>
<!-- Title --> <!-- Title -->
<div class="text-4xl font-extrabold tracking-tight">머니 활동 Logs</div> <div class="text-4xl font-extrabold tracking-tight">머니활동 Logs</div>
<!-- Actions --> <!-- Actions -->
<div class="flex shrink-0 items-center mt-6 sm:mt-0 sm:ml-4"> <div class="flex shrink-0 items-center mt-6 sm:mt-0 sm:ml-4">
<!-- Memo --> <!-- Search -->
<!-- <mat-form-field> <button mat-icon-button (click)="__onClickSearch()">
<ng-container *ngIf="moneyLogs$ | async as moneyLogs"> <mat-icon [svgIcon]="'heroicons_outline:search'"></mat-icon>
<ng-container </button>
*ngFor="let moneyLog of moneyLogs; trackBy: __trackByFn" </div>
> </div>
<div <!-- Search -->
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b" <div
> *ngIf="__isSearchOpened"
<fieldset> 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"
총 파트너수:{{ moneyLog.totalPartnerCount }} 총 보유머니:{{ >
moneyLog.totalHoldingMoney <!-- Actions -->
}} <div fxLayout="row wrap" class="items-center mt-6 sm:mt-0 sm:ml-0">
총 콤프:{{ moneyLog.totalComp }} 총 합계:{{
moneyLog.total
}}
</fieldset>
</div>
</ng-container>
</ng-container>
</mat-form-field> -->
<!-- SelectBox --> <!-- SelectBox -->
<mat-form-field> <mat-form-field fxFlex class="bet-mat-form-field-wrapper-mb-0 mr-2">
<mat-select placeholder="리스트수"> <mat-select placeholder="검색어">
<mat-option value="40">40</mat-option> <mat-option value="">검색어</mat-option>
<mat-option value="60">60</mat-option>
<mat-option value="80">80</mat-option>
<mat-option value="100">100</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="레벨">
<mat-option value="level1">LV.1</mat-option>
<mat-option value="level2">LV.2</mat-option>
<mat-option value="level3">LV.3</mat-option>
<mat-option value="level4">LV.4</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="상태">
<mat-option value="">정상</mat-option>
<mat-option value="">대기</mat-option>
<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>
<mat-form-field>
<mat-select placeholder="제한">
<mat-option value="">카지노제한</mat-option>
<mat-option value="">슬롯제한</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="입금">
<mat-option value="">계좌입금</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<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>
<!-- <mat-form-field>
<mat-select placeholder="입금">
<mat-option value="">계좌입금</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="아이디">
<mat-option value="">아이디</mat-option> <mat-option value="">아이디</mat-option>
<mat-option value="">닉네임</mat-option> <mat-option value="">닉네임</mat-option>
<mat-option value="">이름</mat-option> <mat-option value="">처리내역</mat-option>
<mat-option value="">사이트</mat-option> <mat-option value="">관리자지급</mat-option>
<mat-option value="">파트너수동지급</mat-option> <mat-option value="">관리자회수</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field> <!-- Card inception -->
<mat-select placeholder="가입일 정렬"> <div class="col-span-2 sm:col-span-1">
<mat-option value="">가입일 정렬</mat-option> <mat-form-field
<mat-option value="">아이디 정렬</mat-option> class="fuse-mat-no-subscript w-full"
<mat-option value="">닉네임 정렬</mat-option> [floatLabel]="'always'"
<mat-option value="">캐쉬 정렬</mat-option> >
<mat-option value="">콤프 정렬</mat-option> <input
<mat-option value="">쿠폰 정렬</mat-option> matInput
<mat-option value="">입금 정렬</mat-option> [matDatepicker]="picker1"
<mat-option value="">출금 정렬</mat-option> [placeholder]="'Choose a date'"
<mat-option value="">차익 정렬</mat-option> />
</mat-select> <mat-datepicker-toggle
</mat-form-field> matSuffix
<mat-form-field> [for]="picker1"
<mat-select placeholder="내림차순"> ></mat-datepicker-toggle>
<mat-option value="">내림차순</mat-option> <mat-datepicker #picker1></mat-datepicker>
<mat-option value="">오름차순</mat-option> </mat-form-field>
</mat-select> </div>
</mat-form-field> --> <!-- 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>
<!-- Search --> <!-- Search -->
<mat-form-field <mat-form-field
class="fuse-mat-dense fuse-mat-no-subscript fuse-mat-rounded min-w-64" fxFlex
class="fuse-mat-rounded min-w-64 bet-mat-form-field-wrapper-mb-0 mr-2"
> >
<mat-icon <mat-icon
class="icon-size-5" class="icon-size-5"
@ -127,21 +87,41 @@
matInput matInput
[formControl]="searchInputControl" [formControl]="searchInputControl"
[autocomplete]="'off'" [autocomplete]="'off'"
[placeholder]="'Search'" [placeholder]="'Search user'"
/> />
</mat-form-field> </mat-form-field>
<!-- Add user button --> <!-- Add user button -->
<button <button
class="ml-4" fxFlex
mat-flat-button mat-flat-button
style="position: fixed; margin-top: 4px"
[color]="'primary'" [color]="'primary'"
(click)="__createProduct()" (click)="__createProduct()"
> >
<!-- <mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon> --> <mat-icon [svgIcon]="'heroicons_outline:search'"></mat-icon>
<span class="ml-2 mr-1">검색하기</span> <span class="ml-2 mr-1">Search</span>
</button>
<!-- 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>
<div>
<button mat-flat-button class="bet-mat-small-8" [color]="'primary'">
관리자지급/회수
</button>
</div>
<div>
<button mat-flat-button class="bet-mat-small-8" [color]="'primary'">
파트너지급/회수
</button> </button>
<button>엑셀저장</button>
<button>카지노머니확인</button>
</div> </div>
</div> </div>
@ -157,29 +137,19 @@
<!-- Header --> <!-- Header -->
<div <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" 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"
matSort
matSortDisableClear
> >
<div class="hidden sm:block"><mat-checkbox></mat-checkbox></div> <div>날짜</div>
<div class="hidden sm:block">요율</div> <div>
<div class="hidden sm:block">상부트리</div> 대상아이디
<div class="hidden sm:block">관리</div> <hr style="margin: 7px 0px" />
<div class="hidden sm:block">매장수</div> 대상닉네임
<div class="hidden sm:block">회원수</div> </div>
<div class="hidden sm:block">아이디</div> <div>내역</div>
<div class="hidden sm:block">닉네임</div> <div class="hidden sm:block">이전금액</div>
<div class="hidden sm:block">예금주</div> <div class="hidden md:block">변동금액</div>
<div class="hidden sm:block">연락처</div> <div class="hidden md:block">이후금액</div>
<div class="hidden sm:block">정산</div> <div class="hidden md:block">메모</div>
<div class="hidden sm:block">보유금</div> <div class="hidden lg:block">배팅번호</div>
<div class="hidden sm:block">게임중머니</div>
<div class="hidden sm:block">카지노->캐쉬</div>
<div class="hidden sm:block">금일콤프</div>
<div class="hidden sm:block">총입출</div>
<div class="hidden sm:block">로그</div>
<div class="hidden sm:block">상태</div>
<div class="hidden sm:block">회원수</div>
<div class="hidden sm:block">비고</div>
</div> </div>
<!-- Rows --> <!-- Rows -->
<ng-container *ngIf="moneyLogs$ | async as moneyLogs"> <ng-container *ngIf="moneyLogs$ | async as moneyLogs">
@ -189,142 +159,29 @@
<div <div
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b" class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
> >
<div class="hidden sm:block truncate"> <div>{{ moneyLog.finalSigninDate }}</div>
<mat-checkbox></mat-checkbox> <div>
</div> {{ moneyLog.signinId }}
<!-- rate --> <hr style="margin: 7px 0px" />
<div class="hidden sm:block truncate">
<button
mat-button
color="primary"
matTooltip="요율확인
카지노-바카라: 0%
카지노-룰렛: 0%
카지노-드레곤타이거: 0%
카지노-그외: 0%
슬롯: 0%
카지노루징: 0%
슬롯루징: 0%"
>
요율
</button>
<div class="hidden sm:block truncate">
<!-- 관리 -->
<button mat-flat-button [color]="'primary'">
<mat-form-field>
<mat-select placeholder="관리">
<mat-option value="">보유금지급/회수</mat-option>
<mat-option value="">수수료설정</mat-option>
<mat-option value="">콤프지급/회수</mat-option>
<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>
</button>
</div>
</div>
<!-- 매장수 -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
{{ moneyLog.branchCount }}
</button>
<button mat-flat-button [color]="'primary'">
{{ moneyLog.divisionCount }}
</button>
<button mat-flat-button [color]="'primary'">
{{ moneyLog.officeCount }}
</button>
<button mat-flat-button [color]="'primary'">
{{ moneyLog.storeCount }}
</button>
</div>
<!-- 회원수 -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
{{ moneyLog.memberCount }}
</button>
</div>
<!-- id -->
<ng-container *ngIf="users$ | async as users">
<ng-container
*ngFor="let user of users; trackBy: __trackByFn"
>
<div
class="hidden sm:block truncate"
(click)="viewUserDetail(user.id!)"
>
{{ moneyLog.id }}
</div>
</ng-container>
</ng-container>
<!-- nickname -->
<div class="hidden sm:block truncate">
{{ moneyLog.nickname }} {{ moneyLog.nickname }}
</div> </div>
<!-- accountHolder --> <div>
<div class="hidden sm:block truncate"> {{ moneyLog.history }}
{{ moneyLog.accountHolder }}
</div> </div>
<!-- 연락처 --> <div class="hidden sm:block">
<div class="hidden sm:block truncate"> {{ moneyLog.beforeMoney }}
{{ moneyLog.phoneNumber }}
</div> </div>
<!-- 정산 --> <div class="hidden md:block">
<div class="hidden sm:block truncate"> {{ moneyLog.changeMoney }}
{{ moneyLog.calculateType }}
</div> </div>
<!-- 보유금 --> <div class="hidden md:block">
<div class="hidden sm:block truncate"> {{ moneyLog.afterMoney }}
캐쉬{{ moneyLog.ownCash }} 콤프{{ moneyLog.ownComp }} 쿠폰{{
moneyLog.ownCoupon
}}
</div> </div>
<!-- gameMoney --> <div class="hidden md:block">
<div class="hidden sm:block truncate"> {{ moneyLog.memo }}
{{ moneyLog.gameMoney }}
</div> </div>
<!-- casinoCash --> <div class="hidden lg:block">
<div class="hidden sm:block truncate"> {{ moneyLog.bettingNumber }}
<button mat-flat-button [color]="'primary'">
게임머니확인
</button>
<button mat-flat-button [color]="'primary'">
게임머니회수
</button>
</div>
<!-- todayComp -->
<div class="hidden sm:block truncate">
{{ moneyLog.todayComp }}P
</div>
<!-- 총입출 -->
<div class="hidden sm:block truncate">
입금{{ moneyLog.totalDeposit }} 출금{{
moneyLog.totalWithdraw
}}
차익{{ moneyLog.balance }}
</div>
<!-- log -->
<div class="hidden sm:block truncate">
가입{{ moneyLog.registDate }} 최종{{
moneyLog.finalSigninDate
}}
IP{{ moneyLog.ip }}
</div>
<!-- state -->
<div class="hidden sm:block truncate">
{{ moneyLog.state }}
</div>
<!-- 회원수 -->
<div class="hidden sm:block truncate">
{{ moneyLog.memberCount }}
</div>
<!-- 비고 -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
{{ moneyLog.note }}
</button>
</div> </div>
</div> </div>
</ng-container> </ng-container>
@ -347,7 +204,7 @@
<div <div
class="p-8 sm:p-16 border-t text-4xl font-semibold tracking-tight text-center" class="p-8 sm:p-16 border-t text-4xl font-semibold tracking-tight text-center"
> >
There are no moneyLogs! There are no data!
</div> </div>
</ng-template> </ng-template>
</div> </div>

View File

@ -42,18 +42,22 @@ import { Router } from '@angular/router';
/* language=SCSS */ /* language=SCSS */
` `
.inventory-grid { .inventory-grid {
grid-template-columns: 60px auto 40px; /* 날짜 아이디 내역 이전 변동 이후 */
grid-template-columns: 60px 100px auto 60px 60px 60px;
@screen sm { @screen sm {
grid-template-columns: 60px 60px 60px 60px 60px 60px auto 60px; /* 날짜 아이디 내역 이전 변동 이후 메모 배팅 */
grid-template-columns: 60px 100px auto 60px 60px 60px 40px 60px;
} }
@screen md { @screen md {
grid-template-columns: 60px 60px 60px 60px 60px 60px auto 60px 60px; /* 날짜 아이디 내역 이전 변동 이후 메모 배팅 */
grid-template-columns: 60px 100px auto 60px 60px 60px 40px 60px;
} }
@screen lg { @screen lg {
grid-template-columns: 60px 70px 70px 70px 70px 100px 60px 60px auto 60px 60px 60px 60px; /* 날짜 아이디 내역 이전 변동 이후 메모 배팅 */
grid-template-columns: 60px 100px auto 60px 60px 60px 40px 60px;
} }
} }
`, `,
@ -69,6 +73,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
moneyLogs$!: Observable<MoneyLog[] | undefined>; moneyLogs$!: Observable<MoneyLog[] | undefined>;
users$!: Observable<User[] | undefined>; users$!: Observable<User[] | undefined>;
__isSearchOpened = false;
isLoading = false; isLoading = false;
searchInputControl = new FormControl(); searchInputControl = new FormControl();
selectedMoneyLog?: MoneyLog; selectedMoneyLog?: MoneyLog;
@ -117,7 +122,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
if (this._sort && this._paginator) { if (this._sort && this._paginator) {
// Set the initial sort // Set the initial sort
this._sort.sort({ this._sort.sort({
id: 'name', id: 'signinId',
start: 'asc', start: 'asc',
disableClear: true, disableClear: true,
}); });
@ -186,6 +191,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
* *

View File

@ -1,29 +1,12 @@
export interface MoneyLog { export interface MoneyLog {
id?: string; id: string;
totalPartnerCount?: number; finalSigninDate?: Date;
totalHoldingMoney?: number; signinId?: string;
totalComp?: number;
total?: number;
branchCount?: number;
divisionCount?: number;
officeCount?: number;
storeCount?: number;
memberCount?: number;
nickname?: string; nickname?: string;
accountHolder?: string; history?: string;
phoneNumber?: string; beforeMoney?: number;
calculateType?: string; changeMoney?: number;
ownCash?: number; afterMoney?: number;
ownComp?: number; memo?: string;
ownCoupon?: number; bettingNumber?: number;
gameMoney?: number;
todayComp?: number;
totalDeposit?: number;
totalWithdraw?: number;
balance?: number;
registDate?: string;
finalSigninDate?: string;
ip?: string;
state?: string;
note?: string;
} }

View File

@ -12,9 +12,7 @@ import { MatSortModule } from '@angular/material/sort';
import { MatSelectModule } from '@angular/material/select'; import { MatSelectModule } from '@angular/material/select';
import { MatTooltipModule } from '@angular/material/tooltip'; import { MatTooltipModule } from '@angular/material/tooltip';
import { MatGridListModule } from '@angular/material/grid-list'; import { MatGridListModule } from '@angular/material/grid-list';
import { MatSlideToggleModule } from '@angular/material/slide-toggle'; import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatRadioModule } from '@angular/material/radio';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { TranslocoModule } from '@ngneat/transloco'; import { TranslocoModule } from '@ngneat/transloco';
@ -42,9 +40,7 @@ import { moneyLogRoutes } from './money-log.routing';
MatSelectModule, MatSelectModule,
MatTooltipModule, MatTooltipModule,
MatGridListModule, MatGridListModule,
MatSlideToggleModule, MatDatepickerModule,
MatRadioModule,
MatCheckboxModule,
], ],
}) })
export class MoneyLogModule {} export class MoneyLogModule {}