Merge branch 'feature/BETERAN-BACKEND-APP-BROWSER-init' of https://gitlab.loafle.net/bet/beteran-backend-app-browser into feature/BETERAN-BACKEND-APP-BROWSER-init
This commit is contained in:
commit
60f7417cdf
|
@ -57,20 +57,24 @@
|
|||
<div fxLayout="row wrap" class="items-center mt-6 sm:mt-0 sm:ml-0">
|
||||
<!-- Search -->
|
||||
<!-- Card inception -->
|
||||
<mat-form-field [floatLabel]="'always'">
|
||||
<mat-form-field
|
||||
[floatLabel]="'always'"
|
||||
class="bet-mat-form-field-wrapper-mb-0 mr-2"
|
||||
>
|
||||
<input
|
||||
matInput
|
||||
[matDatepicker]="picker1"
|
||||
[placeholder]="'Choose a date'"
|
||||
/>
|
||||
<mat-datepicker-toggle
|
||||
matSuffix
|
||||
[for]="picker1"
|
||||
></mat-datepicker-toggle>
|
||||
<mat-datepicker-toggle matSuffix [for]="picker1">
|
||||
</mat-datepicker-toggle>
|
||||
<mat-datepicker #picker1></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<!-- Card expiration -->
|
||||
<mat-form-field [floatLabel]="'always'">
|
||||
<mat-form-field
|
||||
[floatLabel]="'always'"
|
||||
class="bet-mat-form-field-wrapper-mb-0 mr-2"
|
||||
>
|
||||
<input
|
||||
matInput
|
||||
[matDatepicker]="picker2"
|
||||
|
@ -82,30 +86,25 @@
|
|||
></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker2></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field fxFlex class="bet-mat-form-field-wrapper-mb-0 mr-2">
|
||||
<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 fxFlex class="bet-mat-form-field-wrapper-mb-0 mr-2">
|
||||
<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>
|
||||
<ng-container *ngIf="listMemberLevels$ | async as memberLevels">
|
||||
<mat-option>None</mat-option>
|
||||
<ng-container *ngFor="let ml of memberLevels; let i = index">
|
||||
<mat-option [value]="ml.getId()">{{ ml.getName() }}</mat-option>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field fxFlex class="bet-mat-form-field-wrapper-mb-0 mr-2">
|
||||
<mat-select placeholder="상태">
|
||||
<mat-option value="">정상</mat-option>
|
||||
<mat-option value="">대기</mat-option>
|
||||
<mat-option value="">탈퇴</mat-option>
|
||||
<mat-option value="">휴면</mat-option>
|
||||
<mat-option value="">블랙</mat-option>
|
||||
<mat-option value="">정지</mat-option>
|
||||
<mat-option>None</mat-option>
|
||||
<mat-option value="NORMAL">정상</mat-option>
|
||||
<mat-option value="PENDING">대기</mat-option>
|
||||
<mat-option value="WITHDRAWAL">탈퇴</mat-option>
|
||||
<mat-option value="DORMANCY">휴면</mat-option>
|
||||
<mat-option value="BLACKLIST">블랙</mat-option>
|
||||
<mat-option value="SUSPENDED">정지</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field fxFlex class="bet-mat-form-field-wrapper-mb-0 mr-2">
|
||||
|
@ -205,8 +204,6 @@
|
|||
<div class="grid">
|
||||
<!-- Header -->
|
||||
<div
|
||||
matSort
|
||||
matSortDisableClear
|
||||
class="user-grid z-10 sticky top-0 grid gap-4 py-4 px-6 md:px-8 shadow text-md font-semibold text-secondary bg-gray-50 dark:bg-black dark:bg-opacity-5"
|
||||
>
|
||||
<div style="text-align: center">
|
||||
|
@ -218,38 +215,39 @@
|
|||
<div style="text-align: center">요율</div>
|
||||
<div style="text-align: center">상부</div>
|
||||
<div style="text-align: center">
|
||||
<div>아이디</div>
|
||||
|
||||
<span>아이디</span>
|
||||
<hr style="margin: 7px 0px" />
|
||||
닉네임
|
||||
<span>닉네임</span>
|
||||
<hr style="margin: 7px 0px" />
|
||||
연락처
|
||||
<span>연락처</span>
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
등급
|
||||
<span>등급</span>
|
||||
<hr style="margin: 7px 0px" />
|
||||
레벨
|
||||
<span>레벨</span>
|
||||
<hr style="margin: 7px 0px" />
|
||||
상태
|
||||
<span>상태</span>
|
||||
</div>
|
||||
<div class="hidden sm:block" style="text-align: center">
|
||||
예금주
|
||||
<span>예금주</span>
|
||||
</div>
|
||||
<div class="hidden md:block" style="text-align: center">
|
||||
보유금
|
||||
<span>보유금</span>
|
||||
</div>
|
||||
<div class="hidden md:block" style="text-align: center">
|
||||
게임중머니
|
||||
<span>게임중머니</span>
|
||||
<hr style="margin: 7px 0px" />
|
||||
금일콤프
|
||||
<span>금일콤프</span>
|
||||
</div>
|
||||
<div class="hidden md:block" style="text-align: center">
|
||||
총입출
|
||||
<span>총입출</span>
|
||||
</div>
|
||||
<div class="hidden lg:block" style="text-align: center">
|
||||
카지노->캐쉬
|
||||
<span>카지노->캐쉬</span>
|
||||
</div>
|
||||
<div class="hidden lg:block" style="text-align: center">
|
||||
<span>로그</span>
|
||||
</div>
|
||||
<div class="hidden lg:block" style="text-align: center">로그</div>
|
||||
</div>
|
||||
<!-- Rows -->
|
||||
<ng-container *ngIf="listMembers$ | async as mebers">
|
||||
|
|
|
@ -12,7 +12,7 @@ import {
|
|||
} from '@angular/core';
|
||||
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
import { MatSort, Sort } from '@angular/material/sort';
|
||||
import {
|
||||
map,
|
||||
merge,
|
||||
|
@ -42,6 +42,9 @@ import { MemberClass } from 'app/modules/proto/models/member_class_pb';
|
|||
import { MemberClassService } from 'app/modules/polyglot/member_class/services/member_class.service';
|
||||
import { result } from 'lodash';
|
||||
import { MatCheckbox, MatCheckboxChange } from '@angular/material/checkbox';
|
||||
import { ListMemberLevelsResponse } from 'app/modules/proto/c2se/member_level_pb';
|
||||
import { MemberLevel } from 'app/modules/proto/models/member_level_pb';
|
||||
import { ListMemberClassesResponse } from 'app/modules/proto/c2se/member_class_pb';
|
||||
|
||||
@Component({
|
||||
selector: 'user-list',
|
||||
|
@ -85,6 +88,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
@ViewChildren('chkUsers') chkUsers!: QueryList<MatCheckbox>;
|
||||
|
||||
listMembers$!: Observable<MemberModel[] | undefined>;
|
||||
listMemberLevels$!: Observable<MemberLevel[] | undefined>;
|
||||
|
||||
__isSearchOpened = false;
|
||||
isLoading = false;
|
||||
|
@ -133,17 +137,19 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
this._changeDetectorRef.markForCheck();
|
||||
});
|
||||
|
||||
// Get the products
|
||||
this._memberClassService
|
||||
.listMemberClasss()
|
||||
.then((result) => (this.memberClasses = result.getMemberClassesList()));
|
||||
|
||||
// Get the products
|
||||
this._activatedRoute.data.subscribe((data) => {
|
||||
let listMemberResult: ListMembersResponse.Result = data['listmembers'];
|
||||
|
||||
this.listMembers$ = of(listMemberResult.getMembersList());
|
||||
|
||||
let listMemberLevelsResult: ListMemberLevelsResponse.Result =
|
||||
data['listMemberLevels'];
|
||||
this.listMemberLevels$ = of(listMemberLevelsResult.getMemberLevelsList());
|
||||
|
||||
let listMemberClassesResult: ListMemberClassesResponse.Result =
|
||||
data['listMemberClasses'];
|
||||
this.memberClasses = listMemberClassesResult.getMemberClassesList();
|
||||
|
||||
// Mark for check
|
||||
this._changeDetectorRef.markForCheck();
|
||||
});
|
||||
|
@ -355,7 +361,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
}
|
||||
|
||||
__getParentUsername(member: MemberModel): string {
|
||||
if (!member.getParentMember()) {
|
||||
if (!member || !member.getParentMember()) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
@ -371,6 +377,8 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
return `[${findClass.getName()}]${parentUsername}`;
|
||||
}
|
||||
|
||||
__onMatSortChangeUsers(sort: Sort): void {}
|
||||
|
||||
__getMemberState(member: MemberModel): string {
|
||||
const state = member.getState();
|
||||
let resultStr = '';
|
||||
|
|
|
@ -53,6 +53,7 @@ import { MatDrawer } from '@angular/material/sidenav';
|
|||
import { FuseMediaWatcherService } from '@fuse/services/media-watcher';
|
||||
import { FuseAlertType } from '@fuse/components/alert';
|
||||
import { MatSelectChange } from '@angular/material/select';
|
||||
import { ListMemberLevelsResponse } from 'app/modules/proto/c2se/member_level_pb';
|
||||
import {
|
||||
UpdateMemberBankAccountForExchangePasswordRequest,
|
||||
UpdateMemberBankAccountRequest,
|
||||
|
@ -298,7 +299,7 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
this._changeDetectorRef.markForCheck();
|
||||
});
|
||||
|
||||
this._memberLevelService.listMemberLevels().then((result) => {
|
||||
/* this._memberLevelService.listMemberLevels().then((result) => {
|
||||
this.memberLevels = result
|
||||
.getMemberLevelsList()
|
||||
.filter((v) => !!v.getShow());
|
||||
|
@ -307,7 +308,8 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
.get('levelName')
|
||||
?.setValue(this.currentMember?.getMemberLevel()?.getName());
|
||||
this._changeDetectorRef.markForCheck();
|
||||
});
|
||||
}); */
|
||||
|
||||
this._bankService.listBanks().then((result) => {
|
||||
this.memberBankForm.get('bankName')?.value;
|
||||
|
||||
|
@ -340,6 +342,11 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
state: this.currentMember?.getState(),
|
||||
nickname: this.currentMember?.getNickname(),
|
||||
});
|
||||
|
||||
let listMemberLevelsResult: ListMemberLevelsResponse.Result =
|
||||
data['listMemberLevels'];
|
||||
this.memberLevels = listMemberLevelsResult.getMemberLevelsList();
|
||||
|
||||
// Mark for check
|
||||
this._changeDetectorRef.markForCheck();
|
||||
});
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
ActivatedRouteSnapshot,
|
||||
Resolve,
|
||||
Router,
|
||||
RouterStateSnapshot,
|
||||
} from '@angular/router';
|
||||
import { MemberClassService } from 'app/modules/polyglot/member_class/services/member_class.service';
|
||||
import {
|
||||
ListMemberClassesRequest,
|
||||
ListMemberClassesResponse,
|
||||
} from 'app/modules/proto/c2se/member_class_pb';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class ListMemberClassesResolver implements Resolve<any> {
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
constructor(
|
||||
private _router: Router,
|
||||
private __memberClassService: MemberClassService
|
||||
) {}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
// @ Public methods
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Resolver
|
||||
*
|
||||
* @param route
|
||||
* @param state
|
||||
*/
|
||||
|
||||
resolve(
|
||||
route: ActivatedRouteSnapshot,
|
||||
state: RouterStateSnapshot
|
||||
):
|
||||
| Observable<ListMemberClassesResponse.Result>
|
||||
| Promise<ListMemberClassesResponse.Result>
|
||||
| ListMemberClassesResponse.Result {
|
||||
let search = new ListMemberClassesRequest.Search();
|
||||
search.setShow(true);
|
||||
let req = new ListMemberClassesRequest();
|
||||
req.setSearch(search);
|
||||
|
||||
return this.__memberClassService.listMemberClasss(req);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
ActivatedRouteSnapshot,
|
||||
Resolve,
|
||||
Router,
|
||||
RouterStateSnapshot,
|
||||
} from '@angular/router';
|
||||
|
||||
import { MemberLevelService } from 'app/modules/polyglot/member_level/services/member_level.service';
|
||||
import {
|
||||
ListMemberLevelsRequest,
|
||||
ListMemberLevelsResponse,
|
||||
} from 'app/modules/proto/c2se/member_level_pb';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class ListMemberLevelsResolver implements Resolve<any> {
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
constructor(
|
||||
private _router: Router,
|
||||
private __memberLevelService: MemberLevelService
|
||||
) {}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
// @ Public methods
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Resolver
|
||||
*
|
||||
* @param route
|
||||
* @param state
|
||||
*/
|
||||
|
||||
resolve(
|
||||
route: ActivatedRouteSnapshot,
|
||||
state: RouterStateSnapshot
|
||||
):
|
||||
| Observable<ListMemberLevelsResponse.Result>
|
||||
| Promise<ListMemberLevelsResponse.Result>
|
||||
| ListMemberLevelsResponse.Result {
|
||||
let search = new ListMemberLevelsRequest.Search();
|
||||
search.setShow(true);
|
||||
let req = new ListMemberLevelsRequest();
|
||||
req.setSearch(search);
|
||||
|
||||
return this.__memberLevelService.listMemberLevels(req);
|
||||
}
|
||||
}
|
|
@ -215,30 +215,3 @@ export class BanksResolver implements Resolve<any> {
|
|||
return this._bankService.listBanks();
|
||||
}
|
||||
}
|
||||
|
||||
export class MemberLevelsResolver implements Resolve<any> {
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
constructor(private _memberLevelService: MemberLevelService) {}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
// @ Public methods
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Resolver
|
||||
*
|
||||
* @param route
|
||||
* @param state
|
||||
*/
|
||||
resolve(
|
||||
route: ActivatedRouteSnapshot,
|
||||
state: RouterStateSnapshot
|
||||
):
|
||||
| Observable<ListMemberLevelsResponse.Result>
|
||||
| Promise<ListMemberLevelsResponse.Result>
|
||||
| ListMemberLevelsResponse.Result {
|
||||
return this._memberLevelService.listMemberLevels();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@ import { Route } from '@angular/router';
|
|||
|
||||
import { ListComponent } from 'app/modules/admin/member/user/components/list.component';
|
||||
import { ViewComponent } from 'app/modules/admin/member/user/components/view.component';
|
||||
import { ListMemberClassesResolver } from './resolvers/member-class.resolver';
|
||||
import { ListMemberLevelsResolver } from './resolvers/member-level.resolver';
|
||||
|
||||
import { MemberResolver, ListMemberResolver } from './resolvers/user.resolver';
|
||||
|
||||
|
@ -11,9 +13,8 @@ export const userRoutes: Route[] = [
|
|||
component: ListComponent,
|
||||
resolve: {
|
||||
listmembers: ListMemberResolver,
|
||||
// listMemberLevels: MemberLevelsResolver,
|
||||
// listSite: SitesResolver,
|
||||
// listBanks: BanksResolver,
|
||||
listMemberClasses: ListMemberClassesResolver,
|
||||
listMemberLevels: ListMemberLevelsResolver,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -21,6 +22,7 @@ export const userRoutes: Route[] = [
|
|||
component: ViewComponent,
|
||||
resolve: {
|
||||
member: MemberResolver,
|
||||
listMemberLevels: ListMemberLevelsResolver,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
|
@ -62,10 +62,10 @@ export class MemberClassService {
|
|||
});
|
||||
}
|
||||
|
||||
listMemberClasss(): Promise<ListMemberClassesResponse.Result> {
|
||||
listMemberClasss(
|
||||
req: ListMemberClassesRequest
|
||||
): Promise<ListMemberClassesResponse.Result> {
|
||||
return new Promise<ListMemberClassesResponse.Result>((resolve, reject) => {
|
||||
let req = new ListMemberClassesRequest();
|
||||
|
||||
this.__natsService
|
||||
.request<ListMemberClassesResponse.Result>(
|
||||
SUBJECT_LIST_MEMBER_CLASSES,
|
||||
|
|
|
@ -62,10 +62,10 @@ export class MemberLevelService {
|
|||
});
|
||||
}
|
||||
|
||||
listMemberLevels(): Promise<ListMemberLevelsResponse.Result> {
|
||||
listMemberLevels(
|
||||
req: ListMemberLevelsRequest
|
||||
): Promise<ListMemberLevelsResponse.Result> {
|
||||
return new Promise<ListMemberLevelsResponse.Result>((resolve, reject) => {
|
||||
let req = new ListMemberLevelsRequest();
|
||||
|
||||
this.__natsService
|
||||
.request<ListMemberLevelsResponse.Result>(
|
||||
SUBJECT_LIST_MEMBER_LEVELS,
|
||||
|
|
Loading…
Reference in New Issue
Block a user