diff --git a/src/app/modules/admin/member/partner/components/list.component.html b/src/app/modules/admin/member/partner/components/list.component.html
index d4e86c4..cdf7201 100644
--- a/src/app/modules/admin/member/partner/components/list.component.html
+++ b/src/app/modules/admin/member/partner/components/list.component.html
@@ -30,8 +30,8 @@
-
- 0; else noPartner">
+
+ 0; else noPartner">
-
+
요율
-
- {{ partner.branchCount }}{{ partner.divisionCount }}
- {{ partner.officeCount }}{{ partner.storeCount
- }}{{ partner.memberCount }}
-
+
2 3 2 1 5
- {{ partner.signinId }}
+ {{ partner.getUsername() }}
- {{ partner.nickname }}
+ {{ partner.getNickname() }}
- {{ partner.phoneNumber }}
+ {{ partner.getMobilePhoneNumber() }}
- {{ partner.rank }}
+ {{ partner.getMemberClass()?.getName() }}
- LV{{ partner.level }}
+ LV{{ partner.getMemberLevel()?.getName() }}
- {{ partner.state }}
+ {{ partner.getState() }}
-
- {{ partner.accountHolder }}
-
+ 예금주
-
- {{ partner.calculateType }}
-
+ 정산종류
- 캐쉬{{ partner.ownCash }}
+ 캐쉬: 2,900
- 콤프{{ partner.ownComp }}P
+ 콤프: 3,000P
- 쿠폰{{ partner.ownCoupon }}
+ 쿠폰: 2,000
- 본인{{ partner.ownCharge }}
+ 본인: 2,900
- 하부{{ partner.bottomCharge }}
+ 하부 1,900
- 본인{{ partner.ownExchange }}
+ 본인: 2,900
- 하부{{ partner.bottomExchange }}
+ 하부: 2,800
- 본인{{ partner.ownRevenue }}
+ 본인: 2,900
- 하부{{ partner.bottomRevenue }}
+ 하부: 2,800
- {{ partner.registrationDate }}
+
+ {{ partner.getCreatedAt() | date: "yyyy/MM/dd" }}
diff --git a/src/app/modules/admin/member/partner/components/list.component.ts b/src/app/modules/admin/member/partner/components/list.component.ts
index be40978..cac2312 100644
--- a/src/app/modules/admin/member/partner/components/list.component.ts
+++ b/src/app/modules/admin/member/partner/components/list.component.ts
@@ -22,6 +22,7 @@ import {
map,
merge,
Observable,
+ of,
Subject,
switchMap,
takeUntil,
@@ -32,17 +33,18 @@ import { FuseConfirmationService } from '@fuse/services/confirmation';
import { Partner } from '../models/partner';
import { PartnerPagination } from '../models/partner-pagination';
import { PartnerService } from '../services/partner.service';
-import { Router } from '@angular/router';
+import { ActivatedRoute, Router } from '@angular/router';
import { RegistComposeComponent } from '../compose/regist-compose.component';
import { MatDialog } from '@angular/material/dialog';
import { SiteService } from 'app/modules/polyglot/domain/services/site.service';
import { Site } from 'app/modules/protobuf/models/domain/site_pb';
-import { MembeerService } from 'app/modules/polyglot/member/services/member.service';
+import { MemberService } from 'app/modules/polyglot/member/services/member.service';
import {
Member,
MemberModel,
} from 'app/modules/protobuf/models/member/member_pb';
+import { ListMembersResponse } from 'app/modules/protobuf/c2se/backend/member_pb';
@Component({
selector: 'partner-list',
templateUrl: './list.component.html',
@@ -81,7 +83,9 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
@ViewChild(MatSort) private _sort!: MatSort;
- partners$!: Observable
;
+ /* partners$!: Observable; */
+
+ listPartner$!: Observable;
isLoading = false;
searchInputControl = new FormControl();
@@ -99,8 +103,9 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
private _changeDetectorRef: ChangeDetectorRef,
private _fuseConfirmationService: FuseConfirmationService,
private _formBuilder: FormBuilder,
+ private _activatedRoute: ActivatedRoute,
private _partnerService: PartnerService,
- private __memberService: MembeerService,
+ private __memberService: MemberService,
private _siteService: SiteService,
private router: Router,
private _matDialog: MatDialog
@@ -126,9 +131,9 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
});
// Get the products
- this.partners$ = this._partnerService.partners$;
+ /* this.partners$ = this._partnerService.partners$; */
- this._siteService
+ /* this._siteService
.listSites()
.then((result) => {
this.sites = result.getSitesList();
@@ -141,7 +146,16 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
this.__members = result.getMembersList();
console.log('member list', this.__members);
})
- .catch((reson) => console.log(reson));
+ .catch((reson) => console.log(reson)); */
+ this._activatedRoute.data.subscribe((data) => {
+ let listMemberResult: ListMembersResponse.Result = data['listPartner'];
+ this.listPartner$ = of(listMemberResult.getMembersList());
+
+ /* console.log('dddd', listMemberResult.getMembersList()); */
+
+ // Mark for check
+ this._changeDetectorRef.markForCheck();
+ });
}
/**
diff --git a/src/app/modules/admin/member/partner/partner.routing.ts b/src/app/modules/admin/member/partner/partner.routing.ts
index f8a5c46..8b586e2 100644
--- a/src/app/modules/admin/member/partner/partner.routing.ts
+++ b/src/app/modules/admin/member/partner/partner.routing.ts
@@ -2,7 +2,10 @@ import { Route } from '@angular/router';
import { ListComponent } from './components/list.component';
-import { PartnersResolver } from './resolvers/partner.resolver';
+import {
+ PartnerListResolver,
+ PartnersResolver,
+} from './resolvers/partner.resolver';
export const partnerRoutes: Route[] = [
// {
@@ -14,7 +17,7 @@ export const partnerRoutes: Route[] = [
path: 'all',
component: ListComponent,
resolve: {
- Partners: PartnersResolver,
+ listPartner: PartnerListResolver,
},
},
{
diff --git a/src/app/modules/admin/member/partner/resolvers/partner.resolver.ts b/src/app/modules/admin/member/partner/resolvers/partner.resolver.ts
index 26b00c2..464dda2 100644
--- a/src/app/modules/admin/member/partner/resolvers/partner.resolver.ts
+++ b/src/app/modules/admin/member/partner/resolvers/partner.resolver.ts
@@ -5,6 +5,8 @@ import {
Router,
RouterStateSnapshot,
} from '@angular/router';
+import { MemberService } from 'app/modules/polyglot/member/services/member.service';
+import { ListMembersResponse } from 'app/modules/protobuf/c2se/backend/member_pb';
import { catchError, Observable, throwError } from 'rxjs';
import { Partner } from '../models/partner';
@@ -87,3 +89,33 @@ export class PartnersResolver implements Resolve {
return this._partnerService.getPartners();
}
}
+
+@Injectable({
+ providedIn: 'root',
+})
+export class PartnerListResolver implements Resolve {
+ /**
+ * Constructor
+ */
+ constructor(private __memberService: MemberService) {}
+
+ // -----------------------------------------------------------------------------------------------------
+ // @ Public methods
+ // -----------------------------------------------------------------------------------------------------
+
+ /**
+ * Resolver
+ *
+ * @param route
+ * @param state
+ */
+ resolve(
+ route: ActivatedRouteSnapshot,
+ state: RouterStateSnapshot
+ ):
+ | Observable
+ | Promise
+ | ListMembersResponse.Result {
+ return this.__memberService.listMembers();
+ }
+}
diff --git a/src/app/modules/polyglot/member/services/index.ts b/src/app/modules/polyglot/member/services/index.ts
index 654ad70..35f890a 100644
--- a/src/app/modules/polyglot/member/services/index.ts
+++ b/src/app/modules/polyglot/member/services/index.ts
@@ -1,6 +1,6 @@
import { Type } from '@angular/core';
import { IdentityService } from './identity.service';
-import { MembeerService } from './member.service';
+import { MemberService } from './member.service';
-export const SERVICES: Type[] = [IdentityService, MembeerService];
+export const SERVICES: Type[] = [IdentityService, MemberService];
diff --git a/src/app/modules/polyglot/member/services/member.service.ts b/src/app/modules/polyglot/member/services/member.service.ts
index e91988a..5aed537 100644
--- a/src/app/modules/polyglot/member/services/member.service.ts
+++ b/src/app/modules/polyglot/member/services/member.service.ts
@@ -19,7 +19,7 @@ import {
@Injectable({
providedIn: 'root',
})
-export class MembeerService {
+export class MemberService {
/**
* Constructor
*/