From b5cf7173e71f26c142eac31843ea06e979569970 Mon Sep 17 00:00:00 2001 From: JUNG YI DAM Date: Thu, 4 Aug 2022 07:15:38 +0000 Subject: [PATCH 1/4] =?UTF-8?q?=EB=B3=B4=EA=B3=A0=EC=84=9C=EA=B4=80?= =?UTF-8?q?=EB=A6=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/list.component.html | 142 +++++++++++------- .../components/list.component.ts | 12 +- .../today-bet/components/list.component.html | 6 +- 3 files changed, 97 insertions(+), 63 deletions(-) diff --git a/src/app/modules/admin/report/daily-partner/components/list.component.html b/src/app/modules/admin/report/daily-partner/components/list.component.html index 6b300f4..878f1c5 100644 --- a/src/app/modules/admin/report/daily-partner/components/list.component.html +++ b/src/app/modules/admin/report/daily-partner/components/list.component.html @@ -114,29 +114,29 @@
-
요율
-
상부
-
- 아이디 -
- 닉네임 -
- 연락처 -
-
- 등급 -
- 레벨 -
- - - - - +
처리날짜
+
이전일 보유금
+
회원 입출금
+
파트너 입출금
+ + + + + + + + + + + + + + + + + + +
@@ -146,60 +146,90 @@
-
요율
+
{{ dailyPartner.processDate }}
- {{ dailyPartner.highRank }} + {{ dailyPartner.lastDayHoldingMoney }}
- {{ dailyPartner.signinId }} + 충전{{ dailyPartner.memberCharge }}
- {{ dailyPartner.nickname }} + 환전{{ dailyPartner.memberExchange }}
- {{ dailyPartner.phoneNumber }} + 손익{{ dailyPartner.memberProfitLoss }}
- {{ dailyPartner.rank }} + 충전{{ dailyPartner.partnerCharge }}
- LV{{ dailyPartner.level }} + 환전{{ dailyPartner.partnerExchange }} +
+ 손익{{ dailyPartner.partnerProfitLoss }}
+ + + + + + + + + + + + + +
diff --git a/src/app/modules/admin/report/daily-partner/components/list.component.ts b/src/app/modules/admin/report/daily-partner/components/list.component.ts index f0c216e..283e6bd 100644 --- a/src/app/modules/admin/report/daily-partner/components/list.component.ts +++ b/src/app/modules/admin/report/daily-partner/components/list.component.ts @@ -41,18 +41,22 @@ import { Router } from '@angular/router'; /* language=SCSS */ ` .inventory-grid { - grid-template-columns: 60px auto 40px; + /* 아이디 등급 회원 */ + grid-template-columns: 40px auto 30px; @screen sm { - grid-template-columns: 60px 60px 60px 60px 60px 60px auto 60px; + /* 아이디 등급 회원 파트너 손익 머니 콤프 카배팅 */ + grid-template-columns: 40px auto 30px 30px 30px 30px 30px 30px; } @screen md { - grid-template-columns: 60px 60px 60px 60px 60px 60px auto 60px 60px; + /* 아이디 등급 회원 파트너 손익 머니 콤프 카배팅 카당첨 */ + grid-template-columns: 40px auto 30px 30px 30px 30px 30px 30px 30px; } @screen lg { - grid-template-columns: 60px 70px 70px 70px 70px 100px 60px 60px auto 60px 60px 60px 60px; + /* 아이디 등급 회원 파트너 손익 머니 콤프 카배팅 카당첨 카윈로스 카수수료 카정산 슬배팅 슬당첨 슬윈로스 슬수수료 슬정산 파배팅 파당첨 파윈로스 파수수료 파정산 총정산 */ + grid-template-columns: 40px auto 30px 30px 30px 30px 30px 30px 30px 30px 30px 30px 30px 30px 30px 30px 30px 30px 30px 30px 30px 30px 30px; } } `, diff --git a/src/app/modules/admin/report/today-bet/components/list.component.html b/src/app/modules/admin/report/today-bet/components/list.component.html index 83d1421..441cac4 100644 --- a/src/app/modules/admin/report/today-bet/components/list.component.html +++ b/src/app/modules/admin/report/today-bet/components/list.component.html @@ -164,18 +164,18 @@ - + - + - + From ce51b9e44f5d78ce3a46b80cc547a6d12ecd108b Mon Sep 17 00:00:00 2001 From: JUNG YI DAM Date: Thu, 4 Aug 2022 08:40:45 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=ED=8F=B4=EB=8D=94=EB=AA=85=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/app.routing.ts | 6 +- .../{sessionin-admin => admin-session}/api.ts | 110 +++++++++--------- .../data.ts | 2 +- src/app/mock-api/common/navigation/data.ts | 6 +- src/app/mock-api/index.ts | 4 +- .../admin-session.module.ts} | 6 +- .../admin-session.routing.ts} | 6 +- .../components/index.ts | 0 .../components/list.component.html | 10 +- .../components/list.component.ts | 22 ++-- .../models/admin-session-pagination.ts} | 2 +- .../models/admin-session.ts} | 2 +- .../resolvers/admin-session.resolver.ts} | 26 ++--- .../services/admin-session.service.ts} | 77 ++++++------ src/assets/i18n/en.json | 2 +- src/assets/i18n/ko.json | 2 +- 16 files changed, 139 insertions(+), 144 deletions(-) rename src/app/mock-api/apps/report/{sessionin-admin => admin-session}/api.ts (64%) rename src/app/mock-api/apps/report/{sessionin-admin => admin-session}/data.ts (97%) rename src/app/modules/admin/report/{sessionin-admin/sessionin-admin.module.ts => admin-session/admin-session.module.ts} (91%) rename src/app/modules/admin/report/{sessionin-admin/sessionin-admin.routing.ts => admin-session/admin-session.routing.ts} (71%) rename src/app/modules/admin/report/{sessionin-admin => admin-session}/components/index.ts (100%) rename src/app/modules/admin/report/{sessionin-admin => admin-session}/components/list.component.html (96%) rename src/app/modules/admin/report/{sessionin-admin => admin-session}/components/list.component.ts (90%) rename src/app/modules/admin/report/{sessionin-admin/models/sessionin-admin-pagination.ts => admin-session/models/admin-session-pagination.ts} (72%) rename src/app/modules/admin/report/{sessionin-admin/models/sessionin-admin.ts => admin-session/models/admin-session.ts} (86%) rename src/app/modules/admin/report/{sessionin-admin/resolvers/sessionin-admin.resolver.ts => admin-session/resolvers/admin-session.resolver.ts} (68%) rename src/app/modules/admin/report/{sessionin-admin/services/sessionin-admin.service.ts => admin-session/services/admin-session.service.ts} (52%) diff --git a/src/app/app.routing.ts b/src/app/app.routing.ts index f259c06..c1cb18a 100644 --- a/src/app/app.routing.ts +++ b/src/app/app.routing.ts @@ -437,11 +437,11 @@ export const appRoutes: Route[] = [ ).then((m: any) => m.SessioninOverlapModule), }, { - path: 'sessionin-admin', + path: 'admin-session', loadChildren: () => import( - 'app/modules/admin/report/sessionin-admin/sessionin-admin.module' - ).then((m: any) => m.SessioninAdminModule), + 'app/modules/admin/report/admin-session/admin-session.module' + ).then((m: any) => m.AdminSessionModule), }, { path: 'excel-log', diff --git a/src/app/mock-api/apps/report/sessionin-admin/api.ts b/src/app/mock-api/apps/report/admin-session/api.ts similarity index 64% rename from src/app/mock-api/apps/report/sessionin-admin/api.ts rename to src/app/mock-api/apps/report/admin-session/api.ts index dbab087..859f579 100644 --- a/src/app/mock-api/apps/report/sessionin-admin/api.ts +++ b/src/app/mock-api/apps/report/admin-session/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 { sessioninAdmins as sessioninAdminsData } from './data'; +import { adminSessions as adminSessionsData } from './data'; @Injectable({ providedIn: 'root', }) -export class ReportSessioninAdminMockApi { - private _sessioninAdmins: any[] = sessioninAdminsData; +export class ReportAdminSessionMockApi { + private _adminSessions: any[] = adminSessionsData; /** * Constructor @@ -26,10 +26,10 @@ export class ReportSessioninAdminMockApi { */ registerHandlers(): void { // ----------------------------------------------------------------------------------------------------- - // @ SessioninAdmins - GET + // @ AdminSessions - GET // ----------------------------------------------------------------------------------------------------- this._fuseMockApiService - .onGet('api/apps/report/sessionin-admin/sessionin-admins', 300) + .onGet('api/apps/report/admin-session/admin-sessions', 300) .reply(({ request }) => { // Get available queries const search = request.params.get('search'); @@ -38,12 +38,12 @@ export class ReportSessioninAdminMockApi { const page = parseInt(request.params.get('page') ?? '1', 10); const size = parseInt(request.params.get('size') ?? '10', 10); - // Clone the sessioninAdmins - let sessioninAdmins: any[] | null = cloneDeep(this._sessioninAdmins); + // Clone the adminSessions + let adminSessions: any[] | null = cloneDeep(this._adminSessions); - // Sort the sessioninAdmins + // Sort the adminSessions // if (sort === 'sku' || sort === 'name' || sort === 'active') { - // sessioninAdmins.sort((a, b) => { + // adminSessions.sort((a, b) => { // const fieldA = a[sort].toString().toUpperCase(); // const fieldB = b[sort].toString().toUpperCase(); // return order === 'asc' @@ -51,15 +51,15 @@ export class ReportSessioninAdminMockApi { // : fieldB.localeCompare(fieldA); // }); // } else { - // sessioninAdmins.sort((a, b) => + // adminSessions.sort((a, b) => // order === 'asc' ? a[sort] - b[sort] : b[sort] - a[sort] // ); // } // If search exists... if (search) { - // Filter the sessioninAdmins - sessioninAdmins = sessioninAdmins.filter( + // Filter the adminSessions + adminSessions = adminSessions.filter( (contact: any) => contact.name && contact.name.toLowerCase().includes(search.toLowerCase()) @@ -67,32 +67,32 @@ export class ReportSessioninAdminMockApi { } // Paginate - Start - const sessioninAdminsLength = sessioninAdmins.length; + const adminSessionsLength = adminSessions.length; // Calculate pagination details const begin = page * size; - const end = Math.min(size * (page + 1), sessioninAdminsLength); - const lastPage = Math.max(Math.ceil(sessioninAdminsLength / size), 1); + const end = Math.min(size * (page + 1), adminSessionsLength); + const lastPage = Math.max(Math.ceil(adminSessionsLength / size), 1); // Prepare the pagination object let pagination = {}; // If the requested page number is bigger than // the last possible page number, return null for - // sessioninAdmins but also send the last possible page so + // adminSessions but also send the last possible page so // the app can navigate to there if (page > lastPage) { - sessioninAdmins = null; + adminSessions = null; pagination = { lastPage, }; } else { // Paginate the results by size - sessioninAdmins = sessioninAdmins.slice(begin, end); + adminSessions = adminSessions.slice(begin, end); // Prepare the pagination mock-api pagination = { - length: sessioninAdminsLength, + length: adminSessionsLength, size: size, page: page, lastPage: lastPage, @@ -105,41 +105,39 @@ export class ReportSessioninAdminMockApi { return [ 200, { - sessioninAdmins, + adminSessions, pagination, }, ]; }); // ----------------------------------------------------------------------------------------------------- - // @ SessioninAdmin - GET + // @ AdminSession - GET // ----------------------------------------------------------------------------------------------------- this._fuseMockApiService - .onGet('api/apps/report/sessionin-admin/sessionin-admin') + .onGet('api/apps/report/admin-session/admin-session') .reply(({ request }) => { // Get the id from the params const id = request.params.get('id'); - // Clone the sessioninAdmins - const sessioninAdmins = cloneDeep(this._sessioninAdmins); + // Clone the adminSessions + const adminSessions = cloneDeep(this._adminSessions); - // Find the sessioninAdmin - const sessioninAdmin = sessioninAdmins.find( - (item: any) => item.id === id - ); + // Find the adminSession + const adminSession = adminSessions.find((item: any) => item.id === id); // Return the response - return [200, sessioninAdmin]; + return [200, adminSession]; }); // ----------------------------------------------------------------------------------------------------- - // @ SessioninAdmin - POST + // @ AdminSession - POST // ----------------------------------------------------------------------------------------------------- this._fuseMockApiService - .onPost('api/apps/report/sessionin-admin/sessionin-admin') + .onPost('api/apps/report/admin-session/admin-session') .reply(() => { - // Generate a new sessioninAdmin - const newSessioninAdmin = { + // Generate a new adminSession + const newAdminSession = { id: FuseMockApiUtils.guid(), category: '', name: 'A New User', @@ -161,58 +159,58 @@ export class ReportSessioninAdminMockApi { active: false, }; - // Unshift the new sessioninAdmin - this._sessioninAdmins.unshift(newSessioninAdmin); + // Unshift the new adminSession + this._adminSessions.unshift(newAdminSession); // Return the response - return [200, newSessioninAdmin]; + return [200, newAdminSession]; }); // ----------------------------------------------------------------------------------------------------- - // @ SessioninAdmin - PATCH + // @ AdminSession - PATCH // ----------------------------------------------------------------------------------------------------- this._fuseMockApiService - .onPatch('api/apps/report/sessionin-admin/sessionin-admin') + .onPatch('api/apps/report/admin-session/admin-session') .reply(({ request }) => { - // Get the id and sessioninAdmin + // Get the id and adminSession const id = request.body.id; - const sessioninAdmin = cloneDeep(request.body.sessioninAdmin); + const adminSession = cloneDeep(request.body.adminSession); - // Prepare the updated sessioninAdmin - let updatedSessioninAdmin = null; + // Prepare the updated adminSession + let updatedAdminSession = null; - // Find the sessioninAdmin and update it - this._sessioninAdmins.forEach((item, index, sessioninAdmins) => { + // Find the adminSession and update it + this._adminSessions.forEach((item, index, adminSessions) => { if (item.id === id) { - // Update the sessioninAdmin - sessioninAdmins[index] = assign( + // Update the adminSession + adminSessions[index] = assign( {}, - sessioninAdmins[index], - sessioninAdmin + adminSessions[index], + adminSession ); - // Store the updated sessioninAdmin - updatedSessioninAdmin = sessioninAdmins[index]; + // Store the updated adminSession + updatedAdminSession = adminSessions[index]; } }); // Return the response - return [200, updatedSessioninAdmin]; + return [200, updatedAdminSession]; }); // ----------------------------------------------------------------------------------------------------- - // @ SessioninAdmin - DELETE + // @ AdminSession - DELETE // ----------------------------------------------------------------------------------------------------- this._fuseMockApiService - .onDelete('api/apps/report/sessionin-admin/sessionin-admin') + .onDelete('api/apps/report/admin-session/admin-session') .reply(({ request }) => { // Get the id const id = request.params.get('id'); - // Find the sessioninAdmin and delete it - this._sessioninAdmins.forEach((item, index) => { + // Find the adminSession and delete it + this._adminSessions.forEach((item, index) => { if (item.id === id) { - this._sessioninAdmins.splice(index, 1); + this._adminSessions.splice(index, 1); } }); diff --git a/src/app/mock-api/apps/report/sessionin-admin/data.ts b/src/app/mock-api/apps/report/admin-session/data.ts similarity index 97% rename from src/app/mock-api/apps/report/sessionin-admin/data.ts rename to src/app/mock-api/apps/report/admin-session/data.ts index 28bd243..c8320da 100644 --- a/src/app/mock-api/apps/report/sessionin-admin/data.ts +++ b/src/app/mock-api/apps/report/admin-session/data.ts @@ -1,6 +1,6 @@ /* eslint-disable */ -export const sessioninAdmins = [ +export const adminSessions = [ { id: '1', rank: '본사', diff --git a/src/app/mock-api/common/navigation/data.ts b/src/app/mock-api/common/navigation/data.ts index 4654cbc..1e4f359 100644 --- a/src/app/mock-api/common/navigation/data.ts +++ b/src/app/mock-api/common/navigation/data.ts @@ -329,11 +329,11 @@ export const defaultNavigation: FuseNavigationItem[] = [ link: '/report/sessionin-overlap', }, { - id: 'report.sessionin-admin', - title: 'Sessionin Admin', + id: 'report.admin-session', + title: 'Admin Session', type: 'basic', icon: 'heroicons_outline:academic-cap', - link: '/report/sessionin-admin', + link: '/report/admin-session', }, { id: 'report.excel-log', diff --git a/src/app/mock-api/index.ts b/src/app/mock-api/index.ts index 60ef8ad..ed07b09 100644 --- a/src/app/mock-api/index.ts +++ b/src/app/mock-api/index.ts @@ -60,7 +60,7 @@ import { ReportModificationLogMockApi } from './apps/report/modification-log/api import { ReportPaymentLogMockApi } from './apps/report/payment-log/api'; import { ReportSessioninInfoMockApi } from './apps/report/sessionin-info/api'; import { ReportSessioninOverlapMockApi } from './apps/report/sessionin-overlap/api'; -import { ReportSessioninAdminMockApi } from './apps/report/sessionin-admin/api'; +import { ReportAdminSessionMockApi } from './apps/report/admin-session/api'; import { ReportExcelLogMockApi } from './apps/report/excel-log/api'; import { ReportLoosingMockApi } from './apps/report/loosing/api'; import { BoardNoticeMockApi } from './apps/board/notice/api'; @@ -133,7 +133,7 @@ export const mockApiServices = [ ReportPaymentLogMockApi, ReportSessioninInfoMockApi, ReportSessioninOverlapMockApi, - ReportSessioninAdminMockApi, + ReportAdminSessionMockApi, ReportExcelLogMockApi, ReportLoosingMockApi, BoardNoticeMockApi, diff --git a/src/app/modules/admin/report/sessionin-admin/sessionin-admin.module.ts b/src/app/modules/admin/report/admin-session/admin-session.module.ts similarity index 91% rename from src/app/modules/admin/report/sessionin-admin/sessionin-admin.module.ts rename to src/app/modules/admin/report/admin-session/admin-session.module.ts index e22d1e3..b086e24 100644 --- a/src/app/modules/admin/report/sessionin-admin/sessionin-admin.module.ts +++ b/src/app/modules/admin/report/admin-session/admin-session.module.ts @@ -24,14 +24,14 @@ import { SharedModule } from 'app/shared/shared.module'; import { COMPONENTS } from './components'; -import { sessioninAdminRoutes } from './sessionin-admin.routing'; +import { adminSessionRoutes } from './admin-session.routing'; @NgModule({ declarations: [COMPONENTS], imports: [ TranslocoModule, SharedModule, - RouterModule.forChild(sessioninAdminRoutes), + RouterModule.forChild(adminSessionRoutes), MatButtonModule, MatFormFieldModule, @@ -51,4 +51,4 @@ import { sessioninAdminRoutes } from './sessionin-admin.routing'; MatMomentDateModule, ], }) -export class SessioninAdminModule {} +export class AdminSessionModule {} diff --git a/src/app/modules/admin/report/sessionin-admin/sessionin-admin.routing.ts b/src/app/modules/admin/report/admin-session/admin-session.routing.ts similarity index 71% rename from src/app/modules/admin/report/sessionin-admin/sessionin-admin.routing.ts rename to src/app/modules/admin/report/admin-session/admin-session.routing.ts index 493ade7..1ca274b 100644 --- a/src/app/modules/admin/report/sessionin-admin/sessionin-admin.routing.ts +++ b/src/app/modules/admin/report/admin-session/admin-session.routing.ts @@ -3,15 +3,15 @@ import { Route } from '@angular/router'; import { ListComponent } from './components/list.component'; import { ViewComponent } from '../../member/user/components/view.component'; -import { SessioninAdminsResolver } from './resolvers/sessionin-admin.resolver'; +import { AdminSessionsResolver } from './resolvers/admin-session.resolver'; import { UserResolver } from '../../member/user/resolvers/user.resolver'; -export const sessioninAdminRoutes: Route[] = [ +export const adminSessionRoutes: Route[] = [ { path: '', component: ListComponent, resolve: { - sessioninAdmins: SessioninAdminsResolver, + adminSessions: AdminSessionsResolver, }, }, { diff --git a/src/app/modules/admin/report/sessionin-admin/components/index.ts b/src/app/modules/admin/report/admin-session/components/index.ts similarity index 100% rename from src/app/modules/admin/report/sessionin-admin/components/index.ts rename to src/app/modules/admin/report/admin-session/components/index.ts diff --git a/src/app/modules/admin/report/sessionin-admin/components/list.component.html b/src/app/modules/admin/report/admin-session/components/list.component.html similarity index 96% rename from src/app/modules/admin/report/sessionin-admin/components/list.component.html rename to src/app/modules/admin/report/admin-session/components/list.component.html index 9e8098a..6eb58fd 100644 --- a/src/app/modules/admin/report/sessionin-admin/components/list.component.html +++ b/src/app/modules/admin/report/admin-session/components/list.component.html @@ -99,8 +99,8 @@
- - + +
- + - +
diff --git a/src/app/modules/admin/report/sessionin-admin/components/list.component.ts b/src/app/modules/admin/report/admin-session/components/list.component.ts similarity index 90% rename from src/app/modules/admin/report/sessionin-admin/components/list.component.ts rename to src/app/modules/admin/report/admin-session/components/list.component.ts index 36cdfa0..0c9a3d3 100644 --- a/src/app/modules/admin/report/sessionin-admin/components/list.component.ts +++ b/src/app/modules/admin/report/admin-session/components/list.component.ts @@ -24,13 +24,13 @@ import { import { fuseAnimations } from '@fuse/animations'; import { FuseConfirmationService } from '@fuse/services/confirmation'; -import { SessioninAdmin } from '../models/sessionin-admin'; -import { SessioninAdminPagination } from '../models/sessionin-admin-pagination'; -import { SessioninAdminService } from '../services/sessionin-admin.service'; +import { AdminSession } from '../models/admin-session'; +import { AdminSessionPagination } from '../models/admin-session-pagination'; +import { AdminSessionService } from '../services/admin-session.service'; import { Router } from '@angular/router'; @Component({ - selector: 'sessionin-admin-list', + selector: 'admin-session-list', templateUrl: './list.component.html', styles: [ /* language=SCSS */ @@ -60,12 +60,12 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { @ViewChild(MatPaginator) private _paginator!: MatPaginator; @ViewChild(MatSort) private _sort!: MatSort; - sessioninAdmins$!: Observable; + adminSessions$!: Observable; isLoading = false; searchInputControl = new FormControl(); - selectedSessioninAdmin?: SessioninAdmin; - pagination?: SessioninAdminPagination; + selectedAdminSession?: AdminSession; + pagination?: AdminSessionPagination; __isSearchOpened = false; ipBlockConfigForm!: FormGroup; @@ -80,7 +80,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { private _changeDetectorRef: ChangeDetectorRef, private _fuseConfirmationService: FuseConfirmationService, private _formBuilder: FormBuilder, - private _sessioninAdminService: SessioninAdminService, + private _adminSessionService: AdminSessionService, private router: Router ) {} @@ -93,9 +93,9 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { */ ngOnInit(): void { // Get the pagination - this._sessioninAdminService.pagination$ + this._adminSessionService.pagination$ .pipe(takeUntil(this._unsubscribeAll)) - .subscribe((pagination: SessioninAdminPagination | undefined) => { + .subscribe((pagination: AdminSessionPagination | undefined) => { // Update the pagination this.pagination = pagination; @@ -104,7 +104,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { }); // Get the products - this.sessioninAdmins$ = this._sessioninAdminService.sessioninAdmins$; + this.adminSessions$ = this._adminSessionService.adminSessions$; // Set ip, id block config this.__idBlockConfirmConfig(); diff --git a/src/app/modules/admin/report/sessionin-admin/models/sessionin-admin-pagination.ts b/src/app/modules/admin/report/admin-session/models/admin-session-pagination.ts similarity index 72% rename from src/app/modules/admin/report/sessionin-admin/models/sessionin-admin-pagination.ts rename to src/app/modules/admin/report/admin-session/models/admin-session-pagination.ts index 7503a10..9d13aaf 100644 --- a/src/app/modules/admin/report/sessionin-admin/models/sessionin-admin-pagination.ts +++ b/src/app/modules/admin/report/admin-session/models/admin-session-pagination.ts @@ -1,4 +1,4 @@ -export interface SessioninAdminPagination { +export interface AdminSessionPagination { length: number; size: number; page: number; diff --git a/src/app/modules/admin/report/sessionin-admin/models/sessionin-admin.ts b/src/app/modules/admin/report/admin-session/models/admin-session.ts similarity index 86% rename from src/app/modules/admin/report/sessionin-admin/models/sessionin-admin.ts rename to src/app/modules/admin/report/admin-session/models/admin-session.ts index 66bf73f..38f48af 100644 --- a/src/app/modules/admin/report/sessionin-admin/models/sessionin-admin.ts +++ b/src/app/modules/admin/report/admin-session/models/admin-session.ts @@ -1,4 +1,4 @@ -export interface SessioninAdmin { +export interface AdminSession { id: string; rank?: string; userId?: string; diff --git a/src/app/modules/admin/report/sessionin-admin/resolvers/sessionin-admin.resolver.ts b/src/app/modules/admin/report/admin-session/resolvers/admin-session.resolver.ts similarity index 68% rename from src/app/modules/admin/report/sessionin-admin/resolvers/sessionin-admin.resolver.ts rename to src/app/modules/admin/report/admin-session/resolvers/admin-session.resolver.ts index c089aa9..db6fa6a 100644 --- a/src/app/modules/admin/report/sessionin-admin/resolvers/sessionin-admin.resolver.ts +++ b/src/app/modules/admin/report/admin-session/resolvers/admin-session.resolver.ts @@ -7,19 +7,19 @@ import { } from '@angular/router'; import { catchError, Observable, throwError } from 'rxjs'; -import { SessioninAdmin } from '../models/sessionin-admin'; -import { SessioninAdminPagination } from '../models/sessionin-admin-pagination'; -import { SessioninAdminService } from '../services/sessionin-admin.service'; +import { AdminSession } from '../models/admin-session'; +import { AdminSessionPagination } from '../models/admin-session-pagination'; +import { AdminSessionService } from '../services/admin-session.service'; @Injectable({ providedIn: 'root', }) -export class SessioninAdminResolver implements Resolve { +export class AdminSessionResolver implements Resolve { /** * Constructor */ constructor( - private _sessioninAdminService: SessioninAdminService, + private _adminSessionService: AdminSessionService, private _router: Router ) {} @@ -36,9 +36,9 @@ export class SessioninAdminResolver implements Resolve { resolve( route: ActivatedRouteSnapshot, state: RouterStateSnapshot - ): Observable { - return this._sessioninAdminService - .getSessioninAdminById(route.paramMap.get('id')) + ): Observable { + return this._adminSessionService + .getAdminSessionById(route.paramMap.get('id')) .pipe( // Error here means the requested product is not available catchError((error) => { @@ -61,11 +61,11 @@ export class SessioninAdminResolver implements Resolve { @Injectable({ providedIn: 'root', }) -export class SessioninAdminsResolver implements Resolve { +export class AdminSessionsResolver implements Resolve { /** * Constructor */ - constructor(private _sessioninAdminService: SessioninAdminService) {} + constructor(private _adminSessionService: AdminSessionService) {} // ----------------------------------------------------------------------------------------------------- // @ Public methods @@ -81,9 +81,9 @@ export class SessioninAdminsResolver implements Resolve { route: ActivatedRouteSnapshot, state: RouterStateSnapshot ): Observable<{ - pagination: SessioninAdminPagination; - sessioninAdmins: SessioninAdmin[]; + pagination: AdminSessionPagination; + adminSessions: AdminSession[]; }> { - return this._sessioninAdminService.getSessioninAdmins(); + return this._adminSessionService.getAdminSessions(); } } diff --git a/src/app/modules/admin/report/sessionin-admin/services/sessionin-admin.service.ts b/src/app/modules/admin/report/admin-session/services/admin-session.service.ts similarity index 52% rename from src/app/modules/admin/report/sessionin-admin/services/sessionin-admin.service.ts rename to src/app/modules/admin/report/admin-session/services/admin-session.service.ts index bf25057..b98e563 100644 --- a/src/app/modules/admin/report/sessionin-admin/services/sessionin-admin.service.ts +++ b/src/app/modules/admin/report/admin-session/services/admin-session.service.ts @@ -12,21 +12,21 @@ import { throwError, } from 'rxjs'; -import { SessioninAdmin } from '../models/sessionin-admin'; -import { SessioninAdminPagination } from '../models/sessionin-admin-pagination'; +import { AdminSession } from '../models/admin-session'; +import { AdminSessionPagination } from '../models/admin-session-pagination'; @Injectable({ providedIn: 'root', }) -export class SessioninAdminService { +export class AdminSessionService { // Private private __pagination = new BehaviorSubject< - SessioninAdminPagination | undefined + AdminSessionPagination | undefined >(undefined); - private __sessioninAdmin = new BehaviorSubject( + private __adminSession = new BehaviorSubject( undefined ); - private __sessioninAdmins = new BehaviorSubject( + private __adminSessions = new BehaviorSubject( undefined ); @@ -42,22 +42,22 @@ export class SessioninAdminService { /** * Getter for pagination */ - get pagination$(): Observable { + get pagination$(): Observable { return this.__pagination.asObservable(); } /** - * Getter for sessioninAdmin + * Getter for adminSession */ - get sessioninAdmin$(): Observable { - return this.__sessioninAdmin.asObservable(); + get adminSession$(): Observable { + return this.__adminSession.asObservable(); } /** - * Getter for sessioninAdmins + * Getter for adminSessions */ - get sessioninAdmins$(): Observable { - return this.__sessioninAdmins.asObservable(); + get adminSessions$(): Observable { + return this.__adminSessions.asObservable(); } // ----------------------------------------------------------------------------------------------------- @@ -65,7 +65,7 @@ export class SessioninAdminService { // ----------------------------------------------------------------------------------------------------- /** - * Get SessioninAdmins + * Get AdminSessions * * * @param page @@ -74,21 +74,21 @@ export class SessioninAdminService { * @param order * @param search */ - getSessioninAdmins( + getAdminSessions( page: number = 0, size: number = 10, sort: string = 'name', order: 'asc' | 'desc' | '' = 'asc', search: string = '' ): Observable<{ - pagination: SessioninAdminPagination; - sessioninAdmins: SessioninAdmin[]; + pagination: AdminSessionPagination; + adminSessions: AdminSession[]; }> { return this._httpClient .get<{ - pagination: SessioninAdminPagination; - sessioninAdmins: SessioninAdmin[]; - }>('api/apps/report/sessionin-admin/sessionin-admins', { + pagination: AdminSessionPagination; + adminSessions: AdminSession[]; + }>('api/apps/report/admin-session/admin-sessions', { params: { page: '' + page, size: '' + size, @@ -100,7 +100,7 @@ export class SessioninAdminService { .pipe( tap((response) => { this.__pagination.next(response.pagination); - this.__sessioninAdmins.next(response.sessioninAdmins); + this.__adminSessions.next(response.adminSessions); }) ); } @@ -108,19 +108,19 @@ export class SessioninAdminService { /** * Get product by id */ - getSessioninAdminById(id: string | null): Observable { - return this.__sessioninAdmins.pipe( + getAdminSessionById(id: string | null): Observable { + return this.__adminSessions.pipe( take(1), - map((sessioninAdmins) => { + map((adminSessions) => { // Find the product - const sessioninAdmin = - sessioninAdmins?.find((item) => item.id === id) || undefined; + const adminSession = + adminSessions?.find((item) => item.id === id) || undefined; // Update the product - this.__sessioninAdmin.next(sessioninAdmin); + this.__adminSession.next(adminSession); // Return the product - return sessioninAdmin; + return adminSession; }), switchMap((product) => { if (!product) { @@ -135,24 +135,21 @@ export class SessioninAdminService { /** * Create product */ - createSessioninAdmin(): Observable { - return this.sessioninAdmins$.pipe( + createAdminSession(): Observable { + return this.adminSessions$.pipe( take(1), - switchMap((sessioninAdmins) => + switchMap((adminSessions) => this._httpClient - .post('api/apps/report/sessionin-admin/product', {}) + .post('api/apps/report/admin-session/product', {}) .pipe( - map((newSessioninAdmin) => { - // Update the sessioninAdmins with the new product - if (!!sessioninAdmins) { - this.__sessioninAdmins.next([ - newSessioninAdmin, - ...sessioninAdmins, - ]); + map((newAdminSession) => { + // Update the adminSessions with the new product + if (!!adminSessions) { + this.__adminSessions.next([newAdminSession, ...adminSessions]); } // Return the new product - return newSessioninAdmin; + return newAdminSession; }) ) ) diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 1f9ef4e..6a972b7 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -38,7 +38,7 @@ "Modification Log": "Member Modification Logs", "Payment Log": "Manual Payment Logs", "Sessionin Info": "Sessionin Info", - "Sessionin Admin": "Sessionin Admin Info", + "Admin Session": "Admin Session", "Sessionin Overlap": "Sessionin Overlap", "Excel Log": "Excel Download Logs", "Loosing": "Loosing Management", diff --git a/src/assets/i18n/ko.json b/src/assets/i18n/ko.json index 1d51cb1..d378d95 100644 --- a/src/assets/i18n/ko.json +++ b/src/assets/i18n/ko.json @@ -47,7 +47,7 @@ "Payment Log": "수동지급/회수 로그", "Sessionin Info": "로그인정보", "Sessionin Overlap": "중복로그인", - "Sessionin Admin": "관리자 로그인정보", + "Admin Session": "관리자 로그인정보", "Excel Log": "엑셀다운 로그", "Loosing": "루징관리", "Notice": "공지사항", From f5de3d038c84ffa37a8e3c7906ef88825680e2ed Mon Sep 17 00:00:00 2001 From: JUNG YI DAM Date: Thu, 4 Aug 2022 08:59:56 +0000 Subject: [PATCH 3/4] =?UTF-8?q?=ED=8F=B4=EB=8D=94=EB=AA=85=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/app.routing.ts | 6 +- .../{sessionin-info => user-session}/api.ts | 110 +++++++++--------- .../{sessionin-info => user-session}/data.ts | 2 +- src/app/mock-api/common/navigation/data.ts | 6 +- src/app/mock-api/index.ts | 4 +- .../components/index.ts | 0 .../components/list.component.html | 10 +- .../components/list.component.ts | 24 ++-- .../models/user-session-pagination.ts} | 2 +- .../models/user-session.ts} | 2 +- .../resolvers/user-session.resolver.ts} | 26 ++--- .../services/user-session.service.ts} | 81 +++++++------ .../user-session.module.ts} | 6 +- .../user-session.routing.ts} | 6 +- src/assets/i18n/en.json | 2 +- src/assets/i18n/ko.json | 2 +- 16 files changed, 140 insertions(+), 149 deletions(-) rename src/app/mock-api/apps/report/{sessionin-info => user-session}/api.ts (64%) rename src/app/mock-api/apps/report/{sessionin-info => user-session}/data.ts (97%) rename src/app/modules/admin/report/{sessionin-info => user-session}/components/index.ts (100%) rename src/app/modules/admin/report/{sessionin-info => user-session}/components/list.component.html (95%) rename src/app/modules/admin/report/{sessionin-info => user-session}/components/list.component.ts (90%) rename src/app/modules/admin/report/{sessionin-info/models/sessionin-info-pagination.ts => user-session/models/user-session-pagination.ts} (72%) rename src/app/modules/admin/report/{sessionin-info/models/sessionin-info.ts => user-session/models/user-session.ts} (85%) rename src/app/modules/admin/report/{sessionin-info/resolvers/sessionin-info.resolver.ts => user-session/resolvers/user-session.resolver.ts} (69%) rename src/app/modules/admin/report/{sessionin-info/services/sessionin-info.service.ts => user-session/services/user-session.service.ts} (51%) rename src/app/modules/admin/report/{sessionin-info/sessionin-info.module.ts => user-session/user-session.module.ts} (92%) rename src/app/modules/admin/report/{sessionin-info/sessionin-info.routing.ts => user-session/user-session.routing.ts} (72%) diff --git a/src/app/app.routing.ts b/src/app/app.routing.ts index c1cb18a..a49eb1c 100644 --- a/src/app/app.routing.ts +++ b/src/app/app.routing.ts @@ -423,11 +423,11 @@ export const appRoutes: Route[] = [ ).then((m: any) => m.PaymentLogModule), }, { - path: 'sessionin-info', + path: 'user-session', loadChildren: () => import( - 'app/modules/admin/report/sessionin-info/sessionin-info.module' - ).then((m: any) => m.SessioninInfoModule), + 'app/modules/admin/report/user-session/user-session.module' + ).then((m: any) => m.UserSessionModule), }, { path: 'sessionin-overlap', diff --git a/src/app/mock-api/apps/report/sessionin-info/api.ts b/src/app/mock-api/apps/report/user-session/api.ts similarity index 64% rename from src/app/mock-api/apps/report/sessionin-info/api.ts rename to src/app/mock-api/apps/report/user-session/api.ts index 1aca46a..0190620 100644 --- a/src/app/mock-api/apps/report/sessionin-info/api.ts +++ b/src/app/mock-api/apps/report/user-session/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 { sessioninInfos as sessioninInfosData } from './data'; +import { userSessions as userSessionsData } from './data'; @Injectable({ providedIn: 'root', }) -export class ReportSessioninInfoMockApi { - private _sessioninInfos: any[] = sessioninInfosData; +export class ReportUserSessionMockApi { + private _userSessions: any[] = userSessionsData; /** * Constructor @@ -26,10 +26,10 @@ export class ReportSessioninInfoMockApi { */ registerHandlers(): void { // ----------------------------------------------------------------------------------------------------- - // @ SessioninInfos - GET + // @ UserSessions - GET // ----------------------------------------------------------------------------------------------------- this._fuseMockApiService - .onGet('api/apps/report/sessionin-info/sessionin-infos', 300) + .onGet('api/apps/report/user-session/user-sessions', 300) .reply(({ request }) => { // Get available queries const search = request.params.get('search'); @@ -38,12 +38,12 @@ export class ReportSessioninInfoMockApi { const page = parseInt(request.params.get('page') ?? '1', 10); const size = parseInt(request.params.get('size') ?? '10', 10); - // Clone the sessioninInfos - let sessioninInfos: any[] | null = cloneDeep(this._sessioninInfos); + // Clone the userSessions + let userSessions: any[] | null = cloneDeep(this._userSessions); - // Sort the sessioninInfos + // Sort the userSessions if (sort === 'signinId' || sort === 'nickname') { - sessioninInfos.sort((a, b) => { + userSessions.sort((a, b) => { const fieldA = a[sort].toString().toUpperCase(); const fieldB = b[sort].toString().toUpperCase(); return order === 'asc' @@ -51,15 +51,15 @@ export class ReportSessioninInfoMockApi { : fieldB.localeCompare(fieldA); }); } else { - sessioninInfos.sort((a, b) => + userSessions.sort((a, b) => order === 'asc' ? a[sort] - b[sort] : b[sort] - a[sort] ); } // If search exists... if (search) { - // Filter the sessioninInfos - sessioninInfos = sessioninInfos.filter( + // Filter the userSessions + userSessions = userSessions.filter( (contact: any) => contact.name && contact.name.toLowerCase().includes(search.toLowerCase()) @@ -67,32 +67,32 @@ export class ReportSessioninInfoMockApi { } // Paginate - Start - const sessioninInfosLength = sessioninInfos.length; + const userSessionsLength = userSessions.length; // Calculate pagination details const begin = page * size; - const end = Math.min(size * (page + 1), sessioninInfosLength); - const lastPage = Math.max(Math.ceil(sessioninInfosLength / size), 1); + const end = Math.min(size * (page + 1), userSessionsLength); + const lastPage = Math.max(Math.ceil(userSessionsLength / size), 1); // Prepare the pagination object let pagination = {}; // If the requested page number is bigger than // the last possible page number, return null for - // sessioninInfos but also send the last possible page so + // userSessions but also send the last possible page so // the app can navigate to there if (page > lastPage) { - sessioninInfos = null; + userSessions = null; pagination = { lastPage, }; } else { // Paginate the results by size - sessioninInfos = sessioninInfos.slice(begin, end); + userSessions = userSessions.slice(begin, end); // Prepare the pagination mock-api pagination = { - length: sessioninInfosLength, + length: userSessionsLength, size: size, page: page, lastPage: lastPage, @@ -105,41 +105,39 @@ export class ReportSessioninInfoMockApi { return [ 200, { - sessioninInfos, + userSessions, pagination, }, ]; }); // ----------------------------------------------------------------------------------------------------- - // @ SessioninInfo - GET + // @ UserSession - GET // ----------------------------------------------------------------------------------------------------- this._fuseMockApiService - .onGet('api/apps/report/sessionin-info/sessionin-info') + .onGet('api/apps/report/user-session/user-session') .reply(({ request }) => { // Get the id from the params const id = request.params.get('id'); - // Clone the sessioninInfos - const sessioninInfos = cloneDeep(this._sessioninInfos); + // Clone the userSessions + const userSessions = cloneDeep(this._userSessions); - // Find the sessioninInfo - const sessioninInfo = sessioninInfos.find( - (item: any) => item.id === id - ); + // Find the userSession + const userSession = userSessions.find((item: any) => item.id === id); // Return the response - return [200, sessioninInfo]; + return [200, userSession]; }); // ----------------------------------------------------------------------------------------------------- - // @ SessioninInfo - POST + // @ UserSession - POST // ----------------------------------------------------------------------------------------------------- this._fuseMockApiService - .onPost('api/apps/report/sessionin-info/sessionin-info') + .onPost('api/apps/report/user-session/user-session') .reply(() => { - // Generate a new sessioninInfo - const newSessioninInfo = { + // Generate a new userSession + const newUserSession = { id: FuseMockApiUtils.guid(), category: '', name: 'A New User', @@ -161,58 +159,54 @@ export class ReportSessioninInfoMockApi { active: false, }; - // Unshift the new sessioninInfo - this._sessioninInfos.unshift(newSessioninInfo); + // Unshift the new userSession + this._userSessions.unshift(newUserSession); // Return the response - return [200, newSessioninInfo]; + return [200, newUserSession]; }); // ----------------------------------------------------------------------------------------------------- - // @ SessioninInfo - PATCH + // @ UserSession - PATCH // ----------------------------------------------------------------------------------------------------- this._fuseMockApiService - .onPatch('api/apps/report/sessionin-info/sessionin-info') + .onPatch('api/apps/report/user-session/user-session') .reply(({ request }) => { - // Get the id and sessioninInfo + // Get the id and userSession const id = request.body.id; - const sessioninInfo = cloneDeep(request.body.sessioninInfo); + const userSession = cloneDeep(request.body.userSession); - // Prepare the updated sessioninInfo - let updatedSessioninInfo = null; + // Prepare the updated userSession + let updatedUserSession = null; - // Find the sessioninInfo and update it - this._sessioninInfos.forEach((item, index, sessioninInfos) => { + // Find the userSession and update it + this._userSessions.forEach((item, index, userSessions) => { if (item.id === id) { - // Update the sessioninInfo - sessioninInfos[index] = assign( - {}, - sessioninInfos[index], - sessioninInfo - ); + // Update the userSession + userSessions[index] = assign({}, userSessions[index], userSession); - // Store the updated sessioninInfo - updatedSessioninInfo = sessioninInfos[index]; + // Store the updated userSession + updatedUserSession = userSessions[index]; } }); // Return the response - return [200, updatedSessioninInfo]; + return [200, updatedUserSession]; }); // ----------------------------------------------------------------------------------------------------- - // @ SessioninInfo - DELETE + // @ UserSession - DELETE // ----------------------------------------------------------------------------------------------------- this._fuseMockApiService - .onDelete('api/apps/report/sessionin-info/sessionin-info') + .onDelete('api/apps/report/user-session/user-session') .reply(({ request }) => { // Get the id const id = request.params.get('id'); - // Find the sessioninInfo and delete it - this._sessioninInfos.forEach((item, index) => { + // Find the userSession and delete it + this._userSessions.forEach((item, index) => { if (item.id === id) { - this._sessioninInfos.splice(index, 1); + this._userSessions.splice(index, 1); } }); diff --git a/src/app/mock-api/apps/report/sessionin-info/data.ts b/src/app/mock-api/apps/report/user-session/data.ts similarity index 97% rename from src/app/mock-api/apps/report/sessionin-info/data.ts rename to src/app/mock-api/apps/report/user-session/data.ts index ad41ca6..31e7a2f 100644 --- a/src/app/mock-api/apps/report/sessionin-info/data.ts +++ b/src/app/mock-api/apps/report/user-session/data.ts @@ -1,6 +1,6 @@ /* eslint-disable */ -export const sessioninInfos = [ +export const userSessions = [ { id: '1', signinId: 'lala1', diff --git a/src/app/mock-api/common/navigation/data.ts b/src/app/mock-api/common/navigation/data.ts index 1e4f359..ab2bc9c 100644 --- a/src/app/mock-api/common/navigation/data.ts +++ b/src/app/mock-api/common/navigation/data.ts @@ -315,11 +315,11 @@ export const defaultNavigation: FuseNavigationItem[] = [ link: '/report/payment-log', }, { - id: 'report.sessionin-info', - title: 'Sessionin Info', + id: 'report.user-session', + title: 'User Session', type: 'basic', icon: 'heroicons_outline:academic-cap', - link: '/report/sessionin-info', + link: '/report/user-session', }, { id: 'report.sessionin-overlap', diff --git a/src/app/mock-api/index.ts b/src/app/mock-api/index.ts index ed07b09..6c7e565 100644 --- a/src/app/mock-api/index.ts +++ b/src/app/mock-api/index.ts @@ -58,7 +58,7 @@ import { ReportMoneyLogMockApi } from './apps/report/money-log/api'; import { ReportCompLogMockApi } from './apps/report/comp-log/api'; import { ReportModificationLogMockApi } from './apps/report/modification-log/api'; import { ReportPaymentLogMockApi } from './apps/report/payment-log/api'; -import { ReportSessioninInfoMockApi } from './apps/report/sessionin-info/api'; +import { ReportUserSessionMockApi } from './apps/report/user-session/api'; import { ReportSessioninOverlapMockApi } from './apps/report/sessionin-overlap/api'; import { ReportAdminSessionMockApi } from './apps/report/admin-session/api'; import { ReportExcelLogMockApi } from './apps/report/excel-log/api'; @@ -131,7 +131,7 @@ export const mockApiServices = [ ReportCompLogMockApi, ReportModificationLogMockApi, ReportPaymentLogMockApi, - ReportSessioninInfoMockApi, + ReportUserSessionMockApi, ReportSessioninOverlapMockApi, ReportAdminSessionMockApi, ReportExcelLogMockApi, diff --git a/src/app/modules/admin/report/sessionin-info/components/index.ts b/src/app/modules/admin/report/user-session/components/index.ts similarity index 100% rename from src/app/modules/admin/report/sessionin-info/components/index.ts rename to src/app/modules/admin/report/user-session/components/index.ts diff --git a/src/app/modules/admin/report/sessionin-info/components/list.component.html b/src/app/modules/admin/report/user-session/components/list.component.html similarity index 95% rename from src/app/modules/admin/report/sessionin-info/components/list.component.html rename to src/app/modules/admin/report/user-session/components/list.component.html index a680b8a..1c6a536 100644 --- a/src/app/modules/admin/report/sessionin-info/components/list.component.html +++ b/src/app/modules/admin/report/user-session/components/list.component.html @@ -99,8 +99,8 @@
- - + +
- + - +
diff --git a/src/app/modules/admin/report/sessionin-info/components/list.component.ts b/src/app/modules/admin/report/user-session/components/list.component.ts similarity index 90% rename from src/app/modules/admin/report/sessionin-info/components/list.component.ts rename to src/app/modules/admin/report/user-session/components/list.component.ts index 520f9b7..7ea21c4 100644 --- a/src/app/modules/admin/report/sessionin-info/components/list.component.ts +++ b/src/app/modules/admin/report/user-session/components/list.component.ts @@ -30,9 +30,9 @@ import { fuseAnimations } from '@fuse/animations'; import { FuseConfirmationService } from '@fuse/services/confirmation'; import { User } from '../../../member/user/models/user'; -import { SessioninInfo } from '../models/sessionin-info'; -import { SessioninInfoPagination } from '../models/sessionin-info-pagination'; -import { SessioninInfoService } from '../services/sessionin-info.service'; +import { UserSession } from '../models/user-session'; +import { UserSessionPagination } from '../models/user-session-pagination'; +import { UserSessionService } from '../services/user-session.service'; import { Router } from '@angular/router'; @Component({ @@ -66,13 +66,13 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { @ViewChild(MatPaginator) private _paginator!: MatPaginator; @ViewChild(MatSort) private _sort!: MatSort; - sessioninInfos$!: Observable; + userSessions$!: Observable; users$!: Observable; isLoading = false; searchInputControl = new FormControl(); - selectedSessioninInfo?: SessioninInfo; - pagination?: SessioninInfoPagination; + selectedUserSession?: UserSession; + pagination?: UserSessionPagination; __isSearchOpened = false; ipBlockConfigForm!: FormGroup; @@ -87,7 +87,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { private _changeDetectorRef: ChangeDetectorRef, private _fuseConfirmationService: FuseConfirmationService, private _formBuilder: FormBuilder, - private _sessioninInfoService: SessioninInfoService, + private _userSessionService: UserSessionService, private router: Router ) {} @@ -100,9 +100,9 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { */ ngOnInit(): void { // Get the pagination - this._sessioninInfoService.pagination$ + this._userSessionService.pagination$ .pipe(takeUntil(this._unsubscribeAll)) - .subscribe((pagination: SessioninInfoPagination | undefined) => { + .subscribe((pagination: UserSessionPagination | undefined) => { // Update the pagination this.pagination = pagination; @@ -111,7 +111,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { }); // Get the products - this.sessioninInfos$ = this._sessioninInfoService.sessioninInfos$; + this.userSessions$ = this._userSessionService.userSessions$; this.__idBlockConfirmConfig(); this.__ipBlockConfirmConfig(); @@ -132,7 +132,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { // Mark for check this._changeDetectorRef.markForCheck(); - // If the sessioninInfo changes the sort order... + // If the userSession changes the sort order... this._sort.sortChange .pipe(takeUntil(this._unsubscribeAll)) .subscribe(() => { @@ -145,7 +145,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { .pipe( switchMap(() => { this.isLoading = true; - return this._sessioninInfoService.getSessioninInfos( + return this._userSessionService.getUserSessions( this._paginator.pageIndex, this._paginator.pageSize, this._sort.active, diff --git a/src/app/modules/admin/report/sessionin-info/models/sessionin-info-pagination.ts b/src/app/modules/admin/report/user-session/models/user-session-pagination.ts similarity index 72% rename from src/app/modules/admin/report/sessionin-info/models/sessionin-info-pagination.ts rename to src/app/modules/admin/report/user-session/models/user-session-pagination.ts index 67dcc9c..eb93374 100644 --- a/src/app/modules/admin/report/sessionin-info/models/sessionin-info-pagination.ts +++ b/src/app/modules/admin/report/user-session/models/user-session-pagination.ts @@ -1,4 +1,4 @@ -export interface SessioninInfoPagination { +export interface UserSessionPagination { length: number; size: number; page: number; diff --git a/src/app/modules/admin/report/sessionin-info/models/sessionin-info.ts b/src/app/modules/admin/report/user-session/models/user-session.ts similarity index 85% rename from src/app/modules/admin/report/sessionin-info/models/sessionin-info.ts rename to src/app/modules/admin/report/user-session/models/user-session.ts index 58de398..edad303 100644 --- a/src/app/modules/admin/report/sessionin-info/models/sessionin-info.ts +++ b/src/app/modules/admin/report/user-session/models/user-session.ts @@ -1,4 +1,4 @@ -export interface SessioninInfo { +export interface UserSession { id?: string; signinId?: string; nickname?: string; diff --git a/src/app/modules/admin/report/sessionin-info/resolvers/sessionin-info.resolver.ts b/src/app/modules/admin/report/user-session/resolvers/user-session.resolver.ts similarity index 69% rename from src/app/modules/admin/report/sessionin-info/resolvers/sessionin-info.resolver.ts rename to src/app/modules/admin/report/user-session/resolvers/user-session.resolver.ts index 5ec1abe..80505db 100644 --- a/src/app/modules/admin/report/sessionin-info/resolvers/sessionin-info.resolver.ts +++ b/src/app/modules/admin/report/user-session/resolvers/user-session.resolver.ts @@ -7,19 +7,19 @@ import { } from '@angular/router'; import { catchError, Observable, throwError } from 'rxjs'; -import { SessioninInfo } from '../models/sessionin-info'; -import { SessioninInfoPagination } from '../models/sessionin-info-pagination'; -import { SessioninInfoService } from '../services/sessionin-info.service'; +import { UserSession } from '../models/user-session'; +import { UserSessionPagination } from '../models/user-session-pagination'; +import { UserSessionService } from '../services/user-session.service'; @Injectable({ providedIn: 'root', }) -export class SessioninInfoResolver implements Resolve { +export class UserSessionResolver implements Resolve { /** * Constructor */ constructor( - private _sessioninInfoService: SessioninInfoService, + private _userSessionService: UserSessionService, private _router: Router ) {} @@ -36,9 +36,9 @@ export class SessioninInfoResolver implements Resolve { resolve( route: ActivatedRouteSnapshot, state: RouterStateSnapshot - ): Observable { - return this._sessioninInfoService - .getSessioninInfoById(route.paramMap.get('id')) + ): Observable { + return this._userSessionService + .getUserSessionById(route.paramMap.get('id')) .pipe( // Error here means the requested product is not available catchError((error) => { @@ -61,11 +61,11 @@ export class SessioninInfoResolver implements Resolve { @Injectable({ providedIn: 'root', }) -export class SessioninInfosResolver implements Resolve { +export class UserSessionsResolver implements Resolve { /** * Constructor */ - constructor(private _sessioninInfoService: SessioninInfoService) {} + constructor(private _userSessionService: UserSessionService) {} // ----------------------------------------------------------------------------------------------------- // @ Public methods @@ -81,9 +81,9 @@ export class SessioninInfosResolver implements Resolve { route: ActivatedRouteSnapshot, state: RouterStateSnapshot ): Observable<{ - pagination: SessioninInfoPagination; - sessioninInfos: SessioninInfo[]; + pagination: UserSessionPagination; + userSessions: UserSession[]; }> { - return this._sessioninInfoService.getSessioninInfos(); + return this._userSessionService.getUserSessions(); } } diff --git a/src/app/modules/admin/report/sessionin-info/services/sessionin-info.service.ts b/src/app/modules/admin/report/user-session/services/user-session.service.ts similarity index 51% rename from src/app/modules/admin/report/sessionin-info/services/sessionin-info.service.ts rename to src/app/modules/admin/report/user-session/services/user-session.service.ts index 8f8d06b..ac5e489 100644 --- a/src/app/modules/admin/report/sessionin-info/services/sessionin-info.service.ts +++ b/src/app/modules/admin/report/user-session/services/user-session.service.ts @@ -12,21 +12,21 @@ import { throwError, } from 'rxjs'; -import { SessioninInfo } from '../models/sessionin-info'; -import { SessioninInfoPagination } from '../models/sessionin-info-pagination'; +import { UserSession } from '../models/user-session'; +import { UserSessionPagination } from '../models/user-session-pagination'; @Injectable({ providedIn: 'root', }) -export class SessioninInfoService { +export class UserSessionService { // Private - private __pagination = new BehaviorSubject< - SessioninInfoPagination | undefined - >(undefined); - private __sessioninInfo = new BehaviorSubject( + private __pagination = new BehaviorSubject( undefined ); - private __sessioninInfos = new BehaviorSubject( + private __userSession = new BehaviorSubject( + undefined + ); + private __userSessions = new BehaviorSubject( undefined ); @@ -42,22 +42,22 @@ export class SessioninInfoService { /** * Getter for pagination */ - get pagination$(): Observable { + get pagination$(): Observable { return this.__pagination.asObservable(); } /** - * Getter for sessioninInfo + * Getter for userSession */ - get sessioninInfo$(): Observable { - return this.__sessioninInfo.asObservable(); + get userSession$(): Observable { + return this.__userSession.asObservable(); } /** - * Getter for sessioninInfos + * Getter for userSessions */ - get sessioninInfos$(): Observable { - return this.__sessioninInfos.asObservable(); + get userSessions$(): Observable { + return this.__userSessions.asObservable(); } // ----------------------------------------------------------------------------------------------------- @@ -65,7 +65,7 @@ export class SessioninInfoService { // ----------------------------------------------------------------------------------------------------- /** - * Get SessioninInfos + * Get UserSessions * * * @param page @@ -74,21 +74,21 @@ export class SessioninInfoService { * @param order * @param search */ - getSessioninInfos( + getUserSessions( page: number = 0, size: number = 10, sort: string = 'name', order: 'asc' | 'desc' | '' = 'asc', search: string = '' ): Observable<{ - pagination: SessioninInfoPagination; - sessioninInfos: SessioninInfo[]; + pagination: UserSessionPagination; + userSessions: UserSession[]; }> { return this._httpClient .get<{ - pagination: SessioninInfoPagination; - sessioninInfos: SessioninInfo[]; - }>('api/apps/report/sessionin-info/sessionin-infos', { + pagination: UserSessionPagination; + userSessions: UserSession[]; + }>('api/apps/report/user-session/user-sessions', { params: { page: '' + page, size: '' + size, @@ -100,7 +100,7 @@ export class SessioninInfoService { .pipe( tap((response) => { this.__pagination.next(response.pagination); - this.__sessioninInfos.next(response.sessioninInfos); + this.__userSessions.next(response.userSessions); }) ); } @@ -108,19 +108,19 @@ export class SessioninInfoService { /** * Get product by id */ - getSessioninInfoById(id: string | null): Observable { - return this.__sessioninInfos.pipe( + getUserSessionById(id: string | null): Observable { + return this.__userSessions.pipe( take(1), - map((sessioninInfos) => { + map((userSessions) => { // Find the product - const sessioninInfo = - sessioninInfos?.find((item) => item.id === id) || undefined; + const userSession = + userSessions?.find((item) => item.id === id) || undefined; // Update the product - this.__sessioninInfo.next(sessioninInfo); + this.__userSession.next(userSession); // Return the product - return sessioninInfo; + return userSession; }), switchMap((product) => { if (!product) { @@ -135,24 +135,21 @@ export class SessioninInfoService { /** * Create product */ - createSessioninInfo(): Observable { - return this.sessioninInfos$.pipe( + createUserSession(): Observable { + return this.userSessions$.pipe( take(1), - switchMap((sessioninInfos) => + switchMap((userSessions) => this._httpClient - .post('api/apps/report/sessionin-info/product', {}) + .post('api/apps/report/user-session/product', {}) .pipe( - map((newSessioninInfo) => { - // Update the sessioninInfos with the new product - if (!!sessioninInfos) { - this.__sessioninInfos.next([ - newSessioninInfo, - ...sessioninInfos, - ]); + map((newUserSession) => { + // Update the userSessions with the new product + if (!!userSessions) { + this.__userSessions.next([newUserSession, ...userSessions]); } // Return the new product - return newSessioninInfo; + return newUserSession; }) ) ) diff --git a/src/app/modules/admin/report/sessionin-info/sessionin-info.module.ts b/src/app/modules/admin/report/user-session/user-session.module.ts similarity index 92% rename from src/app/modules/admin/report/sessionin-info/sessionin-info.module.ts rename to src/app/modules/admin/report/user-session/user-session.module.ts index d6ce809..fc87323 100644 --- a/src/app/modules/admin/report/sessionin-info/sessionin-info.module.ts +++ b/src/app/modules/admin/report/user-session/user-session.module.ts @@ -24,14 +24,14 @@ import { SharedModule } from 'app/shared/shared.module'; import { COMPONENTS } from './components'; -import { sessioninInfoRoutes } from './sessionin-info.routing'; +import { userSessionRoutes } from './user-session.routing'; @NgModule({ declarations: [COMPONENTS], imports: [ TranslocoModule, SharedModule, - RouterModule.forChild(sessioninInfoRoutes), + RouterModule.forChild(userSessionRoutes), MatButtonModule, MatFormFieldModule, @@ -51,4 +51,4 @@ import { sessioninInfoRoutes } from './sessionin-info.routing'; MatMomentDateModule, ], }) -export class SessioninInfoModule {} +export class UserSessionModule {} diff --git a/src/app/modules/admin/report/sessionin-info/sessionin-info.routing.ts b/src/app/modules/admin/report/user-session/user-session.routing.ts similarity index 72% rename from src/app/modules/admin/report/sessionin-info/sessionin-info.routing.ts rename to src/app/modules/admin/report/user-session/user-session.routing.ts index 555012e..1ae03e0 100644 --- a/src/app/modules/admin/report/sessionin-info/sessionin-info.routing.ts +++ b/src/app/modules/admin/report/user-session/user-session.routing.ts @@ -3,15 +3,15 @@ import { Route } from '@angular/router'; import { ListComponent } from './components/list.component'; import { ViewComponent } from '../../member/user/components/view.component'; -import { SessioninInfosResolver } from './resolvers/sessionin-info.resolver'; +import { UserSessionsResolver } from './resolvers/user-session.resolver'; import { UserResolver } from '../../member/user/resolvers/user.resolver'; -export const sessioninInfoRoutes: Route[] = [ +export const userSessionRoutes: Route[] = [ { path: '', component: ListComponent, resolve: { - sessioninInfos: SessioninInfosResolver, + userSessions: UserSessionsResolver, }, }, { diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 6a972b7..c03db86 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -37,7 +37,7 @@ "Comp Log": "Comp Logs", "Modification Log": "Member Modification Logs", "Payment Log": "Manual Payment Logs", - "Sessionin Info": "Sessionin Info", + "User Session": "User Session", "Admin Session": "Admin Session", "Sessionin Overlap": "Sessionin Overlap", "Excel Log": "Excel Download Logs", diff --git a/src/assets/i18n/ko.json b/src/assets/i18n/ko.json index d378d95..34b079c 100644 --- a/src/assets/i18n/ko.json +++ b/src/assets/i18n/ko.json @@ -45,7 +45,7 @@ "Comp Log": "콤프사용 Logs", "Modification Log": "회원수정 로그", "Payment Log": "수동지급/회수 로그", - "Sessionin Info": "로그인정보", + "User Session": "로그인정보", "Sessionin Overlap": "중복로그인", "Admin Session": "관리자 로그인정보", "Excel Log": "엑셀다운 로그", From c9a6fa01f70934e8efcea32479778c40507f30a0 Mon Sep 17 00:00:00 2001 From: JUNG YI DAM Date: Thu, 4 Aug 2022 09:30:09 +0000 Subject: [PATCH 4/4] =?UTF-8?q?=ED=8F=B4=EB=8D=94=EB=AA=85=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/app.routing.ts | 6 +- .../api.ts | 115 +++++++++--------- .../data.ts | 2 +- src/app/mock-api/common/navigation/data.ts | 6 +- src/app/mock-api/index.ts | 4 +- .../components/index.ts | 0 .../components/list.component.html | 12 +- .../components/list.component.ts | 29 ++--- .../duplicated-session.module.ts} | 6 +- .../duplicated-session.routing.ts} | 6 +- .../models/duplicated-session-pagination.ts} | 2 +- .../models/duplicated-session.ts} | 2 +- .../resolvers/duplicated-session.resolver.ts} | 26 ++-- .../services/duplicated-session.service.ts} | 86 ++++++------- .../user-session/components/list.component.ts | 2 +- src/assets/i18n/en.json | 2 +- src/assets/i18n/ko.json | 2 +- 17 files changed, 157 insertions(+), 151 deletions(-) rename src/app/mock-api/apps/report/{sessionin-overlap => duplicated-session}/api.ts (62%) rename src/app/mock-api/apps/report/{sessionin-overlap => duplicated-session}/data.ts (98%) rename src/app/modules/admin/report/{sessionin-overlap => duplicated-session}/components/index.ts (100%) rename src/app/modules/admin/report/{sessionin-overlap => duplicated-session}/components/list.component.html (92%) rename src/app/modules/admin/report/{sessionin-overlap => duplicated-session}/components/list.component.ts (84%) rename src/app/modules/admin/report/{sessionin-overlap/sessionin-overlap.module.ts => duplicated-session/duplicated-session.module.ts} (90%) rename src/app/modules/admin/report/{sessionin-overlap/sessionin-overlap.routing.ts => duplicated-session/duplicated-session.routing.ts} (69%) rename src/app/modules/admin/report/{sessionin-overlap/models/sessionin-Overlap-pagination.ts => duplicated-session/models/duplicated-session-pagination.ts} (70%) rename src/app/modules/admin/report/{sessionin-overlap/models/sessionin-overlap.ts => duplicated-session/models/duplicated-session.ts} (66%) rename src/app/modules/admin/report/{sessionin-overlap/resolvers/sessionin-overlap.resolver.ts => duplicated-session/resolvers/duplicated-session.resolver.ts} (66%) rename src/app/modules/admin/report/{sessionin-overlap/services/sessionin-overlap.service.ts => duplicated-session/services/duplicated-session.service.ts} (50%) diff --git a/src/app/app.routing.ts b/src/app/app.routing.ts index a49eb1c..5fd0efe 100644 --- a/src/app/app.routing.ts +++ b/src/app/app.routing.ts @@ -430,11 +430,11 @@ export const appRoutes: Route[] = [ ).then((m: any) => m.UserSessionModule), }, { - path: 'sessionin-overlap', + path: 'duplicated-session', loadChildren: () => import( - 'app/modules/admin/report/sessionin-overlap/sessionin-overlap.module' - ).then((m: any) => m.SessioninOverlapModule), + 'app/modules/admin/report/duplicated-session/duplicated-session.module' + ).then((m: any) => m.DuplicatedSessionModule), }, { path: 'admin-session', diff --git a/src/app/mock-api/apps/report/sessionin-overlap/api.ts b/src/app/mock-api/apps/report/duplicated-session/api.ts similarity index 62% rename from src/app/mock-api/apps/report/sessionin-overlap/api.ts rename to src/app/mock-api/apps/report/duplicated-session/api.ts index ef4d177..c93c792 100644 --- a/src/app/mock-api/apps/report/sessionin-overlap/api.ts +++ b/src/app/mock-api/apps/report/duplicated-session/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 { sessioninOverlaps as sessioninOverlapsData } from './data'; +import { duplicatedSessions as duplicatedSessionsData } from './data'; @Injectable({ providedIn: 'root', }) -export class ReportSessioninOverlapMockApi { - private _sessioninOverlaps: any[] = sessioninOverlapsData; +export class ReportDuplicatedSessionMockApi { + private _duplicatedSessions: any[] = duplicatedSessionsData; /** * Constructor @@ -26,26 +26,26 @@ export class ReportSessioninOverlapMockApi { */ registerHandlers(): void { // ----------------------------------------------------------------------------------------------------- - // @ SessioninOverlaps - GET + // @ DuplicatedSessions - GET // ----------------------------------------------------------------------------------------------------- this._fuseMockApiService - .onGet('api/apps/report/sessionin-overlap/sessionin-overlaps', 300) + .onGet('api/apps/report/duplicated-session/duplicated-sessions', 300) .reply(({ request }) => { // Get available queries const search = request.params.get('search'); - const sort = request.params.get('sort') || 'name'; + const sort = request.params.get('sort') || 'overlapCount'; const order = request.params.get('order') || 'asc'; const page = parseInt(request.params.get('page') ?? '1', 10); const size = parseInt(request.params.get('size') ?? '10', 10); - // Clone the sessioninoverlaps - let sessioninOverlaps: any[] | null = cloneDeep( - this._sessioninOverlaps + // Clone the duplicatedSessions + let duplicatedSessions: any[] | null = cloneDeep( + this._duplicatedSessions ); - // Sort the sessioninOverlaps + // Sort the duplicatedSessions if (sort === 'overlapCount') { - sessioninOverlaps.sort((a, b) => { + duplicatedSessions.sort((a, b) => { const fieldA = a[sort].toString().toUpperCase(); const fieldB = b[sort].toString().toUpperCase(); return order === 'asc' @@ -53,15 +53,15 @@ export class ReportSessioninOverlapMockApi { : fieldB.localeCompare(fieldA); }); } else { - sessioninOverlaps.sort((a, b) => + duplicatedSessions.sort((a, b) => order === 'asc' ? a[sort] - b[sort] : b[sort] - a[sort] ); } // If search exists... if (search) { - // Filter the sessioninOverlaps - sessioninOverlaps = sessioninOverlaps.filter( + // Filter the duplicatedSessions + duplicatedSessions = duplicatedSessions.filter( (contact: any) => contact.name && contact.name.toLowerCase().includes(search.toLowerCase()) @@ -69,32 +69,35 @@ export class ReportSessioninOverlapMockApi { } // Paginate - Start - const sessioninOverlapsLength = sessioninOverlaps.length; + const duplicatedSessionsLength = duplicatedSessions.length; // Calculate pagination details const begin = page * size; - const end = Math.min(size * (page + 1), sessioninOverlapsLength); - const lastPage = Math.max(Math.ceil(sessioninOverlapsLength / size), 1); + const end = Math.min(size * (page + 1), duplicatedSessionsLength); + const lastPage = Math.max( + Math.ceil(duplicatedSessionsLength / size), + 1 + ); // Prepare the pagination object let pagination = {}; // If the requested page number is bigger than // the last possible page number, return null for - // sessioninOverlaps but also send the last possible page so + // duplicatedSessions but also send the last possible page so // the app can navigate to there if (page > lastPage) { - sessioninOverlaps = null; + duplicatedSessions = null; pagination = { lastPage, }; } else { // Paginate the results by size - sessioninOverlaps = sessioninOverlaps.slice(begin, end); + duplicatedSessions = duplicatedSessions.slice(begin, end); // Prepare the pagination mock-api pagination = { - length: sessioninOverlapsLength, + length: duplicatedSessionsLength, size: size, page: page, lastPage: lastPage, @@ -107,41 +110,41 @@ export class ReportSessioninOverlapMockApi { return [ 200, { - sessioninOverlaps, + duplicatedSessions, pagination, }, ]; }); // ----------------------------------------------------------------------------------------------------- - // @ SessioninOverlap - GET + // @ DuplicatedSession - GET // ----------------------------------------------------------------------------------------------------- this._fuseMockApiService - .onGet('api/apps/report/sessionin-overlap/sessionin-overlap') + .onGet('api/apps/report/duplicated-session/duplicated-session') .reply(({ request }) => { // Get the id from the params const id = request.params.get('id'); - // Clone the sessioninOverlaps - const sessioninOverlaps = cloneDeep(this._sessioninOverlaps); + // Clone the duplicatedSessions + const duplicatedSessions = cloneDeep(this._duplicatedSessions); - // Find the sessioninOverlap - const sessioninOverlap = sessioninOverlaps.find( + // Find the duplicatedSession + const duplicatedSession = duplicatedSessions.find( (item: any) => item.id === id ); // Return the response - return [200, sessioninOverlap]; + return [200, duplicatedSession]; }); // ----------------------------------------------------------------------------------------------------- - // @ SessioninOverlap - POST + // @ DuplicatedSession - POST // ----------------------------------------------------------------------------------------------------- this._fuseMockApiService - .onPost('api/apps/report/sessionin-overlap/sessionin-overlap') + .onPost('api/apps/report/duplicated-session/duplicated-session') .reply(() => { - // Generate a new sessioninOverlap - const newSessioninOverlap = { + // Generate a new duplicatedSession + const newDuplicatedSession = { id: FuseMockApiUtils.guid(), category: '', name: 'A New User', @@ -163,58 +166,58 @@ export class ReportSessioninOverlapMockApi { active: false, }; - // Unshift the new sessioninOverlap - this._sessioninOverlaps.unshift(newSessioninOverlap); + // Unshift the new duplicatedSession + this._duplicatedSessions.unshift(newDuplicatedSession); // Return the response - return [200, newSessioninOverlap]; + return [200, newDuplicatedSession]; }); // ----------------------------------------------------------------------------------------------------- - // @ SessioninOverlap - PATCH + // @ DuplicatedSession - PATCH // ----------------------------------------------------------------------------------------------------- this._fuseMockApiService - .onPatch('api/apps/report/sessionin-overlap/sessionin-overlap') + .onPatch('api/apps/report/duplicated-session/duplicated-session') .reply(({ request }) => { - // Get the id and sessioninOverlap + // Get the id and duplicatedSession const id = request.body.id; - const sessioninOverlap = cloneDeep(request.body.sessioninOverlap); + const duplicatedSession = cloneDeep(request.body.duplicatedSession); - // Prepare the updated sessioninOverlap - let updatedSessioninOverlap = null; + // Prepare the updated duplicatedSession + let updatedDuplicatedSession = null; - // Find the sessioninOverlap and update it - this._sessioninOverlaps.forEach((item, index, sessioninOverlaps) => { + // Find the duplicatedSession and update it + this._duplicatedSessions.forEach((item, index, duplicatedSessions) => { if (item.id === id) { - // Update the sessioninOverlap - sessioninOverlaps[index] = assign( + // Update the duplicatedSession + duplicatedSessions[index] = assign( {}, - sessioninOverlaps[index], - sessioninOverlap + duplicatedSessions[index], + duplicatedSession ); - // Store the updated sessioninOverlap - updatedSessioninOverlap = sessioninOverlaps[index]; + // Store the updated duplicatedSession + updatedDuplicatedSession = duplicatedSessions[index]; } }); // Return the response - return [200, updatedSessioninOverlap]; + return [200, updatedDuplicatedSession]; }); // ----------------------------------------------------------------------------------------------------- - // @ SessioninOverlap - DELETE + // @ DuplicatedSession - DELETE // ----------------------------------------------------------------------------------------------------- this._fuseMockApiService - .onDelete('api/apps/report/sessionin-overlap/sessionin-overlap') + .onDelete('api/apps/report/duplicated-session/duplicated-session') .reply(({ request }) => { // Get the id const id = request.params.get('id'); - // Find the sessioninOverlap and delete it - this._sessioninOverlaps.forEach((item, index) => { + // Find the duplicatedSession and delete it + this._duplicatedSessions.forEach((item, index) => { if (item.id === id) { - this._sessioninOverlaps.splice(index, 1); + this._duplicatedSessions.splice(index, 1); } }); diff --git a/src/app/mock-api/apps/report/sessionin-overlap/data.ts b/src/app/mock-api/apps/report/duplicated-session/data.ts similarity index 98% rename from src/app/mock-api/apps/report/sessionin-overlap/data.ts rename to src/app/mock-api/apps/report/duplicated-session/data.ts index 1dc5f38..743121c 100644 --- a/src/app/mock-api/apps/report/sessionin-overlap/data.ts +++ b/src/app/mock-api/apps/report/duplicated-session/data.ts @@ -1,6 +1,6 @@ /* eslint-disable */ -export const sessioninOverlaps = [ +export const duplicatedSessions = [ { id: '1', overlapCount: '3', diff --git a/src/app/mock-api/common/navigation/data.ts b/src/app/mock-api/common/navigation/data.ts index ab2bc9c..4f0a539 100644 --- a/src/app/mock-api/common/navigation/data.ts +++ b/src/app/mock-api/common/navigation/data.ts @@ -322,11 +322,11 @@ export const defaultNavigation: FuseNavigationItem[] = [ link: '/report/user-session', }, { - id: 'report.sessionin-overlap', - title: 'Sessionin Overlap', + id: 'report.duplicated-session', + title: 'Duplicated Session', type: 'basic', icon: 'heroicons_outline:academic-cap', - link: '/report/sessionin-overlap', + link: '/report/duplicated-session', }, { id: 'report.admin-session', diff --git a/src/app/mock-api/index.ts b/src/app/mock-api/index.ts index 6c7e565..0af8229 100644 --- a/src/app/mock-api/index.ts +++ b/src/app/mock-api/index.ts @@ -59,7 +59,7 @@ import { ReportCompLogMockApi } from './apps/report/comp-log/api'; import { ReportModificationLogMockApi } from './apps/report/modification-log/api'; import { ReportPaymentLogMockApi } from './apps/report/payment-log/api'; import { ReportUserSessionMockApi } from './apps/report/user-session/api'; -import { ReportSessioninOverlapMockApi } from './apps/report/sessionin-overlap/api'; +import { ReportDuplicatedSessionMockApi } from './apps/report/duplicated-session/api'; import { ReportAdminSessionMockApi } from './apps/report/admin-session/api'; import { ReportExcelLogMockApi } from './apps/report/excel-log/api'; import { ReportLoosingMockApi } from './apps/report/loosing/api'; @@ -132,7 +132,7 @@ export const mockApiServices = [ ReportModificationLogMockApi, ReportPaymentLogMockApi, ReportUserSessionMockApi, - ReportSessioninOverlapMockApi, + ReportDuplicatedSessionMockApi, ReportAdminSessionMockApi, ReportExcelLogMockApi, ReportLoosingMockApi, diff --git a/src/app/modules/admin/report/sessionin-overlap/components/index.ts b/src/app/modules/admin/report/duplicated-session/components/index.ts similarity index 100% rename from src/app/modules/admin/report/sessionin-overlap/components/index.ts rename to src/app/modules/admin/report/duplicated-session/components/index.ts diff --git a/src/app/modules/admin/report/sessionin-overlap/components/list.component.html b/src/app/modules/admin/report/duplicated-session/components/list.component.html similarity index 92% rename from src/app/modules/admin/report/sessionin-overlap/components/list.component.html rename to src/app/modules/admin/report/duplicated-session/components/list.component.html index c4c7556..88c5839 100644 --- a/src/app/modules/admin/report/sessionin-overlap/components/list.component.html +++ b/src/app/modules/admin/report/duplicated-session/components/list.component.html @@ -65,8 +65,10 @@
- - + +
- +
diff --git a/src/app/modules/admin/report/sessionin-overlap/components/list.component.ts b/src/app/modules/admin/report/duplicated-session/components/list.component.ts similarity index 84% rename from src/app/modules/admin/report/sessionin-overlap/components/list.component.ts rename to src/app/modules/admin/report/duplicated-session/components/list.component.ts index 5829838..9233874 100644 --- a/src/app/modules/admin/report/sessionin-overlap/components/list.component.ts +++ b/src/app/modules/admin/report/duplicated-session/components/list.component.ts @@ -30,13 +30,13 @@ import { fuseAnimations } from '@fuse/animations'; import { FuseConfirmationService } from '@fuse/services/confirmation'; import { User } from '../../../member/user/models/user'; -import { SessioninOverlap } from '../models/sessionin-overlap'; -import { SessioninOverlapPagination } from '../models/sessionin-Overlap-pagination'; -import { SessioninOverlapService } from '../services/sessionin-overlap.service'; +import { DuplicatedSession } from '../models/duplicated-session'; +import { DuplicatedSessionPagination } from '../models/duplicated-session-pagination'; +import { DuplicatedSessionService } from '../services/duplicated-session.service'; import { Router } from '@angular/router'; @Component({ - selector: 'sessionin-overlap-list', + selector: 'duplicated-session-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; - sessioninOverlaps$!: Observable; + duplicatedSessions$!: Observable; users$!: Observable; isLoading = false; searchInputControl = new FormControl(); - selectedSessioninOverlap?: SessioninOverlap; - pagination?: SessioninOverlapPagination; + selectedDuplicatedSession?: DuplicatedSession; + pagination?: DuplicatedSessionPagination; __isSearchOpened = false; @@ -85,7 +85,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { private _changeDetectorRef: ChangeDetectorRef, private _fuseConfirmationService: FuseConfirmationService, private _formBuilder: FormBuilder, - private _sessioninOverlapService: SessioninOverlapService, + private _duplicatedSessionService: DuplicatedSessionService, private router: Router ) {} @@ -98,9 +98,9 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { */ ngOnInit(): void { // Get the pagination - this._sessioninOverlapService.pagination$ + this._duplicatedSessionService.pagination$ .pipe(takeUntil(this._unsubscribeAll)) - .subscribe((pagination: SessioninOverlapPagination | undefined) => { + .subscribe((pagination: DuplicatedSessionPagination | undefined) => { // Update the pagination this.pagination = pagination; @@ -109,7 +109,8 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { }); // Get the products - this.sessioninOverlaps$ = this._sessioninOverlapService.sessioninOverlaps$; + this.duplicatedSessions$ = + this._duplicatedSessionService.duplicatedSessions$; } /** @@ -119,7 +120,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { if (this._sort && this._paginator) { // Set the initial sort this._sort.sort({ - id: 'name', + id: 'overlapCount', start: 'asc', disableClear: true, }); @@ -127,7 +128,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { // Mark for check this._changeDetectorRef.markForCheck(); - // If the sessioninOverlap changes the sort order... + // If the duplicatedSession changes the sort order... this._sort.sortChange .pipe(takeUntil(this._unsubscribeAll)) .subscribe(() => { @@ -140,7 +141,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { .pipe( switchMap(() => { this.isLoading = true; - return this._sessioninOverlapService.getSessioninOverlaps( + return this._duplicatedSessionService.getDuplicatedSessions( this._paginator.pageIndex, this._paginator.pageSize, this._sort.active, diff --git a/src/app/modules/admin/report/sessionin-overlap/sessionin-overlap.module.ts b/src/app/modules/admin/report/duplicated-session/duplicated-session.module.ts similarity index 90% rename from src/app/modules/admin/report/sessionin-overlap/sessionin-overlap.module.ts rename to src/app/modules/admin/report/duplicated-session/duplicated-session.module.ts index 0b3825c..c135c6f 100644 --- a/src/app/modules/admin/report/sessionin-overlap/sessionin-overlap.module.ts +++ b/src/app/modules/admin/report/duplicated-session/duplicated-session.module.ts @@ -22,14 +22,14 @@ import { SharedModule } from 'app/shared/shared.module'; import { COMPONENTS } from './components'; -import { sessioninOverlapRoutes } from './sessionin-overlap.routing'; +import { duplicatedSessionRoutes } from './duplicated-session.routing'; @NgModule({ declarations: [COMPONENTS], imports: [ TranslocoModule, SharedModule, - RouterModule.forChild(sessioninOverlapRoutes), + RouterModule.forChild(duplicatedSessionRoutes), MatButtonModule, MatFormFieldModule, @@ -47,4 +47,4 @@ import { sessioninOverlapRoutes } from './sessionin-overlap.routing'; MatCheckboxModule, ], }) -export class SessioninOverlapModule {} +export class DuplicatedSessionModule {} diff --git a/src/app/modules/admin/report/sessionin-overlap/sessionin-overlap.routing.ts b/src/app/modules/admin/report/duplicated-session/duplicated-session.routing.ts similarity index 69% rename from src/app/modules/admin/report/sessionin-overlap/sessionin-overlap.routing.ts rename to src/app/modules/admin/report/duplicated-session/duplicated-session.routing.ts index 9411951..ccdb895 100644 --- a/src/app/modules/admin/report/sessionin-overlap/sessionin-overlap.routing.ts +++ b/src/app/modules/admin/report/duplicated-session/duplicated-session.routing.ts @@ -3,15 +3,15 @@ import { Route } from '@angular/router'; import { ListComponent } from './components/list.component'; import { ViewComponent } from '../../member/user/components/view.component'; -import { SessioninOverlapsResolver } from './resolvers/sessionin-overlap.resolver'; +import { DuplicatedSessionsResolver } from './resolvers/duplicated-session.resolver'; import { UserResolver } from '../../member/user/resolvers/user.resolver'; -export const sessioninOverlapRoutes: Route[] = [ +export const duplicatedSessionRoutes: Route[] = [ { path: '', component: ListComponent, resolve: { - sessioninOverlaps: SessioninOverlapsResolver, + duplicatedSessions: DuplicatedSessionsResolver, }, }, { diff --git a/src/app/modules/admin/report/sessionin-overlap/models/sessionin-Overlap-pagination.ts b/src/app/modules/admin/report/duplicated-session/models/duplicated-session-pagination.ts similarity index 70% rename from src/app/modules/admin/report/sessionin-overlap/models/sessionin-Overlap-pagination.ts rename to src/app/modules/admin/report/duplicated-session/models/duplicated-session-pagination.ts index 0e12fc4..8e2ccfe 100644 --- a/src/app/modules/admin/report/sessionin-overlap/models/sessionin-Overlap-pagination.ts +++ b/src/app/modules/admin/report/duplicated-session/models/duplicated-session-pagination.ts @@ -1,4 +1,4 @@ -export interface SessioninOverlapPagination { +export interface DuplicatedSessionPagination { length: number; size: number; page: number; diff --git a/src/app/modules/admin/report/sessionin-overlap/models/sessionin-overlap.ts b/src/app/modules/admin/report/duplicated-session/models/duplicated-session.ts similarity index 66% rename from src/app/modules/admin/report/sessionin-overlap/models/sessionin-overlap.ts rename to src/app/modules/admin/report/duplicated-session/models/duplicated-session.ts index c97557b..4698cbf 100644 --- a/src/app/modules/admin/report/sessionin-overlap/models/sessionin-overlap.ts +++ b/src/app/modules/admin/report/duplicated-session/models/duplicated-session.ts @@ -1,4 +1,4 @@ -export interface SessioninOverlap { +export interface DuplicatedSession { id?: string; overlapCount?: string; ip?: string; diff --git a/src/app/modules/admin/report/sessionin-overlap/resolvers/sessionin-overlap.resolver.ts b/src/app/modules/admin/report/duplicated-session/resolvers/duplicated-session.resolver.ts similarity index 66% rename from src/app/modules/admin/report/sessionin-overlap/resolvers/sessionin-overlap.resolver.ts rename to src/app/modules/admin/report/duplicated-session/resolvers/duplicated-session.resolver.ts index 476cb16..f75a639 100644 --- a/src/app/modules/admin/report/sessionin-overlap/resolvers/sessionin-overlap.resolver.ts +++ b/src/app/modules/admin/report/duplicated-session/resolvers/duplicated-session.resolver.ts @@ -7,19 +7,19 @@ import { } from '@angular/router'; import { catchError, Observable, throwError } from 'rxjs'; -import { SessioninOverlap } from '../models/sessionin-overlap'; -import { SessioninOverlapPagination } from '../models/sessionin-Overlap-pagination'; -import { SessioninOverlapService } from '../services/sessionin-overlap.service'; +import { DuplicatedSession } from '../models/duplicated-session'; +import { DuplicatedSessionPagination } from '../models/duplicated-session-pagination'; +import { DuplicatedSessionService } from '../services/duplicated-session.service'; @Injectable({ providedIn: 'root', }) -export class SessioninOverlapResolver implements Resolve { +export class DuplicatedSessionResolver implements Resolve { /** * Constructor */ constructor( - private _sessioninOverlapService: SessioninOverlapService, + private _duplicatedSessionService: DuplicatedSessionService, private _router: Router ) {} @@ -36,9 +36,9 @@ export class SessioninOverlapResolver implements Resolve { resolve( route: ActivatedRouteSnapshot, state: RouterStateSnapshot - ): Observable { - return this._sessioninOverlapService - .getSessioninOverlapById(route.paramMap.get('id')) + ): Observable { + return this._duplicatedSessionService + .getDuplicatedSessionById(route.paramMap.get('id')) .pipe( // Error here means the requested product is not available catchError((error) => { @@ -61,11 +61,11 @@ export class SessioninOverlapResolver implements Resolve { @Injectable({ providedIn: 'root', }) -export class SessioninOverlapsResolver implements Resolve { +export class DuplicatedSessionsResolver implements Resolve { /** * Constructor */ - constructor(private _sessioninOverlapService: SessioninOverlapService) {} + constructor(private _duplicatedSessionService: DuplicatedSessionService) {} // ----------------------------------------------------------------------------------------------------- // @ Public methods @@ -81,9 +81,9 @@ export class SessioninOverlapsResolver implements Resolve { route: ActivatedRouteSnapshot, state: RouterStateSnapshot ): Observable<{ - pagination: SessioninOverlapPagination; - sessioninOverlaps: SessioninOverlap[]; + pagination: DuplicatedSessionPagination; + duplicatedSessions: DuplicatedSession[]; }> { - return this._sessioninOverlapService.getSessioninOverlaps(); + return this._duplicatedSessionService.getDuplicatedSessions(); } } diff --git a/src/app/modules/admin/report/sessionin-overlap/services/sessionin-overlap.service.ts b/src/app/modules/admin/report/duplicated-session/services/duplicated-session.service.ts similarity index 50% rename from src/app/modules/admin/report/sessionin-overlap/services/sessionin-overlap.service.ts rename to src/app/modules/admin/report/duplicated-session/services/duplicated-session.service.ts index 94b31f6..4936390 100644 --- a/src/app/modules/admin/report/sessionin-overlap/services/sessionin-overlap.service.ts +++ b/src/app/modules/admin/report/duplicated-session/services/duplicated-session.service.ts @@ -12,22 +12,22 @@ import { throwError, } from 'rxjs'; -import { SessioninOverlap } from '../models/sessionin-overlap'; -import { SessioninOverlapPagination } from '../models/sessionin-Overlap-pagination'; +import { DuplicatedSession } from '../models/duplicated-session'; +import { DuplicatedSessionPagination } from '../models/duplicated-session-pagination'; @Injectable({ providedIn: 'root', }) -export class SessioninOverlapService { +export class DuplicatedSessionService { // Private private __pagination = new BehaviorSubject< - SessioninOverlapPagination | undefined + DuplicatedSessionPagination | undefined >(undefined); - private __sessioninOverlap = new BehaviorSubject< - SessioninOverlap | undefined + private __duplicatedSession = new BehaviorSubject< + DuplicatedSession | undefined >(undefined); - private __sessioninOverlaps = new BehaviorSubject< - SessioninOverlap[] | undefined + private __duplicatedSessions = new BehaviorSubject< + DuplicatedSession[] | undefined >(undefined); /** @@ -42,22 +42,22 @@ export class SessioninOverlapService { /** * Getter for pagination */ - get pagination$(): Observable { + get pagination$(): Observable { return this.__pagination.asObservable(); } /** - * Getter for sessioninOverlap + * Getter for duplicatedSession */ - get sessioninOverlap$(): Observable { - return this.__sessioninOverlap.asObservable(); + get duplicatedSession$(): Observable { + return this.__duplicatedSession.asObservable(); } /** - * Getter for sessioninOverlaps + * Getter for duplicatedSessions */ - get sessioninOverlaps$(): Observable { - return this.__sessioninOverlaps.asObservable(); + get duplicatedSessions$(): Observable { + return this.__duplicatedSessions.asObservable(); } // ----------------------------------------------------------------------------------------------------- @@ -65,7 +65,7 @@ export class SessioninOverlapService { // ----------------------------------------------------------------------------------------------------- /** - * Get SessioninOverlaps + * Get DuplicatedSessions * * * @param page @@ -74,21 +74,21 @@ export class SessioninOverlapService { * @param order * @param search */ - getSessioninOverlaps( + getDuplicatedSessions( page: number = 0, size: number = 10, - sort: string = 'name', + sort: string = 'signinId', order: 'asc' | 'desc' | '' = 'asc', search: string = '' ): Observable<{ - pagination: SessioninOverlapPagination; - sessioninOverlaps: SessioninOverlap[]; + pagination: DuplicatedSessionPagination; + duplicatedSessions: DuplicatedSession[]; }> { return this._httpClient .get<{ - pagination: SessioninOverlapPagination; - sessioninOverlaps: SessioninOverlap[]; - }>('api/apps/report/sessionin-overlap/sessionin-overlaps', { + pagination: DuplicatedSessionPagination; + duplicatedSessions: DuplicatedSession[]; + }>('api/apps/report/duplicated-session/duplicated-sessions', { params: { page: '' + page, size: '' + size, @@ -100,7 +100,7 @@ export class SessioninOverlapService { .pipe( tap((response) => { this.__pagination.next(response.pagination); - this.__sessioninOverlaps.next(response.sessioninOverlaps); + this.__duplicatedSessions.next(response.duplicatedSessions); }) ); } @@ -108,19 +108,19 @@ export class SessioninOverlapService { /** * Get product by id */ - getSessioninOverlapById(id: string | null): Observable { - return this.__sessioninOverlaps.pipe( + getDuplicatedSessionById(id: string | null): Observable { + return this.__duplicatedSessions.pipe( take(1), - map((sessioninOverlaps) => { + map((duplicatedSessions) => { // Find the product - const sessioninOverlap = - sessioninOverlaps?.find((item) => item.id === id) || undefined; + const duplicatedSession = + duplicatedSessions?.find((item) => item.id === id) || undefined; // Update the product - this.__sessioninOverlap.next(sessioninOverlap); + this.__duplicatedSession.next(duplicatedSession); // Return the product - return sessioninOverlap; + return duplicatedSession; }), switchMap((product) => { if (!product) { @@ -135,27 +135,27 @@ export class SessioninOverlapService { /** * Create product */ - createSessioninOverlap(): Observable { - return this.sessioninOverlaps$.pipe( + createDuplicatedSession(): Observable { + return this.duplicatedSessions$.pipe( take(1), - switchMap((sessioninOverlaps) => + switchMap((duplicatedSessions) => this._httpClient - .post( - 'api/apps/report/sessionin-overlap/product', + .post( + 'api/apps/report/duplicated-session/product', {} ) .pipe( - map((newSessioninOverlap) => { - // Update the sessioninOverlaps with the new product - if (!!sessioninOverlaps) { - this.__sessioninOverlaps.next([ - newSessioninOverlap, - ...sessioninOverlaps, + map((newDuplicatedSession) => { + // Update the duplicatedSessions with the new product + if (!!duplicatedSessions) { + this.__duplicatedSessions.next([ + newDuplicatedSession, + ...duplicatedSessions, ]); } // Return the new product - return newSessioninOverlap; + return newDuplicatedSession; }) ) ) diff --git a/src/app/modules/admin/report/user-session/components/list.component.ts b/src/app/modules/admin/report/user-session/components/list.component.ts index 7ea21c4..6778a0c 100644 --- a/src/app/modules/admin/report/user-session/components/list.component.ts +++ b/src/app/modules/admin/report/user-session/components/list.component.ts @@ -36,7 +36,7 @@ import { UserSessionService } from '../services/user-session.service'; import { Router } from '@angular/router'; @Component({ - selector: 'sessionin-info-list', + selector: 'user-session-list', templateUrl: './list.component.html', styles: [ /* language=SCSS */ diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index c03db86..ee08612 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -39,7 +39,7 @@ "Payment Log": "Manual Payment Logs", "User Session": "User Session", "Admin Session": "Admin Session", - "Sessionin Overlap": "Sessionin Overlap", + "Duplicated Session": "Duplicated Session", "Excel Log": "Excel Download Logs", "Loosing": "Loosing Management", "Notice": "Notice", diff --git a/src/assets/i18n/ko.json b/src/assets/i18n/ko.json index 34b079c..c80298c 100644 --- a/src/assets/i18n/ko.json +++ b/src/assets/i18n/ko.json @@ -46,7 +46,7 @@ "Modification Log": "회원수정 로그", "Payment Log": "수동지급/회수 로그", "User Session": "로그인정보", - "Sessionin Overlap": "중복로그인", + "Duplicated Session": "중복로그인", "Admin Session": "관리자 로그인정보", "Excel Log": "엑셀다운 로그", "Loosing": "루징관리",