파트너페이지 수정

This commit is contained in:
이담 정 2022-07-24 05:22:33 +00:00
parent 78060e6bf8
commit 9d329d414a
21 changed files with 139 additions and 3023 deletions

View File

@ -33,7 +33,7 @@ export class MemberPartnerMainofficeMockApi {
.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);
@ -44,7 +44,7 @@ export class MemberPartnerMainofficeMockApi {
); );
// Sort the partnerMainoffices // Sort the partnerMainoffices
if (sort === 'sku' || sort === 'name' || sort === 'active') { if (sort === 'signinId' || sort === 'nickname' || sort === 'state') {
partnerMainoffices.sort((a, b) => { partnerMainoffices.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,16 +2,118 @@
export const partnerMainoffices = [ export const partnerMainoffices = [
{ {
id: 'on00', id: '7eb7c859-1347-4317-96b6-9476a7e2ba3c',
totalPartnerCount: '5', signinId: 'on00',
totalHoldingMoney: 303675,
totalComp: 108933,
total: 412608,
branchCount: 1, branchCount: 1,
divisionCount: 1, divisionCount: 1,
officeCount: 1, officeCount: 1,
storeCount: 1, storeCount: 1,
memberCount: 1, memberCount: 1,
ownMemberCount: 1,
nickname: 'on00',
accountHolder: '11',
phoneNumber: '010-1111-1111',
calculateType: '롤링',
ownCash: 50000,
ownComp: 1711,
ownCoupon: 50000,
gameMoney: 0,
todayComp: 0,
totalDeposit: 0,
totalWithdraw: 0,
balance: 0,
registDate: '2022-06-12 15:38',
finalSigninDate: '',
ip: '',
state: '정상',
},
{
id: '00b0292f-3d50-4669-a0c4-7a9d85efc98d',
signinId: 'zxcv1234',
branchCount: 1,
divisionCount: 1,
officeCount: 1,
storeCount: 1,
memberCount: 2,
ownMemberCount: 1,
nickname: 'zxcv1234',
accountHolder: '테스트',
phoneNumber: '010-0000-0000',
calculateType: '롤링',
ownCash: 0,
ownComp: 0,
ownCoupon: 0,
gameMoney: 0,
todayComp: 0,
totalDeposit: 0,
totalWithdraw: 0,
balance: 0,
registDate: '2022-06-08 01:35',
finalSigninDate: '',
ip: '',
state: '정상',
},
{
id: 'b899ec30-b85a-40ab-bb1f-18a596d5c6de',
signinId: 'qwe123',
branchCount: 1,
divisionCount: 1,
officeCount: 1,
storeCount: 1,
memberCount: 1,
ownMemberCount: 1,
nickname: '테스트55',
accountHolder: '테스트',
phoneNumber: '010-1234-1234',
calculateType: '롤링',
ownCash: 50000,
ownComp: 1711,
ownCoupon: 50000,
gameMoney: 0,
todayComp: 0,
totalDeposit: 0,
totalWithdraw: 0,
balance: 0,
registDate: '2022-06-12 15:38',
finalSigninDate: '',
ip: '',
state: '정상',
},
{
id: '8fcce528-d878-4cc8-99f7-bd3451ed5405',
signinId: 'on00',
branchCount: 1,
divisionCount: 1,
officeCount: 1,
storeCount: 1,
memberCount: 1,
ownMemberCount: 1,
nickname: 'on00',
accountHolder: '11',
phoneNumber: '010-1111-1111',
calculateType: '롤링',
ownCash: 50000,
ownComp: 1711,
ownCoupon: 50000,
gameMoney: 0,
todayComp: 0,
totalDeposit: 0,
totalWithdraw: 0,
balance: 0,
registDate: '2022-06-12 15:38',
finalSigninDate: '',
ip: '',
state: '정상',
},
{
id: '8fcce528-d878-4cc8-99f7-bd3451ed5406',
signinId: 'on00',
branchCount: 1,
divisionCount: 1,
officeCount: 1,
storeCount: 1,
memberCount: 1,
ownMemberCount: 1,
nickname: 'on00', nickname: 'on00',
accountHolder: '11', accountHolder: '11',
phoneNumber: '010-1111-1111', phoneNumber: '010-1111-1111',
@ -28,6 +130,5 @@ export const partnerMainoffices = [
finalSigninDate: '', finalSigninDate: '',
ip: '', ip: '',
state: '정상', state: '정상',
note: '대본등록',
}, },
]; ];

View File

@ -68,61 +68,18 @@ export const defaultNavigation: FuseNavigationItem[] = [
link: '/member/current-user', link: '/member/current-user',
}, },
{ {
id: 'apps.ecommerce', id: 'member.partner',
title: 'partner-management', title: 'Partner',
type: 'collapsable', type: 'basic',
icon: 'heroicons_outline:shopping-cart', icon: 'heroicons_outline:academic-cap',
children: [ link: '/member/partner',
{ },
id: 'member.partner', {
title: 'All Partner', id: 'member.partner-recommendation',
type: 'basic', title: 'Partner Recommendation',
icon: 'heroicons_outline:academic-cap', type: 'basic',
link: '/member/partner/all', icon: 'heroicons_outline:academic-cap',
}, link: '/member/partner/recommendation',
{
id: 'member.partner-mainoffice',
title: 'Partner Mainoffice',
type: 'basic',
icon: 'heroicons_outline:academic-cap',
link: '/member/partner/main-office',
},
{
id: 'member.partner-branch',
title: 'Partner Branch',
type: 'basic',
icon: 'heroicons_outline:academic-cap',
link: '/member/partner/branch',
},
{
id: 'member.partner-division',
title: 'Partner Division',
type: 'basic',
icon: 'heroicons_outline:academic-cap',
link: '/member/partner/division',
},
{
id: 'member.partner-office',
title: 'Partner Office',
type: 'basic',
icon: 'heroicons_outline:academic-cap',
link: '/member/partner/office',
},
{
id: 'member.partner-store',
title: 'Partner Store',
type: 'basic',
icon: 'heroicons_outline:academic-cap',
link: '/member/partner/store',
},
{
id: 'member.partner-recommendation',
title: 'Partner Recommendation',
type: 'basic',
icon: 'heroicons_outline:academic-cap',
link: '/member/partner/recommendation',
},
],
}, },
{ {

View File

@ -1,364 +0,0 @@
<div
class="sm:absolute sm:inset-0 flex flex-col flex-auto min-w-0 sm:overflow-hidden bg-card dark:bg-transparent"
>
<!-- Header -->
<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"
>
<!-- Loader -->
<div class="absolute inset-x-0 bottom-0" *ngIf="isLoading">
<mat-progress-bar [mode]="'indeterminate'"></mat-progress-bar>
</div>
<!-- Title -->
<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">
<!-- Memo -->
<!-- <mat-form-field>
<ng-container *ngIf="partnerBranchs$ | async as partnerBranchs">
<ng-container
*ngFor="let partnerBranch of partnerBranchs; trackBy: __trackByFn"
>
<div
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
>
<fieldset>
총 파트너수:{{ partnerBranch.totalPartnerCount }} 총 보유머니:{{
partnerBranch.totalHoldingMoney
}}
총 콤프:{{ partnerBranch.totalComp }} 총 합계:{{
partnerBranch.total
}}
</fieldset>
</div>
</ng-container>
</ng-container>
</mat-form-field> -->
<!-- SelectBox -->
<mat-form-field>
<mat-select placeholder="리스트수">
<mat-option value="40">40</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-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-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> -->
<!-- Search -->
<mat-form-field
class="fuse-mat-dense fuse-mat-no-subscript fuse-mat-rounded min-w-64"
>
<mat-icon
class="icon-size-5"
matPrefix
[svgIcon]="'heroicons_solid:search'"
></mat-icon>
<input
matInput
[formControl]="searchInputControl"
[autocomplete]="'off'"
[placeholder]="'Search'"
/>
</mat-form-field>
<!-- Add user button -->
<button
class="ml-4"
mat-flat-button
[color]="'primary'"
(click)="__createProduct()"
>
<!-- <mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon> -->
<span class="ml-2 mr-1">검색하기</span>
</button>
<button>엑셀저장</button>
<button>카지노머니확인</button>
</div>
</div>
<!-- Main -->
<div class="flex flex-auto overflow-hidden">
<!-- Products list -->
<div
class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto"
>
<ng-container *ngIf="partnerBranchs$ | async as partnerBranchs">
<ng-container *ngIf="partnerBranchs.length > 0; else noPartnerBranch">
<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"
matSort
matSortDisableClear
>
<div class="hidden sm:block"><mat-checkbox></mat-checkbox></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 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 class="hidden sm:block">상태</div>
<div class="hidden sm:block">회원수</div>
<div class="hidden sm:block">비고</div>
</div>
<!-- Rows -->
<ng-container *ngIf="partnerBranchs$ | async as partnerBranchs">
<ng-container
*ngFor="
let partnerBranch of partnerBranchs;
trackBy: __trackByFn
"
>
<div
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
>
<div class="hidden sm:block truncate">
<mat-checkbox></mat-checkbox>
</div>
<!-- rate -->
<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'">
{{ partnerBranch.branchCount }}
</button>
<button mat-flat-button [color]="'primary'">
{{ partnerBranch.divisionCount }}
</button>
<button mat-flat-button [color]="'primary'">
{{ partnerBranch.officeCount }}
</button>
<button mat-flat-button [color]="'primary'">
{{ partnerBranch.storeCount }}
</button>
</div>
<!-- 회원수 -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
{{ partnerBranch.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!)"
>
{{ partnerBranch.id }}
</div>
</ng-container>
</ng-container>
<!-- nickname -->
<div class="hidden sm:block truncate">
{{ partnerBranch.nickname }}
</div>
<!-- accountHolder -->
<div class="hidden sm:block truncate">
{{ partnerBranch.accountHolder }}
</div>
<!-- 연락처 -->
<div class="hidden sm:block truncate">
{{ partnerBranch.phoneNumber }}
</div>
<!-- 정산 -->
<div class="hidden sm:block truncate">
{{ partnerBranch.calculateType }}
</div>
<!-- 보유금 -->
<div class="hidden sm:block truncate">
캐쉬{{ partnerBranch.ownCash }} 콤프{{
partnerBranch.ownComp
}}
쿠폰{{ partnerBranch.ownCoupon }}
</div>
<!-- gameMoney -->
<div class="hidden sm:block truncate">
{{ partnerBranch.gameMoney }}
</div>
<!-- casinoCash -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
게임머니확인
</button>
<button mat-flat-button [color]="'primary'">
게임머니회수
</button>
</div>
<!-- todayComp -->
<div class="hidden sm:block truncate">
{{ partnerBranch.todayComp }}P
</div>
<!-- 총입출 -->
<div class="hidden sm:block truncate">
입금{{ partnerBranch.totalDeposit }} 출금{{
partnerBranch.totalWithdraw
}}
차익{{ partnerBranch.balance }}
</div>
<!-- log -->
<div class="hidden sm:block truncate">
가입{{ partnerBranch.registDate }} 최종{{
partnerBranch.finalSigninDate
}}
IP{{ partnerBranch.ip }}
</div>
<!-- state -->
<div class="hidden sm:block truncate">
{{ partnerBranch.state }}
</div>
<!-- 회원수 -->
<div class="hidden sm:block truncate">
{{ partnerBranch.memberCount }}
</div>
<!-- 비고 -->
<div class="hidden sm:block truncate">
<button
mat-flat-button
[color]="'primary'"
(click)="__onClickRegist($event)"
>
부본등록
{{ partnerBranch.note }}
</button>
</div>
</div>
</ng-container>
</ng-container>
</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 #noPartnerBranch>
<div
class="p-8 sm:p-16 border-t text-4xl font-semibold tracking-tight text-center"
>
There are no partnerbranchs!
</div>
</ng-template>
</div>
</div>
</div>

View File

@ -1,212 +0,0 @@
import {
AfterViewInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
OnDestroy,
OnInit,
ViewChild,
ViewEncapsulation,
} from '@angular/core';
import {
FormBuilder,
FormControl,
FormGroup,
Validators,
} from '@angular/forms';
import { MatCheckboxChange } from '@angular/material/checkbox';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import {
debounceTime,
map,
merge,
Observable,
Subject,
switchMap,
takeUntil,
} from 'rxjs';
import { fuseAnimations } from '@fuse/animations';
import { FuseConfirmationService } from '@fuse/services/confirmation';
import { User } from '../../user/models/user';
import { Partner as PartnerBranch } from '../models/partner';
import { PartnerPagination as PartnerBranchPagination } from '../models/partner-pagination';
import { PartnerService as PartnerBranchService } from '../services/partner.service';
import { MatDialog } from '@angular/material/dialog';
import { RegistComposeComponent } from '../compose/regist-compose.component';
import { Router } from '@angular/router';
@Component({
selector: 'app-partner-branch-list',
templateUrl: './branch-list.component.html',
styles: [
/* language=SCSS */
`
.inventory-grid {
grid-template-columns: 60px auto 40px;
@screen sm {
grid-template-columns: 60px 60px 60px 60px 60px 60px auto 60px;
}
@screen md {
grid-template-columns: 60px 60px 60px 60px 60px 60px auto 60px 60px;
}
@screen lg {
grid-template-columns: 60px 70px 70px 70px 70px 100px 60px 60px auto 60px 60px 60px 60px;
}
}
`,
],
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
animations: fuseAnimations,
})
export class BranchListComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
@ViewChild(MatSort) private _sort!: MatSort;
partnerBranchs$!: Observable<PartnerBranch[] | undefined>;
users$!: Observable<User[] | undefined>;
isLoading = false;
searchInputControl = new FormControl();
selectedPartnerBranch?: PartnerBranch;
pagination?: PartnerBranchPagination;
private _unsubscribeAll: Subject<any> = new Subject<any>();
/**
* Constructor
*/
constructor(
private _changeDetectorRef: ChangeDetectorRef,
private _fuseConfirmationService: FuseConfirmationService,
private _formBuilder: FormBuilder,
private _partnerBranchService: PartnerBranchService,
private router: Router,
private _matDialog: MatDialog
) {}
// -----------------------------------------------------------------------------------------------------
// @ Lifecycle hooks
// -----------------------------------------------------------------------------------------------------
/**
* On init
*/
ngOnInit(): void {
// Get the pagination
this._partnerBranchService.pagination$
.pipe(takeUntil(this._unsubscribeAll))
.subscribe((pagination: PartnerBranchPagination | undefined) => {
// Update the pagination
this.pagination = pagination;
// Mark for check
this._changeDetectorRef.markForCheck();
});
// Get the products
this.partnerBranchs$ = this._partnerBranchService.partners$;
}
/**
* After view init
*/
ngAfterViewInit(): void {
if (this._sort && this._paginator) {
// Set the initial sort
this._sort.sort({
id: 'name',
start: 'asc',
disableClear: true,
});
// Mark for check
this._changeDetectorRef.markForCheck();
// If the partnerBranch 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._partnerBranchService.getPartners(
this._paginator.pageIndex,
this._paginator.pageSize,
this._sort.active,
this._sort.direction
);
}),
map(() => {
this.isLoading = false;
})
)
.subscribe();
}
}
/**
* On destroy
*/
ngOnDestroy(): void {
// Unsubscribe from all subscriptions
this._unsubscribeAll.next(null);
this._unsubscribeAll.complete();
}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
viewUserDetail(id: string): void {
let url: string = 'member/user/' + id;
this.router.navigateByUrl(url);
}
// -----------------------------------------------------------------------------------------------------
// @ Private methods
// -----------------------------------------------------------------------------------------------------
/**
* Create product
*/
__createProduct(): void {}
/**
* Toggle product details
*
* @param productId
*/
__toggleDetails(productId: string): void {}
/**
* Track by function for ngFor loops
*
* @param index
* @param item
*/
__trackByFn(index: number, item: any): any {
return item.id || index;
}
__onClickRegist(event: MouseEvent): void {
const dialogRef = this._matDialog.open(RegistComposeComponent);
dialogRef.afterClosed().subscribe((result) => {
console.log('Compose dialog was closed!');
});
}
}

View File

@ -1,366 +0,0 @@
<div
class="sm:absolute sm:inset-0 flex flex-col flex-auto min-w-0 sm:overflow-hidden bg-card dark:bg-transparent"
>
<!-- Header -->
<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"
>
<!-- Loader -->
<div class="absolute inset-x-0 bottom-0" *ngIf="isLoading">
<mat-progress-bar [mode]="'indeterminate'"></mat-progress-bar>
</div>
<!-- Title -->
<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">
<!-- Memo -->
<!-- <mat-form-field>
<ng-container *ngIf="partnerDivisions$ | async as partnerDivisions">
<ng-container
*ngFor="let partnerDivision of partnerDivisions; trackBy: __trackByFn"
>
<div
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
>
<fieldset>
총 파트너수:{{ partnerDivision.totalPartnerCount }} 총 보유머니:{{
partnerDivision.totalHoldingMoney
}}
총 콤프:{{ partnerDivision.totalComp }} 총 합계:{{
partnerDivision.total
}}
</fieldset>
</div>
</ng-container>
</ng-container>
</mat-form-field> -->
<!-- SelectBox -->
<mat-form-field>
<mat-select placeholder="리스트수">
<mat-option value="40">40</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-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-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> -->
<!-- Search -->
<mat-form-field
class="fuse-mat-dense fuse-mat-no-subscript fuse-mat-rounded min-w-64"
>
<mat-icon
class="icon-size-5"
matPrefix
[svgIcon]="'heroicons_solid:search'"
></mat-icon>
<input
matInput
[formControl]="searchInputControl"
[autocomplete]="'off'"
[placeholder]="'Search'"
/>
</mat-form-field>
<!-- Add user button -->
<button
class="ml-4"
mat-flat-button
[color]="'primary'"
(click)="__createProduct()"
>
<!-- <mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon> -->
<span class="ml-2 mr-1">검색하기</span>
</button>
<button>엑셀저장</button>
<button>카지노머니확인</button>
</div>
</div>
<!-- Main -->
<div class="flex flex-auto overflow-hidden">
<!-- Products list -->
<div
class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto"
>
<ng-container *ngIf="partnerDivisions$ | async as partnerDivisions">
<ng-container
*ngIf="partnerDivisions.length > 0; else noPartnerDivision"
>
<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"
matSort
matSortDisableClear
>
<div class="hidden sm:block"><mat-checkbox></mat-checkbox></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 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 class="hidden sm:block">상태</div>
<div class="hidden sm:block">회원수</div>
<div class="hidden sm:block">비고</div>
</div>
<!-- Rows -->
<ng-container *ngIf="partnerDivisions$ | async as partnerDivisions">
<ng-container
*ngFor="
let partnerDivision of partnerDivisions;
trackBy: __trackByFn
"
>
<div
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
>
<div class="hidden sm:block truncate">
<mat-checkbox></mat-checkbox>
</div>
<!-- rate -->
<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'">
{{ partnerDivision.divisionCount }}
</button>
<button mat-flat-button [color]="'primary'">
{{ partnerDivision.divisionCount }}
</button>
<button mat-flat-button [color]="'primary'">
{{ partnerDivision.officeCount }}
</button>
<button mat-flat-button [color]="'primary'">
{{ partnerDivision.storeCount }}
</button>
</div>
<!-- 회원수 -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
{{ partnerDivision.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!)"
>
{{ partnerDivision.id }}
</div>
</ng-container>
</ng-container>
<!-- nickname -->
<div class="hidden sm:block truncate">
{{ partnerDivision.nickname }}
</div>
<!-- accountHolder -->
<div class="hidden sm:block truncate">
{{ partnerDivision.accountHolder }}
</div>
<!-- 연락처 -->
<div class="hidden sm:block truncate">
{{ partnerDivision.phoneNumber }}
</div>
<!-- 정산 -->
<div class="hidden sm:block truncate">
{{ partnerDivision.calculateType }}
</div>
<!-- 보유금 -->
<div class="hidden sm:block truncate">
캐쉬{{ partnerDivision.ownCash }} 콤프{{
partnerDivision.ownComp
}}
쿠폰{{ partnerDivision.ownCoupon }}
</div>
<!-- gameMoney -->
<div class="hidden sm:block truncate">
{{ partnerDivision.gameMoney }}
</div>
<!-- casinoCash -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
게임머니확인
</button>
<button mat-flat-button [color]="'primary'">
게임머니회수
</button>
</div>
<!-- todayComp -->
<div class="hidden sm:block truncate">
{{ partnerDivision.todayComp }}P
</div>
<!-- 총입출 -->
<div class="hidden sm:block truncate">
입금{{ partnerDivision.totalDeposit }} 출금{{
partnerDivision.totalWithdraw
}}
차익{{ partnerDivision.balance }}
</div>
<!-- log -->
<div class="hidden sm:block truncate">
가입{{ partnerDivision.registDate }} 최종{{
partnerDivision.finalSigninDate
}}
IP{{ partnerDivision.ip }}
</div>
<!-- state -->
<div class="hidden sm:block truncate">
{{ partnerDivision.state }}
</div>
<!-- 회원수 -->
<div class="hidden sm:block truncate">
{{ partnerDivision.memberCount }}
</div>
<!-- 비고 -->
<div class="hidden sm:block truncate">
<button
mat-flat-button
[color]="'primary'"
(click)="__onClickRegist($event)"
>
총판등록
{{ partnerDivision.note }}
</button>
</div>
</div>
</ng-container>
</ng-container>
</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 #noPartnerDivision>
<div
class="p-8 sm:p-16 border-t text-4xl font-semibold tracking-tight text-center"
>
There are no partnerdivisions!
</div>
</ng-template>
</div>
</div>
</div>

View File

@ -1,210 +0,0 @@
import {
AfterViewInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
OnDestroy,
OnInit,
ViewChild,
ViewEncapsulation,
} from '@angular/core';
import {
FormBuilder,
FormControl,
FormGroup,
Validators,
} from '@angular/forms';
import { MatCheckboxChange } from '@angular/material/checkbox';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import {
debounceTime,
map,
merge,
Observable,
Subject,
switchMap,
takeUntil,
} from 'rxjs';
import { fuseAnimations } from '@fuse/animations';
import { FuseConfirmationService } from '@fuse/services/confirmation';
import { User } from '../../user/models/user';
import { Partner as PartnerDivision } from '../models/partner';
import { PartnerPagination as PartnerDivisionPagination } from '../models/partner-pagination';
import { PartnerService as PartnerDivisionService } from '../services/partner.service';
import { MatDialog } from '@angular/material/dialog';
import { RegistComposeComponent } from '../compose/regist-compose.component';
import { Router } from '@angular/router';
@Component({
selector: 'app-partner-division-list',
templateUrl: './division-list.component.html',
styles: [
/* language=SCSS */
`
.inventory-grid {
grid-template-columns: 60px auto 40px;
@screen sm {
grid-template-columns: 60px 60px 60px 60px 60px 60px auto 60px;
}
@screen md {
grid-template-columns: 60px 60px 60px 60px 60px 60px auto 60px 60px;
}
@screen lg {
grid-template-columns: 60px 70px 70px 70px 70px 100px 60px 60px auto 60px 60px 60px 60px;
}
}
`,
],
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
animations: fuseAnimations,
})
export class DivisionListComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
@ViewChild(MatSort) private _sort!: MatSort;
partnerDivisions$!: Observable<PartnerDivision[] | undefined>;
users$!: Observable<User[] | undefined>;
isLoading = false;
searchInputControl = new FormControl();
selectedPartnerDivision?: PartnerDivision;
pagination?: PartnerDivisionPagination;
private _unsubscribeAll: Subject<any> = new Subject<any>();
/**
* Constructor
*/
constructor(
private _changeDetectorRef: ChangeDetectorRef,
private _fuseConfirmationService: FuseConfirmationService,
private _formBuilder: FormBuilder,
private _partnerDivisionService: PartnerDivisionService,
private router: Router,
private _matDialog: MatDialog
) {}
// -----------------------------------------------------------------------------------------------------
// @ Lifecycle hooks
// -----------------------------------------------------------------------------------------------------
/**
* On init
*/
ngOnInit(): void {
// Get the pagination
this._partnerDivisionService.pagination$
.pipe(takeUntil(this._unsubscribeAll))
.subscribe((pagination: PartnerDivisionPagination | undefined) => {
// Update the pagination
this.pagination = pagination;
// Mark for check
this._changeDetectorRef.markForCheck();
});
// Get the products
this.partnerDivisions$ = this._partnerDivisionService.partners$;
}
/**
* After view init
*/
ngAfterViewInit(): void {
if (this._sort && this._paginator) {
// Set the initial sort
this._sort.sort({
id: 'name',
start: 'asc',
disableClear: true,
});
// Mark for check
this._changeDetectorRef.markForCheck();
// If the partnerDivision 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._partnerDivisionService.getPartners(
this._paginator.pageIndex,
this._paginator.pageSize,
this._sort.active,
this._sort.direction
);
}),
map(() => {
this.isLoading = false;
})
)
.subscribe();
}
}
/**
* On destroy
*/
ngOnDestroy(): void {
// Unsubscribe from all subscriptions
this._unsubscribeAll.next(null);
this._unsubscribeAll.complete();
}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
viewUserDetail(id: string): void {
let url: string = 'member/user/' + id;
this.router.navigateByUrl(url);
}
// -----------------------------------------------------------------------------------------------------
// @ Private methods
// -----------------------------------------------------------------------------------------------------
/**
* Create product
*/
__createProduct(): void {}
/**
* Toggle product details
*
* @param productId
*/
__toggleDetails(productId: string): void {}
/**
* Track by function for ngFor loops
*
* @param index
* @param item
*/
__trackByFn(index: number, item: any): any {
return item.id || index;
}
__onClickRegist(event: MouseEvent): void {
const dialogRef = this._matDialog.open(RegistComposeComponent);
dialogRef.afterClosed().subscribe((result) => {
console.log('Compose dialog was closed!');
});
}
}

