diff --git a/src/app/app.routing.ts b/src/app/app.routing.ts
index 670f3f9..bb2c8d7 100644
--- a/src/app/app.routing.ts
+++ b/src/app/app.routing.ts
@@ -162,6 +162,13 @@ export const appRoutes: Route[] = [
(m: any) => m.DepositModule
),
},
+ {
+ path: 'withdraw',
+ loadChildren: () =>
+ import('app/modules/admin/bank/withdraw/withdraw.module').then(
+ (m: any) => m.WithdrawModule
+ ),
+ },
],
},
],
diff --git a/src/app/mock-api/apps/bank/deposit/api.ts b/src/app/mock-api/apps/bank/deposit/api.ts
index 823ca37..ce81376 100644
--- a/src/app/mock-api/apps/bank/deposit/api.ts
+++ b/src/app/mock-api/apps/bank/deposit/api.ts
@@ -79,7 +79,7 @@ export class BankDepositMockApi {
// If the requested page number is bigger than
// the last possible page number, return null for
- // users but also send the last possible page so
+ // deposits but also send the last possible page so
// the app can navigate to there
if (page > lastPage) {
deposits = null;
@@ -120,7 +120,7 @@ export class BankDepositMockApi {
// Get the id from the params
const id = request.params.get('id');
- // Clone the users
+ // Clone the deposits
const deposits = cloneDeep(this._deposits);
// Find the deposit
diff --git a/src/app/mock-api/apps/bank/withdraw/api.ts b/src/app/mock-api/apps/bank/withdraw/api.ts
new file mode 100644
index 0000000..b328d3c
--- /dev/null
+++ b/src/app/mock-api/apps/bank/withdraw/api.ts
@@ -0,0 +1,212 @@
+import { Injectable } from '@angular/core';
+import { assign, cloneDeep } from 'lodash-es';
+import { FuseMockApiService, FuseMockApiUtils } from '@fuse/lib/mock-api';
+import { withdraws as withdrawsData } from './data';
+
+@Injectable({
+ providedIn: 'root',
+})
+export class BankWithdrawMockApi {
+ private _withdraws: any[] = withdrawsData;
+
+ /**
+ * Constructor
+ */
+ constructor(private _fuseMockApiService: FuseMockApiService) {
+ // Register Mock API handlers
+ this.registerHandlers();
+ }
+
+ // -----------------------------------------------------------------------------------------------------
+ // @ Public methods
+ // -----------------------------------------------------------------------------------------------------
+
+ /**
+ * Register Mock API handlers
+ */
+ registerHandlers(): void {
+ // -----------------------------------------------------------------------------------------------------
+ // @ Withdraws - GET
+ // -----------------------------------------------------------------------------------------------------
+ this._fuseMockApiService
+ .onGet('api/apps/bank/withdraw/withdraws', 300)
+ .reply(({ request }) => {
+ // Get available queries
+ const search = request.params.get('search');
+ const sort = request.params.get('sort') || 'name';
+ 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 withdraws
+ let withdraws: any[] | null = cloneDeep(this._withdraws);
+
+ // Sort the withdraws
+ if (sort === 'sku' || sort === 'name' || sort === 'active') {
+ withdraws.sort((a, b) => {
+ const fieldA = a[sort].toString().toUpperCase();
+ const fieldB = b[sort].toString().toUpperCase();
+ return order === 'asc'
+ ? fieldA.localeCompare(fieldB)
+ : fieldB.localeCompare(fieldA);
+ });
+ } else {
+ withdraws.sort((a, b) =>
+ order === 'asc' ? a[sort] - b[sort] : b[sort] - a[sort]
+ );
+ }
+
+ // If search exists...
+ if (search) {
+ // Filter the withdraws
+ withdraws = withdraws.filter(
+ (contact: any) =>
+ contact.name &&
+ contact.name.toLowerCase().includes(search.toLowerCase())
+ );
+ }
+
+ // Paginate - Start
+ const withdrawsLength = withdraws.length;
+
+ // Calculate pagination details
+ const begin = page * size;
+ const end = Math.min(size * (page + 1), withdrawsLength);
+ const lastPage = Math.max(Math.ceil(withdrawsLength / size), 1);
+
+ // Prepare the pagination object
+ let pagination = {};
+
+ // If the requested page number is bigger than
+ // the last possible page number, return null for
+ // users but also send the last possible page so
+ // the app can navigate to there
+ if (page > lastPage) {
+ withdraws = null;
+ pagination = {
+ lastPage,
+ };
+ } else {
+ // Paginate the results by size
+ withdraws = withdraws.slice(begin, end);
+
+ // Prepare the pagination mock-api
+ pagination = {
+ length: withdrawsLength,
+ size: size,
+ page: page,
+ lastPage: lastPage,
+ startIndex: begin,
+ endIndex: end - 1,
+ };
+ }
+
+ // Return the response
+ return [
+ 200,
+ {
+ withdraws,
+ pagination,
+ },
+ ];
+ });
+
+ // -----------------------------------------------------------------------------------------------------
+ // @ Withdraws - GET
+ // -----------------------------------------------------------------------------------------------------
+ this._fuseMockApiService
+ .onGet('api/apps/bank/withdraw/withdraw')
+ .reply(({ request }) => {
+ // Get the id from the params
+ const id = request.params.get('id');
+
+ // Clone the users
+ const withdraws = cloneDeep(this._withdraws);
+
+ // Find the withdraw
+ const withdraw = withdraws.find((item: any) => item.id === id);
+
+ // Return the response
+ return [200, withdraw];
+ });
+
+ // -----------------------------------------------------------------------------------------------------
+ // @ Withdraws - POST
+ // -----------------------------------------------------------------------------------------------------
+ this._fuseMockApiService
+ .onPost('api/apps/bank/withdraw/withdraw')
+ .reply(() => {
+ // Generate a new withdraw
+ const newWithdraw = {
+ id: FuseMockApiUtils.guid(),
+ rank: '',
+ nickname: '',
+ exchangeApplication: '',
+ calculateType: '',
+ accountHolder: '',
+ note: '',
+ registrationDate: '',
+ processDate: '',
+ deposit: '',
+ withdrawal: '',
+ total: '',
+ highRank: '',
+ state: '',
+ };
+
+ // Unshift the new withdraw
+ this._withdraws.unshift(newWithdraw);
+
+ // Return the response
+ return [200, newWithdraw];
+ });
+
+ // -----------------------------------------------------------------------------------------------------
+ // @ Withdraw - PATCH
+ // -----------------------------------------------------------------------------------------------------
+ this._fuseMockApiService
+ .onPatch('api/apps/bank/withdraw/withdraw')
+ .reply(({ request }) => {
+ // Get the id and withdraw
+ const id = request.body.id;
+ const withdraw = cloneDeep(request.body.withdraw);
+
+ // Prepare the updated withdraw
+ let updatedWithdraw = null;
+
+ // Find the withdraw and update it
+ this._withdraws.forEach((item, index, withdraws) => {
+ if (item.id === id) {
+ // Update the withdraw
+ withdraws[index] = assign({}, withdraws[index], withdraw);
+
+ // Store the updated withdraw
+ updatedWithdraw = withdraws[index];
+ }
+ });
+
+ // Return the response
+ return [200, updatedWithdraw];
+ });
+
+ // -----------------------------------------------------------------------------------------------------
+ // @ Withdraw - DELETE
+ // -----------------------------------------------------------------------------------------------------
+ this._fuseMockApiService
+ .onDelete('api/apps/bank/withdraw/withdraw')
+ .reply(({ request }) => {
+ // Get the id
+ const id = request.params.get('id');
+
+ // Find the withdraw and delete it
+ this._withdraws.forEach((item, index) => {
+ if (item.id === id) {
+ this._withdraws.splice(index, 1);
+ }
+ });
+
+ // Return the response
+ return [200, true];
+ });
+ }
+}
diff --git a/src/app/mock-api/apps/bank/withdraw/data.ts b/src/app/mock-api/apps/bank/withdraw/data.ts
new file mode 100644
index 0000000..29b1643
--- /dev/null
+++ b/src/app/mock-api/apps/bank/withdraw/data.ts
@@ -0,0 +1,52 @@
+/* eslint-disable */
+
+export const withdraws = [
+ {
+ rank: '회원',
+ id: 'aa100',
+ nickname: 'aa100',
+ exchangeApplication: 14000000,
+ calculateType: '롤링',
+ accountHolder: '광주은행121212121212sss',
+ note: '@',
+ registrationDate: '2022-06-10 16:51',
+ processDate: '2022-06-10 16:51',
+ deposit: 41200000,
+ withdrawal: 19000000,
+ total: 22200000,
+ highRank: '[매장]kgon5',
+ state: '완료',
+ },
+ {
+ rank: '회원',
+ id: 'aa100',
+ nickname: 'aa100',
+ exchangeApplication: 5000000,
+ calculateType: '롤링',
+ accountHolder: '광주은행121212121212sss',
+ note: '@',
+ registrationDate: '2022-06-08 18:31',
+ processDate: '2022-06-08 20:13',
+ deposit: 41200000,
+ withdrawal: 19000000,
+ total: 22200000,
+ highRank: '[매장]kgon5',
+ state: '완료',
+ },
+ {
+ rank: '회원',
+ id: 'qwer12',
+ nickname: '하하하',
+ exchangeApplication: 10000,
+ calculateType: '롤링',
+ accountHolder: '하나은행000210654151테스트',
+ note: '',
+ registrationDate: '2022-06-08 01:22',
+ processDate: '2022-06-08 01:22',
+ deposit: 10000000,
+ withdrawal: 10000,
+ total: 9990000,
+ highRank: '[매장]kgon5',
+ state: '완료',
+ },
+];
diff --git a/src/app/mock-api/common/navigation/data.ts b/src/app/mock-api/common/navigation/data.ts
index d7f6575..47fab1d 100644
--- a/src/app/mock-api/common/navigation/data.ts
+++ b/src/app/mock-api/common/navigation/data.ts
@@ -69,6 +69,13 @@ export const defaultNavigation: FuseNavigationItem[] = [
icon: 'heroicons_outline:academic-cap',
link: '/bank/deposit',
},
+ {
+ id: 'bank.withdraw',
+ title: 'Withdraw',
+ type: 'basic',
+ icon: 'heroicons_outline:academic-cap',
+ link: '/bank/withdraw',
+ },
],
},
];
diff --git a/src/app/modules/admin/bank/deposit/components/list.component.html b/src/app/modules/admin/bank/deposit/components/list.component.html
index ae6e1a4..70379be 100644
--- a/src/app/modules/admin/bank/deposit/components/list.component.html
+++ b/src/app/modules/admin/bank/deposit/components/list.component.html
@@ -23,7 +23,7 @@
카지노콤프
슬롯콤프
- 배팅콤프
+ 베팅콤프
첫충콤프
@@ -135,7 +135,7 @@
class="hidden sm:block"
[mat-sort-header]="'bettingInfomation'"
>
- 배팅정보
+ 베팅정보
삭제
@@ -169,98 +169,99 @@
LV.{{ deposit.level }}
-
-
-
- {{ deposit.id }}
-
+
+
+ {{ deposit.id }}
+
-
-
- {{ deposit.nickname }}
-
+
+
+ {{ deposit.nickname }}
+
-
-
- {{ deposit.paymentDue }}원
-
+
+
+ {{ deposit.paymentDue }}원
+
-
-
- {{ deposit.calculateType }}
-
+
+
+ {{ deposit.calculateType }}
+
-
-
- {{ deposit.accountHolder }}
-
+
+
+ {{ deposit.accountHolder }}
+
-
-
- {{ deposit.note }}
-
+
+
+ {{ deposit.note }}
+
-
-
- {{ deposit.registrationDate }}
-
+
+
+ {{ deposit.registrationDate }}
+
-
-
- {{ deposit.processDate }}
-
+
+
+ {{ deposit.processDate }}
+
-
-
- {{ deposit.deposit }}원 {{ deposit.withdrawal }}원
- {{ deposit.total }}원
-
+
+
+ {{ deposit.deposit }}원 {{ deposit.withdrawal }}원
+ {{ deposit.total }}원
+
-
-
- {{ deposit.gameMoney }}
-
+
+
+ {{ deposit.gameMoney }}
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
- {{ deposit.state }}
-
+
+
+ {{ deposit.state }}
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
+
diff --git a/src/app/modules/admin/bank/withdraw/components/index.ts b/src/app/modules/admin/bank/withdraw/components/index.ts
new file mode 100644
index 0000000..04759eb
--- /dev/null
+++ b/src/app/modules/admin/bank/withdraw/components/index.ts
@@ -0,0 +1,3 @@
+import { ListComponent } from './list.component';
+
+export const COMPONENTS = [ListComponent];
diff --git a/src/app/modules/admin/bank/withdraw/components/list.component.html b/src/app/modules/admin/bank/withdraw/components/list.component.html
new file mode 100644
index 0000000..da2d107
--- /dev/null
+++ b/src/app/modules/admin/bank/withdraw/components/list.component.html
@@ -0,0 +1,363 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0; else noWithdraw">
+
+
+
+
+
등급
+
아이디
+
+ 닉네임
+
+
+ 정산종류
+
+
+ 회원정보
+
+
비고
+
+ 등록날짜
+
+
+ 처리날짜
+
+
입금출금
+
+ 상위
+
+
+ 상태
+
+
+ 회원정보
+
+
+ 베팅정보
+
+
+ 삭제
+
+
+
+
+
+
+
+
+
+ {{ withdraw.rank }}
+
+
+
+
+ {{ withdraw.id }}
+
+
+
+
+ {{ withdraw.nickname }}
+
+
+
+
+ {{ withdraw.calculateType }}
+
+
+
+
+ {{ withdraw.accountHolder }}
+
+
+
+
+ {{ withdraw.note }}
+
+
+
+
+ {{ withdraw.registrationDate }}
+
+
+
+
+ {{ withdraw.processDate }}
+
+
+
+
+ {{ withdraw.deposit }}원 {{ withdraw.withdraw }}원
+ {{ withdraw.total }}원
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ withdraw.state }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ There are no withdraw!
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/modules/admin/bank/withdraw/components/list.component.ts b/src/app/modules/admin/bank/withdraw/components/list.component.ts
new file mode 100644
index 0000000..7715f34
--- /dev/null
+++ b/src/app/modules/admin/bank/withdraw/components/list.component.ts
@@ -0,0 +1,190 @@
+import {
+ AfterViewInit,
+ ChangeDetectionStrategy,
+ ChangeDetectorRef,
+ Component,
+ OnDestroy,
+ OnInit,
+ ViewChild,
+ ViewEncapsulation,
+} from '@angular/core';
+import {
+ FormBuilder,
+ FormControl,
+ FormGroup,
+ Validators,
+} from '@angular/forms';
+import { MatCheckboxChange } from '@angular/material/checkbox';
+import { MatPaginator } from '@angular/material/paginator';
+import { MatSort } from '@angular/material/sort';
+import {
+ debounceTime,
+ map,
+ merge,
+ Observable,
+ Subject,
+ switchMap,
+ takeUntil,
+} from 'rxjs';
+import { fuseAnimations } from '@fuse/animations';
+import { FuseConfirmationService } from '@fuse/services/confirmation';
+
+import { Withdraw } from '../models/withdraw';
+import { WithdrawPagination } from '../models/withdraw-pagination';
+import { WithdrawService } from '../services/withdraw.service';
+
+@Component({
+ selector: 'withdraw-list',
+ templateUrl: './list.component.html',
+ styles: [
+ /* language=SCSS */
+ `
+ .inventory-grid {
+ grid-template-columns: 60px auto 40px;
+
+ @screen sm {
+ grid-template-columns: 60px auto 60px 72px;
+ }
+
+ @screen md {
+ grid-template-columns: 60px 60px auto 112px 72px;
+ }
+
+ @screen lg {
+ grid-template-columns: 60px 60px auto 112px 96px 96px 72px;
+ }
+ }
+ `,
+ ],
+ encapsulation: ViewEncapsulation.None,
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ animations: fuseAnimations,
+})
+export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
+ @ViewChild(MatPaginator) private _paginator!: MatPaginator;
+ @ViewChild(MatSort) private _sort!: MatSort;
+
+ withdraws$!: Observable;
+
+ isLoading = false;
+ searchInputControl = new FormControl();
+ selectedWithdraw?: Withdraw;
+ pagination?: WithdrawPagination;
+
+ private _unsubscribeAll: Subject = new Subject();
+
+ /**
+ * Constructor
+ */
+ constructor(
+ private _changeDetectorRef: ChangeDetectorRef,
+ private _fuseConfirmationService: FuseConfirmationService,
+ private _formBuilder: FormBuilder,
+ private _withdrawService: WithdrawService
+ ) {}
+
+ // -----------------------------------------------------------------------------------------------------
+ // @ Lifecycle hooks
+ // -----------------------------------------------------------------------------------------------------
+
+ /**
+ * On init
+ */
+ ngOnInit(): void {
+ // Get the pagination
+ this._withdrawService.pagination$
+ .pipe(takeUntil(this._unsubscribeAll))
+ .subscribe((pagination: WithdrawPagination | undefined) => {
+ // Update the pagination
+ this.pagination = pagination;
+
+ // Mark for check
+ this._changeDetectorRef.markForCheck();
+ });
+
+ // Get the products
+ this.withdraws$ = this._withdrawService.withdraws$;
+ }
+
+ /**
+ * After view init
+ */
+ ngAfterViewInit(): void {
+ if (this._sort && this._paginator) {
+ // Set the initial sort
+ this._sort.sort({
+ id: 'nickname',
+ start: 'asc',
+ disableClear: true,
+ });
+
+ // Mark for check
+ this._changeDetectorRef.markForCheck();
+
+ // If the withdraw changes the sort order...
+ this._sort.sortChange
+ .pipe(takeUntil(this._unsubscribeAll))
+ .subscribe(() => {
+ // Reset back to the first page
+ this._paginator.pageIndex = 0;
+ });
+
+ // Get products if sort or page changes
+ merge(this._sort.sortChange, this._paginator.page)
+ .pipe(
+ switchMap(() => {
+ this.isLoading = true;
+ return this._withdrawService.getWithdraws(
+ this._paginator.pageIndex,
+ this._paginator.pageSize,
+ this._sort.active,
+ this._sort.direction
+ );
+ }),
+ map(() => {
+ this.isLoading = false;
+ })
+ )
+ .subscribe();
+ }
+ }
+
+ /**
+ * On destroy
+ */
+ ngOnDestroy(): void {
+ // Unsubscribe from all subscriptions
+ this._unsubscribeAll.next(null);
+ this._unsubscribeAll.complete();
+ }
+
+ // -----------------------------------------------------------------------------------------------------
+ // @ Public methods
+ // -----------------------------------------------------------------------------------------------------
+
+ // -----------------------------------------------------------------------------------------------------
+ // @ Private methods
+ // -----------------------------------------------------------------------------------------------------
+
+ /**
+ * Create product
+ */
+ __createProduct(): void {}
+
+ /**
+ * Toggle product details
+ *
+ * @param productId
+ */
+ __toggleDetails(productId: string): void {}
+
+ /**
+ * Track by function for ngFor loops
+ *
+ * @param index
+ * @param item
+ */
+ __trackByFn(index: number, item: any): any {
+ return item.id || index;
+ }
+}
diff --git a/src/app/modules/admin/bank/withdraw/models/withdraw-pagination.ts b/src/app/modules/admin/bank/withdraw/models/withdraw-pagination.ts
new file mode 100644
index 0000000..0c9302c
--- /dev/null
+++ b/src/app/modules/admin/bank/withdraw/models/withdraw-pagination.ts
@@ -0,0 +1,8 @@
+export interface WithdrawPagination {
+ length: number;
+ size: number;
+ page: number;
+ lastPage: number;
+ startIndex: number;
+ endIndex: number;
+}
diff --git a/src/app/modules/admin/bank/withdraw/models/withdraw.ts b/src/app/modules/admin/bank/withdraw/models/withdraw.ts
new file mode 100644
index 0000000..b121c27
--- /dev/null
+++ b/src/app/modules/admin/bank/withdraw/models/withdraw.ts
@@ -0,0 +1,19 @@
+export interface Withdraw {
+ rank: string;
+ id: string;
+ nickname: string;
+ exchangeApplication: number;
+ calculateType: string;
+ accountHolder: string;
+ note: string;
+ registrationDate: string;
+ processDate: string;
+ deposit: number;
+ withdraw: number;
+ total: number;
+ highRank: string;
+ state: string;
+ memberInformation: string;
+ bettingInformation: string;
+ delete: string;
+}
diff --git a/src/app/modules/admin/bank/withdraw/resolvers/withdraw.resolver.ts b/src/app/modules/admin/bank/withdraw/resolvers/withdraw.resolver.ts
new file mode 100644
index 0000000..a3086e1
--- /dev/null
+++ b/src/app/modules/admin/bank/withdraw/resolvers/withdraw.resolver.ts
@@ -0,0 +1,87 @@
+import { Injectable } from '@angular/core';
+import {
+ ActivatedRouteSnapshot,
+ Resolve,
+ Router,
+ RouterStateSnapshot,
+} from '@angular/router';
+import { catchError, Observable, throwError } from 'rxjs';
+
+import { Withdraw } from '../models/withdraw';
+import { WithdrawPagination } from '../models/withdraw-pagination';
+import { WithdrawService } from '../services/withdraw.service';
+
+@Injectable({
+ providedIn: 'root',
+})
+export class WithdrawResolver implements Resolve {
+ /**
+ * Constructor
+ */
+ constructor(
+ private _withdrawService: WithdrawService,
+ private _router: Router
+ ) {}
+
+ // -----------------------------------------------------------------------------------------------------
+ // @ Public methods
+ // -----------------------------------------------------------------------------------------------------
+
+ /**
+ * Resolver
+ *
+ * @param route
+ * @param state
+ */
+ resolve(
+ route: ActivatedRouteSnapshot,
+ state: RouterStateSnapshot
+ ): Observable {
+ return this._withdrawService.getWithdrawById(route.paramMap.get('id')).pipe(
+ // Error here means the requested product is not available
+ catchError((error) => {
+ // Log the error
+ console.error(error);
+
+ // Get the parent url
+ const parentUrl = state.url.split('/').slice(0, -1).join('/');
+
+ // Navigate to there
+ this._router.navigateByUrl(parentUrl);
+
+ // Throw an error
+ return throwError(error);
+ })
+ );
+ }
+}
+
+@Injectable({
+ providedIn: 'root',
+})
+export class WithdrawsResolver implements Resolve {
+ /**
+ * Constructor
+ */
+ constructor(private _withdrawService: WithdrawService) {}
+
+ // -----------------------------------------------------------------------------------------------------
+ // @ Public methods
+ // -----------------------------------------------------------------------------------------------------
+
+ /**
+ * Resolver
+ *
+ * @param route
+ * @param state
+ */
+ resolve(
+ route: ActivatedRouteSnapshot,
+ state: RouterStateSnapshot
+ ): Observable<{
+ pagination: WithdrawPagination;
+ withdraws: Withdraw[];
+ }> {
+ return this._withdrawService.getWithdraws();
+ }
+}
diff --git a/src/app/modules/admin/bank/withdraw/services/withdraw.service.ts b/src/app/modules/admin/bank/withdraw/services/withdraw.service.ts
new file mode 100644
index 0000000..e3eaf0f
--- /dev/null
+++ b/src/app/modules/admin/bank/withdraw/services/withdraw.service.ts
@@ -0,0 +1,153 @@
+import { Injectable } from '@angular/core';
+import { HttpClient } from '@angular/common/http';
+import {
+ BehaviorSubject,
+ filter,
+ map,
+ Observable,
+ of,
+ switchMap,
+ take,
+ tap,
+ throwError,
+} from 'rxjs';
+
+import { Withdraw } from '../models/withdraw';
+import { WithdrawPagination } from '../models/withdraw-pagination';
+
+@Injectable({
+ providedIn: 'root',
+})
+export class WithdrawService {
+ // Private
+ private __pagination = new BehaviorSubject(
+ undefined
+ );
+ private __withdraw = new BehaviorSubject(undefined);
+ private __withdraws = new BehaviorSubject(undefined);
+
+ /**
+ * Constructor
+ */
+ constructor(private _httpClient: HttpClient) {}
+
+ // -----------------------------------------------------------------------------------------------------
+ // @ Accessors
+ // -----------------------------------------------------------------------------------------------------
+
+ /**
+ * Getter for pagination
+ */
+ get pagination$(): Observable {
+ return this.__pagination.asObservable();
+ }
+
+ /**
+ * Getter for withdraw
+ */
+ get withdraw$(): Observable {
+ return this.__withdraw.asObservable();
+ }
+
+ /**
+ * Getter for withdraws
+ */
+ get withdraws$(): Observable {
+ return this.__withdraws.asObservable();
+ }
+
+ // -----------------------------------------------------------------------------------------------------
+ // @ Public methods
+ // -----------------------------------------------------------------------------------------------------
+
+ /**
+ * Get withdraws
+ *
+ *
+ * @param page
+ * @param size
+ * @param sort
+ * @param order
+ * @param search
+ */
+ getWithdraws(
+ page: number = 0,
+ size: number = 10,
+ sort: string = 'nickname',
+ order: 'asc' | 'desc' | '' = 'asc',
+ search: string = ''
+ ): Observable<{
+ pagination: WithdrawPagination;
+ withdraws: Withdraw[];
+ }> {
+ return this._httpClient
+ .get<{ pagination: WithdrawPagination; withdraws: Withdraw[] }>(
+ 'api/apps/bank/withdraw/withdraws',
+ {
+ params: {
+ page: '' + page,
+ size: '' + size,
+ sort,
+ order,
+ search,
+ },
+ }
+ )
+ .pipe(
+ tap((response) => {
+ this.__pagination.next(response.pagination);
+ this.__withdraws.next(response.withdraws);
+ })
+ );
+ }
+
+ /**
+ * Get product by id
+ */
+ getWithdrawById(id: string | null): Observable {
+ return this.__withdraws.pipe(
+ take(1),
+ map((withdraws) => {
+ // Find the product
+ const withdraw = withdraws?.find((item) => item.id === id) || undefined;
+
+ // Update the product
+ this.__withdraw.next(withdraw);
+
+ // Return the product
+ return withdraw;
+ }),
+ switchMap((product) => {
+ if (!product) {
+ return throwError('Could not found product with id of ' + id + '!');
+ }
+
+ return of(product);
+ })
+ );
+ }
+
+ /**
+ * Create product
+ */
+ createWithdraw(): Observable {
+ return this.withdraws$.pipe(
+ take(1),
+ switchMap((withdraws) =>
+ this._httpClient
+ .post('api/apps/bank/withdraw/product', {})
+ .pipe(
+ map((newWithdraw) => {
+ // Update the withdraws with the new product
+ if (!!withdraws) {
+ this.__withdraws.next([newWithdraw, ...withdraws]);
+ }
+
+ // Return the new product
+ return newWithdraw;
+ })
+ )
+ )
+ );
+ }
+}
diff --git a/src/app/modules/admin/bank/withdraw/withdraw.module.ts b/src/app/modules/admin/bank/withdraw/withdraw.module.ts
new file mode 100644
index 0000000..58a3049
--- /dev/null
+++ b/src/app/modules/admin/bank/withdraw/withdraw.module.ts
@@ -0,0 +1,42 @@
+import { NgModule } from '@angular/core';
+import { RouterModule } from '@angular/router';
+
+import { MatButtonModule } from '@angular/material/button';
+import { MatFormFieldModule } from '@angular/material/form-field';
+import { MatIconModule } from '@angular/material/icon';
+import { MatInputModule } from '@angular/material/input';
+import { MatPaginatorModule } from '@angular/material/paginator';
+import { MatProgressBarModule } from '@angular/material/progress-bar';
+import { MatRippleModule } from '@angular/material/core';
+import { MatSortModule } from '@angular/material/sort';
+import { MatSelectModule } from '@angular/material/select';
+import { MatTooltipModule } from '@angular/material/tooltip';
+
+import { TranslocoModule } from '@ngneat/transloco';
+
+import { SharedModule } from 'app/shared/shared.module';
+
+import { COMPONENTS } from './components';
+
+import { withdrawRoutes } from './withdraw.routing';
+
+@NgModule({
+ declarations: [COMPONENTS],
+ imports: [
+ TranslocoModule,
+ SharedModule,
+ RouterModule.forChild(withdrawRoutes),
+
+ MatButtonModule,
+ MatFormFieldModule,
+ MatIconModule,
+ MatInputModule,
+ MatPaginatorModule,
+ MatProgressBarModule,
+ MatRippleModule,
+ MatSortModule,
+ MatSelectModule,
+ MatTooltipModule,
+ ],
+})
+export class WithdrawModule {}
diff --git a/src/app/modules/admin/bank/withdraw/withdraw.routing.ts b/src/app/modules/admin/bank/withdraw/withdraw.routing.ts
new file mode 100644
index 0000000..bbb382e
--- /dev/null
+++ b/src/app/modules/admin/bank/withdraw/withdraw.routing.ts
@@ -0,0 +1,15 @@
+import { Route } from '@angular/router';
+
+import { ListComponent } from './components/list.component';
+
+// import { DepositResolver } from './resolvers/deposit.resolver';
+
+export const withdrawRoutes: Route[] = [
+ {
+ path: '',
+ component: ListComponent,
+ // resolve: {
+ // deposits: DepositResolver,
+ // },
+ },
+];
diff --git a/src/app/modules/admin/member/user/components/list.component.html b/src/app/modules/admin/member/user/components/list.component.html
index b421973..6b68a5c 100644
--- a/src/app/modules/admin/member/user/components/list.component.html
+++ b/src/app/modules/admin/member/user/components/list.component.html
@@ -181,8 +181,8 @@
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
>
+
-
@@ -205,85 +205,88 @@
콤프지급/회수
쿠폰머니지급/회수
쪽지보내기
- 배팅리스트
+ 베팅리스트
강제로그아웃
-
+
+
+
{{ user.highRank }}
-
+
+
+
{{ user.rank }}
-
+
+
+
LV.{{ user.level }}
-
-
- {{ user.id }}
-
+
+
+
+ {{ user.id }}
+
-
-
- {{ user.nickname }}
-
+
+
+ {{ user.nickname }}
+
-
-
- {{ user.accountHolder }}
-
+
+
+ {{ user.accountHolder }}
+
-
-
- {{ user.contact }}
-
+
+
+ {{ user.contact }}
+
-
-
- 캐쉬{{ user.cash }} 콤프{{ user.comp }} 쿠폰{{
- user.coupon
- }}
-
+
+
+ 캐쉬{{ user.cash }} 콤프{{ user.comp }} 쿠폰{{ user.coupon }}
+
-
-
- {{ user.gameMoney }}
-
+
+
+ {{ user.gameMoney }}
+
-
-
-
-
-
+
+
+
+
+
-
-
- {{ user.todayComp }}P
-
+
+
+ {{ user.todayComp }}P
+
-
-
- 입금{{ user.deposit }} 출금{{ user.withdraw }} 차익{{
- user.margin
- }}
-
+
+
+ 입금{{ user.deposit }} 출금{{ user.withdraw }} 차익{{
+ user.margin
+ }}
+
-
-
- 가입{{ user.accession }} 최종{{ user.final }} IP{{
- user.ip
- }}
-
+
+
+ 가입{{ user.accession }} 최종{{ user.final }} IP{{ user.ip }}
+
-
-
- {{ user.state }}
-
-
-
+
+ {{ user.state }}
+
+
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json
index d3d7322..c0c8a31 100644
--- a/src/assets/i18n/en.json
+++ b/src/assets/i18n/en.json
@@ -6,5 +6,7 @@
"User-view": "User View",
"Project": "Project",
"Partner": "Partner",
- "Analytics": "Analytics"
+ "Analytics": "Analytics",
+ "Deposit": "Deposit",
+ "Withdraw": "Withdraw"
}
diff --git a/src/assets/i18n/ko.json b/src/assets/i18n/ko.json
index 824846f..a012a72 100644
--- a/src/assets/i18n/ko.json
+++ b/src/assets/i18n/ko.json
@@ -6,5 +6,7 @@
"User-view": "사용자 상세보기",
"Project": "프로젝트",
"Partner": "파트너",
- "Analytics": "Analytics"
+ "Analytics": "Analytics",
+ "Deposit": "입금관리",
+ "Withdraw": "출금관리"
}