From c75347da0475b031d6fa9911b2838d1048f32801 Mon Sep 17 00:00:00 2001 From: JUNG YI DAM Date: Sun, 4 Sep 2022 05:45:02 +0000 Subject: [PATCH] =?UTF-8?q?=ED=8C=8C=ED=8A=B8=EB=84=88=20=EC=9E=85?= =?UTF-8?q?=EC=B6=9C=EA=B8=88=20=EC=A0=95=EC=82=B0=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 | 511 ++++++++++-------- .../components/list.component.ts | 67 +++ .../partner-calculate.module.ts | 4 + .../components/list.component.ts | 4 +- 4 files changed, 362 insertions(+), 224 deletions(-) diff --git a/src/app/modules/admin/bank/partner-calculate/components/list.component.html b/src/app/modules/admin/bank/partner-calculate/components/list.component.html index 02ff295..20ff08b 100644 --- a/src/app/modules/admin/bank/partner-calculate/components/list.component.html +++ b/src/app/modules/admin/bank/partner-calculate/components/list.component.html @@ -1,33 +1,297 @@
- + + + + +
+ +
+
+
+ 파트너 입출금 정산 +
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+ {{ panel.title }} +
+
+ {{ panel.description }} +
+
+
+
+
+
+ + + + +
+ +
+ + + + +
+ {{ getPanelInfo(selectedPanel).title }} +
+
+ + +
+ + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
번호 + + {{ info.partnerDepositIdx }} + + + 아이디(닉네임) + + {{ info.partnerDepositId }} + 입금자이름 + {{ info.nameOfDepositer }} + 결제금액 + {{ info.partnerWithdrawAmountOfPayment }} + 신청일 + {{ + info.partnerWithdrawregistrationDate + | date: "yyyy/MM/dd HH:mm" + }} + 확인일 + {{ + info.partnerWithdrawConfirmDate + | date: "yyyy/MM/dd HH:mm" + }} +
+
+
+ +
+ There are no data! +
+
+
+
+ +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
번호 + + {{ info.partnerDepositIdx }} + + + 아이디(닉네임) + + {{ info.partnerDepositId }} + 입금자이름 + {{ info.nameOfDepositer }} + 결제금액 + {{ info.partnerWithdrawAmountOfPayment }} + 신청일 + {{ + info.partnerWithdrawregistrationDate + | date: "yyyy/MM/dd HH:mm" + }} + 확인일 + {{ + info.partnerWithdrawConfirmDate + | date: "yyyy/MM/dd HH:mm" + }} +
+
+
+ +
+ There are no data! +
+
+
+
+
+
+
+
+
+
+ +
- -
- -
- -
파트너 입출금 정산
- -
- - -
-
- -
-
- - - - - 아이디 - 닉네임 - - - - - - -
- - -
파트너입금
-
- -
- - -
- -
-
번호
-
- 아이디 -
- 닉네임 -
-
등급
- - - -
- - - -
-
- {{ partnerCalculate.partnerDepositIdx }} -
-
- {{ partnerCalculate.partnerDepositId }} -
- {{ partnerCalculate.partnerDepositNickname }} -
-
{{ partnerCalculate.partnerDepositRank }}
- - - -
-
-
합계   930,000원
-
-
-
-
- - -
- There are no Data! -
-
-
-
- -
파트너출금
-
- -
- - -
- -
-
번호
-
- 아이디 -
- 닉네임 -
-
등급
- - - -
- - - -
-
- {{ partnerCalculate.partnerWithdrawIdx }} -
-
- {{ partnerCalculate.partnerWithdrawId }} -
- {{ partnerCalculate.partnerWithdrawNickname }} -
-
{{ partnerCalculate.partnerWithdrawRank }}
- - - -
-
-
합계   190,000원
-
-
- - -
-
- - -
- There are no Data! -
-
-
-
- +
diff --git a/src/app/modules/admin/bank/partner-calculate/components/list.component.ts b/src/app/modules/admin/bank/partner-calculate/components/list.component.ts index 9459770..4ad9bbd 100644 --- a/src/app/modules/admin/bank/partner-calculate/components/list.component.ts +++ b/src/app/modules/admin/bank/partner-calculate/components/list.component.ts @@ -32,6 +32,8 @@ import { FuseConfirmationService } from '@fuse/services/confirmation'; import { PartnerCalculate } from '../models/partner-calculate'; import { PartnerCalculatePagination } from '../models/partner-calculate-pagination'; import { PartnerCalculateService } from '../services/partner-calculate.service'; +import { MatDrawer } from '@angular/material/sidenav'; +import { MatTableDataSource } from '@angular/material/table'; @Component({ selector: 'partner-calculate-list', @@ -68,14 +70,33 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { @ViewChild(MatPaginator) private _paginator!: MatPaginator; @ViewChild(MatSort) private _sort!: MatSort; + @ViewChild('drawer') drawer!: MatDrawer; + drawerMode: 'over' | 'side' = 'side'; + drawerOpened: boolean = true; + + partnerDepositCalculatesDataSource: MatTableDataSource = + new MatTableDataSource(); + partnerCalculates$!: Observable; + panels: any[] = []; + selectedPanel: string = 'partnerDepositList'; + __isSearchOpened = false; isLoading = false; searchInputControl = new FormControl(); selectedPartnerCalculate?: PartnerCalculate; pagination?: PartnerCalculatePagination; + partnerDepositTableColumns: string[] = [ + 'no', + 'username', + 'accountHolder', + 'amount', + 'createdAt', + 'stateChangedAt', + ]; + private _unsubscribeAll: Subject = new Subject(); /** @@ -108,7 +129,30 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { }); // Get the products + this._partnerCalculateService.partnerCalculates$ + .pipe(takeUntil(this._unsubscribeAll)) + .subscribe((result: PartnerCalculate[] | undefined) => { + if (!result) { + return; + } + this.partnerDepositCalculatesDataSource.data = result; + }); this.partnerCalculates$ = this._partnerCalculateService.partnerCalculates$; + + this.panels = [ + { + id: 'partnerDepositList', + icon: 'account-cash', + title: '파트너입금 내역', + description: 'Manage your public profile and private information', + }, + { + id: 'partnerWithdrawList', + icon: 'account-cash', + title: '파트너출금 내역', + description: 'Manage your public profile and private information', + }, + ]; } /** @@ -167,6 +211,29 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { // @ Public methods // ----------------------------------------------------------------------------------------------------- + /** + * Get the details of the panel + * + * @param id + */ + getPanelInfo(id: string): any { + return this.panels.find((panel) => panel.id === id); + } + + /** + * Navigate to the panel + * + * @param panel + */ + goToPanel(panel: string): void { + this.selectedPanel = panel; + + // Close the drawer on 'over' mode + if (this.drawerMode === 'over') { + this.drawer.close(); + } + } + // ----------------------------------------------------------------------------------------------------- // @ Private methods // ----------------------------------------------------------------------------------------------------- diff --git a/src/app/modules/admin/bank/partner-calculate/partner-calculate.module.ts b/src/app/modules/admin/bank/partner-calculate/partner-calculate.module.ts index 0791a38..9cddea1 100644 --- a/src/app/modules/admin/bank/partner-calculate/partner-calculate.module.ts +++ b/src/app/modules/admin/bank/partner-calculate/partner-calculate.module.ts @@ -11,6 +11,8 @@ import { MatSortModule } from '@angular/material/sort'; import { MatSelectModule } from '@angular/material/select'; import { MatDatepickerModule } from '@angular/material/datepicker'; import { MatMomentDateModule } from '@angular/material-moment-adapter'; +import { MatSidenavModule } from '@angular/material/sidenav'; +import { MatTableModule } from '@angular/material/table'; import { TranslocoModule } from '@ngneat/transloco'; @@ -37,6 +39,8 @@ import { partnerCalculateRoutes } from './partner-calculate.routing'; MatSelectModule, MatDatepickerModule, MatMomentDateModule, + MatSidenavModule, + MatTableModule, ], }) export class PartnerCalculateModule {} diff --git a/src/app/modules/admin/bank/web-calculate/components/list.component.ts b/src/app/modules/admin/bank/web-calculate/components/list.component.ts index 795ea10..9812d80 100644 --- a/src/app/modules/admin/bank/web-calculate/components/list.component.ts +++ b/src/app/modules/admin/bank/web-calculate/components/list.component.ts @@ -142,13 +142,13 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { this.panels = [ { id: 'webDepositList', - icon: 'heroicons_outline:user-circle', + icon: 'cash-multiple', title: '웹입금 내역', description: 'Manage your public profile and private information', }, { id: 'webWithdrawList', - icon: 'heroicons_outline:user-circle', + icon: 'cash-multiple', title: '웹출금 내역', description: 'Manage your public profile and private information', },