View File

@ -1,17 +1,4 @@
import { AllListComponent } from './all-list.component'; import { ListComponent } from './list.component';
import { MainOfficeListComponent } from './main-office-list.component';
import { BranchListComponent } from './branch-list.component';
import { DivisionListComponent } from './division-list.component';
import { OfficeListComponent } from './office-list.component';
import { RecommendationListComponent } from './recommendation-list.component'; import { RecommendationListComponent } from './recommendation-list.component';
import { StoreListComponent } from './store-list.component';
export const COMPONENTS = [ export const COMPONENTS = [ListComponent, RecommendationListComponent];
AllListComponent,
MainOfficeListComponent,
OfficeListComponent,
BranchListComponent,
DivisionListComponent,
RecommendationListComponent,
StoreListComponent,
];

View File

@ -38,8 +38,8 @@ import { RegistComposeComponent } from '../compose/regist-compose.component';
import { MatDialog } from '@angular/material/dialog'; import { MatDialog } from '@angular/material/dialog';
@Component({ @Component({
selector: 'app-partner-list', selector: 'partner-list',
templateUrl: './all-list.component.html', templateUrl: './list.component.html',
styles: [ styles: [
/* language=SCSS */ /* language=SCSS */
` `
@ -68,7 +68,7 @@ import { MatDialog } from '@angular/material/dialog';
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,
animations: fuseAnimations, animations: fuseAnimations,
}) })
export class AllListComponent implements OnInit, AfterViewInit, OnDestroy { 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;
@ -124,7 +124,7 @@ export class AllListComponent 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,
}); });

