From 12826fb6b2ac275112e229a8d92b325409b0b522 Mon Sep 17 00:00:00 2001 From: Park Byung Eun Date: Mon, 18 Jul 2022 09:39:30 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=ED=8C=8C=ED=8A=B8=EB=84=88=EC=9D=BC?= =?UTF-8?q?=EC=9D=BC=ED=98=84=ED=99=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mock-api/apps/report/daily-partner/api.ts | 85 +-- .../apps/report/daily-partner/data.ts | 566 ++++++++++++++++- .../components/list.component.html | 578 +++++++----------- .../components/list.component.ts | 99 ++- .../daily-partner/daily-partner.module.ts | 2 + .../resolvers/daily-partner.resolver.ts | 3 +- .../services/daily-partner.service.ts | 21 +- 7 files changed, 837 insertions(+), 517 deletions(-) diff --git a/src/app/mock-api/apps/report/daily-partner/api.ts b/src/app/mock-api/apps/report/daily-partner/api.ts index 8acb3da..4981939 100644 --- a/src/app/mock-api/apps/report/daily-partner/api.ts +++ b/src/app/mock-api/apps/report/daily-partner/api.ts @@ -29,33 +29,16 @@ export class ReportDailyPartnerMockApi { // @ DailyPartners - GET // ----------------------------------------------------------------------------------------------------- this._fuseMockApiService - .onGet('api/apps/report/dailyPartner/dailyPartners', 300) + .onGet('api/apps/report/daily-partner', 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 dailyPartners let dailyPartners: any[] | null = cloneDeep(this._dailyPartners); - // Sort the dailyPartners - if (sort === 'sku' || sort === 'name' || sort === 'active') { - dailyPartners.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 { - dailyPartners.sort((a, b) => - order === 'asc' ? a[sort] - b[sort] : b[sort] - a[sort] - ); - } - // If search exists... if (search) { // Filter the dailyPartners @@ -66,47 +49,11 @@ export class ReportDailyPartnerMockApi { ); } - // Paginate - Start - const dailyPartnersLength = dailyPartners.length; - - // Calculate pagination details - const begin = page * size; - const end = Math.min(size * (page + 1), dailyPartnersLength); - const lastPage = Math.max(Math.ceil(dailyPartnersLength / size), 1); - - // Prepare the pagination object - let pagination = {}; - - // If the requested page number is bigger than - // the last possible page number, return null for - // dailyPartners but also send the last possible page so - // the app can navigate to there - if (page > lastPage) { - dailyPartners = null; - pagination = { - lastPage, - }; - } else { - // Paginate the results by size - dailyPartners = dailyPartners.slice(begin, end); - - // Prepare the pagination mock-api - pagination = { - length: dailyPartnersLength, - size: size, - page: page, - lastPage: lastPage, - startIndex: begin, - endIndex: end - 1, - }; - } - // Return the response return [ 200, { dailyPartners, - pagination, }, ]; }); @@ -114,27 +61,27 @@ export class ReportDailyPartnerMockApi { // ----------------------------------------------------------------------------------------------------- // @ DailyPartner - GET // ----------------------------------------------------------------------------------------------------- - this._fuseMockApiService - .onGet('api/apps/report/daily-partner/daily-partner') - .reply(({ request }) => { - // Get the id from the params - const id = request.params.get('id'); + // this._fuseMockApiService + // .onGet('api/apps/report/daily-partner') + // .reply(({ request }) => { + // // Get the id from the params + // const id = request.params.get('id'); - // Clone the dailyPartners - const dailyPartners = cloneDeep(this._dailyPartners); + // // Clone the dailyPartners + // const dailyPartners = cloneDeep(this._dailyPartners); - // Find the dailyPartner - const dailyPartner = dailyPartners.find((item: any) => item.id === id); + // // Find the dailyPartner + // const dailyPartner = dailyPartners.find((item: any) => item.id === id); - // Return the response - return [200, dailyPartner]; - }); + // // Return the response + // return [200, dailyPartner]; + // }); // ----------------------------------------------------------------------------------------------------- // @ DailyPartner - POST // ----------------------------------------------------------------------------------------------------- this._fuseMockApiService - .onPost('api/apps/report/daily-partner/daily-partner') + .onPost('api/apps/report/daily-partner') .reply(() => { // Generate a new dailyPartner const newDailyPartner = { @@ -170,7 +117,7 @@ export class ReportDailyPartnerMockApi { // @ DailyPartner - PATCH // ----------------------------------------------------------------------------------------------------- this._fuseMockApiService - .onPatch('api/apps/report/daily-partner/daily-partner') + .onPatch('api/apps/report/daily-partner') .reply(({ request }) => { // Get the id and dailyPartner const id = request.body.id; @@ -202,7 +149,7 @@ export class ReportDailyPartnerMockApi { // @ DailyPartner - DELETE // ----------------------------------------------------------------------------------------------------- this._fuseMockApiService - .onDelete('api/apps/report/daily-partner/daily-partner') + .onDelete('api/apps/report/daily-partner') .reply(({ request }) => { // Get the id const id = request.params.get('id'); diff --git a/src/app/mock-api/apps/report/daily-partner/data.ts b/src/app/mock-api/apps/report/daily-partner/data.ts index 183962c..2fd6c65 100644 --- a/src/app/mock-api/apps/report/daily-partner/data.ts +++ b/src/app/mock-api/apps/report/daily-partner/data.ts @@ -1,33 +1,545 @@ /* eslint-disable */ export const dailyPartners = [ + // { + // id: 'on00', + // totalPartnerCount: '5', + // totalHoldingMoney: 303675, + // totalComp: 108933, + // total: 412608, + // branchCount: 1, + // divisionCount: 1, + // officeCount: 1, + // storeCount: 1, + // memberCount: 1, + // nickname: 'on00', + // accountHolder: '11', + // phoneNumber: '010-1111-1111', + // calculateType: '롤링', + // ownCash: 50000, + // ownComp: 1711, + // ownCoupon: 50000, + // gameMoney: 0, + // todayComp: 0, + // totalDeposit: 0, + // totalWithdraw: 0, + // balance: 0, + // registDate: '2022-06-12 15:38', + // finalSigninDate: '', + // ip: '', + // state: '정상', + // note: '', + // }, { - id: 'on00', - totalPartnerCount: '5', - totalHoldingMoney: 303675, - totalComp: 108933, - total: 412608, - branchCount: 1, - divisionCount: 1, - officeCount: 1, - storeCount: 1, - memberCount: 1, - nickname: 'on00', - accountHolder: '11', - phoneNumber: '010-1111-1111', - calculateType: '롤링', - ownCash: 50000, - ownComp: 1711, - ownCoupon: 50000, - gameMoney: 0, - todayComp: 0, - totalDeposit: 0, - totalWithdraw: 0, - balance: 0, - registDate: '2022-06-12 15:38', - finalSigninDate: '', - ip: '', - state: '정상', - note: '', + user: { + id: '1', + signinId: 'kgon1', + type: '본사', + parentId: 0, + }, + bank: { + users: { + deposit: '0', + withdraw: '0', + netProfit: 0, + }, + parthners: { + deposit: '0', + withdraw: '0', + netProfit: '0', + }, + totalNetProfit: '0', + passiveMoney: '0', + passiveComp: '0', + casino: { + betting: '382,000', + bettingTie: '33,000', + bettingCancel: '0', + bettingValid: '351,000', + bettingWin: '357,050', + winLoss: '26,950', + commission: { + total: '7,020', + partner: '5,265', + me: '1,755', + }, + betWinSettle: '19,930', + }, + slot: { + betting: '382,000', + bettingCancel: '0', + bettingValid: '351,000', + bettingWin: '357,050', + winLoss: '26,950', + commission: { + total: '7,020', + partner: '5,265', + me: '1,755', + }, + betWinSettle: '19,930', + }, + powerball: { + betting: '0', + bettingCancel: '0', + bettingValid: '0', + bettingWin: '0', + winLoss: '0', + commission: { + total: '0', + partner: '0', + me: '0', + }, + betWinSettle: '19,930', + }, + }, + totalBetSettle: '119,400', + }, + { + user: { + id: '2', + signinId: 'kgon2', + type: '대본', + parentId: 1, + }, + bank: { + users: { + deposit: '0', + withdraw: '0', + netProfit: 0, + }, + parthners: { + deposit: '0', + withdraw: '0', + netProfit: '0', + }, + totalNetProfit: '0', + passiveMoney: '0', + passiveComp: '0', + casino: { + betting: '382,000', + bettingTie: '33,000', + bettingCancel: '0', + bettingValid: '351,000', + bettingWin: '357,050', + winLoss: '26,950', + commission: { + total: '7,020', + partner: '5,265', + me: '1,755', + }, + betWinSettle: '19,930', + }, + slot: { + betting: '382,000', + bettingCancel: '0', + bettingValid: '351,000', + bettingWin: '357,050', + winLoss: '26,950', + commission: { + total: '7,020', + partner: '5,265', + me: '1,755', + }, + betWinSettle: '19,930', + }, + powerball: { + betting: '0', + bettingCancel: '0', + bettingValid: '0', + bettingWin: '0', + winLoss: '0', + commission: { + total: '0', + partner: '0', + me: '0', + }, + betWinSettle: '19,930', + }, + }, + totalBetSettle: '119,400', + }, + { + user: { + id: '3', + signinId: 'kgon1', + type: '본사', + parentId: 2, + }, + bank: { + users: { + deposit: '0', + withdraw: '0', + netProfit: 0, + }, + parthners: { + deposit: '0', + withdraw: '0', + netProfit: '0', + }, + totalNetProfit: '0', + passiveMoney: '0', + passiveComp: '0', + casino: { + betting: '382,000', + bettingTie: '33,000', + bettingCancel: '0', + bettingValid: '351,000', + bettingWin: '357,050', + winLoss: '26,950', + commission: { + total: '7,020', + partner: '5,265', + me: '1,755', + }, + betWinSettle: '19,930', + }, + slot: { + betting: '382,000', + bettingCancel: '0', + bettingValid: '351,000', + bettingWin: '357,050', + winLoss: '26,950', + commission: { + total: '7,020', + partner: '5,265', + me: '1,755', + }, + betWinSettle: '19,930', + }, + powerball: { + betting: '0', + bettingCancel: '0', + bettingValid: '0', + bettingWin: '0', + winLoss: '0', + commission: { + total: '0', + partner: '0', + me: '0', + }, + betWinSettle: '19,930', + }, + }, + totalBetSettle: '119,400', + }, + { + user: { + id: '4', + signinId: 'kgon1', + type: '부본', + parentId: 3, + }, + bank: { + users: { + deposit: '0', + withdraw: '0', + netProfit: 0, + }, + parthners: { + deposit: '0', + withdraw: '0', + netProfit: '0', + }, + totalNetProfit: '0', + passiveMoney: '0', + passiveComp: '0', + casino: { + betting: '382,000', + bettingTie: '33,000', + bettingCancel: '0', + bettingValid: '351,000', + bettingWin: '357,050', + winLoss: '26,950', + commission: { + total: '7,020', + partner: '5,265', + me: '1,755', + }, + betWinSettle: '19,930', + }, + slot: { + betting: '382,000', + bettingCancel: '0', + bettingValid: '351,000', + bettingWin: '357,050', + winLoss: '26,950', + commission: { + total: '7,020', + partner: '5,265', + me: '1,755', + }, + betWinSettle: '19,930', + }, + powerball: { + betting: '0', + bettingCancel: '0', + bettingValid: '0', + bettingWin: '0', + winLoss: '0', + commission: { + total: '0', + partner: '0', + me: '0', + }, + betWinSettle: '19,930', + }, + }, + totalBetSettle: '119,400', + }, + { + user: { + id: '5', + signinId: 'kgon1', + type: '본사', + parentId: 0, + }, + bank: { + users: { + deposit: '0', + withdraw: '0', + netProfit: 0, + }, + parthners: { + deposit: '0', + withdraw: '0', + netProfit: '0', + }, + totalNetProfit: '0', + passiveMoney: '0', + passiveComp: '0', + casino: { + betting: '382,000', + bettingTie: '33,000', + bettingCancel: '0', + bettingValid: '351,000', + bettingWin: '357,050', + winLoss: '26,950', + commission: { + total: '7,020', + partner: '5,265', + me: '1,755', + }, + betWinSettle: '19,930', + }, + slot: { + betting: '382,000', + bettingCancel: '0', + bettingValid: '351,000', + bettingWin: '357,050', + winLoss: '26,950', + commission: { + total: '7,020', + partner: '5,265', + me: '1,755', + }, + betWinSettle: '19,930', + }, + powerball: { + betting: '0', + bettingCancel: '0', + bettingValid: '0', + bettingWin: '0', + winLoss: '0', + commission: { + total: '0', + partner: '0', + me: '0', + }, + betWinSettle: '19,930', + }, + }, + totalBetSettle: '119,400', + }, + { + user: { + id: '6', + signinId: 'kgon1', + type: '본사', + parentId: 0, + }, + bank: { + users: { + deposit: '0', + withdraw: '0', + netProfit: 0, + }, + parthners: { + deposit: '0', + withdraw: '0', + netProfit: '0', + }, + totalNetProfit: '0', + passiveMoney: '0', + passiveComp: '0', + casino: { + betting: '382,000', + bettingTie: '33,000', + bettingCancel: '0', + bettingValid: '351,000', + bettingWin: '357,050', + winLoss: '26,950', + commission: { + total: '7,020', + partner: '5,265', + me: '1,755', + }, + betWinSettle: '19,930', + }, + slot: { + betting: '382,000', + bettingCancel: '0', + bettingValid: '351,000', + bettingWin: '357,050', + winLoss: '26,950', + commission: { + total: '7,020', + partner: '5,265', + me: '1,755', + }, + betWinSettle: '19,930', + }, + powerball: { + betting: '0', + bettingCancel: '0', + bettingValid: '0', + bettingWin: '0', + winLoss: '0', + commission: { + total: '0', + partner: '0', + me: '0', + }, + betWinSettle: '19,930', + }, + }, + totalBetSettle: '119,400', + }, + { + user: { + id: '7', + signinId: 'kgon1', + type: '본사', + parentId: 0, + }, + bank: { + users: { + deposit: '0', + withdraw: '0', + netProfit: 0, + }, + parthners: { + deposit: '0', + withdraw: '0', + netProfit: '0', + }, + totalNetProfit: '0', + passiveMoney: '0', + passiveComp: '0', + casino: { + betting: '382,000', + bettingTie: '33,000', + bettingCancel: '0', + bettingValid: '351,000', + bettingWin: '357,050', + winLoss: '26,950', + commission: { + total: '7,020', + partner: '5,265', + me: '1,755', + }, + betWinSettle: '19,930', + }, + slot: { + betting: '382,000', + bettingCancel: '0', + bettingValid: '351,000', + bettingWin: '357,050', + winLoss: '26,950', + commission: { + total: '7,020', + partner: '5,265', + me: '1,755', + }, + betWinSettle: '19,930', + }, + powerball: { + betting: '0', + bettingCancel: '0', + bettingValid: '0', + bettingWin: '0', + winLoss: '0', + commission: { + total: '0', + partner: '0', + me: '0', + }, + betWinSettle: '19,930', + }, + }, + totalBetSettle: '119,400', + }, + { + user: { + id: '8', + signinId: 'kgon1', + type: '본사', + parentId: 0, + }, + bank: { + users: { + deposit: '0', + withdraw: '0', + netProfit: 0, + }, + parthners: { + deposit: '0', + withdraw: '0', + netProfit: '0', + }, + totalNetProfit: '0', + passiveMoney: '0', + passiveComp: '0', + casino: { + betting: '382,000', + bettingTie: '33,000', + bettingCancel: '0', + bettingValid: '351,000', + bettingWin: '357,050', + winLoss: '26,950', + commission: { + total: '7,020', + partner: '5,265', + me: '1,755', + }, + betWinSettle: '19,930', + }, + slot: { + betting: '382,000', + bettingCancel: '0', + bettingValid: '351,000', + bettingWin: '357,050', + winLoss: '26,950', + commission: { + total: '7,020', + partner: '5,265', + me: '1,755', + }, + betWinSettle: '19,930', + }, + powerball: { + betting: '0', + bettingCancel: '0', + bettingValid: '0', + bettingWin: '0', + winLoss: '0', + commission: { + total: '0', + partner: '0', + me: '0', + }, + betWinSettle: '19,930', + }, + }, + totalBetSettle: '119,400', }, ]; 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 9a2c8e0..13b4efb 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 @@ -1,356 +1,234 @@ -
- -
- -
- -
- -
파트너일일현황
- -
- - - - - - - 40 - 60 - 80 - 100 - - - - - LV.1 - LV.2 - LV.3 - LV.4 - - - - - 정상 - 대기 - 탈퇴 - 휴면 - 블랙 - 정지 - - - - - 카지노제한 - 슬롯제한 - - - - - 계좌입금 - - - - - 카지노콤프 - 슬롯콤프 - 배팅콤프 - 첫충콤프 - - - - - - - - - - - - -
-
- - -
- -
- - -
- -
- - - - - - - - - - - - - - - - - - - - -
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- - -
-
- - +
+
+
+
+
- There are no dailyPartners! +
+ 대본별 계좌 설정 +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
정보 + {{ __testData(info) }} + + {{ info?.user.signinId }} + + + {{ info?.user.type }} + + 매출보기 + +회원입출 + {{ info?.bank.users.deposit }} + {{ info?.bank.users.withdraw }} + {{ info?.bank.users.netProfit }} + 파트너입출 + {{ info?.bank.parthners.deposit }} + {{ info?.bank.parthners.withdraw }} + {{ info?.bank.parthners.netProfit }} + 총손익 + {{ info?.bank.totalNetProfit }} + 수동머니 + {{ info?.bank.passiveMoney }} + 수동콤프 + {{ info?.bank.passiveComp }} + 배팅 + {{ info?.bank.casino.betting }} + 당첨 + {{ info?.bank.casino.bettingWin }} + 윈로스(A) + {{ info?.bank.casino.winLoss }} + 수수료(B) + {{ info?.bank.casino.commission.total }} + 벳윈정산(A-B) + {{ info?.bank.casino.betWinSettle }} + 배팅 + {{ info?.bank.slot.betting }} + 당첨 + {{ info?.bank.slot.bettingWin }} + 윈로스(D) + {{ info?.bank.slot.winLoss }} + 수수료(E) + {{ info?.bank.slot.commission.total }} + 벳윈정산(A-B) + {{ info?.bank.slot.commission.betWinSettle }} + 배팅 + {{ info?.bank.powerball.betting }} + 당첨 + {{ info?.bank.powerball.bettingWin }} + 윈로스(G) + {{ info?.bank.powerball.winLoss }} + 수수료(H) + {{ info?.bank.powerball.commission.total }} + 벳윈정산(G-H) + {{ info?.bank.powerball.commission.betWinSettle }} + 총벳윈정산 + {{ info?.totalBetSettle }} + + Second group +
+
+
- +
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 c0b7e08..5c40732 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 @@ -14,9 +14,7 @@ import { 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, @@ -26,6 +24,9 @@ import { switchMap, takeUntil, } from 'rxjs'; + +import { MatTableDataSource } from '@angular/material/table'; + import { fuseAnimations } from '@fuse/animations'; import { FuseConfirmationService } from '@fuse/services/confirmation'; @@ -63,17 +64,41 @@ import { Router } from '@angular/router'; animations: fuseAnimations, }) export class ListComponent implements OnInit, AfterViewInit, OnDestroy { - @ViewChild(MatPaginator) private _paginator!: MatPaginator; - @ViewChild(MatSort) private _sort!: MatSort; - - dailyPartners$!: Observable; + dailyPartners$!: Observable; users$!: Observable; isLoading = false; searchInputControl = new FormControl(); selectedDailyPartner?: DailyPartner; - pagination?: DailyPartnerPagination; + dailyParthnerForm!: FormGroup; + + dailyPartnerDataSource: MatTableDataSource = new MatTableDataSource(); + dailyPartnerTableColumns: string[] = [ + 'partnerInfo', + 'expansionBtn', + 'depositDetails', + 'depositPartnerDetails', + 'totalProfit', + 'passiveMoney', + 'passiveComp', + 'casinoBetDetatils', + 'casinoWinningDetatils', + 'casinoWinLoss', + 'casinoCommission', + 'casinoSettle', + 'slotBetDetails', + 'slotWinningDetatils', + 'slotWinLoss', + 'slotCommission', + 'slotSettle', + 'powerballBetDetails', + 'powerballWinningDetatils', + 'powerballWinLoss', + 'powerballCommission', + 'powerballSettle', + 'totalBetWinSettle', + ]; private _unsubscribeAll: Subject = new Subject(); /** @@ -95,14 +120,19 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { * On init */ ngOnInit(): void { + this.dailyParthnerForm = this._formBuilder.group({ + bankName: [''], + accountNumber: [''], + accountHolder: [''], + }); // Get the pagination - this._dailyPartnerService.pagination$ + this._dailyPartnerService + .getDailyPartners() .pipe(takeUntil(this._unsubscribeAll)) - .subscribe((pagination: DailyPartnerPagination | undefined) => { - // Update the pagination - this.pagination = pagination; - + .subscribe((dailyPartners: any) => { // Mark for check + this.dailyPartnerDataSource = dailyPartners.dailyPartners; + console.log(dailyPartners); this._changeDetectorRef.markForCheck(); }); @@ -113,45 +143,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { /** * After view init */ - ngAfterViewInit(): void { - if (this._sort && this._paginator) { - // Set the initial sort - this._sort.sort({ - id: 'name', - start: 'asc', - disableClear: true, - }); - - // Mark for check - this._changeDetectorRef.markForCheck(); - - // If the dailyPartner 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._dailyPartnerService.getDailyPartners( - this._paginator.pageIndex, - this._paginator.pageSize, - this._sort.active, - this._sort.direction - ); - }), - map(() => { - this.isLoading = false; - }) - ) - .subscribe(); - } - } + ngAfterViewInit(): void {} /** * On destroy @@ -195,4 +187,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { __trackByFn(index: number, item: any): any { return item.id || index; } + __testData(info: any): any { + console.log(info); + } } diff --git a/src/app/modules/admin/report/daily-partner/daily-partner.module.ts b/src/app/modules/admin/report/daily-partner/daily-partner.module.ts index 49aa562..3db0ac6 100644 --- a/src/app/modules/admin/report/daily-partner/daily-partner.module.ts +++ b/src/app/modules/admin/report/daily-partner/daily-partner.module.ts @@ -15,6 +15,7 @@ import { MatGridListModule } from '@angular/material/grid-list'; import { MatSlideToggleModule } from '@angular/material/slide-toggle'; import { MatRadioModule } from '@angular/material/radio'; import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatTableModule } from '@angular/material/table'; import { TranslocoModule } from '@ngneat/transloco'; @@ -45,6 +46,7 @@ import { dailyPartnerRoutes } from './daily-partner.routing'; MatSlideToggleModule, MatRadioModule, MatCheckboxModule, + MatTableModule, ], }) export class DailyPartnerModule {} diff --git a/src/app/modules/admin/report/daily-partner/resolvers/daily-partner.resolver.ts b/src/app/modules/admin/report/daily-partner/resolvers/daily-partner.resolver.ts index dd62c7d..f9ed4e7 100644 --- a/src/app/modules/admin/report/daily-partner/resolvers/daily-partner.resolver.ts +++ b/src/app/modules/admin/report/daily-partner/resolvers/daily-partner.resolver.ts @@ -81,9 +81,8 @@ export class DailyPartnersResolver implements Resolve { route: ActivatedRouteSnapshot, state: RouterStateSnapshot ): Observable<{ - pagination: DailyPartnerPagination; dailyPartners: DailyPartner[]; }> { - return this._dailyPartnerService.getDailyPartners(); + return this._dailyPartnerService.getDailyPartners(''); } } diff --git a/src/app/modules/admin/report/daily-partner/services/daily-partner.service.ts b/src/app/modules/admin/report/daily-partner/services/daily-partner.service.ts index a52fdab..92cefa6 100644 --- a/src/app/modules/admin/report/daily-partner/services/daily-partner.service.ts +++ b/src/app/modules/admin/report/daily-partner/services/daily-partner.service.ts @@ -74,32 +74,19 @@ export class DailyPartnerService { * @param order * @param search */ - getDailyPartners( - page: number = 0, - size: number = 10, - sort: string = 'name', - order: 'asc' | 'desc' | '' = 'asc', - search: string = '' - ): Observable<{ - pagination: DailyPartnerPagination; - dailyPartners: DailyPartner[]; + getDailyPartners(search: string = ''): Observable<{ + dailyPartners: any; }> { return this._httpClient .get<{ - pagination: DailyPartnerPagination; - dailyPartners: DailyPartner[]; - }>('api/apps/report/daily/dailys', { + dailyPartners: any; + }>('api/apps/report/daily-partner', { params: { - page: '' + page, - size: '' + size, - sort, - order, search, }, }) .pipe( tap((response) => { - this.__pagination.next(response.pagination); this.__dailyPartners.next(response.dailyPartners); }) ); From bffa0d818c3eaed15080d8b4e277bab388bc27d9 Mon Sep 17 00:00:00 2001 From: Park Byung Eun Date: Mon, 18 Jul 2022 09:40:29 +0000 Subject: [PATCH 2/2] bug fix --- .../admin/report/daily-partner/components/list.component.html | 1 - 1 file changed, 1 deletion(-) 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 13b4efb..a51a62f 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 @@ -20,7 +20,6 @@ 정보 - {{ __testData(info) }} {{ info?.user.signinId }}