카지노머니파악 page 수정

This commit is contained in:
이담 정 2022-07-20 07:57:51 +00:00
parent 1ab80bd5a5
commit fc5141c709
16 changed files with 157 additions and 157 deletions

View File

@ -151,11 +151,11 @@ export const appRoutes: Route[] = [
), ),
}, },
{ {
path: 'casinomoney', path: 'casino-money',
loadChildren: () => loadChildren: () =>
import( import(
'app/modules/admin/member/casinomoney/casinomoney.module' 'app/modules/admin/member/casino-money/casino-money.module'
).then((m: any) => m.CasinomoneyModule), ).then((m: any) => m.CasinoMoneyModule),
}, },
{ {
path: 'unconnected', path: 'unconnected',

View File

@ -1,13 +1,13 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { assign, cloneDeep } from 'lodash-es'; import { assign, cloneDeep } from 'lodash-es';
import { FuseMockApiService, FuseMockApiUtils } from '@fuse/lib/mock-api'; import { FuseMockApiService, FuseMockApiUtils } from '@fuse/lib/mock-api';
import { casinomoneys as casinomoneysData } from './data'; import { casinoMoneys as casinoMoneysData } from './data';
@Injectable({ @Injectable({
providedIn: 'root', providedIn: 'root',
}) })
export class MemberCasinomoneyMockApi { export class MemberCasinoMoneyMockApi {
private _casinomoneys: any[] = casinomoneysData; private _casinoMoneys: any[] = casinoMoneysData;
/** /**
* Constructor * Constructor
@ -26,10 +26,10 @@ export class MemberCasinomoneyMockApi {
*/ */
registerHandlers(): void { registerHandlers(): void {
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
// @ Casinomoneys - GET // @ CasinoMoneys - GET
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
this._fuseMockApiService this._fuseMockApiService
.onGet('api/apps/member/casinomoney/casinomoneys', 300) .onGet('api/apps/member/casino-money/casino-moneys', 300)
.reply(({ request }) => { .reply(({ request }) => {
// Get available queries // Get available queries
const search = request.params.get('search'); const search = request.params.get('search');
@ -38,12 +38,12 @@ export class MemberCasinomoneyMockApi {
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);
// Clone the casinomoneys // Clone the casinoMoneys
let casinomoneys: any[] | null = cloneDeep(this._casinomoneys); let casinoMoneys: any[] | null = cloneDeep(this._casinoMoneys);
// Sort the casinomoneys // Sort the casinoMoneys
if (sort === 'sku' || sort === 'name' || sort === 'active') { if (sort === 'sku' || sort === 'name' || sort === 'active') {
casinomoneys.sort((a, b) => { casinoMoneys.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();
return order === 'asc' return order === 'asc'
@ -51,15 +51,15 @@ export class MemberCasinomoneyMockApi {
: fieldB.localeCompare(fieldA); : fieldB.localeCompare(fieldA);
}); });
} else { } else {
casinomoneys.sort((a, b) => casinoMoneys.sort((a, b) =>
order === 'asc' ? a[sort] - b[sort] : b[sort] - a[sort] order === 'asc' ? a[sort] - b[sort] : b[sort] - a[sort]
); );
} }
// If search exists... // If search exists...
if (search) { if (search) {
// Filter the casinomoneys // Filter the casinoMoneys
casinomoneys = casinomoneys.filter( casinoMoneys = casinoMoneys.filter(
(contact: any) => (contact: any) =>
contact.name && contact.name &&
contact.name.toLowerCase().includes(search.toLowerCase()) contact.name.toLowerCase().includes(search.toLowerCase())
@ -67,32 +67,32 @@ export class MemberCasinomoneyMockApi {
} }
// Paginate - Start // Paginate - Start
const casinomoneysLength = casinomoneys.length; const casinoMoneysLength = casinoMoneys.length;
// Calculate pagination details // Calculate pagination details
const begin = page * size; const begin = page * size;
const end = Math.min(size * (page + 1), casinomoneysLength); const end = Math.min(size * (page + 1), casinoMoneysLength);
const lastPage = Math.max(Math.ceil(casinomoneysLength / size), 1); const lastPage = Math.max(Math.ceil(casinoMoneysLength / size), 1);
// Prepare the pagination object // Prepare the pagination object
let pagination = {}; let pagination = {};
// If the requested page number is bigger than // If the requested page number is bigger than
// the last possible page number, return null for // the last possible page number, return null for
// casinomoneys but also send the last possible page so // casinoMoneys but also send the last possible page so
// the app can navigate to there // the app can navigate to there
if (page > lastPage) { if (page > lastPage) {
casinomoneys = null; casinoMoneys = null;
pagination = { pagination = {
lastPage, lastPage,
}; };
} else { } else {
// Paginate the results by size // Paginate the results by size
casinomoneys = casinomoneys.slice(begin, end); casinoMoneys = casinoMoneys.slice(begin, end);
// Prepare the pagination mock-api // Prepare the pagination mock-api
pagination = { pagination = {
length: casinomoneysLength, length: casinoMoneysLength,
size: size, size: size,
page: page, page: page,
lastPage: lastPage, lastPage: lastPage,
@ -105,39 +105,39 @@ export class MemberCasinomoneyMockApi {
return [ return [
200, 200,
{ {
casinomoneys, casinoMoneys,
pagination, pagination,
}, },
]; ];
}); });
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
// @ Casinomoney - GET // @ CasinoMoney - GET
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
this._fuseMockApiService this._fuseMockApiService
.onGet('api/apps/member/casinomoney/casinomoney') .onGet('api/apps/member/casino-money/casino-money')
.reply(({ request }) => { .reply(({ request }) => {
// Get the id from the params // Get the id from the params
const id = request.params.get('id'); const id = request.params.get('id');
// Clone the casinomoneys // Clone the casinoMoneys
const casinomoneys = cloneDeep(this._casinomoneys); const casinoMoneys = cloneDeep(this._casinoMoneys);
// Find the casinomoney // Find the casinoMoney
const casinomoney = casinomoneys.find((item: any) => item.id === id); const casinoMoney = casinoMoneys.find((item: any) => item.id === id);
// Return the response // Return the response
return [200, casinomoney]; return [200, casinoMoney];
}); });
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
// @ Casinomoney - POST // @ CasinoMoney - POST
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
this._fuseMockApiService this._fuseMockApiService
.onPost('api/apps/member/casinomoney/casinomoney') .onPost('api/apps/member/casino-money/casino-money')
.reply(() => { .reply(() => {
// Generate a new casinomoney // Generate a new casinoMoney
const newCasinomoney = { const newCasinoMoney = {
id: FuseMockApiUtils.guid(), id: FuseMockApiUtils.guid(),
category: '', category: '',
name: 'A New User', name: 'A New User',
@ -159,54 +159,54 @@ export class MemberCasinomoneyMockApi {
active: false, active: false,
}; };
// Unshift the new casinomoney // Unshift the new casinoMoney
this._casinomoneys.unshift(newCasinomoney); this._casinoMoneys.unshift(newCasinoMoney);
// Return the response // Return the response
return [200, newCasinomoney]; return [200, newCasinoMoney];
}); });
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
// @ Casinomoney - PATCH // @ CasinoMoney - PATCH
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
this._fuseMockApiService this._fuseMockApiService
.onPatch('api/apps/member/casinomoney/casinomoney') .onPatch('api/apps/member/casino-money/casino-money')
.reply(({ request }) => { .reply(({ request }) => {
// Get the id and casinomoney // Get the id and casinoMoney
const id = request.body.id; const id = request.body.id;
const casinomoney = cloneDeep(request.body.casinomoney); const casinoMoney = cloneDeep(request.body.casinoMoney);
// Prepare the updated casinomoney // Prepare the updated casinoMoney
let updatedCasinomoney = null; let updatedCasinoMoney = null;
// Find the casinomoney and update it // Find the casinoMoney and update it
this._casinomoneys.forEach((item, index, casinomoneys) => { this._casinoMoneys.forEach((item, index, casinoMoneys) => {
if (item.id === id) { if (item.id === id) {
// Update the casinomoney // Update the casinoMoney
casinomoneys[index] = assign({}, casinomoneys[index], casinomoney); casinoMoneys[index] = assign({}, casinoMoneys[index], casinoMoney);
// Store the updated casinomoney // Store the updated casinoMoney
updatedCasinomoney = casinomoneys[index]; updatedCasinoMoney = casinoMoneys[index];
} }
}); });
// Return the response // Return the response
return [200, updatedCasinomoney]; return [200, updatedCasinoMoney];
}); });
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
// @ Casinomoney - DELETE // @ CasinoMoney - DELETE
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
this._fuseMockApiService this._fuseMockApiService
.onDelete('api/apps/member/casinomoney/casinomoney') .onDelete('api/apps/member/casino-money/casino-money')
.reply(({ request }) => { .reply(({ request }) => {
// Get the id // Get the id
const id = request.params.get('id'); const id = request.params.get('id');
// Find the casinomoney and delete it // Find the casinoMoney and delete it
this._casinomoneys.forEach((item, index) => { this._casinoMoneys.forEach((item, index) => {
if (item.id === id) { if (item.id === id) {
this._casinomoneys.splice(index, 1); this._casinoMoneys.splice(index, 1);
} }
}); });

View File

@ -1,6 +1,6 @@
/* eslint-disable */ /* eslint-disable */
export const casinomoneys = [ export const casinoMoneys = [
{ {
id: 'dsa01233', id: 'dsa01233',
category: 'b899ec30-b85a-40ab-bb1f-18a596d5c6de', category: 'b899ec30-b85a-40ab-bb1f-18a596d5c6de',

View File

@ -47,11 +47,11 @@ export const defaultNavigation: FuseNavigationItem[] = [
link: '/member/user', link: '/member/user',
}, },
{ {
id: 'member.casinomoney', id: 'member.casino-money',
title: 'Casinomoney', title: 'Casino Money',
type: 'basic', type: 'basic',
icon: 'heroicons_outline:academic-cap', icon: 'heroicons_outline:academic-cap',
link: '/member/casinomoney', link: '/member/casino-money',
}, },
{ {
id: 'member.unconnected', id: 'member.unconnected',

View File

@ -12,7 +12,7 @@ import { HelpCenterMockApi } from 'app/mock-api/apps/help-center/api';
import { IconsMockApi } from 'app/mock-api/ui/icons/api'; import { IconsMockApi } from 'app/mock-api/ui/icons/api';
import { MailboxMockApi } from 'app/mock-api/apps/mailbox/api'; import { MailboxMockApi } from 'app/mock-api/apps/mailbox/api';
import { MemberUserMockApi } from 'app/mock-api/apps/member/user/api'; import { MemberUserMockApi } from 'app/mock-api/apps/member/user/api';
import { MemberCasinomoneyMockApi } from './apps/member/casinomoney/api'; import { MemberCasinoMoneyMockApi } from './apps/member/casino-money/api';
import { MemberUnconnectedMockApi } from './apps/member/unconnected/api'; import { MemberUnconnectedMockApi } from './apps/member/unconnected/api';
import { MemberCurrentUserMockApi } from './apps/member/current-user/api'; import { MemberCurrentUserMockApi } from './apps/member/current-user/api';
import { MemberPartnerMockApi } from './apps/member/partner/api'; import { MemberPartnerMockApi } from './apps/member/partner/api';
@ -85,7 +85,7 @@ export const mockApiServices = [
IconsMockApi, IconsMockApi,
MailboxMockApi, MailboxMockApi,
MemberUserMockApi, MemberUserMockApi,
MemberCasinomoneyMockApi, MemberCasinoMoneyMockApi,
MemberUnconnectedMockApi, MemberUnconnectedMockApi,
MemberCurrentUserMockApi, MemberCurrentUserMockApi,
MemberPartnerMockApi, MemberPartnerMockApi,

View File

@ -21,14 +21,14 @@ import { SharedModule } from 'app/shared/shared.module';
import { COMPONENTS } from './components'; import { COMPONENTS } from './components';
import { casinomoneyRoutes } from './casinomoney.routing'; import { casinoMoneyRoutes } from './casino-money.routing';
@NgModule({ @NgModule({
declarations: [COMPONENTS], declarations: [COMPONENTS],
imports: [ imports: [
TranslocoModule, TranslocoModule,
SharedModule, SharedModule,
RouterModule.forChild(casinomoneyRoutes), RouterModule.forChild(casinoMoneyRoutes),
MatButtonModule, MatButtonModule,
MatFormFieldModule, MatFormFieldModule,
@ -45,4 +45,4 @@ import { casinomoneyRoutes } from './casinomoney.routing';
MatRadioModule, MatRadioModule,
], ],
}) })
export class CasinomoneyModule {} export class CasinoMoneyModule {}

View File

@ -3,15 +3,15 @@ import { Route } from '@angular/router';
import { ListComponent } from './components/list.component'; import { ListComponent } from './components/list.component';
import { ViewComponent } from '../user/components/view.component'; import { ViewComponent } from '../user/components/view.component';
import { CasinomoneysResolver } from './resolvers/casinomoney.resolver'; import { CasinoMoneysResolver } from './resolvers/casino-money.resolver';
import { UserResolver } from '../user/resolvers/user.resolver'; import { UserResolver } from '../user/resolvers/user.resolver';
export const casinomoneyRoutes: Route[] = [ export const casinoMoneyRoutes: Route[] = [
{ {
path: '', path: '',
component: ListComponent, component: ListComponent,
resolve: { resolve: {
casinomoneys: CasinomoneysResolver, casinoMoneys: CasinoMoneysResolver,
}, },
}, },
{ {

View File

@ -119,8 +119,8 @@
<div <div
class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto" class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto"
> >
<ng-container *ngIf="casinomoneys$ | async as casinomoneys"> <ng-container *ngIf="casinoMoneys$ | async as casinoMoneys">
<ng-container *ngIf="casinomoneys.length > 0; else noCasinomoney"> <ng-container *ngIf="casinoMoneys.length > 0; else noCasinoMoney">
<div class="grid"> <div class="grid">
<!-- Header --> <!-- Header -->
<div <div
@ -144,9 +144,9 @@
<div class="hidden sm:block">상부</div> <div class="hidden sm:block">상부</div>
</div> </div>
<!-- Rows --> <!-- Rows -->
<ng-container *ngIf="casinomoneys$ | async as casinomoneys"> <ng-container *ngIf="casinoMoneys$ | async as casinoMoneys">
<ng-container <ng-container
*ngFor="let casinomoney of casinomoneys; trackBy: __trackByFn" *ngFor="let casinoMoney of casinoMoneys; trackBy: __trackByFn"
> >
<div <div
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b" class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
@ -194,16 +194,16 @@
[총판] [총판]
[매장]" [매장]"
> >
{{ casinomoney.highRank }} {{ casinoMoney.highRank }}
</button> </button>
</div> </div>
<!-- rank --> <!-- rank -->
<div class="hidden sm:block truncate"> <div class="hidden sm:block truncate">
{{ casinomoney.rank }} {{ casinoMoney.rank }}
</div> </div>
<!-- level --> <!-- level -->
<div class="hidden sm:block truncate"> <div class="hidden sm:block truncate">
LV.{{ casinomoney.level }} LV.{{ casinoMoney.level }}
</div> </div>
<!-- id --> <!-- id -->
@ -215,35 +215,35 @@
class="hidden sm:block truncate" class="hidden sm:block truncate"
(click)="viewUserDetail(user.id!)" (click)="viewUserDetail(user.id!)"
> >
{{ casinomoney.id }} {{ casinoMoney.id }}
</div> </div>
</ng-container> </ng-container>
</ng-container> </ng-container>
<!-- nickname --> <!-- nickname -->
<div class="hidden sm:block truncate"> <div class="hidden sm:block truncate">
{{ casinomoney.nickname }} {{ casinoMoney.nickname }}
</div> </div>
<!-- accountHolder --> <!-- accountHolder -->
<div class="hidden sm:block truncate"> <div class="hidden sm:block truncate">
{{ casinomoney.accountHolder }} {{ casinoMoney.accountHolder }}
</div> </div>
<!-- contact --> <!-- contact -->
<div class="hidden sm:block truncate"> <div class="hidden sm:block truncate">
{{ casinomoney.contact }} {{ casinoMoney.contact }}
</div> </div>
<!-- reserve --> <!-- reserve -->
<div class="hidden sm:block truncate"> <div class="hidden sm:block truncate">
캐쉬{{ casinomoney.cash }} 콤프{{ casinomoney.comp }} 쿠폰{{ 캐쉬{{ casinoMoney.cash }} 콤프{{ casinoMoney.comp }} 쿠폰{{
casinomoney.coupon casinoMoney.coupon
}} }}
</div> </div>
<!-- gameMoney --> <!-- gameMoney -->
<div class="hidden sm:block truncate"> <div class="hidden sm:block truncate">
{{ casinomoney.gameMoney }} {{ casinoMoney.gameMoney }}
</div> </div>
<!-- casinoCash --> <!-- casinoCash -->
@ -258,28 +258,28 @@
<!-- todayComp --> <!-- todayComp -->
<div class="hidden sm:block truncate"> <div class="hidden sm:block truncate">
{{ casinomoney.todayComp }}P {{ casinoMoney.todayComp }}P
</div> </div>
<!-- total --> <!-- total -->
<div class="hidden sm:block truncate"> <div class="hidden sm:block truncate">
입금{{ casinomoney.deposit }} 출금{{ 입금{{ casinoMoney.deposit }} 출금{{
casinomoney.withdraw casinoMoney.withdraw
}} }}
차익{{ casinomoney.margin }} 차익{{ casinoMoney.margin }}
</div> </div>
<!-- log --> <!-- log -->
<div class="hidden sm:block truncate"> <div class="hidden sm:block truncate">
가입{{ casinomoney.accession }} 최종{{ 가입{{ casinoMoney.accession }} 최종{{
casinomoney.final casinoMoney.final
}} }}
IP{{ casinomoney.ip }} IP{{ casinoMoney.ip }}
</div> </div>
<!-- state --> <!-- state -->
<div class="hidden sm:block truncate"> <div class="hidden sm:block truncate">
{{ casinomoney.state }} {{ casinoMoney.state }}
</div> </div>
<!-- top --> <!-- top -->
@ -303,7 +303,7 @@
</ng-container> </ng-container>
</ng-container> </ng-container>
<ng-template #noCasinomoney> <ng-template #noCasinoMoney>
<div <div
class="p-8 sm:p-16 border-t text-4xl font-semibold tracking-tight text-center" class="p-8 sm:p-16 border-t text-4xl font-semibold tracking-tight text-center"
> >

View File

@ -30,13 +30,13 @@ import { fuseAnimations } from '@fuse/animations';
import { FuseConfirmationService } from '@fuse/services/confirmation'; import { FuseConfirmationService } from '@fuse/services/confirmation';
import { User } from '../../user/models/user'; import { User } from '../../user/models/user';
import { Casinomoney } from '../models/casinomoney'; import { CasinoMoney } from '../models/casino-money';
import { CasinomoneyPagination } from '../models/casinomoney-pagination'; import { CasinoMoneyPagination } from '../models/casino-money-pagination';
import { CasinomoneyService } from '../services/casinomoney.service'; import { CasinoMoneyService } from '../services/casino-money.service';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
@Component({ @Component({
selector: 'casinomoney-list', selector: 'casino-money-list',
templateUrl: './list.component.html', templateUrl: './list.component.html',
styles: [ styles: [
/* language=SCSS */ /* language=SCSS */
@ -66,13 +66,13 @@ 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;
casinomoneys$!: Observable<Casinomoney[] | undefined>; casinoMoneys$!: Observable<CasinoMoney[] | undefined>;
users$!: Observable<User[] | undefined>; users$!: Observable<User[] | undefined>;
isLoading = false; isLoading = false;
searchInputControl = new FormControl(); searchInputControl = new FormControl();
selectedCasinomoney?: Casinomoney; selectedCasinoMoney?: CasinoMoney;
pagination?: CasinomoneyPagination; pagination?: CasinoMoneyPagination;
private _unsubscribeAll: Subject<any> = new Subject<any>(); private _unsubscribeAll: Subject<any> = new Subject<any>();
@ -83,7 +83,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
private _changeDetectorRef: ChangeDetectorRef, private _changeDetectorRef: ChangeDetectorRef,
private _fuseConfirmationService: FuseConfirmationService, private _fuseConfirmationService: FuseConfirmationService,
private _formBuilder: FormBuilder, private _formBuilder: FormBuilder,
private _casinomoneyService: CasinomoneyService, private _casinoMoneyService: CasinoMoneyService,
private router: Router private router: Router
) {} ) {}
@ -96,9 +96,9 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
*/ */
ngOnInit(): void { ngOnInit(): void {
// Get the pagination // Get the pagination
this._casinomoneyService.pagination$ this._casinoMoneyService.pagination$
.pipe(takeUntil(this._unsubscribeAll)) .pipe(takeUntil(this._unsubscribeAll))
.subscribe((pagination: CasinomoneyPagination | undefined) => { .subscribe((pagination: CasinoMoneyPagination | undefined) => {
// Update the pagination // Update the pagination
this.pagination = pagination; this.pagination = pagination;
@ -107,7 +107,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
}); });
// Get the products // Get the products
this.casinomoneys$ = this._casinomoneyService.casinomoneys$; this.casinoMoneys$ = this._casinoMoneyService.casinoMoneys$;
} }
/** /**
@ -125,7 +125,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
// Mark for check // Mark for check
this._changeDetectorRef.markForCheck(); this._changeDetectorRef.markForCheck();
// If the casinomoney changes the sort order... // If the casinoMoney changes the sort order...
this._sort.sortChange this._sort.sortChange
.pipe(takeUntil(this._unsubscribeAll)) .pipe(takeUntil(this._unsubscribeAll))
.subscribe(() => { .subscribe(() => {
@ -138,7 +138,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
.pipe( .pipe(
switchMap(() => { switchMap(() => {
this.isLoading = true; this.isLoading = true;
return this._casinomoneyService.getCasinomoneys( return this._casinoMoneyService.getCasinoMoneys(
this._paginator.pageIndex, this._paginator.pageIndex,
this._paginator.pageSize, this._paginator.pageSize,
this._sort.active, this._sort.active,

View File

@ -1,4 +1,4 @@
export interface CasinomoneyPagination { export interface CasinoMoneyPagination {
length: number; length: number;
size: number; size: number;
page: number; page: number;

View File

@ -1,4 +1,4 @@
export interface Casinomoney { export interface CasinoMoney {
id?: string; id?: string;
nickname?: string; nickname?: string;
highRank?: string; highRank?: string;

View File

@ -7,19 +7,19 @@ import {
} from '@angular/router'; } from '@angular/router';
import { catchError, Observable, throwError } from 'rxjs'; import { catchError, Observable, throwError } from 'rxjs';
import { Casinomoney } from '../models/casinomoney'; import { CasinoMoney } from '../models/casino-money';
import { CasinomoneyPagination } from '../models/casinomoney-pagination'; import { CasinoMoneyPagination } from '../models/casino-money-pagination';
import { CasinomoneyService } from '../services/casinomoney.service'; import { CasinoMoneyService } from '../services/casino-money.service';
@Injectable({ @Injectable({
providedIn: 'root', providedIn: 'root',
}) })
export class CasinomoneyResolver implements Resolve<any> { export class CasinoMoneyResolver implements Resolve<any> {
/** /**
* Constructor * Constructor
*/ */
constructor( constructor(
private _casinomoneyService: CasinomoneyService, private _casinoMoneyService: CasinoMoneyService,
private _router: Router private _router: Router
) {} ) {}
@ -36,9 +36,9 @@ export class CasinomoneyResolver implements Resolve<any> {
resolve( resolve(
route: ActivatedRouteSnapshot, route: ActivatedRouteSnapshot,
state: RouterStateSnapshot state: RouterStateSnapshot
): Observable<Casinomoney | undefined> { ): Observable<CasinoMoney | undefined> {
return this._casinomoneyService return this._casinoMoneyService
.getCasinomoneyById(route.paramMap.get('id')) .getCasinoMoneyById(route.paramMap.get('id'))
.pipe( .pipe(
// Error here means the requested product is not available // Error here means the requested product is not available
catchError((error) => { catchError((error) => {
@ -61,11 +61,11 @@ export class CasinomoneyResolver implements Resolve<any> {
@Injectable({ @Injectable({
providedIn: 'root', providedIn: 'root',
}) })
export class CasinomoneysResolver implements Resolve<any> { export class CasinoMoneysResolver implements Resolve<any> {
/** /**
* Constructor * Constructor
*/ */
constructor(private _casinomoneyService: CasinomoneyService) {} constructor(private _casinoMoneyService: CasinoMoneyService) {}
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
// @ Public methods // @ Public methods
@ -81,9 +81,9 @@ export class CasinomoneysResolver implements Resolve<any> {
route: ActivatedRouteSnapshot, route: ActivatedRouteSnapshot,
state: RouterStateSnapshot state: RouterStateSnapshot
): Observable<{ ): Observable<{
pagination: CasinomoneyPagination; pagination: CasinoMoneyPagination;
casinomoneys: Casinomoney[]; casinoMoneys: CasinoMoney[];
}> { }> {
return this._casinomoneyService.getCasinomoneys(); return this._casinoMoneyService.getCasinoMoneys();
} }
} }

View File

@ -12,21 +12,21 @@ import {
throwError, throwError,
} from 'rxjs'; } from 'rxjs';
import { Casinomoney } from '../models/casinomoney'; import { CasinoMoney } from '../models/casino-money';
import { CasinomoneyPagination } from '../models/casinomoney-pagination'; import { CasinoMoneyPagination } from '../models/casino-money-pagination';
@Injectable({ @Injectable({
providedIn: 'root', providedIn: 'root',
}) })
export class CasinomoneyService { export class CasinoMoneyService {
// Private // Private
private __pagination = new BehaviorSubject<CasinomoneyPagination | undefined>( private __pagination = new BehaviorSubject<CasinoMoneyPagination | undefined>(
undefined undefined
); );
private __casinomoney = new BehaviorSubject<Casinomoney | undefined>( private __casinoMoney = new BehaviorSubject<CasinoMoney | undefined>(
undefined undefined
); );
private __casinomoneys = new BehaviorSubject<Casinomoney[] | undefined>( private __casinoMoneys = new BehaviorSubject<CasinoMoney[] | undefined>(
undefined undefined
); );
@ -42,22 +42,22 @@ export class CasinomoneyService {
/** /**
* Getter for pagination * Getter for pagination
*/ */
get pagination$(): Observable<CasinomoneyPagination | undefined> { get pagination$(): Observable<CasinoMoneyPagination | undefined> {
return this.__pagination.asObservable(); return this.__pagination.asObservable();
} }
/** /**
* Getter for casinomoney * Getter for casinoMoney
*/ */
get casinomoney$(): Observable<Casinomoney | undefined> { get casinoMoney$(): Observable<CasinoMoney | undefined> {
return this.__casinomoney.asObservable(); return this.__casinoMoney.asObservable();
} }
/** /**
* Getter for casinomoneys * Getter for casinoMoneys
*/ */
get casinomoneys$(): Observable<Casinomoney[] | undefined> { get casinoMoneys$(): Observable<CasinoMoney[] | undefined> {
return this.__casinomoneys.asObservable(); return this.__casinoMoneys.asObservable();
} }
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
@ -65,7 +65,7 @@ export class CasinomoneyService {
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
/** /**
* Get casinomoneys * Get casinoMoneys
* *
* *
* @param page * @param page
@ -74,19 +74,19 @@ export class CasinomoneyService {
* @param order * @param order
* @param search * @param search
*/ */
getCasinomoneys( getCasinoMoneys(
page: number = 0, page: number = 0,
size: number = 10, size: number = 10,
sort: string = 'name', sort: string = 'name',
order: 'asc' | 'desc' | '' = 'asc', order: 'asc' | 'desc' | '' = 'asc',
search: string = '' search: string = ''
): Observable<{ ): Observable<{
pagination: CasinomoneyPagination; pagination: CasinoMoneyPagination;
casinomoneys: Casinomoney[]; casinoMoneys: CasinoMoney[];
}> { }> {
return this._httpClient return this._httpClient
.get<{ pagination: CasinomoneyPagination; casinomoneys: Casinomoney[] }>( .get<{ pagination: CasinoMoneyPagination; casinoMoneys: CasinoMoney[] }>(
'api/apps/member/casinomoney/casinomoneys', 'api/apps/member/casino-money/casino-moneys',
{ {
params: { params: {
page: '' + page, page: '' + page,
@ -100,7 +100,7 @@ export class CasinomoneyService {
.pipe( .pipe(
tap((response) => { tap((response) => {
this.__pagination.next(response.pagination); this.__pagination.next(response.pagination);
this.__casinomoneys.next(response.casinomoneys); this.__casinoMoneys.next(response.casinoMoneys);
}) })
); );
} }
@ -108,19 +108,19 @@ export class CasinomoneyService {
/** /**
* Get product by id * Get product by id
*/ */
getCasinomoneyById(id: string | null): Observable<Casinomoney> { getCasinoMoneyById(id: string | null): Observable<CasinoMoney> {
return this.__casinomoneys.pipe( return this.__casinoMoneys.pipe(
take(1), take(1),
map((casinomoneys) => { map((casinoMoneys) => {
// Find the product // Find the product
const casinomoney = const casinoMoney =
casinomoneys?.find((item) => item.id === id) || undefined; casinoMoneys?.find((item) => item.id === id) || undefined;
// Update the product // Update the product
this.__casinomoney.next(casinomoney); this.__casinoMoney.next(casinoMoney);
// Return the product // Return the product
return casinomoney; return casinoMoney;
}), }),
switchMap((product) => { switchMap((product) => {
if (!product) { if (!product) {
@ -135,21 +135,21 @@ export class CasinomoneyService {
/** /**
* Create product * Create product
*/ */
createCasinomoney(): Observable<Casinomoney> { createCasinoMoney(): Observable<CasinoMoney> {
return this.casinomoneys$.pipe( return this.casinoMoneys$.pipe(
take(1), take(1),
switchMap((casinomoneys) => switchMap((casinoMoneys) =>
this._httpClient this._httpClient
.post<Casinomoney>('api/apps/member/casinomoney/product', {}) .post<CasinoMoney>('api/apps/member/casino-money/product', {})
.pipe( .pipe(
map((newCasinomoney) => { map((newCasinoMoney) => {
// Update the casinomoneys with the new product // Update the casinoMoneys with the new product
if (!!casinomoneys) { if (!!casinoMoneys) {
this.__casinomoneys.next([newCasinomoney, ...casinomoneys]); this.__casinoMoneys.next([newCasinoMoney, ...casinoMoneys]);
} }
// Return the new product // Return the new product
return newCasinomoney; return newCasinoMoney;
}) })
) )
) )

View File

@ -3,7 +3,7 @@
"Dashboards": "Dashboards", "Dashboards": "Dashboards",
"Member": "Member", "Member": "Member",
"User": "User", "User": "User",
"Casinomoney": "Casinomoney", "Casino Money": "Casino Money",
"Unconnected": "Unconnected", "Unconnected": "Unconnected",
"Project": "Project", "Project": "Project",
"All Partner": "All Partner", "All Partner": "All Partner",

View File

@ -3,7 +3,7 @@
"Dashboards": "대쉬보드", "Dashboards": "대쉬보드",
"Member": "회원", "Member": "회원",
"User": "사용자", "User": "사용자",
"Casinomoney": "CASINO 머니파악", "Casino Money": "CASINO 머니파악",
"Unconnected": "장기미접속회원", "Unconnected": "장기미접속회원",
"Project": "프로젝트", "Project": "프로젝트",
"partner-management": "파트너관리", "partner-management": "파트너관리",