diff --git a/src/app/app.routing.ts b/src/app/app.routing.ts
index 78b2470..8eaf09b 100644
--- a/src/app/app.routing.ts
+++ b/src/app/app.routing.ts
@@ -228,11 +228,11 @@ export const appRoutes: Route[] = [
),
},
{
- path: 'coupon-moneylog',
+ path: 'coupon-money-log',
loadChildren: () =>
import(
- 'app/modules/admin/member/coupon-moneylog/coupon-moneylog.module'
- ).then((m: any) => m.CouponMoneylogModule),
+ 'app/modules/admin/member/coupon-money-log/coupon-money-log.module'
+ ).then((m: any) => m.CouponMoneyLogModule),
},
{
path: 'coupon-log',
diff --git a/src/app/mock-api/apps/member/coupon-moneylog/api.ts b/src/app/mock-api/apps/member/coupon-money-log/api.ts
similarity index 65%
rename from src/app/mock-api/apps/member/coupon-moneylog/api.ts
rename to src/app/mock-api/apps/member/coupon-money-log/api.ts
index c023a1a..3901ea0 100644
--- a/src/app/mock-api/apps/member/coupon-moneylog/api.ts
+++ b/src/app/mock-api/apps/member/coupon-money-log/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 { couponMoneylogs as couponMoneylogsData } from './data';
+import { couponMoneyLogs as couponMoneyLogsData } from './data';
@Injectable({
providedIn: 'root',
})
-export class MemberCouponMoneylogMockApi {
- private _couponMoneylogs: any[] = couponMoneylogsData;
+export class MemberCouponMoneyLogMockApi {
+ private _couponMoneyLogs: any[] = couponMoneyLogsData;
/**
* Constructor
@@ -26,10 +26,10 @@ export class MemberCouponMoneylogMockApi {
*/
registerHandlers(): void {
// -----------------------------------------------------------------------------------------------------
- // @ CouponMoneylogs - GET
+ // @ CouponMoneyLogs - GET
// -----------------------------------------------------------------------------------------------------
this._fuseMockApiService
- .onGet('api/apps/member/coupon-moneylog/coupon-moneylogs', 300)
+ .onGet('api/apps/member/coupon-money-log/coupon-money-logs', 300)
.reply(({ request }) => {
// Get available queries
const search = request.params.get('search');
@@ -38,12 +38,12 @@ export class MemberCouponMoneylogMockApi {
const page = parseInt(request.params.get('page') ?? '1', 10);
const size = parseInt(request.params.get('size') ?? '10', 10);
- // Clone the couponMoneylogs
- let couponMoneylogs: any[] | null = cloneDeep(this._couponMoneylogs);
+ // Clone the couponMoneyLogs
+ let couponMoneyLogs: any[] | null = cloneDeep(this._couponMoneyLogs);
- // Sort the couponMoneylogs
+ // Sort the couponMoneyLogs
if (sort === 'sku' || sort === 'name' || sort === 'active') {
- couponMoneylogs.sort((a, b) => {
+ couponMoneyLogs.sort((a, b) => {
const fieldA = a[sort].toString().toUpperCase();
const fieldB = b[sort].toString().toUpperCase();
return order === 'asc'
@@ -51,15 +51,15 @@ export class MemberCouponMoneylogMockApi {
: fieldB.localeCompare(fieldA);
});
} else {
- couponMoneylogs.sort((a, b) =>
+ couponMoneyLogs.sort((a, b) =>
order === 'asc' ? a[sort] - b[sort] : b[sort] - a[sort]
);
}
// If search exists...
if (search) {
- // Filter the couponMoneylogs
- couponMoneylogs = couponMoneylogs.filter(
+ // Filter the couponMoneyLogs
+ couponMoneyLogs = couponMoneyLogs.filter(
(contact: any) =>
contact.name &&
contact.name.toLowerCase().includes(search.toLowerCase())
@@ -67,32 +67,32 @@ export class MemberCouponMoneylogMockApi {
}
// Paginate - Start
- const couponMoneylogsLength = couponMoneylogs.length;
+ const couponMoneyLogsLength = couponMoneyLogs.length;
// Calculate pagination details
const begin = page * size;
- const end = Math.min(size * (page + 1), couponMoneylogsLength);
- const lastPage = Math.max(Math.ceil(couponMoneylogsLength / size), 1);
+ const end = Math.min(size * (page + 1), couponMoneyLogsLength);
+ const lastPage = Math.max(Math.ceil(couponMoneyLogsLength / size), 1);
// Prepare the pagination object
let pagination = {};
// If the requested page number is bigger than
// the last possible page number, return null for
- // couponMoneylogs but also send the last possible page so
+ // couponMoneyLogs but also send the last possible page so
// the app can navigate to there
if (page > lastPage) {
- couponMoneylogs = null;
+ couponMoneyLogs = null;
pagination = {
lastPage,
};
} else {
// Paginate the results by size
- couponMoneylogs = couponMoneylogs.slice(begin, end);
+ couponMoneyLogs = couponMoneyLogs.slice(begin, end);
// Prepare the pagination mock-api
pagination = {
- length: couponMoneylogsLength,
+ length: couponMoneyLogsLength,
size: size,
page: page,
lastPage: lastPage,
@@ -105,41 +105,41 @@ export class MemberCouponMoneylogMockApi {
return [
200,
{
- couponMoneylogs,
+ couponMoneyLogs,
pagination,
},
];
});
// -----------------------------------------------------------------------------------------------------
- // @ CouponMoneylog - GET
+ // @ CouponMoneyLog - GET
// -----------------------------------------------------------------------------------------------------
this._fuseMockApiService
- .onGet('api/apps/member/coupon-moneylog/coupon-moneylog')
+ .onGet('api/apps/member/coupon-money-log/coupon-money-log')
.reply(({ request }) => {
// Get the id from the params
const id = request.params.get('id');
- // Clone the couponMoneylogs
- const couponMoneylogs = cloneDeep(this._couponMoneylogs);
+ // Clone the couponMoneyLogs
+ const couponMoneyLogs = cloneDeep(this._couponMoneyLogs);
- // Find the couponMoneylog
- const couponMoneylog = couponMoneylogs.find(
+ // Find the couponMoneyLog
+ const couponMoneyLog = couponMoneyLogs.find(
(item: any) => item.id === id
);
// Return the response
- return [200, couponMoneylog];
+ return [200, couponMoneyLog];
});
// -----------------------------------------------------------------------------------------------------
- // @ CouponMoneylog - POST
+ // @ CouponMoneyLog - POST
// -----------------------------------------------------------------------------------------------------
this._fuseMockApiService
- .onPost('api/apps/member/coupon-moneylog/coupon-moneylog')
+ .onPost('api/apps/member/coupon-money-log/coupon-money-log')
.reply(() => {
- // Generate a new couponMoneylog
- const newCouponMoneylog = {
+ // Generate a new couponMoneyLog
+ const newCouponMoneyLog = {
id: FuseMockApiUtils.guid(),
category: '',
name: 'A New User',
@@ -161,58 +161,58 @@ export class MemberCouponMoneylogMockApi {
active: false,
};
- // Unshift the new couponMoneylog
- this._couponMoneylogs.unshift(newCouponMoneylog);
+ // Unshift the new couponMoneyLog
+ this._couponMoneyLogs.unshift(newCouponMoneyLog);
// Return the response
- return [200, newCouponMoneylog];
+ return [200, newCouponMoneyLog];
});
// -----------------------------------------------------------------------------------------------------
- // @ CouponMoneylog - PATCH
+ // @ CouponMoneyLog - PATCH
// -----------------------------------------------------------------------------------------------------
this._fuseMockApiService
- .onPatch('api/apps/member/coupon-moneylog/coupon-moneylog')
+ .onPatch('api/apps/member/coupon-money-log/coupon-money-log')
.reply(({ request }) => {
- // Get the id and couponMoneylog
+ // Get the id and couponMoneyLog
const id = request.body.id;
- const couponMoneylog = cloneDeep(request.body.couponMoneylog);
+ const couponMoneyLog = cloneDeep(request.body.couponMoneyLog);
- // Prepare the updated couponMoneylog
- let updatedCouponMoneylog = null;
+ // Prepare the updated couponMoneyLog
+ let updatedCouponMoneyLog = null;
- // Find the couponMoneylog and update it
- this._couponMoneylogs.forEach((item, index, couponMoneylogs) => {
+ // Find the couponMoneyLog and update it
+ this._couponMoneyLogs.forEach((item, index, couponMoneyLogs) => {
if (item.id === id) {
- // Update the couponMoneylog
- couponMoneylogs[index] = assign(
+ // Update the couponMoneyLog
+ couponMoneyLogs[index] = assign(
{},
- couponMoneylogs[index],
- couponMoneylog
+ couponMoneyLogs[index],
+ couponMoneyLog
);
- // Store the updated couponMoneylog
- updatedCouponMoneylog = couponMoneylogs[index];
+ // Store the updated couponMoneyLog
+ updatedCouponMoneyLog = couponMoneyLogs[index];
}
});
// Return the response
- return [200, updatedCouponMoneylog];
+ return [200, updatedCouponMoneyLog];
});
// -----------------------------------------------------------------------------------------------------
- // @ CouponMoneylog - DELETE
+ // @ CouponMoneyLog - DELETE
// -----------------------------------------------------------------------------------------------------
this._fuseMockApiService
- .onDelete('api/apps/member/coupon-moneylog/coupon-moneylog')
+ .onDelete('api/apps/member/coupon-money-log/coupon-money-log')
.reply(({ request }) => {
// Get the id
const id = request.params.get('id');
- // Find the couponMoneylog and delete it
- this._couponMoneylogs.forEach((item, index) => {
+ // Find the couponMoneyLog and delete it
+ this._couponMoneyLogs.forEach((item, index) => {
if (item.id === id) {
- this._couponMoneylogs.splice(index, 1);
+ this._couponMoneyLogs.splice(index, 1);
}
});
diff --git a/src/app/mock-api/apps/member/coupon-moneylog/data.ts b/src/app/mock-api/apps/member/coupon-money-log/data.ts
similarity index 94%
rename from src/app/mock-api/apps/member/coupon-moneylog/data.ts
rename to src/app/mock-api/apps/member/coupon-money-log/data.ts
index ce0d23a..3054287 100644
--- a/src/app/mock-api/apps/member/coupon-moneylog/data.ts
+++ b/src/app/mock-api/apps/member/coupon-money-log/data.ts
@@ -1,6 +1,6 @@
/* eslint-disable */
-export const couponMoneylogs = [
+export const couponMoneyLogs = [
{
id: 'on00',
totalPartnerCount: '5',
diff --git a/src/app/mock-api/common/navigation/data.ts b/src/app/mock-api/common/navigation/data.ts
index b3e2c06..719f187 100644
--- a/src/app/mock-api/common/navigation/data.ts
+++ b/src/app/mock-api/common/navigation/data.ts
@@ -133,11 +133,11 @@ export const defaultNavigation: FuseNavigationItem[] = [
link: '/member/coupon',
},
{
- id: 'member.coupon-moneylog',
- title: 'Coupon Moneylog',
+ id: 'member.coupon-money-log',
+ title: 'Coupon Money Log',
type: 'basic',
icon: 'heroicons_outline:academic-cap',
- link: '/member/coupon-moneylog',
+ link: '/member/coupon-money-log',
},
{
id: 'member.coupon-log',
diff --git a/src/app/mock-api/index.ts b/src/app/mock-api/index.ts
index 867c6fb..60ef8ad 100644
--- a/src/app/mock-api/index.ts
+++ b/src/app/mock-api/index.ts
@@ -23,7 +23,7 @@ import { MemberPartnerOfficeMockApi } from './apps/member/partner-office/api';
import { MemberPartnerStoreMockApi } from './apps/member/partner-store/api';
import { MemberPartnerRecommendationMockApi } from './apps/member/partner-recommendation/api';
import { MemberCouponMockApi } from './apps/member/coupon/api';
-import { MemberCouponMoneylogMockApi } from './apps/member/coupon-moneylog/api';
+import { MemberCouponMoneyLogMockApi } from './apps/member/coupon-money-log/api';
import { MemberCouponLogMockApi } from './apps/member/coupon-log/api';
import { MessagesMockApi } from 'app/mock-api/common/messages/api';
import { NavigationMockApi } from 'app/mock-api/common/navigation/api';
@@ -96,7 +96,7 @@ export const mockApiServices = [
MemberPartnerStoreMockApi,
MemberPartnerRecommendationMockApi,
MemberCouponMockApi,
- MemberCouponMoneylogMockApi,
+ MemberCouponMoneyLogMockApi,
MemberCouponLogMockApi,
MessagesMockApi,
NavigationMockApi,
diff --git a/src/app/modules/admin/member/coupon-moneylog/components/index.ts b/src/app/modules/admin/member/coupon-money-log/components/index.ts
similarity index 100%
rename from src/app/modules/admin/member/coupon-moneylog/components/index.ts
rename to src/app/modules/admin/member/coupon-money-log/components/index.ts
diff --git a/src/app/modules/admin/member/coupon-moneylog/components/list.component.html b/src/app/modules/admin/member/coupon-money-log/components/list.component.html
similarity index 86%
rename from src/app/modules/admin/member/coupon-moneylog/components/list.component.html
rename to src/app/modules/admin/member/coupon-money-log/components/list.component.html
index b503e71..a3e101d 100644
--- a/src/app/modules/admin/member/coupon-moneylog/components/list.component.html
+++ b/src/app/modules/admin/member/coupon-money-log/components/list.component.html
@@ -15,20 +15,20 @@
-
+
@@ -232,22 +232,22 @@
@@ -259,36 +259,36 @@
class="hidden sm:block truncate"
(click)="viewUserDetail(user.id!)"
>
- {{ couponMoneylog.id }}
+ {{ couponMoneyLog.id }}
- {{ couponMoneylog.nickname }}
+ {{ couponMoneyLog.nickname }}
- {{ couponMoneylog.accountHolder }}
+ {{ couponMoneyLog.accountHolder }}
- {{ couponMoneylog.phoneNumber }}
+ {{ couponMoneyLog.phoneNumber }}
- {{ couponMoneylog.calculateType }}
+ {{ couponMoneyLog.calculateType }}
- 캐쉬{{ couponMoneylog.ownCash }} 콤프{{
- couponMoneylog.ownComp
+ 캐쉬{{ couponMoneyLog.ownCash }} 콤프{{
+ couponMoneyLog.ownComp
}}
- 쿠폰{{ couponMoneylog.ownCoupon }}
+ 쿠폰{{ couponMoneyLog.ownCoupon }}
- {{ couponMoneylog.gameMoney }}
+ {{ couponMoneyLog.gameMoney }}
@@ -301,34 +301,34 @@
- {{ couponMoneylog.todayComp }}P
+ {{ couponMoneyLog.todayComp }}P
- 입금{{ couponMoneylog.totalDeposit }} 출금{{
- couponMoneylog.totalWithdraw
+ 입금{{ couponMoneyLog.totalDeposit }} 출금{{
+ couponMoneyLog.totalWithdraw
}}
- 차익{{ couponMoneylog.balance }}
+ 차익{{ couponMoneyLog.balance }}
- 가입{{ couponMoneylog.registDate }} 최종{{
- couponMoneylog.finalSigninDate
+ 가입{{ couponMoneyLog.registDate }} 최종{{
+ couponMoneyLog.finalSigninDate
}}
- IP{{ couponMoneylog.ip }}
+ IP{{ couponMoneyLog.ip }}
- {{ couponMoneylog.state }}
+ {{ couponMoneyLog.state }}
- {{ couponMoneylog.memberCount }}
+ {{ couponMoneyLog.memberCount }}
@@ -348,11 +348,11 @@
-
+
- There are no coupon moneylogs!
+ There are no coupon money logs!
diff --git a/src/app/modules/admin/member/coupon-moneylog/components/list.component.ts b/src/app/modules/admin/member/coupon-money-log/components/list.component.ts
similarity index 85%
rename from src/app/modules/admin/member/coupon-moneylog/components/list.component.ts
rename to src/app/modules/admin/member/coupon-money-log/components/list.component.ts
index 2cd98da..ade4b29 100644
--- a/src/app/modules/admin/member/coupon-moneylog/components/list.component.ts
+++ b/src/app/modules/admin/member/coupon-money-log/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 { CouponMoneylog } from '../models/coupon-moneylog';
-import { CouponMoneylogPagination } from '../models/coupon-moneylog-pagination';
-import { CouponMoneylogService } from '../services/coupon-moneylog.service';
+import { CouponMoneyLog } from '../models/coupon-money-log';
+import { CouponMoneyLogPagination } from '../models/coupon-money-log-pagination';
+import { CouponMoneyLogService } from '../services/coupon-money-log.service';
import { Router } from '@angular/router';
@Component({
- selector: 'coupon-moneylog-list',
+ selector: 'coupon-money-log-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;
- couponMoneylogs$!: Observable;
+ couponMoneyLogs$!: Observable;
users$!: Observable;
isLoading = false;
searchInputControl = new FormControl();
- selectedCouponMoneylog?: CouponMoneylog;
- pagination?: CouponMoneylogPagination;
+ selectedCouponMoneyLog?: CouponMoneyLog;
+ pagination?: CouponMoneyLogPagination;
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 _couponMoneylogService: CouponMoneylogService,
+ private _couponMoneyLogService: CouponMoneyLogService,
private router: Router
) {}
@@ -96,9 +96,9 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
*/
ngOnInit(): void {
// Get the pagination
- this._couponMoneylogService.pagination$
+ this._couponMoneyLogService.pagination$
.pipe(takeUntil(this._unsubscribeAll))
- .subscribe((pagination: CouponMoneylogPagination | undefined) => {
+ .subscribe((pagination: CouponMoneyLogPagination | undefined) => {
// Update the pagination
this.pagination = pagination;
@@ -107,7 +107,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
});
// Get the products
- this.couponMoneylogs$ = this._couponMoneylogService.couponMoneylogs$;
+ this.couponMoneyLogs$ = this._couponMoneyLogService.couponMoneyLogs$;
}
/**
@@ -125,7 +125,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
// Mark for check
this._changeDetectorRef.markForCheck();
- // If the couponMoneylog changes the sort order...
+ // If the couponMoneyLog 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._couponMoneylogService.getCouponMoneylogs(
+ return this._couponMoneyLogService.getCouponMoneyLogs(
this._paginator.pageIndex,
this._paginator.pageSize,
this._sort.active,
diff --git a/src/app/modules/admin/member/coupon-moneylog/coupon-moneylog.module.ts b/src/app/modules/admin/member/coupon-money-log/coupon-money-log.module.ts
similarity index 90%
rename from src/app/modules/admin/member/coupon-moneylog/coupon-moneylog.module.ts
rename to src/app/modules/admin/member/coupon-money-log/coupon-money-log.module.ts
index 9b8a534..9e8754c 100644
--- a/src/app/modules/admin/member/coupon-moneylog/coupon-moneylog.module.ts
+++ b/src/app/modules/admin/member/coupon-money-log/coupon-money-log.module.ts
@@ -22,14 +22,14 @@ import { SharedModule } from 'app/shared/shared.module';
import { COMPONENTS } from './components';
-import { CouponMoneylogRoutes } from './coupon-moneylog.routing';
+import { CouponMoneyLogRoutes } from './coupon-money-log.routing';
@NgModule({
declarations: [COMPONENTS],
imports: [
TranslocoModule,
SharedModule,
- RouterModule.forChild(CouponMoneylogRoutes),
+ RouterModule.forChild(CouponMoneyLogRoutes),
MatButtonModule,
MatFormFieldModule,
@@ -47,4 +47,4 @@ import { CouponMoneylogRoutes } from './coupon-moneylog.routing';
MatCheckboxModule,
],
})
-export class CouponMoneylogModule {}
+export class CouponMoneyLogModule {}
diff --git a/src/app/modules/admin/member/coupon-moneylog/coupon-moneylog.routing.ts b/src/app/modules/admin/member/coupon-money-log/coupon-money-log.routing.ts
similarity index 70%
rename from src/app/modules/admin/member/coupon-moneylog/coupon-moneylog.routing.ts
rename to src/app/modules/admin/member/coupon-money-log/coupon-money-log.routing.ts
index 5df336e..f6879e9 100644
--- a/src/app/modules/admin/member/coupon-moneylog/coupon-moneylog.routing.ts
+++ b/src/app/modules/admin/member/coupon-money-log/coupon-money-log.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 { CouponMoneylogsResolver } from './resolvers/coupon-moneylog.resolver';
+import { CouponMoneyLogsResolver } from './resolvers/coupon-money-log.resolver';
import { UserResolver } from '../user/resolvers/user.resolver';
-export const CouponMoneylogRoutes: Route[] = [
+export const CouponMoneyLogRoutes: Route[] = [
{
path: '',
component: ListComponent,
resolve: {
- CouponMoneylogs: CouponMoneylogsResolver,
+ CouponMoneyLogs: CouponMoneyLogsResolver,
},
},
{
diff --git a/src/app/modules/admin/member/coupon-moneylog/models/coupon-moneylog-pagination.ts b/src/app/modules/admin/member/coupon-money-log/models/coupon-money-log-pagination.ts
similarity index 72%
rename from src/app/modules/admin/member/coupon-moneylog/models/coupon-moneylog-pagination.ts
rename to src/app/modules/admin/member/coupon-money-log/models/coupon-money-log-pagination.ts
index 6528c9d..928c27d 100644
--- a/src/app/modules/admin/member/coupon-moneylog/models/coupon-moneylog-pagination.ts
+++ b/src/app/modules/admin/member/coupon-money-log/models/coupon-money-log-pagination.ts
@@ -1,4 +1,4 @@
-export interface CouponMoneylogPagination {
+export interface CouponMoneyLogPagination {
length: number;
size: number;
page: number;
diff --git a/src/app/modules/admin/member/coupon-moneylog/models/coupon-moneylog.ts b/src/app/modules/admin/member/coupon-money-log/models/coupon-money-log.ts
similarity index 94%
rename from src/app/modules/admin/member/coupon-moneylog/models/coupon-moneylog.ts
rename to src/app/modules/admin/member/coupon-money-log/models/coupon-money-log.ts
index 600d6ee..5c9023a 100644
--- a/src/app/modules/admin/member/coupon-moneylog/models/coupon-moneylog.ts
+++ b/src/app/modules/admin/member/coupon-money-log/models/coupon-money-log.ts
@@ -1,4 +1,4 @@
-export interface CouponMoneylog {
+export interface CouponMoneyLog {
id?: string;
totalPartnerCount?: number;
totalHoldingMoney?: number;
diff --git a/src/app/modules/admin/member/coupon-moneylog/resolvers/coupon-moneylog.resolver.ts b/src/app/modules/admin/member/coupon-money-log/resolvers/coupon-money-log.resolver.ts
similarity index 68%
rename from src/app/modules/admin/member/coupon-moneylog/resolvers/coupon-moneylog.resolver.ts
rename to src/app/modules/admin/member/coupon-money-log/resolvers/coupon-money-log.resolver.ts
index 1c9aad9..e884804 100644
--- a/src/app/modules/admin/member/coupon-moneylog/resolvers/coupon-moneylog.resolver.ts
+++ b/src/app/modules/admin/member/coupon-money-log/resolvers/coupon-money-log.resolver.ts
@@ -7,19 +7,19 @@ import {
} from '@angular/router';
import { catchError, Observable, throwError } from 'rxjs';
-import { CouponMoneylog } from '../models/coupon-moneylog';
-import { CouponMoneylogPagination } from '../models/coupon-moneylog-pagination';
-import { CouponMoneylogService } from '../services/coupon-moneylog.service';
+import { CouponMoneyLog } from '../models/coupon-money-log';
+import { CouponMoneyLogPagination } from '../models/coupon-money-log-pagination';
+import { CouponMoneyLogService } from '../services/coupon-money-log.service';
@Injectable({
providedIn: 'root',
})
-export class CouponMoneylogResolver implements Resolve {
+export class CouponMoneyLogResolver implements Resolve {
/**
* Constructor
*/
constructor(
- private _couponMoneylogService: CouponMoneylogService,
+ private _couponMoneyLogService: CouponMoneyLogService,
private _router: Router
) {}
@@ -36,9 +36,9 @@ export class CouponMoneylogResolver implements Resolve {
resolve(
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot
- ): Observable {
- return this._couponMoneylogService
- .getCouponMoneylogById(route.paramMap.get('id'))
+ ): Observable {
+ return this._couponMoneyLogService
+ .getCouponMoneyLogById(route.paramMap.get('id'))
.pipe(
// Error here means the requested product is not available
catchError((error) => {
@@ -61,11 +61,11 @@ export class CouponMoneylogResolver implements Resolve {
@Injectable({
providedIn: 'root',
})
-export class CouponMoneylogsResolver implements Resolve {
+export class CouponMoneyLogsResolver implements Resolve {
/**
* Constructor
*/
- constructor(private _couponMoneylogService: CouponMoneylogService) {}
+ constructor(private _couponMoneyLogService: CouponMoneyLogService) {}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
@@ -81,9 +81,9 @@ export class CouponMoneylogsResolver implements Resolve {
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot
): Observable<{
- pagination: CouponMoneylogPagination;
- couponMoneylogs: CouponMoneylog[];
+ pagination: CouponMoneyLogPagination;
+ couponMoneyLogs: CouponMoneyLog[];
}> {
- return this._couponMoneylogService.getCouponMoneylogs();
+ return this._couponMoneyLogService.getCouponMoneyLogs();
}
}
diff --git a/src/app/modules/admin/member/coupon-moneylog/services/coupon-moneylog.service.ts b/src/app/modules/admin/member/coupon-money-log/services/coupon-money-log.service.ts
similarity index 54%
rename from src/app/modules/admin/member/coupon-moneylog/services/coupon-moneylog.service.ts
rename to src/app/modules/admin/member/coupon-money-log/services/coupon-money-log.service.ts
index d07ca53..7e6c263 100644
--- a/src/app/modules/admin/member/coupon-moneylog/services/coupon-moneylog.service.ts
+++ b/src/app/modules/admin/member/coupon-money-log/services/coupon-money-log.service.ts
@@ -12,21 +12,21 @@ import {
throwError,
} from 'rxjs';
-import { CouponMoneylog } from '../models/coupon-moneylog';
-import { CouponMoneylogPagination } from '../models/coupon-moneylog-pagination';
+import { CouponMoneyLog } from '../models/coupon-money-log';
+import { CouponMoneyLogPagination } from '../models/coupon-money-log-pagination';
@Injectable({
providedIn: 'root',
})
-export class CouponMoneylogService {
+export class CouponMoneyLogService {
// Private
private __pagination = new BehaviorSubject<
- CouponMoneylogPagination | undefined
+ CouponMoneyLogPagination | undefined
>(undefined);
- private __couponMoneylog = new BehaviorSubject(
+ private __couponMoneyLog = new BehaviorSubject(
undefined
);
- private __couponMoneylogs = new BehaviorSubject(
+ private __couponMoneyLogs = new BehaviorSubject(
undefined
);
@@ -42,22 +42,22 @@ export class CouponMoneylogService {
/**
* Getter for pagination
*/
- get pagination$(): Observable {
+ get pagination$(): Observable {
return this.__pagination.asObservable();
}
/**
- * Getter for couponMoneylog
+ * Getter for couponMoneyLog
*/
- get couponMoneylog$(): Observable {
- return this.__couponMoneylog.asObservable();
+ get couponMoneyLog$(): Observable {
+ return this.__couponMoneyLog.asObservable();
}
/**
- * Getter for couponMoneylogs
+ * Getter for couponMoneyLogs
*/
- get couponMoneylogs$(): Observable {
- return this.__couponMoneylogs.asObservable();
+ get couponMoneyLogs$(): Observable {
+ return this.__couponMoneyLogs.asObservable();
}
// -----------------------------------------------------------------------------------------------------
@@ -65,7 +65,7 @@ export class CouponMoneylogService {
// -----------------------------------------------------------------------------------------------------
/**
- * Get couponMoneylogs
+ * Get couponMoneyLogs
*
*
* @param page
@@ -74,21 +74,21 @@ export class CouponMoneylogService {
* @param order
* @param search
*/
- getCouponMoneylogs(
+ getCouponMoneyLogs(
page: number = 0,
size: number = 10,
sort: string = 'name',
order: 'asc' | 'desc' | '' = 'asc',
search: string = ''
): Observable<{
- pagination: CouponMoneylogPagination;
- couponMoneylogs: CouponMoneylog[];
+ pagination: CouponMoneyLogPagination;
+ couponMoneyLogs: CouponMoneyLog[];
}> {
return this._httpClient
.get<{
- pagination: CouponMoneylogPagination;
- couponMoneylogs: CouponMoneylog[];
- }>('api/apps/member/coupon-moneylog/coupon-moneylogs', {
+ pagination: CouponMoneyLogPagination;
+ couponMoneyLogs: CouponMoneyLog[];
+ }>('api/apps/member/coupon-money-log/coupon-money-logs', {
params: {
page: '' + page,
size: '' + size,
@@ -100,7 +100,7 @@ export class CouponMoneylogService {
.pipe(
tap((response) => {
this.__pagination.next(response.pagination);
- this.__couponMoneylogs.next(response.couponMoneylogs);
+ this.__couponMoneyLogs.next(response.couponMoneyLogs);
})
);
}
@@ -108,19 +108,19 @@ export class CouponMoneylogService {
/**
* Get product by id
*/
- getCouponMoneylogById(id: string | null): Observable {
- return this.__couponMoneylogs.pipe(
+ getCouponMoneyLogById(id: string | null): Observable {
+ return this.__couponMoneyLogs.pipe(
take(1),
- map((couponMoneylogs) => {
+ map((couponMoneyLogs) => {
// Find the product
- const couponMoneylog =
- couponMoneylogs?.find((item) => item.id === id) || undefined;
+ const couponMoneyLog =
+ couponMoneyLogs?.find((item) => item.id === id) || undefined;
// Update the product
- this.__couponMoneylog.next(couponMoneylog);
+ this.__couponMoneyLog.next(couponMoneyLog);
// Return the product
- return couponMoneylog;
+ return couponMoneyLog;
}),
switchMap((product) => {
if (!product) {
@@ -135,24 +135,24 @@ export class CouponMoneylogService {
/**
* Create product
*/
- createCouponMoneylog(): Observable {
- return this.couponMoneylogs$.pipe(
+ createCouponMoneyLog(): Observable {
+ return this.couponMoneyLogs$.pipe(
take(1),
- switchMap((couponMoneylogs) =>
+ switchMap((couponMoneyLogs) =>
this._httpClient
- .post('api/apps/member/coupon-moneylog/product', {})
+ .post('api/apps/member/coupon-money-log/product', {})
.pipe(
- map((newCouponMoneylog) => {
- // Update the couponMoneylogs with the new product
- if (!!couponMoneylogs) {
- this.__couponMoneylogs.next([
- newCouponMoneylog,
- ...couponMoneylogs,
+ map((newCouponMoneyLog) => {
+ // Update the couponMoneyLogs with the new product
+ if (!!couponMoneyLogs) {
+ this.__couponMoneyLogs.next([
+ newCouponMoneyLog,
+ ...couponMoneyLogs,
]);
}
// Return the new product
- return newCouponMoneylog;
+ return newCouponMoneyLog;
})
)
)
diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json
index f189183..64b9a29 100644
--- a/src/assets/i18n/en.json
+++ b/src/assets/i18n/en.json
@@ -14,7 +14,7 @@
"Partner Store": "Partner Store",
"Partner Recommendation": "Partner Recommendation",
"Coupon": "Coupon",
- "Coupon Moneylog": "Coupon Moneylog",
+ "Coupon Money Log": "Coupon Money Log",
"Coupon Log": "Coupon Log",
"Analytics": "Analytics",
"Deposit": "Deposit",
diff --git a/src/assets/i18n/ko.json b/src/assets/i18n/ko.json
index f8aeada..7ccdaf3 100644
--- a/src/assets/i18n/ko.json
+++ b/src/assets/i18n/ko.json
@@ -15,7 +15,7 @@
"Partner Store": "매장",
"Partner Recommendation": "추천코드등록",
"Coupon": "쿠폰발행리스트",
- "Coupon Moneylog": "쿠폰발행머니로그",
+ "Coupon Money Log": "쿠폰발행머니로그",
"Coupon Log": "쿠폰발행 로그",
"Analytics": "Analytics",
"Deposit": "입금관리",