View File

@ -1,369 +0,0 @@
<div
class="sm:absolute sm:inset-0 flex flex-col flex-auto min-w-0 sm:overflow-hidden bg-card dark:bg-transparent"
>
<!-- Header -->
<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"
>
<!-- Loader -->
<div class="absolute inset-x-0 bottom-0" *ngIf="isLoading">
<mat-progress-bar [mode]="'indeterminate'"></mat-progress-bar>
</div>
<!-- Title -->
<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">
<!-- Memo -->
<!-- <mat-form-field>
<ng-container *ngIf="partnerMainoffices$ | async as partnerMainoffices">
<ng-container
*ngFor="let partnerMainoffice of partnerMainoffices; trackBy: __trackByFn"
>
<div
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
>
<fieldset>
총 파트너수:{{ partnerMainoffice.totalPartnerCount }} 총 보유머니:{{
partnerMainoffice.totalHoldingMoney
}}
총 콤프:{{ partnerMainoffice.totalComp }} 총 합계:{{
partnerMainoffice.total
}}
</fieldset>
</div>
</ng-container>
</ng-container>
</mat-form-field> -->
<!-- SelectBox -->
<mat-form-field>
<mat-select placeholder="리스트수">
<mat-option value="40">40</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-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-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> -->
<!-- Search -->
<mat-form-field
class="fuse-mat-dense fuse-mat-no-subscript fuse-mat-rounded min-w-64"
>
<mat-icon
class="icon-size-5"
matPrefix
[svgIcon]="'heroicons_solid:search'"
></mat-icon>
<input
matInput
[formControl]="searchInputControl"
[autocomplete]="'off'"
[placeholder]="'Search'"
/>
</mat-form-field>
<!-- Add user button -->
<button
class="ml-4"
mat-flat-button
[color]="'primary'"
(click)="__createProduct()"
>
<!-- <mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon> -->
<span class="ml-2 mr-1">검색하기</span>
</button>
<button>엑셀저장</button>
<button>카지노머니확인</button>
</div>
</div>
<!-- Main -->
<div class="flex flex-auto overflow-hidden">
<!-- Products list -->
<div
class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto"
>
<ng-container *ngIf="partnerMainoffices$ | async as partnerMainoffices">
<ng-container
*ngIf="partnerMainoffices.length > 0; else noPartnerMainoffice"
>
<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"
matSort
matSortDisableClear
>
<div class="hidden sm:block"><mat-checkbox></mat-checkbox></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 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" [mat-sort-header]="''">
카지노->캐쉬
</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>
<!-- Rows -->
<ng-container
*ngIf="partnerMainoffices$ | async as partnerMainoffices"
>
<ng-container
*ngFor="
let partnerMainoffice of partnerMainoffices;
trackBy: __trackByFn
"
>
<div
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
>
<div class="hidden sm:block truncate">
<mat-checkbox></mat-checkbox>
</div>
<!-- rate -->
<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'">
{{ partnerMainoffice.branchCount }}
</button>
<button mat-flat-button [color]="'primary'">
{{ partnerMainoffice.divisionCount }}
</button>
<button mat-flat-button [color]="'primary'">
{{ partnerMainoffice.officeCount }}
</button>
<button mat-flat-button [color]="'primary'">
{{ partnerMainoffice.storeCount }}
</button>
</div>
<!-- 회원수 -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
{{ partnerMainoffice.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!)"
>
{{ partnerMainoffice.id }}
</div>
</ng-container>
</ng-container>
<!-- nickname -->
<div class="hidden sm:block truncate">
{{ partnerMainoffice.nickname }}
</div>
<!-- accountHolder -->
<div class="hidden sm:block truncate">
{{ partnerMainoffice.accountHolder }}
</div>
<!-- 연락처 -->
<div class="hidden sm:block truncate">
{{ partnerMainoffice.phoneNumber }}
</div>
<!-- 정산 -->
<div class="hidden sm:block truncate">
{{ partnerMainoffice.calculateType }}
</div>
<!-- 보유금 -->
<div class="hidden sm:block truncate">
캐쉬{{ partnerMainoffice.ownCash }} 콤프{{
partnerMainoffice.ownComp
}}
쿠폰{{ partnerMainoffice.ownCoupon }}
</div>
<!-- gameMoney -->
<div class="hidden sm:block truncate">
{{ partnerMainoffice.gameMoney }}
</div>
<!-- casinoCash -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
게임머니확인
</button>
<button mat-flat-button [color]="'primary'">
게임머니회수
</button>
</div>
<!-- todayComp -->
<div class="hidden sm:block truncate">
{{ partnerMainoffice.todayComp }}P
</div>
<!-- 총입출 -->
<div class="hidden sm:block truncate">
입금{{ partnerMainoffice.totalDeposit }} 출금{{
partnerMainoffice.totalWithdraw
}}
차익{{ partnerMainoffice.balance }}
</div>
<!-- log -->
<div class="hidden sm:block truncate">
가입{{ partnerMainoffice.registDate }} 최종{{
partnerMainoffice.finalSigninDate
}}
IP{{ partnerMainoffice.ip }}
</div>
<!-- state -->
<div class="hidden sm:block truncate">
{{ partnerMainoffice.state }}
</div>
<!-- 회원수 -->
<div class="hidden sm:block truncate">
{{ partnerMainoffice.memberCount }}
</div>
<!-- 비고 -->
<div class="hidden sm:block truncate">
<button
mat-flat-button
[color]="'primary'"
(click)="__onClickRegist($event)"
>
{{ partnerMainoffice.note }}
</button>
</div>
</div>
</ng-container>
</ng-container>
</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 #noPartnerMainoffice>
<div
class="p-8 sm:p-16 border-t text-4xl font-semibold tracking-tight text-center"
>
There are no partner mainoffices!
</div>
</ng-template>
</div>
</div>
</div>

View File

@ -1,212 +0,0 @@
import {
AfterViewInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
OnDestroy,
OnInit,
ViewChild,
ViewEncapsulation,
} from '@angular/core';
import {
FormBuilder,
FormControl,
FormGroup,
Validators,
} from '@angular/forms';
import { MatCheckboxChange } from '@angular/material/checkbox';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import {
debounceTime,
map,
merge,
Observable,
Subject,
switchMap,
takeUntil,
} from 'rxjs';
import { fuseAnimations } from '@fuse/animations';
import { FuseConfirmationService } from '@fuse/services/confirmation';
import { User } from '../../user/models/user';
import { Partner as PartnerMainoffice } from '../models/partner';
import { PartnerPagination as PartnerMainofficePagination } from '../models/partner-pagination';
import { PartnerService as PartnerMainofficeService } from '../services/partner.service';
import { Router } from '@angular/router';
import { MatDialog } from '@angular/material/dialog';
import { RegistComposeComponent } from '../compose/regist-compose.component';
@Component({
selector: 'app-partner-main-office-list',
templateUrl: './main-office-list.component.html',
styles: [
/* language=SCSS */
`
.inventory-grid {
grid-template-columns: 60px auto 40px;
@screen sm {
grid-template-columns: 60px 60px 60px 60px 60px 60px auto 60px;
}
@screen md {
grid-template-columns: 60px 60px 60px 60px 60px 60px auto 60px 60px;
}
@screen lg {
grid-template-columns: 60px 70px 70px 70px 70px 100px 60px 60px auto 60px 60px 60px 60px;
}
}
`,
],
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
animations: fuseAnimations,
})
export class MainOfficeListComponent
implements OnInit, AfterViewInit, OnDestroy
{
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
@ViewChild(MatSort) private _sort!: MatSort;
partnerMainoffices$!: Observable<PartnerMainoffice[] | undefined>;
users$!: Observable<User[] | undefined>;
isLoading = false;
searchInputControl = new FormControl();
selectedPartnerMainoffice?: PartnerMainoffice;
pagination?: PartnerMainofficePagination;
private _unsubscribeAll: Subject<any> = new Subject<any>();
/**
* Constructor
*/
constructor(
private _changeDetectorRef: ChangeDetectorRef,
private _fuseConfirmationService: FuseConfirmationService,
private _formBuilder: FormBuilder,
private _partnerMainofficeService: PartnerMainofficeService,
private router: Router,
private _matDialog: MatDialog
) {}
// -----------------------------------------------------------------------------------------------------
// @ Lifecycle hooks
// -----------------------------------------------------------------------------------------------------
/**
* On init
*/
ngOnInit(): void {
// Get the pagination
this._partnerMainofficeService.pagination$
.pipe(takeUntil(this._unsubscribeAll))
.subscribe((pagination: PartnerMainofficePagination | undefined) => {
// Update the pagination
this.pagination = pagination;
// Mark for check
this._changeDetectorRef.markForCheck();
});
// Get the products
this.partnerMainoffices$ = this._partnerMainofficeService.partners$;
}
/**
* After view init
*/
ngAfterViewInit(): void {
if (this._sort && this._paginator) {
// Set the initial sort
this._sort.sort({
id: 'name',
start: 'asc',
disableClear: true,
});
// Mark for check
this._changeDetectorRef.markForCheck();
// If the partnerMainoffice 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._partnerMainofficeService.getPartners(
this._paginator.pageIndex,
this._paginator.pageSize,
this._sort.active,
this._sort.direction
);
}),
map(() => {
this.isLoading = false;
})
)
.subscribe();
}
}
/**
* On destroy
*/
ngOnDestroy(): void {
// Unsubscribe from all subscriptions
this._unsubscribeAll.next(null);
this._unsubscribeAll.complete();
}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
viewUserDetail(id: string): void {
let url: string = 'member/user/' + id;
this.router.navigateByUrl(url);
}
// -----------------------------------------------------------------------------------------------------
// @ Private methods
// -----------------------------------------------------------------------------------------------------
/**
* Create product
*/
__createProduct(): void {}
/**
* Toggle product details
*
* @param productId
*/
__toggleDetails(productId: string): void {}
/**
* Track by function for ngFor loops
*
* @param index
* @param item
*/
__trackByFn(index: number, item: any): any {
return item.id || index;
}
__onClickRegist(event: MouseEvent): void {
const dialogRef = this._matDialog.open(RegistComposeComponent);
dialogRef.afterClosed().subscribe((result) => {
console.log('Compose dialog was closed!');
});
}
}

