diff --git a/src/app/app.routing.ts b/src/app/app.routing.ts index f3df615..78b2470 100644 --- a/src/app/app.routing.ts +++ b/src/app/app.routing.ts @@ -151,11 +151,11 @@ export const appRoutes: Route[] = [ ), }, { - path: 'casinomoney', + path: 'casino-money', loadChildren: () => import( - 'app/modules/admin/member/casinomoney/casinomoney.module' - ).then((m: any) => m.CasinomoneyModule), + 'app/modules/admin/member/casino-money/casino-money.module' + ).then((m: any) => m.CasinoMoneyModule), }, { path: 'unconnected', diff --git a/src/app/mock-api/apps/member/casinomoney/api.ts b/src/app/mock-api/apps/member/casino-money/api.ts similarity index 67% rename from src/app/mock-api/apps/member/casinomoney/api.ts rename to src/app/mock-api/apps/member/casino-money/api.ts index 95d6205..76ab899 100644 --- a/src/app/mock-api/apps/member/casinomoney/api.ts +++ b/src/app/mock-api/apps/member/casino-money/api.ts @@ -1,13 +1,13 @@ import { Injectable } from '@angular/core'; import { assign, cloneDeep } from 'lodash-es'; import { FuseMockApiService, FuseMockApiUtils } from '@fuse/lib/mock-api'; -import { casinomoneys as casinomoneysData } from './data'; +import { casinoMoneys as casinoMoneysData } from './data'; @Injectable({ providedIn: 'root', }) -export class MemberCasinomoneyMockApi { - private _casinomoneys: any[] = casinomoneysData; +export class MemberCasinoMoneyMockApi { + private _casinoMoneys: any[] = casinoMoneysData; /** * Constructor @@ -26,10 +26,10 @@ export class MemberCasinomoneyMockApi { */ registerHandlers(): void { // ----------------------------------------------------------------------------------------------------- - // @ Casinomoneys - GET + // @ CasinoMoneys - GET // ----------------------------------------------------------------------------------------------------- this._fuseMockApiService - .onGet('api/apps/member/casinomoney/casinomoneys', 300) + .onGet('api/apps/member/casino-money/casino-moneys', 300) .reply(({ request }) => { // Get available queries const search = request.params.get('search'); @@ -38,12 +38,12 @@ export class MemberCasinomoneyMockApi { const page = parseInt(request.params.get('page') ?? '1', 10); const size = parseInt(request.params.get('size') ?? '10', 10); - // Clone the casinomoneys - let casinomoneys: any[] | null = cloneDeep(this._casinomoneys); + // Clone the casinoMoneys + let casinoMoneys: any[] | null = cloneDeep(this._casinoMoneys); - // Sort the casinomoneys + // Sort the casinoMoneys if (sort === 'sku' || sort === 'name' || sort === 'active') { - casinomoneys.sort((a, b) => { + casinoMoneys.sort((a, b) => { const fieldA = a[sort].toString().toUpperCase(); const fieldB = b[sort].toString().toUpperCase(); return order === 'asc' @@ -51,15 +51,15 @@ export class MemberCasinomoneyMockApi { : fieldB.localeCompare(fieldA); }); } else { - casinomoneys.sort((a, b) => + casinoMoneys.sort((a, b) => order === 'asc' ? a[sort] - b[sort] : b[sort] - a[sort] ); } // If search exists... if (search) { - // Filter the casinomoneys - casinomoneys = casinomoneys.filter( + // Filter the casinoMoneys + casinoMoneys = casinoMoneys.filter( (contact: any) => contact.name && contact.name.toLowerCase().includes(search.toLowerCase()) @@ -67,32 +67,32 @@ export class MemberCasinomoneyMockApi { } // Paginate - Start - const casinomoneysLength = casinomoneys.length; + const casinoMoneysLength = casinoMoneys.length; // Calculate pagination details const begin = page * size; - const end = Math.min(size * (page + 1), casinomoneysLength); - const lastPage = Math.max(Math.ceil(casinomoneysLength / size), 1); + const end = Math.min(size * (page + 1), casinoMoneysLength); + const lastPage = Math.max(Math.ceil(casinoMoneysLength / size), 1); // Prepare the pagination object let pagination = {}; // If the requested page number is bigger than // 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 if (page > lastPage) { - casinomoneys = null; + casinoMoneys = null; pagination = { lastPage, }; } else { // Paginate the results by size - casinomoneys = casinomoneys.slice(begin, end); + casinoMoneys = casinoMoneys.slice(begin, end); // Prepare the pagination mock-api pagination = { - length: casinomoneysLength, + length: casinoMoneysLength, size: size, page: page, lastPage: lastPage, @@ -105,39 +105,39 @@ export class MemberCasinomoneyMockApi { return [ 200, { - casinomoneys, + casinoMoneys, pagination, }, ]; }); // ----------------------------------------------------------------------------------------------------- - // @ Casinomoney - GET + // @ CasinoMoney - GET // ----------------------------------------------------------------------------------------------------- this._fuseMockApiService - .onGet('api/apps/member/casinomoney/casinomoney') + .onGet('api/apps/member/casino-money/casino-money') .reply(({ request }) => { // Get the id from the params const id = request.params.get('id'); - // Clone the casinomoneys - const casinomoneys = cloneDeep(this._casinomoneys); + // Clone the casinoMoneys + const casinoMoneys = cloneDeep(this._casinoMoneys); - // Find the casinomoney - const casinomoney = casinomoneys.find((item: any) => item.id === id); + // Find the casinoMoney + const casinoMoney = casinoMoneys.find((item: any) => item.id === id); // Return the response - return [200, casinomoney]; + return [200, casinoMoney]; }); // ----------------------------------------------------------------------------------------------------- - // @ Casinomoney - POST + // @ CasinoMoney - POST // ----------------------------------------------------------------------------------------------------- this._fuseMockApiService - .onPost('api/apps/member/casinomoney/casinomoney') + .onPost('api/apps/member/casino-money/casino-money') .reply(() => { - // Generate a new casinomoney - const newCasinomoney = { + // Generate a new casinoMoney + const newCasinoMoney = { id: FuseMockApiUtils.guid(), category: '', name: 'A New User', @@ -159,54 +159,54 @@ export class MemberCasinomoneyMockApi { active: false, }; - // Unshift the new casinomoney - this._casinomoneys.unshift(newCasinomoney); + // Unshift the new casinoMoney + this._casinoMoneys.unshift(newCasinoMoney); // Return the response - return [200, newCasinomoney]; + return [200, newCasinoMoney]; }); // ----------------------------------------------------------------------------------------------------- - // @ Casinomoney - PATCH + // @ CasinoMoney - PATCH // ----------------------------------------------------------------------------------------------------- this._fuseMockApiService - .onPatch('api/apps/member/casinomoney/casinomoney') + .onPatch('api/apps/member/casino-money/casino-money') .reply(({ request }) => { - // Get the id and casinomoney + // Get the id and casinoMoney const id = request.body.id; - const casinomoney = cloneDeep(request.body.casinomoney); + const casinoMoney = cloneDeep(request.body.casinoMoney); - // Prepare the updated casinomoney - let updatedCasinomoney = null; + // Prepare the updated casinoMoney + let updatedCasinoMoney = null; - // Find the casinomoney and update it - this._casinomoneys.forEach((item, index, casinomoneys) => { + // Find the casinoMoney and update it + this._casinoMoneys.forEach((item, index, casinoMoneys) => { if (item.id === id) { - // Update the casinomoney - casinomoneys[index] = assign({}, casinomoneys[index], casinomoney); + // Update the casinoMoney + casinoMoneys[index] = assign({}, casinoMoneys[index], casinoMoney); - // Store the updated casinomoney - updatedCasinomoney = casinomoneys[index]; + // Store the updated casinoMoney + updatedCasinoMoney = casinoMoneys[index]; } }); // Return the response - return [200, updatedCasinomoney]; + return [200, updatedCasinoMoney]; }); // ----------------------------------------------------------------------------------------------------- - // @ Casinomoney - DELETE + // @ CasinoMoney - DELETE // ----------------------------------------------------------------------------------------------------- this._fuseMockApiService - .onDelete('api/apps/member/casinomoney/casinomoney') + .onDelete('api/apps/member/casino-money/casino-money') .reply(({ request }) => { // Get the id const id = request.params.get('id'); - // Find the casinomoney and delete it - this._casinomoneys.forEach((item, index) => { + // Find the casinoMoney and delete it + this._casinoMoneys.forEach((item, index) => { if (item.id === id) { - this._casinomoneys.splice(index, 1); + this._casinoMoneys.splice(index, 1); } }); diff --git a/src/app/mock-api/apps/member/casinomoney/data.ts b/src/app/mock-api/apps/member/casino-money/data.ts similarity index 98% rename from src/app/mock-api/apps/member/casinomoney/data.ts rename to src/app/mock-api/apps/member/casino-money/data.ts index 12cda70..415c649 100644 --- a/src/app/mock-api/apps/member/casinomoney/data.ts +++ b/src/app/mock-api/apps/member/casino-money/data.ts @@ -1,6 +1,6 @@ /* eslint-disable */ -export const casinomoneys = [ +export const casinoMoneys = [ { id: 'dsa01233', category: 'b899ec30-b85a-40ab-bb1f-18a596d5c6de', diff --git a/src/app/mock-api/common/navigation/data.ts b/src/app/mock-api/common/navigation/data.ts index 7e8d949..b3e2c06 100644 --- a/src/app/mock-api/common/navigation/data.ts +++ b/src/app/mock-api/common/navigation/data.ts @@ -47,11 +47,11 @@ export const defaultNavigation: FuseNavigationItem[] = [ link: '/member/user', }, { - id: 'member.casinomoney', - title: 'Casinomoney', + id: 'member.casino-money', + title: 'Casino Money', type: 'basic', icon: 'heroicons_outline:academic-cap', - link: '/member/casinomoney', + link: '/member/casino-money', }, { id: 'member.unconnected', diff --git a/src/app/mock-api/index.ts b/src/app/mock-api/index.ts index 3e59ba9..867c6fb 100644 --- a/src/app/mock-api/index.ts +++ b/src/app/mock-api/index.ts @@ -12,7 +12,7 @@ import { HelpCenterMockApi } from 'app/mock-api/apps/help-center/api'; import { IconsMockApi } from 'app/mock-api/ui/icons/api'; import { MailboxMockApi } from 'app/mock-api/apps/mailbox/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 { MemberCurrentUserMockApi } from './apps/member/current-user/api'; import { MemberPartnerMockApi } from './apps/member/partner/api'; @@ -85,7 +85,7 @@ export const mockApiServices = [ IconsMockApi, MailboxMockApi, MemberUserMockApi, - MemberCasinomoneyMockApi, + MemberCasinoMoneyMockApi, MemberUnconnectedMockApi, MemberCurrentUserMockApi, MemberPartnerMockApi, diff --git a/src/app/modules/admin/member/casinomoney/casinomoney.module.ts b/src/app/modules/admin/member/casino-money/casino-money.module.ts similarity index 91% rename from src/app/modules/admin/member/casinomoney/casinomoney.module.ts rename to src/app/modules/admin/member/casino-money/casino-money.module.ts index afb1376..8fad404 100644 --- a/src/app/modules/admin/member/casinomoney/casinomoney.module.ts +++ b/src/app/modules/admin/member/casino-money/casino-money.module.ts @@ -21,14 +21,14 @@ import { SharedModule } from 'app/shared/shared.module'; import { COMPONENTS } from './components'; -import { casinomoneyRoutes } from './casinomoney.routing'; +import { casinoMoneyRoutes } from './casino-money.routing'; @NgModule({ declarations: [COMPONENTS], imports: [ TranslocoModule, SharedModule, - RouterModule.forChild(casinomoneyRoutes), + RouterModule.forChild(casinoMoneyRoutes), MatButtonModule, MatFormFieldModule, @@ -45,4 +45,4 @@ import { casinomoneyRoutes } from './casinomoney.routing'; MatRadioModule, ], }) -export class CasinomoneyModule {} +export class CasinoMoneyModule {} diff --git a/src/app/modules/admin/member/casinomoney/casinomoney.routing.ts b/src/app/modules/admin/member/casino-money/casino-money.routing.ts similarity index 72% rename from src/app/modules/admin/member/casinomoney/casinomoney.routing.ts rename to src/app/modules/admin/member/casino-money/casino-money.routing.ts index 7ee1be0..ebaabc3 100644 --- a/src/app/modules/admin/member/casinomoney/casinomoney.routing.ts +++ b/src/app/modules/admin/member/casino-money/casino-money.routing.ts @@ -3,15 +3,15 @@ import { Route } from '@angular/router'; import { ListComponent } from './components/list.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'; -export const casinomoneyRoutes: Route[] = [ +export const casinoMoneyRoutes: Route[] = [ { path: '', component: ListComponent, resolve: { - casinomoneys: CasinomoneysResolver, + casinoMoneys: CasinoMoneysResolver, }, }, { diff --git a/src/app/modules/admin/member/casinomoney/components/index.ts b/src/app/modules/admin/member/casino-money/components/index.ts similarity index 100% rename from src/app/modules/admin/member/casinomoney/components/index.ts rename to src/app/modules/admin/member/casino-money/components/index.ts diff --git a/src/app/modules/admin/member/casinomoney/components/list.component.html b/src/app/modules/admin/member/casino-money/components/list.component.html similarity index 89% rename from src/app/modules/admin/member/casinomoney/components/list.component.html rename to src/app/modules/admin/member/casino-money/components/list.component.html index 29daf34..3a4d5e3 100644 --- a/src/app/modules/admin/member/casinomoney/components/list.component.html +++ b/src/app/modules/admin/member/casino-money/components/list.component.html @@ -119,8 +119,8 @@
- - + +
- +
- {{ casinomoney.highRank }} + {{ casinoMoney.highRank }}
@@ -215,35 +215,35 @@ class="hidden sm:block truncate" (click)="viewUserDetail(user.id!)" > - {{ casinomoney.id }} + {{ casinoMoney.id }}
@@ -258,28 +258,28 @@ @@ -303,11 +303,11 @@ - +
- There are no casinomoneys! + There are no casino moneys!
diff --git a/src/app/modules/admin/member/casinomoney/components/list.component.ts b/src/app/modules/admin/member/casino-money/components/list.component.ts similarity index 86% rename from src/app/modules/admin/member/casinomoney/components/list.component.ts rename to src/app/modules/admin/member/casino-money/components/list.component.ts index f2d5e42..093d991 100644 --- a/src/app/modules/admin/member/casinomoney/components/list.component.ts +++ b/src/app/modules/admin/member/casino-money/components/list.component.ts @@ -30,13 +30,13 @@ import { fuseAnimations } from '@fuse/animations'; import { FuseConfirmationService } from '@fuse/services/confirmation'; import { User } from '../../user/models/user'; -import { Casinomoney } from '../models/casinomoney'; -import { CasinomoneyPagination } from '../models/casinomoney-pagination'; -import { CasinomoneyService } from '../services/casinomoney.service'; +import { CasinoMoney } from '../models/casino-money'; +import { CasinoMoneyPagination } from '../models/casino-money-pagination'; +import { CasinoMoneyService } from '../services/casino-money.service'; import { Router } from '@angular/router'; @Component({ - selector: 'casinomoney-list', + selector: 'casino-money-list', templateUrl: './list.component.html', styles: [ /* language=SCSS */ @@ -66,13 +66,13 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { @ViewChild(MatPaginator) private _paginator!: MatPaginator; @ViewChild(MatSort) private _sort!: MatSort; - casinomoneys$!: Observable; + casinoMoneys$!: Observable; users$!: Observable; isLoading = false; searchInputControl = new FormControl(); - selectedCasinomoney?: Casinomoney; - pagination?: CasinomoneyPagination; + selectedCasinoMoney?: CasinoMoney; + pagination?: CasinoMoneyPagination; private _unsubscribeAll: Subject = new Subject(); @@ -83,7 +83,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { private _changeDetectorRef: ChangeDetectorRef, private _fuseConfirmationService: FuseConfirmationService, private _formBuilder: FormBuilder, - private _casinomoneyService: CasinomoneyService, + private _casinoMoneyService: CasinoMoneyService, private router: Router ) {} @@ -96,9 +96,9 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { */ ngOnInit(): void { // Get the pagination - this._casinomoneyService.pagination$ + this._casinoMoneyService.pagination$ .pipe(takeUntil(this._unsubscribeAll)) - .subscribe((pagination: CasinomoneyPagination | undefined) => { + .subscribe((pagination: CasinoMoneyPagination | undefined) => { // Update the pagination this.pagination = pagination; @@ -107,7 +107,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { }); // 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 this._changeDetectorRef.markForCheck(); - // If the casinomoney changes the sort order... + // If the casinoMoney changes the sort order... this._sort.sortChange .pipe(takeUntil(this._unsubscribeAll)) .subscribe(() => { @@ -138,7 +138,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { .pipe( switchMap(() => { this.isLoading = true; - return this._casinomoneyService.getCasinomoneys( + return this._casinoMoneyService.getCasinoMoneys( this._paginator.pageIndex, this._paginator.pageSize, this._sort.active, diff --git a/src/app/modules/admin/member/casinomoney/models/casinomoney-pagination.ts b/src/app/modules/admin/member/casino-money/models/casino-money-pagination.ts similarity index 73% rename from src/app/modules/admin/member/casinomoney/models/casinomoney-pagination.ts rename to src/app/modules/admin/member/casino-money/models/casino-money-pagination.ts index 834c4e2..1a603c9 100644 --- a/src/app/modules/admin/member/casinomoney/models/casinomoney-pagination.ts +++ b/src/app/modules/admin/member/casino-money/models/casino-money-pagination.ts @@ -1,4 +1,4 @@ -export interface CasinomoneyPagination { +export interface CasinoMoneyPagination { length: number; size: number; page: number; diff --git a/src/app/modules/admin/member/casinomoney/models/casinomoney.ts b/src/app/modules/admin/member/casino-money/models/casino-money.ts similarity index 92% rename from src/app/modules/admin/member/casinomoney/models/casinomoney.ts rename to src/app/modules/admin/member/casino-money/models/casino-money.ts index 9ae9e40..1c4313e 100644 --- a/src/app/modules/admin/member/casinomoney/models/casinomoney.ts +++ b/src/app/modules/admin/member/casino-money/models/casino-money.ts @@ -1,4 +1,4 @@ -export interface Casinomoney { +export interface CasinoMoney { id?: string; nickname?: string; highRank?: string; diff --git a/src/app/modules/admin/member/casinomoney/resolvers/casinomoney.resolver.ts b/src/app/modules/admin/member/casino-money/resolvers/casino-money.resolver.ts similarity index 70% rename from src/app/modules/admin/member/casinomoney/resolvers/casinomoney.resolver.ts rename to src/app/modules/admin/member/casino-money/resolvers/casino-money.resolver.ts index 00a0018..3ea52c5 100644 --- a/src/app/modules/admin/member/casinomoney/resolvers/casinomoney.resolver.ts +++ b/src/app/modules/admin/member/casino-money/resolvers/casino-money.resolver.ts @@ -7,19 +7,19 @@ import { } from '@angular/router'; import { catchError, Observable, throwError } from 'rxjs'; -import { Casinomoney } from '../models/casinomoney'; -import { CasinomoneyPagination } from '../models/casinomoney-pagination'; -import { CasinomoneyService } from '../services/casinomoney.service'; +import { CasinoMoney } from '../models/casino-money'; +import { CasinoMoneyPagination } from '../models/casino-money-pagination'; +import { CasinoMoneyService } from '../services/casino-money.service'; @Injectable({ providedIn: 'root', }) -export class CasinomoneyResolver implements Resolve { +export class CasinoMoneyResolver implements Resolve { /** * Constructor */ constructor( - private _casinomoneyService: CasinomoneyService, + private _casinoMoneyService: CasinoMoneyService, private _router: Router ) {} @@ -36,9 +36,9 @@ export class CasinomoneyResolver implements Resolve { resolve( route: ActivatedRouteSnapshot, state: RouterStateSnapshot - ): Observable { - return this._casinomoneyService - .getCasinomoneyById(route.paramMap.get('id')) + ): Observable { + return this._casinoMoneyService + .getCasinoMoneyById(route.paramMap.get('id')) .pipe( // Error here means the requested product is not available catchError((error) => { @@ -61,11 +61,11 @@ export class CasinomoneyResolver implements Resolve { @Injectable({ providedIn: 'root', }) -export class CasinomoneysResolver implements Resolve { +export class CasinoMoneysResolver implements Resolve { /** * Constructor */ - constructor(private _casinomoneyService: CasinomoneyService) {} + constructor(private _casinoMoneyService: CasinoMoneyService) {} // ----------------------------------------------------------------------------------------------------- // @ Public methods @@ -81,9 +81,9 @@ export class CasinomoneysResolver implements Resolve { route: ActivatedRouteSnapshot, state: RouterStateSnapshot ): Observable<{ - pagination: CasinomoneyPagination; - casinomoneys: Casinomoney[]; + pagination: CasinoMoneyPagination; + casinoMoneys: CasinoMoney[]; }> { - return this._casinomoneyService.getCasinomoneys(); + return this._casinoMoneyService.getCasinoMoneys(); } } diff --git a/src/app/modules/admin/member/casinomoney/services/casinomoney.service.ts b/src/app/modules/admin/member/casino-money/services/casino-money.service.ts similarity index 55% rename from src/app/modules/admin/member/casinomoney/services/casinomoney.service.ts rename to src/app/modules/admin/member/casino-money/services/casino-money.service.ts index b9ca654..da5b54b 100644 --- a/src/app/modules/admin/member/casinomoney/services/casinomoney.service.ts +++ b/src/app/modules/admin/member/casino-money/services/casino-money.service.ts @@ -12,21 +12,21 @@ import { throwError, } from 'rxjs'; -import { Casinomoney } from '../models/casinomoney'; -import { CasinomoneyPagination } from '../models/casinomoney-pagination'; +import { CasinoMoney } from '../models/casino-money'; +import { CasinoMoneyPagination } from '../models/casino-money-pagination'; @Injectable({ providedIn: 'root', }) -export class CasinomoneyService { +export class CasinoMoneyService { // Private - private __pagination = new BehaviorSubject( + private __pagination = new BehaviorSubject( undefined ); - private __casinomoney = new BehaviorSubject( + private __casinoMoney = new BehaviorSubject( undefined ); - private __casinomoneys = new BehaviorSubject( + private __casinoMoneys = new BehaviorSubject( undefined ); @@ -42,22 +42,22 @@ export class CasinomoneyService { /** * Getter for pagination */ - get pagination$(): Observable { + get pagination$(): Observable { return this.__pagination.asObservable(); } /** - * Getter for casinomoney + * Getter for casinoMoney */ - get casinomoney$(): Observable { - return this.__casinomoney.asObservable(); + get casinoMoney$(): Observable { + return this.__casinoMoney.asObservable(); } /** - * Getter for casinomoneys + * Getter for casinoMoneys */ - get casinomoneys$(): Observable { - return this.__casinomoneys.asObservable(); + get casinoMoneys$(): Observable { + return this.__casinoMoneys.asObservable(); } // ----------------------------------------------------------------------------------------------------- @@ -65,7 +65,7 @@ export class CasinomoneyService { // ----------------------------------------------------------------------------------------------------- /** - * Get casinomoneys + * Get casinoMoneys * * * @param page @@ -74,19 +74,19 @@ export class CasinomoneyService { * @param order * @param search */ - getCasinomoneys( + getCasinoMoneys( page: number = 0, size: number = 10, sort: string = 'name', order: 'asc' | 'desc' | '' = 'asc', search: string = '' ): Observable<{ - pagination: CasinomoneyPagination; - casinomoneys: Casinomoney[]; + pagination: CasinoMoneyPagination; + casinoMoneys: CasinoMoney[]; }> { return this._httpClient - .get<{ pagination: CasinomoneyPagination; casinomoneys: Casinomoney[] }>( - 'api/apps/member/casinomoney/casinomoneys', + .get<{ pagination: CasinoMoneyPagination; casinoMoneys: CasinoMoney[] }>( + 'api/apps/member/casino-money/casino-moneys', { params: { page: '' + page, @@ -100,7 +100,7 @@ export class CasinomoneyService { .pipe( tap((response) => { 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 */ - getCasinomoneyById(id: string | null): Observable { - return this.__casinomoneys.pipe( + getCasinoMoneyById(id: string | null): Observable { + return this.__casinoMoneys.pipe( take(1), - map((casinomoneys) => { + map((casinoMoneys) => { // Find the product - const casinomoney = - casinomoneys?.find((item) => item.id === id) || undefined; + const casinoMoney = + casinoMoneys?.find((item) => item.id === id) || undefined; // Update the product - this.__casinomoney.next(casinomoney); + this.__casinoMoney.next(casinoMoney); // Return the product - return casinomoney; + return casinoMoney; }), switchMap((product) => { if (!product) { @@ -135,21 +135,21 @@ export class CasinomoneyService { /** * Create product */ - createCasinomoney(): Observable { - return this.casinomoneys$.pipe( + createCasinoMoney(): Observable { + return this.casinoMoneys$.pipe( take(1), - switchMap((casinomoneys) => + switchMap((casinoMoneys) => this._httpClient - .post('api/apps/member/casinomoney/product', {}) + .post('api/apps/member/casino-money/product', {}) .pipe( - map((newCasinomoney) => { - // Update the casinomoneys with the new product - if (!!casinomoneys) { - this.__casinomoneys.next([newCasinomoney, ...casinomoneys]); + map((newCasinoMoney) => { + // Update the casinoMoneys with the new product + if (!!casinoMoneys) { + this.__casinoMoneys.next([newCasinoMoney, ...casinoMoneys]); } // Return the new product - return newCasinomoney; + return newCasinoMoney; }) ) ) diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 8fe3898..f189183 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -3,7 +3,7 @@ "Dashboards": "Dashboards", "Member": "Member", "User": "User", - "Casinomoney": "Casinomoney", + "Casino Money": "Casino Money", "Unconnected": "Unconnected", "Project": "Project", "All Partner": "All Partner", diff --git a/src/assets/i18n/ko.json b/src/assets/i18n/ko.json index 2add9f9..f8aeada 100644 --- a/src/assets/i18n/ko.json +++ b/src/assets/i18n/ko.json @@ -3,7 +3,7 @@ "Dashboards": "대쉬보드", "Member": "회원", "User": "사용자", - "Casinomoney": "CASINO 머니파악", + "Casino Money": "CASINO 머니파악", "Unconnected": "장기미접속회원", "Project": "프로젝트", "partner-management": "파트너관리",