View File

@ -1,364 +0,0 @@
<div
class="sm:absolute sm:inset-0 flex flex-col flex-auto min-w-0 sm:overflow-hidden bg-card dark:bg-transparent"
>
<!-- Header -->
<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"
>
<!-- Loader -->
<div class="absolute inset-x-0 bottom-0" *ngIf="isLoading">
<mat-progress-bar [mode]="'indeterminate'"></mat-progress-bar>
</div>
<!-- Title -->
<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">
<!-- Memo -->
<!-- <mat-form-field>
<ng-container *ngIf="partnerOffices$ | async as partnerOffices">
<ng-container
*ngFor="let partnerOffice of partnerOffices; trackBy: __trackByFn"
>
<div
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
>
<fieldset>
총 파트너수:{{ partnerOffice.totalPartnerCount }} 총 보유머니:{{
partnerOffice.totalHoldingMoney
}}
총 콤프:{{ partnerOffice.totalComp }} 총 합계:{{
partnerOffice.total
}}
</fieldset>
</div>
</ng-container>
</ng-container>
</mat-form-field> -->
<!-- SelectBox -->
<mat-form-field>
<mat-select placeholder="리스트수">
<mat-option value="40">40</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-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-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> -->
<!-- Search -->
<mat-form-field
class="fuse-mat-dense fuse-mat-no-subscript fuse-mat-rounded min-w-64"
>
<mat-icon
class="icon-size-5"
matPrefix
[svgIcon]="'heroicons_solid:search'"
></mat-icon>
<input
matInput
[formControl]="searchInputControl"
[autocomplete]="'off'"
[placeholder]="'Search'"
/>
</mat-form-field>
<!-- Add user button -->
<button
class="ml-4"
mat-flat-button
[color]="'primary'"
(click)="__createProduct()"
>
<!-- <mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon> -->
<span class="ml-2 mr-1">검색하기</span>
</button>
<button>엑셀저장</button>
<button>카지노머니확인</button>
</div>
</div>
<!-- Main -->
<div class="flex flex-auto overflow-hidden">
<!-- Products list -->
<div
class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto"
>
<ng-container *ngIf="partnerOffices$ | async as partnerOffices">
<ng-container *ngIf="partnerOffices.length > 0; else noPartnerOffice">
<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"
matSort
matSortDisableClear
>
<div class="hidden sm:block"><mat-checkbox></mat-checkbox></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 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 class="hidden sm:block">상태</div>
<div class="hidden sm:block">회원수</div>
<div class="hidden sm:block">비고</div>
</div>
<!-- Rows -->
<ng-container *ngIf="partnerOffices$ | async as partnerOffices">
<ng-container
*ngFor="
let partnerOffice of partnerOffices;
trackBy: __trackByFn
"
>
<div
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
>
<div class="hidden sm:block truncate">
<mat-checkbox></mat-checkbox>
</div>
<!-- rate -->
<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'">
{{ partnerOffice.branchCount }}
</button>
<button mat-flat-button [color]="'primary'">
{{ partnerOffice.divisionCount }}
</button>
<button mat-flat-button [color]="'primary'">
{{ partnerOffice.officeCount }}
</button>
<button mat-flat-button [color]="'primary'">
{{ partnerOffice.storeCount }}
</button>
</div>
<!-- 회원수 -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
{{ partnerOffice.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!)"
>
{{ partnerOffice.id }}
</div>
</ng-container>
</ng-container>
<!-- nickname -->
<div class="hidden sm:block truncate">
{{ partnerOffice.nickname }}
</div>
<!-- accountHolder -->
<div class="hidden sm:block truncate">
{{ partnerOffice.accountHolder }}
</div>
<!-- 연락처 -->
<div class="hidden sm:block truncate">
{{ partnerOffice.phoneNumber }}
</div>
<!-- 정산 -->
<div class="hidden sm:block truncate">
{{ partnerOffice.calculateType }}
</div>
<!-- 보유금 -->
<div class="hidden sm:block truncate">
캐쉬{{ partnerOffice.ownCash }} 콤프{{
partnerOffice.ownComp
}}
쿠폰{{ partnerOffice.ownCoupon }}
</div>
<!-- gameMoney -->
<div class="hidden sm:block truncate">
{{ partnerOffice.gameMoney }}
</div>
<!-- casinoCash -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
게임머니확인
</button>
<button mat-flat-button [color]="'primary'">
게임머니회수
</button>
</div>
<!-- todayComp -->
<div class="hidden sm:block truncate">
{{ partnerOffice.todayComp }}P
</div>
<!-- 총입출 -->
<div class="hidden sm:block truncate">
입금{{ partnerOffice.totalDeposit }} 출금{{
partnerOffice.totalWithdraw
}}
차익{{ partnerOffice.balance }}
</div>
<!-- log -->
<div class="hidden sm:block truncate">
가입{{ partnerOffice.registDate }} 최종{{
partnerOffice.finalSigninDate
}}
IP{{ partnerOffice.ip }}
</div>
<!-- state -->
<div class="hidden sm:block truncate">
{{ partnerOffice.state }}
</div>
<!-- 회원수 -->
<div class="hidden sm:block truncate">
{{ partnerOffice.memberCount }}
</div>
<!-- 비고 -->
<div class="hidden sm:block truncate">
<button
mat-flat-button
[color]="'primary'"
(click)="__onClickRegist($event)"
>
매장등록
{{ partnerOffice.note }}
</button>
</div>
</div>
</ng-container>
</ng-container>
</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 #noPartnerOffice>
<div
class="p-8 sm:p-16 border-t text-4xl font-semibold tracking-tight text-center"
>
There are no partner offices!
</div>
</ng-template>
</div>
</div>
</div>

View File

@ -1,212 +0,0 @@
import {
AfterViewInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
OnDestroy,
OnInit,
ViewChild,
ViewEncapsulation,
} from '@angular/core';
import {
FormBuilder,
FormControl,
FormGroup,
Validators,
} from '@angular/forms';
import { MatCheckboxChange } from '@angular/material/checkbox';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import {
debounceTime,
map,
merge,
Observable,
Subject,
switchMap,
takeUntil,
} from 'rxjs';
import { fuseAnimations } from '@fuse/animations';
import { FuseConfirmationService } from '@fuse/services/confirmation';
import { User } from '../../user/models/user';
import { Partner as PartnerOffice } from '../models/partner';
import { PartnerPagination as PartnerOfficePagination } from '../models/partner-pagination';
import { PartnerService as PartnerOfficeService } from '../services/partner.service';
import { Router } from '@angular/router';
import { MatDialog } from '@angular/material/dialog';
import { RegistComposeComponent } from '../compose/regist-compose.component';
@Component({
selector: 'app-partner-office-list',
templateUrl: './office-list.component.html',
styles: [
/* language=SCSS */
`
.inventory-grid {
grid-template-columns: 60px auto 40px;
@screen sm {
grid-template-columns: 60px 60px 60px 60px 60px 60px auto 60px;
}
@screen md {
grid-template-columns: 60px 60px 60px 60px 60px 60px auto 60px 60px;
}
@screen lg {
grid-template-columns: 60px 70px 70px 70px 70px 100px 60px 60px auto 60px 60px 60px 60px;
}
}
`,
],
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
animations: fuseAnimations,
})
export class OfficeListComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
@ViewChild(MatSort) private _sort!: MatSort;
partnerOffices$!: Observable<PartnerOffice[] | undefined>;
users$!: Observable<User[] | undefined>;
isLoading = false;
searchInputControl = new FormControl();
selectedPartnerOffice?: PartnerOffice;
pagination?: PartnerOfficePagination;
private _unsubscribeAll: Subject<any> = new Subject<any>();
/**
* Constructor
*/
constructor(
private _changeDetectorRef: ChangeDetectorRef,
private _fuseConfirmationService: FuseConfirmationService,
private _formBuilder: FormBuilder,
private _partnerOfficeService: PartnerOfficeService,
private router: Router,
private _matDialog: MatDialog
) {}
// -----------------------------------------------------------------------------------------------------
// @ Lifecycle hooks
// -----------------------------------------------------------------------------------------------------
/**
* On init
*/
ngOnInit(): void {
// Get the pagination
this._partnerOfficeService.pagination$
.pipe(takeUntil(this._unsubscribeAll))
.subscribe((pagination: PartnerOfficePagination | undefined) => {
// Update the pagination
this.pagination = pagination;
// Mark for check
this._changeDetectorRef.markForCheck();
});
// Get the products
this.partnerOffices$ = this._partnerOfficeService.partners$;
}
/**
* After view init
*/
ngAfterViewInit(): void {
if (this._sort && this._paginator) {
// Set the initial sort
this._sort.sort({
id: 'name',
start: 'asc',
disableClear: true,
});
// Mark for check
this._changeDetectorRef.markForCheck();
// If the partnerOffice 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._partnerOfficeService.getPartners(
this._paginator.pageIndex,
this._paginator.pageSize,
this._sort.active,
this._sort.direction
);
}),
map(() => {
this.isLoading = false;
})
)
.subscribe();
}
}
/**
* On destroy
*/
ngOnDestroy(): void {
// Unsubscribe from all subscriptions
this._unsubscribeAll.next(null);
this._unsubscribeAll.complete();
}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
viewUserDetail(id: string): void {
let url: string = 'member/user/' + id;
this.router.navigateByUrl(url);
}
// -----------------------------------------------------------------------------------------------------
// @ Private methods
// -----------------------------------------------------------------------------------------------------
/**
* Create product
*/
__createProduct(): void {}
/**
* Toggle product details
*
* @param productId
*/
__toggleDetails(productId: string): void {}
/**
* Track by function for ngFor loops
*
* @param index
* @param item
*/
__trackByFn(index: number, item: any): any {
return item.id || index;
}
__onClickRegist(event: MouseEvent): void {
const dialogRef = this._matDialog.open(RegistComposeComponent);
dialogRef.afterClosed().subscribe((result) => {
console.log('Compose dialog was closed!');
});
}
}

View File

@ -40,7 +40,7 @@ import { Router } from '@angular/router';
import { MatDialog } from '@angular/material/dialog'; import { MatDialog } from '@angular/material/dialog';
import { RegistComposeComponent } from '../compose/regist-compose.component'; import { RegistComposeComponent } from '../compose/regist-compose.component';
@Component({ @Component({
selector: 'app-partner-recommendation-list', selector: 'recommendation-list',
templateUrl: './recommendation-list.component.html', templateUrl: './recommendation-list.component.html',
styles: [ styles: [
/* language=SCSS */ /* language=SCSS */

View File

@ -1,361 +0,0 @@
<div
class="sm:absolute sm:inset-0 flex flex-col flex-auto min-w-0 sm:overflow-hidden bg-card dark:bg-transparent"
>
<!-- Header -->
<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"
>
<!-- Loader -->
<div class="absolute inset-x-0 bottom-0" *ngIf="isLoading">
<mat-progress-bar [mode]="'indeterminate'"></mat-progress-bar>
</div>
<!-- Title -->
<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">
<!-- Memo -->
<!-- <mat-form-field>
<ng-container *ngIf="partnerStores$ | async as partnerStores">
<ng-container
*ngFor="let partnerStore of partnerStores; trackBy: __trackByFn"
>
<div
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
>
<fieldset>
총 파트너수:{{ partnerStore.totalPartnerCount }} 총 보유머니:{{
partnerStore.totalHoldingMoney
}}
총 콤프:{{ partnerStore.totalComp }} 총 합계:{{
partnerStore.total
}}
</fieldset>
</div>
</ng-container>
</ng-container>
</mat-form-field> -->
<!-- SelectBox -->
<mat-form-field>
<mat-select placeholder="리스트수">
<mat-option value="40">40</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-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-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> -->
<!-- Search -->
<mat-form-field
class="fuse-mat-dense fuse-mat-no-subscript fuse-mat-rounded min-w-64"
>
<mat-icon
class="icon-size-5"
matPrefix
[svgIcon]="'heroicons_solid:search'"
></mat-icon>
<input
matInput
[formControl]="searchInputControl"
[autocomplete]="'off'"
[placeholder]="'Search'"
/>
</mat-form-field>
<!-- Add user button -->
<button
class="ml-4"
mat-flat-button
[color]="'primary'"
(click)="__createProduct()"
>
<!-- <mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon> -->
<span class="ml-2 mr-1">검색하기</span>
</button>
<button>엑셀저장</button>
<button>카지노머니확인</button>
</div>
</div>
<!-- Main -->
<div class="flex flex-auto overflow-hidden">
<!-- Products list -->
<div
class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto"
>
<ng-container *ngIf="partnerStores$ | async as partnerStores">
<ng-container *ngIf="partnerStores.length > 0; else noPartnerStore">
<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"
matSort
matSortDisableClear
>
<div class="hidden sm:block"><mat-checkbox></mat-checkbox></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 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 class="hidden sm:block">상태</div>
<div class="hidden sm:block">회원수</div>
<div class="hidden sm:block">비고</div>
</div>
<!-- Rows -->
<ng-container *ngIf="partnerStores$ | async as partnerStores">
<ng-container
*ngFor="let partnerStore of partnerStores; trackBy: __trackByFn"
>
<div
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
>
<div class="hidden sm:block truncate">
<mat-checkbox></mat-checkbox>
</div>
<!-- rate -->
<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'">
{{ partnerStore.branchCount }}
</button>
<button mat-flat-button [color]="'primary'">
{{ partnerStore.divisionCount }}
</button>
<button mat-flat-button [color]="'primary'">
{{ partnerStore.officeCount }}
</button>
<button mat-flat-button [color]="'primary'">
{{ partnerStore.storeCount }}
</button>
</div>
<!-- 회원수 -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
{{ partnerStore.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!)"
>
{{ partnerStore.id }}
</div>
</ng-container>
</ng-container>
<!-- nickname -->
<div class="hidden sm:block truncate">
{{ partnerStore.nickname }}
</div>
<!-- accountHolder -->
<div class="hidden sm:block truncate">
{{ partnerStore.accountHolder }}
</div>
<!-- 연락처 -->
<div class="hidden sm:block truncate">
{{ partnerStore.phoneNumber }}
</div>
<!-- 정산 -->
<div class="hidden sm:block truncate">
{{ partnerStore.calculateType }}
</div>
<!-- 보유금 -->
<div class="hidden sm:block truncate">
캐쉬{{ partnerStore.ownCash }} 콤프{{
partnerStore.ownComp
}}
쿠폰{{ partnerStore.ownCoupon }}
</div>
<!-- gameMoney -->
<div class="hidden sm:block truncate">
{{ partnerStore.gameMoney }}
</div>
<!-- casinoCash -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
게임머니확인
</button>
<button mat-flat-button [color]="'primary'">
게임머니회수
</button>
</div>
<!-- todayComp -->
<div class="hidden sm:block truncate">
{{ partnerStore.todayComp }}P
</div>
<!-- 총입출 -->
<div class="hidden sm:block truncate">
입금{{ partnerStore.totalDeposit }} 출금{{
partnerStore.totalWithdraw
}}
차익{{ partnerStore.balance }}
</div>
<!-- log -->
<div class="hidden sm:block truncate">
가입{{ partnerStore.registDate }} 최종{{
partnerStore.finalSigninDate
}}
IP{{ partnerStore.ip }}
</div>
<!-- state -->
<div class="hidden sm:block truncate">
{{ partnerStore.state }}
</div>
<!-- 회원수 -->
<div class="hidden sm:block truncate">
{{ partnerStore.memberCount }}
</div>
<!-- 비고 -->
<div class="hidden sm:block truncate">
<button
mat-flat-button
[color]="'primary'"
(click)="__onClickRegist($event)"
>
회원등록
{{ partnerStore.note }}
</button>
</div>
</div>
</ng-container>
</ng-container>
</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 #noPartnerStore>
<div
class="p-8 sm:p-16 border-t text-4xl font-semibold tracking-tight text-center"
>
There are no partner stores!
</div>
</ng-template>
</div>
</div>
</div>

View File

@ -1,210 +0,0 @@
import {
AfterViewInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
OnDestroy,
OnInit,
ViewChild,
ViewEncapsulation,
} from '@angular/core';
import {
FormBuilder,
FormControl,
FormGroup,
Validators,
} from '@angular/forms';
import { MatCheckboxChange } from '@angular/material/checkbox';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import {
debounceTime,
map,
merge,
Observable,
Subject,
switchMap,
takeUntil,
} from 'rxjs';
import { fuseAnimations } from '@fuse/animations';
import { FuseConfirmationService } from '@fuse/services/confirmation';
import { User } from '../../user/models/user';
import { Partner as PartnerStore } from '../models/partner';
import { PartnerPagination as PartnerStorePagination } from '../models/partner-pagination';
import { PartnerService as PartnerStoreService } from '../services/partner.service';
import { Router } from '@angular/router';
import { MatDialog } from '@angular/material/dialog';
import { RegistComposeComponent } from '../compose/regist-compose.component';
@Component({
selector: 'app-partner-store-list',
templateUrl: './store-list.component.html',
styles: [
/* language=SCSS */
`
.inventory-grid {
grid-template-columns: 60px auto 40px;
@screen sm {
grid-template-columns: 60px 60px 60px 60px 60px 60px auto 60px;
}
@screen md {
grid-template-columns: 60px 60px 60px 60px 60px 60px auto 60px 60px;
}
@screen lg {
grid-template-columns: 60px 70px 70px 70px 70px 100px 60px 60px auto 60px 60px 60px 60px;
}
}
`,
],
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
animations: fuseAnimations,
})
export class StoreListComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
@ViewChild(MatSort) private _sort!: MatSort;
partnerStores$!: Observable<PartnerStore[] | undefined>;
users$!: Observable<User[] | undefined>;
isLoading = false;
searchInputControl = new FormControl();
selectedPartnerStore?: PartnerStore;
pagination?: PartnerStorePagination;
private _unsubscribeAll: Subject<any> = new Subject<any>();
/**
* Constructor
*/
constructor(
private _changeDetectorRef: ChangeDetectorRef,
private _fuseConfirmationService: FuseConfirmationService,
private _formBuilder: FormBuilder,
private _partnerStoreService: PartnerStoreService,
private router: Router,
private _matDialog: MatDialog
) {}
// -----------------------------------------------------------------------------------------------------
// @ Lifecycle hooks
// -----------------------------------------------------------------------------------------------------
/**
* On init
*/
ngOnInit(): void {
// Get the pagination
this._partnerStoreService.pagination$
.pipe(takeUntil(this._unsubscribeAll))
.subscribe((pagination: PartnerStorePagination | undefined) => {
// Update the pagination
this.pagination = pagination;
// Mark for check
this._changeDetectorRef.markForCheck();
});
// Get the products
this.partnerStores$ = this._partnerStoreService.partners$;
}
/**
* After view init
*/
ngAfterViewInit(): void {
if (this._sort && this._paginator) {
// Set the initial sort
this._sort.sort({
id: 'name',
start: 'asc',
disableClear: true,
});
// Mark for check
this._changeDetectorRef.markForCheck();
// If the partnerStore 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._partnerStoreService.getPartners(
this._paginator.pageIndex,
this._paginator.pageSize,
this._sort.active,
this._sort.direction
);
}),
map(() => {
this.isLoading = false;
})
)
.subscribe();
}
}
/**
* On destroy
*/
ngOnDestroy(): void {
// Unsubscribe from all subscriptions
this._unsubscribeAll.next(null);
this._unsubscribeAll.complete();
}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
viewUserDetail(id: string): void {
let url: string = 'member/user/' + id;
this.router.navigateByUrl(url);
}
// -----------------------------------------------------------------------------------------------------
// @ Private methods
// -----------------------------------------------------------------------------------------------------
/**
* Create product
*/
__createProduct(): void {}
/**
* Toggle product details
*
* @param productId
*/
__toggleDetails(productId: string): void {}
/**
* Track by function for ngFor loops
*
* @param index
* @param item
*/
__trackByFn(index: number, item: any): any {
return item.id || index;
}
__onClickRegist(event: MouseEvent): void {
const dialogRef = this._matDialog.open(RegistComposeComponent);
dialogRef.afterClosed().subscribe((result) => {
console.log('Compose dialog was closed!');
});
}
}

View File

@ -10,6 +10,7 @@ export interface Partner {
officeCount?: number; officeCount?: number;
storeCount?: number; storeCount?: number;
memberCount?: number; memberCount?: number;
ownMemberCount?: number;
level?: string; level?: string;
calculateType?: string; calculateType?: string;
holdingMoney?: number; holdingMoney?: number;

View File

@ -1,68 +1,28 @@
import { Route } from '@angular/router'; import { Route } from '@angular/router';
import { AllListComponent } from './components/all-list.component'; import { ListComponent } from './components/list.component';
import { MainOfficeListComponent } from './components/main-office-list.component';
import { OfficeListComponent } from './components/office-list.component';
import { BranchListComponent } from './components/branch-list.component';
import { DivisionListComponent } from './components/division-list.component';
import { RecommendationListComponent } from './components/recommendation-list.component'; import { RecommendationListComponent } from './components/recommendation-list.component';
import { StoreListComponent } from './components/store-list.component';
import { PartnersResolver } from './resolvers/partner.resolver'; import { PartnersResolver } from './resolvers/partner.resolver';
export const partnerRoutes: Route[] = [ export const partnerRoutes: Route[] = [
// {
// path: '',
// pathMatch: 'full',
// redirectTo: 'all',
// },
{ {
path: '', path: '',
pathMatch: 'full', component: ListComponent,
redirectTo: 'all',
},
{
path: 'all',
component: AllListComponent,
resolve: { resolve: {
Partners: PartnersResolver, Partners: PartnersResolver,
}, },
}, },
{ {
path: 'main-office', path: '',
component: MainOfficeListComponent,
resolve: {
Partners: PartnersResolver,
},
},
{
path: 'branch',
component: BranchListComponent,
resolve: {
Partners: PartnersResolver,
},
},
{
path: 'division',
component: DivisionListComponent,
resolve: {
Partners: PartnersResolver,
},
},
{
path: 'recommendation',
component: RecommendationListComponent, component: RecommendationListComponent,
resolve: { resolve: {
Partners: PartnersResolver, Partners: PartnersResolver,
}, },
}, },
{
path: 'office',
component: OfficeListComponent,
resolve: {
Partners: PartnersResolver,
},
},
{
path: 'store',
component: StoreListComponent,
resolve: {
Partners: PartnersResolver,
},
},
]; ];

View File

@ -6,12 +6,7 @@
"Casino Money": "Casino Money", "Casino Money": "Casino Money",
"Unconnected": "Unconnected", "Unconnected": "Unconnected",
"Project": "Project", "Project": "Project",
"All Partner": "All Partner", "Partner": "Partner",
"Partner Mainoffice": "Partner Mainoffice",
"Partner Branch": "Partner Branch",
"Partner Division": "Partner Division",
"Partner Office": "Partner Office",
"Partner Store": "Partner Store",
"Partner Recommendation": "Partner Recommendation", "Partner Recommendation": "Partner Recommendation",
"Coupon": "Coupon", "Coupon": "Coupon",
"Coupon Money Log": "Coupon Money Log", "Coupon Money Log": "Coupon Money Log",

View File

@ -7,12 +7,7 @@
"Unconnected": "장기미접속회원", "Unconnected": "장기미접속회원",
"Project": "프로젝트", "Project": "프로젝트",
"partner-management": "파트너관리", "partner-management": "파트너관리",
"All Partner": "전체파트너", "Partner": "파트너",
"Partner Mainoffice": "본사",
"Partner Branch": "대본",
"Partner Division": "부본",
"Partner Office": "총판",
"Partner Store": "매장",
"Partner Recommendation": "추천코드등록", "Partner Recommendation": "추천코드등록",
"Coupon": "쿠폰발행리스트", "Coupon": "쿠폰발행리스트",
"Coupon Money Log": "쿠폰발행머니로그", "Coupon Money Log": "쿠폰발행머니로그",