diff --git a/src/app/app.routing.ts b/src/app/app.routing.ts
index d527406..b7eb216 100644
--- a/src/app/app.routing.ts
+++ b/src/app/app.routing.ts
@@ -178,48 +178,48 @@ export const appRoutes: Route[] = [
(m: any) => m.PartnerModule
),
},
- {
- path: 'partner-mainoffice',
- loadChildren: () =>
- import(
- 'app/modules/admin/member/partner-mainoffice/partner-mainoffice.module'
- ).then((m: any) => m.PartnerMainofficeModule),
- },
- {
- path: 'partner-branch',
- loadChildren: () =>
- import(
- 'app/modules/admin/member/partner-branch/partner-branch.module'
- ).then((m: any) => m.PartnerBranchModule),
- },
- {
- path: 'partner-division',
- loadChildren: () =>
- import(
- 'app/modules/admin/member/partner-division/partner-division.module'
- ).then((m: any) => m.PartnerDivisionModule),
- },
- {
- path: 'partner-office',
- loadChildren: () =>
- import(
- 'app/modules/admin/member/partner-office/partner-office.module'
- ).then((m: any) => m.PartnerOfficeModule),
- },
- {
- path: 'partner-store',
- loadChildren: () =>
- import(
- 'app/modules/admin/member/partner-store/partner-store.module'
- ).then((m: any) => m.PartnerStoreModule),
- },
- {
- path: 'partner-recommendation',
- loadChildren: () =>
- import(
- 'app/modules/admin/member/partner-recommendation/partner-recommendation.module'
- ).then((m: any) => m.PartnerRecommendationModule),
- },
+ // {
+ // path: 'partner-mainoffice',
+ // loadChildren: () =>
+ // import(
+ // 'app/modules/admin/member/partner-mainoffice/partner-mainoffice.module'
+ // ).then((m: any) => m.PartnerMainofficeModule),
+ // },
+ // {
+ // path: 'partner-branch',
+ // loadChildren: () =>
+ // import(
+ // 'app/modules/admin/member/partner-branch/partner-branch.module'
+ // ).then((m: any) => m.PartnerBranchModule),
+ // },
+ // {
+ // path: 'partner-division',
+ // loadChildren: () =>
+ // import(
+ // 'app/modules/admin/member/partner-division/partner-division.module'
+ // ).then((m: any) => m.PartnerDivisionModule),
+ // },
+ // {
+ // path: 'partner-office',
+ // loadChildren: () =>
+ // import(
+ // 'app/modules/admin/member/partner-office/partner-office.module'
+ // ).then((m: any) => m.PartnerOfficeModule),
+ // },
+ // {
+ // path: 'partner-store',
+ // loadChildren: () =>
+ // import(
+ // 'app/modules/admin/member/partner-store/partner-store.module'
+ // ).then((m: any) => m.PartnerStoreModule),
+ // },
+ // {
+ // path: 'partner-recommendation',
+ // loadChildren: () =>
+ // import(
+ // 'app/modules/admin/member/partner-recommendation/partner-recommendation.module'
+ // ).then((m: any) => m.PartnerRecommendationModule),
+ // },
{
path: 'coupon',
loadChildren: () =>
diff --git a/src/app/mock-api/common/navigation/data.ts b/src/app/mock-api/common/navigation/data.ts
index 25b1596..cfab792 100644
--- a/src/app/mock-api/common/navigation/data.ts
+++ b/src/app/mock-api/common/navigation/data.ts
@@ -68,54 +68,63 @@ export const defaultNavigation: FuseNavigationItem[] = [
link: '/member/current-user',
},
{
- id: 'member.partner',
- title: 'All Partner',
- type: 'basic',
- icon: 'heroicons_outline:academic-cap',
- link: '/member/partner',
- },
- {
- id: 'member.partner-mainoffice',
- title: 'Partner Mainoffice',
- type: 'basic',
- icon: 'heroicons_outline:academic-cap',
- link: '/member/partner-mainoffice',
- },
- {
- id: 'member.partner-branch',
- title: 'Partner Branch',
- type: 'basic',
- icon: 'heroicons_outline:academic-cap',
- link: '/member/partner-branch',
- },
- {
- id: 'member.partner-division',
- title: 'Partner Division',
- type: 'basic',
- icon: 'heroicons_outline:academic-cap',
- link: '/member/partner-division',
- },
- {
- id: 'member.partner-office',
- title: 'Partner Office',
- type: 'basic',
- icon: 'heroicons_outline:academic-cap',
- link: '/member/partner-office',
- },
- {
- id: 'member.partner-store',
- title: 'Partner Store',
- type: 'basic',
- icon: 'heroicons_outline:academic-cap',
- link: '/member/partner-store',
- },
- {
- id: 'member.partner-recommendation',
- title: 'Partner Recommendation',
- type: 'basic',
- icon: 'heroicons_outline:academic-cap',
- link: '/member/partner-recommendation',
+ id: 'apps.ecommerce',
+ title: 'partner-management',
+ type: 'collapsable',
+ icon: 'heroicons_outline:shopping-cart',
+ children: [
+ {
+ id: 'member.partner',
+ title: 'All Partner',
+ type: 'basic',
+ icon: 'heroicons_outline:academic-cap',
+ link: '/member/partner/all',
+ },
+ {
+ id: 'member.partner-mainoffice',
+ title: 'Partner Mainoffice',
+ type: 'basic',
+ icon: 'heroicons_outline:academic-cap',
+ link: '/member/partner/main-office',
+ },
+ {
+ id: 'member.partner-branch',
+ title: 'Partner Branch',
+ type: 'basic',
+ icon: 'heroicons_outline:academic-cap',
+ link: '/member/partner/branch',
+ },
+ {
+ id: 'member.partner-division',
+ title: 'Partner Division',
+ type: 'basic',
+ icon: 'heroicons_outline:academic-cap',
+ link: '/member/partner/division',
+ },
+ {
+ id: 'member.partner-office',
+ title: 'Partner Office',
+ type: 'basic',
+ icon: 'heroicons_outline:academic-cap',
+ link: '/member/partner/office',
+ },
+ {
+ id: 'member.partner-store',
+ title: 'Partner Store',
+ type: 'basic',
+ icon: 'heroicons_outline:academic-cap',
+ link: '/member/partner/store',
+ },
+ {
+ id: 'member.partner-recommendation',
+ title: 'Partner Recommendation',
+ type: 'basic',
+ icon: 'heroicons_outline:academic-cap',
+ link: '/member/partner/recommendation',
+ },
+ ],
},
+
{
id: 'member.coupon',
title: 'Coupon',
diff --git a/src/app/modules/admin/member/compose/compose.component.html b/src/app/modules/admin/member/compose/compose.component.html
new file mode 100644
index 0000000..079899f
--- /dev/null
+++ b/src/app/modules/admin/member/compose/compose.component.html
@@ -0,0 +1,123 @@
+
diff --git a/src/app/modules/admin/member/compose/compose.component.ts b/src/app/modules/admin/member/compose/compose.component.ts
new file mode 100644
index 0000000..74a6dc3
--- /dev/null
+++ b/src/app/modules/admin/member/compose/compose.component.ts
@@ -0,0 +1,100 @@
+import { Component, OnInit, ViewEncapsulation } from '@angular/core';
+import { FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { MatDialogRef } from '@angular/material/dialog';
+
+@Component({
+ selector: 'member-regist-compose',
+ templateUrl: './compose.component.html',
+ encapsulation: ViewEncapsulation.None,
+})
+export class RegistComposeComponent implements OnInit {
+ composeForm!: FormGroup;
+ copyFields: { cc: boolean; bcc: boolean } = {
+ cc: false,
+ bcc: false,
+ };
+ quillModules: any = {
+ toolbar: [
+ ['bold', 'italic', 'underline'],
+ [{ align: [] }, { list: 'ordered' }, { list: 'bullet' }],
+ ['clean'],
+ ],
+ };
+
+ /**
+ * Constructor
+ */
+ constructor(
+ public matDialogRef: MatDialogRef,
+ private _formBuilder: FormBuilder
+ ) {}
+
+ // -----------------------------------------------------------------------------------------------------
+ // @ Lifecycle hooks
+ // -----------------------------------------------------------------------------------------------------
+
+ /**
+ * On init
+ */
+ ngOnInit(): void {
+ // Create the form
+ this.composeForm = this._formBuilder.group({
+ partnerId: [{ value: 'kgon4', disabled: true }],
+ siteName: [''],
+ signinId: [''],
+ password: [''],
+ exchangePw: [''],
+ nickname: [''],
+ calculateType: [''],
+ phoneNumber: [''],
+ bankName: [''],
+ accountNumber: [''],
+ accountHolder: [''],
+ });
+ }
+
+ // -----------------------------------------------------------------------------------------------------
+ // @ Public methods
+ // -----------------------------------------------------------------------------------------------------
+
+ /**
+ * Show the copy field with the given field name
+ *
+ * @param name
+ */
+ showCopyField(name: string): void {
+ // Return if the name is not one of the available names
+ if (name !== 'cc' && name !== 'bcc') {
+ return;
+ }
+
+ // Show the field
+ this.copyFields[name] = true;
+ }
+
+ /**
+ * Save and close
+ */
+ saveAndClose(): void {
+ // Save the message as a draft
+ this.saveAsDraft();
+
+ // Close the dialog
+ this.matDialogRef.close();
+ }
+
+ /**
+ * Discard the message
+ */
+ discard(): void {}
+
+ /**
+ * Save the message as a draft
+ */
+ saveAsDraft(): void {}
+
+ /**
+ * Send the message
+ */
+ send(): void {}
+}
diff --git a/src/app/modules/admin/member/partner-branch/components/index.ts b/src/app/modules/admin/member/partner-branch/components/index.ts
deleted file mode 100644
index 04759eb..0000000
--- a/src/app/modules/admin/member/partner-branch/components/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { ListComponent } from './list.component';
-
-export const COMPONENTS = [ListComponent];
diff --git a/src/app/modules/admin/member/partner-branch/models/partner-branch-pagination.ts b/src/app/modules/admin/member/partner-branch/models/partner-branch-pagination.ts
deleted file mode 100644
index 8f33186..0000000
--- a/src/app/modules/admin/member/partner-branch/models/partner-branch-pagination.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-export interface PartnerBranchPagination {
- length: number;
- size: number;
- page: number;
- lastPage: number;
- startIndex: number;
- endIndex: number;
-}
diff --git a/src/app/modules/admin/member/partner-branch/models/partner-branch.ts b/src/app/modules/admin/member/partner-branch/models/partner-branch.ts
deleted file mode 100644
index c681404..0000000
--- a/src/app/modules/admin/member/partner-branch/models/partner-branch.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-export interface PartnerBranch {
- id?: string;
- totalPartnerCount?: number;
- totalHoldingMoney?: number;
- totalComp?: number;
- total?: number;
- branchCount?: number;
- divisionCount?: number;
- officeCount?: number;
- storeCount?: number;
- memberCount?: number;
- nickname?: string;
- accountHolder?: string;
- phoneNumber?: string;
- calculateType?: string;
- ownCash?: number;
- ownComp?: number;
- ownCoupon?: number;
- gameMoney?: number;
- todayComp?: number;
- totalDeposit?: number;
- totalWithdraw?: number;
- balance?: number;
- registDate?: string;
- finalSigninDate?: string;
- ip?: string;
- state?: string;
- note?: string;
-}
diff --git a/src/app/modules/admin/member/partner-branch/partner-branch.module.ts b/src/app/modules/admin/member/partner-branch/partner-branch.module.ts
deleted file mode 100644
index bbb22c0..0000000
--- a/src/app/modules/admin/member/partner-branch/partner-branch.module.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-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 { 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 { TranslocoModule } from '@ngneat/transloco';
-
-import { SharedModule } from 'app/shared/shared.module';
-
-import { COMPONENTS } from './components';
-
-import { partnerBranchRoutes } from './partner-branch.routing';
-
-@NgModule({
- declarations: [COMPONENTS],
- imports: [
- TranslocoModule,
- SharedModule,
- RouterModule.forChild(partnerBranchRoutes),
-
- MatButtonModule,
- MatFormFieldModule,
- MatIconModule,
- MatInputModule,
- MatPaginatorModule,
- MatProgressBarModule,
- MatRippleModule,
- MatSortModule,
- MatSelectModule,
- MatTooltipModule,
- MatGridListModule,
- MatSlideToggleModule,
- MatRadioModule,
- MatCheckboxModule,
- ],
-})
-export class PartnerBranchModule {}
diff --git a/src/app/modules/admin/member/partner-branch/partner-branch.routing.ts b/src/app/modules/admin/member/partner-branch/partner-branch.routing.ts
deleted file mode 100644
index a4b5292..0000000
--- a/src/app/modules/admin/member/partner-branch/partner-branch.routing.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { Route } from '@angular/router';
-
-import { ListComponent } from './components/list.component';
-import { ViewComponent } from '../user/components/view.component';
-
-import { PartnerBranchsResolver } from './resolvers/partner-branch.resolver';
-import { UserResolver } from '../user/resolvers/user.resolver';
-
-export const partnerBranchRoutes: Route[] = [
- {
- path: '',
- component: ListComponent,
- resolve: {
- partnerBranchs: PartnerBranchsResolver,
- },
- },
- {
- path: ':id',
- component: ViewComponent,
- resolve: {
- users: UserResolver,
- },
- },
-];
diff --git a/src/app/modules/admin/member/partner-branch/resolvers/partner-branch.resolver.ts b/src/app/modules/admin/member/partner-branch/resolvers/partner-branch.resolver.ts
deleted file mode 100644
index 4820978..0000000
--- a/src/app/modules/admin/member/partner-branch/resolvers/partner-branch.resolver.ts
+++ /dev/null
@@ -1,89 +0,0 @@
-import { Injectable } from '@angular/core';
-import {
- ActivatedRouteSnapshot,
- Resolve,
- Router,
- RouterStateSnapshot,
-} from '@angular/router';
-import { catchError, Observable, throwError } from 'rxjs';
-
-import { PartnerBranch } from '../models/partner-branch';
-import { PartnerBranchPagination } from '../models/partner-branch-pagination';
-import { PartnerBranchService } from '../services/partner-branch.service';
-
-@Injectable({
- providedIn: 'root',
-})
-export class PartnerBranchResolver implements Resolve {
- /**
- * Constructor
- */
- constructor(
- private _partnerBranchService: PartnerBranchService,
- private _router: Router
- ) {}
-
- // -----------------------------------------------------------------------------------------------------
- // @ Public methods
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Resolver
- *
- * @param route
- * @param state
- */
- resolve(
- route: ActivatedRouteSnapshot,
- state: RouterStateSnapshot
- ): Observable {
- return this._partnerBranchService
- .getPartnerBranchById(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 PartnerBranchsResolver implements Resolve {
- /**
- * Constructor
- */
- constructor(private _partnerBranchService: PartnerBranchService) {}
-
- // -----------------------------------------------------------------------------------------------------
- // @ Public methods
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Resolver
- *
- * @param route
- * @param state
- */
- resolve(
- route: ActivatedRouteSnapshot,
- state: RouterStateSnapshot
- ): Observable<{
- pagination: PartnerBranchPagination;
- partnerBranchs: PartnerBranch[];
- }> {
- return this._partnerBranchService.getPartnerBranchs();
- }
-}
diff --git a/src/app/modules/admin/member/partner-branch/services/partner-branch.service.ts b/src/app/modules/admin/member/partner-branch/services/partner-branch.service.ts
deleted file mode 100644
index aa0d372..0000000
--- a/src/app/modules/admin/member/partner-branch/services/partner-branch.service.ts
+++ /dev/null
@@ -1,161 +0,0 @@
-import { Injectable } from '@angular/core';
-import { HttpClient } from '@angular/common/http';
-import {
- BehaviorSubject,
- filter,
- map,
- Observable,
- of,
- switchMap,
- take,
- tap,
- throwError,
-} from 'rxjs';
-
-import { PartnerBranch } from '../models/partner-branch';
-import { PartnerBranchPagination } from '../models/partner-branch-pagination';
-
-@Injectable({
- providedIn: 'root',
-})
-export class PartnerBranchService {
- // Private
- private __pagination = new BehaviorSubject<
- PartnerBranchPagination | undefined
- >(undefined);
- private __partnerBranch = new BehaviorSubject(
- undefined
- );
- private __partnerBranchs = new BehaviorSubject(
- undefined
- );
-
- /**
- * Constructor
- */
- constructor(private _httpClient: HttpClient) {}
-
- // -----------------------------------------------------------------------------------------------------
- // @ Accessors
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Getter for pagination
- */
- get pagination$(): Observable {
- return this.__pagination.asObservable();
- }
-
- /**
- * Getter for partnerBranch
- */
- get partnerBranch$(): Observable {
- return this.__partnerBranch.asObservable();
- }
-
- /**
- * Getter for partnerBranchs
- */
- get partnerBranchs$(): Observable {
- return this.__partnerBranchs.asObservable();
- }
-
- // -----------------------------------------------------------------------------------------------------
- // @ Public methods
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Get partnerBranchs
- *
- *
- * @param page
- * @param size
- * @param sort
- * @param order
- * @param search
- */
- getPartnerBranchs(
- page: number = 0,
- size: number = 10,
- sort: string = 'name',
- order: 'asc' | 'desc' | '' = 'asc',
- search: string = ''
- ): Observable<{
- pagination: PartnerBranchPagination;
- partnerBranchs: PartnerBranch[];
- }> {
- return this._httpClient
- .get<{
- pagination: PartnerBranchPagination;
- partnerBranchs: PartnerBranch[];
- }>('api/apps/member/partner-branch/partner-branchs', {
- params: {
- page: '' + page,
- size: '' + size,
- sort,
- order,
- search,
- },
- })
- .pipe(
- tap((response) => {
- this.__pagination.next(response.pagination);
- this.__partnerBranchs.next(response.partnerBranchs);
- })
- );
- }
-
- /**
- * Get product by id
- */
- getPartnerBranchById(id: string | null): Observable {
- return this.__partnerBranchs.pipe(
- take(1),
- map((partnerBranchs) => {
- // Find the product
- const partnerBranch =
- partnerBranchs?.find((item) => item.id === id) || undefined;
-
- // Update the product
- this.__partnerBranch.next(partnerBranch);
-
- // Return the product
- return partnerBranch;
- }),
- switchMap((product) => {
- if (!product) {
- return throwError('Could not found product with id of ' + id + '!');
- }
-
- return of(product);
- })
- );
- }
-
- /**
- * Create product
- */
- createPartnerBranch(): Observable {
- return this.partnerBranchs$.pipe(
- take(1),
- switchMap((partnerBranchs) =>
- this._httpClient
- .post('api/apps/member/partner-branch/product', {})
- .pipe(
- map((newPartnerBranch) => {
- // Update the partnerBranchs with the new product
- if (!!partnerBranchs) {
- this.__partnerBranchs.next([
- newPartnerBranch,
- ...partnerBranchs,
- ]);
- }
-
- // Return the new product
- return newPartnerBranch;
- })
- )
- )
- );
- }
-}
diff --git a/src/app/modules/admin/member/partner-division/components/index.ts b/src/app/modules/admin/member/partner-division/components/index.ts
deleted file mode 100644
index 04759eb..0000000
--- a/src/app/modules/admin/member/partner-division/components/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { ListComponent } from './list.component';
-
-export const COMPONENTS = [ListComponent];
diff --git a/src/app/modules/admin/member/partner-division/models/partner-division-pagination.ts b/src/app/modules/admin/member/partner-division/models/partner-division-pagination.ts
deleted file mode 100644
index 6f4a4d7..0000000
--- a/src/app/modules/admin/member/partner-division/models/partner-division-pagination.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-export interface PartnerDivisionPagination {
- length: number;
- size: number;
- page: number;
- lastPage: number;
- startIndex: number;
- endIndex: number;
-}
diff --git a/src/app/modules/admin/member/partner-division/models/partner-division.ts b/src/app/modules/admin/member/partner-division/models/partner-division.ts
deleted file mode 100644
index 3b4e0e3..0000000
--- a/src/app/modules/admin/member/partner-division/models/partner-division.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-export interface PartnerDivision {
- id?: string;
- totalPartnerCount?: number;
- totalHoldingMoney?: number;
- totalComp?: number;
- total?: number;
- branchCount?: number;
- divisionCount?: number;
- officeCount?: number;
- storeCount?: number;
- memberCount?: number;
- nickname?: string;
- accountHolder?: string;
- phoneNumber?: string;
- calculateType?: string;
- ownCash?: number;
- ownComp?: number;
- ownCoupon?: number;
- gameMoney?: number;
- todayComp?: number;
- totalDeposit?: number;
- totalWithdraw?: number;
- balance?: number;
- registDate?: string;
- finalSigninDate?: string;
- ip?: string;
- state?: string;
- note?: string;
-}
diff --git a/src/app/modules/admin/member/partner-division/partner-division.module.ts b/src/app/modules/admin/member/partner-division/partner-division.module.ts
deleted file mode 100644
index 4f6bb9a..0000000
--- a/src/app/modules/admin/member/partner-division/partner-division.module.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-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 { 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 { TranslocoModule } from '@ngneat/transloco';
-
-import { SharedModule } from 'app/shared/shared.module';
-
-import { COMPONENTS } from './components';
-
-import { partnerDivisionRoutes } from './partner-division.routing';
-
-@NgModule({
- declarations: [COMPONENTS],
- imports: [
- TranslocoModule,
- SharedModule,
- RouterModule.forChild(partnerDivisionRoutes),
-
- MatButtonModule,
- MatFormFieldModule,
- MatIconModule,
- MatInputModule,
- MatPaginatorModule,
- MatProgressBarModule,
- MatRippleModule,
- MatSortModule,
- MatSelectModule,
- MatTooltipModule,
- MatGridListModule,
- MatSlideToggleModule,
- MatRadioModule,
- MatCheckboxModule,
- ],
-})
-export class PartnerDivisionModule {}
diff --git a/src/app/modules/admin/member/partner-division/partner-division.routing.ts b/src/app/modules/admin/member/partner-division/partner-division.routing.ts
deleted file mode 100644
index 5c68715..0000000
--- a/src/app/modules/admin/member/partner-division/partner-division.routing.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { Route } from '@angular/router';
-
-import { ListComponent } from './components/list.component';
-import { ViewComponent } from '../user/components/view.component';
-
-import { PartnerDivisionsResolver } from './resolvers/partner-division.resolver';
-import { UserResolver } from '../user/resolvers/user.resolver';
-
-export const partnerDivisionRoutes: Route[] = [
- {
- path: '',
- component: ListComponent,
- resolve: {
- partnerBranchs: PartnerDivisionsResolver,
- },
- },
- {
- path: ':id',
- component: ViewComponent,
- resolve: {
- users: UserResolver,
- },
- },
-];
diff --git a/src/app/modules/admin/member/partner-division/resolvers/partner-division.resolver.ts b/src/app/modules/admin/member/partner-division/resolvers/partner-division.resolver.ts
deleted file mode 100644
index 14568cb..0000000
--- a/src/app/modules/admin/member/partner-division/resolvers/partner-division.resolver.ts
+++ /dev/null
@@ -1,89 +0,0 @@
-import { Injectable } from '@angular/core';
-import {
- ActivatedRouteSnapshot,
- Resolve,
- Router,
- RouterStateSnapshot,
-} from '@angular/router';
-import { catchError, Observable, throwError } from 'rxjs';
-
-import { PartnerDivision } from '../models/partner-division';
-import { PartnerDivisionPagination } from '../models/partner-division-pagination';
-import { PartnerDivisionService } from '../services/partner-division.service';
-
-@Injectable({
- providedIn: 'root',
-})
-export class PartnerDivisionResolver implements Resolve {
- /**
- * Constructor
- */
- constructor(
- private _partnerDivisionService: PartnerDivisionService,
- private _router: Router
- ) {}
-
- // -----------------------------------------------------------------------------------------------------
- // @ Public methods
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Resolver
- *
- * @param route
- * @param state
- */
- resolve(
- route: ActivatedRouteSnapshot,
- state: RouterStateSnapshot
- ): Observable {
- return this._partnerDivisionService
- .getPartnerDivisionById(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 PartnerDivisionsResolver implements Resolve {
- /**
- * Constructor
- */
- constructor(private _partnerDivisionService: PartnerDivisionService) {}
-
- // -----------------------------------------------------------------------------------------------------
- // @ Public methods
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Resolver
- *
- * @param route
- * @param state
- */
- resolve(
- route: ActivatedRouteSnapshot,
- state: RouterStateSnapshot
- ): Observable<{
- pagination: PartnerDivisionPagination;
- partnerDivisions: PartnerDivision[];
- }> {
- return this._partnerDivisionService.getPartnerDivisions();
- }
-}
diff --git a/src/app/modules/admin/member/partner-division/services/partner-division.service.ts b/src/app/modules/admin/member/partner-division/services/partner-division.service.ts
deleted file mode 100644
index f410aac..0000000
--- a/src/app/modules/admin/member/partner-division/services/partner-division.service.ts
+++ /dev/null
@@ -1,161 +0,0 @@
-import { Injectable } from '@angular/core';
-import { HttpClient } from '@angular/common/http';
-import {
- BehaviorSubject,
- filter,
- map,
- Observable,
- of,
- switchMap,
- take,
- tap,
- throwError,
-} from 'rxjs';
-
-import { PartnerDivision } from '../models/partner-division';
-import { PartnerDivisionPagination } from '../models/partner-division-pagination';
-
-@Injectable({
- providedIn: 'root',
-})
-export class PartnerDivisionService {
- // Private
- private __pagination = new BehaviorSubject<
- PartnerDivisionPagination | undefined
- >(undefined);
- private __partnerDivision = new BehaviorSubject(
- undefined
- );
- private __partnerDivisions = new BehaviorSubject<
- PartnerDivision[] | undefined
- >(undefined);
-
- /**
- * Constructor
- */
- constructor(private _httpClient: HttpClient) {}
-
- // -----------------------------------------------------------------------------------------------------
- // @ Accessors
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Getter for pagination
- */
- get pagination$(): Observable {
- return this.__pagination.asObservable();
- }
-
- /**
- * Getter for partnerDivision
- */
- get partnerDivision$(): Observable {
- return this.__partnerDivision.asObservable();
- }
-
- /**
- * Getter for partnerDivisions
- */
- get partnerDivisions$(): Observable {
- return this.__partnerDivisions.asObservable();
- }
-
- // -----------------------------------------------------------------------------------------------------
- // @ Public methods
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Get partnerDivisions
- *
- *
- * @param page
- * @param size
- * @param sort
- * @param order
- * @param search
- */
- getPartnerDivisions(
- page: number = 0,
- size: number = 10,
- sort: string = 'name',
- order: 'asc' | 'desc' | '' = 'asc',
- search: string = ''
- ): Observable<{
- pagination: PartnerDivisionPagination;
- partnerDivisions: PartnerDivision[];
- }> {
- return this._httpClient
- .get<{
- pagination: PartnerDivisionPagination;
- partnerDivisions: PartnerDivision[];
- }>('api/apps/member/partner-division/partner-divisions', {
- params: {
- page: '' + page,
- size: '' + size,
- sort,
- order,
- search,
- },
- })
- .pipe(
- tap((response) => {
- this.__pagination.next(response.pagination);
- this.__partnerDivisions.next(response.partnerDivisions);
- })
- );
- }
-
- /**
- * Get product by id
- */
- getPartnerDivisionById(id: string | null): Observable {
- return this.__partnerDivisions.pipe(
- take(1),
- map((partnerDivisions) => {
- // Find the product
- const partnerDivision =
- partnerDivisions?.find((item) => item.id === id) || undefined;
-
- // Update the product
- this.__partnerDivision.next(partnerDivision);
-
- // Return the product
- return partnerDivision;
- }),
- switchMap((product) => {
- if (!product) {
- return throwError('Could not found product with id of ' + id + '!');
- }
-
- return of(product);
- })
- );
- }
-
- /**
- * Create product
- */
- createPartnerDivision(): Observable {
- return this.partnerDivisions$.pipe(
- take(1),
- switchMap((partnerDivisions) =>
- this._httpClient
- .post('api/apps/member/partner-division/product', {})
- .pipe(
- map((newPartnerDivision) => {
- // Update the partnerDivisions with the new product
- if (!!partnerDivisions) {
- this.__partnerDivisions.next([
- newPartnerDivision,
- ...partnerDivisions,
- ]);
- }
-
- // Return the new product
- return newPartnerDivision;
- })
- )
- )
- );
- }
-}
diff --git a/src/app/modules/admin/member/partner-mainoffice/components/index.ts b/src/app/modules/admin/member/partner-mainoffice/components/index.ts
deleted file mode 100644
index 04759eb..0000000
--- a/src/app/modules/admin/member/partner-mainoffice/components/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { ListComponent } from './list.component';
-
-export const COMPONENTS = [ListComponent];
diff --git a/src/app/modules/admin/member/partner-mainoffice/models/partner-mainoffice-pagination.ts b/src/app/modules/admin/member/partner-mainoffice/models/partner-mainoffice-pagination.ts
deleted file mode 100644
index 706486d..0000000
--- a/src/app/modules/admin/member/partner-mainoffice/models/partner-mainoffice-pagination.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-export interface PartnerMainofficePagination {
- length: number;
- size: number;
- page: number;
- lastPage: number;
- startIndex: number;
- endIndex: number;
-}
diff --git a/src/app/modules/admin/member/partner-mainoffice/models/partner-mainoffice.ts b/src/app/modules/admin/member/partner-mainoffice/models/partner-mainoffice.ts
deleted file mode 100644
index 4c55d7f..0000000
--- a/src/app/modules/admin/member/partner-mainoffice/models/partner-mainoffice.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-export interface PartnerMainoffice {
- id?: string;
- totalPartnerCount?: number;
- totalHoldingMoney?: number;
- totalComp?: number;
- total?: number;
- branchCount?: number;
- divisionCount?: number;
- officeCount?: number;
- storeCount?: number;
- memberCount?: number;
- nickname?: string;
- accountHolder?: string;
- phoneNumber?: string;
- calculateType?: string;
- ownCash?: number;
- ownComp?: number;
- ownCoupon?: number;
- gameMoney?: number;
- todayComp?: number;
- totalDeposit?: number;
- totalWithdraw?: number;
- balance?: number;
- registDate?: string;
- finalSigninDate?: string;
- ip?: string;
- state?: string;
- note?: string;
-}
diff --git a/src/app/modules/admin/member/partner-mainoffice/partner-mainoffice.module.ts b/src/app/modules/admin/member/partner-mainoffice/partner-mainoffice.module.ts
deleted file mode 100644
index 981d691..0000000
--- a/src/app/modules/admin/member/partner-mainoffice/partner-mainoffice.module.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-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 { 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 { TranslocoModule } from '@ngneat/transloco';
-
-import { SharedModule } from 'app/shared/shared.module';
-
-import { COMPONENTS } from './components';
-
-import { partnerMainofficeRoutes } from './partner-mainoffice.routing';
-
-@NgModule({
- declarations: [COMPONENTS],
- imports: [
- TranslocoModule,
- SharedModule,
- RouterModule.forChild(partnerMainofficeRoutes),
-
- MatButtonModule,
- MatFormFieldModule,
- MatIconModule,
- MatInputModule,
- MatPaginatorModule,
- MatProgressBarModule,
- MatRippleModule,
- MatSortModule,
- MatSelectModule,
- MatTooltipModule,
- MatGridListModule,
- MatSlideToggleModule,
- MatRadioModule,
- MatCheckboxModule,
- ],
-})
-export class PartnerMainofficeModule {}
diff --git a/src/app/modules/admin/member/partner-mainoffice/partner-mainoffice.routing.ts b/src/app/modules/admin/member/partner-mainoffice/partner-mainoffice.routing.ts
deleted file mode 100644
index f05575e..0000000
--- a/src/app/modules/admin/member/partner-mainoffice/partner-mainoffice.routing.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { Route } from '@angular/router';
-
-import { ListComponent } from './components/list.component';
-import { ViewComponent } from '../user/components/view.component';
-
-import { PartnerMainofficesResolver } from './resolvers/partner-mainoffice.resolver';
-import { UserResolver } from '../user/resolvers/user.resolver';
-
-export const partnerMainofficeRoutes: Route[] = [
- {
- path: '',
- component: ListComponent,
- resolve: {
- partnerMainoffices: PartnerMainofficesResolver,
- },
- },
- {
- path: ':id',
- component: ViewComponent,
- resolve: {
- users: UserResolver,
- },
- },
-];
diff --git a/src/app/modules/admin/member/partner-mainoffice/resolvers/partner-mainoffice.resolver.ts b/src/app/modules/admin/member/partner-mainoffice/resolvers/partner-mainoffice.resolver.ts
deleted file mode 100644
index 15919d7..0000000
--- a/src/app/modules/admin/member/partner-mainoffice/resolvers/partner-mainoffice.resolver.ts
+++ /dev/null
@@ -1,89 +0,0 @@
-import { Injectable } from '@angular/core';
-import {
- ActivatedRouteSnapshot,
- Resolve,
- Router,
- RouterStateSnapshot,
-} from '@angular/router';
-import { catchError, Observable, throwError } from 'rxjs';
-
-import { PartnerMainoffice } from '../models/partner-mainoffice';
-import { PartnerMainofficePagination } from '../models/partner-mainoffice-pagination';
-import { PartnerMainofficeService } from '../services/partner-mainoffice.service';
-
-@Injectable({
- providedIn: 'root',
-})
-export class PartnerMainofficeResolver implements Resolve {
- /**
- * Constructor
- */
- constructor(
- private _partnerMainofficeService: PartnerMainofficeService,
- private _router: Router
- ) {}
-
- // -----------------------------------------------------------------------------------------------------
- // @ Public methods
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Resolver
- *
- * @param route
- * @param state
- */
- resolve(
- route: ActivatedRouteSnapshot,
- state: RouterStateSnapshot
- ): Observable {
- return this._partnerMainofficeService
- .getPartnerMainofficeById(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 PartnerMainofficesResolver implements Resolve {
- /**
- * Constructor
- */
- constructor(private _partnerMainofficeService: PartnerMainofficeService) {}
-
- // -----------------------------------------------------------------------------------------------------
- // @ Public methods
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Resolver
- *
- * @param route
- * @param state
- */
- resolve(
- route: ActivatedRouteSnapshot,
- state: RouterStateSnapshot
- ): Observable<{
- pagination: PartnerMainofficePagination;
- partnerMainoffices: PartnerMainoffice[];
- }> {
- return this._partnerMainofficeService.getPartnerMainoffices();
- }
-}
diff --git a/src/app/modules/admin/member/partner-mainoffice/services/partner-mainoffice.service.ts b/src/app/modules/admin/member/partner-mainoffice/services/partner-mainoffice.service.ts
deleted file mode 100644
index 43188ee..0000000
--- a/src/app/modules/admin/member/partner-mainoffice/services/partner-mainoffice.service.ts
+++ /dev/null
@@ -1,164 +0,0 @@
-import { Injectable } from '@angular/core';
-import { HttpClient } from '@angular/common/http';
-import {
- BehaviorSubject,
- filter,
- map,
- Observable,
- of,
- switchMap,
- take,
- tap,
- throwError,
-} from 'rxjs';
-
-import { PartnerMainoffice } from '../models/partner-mainoffice';
-import { PartnerMainofficePagination } from '../models/partner-mainoffice-pagination';
-
-@Injectable({
- providedIn: 'root',
-})
-export class PartnerMainofficeService {
- // Private
- private __pagination = new BehaviorSubject<
- PartnerMainofficePagination | undefined
- >(undefined);
- private __partnerMainoffice = new BehaviorSubject<
- PartnerMainoffice | undefined
- >(undefined);
- private __partnerMainoffices = new BehaviorSubject<
- PartnerMainoffice[] | undefined
- >(undefined);
-
- /**
- * Constructor
- */
- constructor(private _httpClient: HttpClient) {}
-
- // -----------------------------------------------------------------------------------------------------
- // @ Accessors
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Getter for pagination
- */
- get pagination$(): Observable {
- return this.__pagination.asObservable();
- }
-
- /**
- * Getter for partnerMainoffice
- */
- get partnerMainoffice$(): Observable {
- return this.__partnerMainoffice.asObservable();
- }
-
- /**
- * Getter for partnerMainoffices
- */
- get partnerMainoffices$(): Observable {
- return this.__partnerMainoffices.asObservable();
- }
-
- // -----------------------------------------------------------------------------------------------------
- // @ Public methods
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Get partnerMainoffices
- *
- *
- * @param page
- * @param size
- * @param sort
- * @param order
- * @param search
- */
- getPartnerMainoffices(
- page: number = 0,
- size: number = 10,
- sort: string = 'name',
- order: 'asc' | 'desc' | '' = 'asc',
- search: string = ''
- ): Observable<{
- pagination: PartnerMainofficePagination;
- partnerMainoffices: PartnerMainoffice[];
- }> {
- return this._httpClient
- .get<{
- pagination: PartnerMainofficePagination;
- partnerMainoffices: PartnerMainoffice[];
- }>('api/apps/member/partner-mainoffice/partner-mainoffices', {
- params: {
- page: '' + page,
- size: '' + size,
- sort,
- order,
- search,
- },
- })
- .pipe(
- tap((response) => {
- this.__pagination.next(response.pagination);
- this.__partnerMainoffices.next(response.partnerMainoffices);
- })
- );
- }
-
- /**
- * Get product by id
- */
- getPartnerMainofficeById(id: string | null): Observable {
- return this.__partnerMainoffices.pipe(
- take(1),
- map((partnerMainoffices) => {
- // Find the product
- const partnerMainoffice =
- partnerMainoffices?.find((item) => item.id === id) || undefined;
-
- // Update the product
- this.__partnerMainoffice.next(partnerMainoffice);
-
- // Return the product
- return partnerMainoffice;
- }),
- switchMap((product) => {
- if (!product) {
- return throwError('Could not found product with id of ' + id + '!');
- }
-
- return of(product);
- })
- );
- }
-
- /**
- * Create product
- */
- createPartnerMainoffice(): Observable {
- return this.partnerMainoffices$.pipe(
- take(1),
- switchMap((partnerMainoffices) =>
- this._httpClient
- .post(
- 'api/apps/member/partner-mainoffice/product',
- {}
- )
- .pipe(
- map((newPartnerMainoffice) => {
- // Update the partnerMainoffices with the new product
- if (!!partnerMainoffices) {
- this.__partnerMainoffices.next([
- newPartnerMainoffice,
- ...partnerMainoffices,
- ]);
- }
-
- // Return the new product
- return newPartnerMainoffice;
- })
- )
- )
- );
- }
-}
diff --git a/src/app/modules/admin/member/partner-office/components/index.ts b/src/app/modules/admin/member/partner-office/components/index.ts
deleted file mode 100644
index 04759eb..0000000
--- a/src/app/modules/admin/member/partner-office/components/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { ListComponent } from './list.component';
-
-export const COMPONENTS = [ListComponent];
diff --git a/src/app/modules/admin/member/partner-office/models/partner-office-pagination.ts b/src/app/modules/admin/member/partner-office/models/partner-office-pagination.ts
deleted file mode 100644
index 02b7f59..0000000
--- a/src/app/modules/admin/member/partner-office/models/partner-office-pagination.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-export interface PartnerOfficePagination {
- length: number;
- size: number;
- page: number;
- lastPage: number;
- startIndex: number;
- endIndex: number;
-}
diff --git a/src/app/modules/admin/member/partner-office/models/partner-office.ts b/src/app/modules/admin/member/partner-office/models/partner-office.ts
deleted file mode 100644
index 8d614ca..0000000
--- a/src/app/modules/admin/member/partner-office/models/partner-office.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-export interface PartnerOffice {
- id?: string;
- totalPartnerCount?: number;
- totalHoldingMoney?: number;
- totalComp?: number;
- total?: number;
- branchCount?: number;
- divisionCount?: number;
- officeCount?: number;
- storeCount?: number;
- memberCount?: number;
- nickname?: string;
- accountHolder?: string;
- phoneNumber?: string;
- calculateType?: string;
- ownCash?: number;
- ownComp?: number;
- ownCoupon?: number;
- gameMoney?: number;
- todayComp?: number;
- totalDeposit?: number;
- totalWithdraw?: number;
- balance?: number;
- registDate?: string;
- finalSigninDate?: string;
- ip?: string;
- state?: string;
- note?: string;
-}
diff --git a/src/app/modules/admin/member/partner-office/partner-office.module.ts b/src/app/modules/admin/member/partner-office/partner-office.module.ts
deleted file mode 100644
index 6e29f32..0000000
--- a/src/app/modules/admin/member/partner-office/partner-office.module.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-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 { 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 { TranslocoModule } from '@ngneat/transloco';
-
-import { SharedModule } from 'app/shared/shared.module';
-
-import { COMPONENTS } from './components';
-
-import { partnerOfficeRoutes } from './partner-office.routing';
-
-@NgModule({
- declarations: [COMPONENTS],
- imports: [
- TranslocoModule,
- SharedModule,
- RouterModule.forChild(partnerOfficeRoutes),
-
- MatButtonModule,
- MatFormFieldModule,
- MatIconModule,
- MatInputModule,
- MatPaginatorModule,
- MatProgressBarModule,
- MatRippleModule,
- MatSortModule,
- MatSelectModule,
- MatTooltipModule,
- MatGridListModule,
- MatSlideToggleModule,
- MatRadioModule,
- MatCheckboxModule,
- ],
-})
-export class PartnerOfficeModule {}
diff --git a/src/app/modules/admin/member/partner-office/partner-office.routing.ts b/src/app/modules/admin/member/partner-office/partner-office.routing.ts
deleted file mode 100644
index 698070b..0000000
--- a/src/app/modules/admin/member/partner-office/partner-office.routing.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { Route } from '@angular/router';
-
-import { ListComponent } from './components/list.component';
-import { ViewComponent } from '../user/components/view.component';
-
-import { PartnerOfficesResolver } from './resolvers/partner-office.resolver';
-import { UserResolver } from '../user/resolvers/user.resolver';
-
-export const partnerOfficeRoutes: Route[] = [
- {
- path: '',
- component: ListComponent,
- resolve: {
- partnerOffices: PartnerOfficesResolver,
- },
- },
- {
- path: ':id',
- component: ViewComponent,
- resolve: {
- users: UserResolver,
- },
- },
-];
diff --git a/src/app/modules/admin/member/partner-office/resolvers/partner-office.resolver.ts b/src/app/modules/admin/member/partner-office/resolvers/partner-office.resolver.ts
deleted file mode 100644
index ab2b3b9..0000000
--- a/src/app/modules/admin/member/partner-office/resolvers/partner-office.resolver.ts
+++ /dev/null
@@ -1,89 +0,0 @@
-import { Injectable } from '@angular/core';
-import {
- ActivatedRouteSnapshot,
- Resolve,
- Router,
- RouterStateSnapshot,
-} from '@angular/router';
-import { catchError, Observable, throwError } from 'rxjs';
-
-import { PartnerOffice } from '../models/partner-office';
-import { PartnerOfficePagination } from '../models/partner-office-pagination';
-import { PartnerOfficeService } from '../services/partner-office.service';
-
-@Injectable({
- providedIn: 'root',
-})
-export class PartnerOfficeResolver implements Resolve {
- /**
- * Constructor
- */
- constructor(
- private _partnerOfficeService: PartnerOfficeService,
- private _router: Router
- ) {}
-
- // -----------------------------------------------------------------------------------------------------
- // @ Public methods
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Resolver
- *
- * @param route
- * @param state
- */
- resolve(
- route: ActivatedRouteSnapshot,
- state: RouterStateSnapshot
- ): Observable {
- return this._partnerOfficeService
- .getPartnerOfficeById(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 PartnerOfficesResolver implements Resolve {
- /**
- * Constructor
- */
- constructor(private _partnerOfficeService: PartnerOfficeService) {}
-
- // -----------------------------------------------------------------------------------------------------
- // @ Public methods
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Resolver
- *
- * @param route
- * @param state
- */
- resolve(
- route: ActivatedRouteSnapshot,
- state: RouterStateSnapshot
- ): Observable<{
- pagination: PartnerOfficePagination;
- partnerOffices: PartnerOffice[];
- }> {
- return this._partnerOfficeService.getPartnerOffices();
- }
-}
diff --git a/src/app/modules/admin/member/partner-office/services/partner-office.service.ts b/src/app/modules/admin/member/partner-office/services/partner-office.service.ts
deleted file mode 100644
index 0bb8943..0000000
--- a/src/app/modules/admin/member/partner-office/services/partner-office.service.ts
+++ /dev/null
@@ -1,161 +0,0 @@
-import { Injectable } from '@angular/core';
-import { HttpClient } from '@angular/common/http';
-import {
- BehaviorSubject,
- filter,
- map,
- Observable,
- of,
- switchMap,
- take,
- tap,
- throwError,
-} from 'rxjs';
-
-import { PartnerOffice } from '../models/partner-office';
-import { PartnerOfficePagination } from '../models/partner-office-pagination';
-
-@Injectable({
- providedIn: 'root',
-})
-export class PartnerOfficeService {
- // Private
- private __pagination = new BehaviorSubject<
- PartnerOfficePagination | undefined
- >(undefined);
- private __partnerOffice = new BehaviorSubject(
- undefined
- );
- private __partnerOffices = new BehaviorSubject(
- undefined
- );
-
- /**
- * Constructor
- */
- constructor(private _httpClient: HttpClient) {}
-
- // -----------------------------------------------------------------------------------------------------
- // @ Accessors
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Getter for pagination
- */
- get pagination$(): Observable {
- return this.__pagination.asObservable();
- }
-
- /**
- * Getter for partnerOffice
- */
- get partnerOffice$(): Observable {
- return this.__partnerOffice.asObservable();
- }
-
- /**
- * Getter for partnerOffices
- */
- get partnerOffices$(): Observable {
- return this.__partnerOffices.asObservable();
- }
-
- // -----------------------------------------------------------------------------------------------------
- // @ Public methods
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Get partnerOffices
- *
- *
- * @param page
- * @param size
- * @param sort
- * @param order
- * @param search
- */
- getPartnerOffices(
- page: number = 0,
- size: number = 10,
- sort: string = 'name',
- order: 'asc' | 'desc' | '' = 'asc',
- search: string = ''
- ): Observable<{
- pagination: PartnerOfficePagination;
- partnerOffices: PartnerOffice[];
- }> {
- return this._httpClient
- .get<{
- pagination: PartnerOfficePagination;
- partnerOffices: PartnerOffice[];
- }>('api/apps/member/partner-office/partner-offices', {
- params: {
- page: '' + page,
- size: '' + size,
- sort,
- order,
- search,
- },
- })
- .pipe(
- tap((response) => {
- this.__pagination.next(response.pagination);
- this.__partnerOffices.next(response.partnerOffices);
- })
- );
- }
-
- /**
- * Get product by id
- */
- getPartnerOfficeById(id: string | null): Observable {
- return this.__partnerOffices.pipe(
- take(1),
- map((partnerOffices) => {
- // Find the product
- const partnerOffice =
- partnerOffices?.find((item) => item.id === id) || undefined;
-
- // Update the product
- this.__partnerOffice.next(partnerOffice);
-
- // Return the product
- return partnerOffice;
- }),
- switchMap((product) => {
- if (!product) {
- return throwError('Could not found product with id of ' + id + '!');
- }
-
- return of(product);
- })
- );
- }
-
- /**
- * Create product
- */
- createPartnerOffice(): Observable {
- return this.partnerOffices$.pipe(
- take(1),
- switchMap((partnerOffices) =>
- this._httpClient
- .post('api/apps/member/partner-office/product', {})
- .pipe(
- map((newPartnerOffice) => {
- // Update the partnerOffices with the new product
- if (!!partnerOffices) {
- this.__partnerOffices.next([
- newPartnerOffice,
- ...partnerOffices,
- ]);
- }
-
- // Return the new product
- return newPartnerOffice;
- })
- )
- )
- );
- }
-}
diff --git a/src/app/modules/admin/member/partner-recommendation/components/index.ts b/src/app/modules/admin/member/partner-recommendation/components/index.ts
deleted file mode 100644
index 04759eb..0000000
--- a/src/app/modules/admin/member/partner-recommendation/components/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { ListComponent } from './list.component';
-
-export const COMPONENTS = [ListComponent];
diff --git a/src/app/modules/admin/member/partner-recommendation/models/partner-recommendation-pagination.ts b/src/app/modules/admin/member/partner-recommendation/models/partner-recommendation-pagination.ts
deleted file mode 100644
index 7b46ebd..0000000
--- a/src/app/modules/admin/member/partner-recommendation/models/partner-recommendation-pagination.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-export interface PartnerRecommendationPagination {
- length: number;
- size: number;
- page: number;
- lastPage: number;
- startIndex: number;
- endIndex: number;
-}
diff --git a/src/app/modules/admin/member/partner-recommendation/models/partner-recommendation.ts b/src/app/modules/admin/member/partner-recommendation/models/partner-recommendation.ts
deleted file mode 100644
index 568a532..0000000
--- a/src/app/modules/admin/member/partner-recommendation/models/partner-recommendation.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-export interface PartnerRecommendation {
- id?: string;
- totalPartnerCount?: number;
- totalHoldingMoney?: number;
- totalComp?: number;
- total?: number;
- branchCount?: number;
- divisionCount?: number;
- officeCount?: number;
- storeCount?: number;
- memberCount?: number;
- nickname?: string;
- accountHolder?: string;
- phoneNumber?: string;
- calculateType?: string;
- ownCash?: number;
- ownComp?: number;
- ownCoupon?: number;
- gameMoney?: number;
- todayComp?: number;
- totalDeposit?: number;
- totalWithdraw?: number;
- balance?: number;
- registDate?: string;
- finalSigninDate?: string;
- ip?: string;
- state?: string;
- note?: string;
-}
diff --git a/src/app/modules/admin/member/partner-recommendation/partner-recommendation.module.ts b/src/app/modules/admin/member/partner-recommendation/partner-recommendation.module.ts
deleted file mode 100644
index 4fa45c3..0000000
--- a/src/app/modules/admin/member/partner-recommendation/partner-recommendation.module.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-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 { 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 { TranslocoModule } from '@ngneat/transloco';
-
-import { SharedModule } from 'app/shared/shared.module';
-
-import { COMPONENTS } from './components';
-
-import { partnerRecommendationRoutes } from './partner-recommendation.routing';
-
-@NgModule({
- declarations: [COMPONENTS],
- imports: [
- TranslocoModule,
- SharedModule,
- RouterModule.forChild(partnerRecommendationRoutes),
-
- MatButtonModule,
- MatFormFieldModule,
- MatIconModule,
- MatInputModule,
- MatPaginatorModule,
- MatProgressBarModule,
- MatRippleModule,
- MatSortModule,
- MatSelectModule,
- MatTooltipModule,
- MatGridListModule,
- MatSlideToggleModule,
- MatRadioModule,
- MatCheckboxModule,
- ],
-})
-export class PartnerRecommendationModule {}
diff --git a/src/app/modules/admin/member/partner-recommendation/partner-recommendation.routing.ts b/src/app/modules/admin/member/partner-recommendation/partner-recommendation.routing.ts
deleted file mode 100644
index 6883352..0000000
--- a/src/app/modules/admin/member/partner-recommendation/partner-recommendation.routing.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { Route } from '@angular/router';
-
-import { ListComponent } from './components/list.component';
-import { ViewComponent } from '../user/components/view.component';
-
-import { PartnerRecommendationsResolver } from './resolvers/partner-recommendation.resolver';
-import { UserResolver } from '../user/resolvers/user.resolver';
-
-export const partnerRecommendationRoutes: Route[] = [
- {
- path: '',
- component: ListComponent,
- resolve: {
- partnerRecommendations: PartnerRecommendationsResolver,
- },
- },
- {
- path: ':id',
- component: ViewComponent,
- resolve: {
- users: UserResolver,
- },
- },
-];
diff --git a/src/app/modules/admin/member/partner-recommendation/resolvers/partner-recommendation.resolver.ts b/src/app/modules/admin/member/partner-recommendation/resolvers/partner-recommendation.resolver.ts
deleted file mode 100644
index aafc6eb..0000000
--- a/src/app/modules/admin/member/partner-recommendation/resolvers/partner-recommendation.resolver.ts
+++ /dev/null
@@ -1,91 +0,0 @@
-import { Injectable } from '@angular/core';
-import {
- ActivatedRouteSnapshot,
- Resolve,
- Router,
- RouterStateSnapshot,
-} from '@angular/router';
-import { catchError, Observable, throwError } from 'rxjs';
-
-import { PartnerRecommendation } from '../models/partner-recommendation';
-import { PartnerRecommendationPagination } from '../models/partner-recommendation-pagination';
-import { PartnerRecommendationService } from '../services/partner-recommendation.service';
-
-@Injectable({
- providedIn: 'root',
-})
-export class PartnerRecommendationResolver implements Resolve {
- /**
- * Constructor
- */
- constructor(
- private _partnerRecommendationService: PartnerRecommendationService,
- private _router: Router
- ) {}
-
- // -----------------------------------------------------------------------------------------------------
- // @ Public methods
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Resolver
- *
- * @param route
- * @param state
- */
- resolve(
- route: ActivatedRouteSnapshot,
- state: RouterStateSnapshot
- ): Observable {
- return this._partnerRecommendationService
- .getPartnerRecommendationById(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 PartnerRecommendationsResolver implements Resolve {
- /**
- * Constructor
- */
- constructor(
- private _partnerRecommendationService: PartnerRecommendationService
- ) {}
-
- // -----------------------------------------------------------------------------------------------------
- // @ Public methods
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Resolver
- *
- * @param route
- * @param state
- */
- resolve(
- route: ActivatedRouteSnapshot,
- state: RouterStateSnapshot
- ): Observable<{
- pagination: PartnerRecommendationPagination;
- partnerRecommendations: PartnerRecommendation[];
- }> {
- return this._partnerRecommendationService.getPartnerRecommendations();
- }
-}
diff --git a/src/app/modules/admin/member/partner-recommendation/services/partner-recommendation.service.ts b/src/app/modules/admin/member/partner-recommendation/services/partner-recommendation.service.ts
deleted file mode 100644
index 9f06595..0000000
--- a/src/app/modules/admin/member/partner-recommendation/services/partner-recommendation.service.ts
+++ /dev/null
@@ -1,168 +0,0 @@
-import { Injectable } from '@angular/core';
-import { HttpClient } from '@angular/common/http';
-import {
- BehaviorSubject,
- filter,
- map,
- Observable,
- of,
- switchMap,
- take,
- tap,
- throwError,
-} from 'rxjs';
-
-import { PartnerRecommendation } from '../models/partner-recommendation';
-import { PartnerRecommendationPagination } from '../models/partner-recommendation-pagination';
-
-@Injectable({
- providedIn: 'root',
-})
-export class PartnerRecommendationService {
- // Private
- private __pagination = new BehaviorSubject<
- PartnerRecommendationPagination | undefined
- >(undefined);
- private __partnerRecommendation = new BehaviorSubject<
- PartnerRecommendation | undefined
- >(undefined);
- private __partnerRecommendations = new BehaviorSubject<
- PartnerRecommendation[] | undefined
- >(undefined);
-
- /**
- * Constructor
- */
- constructor(private _httpClient: HttpClient) {}
-
- // -----------------------------------------------------------------------------------------------------
- // @ Accessors
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Getter for pagination
- */
- get pagination$(): Observable {
- return this.__pagination.asObservable();
- }
-
- /**
- * Getter for partnerRecommendation
- */
- get partnerRecommendation$(): Observable {
- return this.__partnerRecommendation.asObservable();
- }
-
- /**
- * Getter for partnerRecommendations
- */
- get partnerRecommendations$(): Observable<
- PartnerRecommendation[] | undefined
- > {
- return this.__partnerRecommendations.asObservable();
- }
-
- // -----------------------------------------------------------------------------------------------------
- // @ Public methods
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Get partnerRecommendations
- *
- *
- * @param page
- * @param size
- * @param sort
- * @param order
- * @param search
- */
- getPartnerRecommendations(
- page: number = 0,
- size: number = 10,
- sort: string = 'name',
- order: 'asc' | 'desc' | '' = 'asc',
- search: string = ''
- ): Observable<{
- pagination: PartnerRecommendationPagination;
- partnerRecommendations: PartnerRecommendation[];
- }> {
- return this._httpClient
- .get<{
- pagination: PartnerRecommendationPagination;
- partnerRecommendations: PartnerRecommendation[];
- }>('api/apps/member/partner-recommendation/partner-recommendations', {
- params: {
- page: '' + page,
- size: '' + size,
- sort,
- order,
- search,
- },
- })
- .pipe(
- tap((response) => {
- this.__pagination.next(response.pagination);
- this.__partnerRecommendations.next(response.partnerRecommendations);
- })
- );
- }
-
- /**
- * Get product by id
- */
- getPartnerRecommendationById(
- id: string | null
- ): Observable {
- return this.__partnerRecommendations.pipe(
- take(1),
- map((partnerRecommendations) => {
- // Find the product
- const partnerRecommendation =
- partnerRecommendations?.find((item) => item.id === id) || undefined;
-
- // Update the product
- this.__partnerRecommendation.next(partnerRecommendation);
-
- // Return the product
- return partnerRecommendation;
- }),
- switchMap((product) => {
- if (!product) {
- return throwError('Could not found product with id of ' + id + '!');
- }
-
- return of(product);
- })
- );
- }
-
- /**
- * Create product
- */
- createPartnerRecommendation(): Observable {
- return this.partnerRecommendations$.pipe(
- take(1),
- switchMap((partnerRecommendations) =>
- this._httpClient
- .post(
- 'api/apps/member/partner-recommendation/product',
- {}
- )
- .pipe(
- map((newPartnerRecommendation) => {
- // Update the partnerRecommendations with the new product
- if (!!partnerRecommendations) {
- this.__partnerRecommendations.next([
- newPartnerRecommendation,
- ...partnerRecommendations,
- ]);
- }
-
- // Return the new product
- return newPartnerRecommendation;
- })
- )
- )
- );
- }
-}
diff --git a/src/app/modules/admin/member/partner-store/components/index.ts b/src/app/modules/admin/member/partner-store/components/index.ts
deleted file mode 100644
index 04759eb..0000000
--- a/src/app/modules/admin/member/partner-store/components/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { ListComponent } from './list.component';
-
-export const COMPONENTS = [ListComponent];
diff --git a/src/app/modules/admin/member/partner-store/models/partner-store-pagination.ts b/src/app/modules/admin/member/partner-store/models/partner-store-pagination.ts
deleted file mode 100644
index 3e723c7..0000000
--- a/src/app/modules/admin/member/partner-store/models/partner-store-pagination.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-export interface PartnerStorePagination {
- length: number;
- size: number;
- page: number;
- lastPage: number;
- startIndex: number;
- endIndex: number;
-}
diff --git a/src/app/modules/admin/member/partner-store/models/partner-store.ts b/src/app/modules/admin/member/partner-store/models/partner-store.ts
deleted file mode 100644
index 048280e..0000000
--- a/src/app/modules/admin/member/partner-store/models/partner-store.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-export interface PartnerStore {
- id?: string;
- totalPartnerCount?: number;
- totalHoldingMoney?: number;
- totalComp?: number;
- total?: number;
- branchCount?: number;
- divisionCount?: number;
- officeCount?: number;
- storeCount?: number;
- memberCount?: number;
- nickname?: string;
- accountHolder?: string;
- phoneNumber?: string;
- calculateType?: string;
- ownCash?: number;
- ownComp?: number;
- ownCoupon?: number;
- gameMoney?: number;
- todayComp?: number;
- totalDeposit?: number;
- totalWithdraw?: number;
- balance?: number;
- registDate?: string;
- finalSigninDate?: string;
- ip?: string;
- state?: string;
- note?: string;
-}
diff --git a/src/app/modules/admin/member/partner-store/partner-store.module.ts b/src/app/modules/admin/member/partner-store/partner-store.module.ts
deleted file mode 100644
index 20703db..0000000
--- a/src/app/modules/admin/member/partner-store/partner-store.module.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-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 { 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 { TranslocoModule } from '@ngneat/transloco';
-
-import { SharedModule } from 'app/shared/shared.module';
-
-import { COMPONENTS } from './components';
-
-import { partnerStoreRoutes } from './partner-store.routing';
-
-@NgModule({
- declarations: [COMPONENTS],
- imports: [
- TranslocoModule,
- SharedModule,
- RouterModule.forChild(partnerStoreRoutes),
-
- MatButtonModule,
- MatFormFieldModule,
- MatIconModule,
- MatInputModule,
- MatPaginatorModule,
- MatProgressBarModule,
- MatRippleModule,
- MatSortModule,
- MatSelectModule,
- MatTooltipModule,
- MatGridListModule,
- MatSlideToggleModule,
- MatRadioModule,
- MatCheckboxModule,
- ],
-})
-export class PartnerStoreModule {}
diff --git a/src/app/modules/admin/member/partner-store/partner-store.routing.ts b/src/app/modules/admin/member/partner-store/partner-store.routing.ts
deleted file mode 100644
index ffa65be..0000000
--- a/src/app/modules/admin/member/partner-store/partner-store.routing.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { Route } from '@angular/router';
-
-import { ListComponent } from './components/list.component';
-import { ViewComponent } from '../user/components/view.component';
-
-import { PartnerStoresResolver } from './resolvers/partner-store.resolver';
-import { UserResolver } from '../user/resolvers/user.resolver';
-
-export const partnerStoreRoutes: Route[] = [
- {
- path: '',
- component: ListComponent,
- resolve: {
- partnerStores: PartnerStoresResolver,
- },
- },
- {
- path: ':id',
- component: ViewComponent,
- resolve: {
- users: UserResolver,
- },
- },
-];
diff --git a/src/app/modules/admin/member/partner-store/resolvers/partner-store.resolver.ts b/src/app/modules/admin/member/partner-store/resolvers/partner-store.resolver.ts
deleted file mode 100644
index 42e6c18..0000000
--- a/src/app/modules/admin/member/partner-store/resolvers/partner-store.resolver.ts
+++ /dev/null
@@ -1,89 +0,0 @@
-import { Injectable } from '@angular/core';
-import {
- ActivatedRouteSnapshot,
- Resolve,
- Router,
- RouterStateSnapshot,
-} from '@angular/router';
-import { catchError, Observable, throwError } from 'rxjs';
-
-import { PartnerStore } from '../models/partner-store';
-import { PartnerStorePagination } from '../models/partner-store-pagination';
-import { PartnerStoreService } from '../services/partner-store.service';
-
-@Injectable({
- providedIn: 'root',
-})
-export class PartnerStoreResolver implements Resolve {
- /**
- * Constructor
- */
- constructor(
- private _partnerStoreService: PartnerStoreService,
- private _router: Router
- ) {}
-
- // -----------------------------------------------------------------------------------------------------
- // @ Public methods
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Resolver
- *
- * @param route
- * @param state
- */
- resolve(
- route: ActivatedRouteSnapshot,
- state: RouterStateSnapshot
- ): Observable {
- return this._partnerStoreService
- .getPartnerStoreById(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 PartnerStoresResolver implements Resolve {
- /**
- * Constructor
- */
- constructor(private _partnerStoreService: PartnerStoreService) {}
-
- // -----------------------------------------------------------------------------------------------------
- // @ Public methods
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Resolver
- *
- * @param route
- * @param state
- */
- resolve(
- route: ActivatedRouteSnapshot,
- state: RouterStateSnapshot
- ): Observable<{
- pagination: PartnerStorePagination;
- partnerStores: PartnerStore[];
- }> {
- return this._partnerStoreService.getPartnerStores();
- }
-}
diff --git a/src/app/modules/admin/member/partner-store/services/partner-store.service.ts b/src/app/modules/admin/member/partner-store/services/partner-store.service.ts
deleted file mode 100644
index c0780d6..0000000
--- a/src/app/modules/admin/member/partner-store/services/partner-store.service.ts
+++ /dev/null
@@ -1,158 +0,0 @@
-import { Injectable } from '@angular/core';
-import { HttpClient } from '@angular/common/http';
-import {
- BehaviorSubject,
- filter,
- map,
- Observable,
- of,
- switchMap,
- take,
- tap,
- throwError,
-} from 'rxjs';
-
-import { PartnerStore } from '../models/partner-store';
-import { PartnerStorePagination } from '../models/partner-store-pagination';
-
-@Injectable({
- providedIn: 'root',
-})
-export class PartnerStoreService {
- // Private
- private __pagination = new BehaviorSubject<
- PartnerStorePagination | undefined
- >(undefined);
- private __partnerStore = new BehaviorSubject(
- undefined
- );
- private __partnerStores = new BehaviorSubject(
- undefined
- );
-
- /**
- * Constructor
- */
- constructor(private _httpClient: HttpClient) {}
-
- // -----------------------------------------------------------------------------------------------------
- // @ Accessors
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Getter for pagination
- */
- get pagination$(): Observable {
- return this.__pagination.asObservable();
- }
-
- /**
- * Getter for partnerStore
- */
- get partnerStore$(): Observable {
- return this.__partnerStore.asObservable();
- }
-
- /**
- * Getter for partnerStores
- */
- get partnerStores$(): Observable {
- return this.__partnerStores.asObservable();
- }
-
- // -----------------------------------------------------------------------------------------------------
- // @ Public methods
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Get partnerStores
- *
- *
- * @param page
- * @param size
- * @param sort
- * @param order
- * @param search
- */
- getPartnerStores(
- page: number = 0,
- size: number = 10,
- sort: string = 'name',
- order: 'asc' | 'desc' | '' = 'asc',
- search: string = ''
- ): Observable<{
- pagination: PartnerStorePagination;
- partnerStores: PartnerStore[];
- }> {
- return this._httpClient
- .get<{
- pagination: PartnerStorePagination;
- partnerStores: PartnerStore[];
- }>('api/apps/member/partner-store/partner-stores', {
- params: {
- page: '' + page,
- size: '' + size,
- sort,
- order,
- search,
- },
- })
- .pipe(
- tap((response) => {
- this.__pagination.next(response.pagination);
- this.__partnerStores.next(response.partnerStores);
- })
- );
- }
-
- /**
- * Get product by id
- */
- getPartnerStoreById(id: string | null): Observable {
- return this.__partnerStores.pipe(
- take(1),
- map((partnerStores) => {
- // Find the product
- const partnerStore =
- partnerStores?.find((item) => item.id === id) || undefined;
-
- // Update the product
- this.__partnerStore.next(partnerStore);
-
- // Return the product
- return partnerStore;
- }),
- switchMap((product) => {
- if (!product) {
- return throwError('Could not found product with id of ' + id + '!');
- }
-
- return of(product);
- })
- );
- }
-
- /**
- * Create product
- */
- createPartnerStore(): Observable {
- return this.partnerStores$.pipe(
- take(1),
- switchMap((partnerStores) =>
- this._httpClient
- .post('api/apps/member/partner-store/product', {})
- .pipe(
- map((newPartnerStore) => {
- // Update the partnerStores with the new product
- if (!!partnerStores) {
- this.__partnerStores.next([newPartnerStore, ...partnerStores]);
- }
-
- // Return the new product
- return newPartnerStore;
- })
- )
- )
- );
- }
-}
diff --git a/src/app/modules/admin/member/partner/components/list.component.html b/src/app/modules/admin/member/partner/components/all-list.component.html
similarity index 100%
rename from src/app/modules/admin/member/partner/components/list.component.html
rename to src/app/modules/admin/member/partner/components/all-list.component.html
diff --git a/src/app/modules/admin/member/partner/components/list.component.ts b/src/app/modules/admin/member/partner/components/all-list.component.ts
similarity index 97%
rename from src/app/modules/admin/member/partner/components/list.component.ts
rename to src/app/modules/admin/member/partner/components/all-list.component.ts
index ff0e586..2a9eec0 100644
--- a/src/app/modules/admin/member/partner/components/list.component.ts
+++ b/src/app/modules/admin/member/partner/components/all-list.component.ts
@@ -36,8 +36,8 @@ import { PartnerService } from '../services/partner.service';
import { Router } from '@angular/router';
@Component({
- selector: 'list',
- templateUrl: './list.component.html',
+ selector: 'app-partner-list',
+ templateUrl: './all-list.component.html',
styles: [
/* language=SCSS */
`
@@ -62,7 +62,7 @@ import { Router } from '@angular/router';
changeDetection: ChangeDetectionStrategy.OnPush,
animations: fuseAnimations,
})
-export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
+export class AllListComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
@ViewChild(MatSort) private _sort!: MatSort;
diff --git a/src/app/modules/admin/member/partner-branch/components/list.component.html b/src/app/modules/admin/member/partner/components/branch-list.component.html
similarity index 100%
rename from src/app/modules/admin/member/partner-branch/components/list.component.html
rename to src/app/modules/admin/member/partner/components/branch-list.component.html
diff --git a/src/app/modules/admin/member/partner-branch/components/list.component.ts b/src/app/modules/admin/member/partner/components/branch-list.component.ts
similarity index 90%
rename from src/app/modules/admin/member/partner-branch/components/list.component.ts
rename to src/app/modules/admin/member/partner/components/branch-list.component.ts
index 4b19317..0cf5357 100644
--- a/src/app/modules/admin/member/partner-branch/components/list.component.ts
+++ b/src/app/modules/admin/member/partner/components/branch-list.component.ts
@@ -30,14 +30,16 @@ import { fuseAnimations } from '@fuse/animations';
import { FuseConfirmationService } from '@fuse/services/confirmation';
import { User } from '../../user/models/user';
-import { PartnerBranch } from '../models/partner-branch';
-import { PartnerBranchPagination } from '../models/partner-branch-pagination';
-import { PartnerBranchService } from '../services/partner-branch.service';
+
+import { Partner as PartnerBranch } from '../models/partner';
+import { PartnerPagination as PartnerBranchPagination } from '../models/partner-pagination';
+import { PartnerService as PartnerBranchService } from '../services/partner.service';
+
import { Router } from '@angular/router';
@Component({
- selector: 'partner-branch-list',
- templateUrl: './list.component.html',
+ selector: 'app-partner-branch-list',
+ templateUrl: './branch-list.component.html',
styles: [
/* language=SCSS */
`
@@ -62,11 +64,12 @@ import { Router } from '@angular/router';
changeDetection: ChangeDetectionStrategy.OnPush,
animations: fuseAnimations,
})
-export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
+export class BranchListComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
@ViewChild(MatSort) private _sort!: MatSort;
partnerBranchs$!: Observable;
+
users$!: Observable;
isLoading = false;
@@ -107,7 +110,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
});
// Get the products
- this.partnerBranchs$ = this._partnerBranchService.partnerBranchs$;
+ this.partnerBranchs$ = this._partnerBranchService.partners$;
}
/**
@@ -138,7 +141,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
.pipe(
switchMap(() => {
this.isLoading = true;
- return this._partnerBranchService.getPartnerBranchs(
+ return this._partnerBranchService.getPartners(
this._paginator.pageIndex,
this._paginator.pageSize,
this._sort.active,
diff --git a/src/app/modules/admin/member/partner-division/components/list.component.html b/src/app/modules/admin/member/partner/components/division-list.component.html
similarity index 100%
rename from src/app/modules/admin/member/partner-division/components/list.component.html
rename to src/app/modules/admin/member/partner/components/division-list.component.html
diff --git a/src/app/modules/admin/member/partner-division/components/list.component.ts b/src/app/modules/admin/member/partner/components/division-list.component.ts
similarity index 91%
rename from src/app/modules/admin/member/partner-division/components/list.component.ts
rename to src/app/modules/admin/member/partner/components/division-list.component.ts
index f25e631..a14358b 100644
--- a/src/app/modules/admin/member/partner-division/components/list.component.ts
+++ b/src/app/modules/admin/member/partner/components/division-list.component.ts
@@ -30,14 +30,15 @@ import { fuseAnimations } from '@fuse/animations';
import { FuseConfirmationService } from '@fuse/services/confirmation';
import { User } from '../../user/models/user';
-import { PartnerDivision } from '../models/partner-division';
-import { PartnerDivisionPagination } from '../models/partner-division-pagination';
-import { PartnerDivisionService } from '../services/partner-division.service';
+import { Partner as PartnerDivision } from '../models/partner';
+import { PartnerPagination as PartnerDivisionPagination } from '../models/partner-pagination';
+import { PartnerService as PartnerDivisionService } from '../services/partner.service';
+
import { Router } from '@angular/router';
@Component({
- selector: 'partner-division-list',
- templateUrl: './list.component.html',
+ selector: 'app-partner-division-list',
+ templateUrl: './division-list.component.html',
styles: [
/* language=SCSS */
`
@@ -62,7 +63,7 @@ import { Router } from '@angular/router';
changeDetection: ChangeDetectionStrategy.OnPush,
animations: fuseAnimations,
})
-export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
+export class DivisionListComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
@ViewChild(MatSort) private _sort!: MatSort;
@@ -107,7 +108,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
});
// Get the products
- this.partnerDivisions$ = this._partnerDivisionService.partnerDivisions$;
+ this.partnerDivisions$ = this._partnerDivisionService.partners$;
}
/**
@@ -138,7 +139,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
.pipe(
switchMap(() => {
this.isLoading = true;
- return this._partnerDivisionService.getPartnerDivisions(
+ return this._partnerDivisionService.getPartners(
this._paginator.pageIndex,
this._paginator.pageSize,
this._sort.active,
diff --git a/src/app/modules/admin/member/partner/components/index.ts b/src/app/modules/admin/member/partner/components/index.ts
index 04759eb..9e58cef 100644
--- a/src/app/modules/admin/member/partner/components/index.ts
+++ b/src/app/modules/admin/member/partner/components/index.ts
@@ -1,3 +1,17 @@
-import { ListComponent } from './list.component';
+import { AllListComponent } from './all-list.component';
+import { MainOfficeListComponent } from './main-office-list.component';
+import { BranchListComponent } from './branch-list.component';
+import { DivisionListComponent } from './division-list.component';
+import { OfficeListComponent } from './office-list.component';
+import { RecommendationListComponent } from './recommendation-list.component';
+import { StoreListComponent } from './store-list.component';
-export const COMPONENTS = [ListComponent];
+export const COMPONENTS = [
+ AllListComponent,
+ MainOfficeListComponent,
+ OfficeListComponent,
+ BranchListComponent,
+ DivisionListComponent,
+ RecommendationListComponent,
+ StoreListComponent,
+];
diff --git a/src/app/modules/admin/member/partner-mainoffice/components/list.component.html b/src/app/modules/admin/member/partner/components/main-office-list.component.html
similarity index 100%
rename from src/app/modules/admin/member/partner-mainoffice/components/list.component.html
rename to src/app/modules/admin/member/partner/components/main-office-list.component.html
diff --git a/src/app/modules/admin/member/partner-mainoffice/components/list.component.ts b/src/app/modules/admin/member/partner/components/main-office-list.component.ts
similarity index 89%
rename from src/app/modules/admin/member/partner-mainoffice/components/list.component.ts
rename to src/app/modules/admin/member/partner/components/main-office-list.component.ts
index 3518102..080ed08 100644
--- a/src/app/modules/admin/member/partner-mainoffice/components/list.component.ts
+++ b/src/app/modules/admin/member/partner/components/main-office-list.component.ts
@@ -30,14 +30,14 @@ import { fuseAnimations } from '@fuse/animations';
import { FuseConfirmationService } from '@fuse/services/confirmation';
import { User } from '../../user/models/user';
-import { PartnerMainoffice } from '../models/partner-mainoffice';
-import { PartnerMainofficePagination } from '../models/partner-mainoffice-pagination';
-import { PartnerMainofficeService } from '../services/partner-mainoffice.service';
+import { Partner as PartnerMainoffice } from '../models/partner';
+import { PartnerPagination as PartnerMainofficePagination } from '../models/partner-pagination';
+import { PartnerService as PartnerMainofficeService } from '../services/partner.service';
import { Router } from '@angular/router';
@Component({
- selector: 'partner-mainoffice-list',
- templateUrl: './list.component.html',
+ selector: 'app-partner-main-office-list',
+ templateUrl: './main-office-list.component.html',
styles: [
/* language=SCSS */
`
@@ -62,7 +62,9 @@ import { Router } from '@angular/router';
changeDetection: ChangeDetectionStrategy.OnPush,
animations: fuseAnimations,
})
-export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
+export class MainOfficeListComponent
+ implements OnInit, AfterViewInit, OnDestroy
+{
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
@ViewChild(MatSort) private _sort!: MatSort;
@@ -107,8 +109,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
});
// Get the products
- this.partnerMainoffices$ =
- this._partnerMainofficeService.partnerMainoffices$;
+ this.partnerMainoffices$ = this._partnerMainofficeService.partners$;
}
/**
@@ -139,7 +140,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
.pipe(
switchMap(() => {
this.isLoading = true;
- return this._partnerMainofficeService.getPartnerMainoffices(
+ return this._partnerMainofficeService.getPartners(
this._paginator.pageIndex,
this._paginator.pageSize,
this._sort.active,
diff --git a/src/app/modules/admin/member/partner-office/components/list.component.html b/src/app/modules/admin/member/partner/components/office-list.component.html
similarity index 100%
rename from src/app/modules/admin/member/partner-office/components/list.component.html
rename to src/app/modules/admin/member/partner/components/office-list.component.html
diff --git a/src/app/modules/admin/member/partner-office/components/list.component.ts b/src/app/modules/admin/member/partner/components/office-list.component.ts
similarity index 90%
rename from src/app/modules/admin/member/partner-office/components/list.component.ts
rename to src/app/modules/admin/member/partner/components/office-list.component.ts
index 1b195ba..111189e 100644
--- a/src/app/modules/admin/member/partner-office/components/list.component.ts
+++ b/src/app/modules/admin/member/partner/components/office-list.component.ts
@@ -30,14 +30,16 @@ import { fuseAnimations } from '@fuse/animations';
import { FuseConfirmationService } from '@fuse/services/confirmation';
import { User } from '../../user/models/user';
-import { PartnerOffice } from '../models/partner-office';
-import { PartnerOfficePagination } from '../models/partner-office-pagination';
-import { PartnerOfficeService } from '../services/partner-office.service';
+
+import { Partner as PartnerOffice } from '../models/partner';
+import { PartnerPagination as PartnerOfficePagination } from '../models/partner-pagination';
+import { PartnerService as PartnerOfficeService } from '../services/partner.service';
+
import { Router } from '@angular/router';
@Component({
- selector: 'partner-office-list',
- templateUrl: './list.component.html',
+ selector: 'app-partner-office-list',
+ templateUrl: './office-list.component.html',
styles: [
/* language=SCSS */
`
@@ -62,7 +64,7 @@ import { Router } from '@angular/router';
changeDetection: ChangeDetectionStrategy.OnPush,
animations: fuseAnimations,
})
-export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
+export class OfficeListComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
@ViewChild(MatSort) private _sort!: MatSort;
@@ -107,7 +109,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
});
// Get the products
- this.partnerOffices$ = this._partnerOfficeService.partnerOffices$;
+ this.partnerOffices$ = this._partnerOfficeService.partners$;
}
/**
@@ -138,7 +140,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
.pipe(
switchMap(() => {
this.isLoading = true;
- return this._partnerOfficeService.getPartnerOffices(
+ return this._partnerOfficeService.getPartners(
this._paginator.pageIndex,
this._paginator.pageSize,
this._sort.active,
diff --git a/src/app/modules/admin/member/partner-recommendation/components/list.component.html b/src/app/modules/admin/member/partner/components/recommendation-list.component.html
similarity index 100%
rename from src/app/modules/admin/member/partner-recommendation/components/list.component.html
rename to src/app/modules/admin/member/partner/components/recommendation-list.component.html
diff --git a/src/app/modules/admin/member/partner-recommendation/components/list.component.ts b/src/app/modules/admin/member/partner/components/recommendation-list.component.ts
similarity index 90%
rename from src/app/modules/admin/member/partner-recommendation/components/list.component.ts
rename to src/app/modules/admin/member/partner/components/recommendation-list.component.ts
index ce710ab..29026e9 100644
--- a/src/app/modules/admin/member/partner-recommendation/components/list.component.ts
+++ b/src/app/modules/admin/member/partner/components/recommendation-list.component.ts
@@ -30,14 +30,16 @@ import { fuseAnimations } from '@fuse/animations';
import { FuseConfirmationService } from '@fuse/services/confirmation';
import { User } from '../../user/models/user';
-import { PartnerRecommendation } from '../models/partner-recommendation';
-import { PartnerRecommendationPagination } from '../models/partner-recommendation-pagination';
-import { PartnerRecommendationService } from '../services/partner-recommendation.service';
+
+import { Partner as PartnerRecommendation } from '../models/partner';
+import { PartnerPagination as PartnerRecommendationPagination } from '../models/partner-pagination';
+import { PartnerService as PartnerRecommendationService } from '../services/partner.service';
+
import { Router } from '@angular/router';
@Component({
- selector: 'partner-recommendation-list',
- templateUrl: './list.component.html',
+ selector: 'app-partner-recommendation-list',
+ templateUrl: './recommendation-list.component.html',
styles: [
/* language=SCSS */
`
@@ -62,7 +64,9 @@ import { Router } from '@angular/router';
changeDetection: ChangeDetectionStrategy.OnPush,
animations: fuseAnimations,
})
-export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
+export class RecommendationListComponent
+ implements OnInit, AfterViewInit, OnDestroy
+{
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
@ViewChild(MatSort) private _sort!: MatSort;
@@ -107,8 +111,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
});
// Get the products
- this.partnerRecommendations$ =
- this._partnerRecommendationService.partnerRecommendations$;
+ this.partnerRecommendations$ = this._partnerRecommendationService.partners$;
}
/**
@@ -139,7 +142,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
.pipe(
switchMap(() => {
this.isLoading = true;
- return this._partnerRecommendationService.getPartnerRecommendations(
+ return this._partnerRecommendationService.getPartners(
this._paginator.pageIndex,
this._paginator.pageSize,
this._sort.active,
diff --git a/src/app/modules/admin/member/partner-store/components/list.component.html b/src/app/modules/admin/member/partner/components/store-list.component.html
similarity index 100%
rename from src/app/modules/admin/member/partner-store/components/list.component.html
rename to src/app/modules/admin/member/partner/components/store-list.component.html
diff --git a/src/app/modules/admin/member/partner-store/components/list.component.ts b/src/app/modules/admin/member/partner/components/store-list.component.ts
similarity index 90%
rename from src/app/modules/admin/member/partner-store/components/list.component.ts
rename to src/app/modules/admin/member/partner/components/store-list.component.ts
index 561bb85..c765d70 100644
--- a/src/app/modules/admin/member/partner-store/components/list.component.ts
+++ b/src/app/modules/admin/member/partner/components/store-list.component.ts
@@ -30,14 +30,15 @@ import { fuseAnimations } from '@fuse/animations';
import { FuseConfirmationService } from '@fuse/services/confirmation';
import { User } from '../../user/models/user';
-import { PartnerStore } from '../models/partner-store';
-import { PartnerStorePagination } from '../models/partner-store-pagination';
-import { PartnerStoreService } from '../services/partner-store.service';
+import { Partner as PartnerStore } from '../models/partner';
+import { PartnerPagination as PartnerStorePagination } from '../models/partner-pagination';
+import { PartnerService as PartnerStoreService } from '../services/partner.service';
+
import { Router } from '@angular/router';
@Component({
- selector: 'partner-store-list',
- templateUrl: './list.component.html',
+ selector: 'app-partner-store-list',
+ templateUrl: './store-list.component.html',
styles: [
/* language=SCSS */
`
@@ -62,7 +63,7 @@ import { Router } from '@angular/router';
changeDetection: ChangeDetectionStrategy.OnPush,
animations: fuseAnimations,
})
-export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
+export class StoreListComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
@ViewChild(MatSort) private _sort!: MatSort;
@@ -107,7 +108,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
});
// Get the products
- this.partnerStores$ = this._partnerStoreService.partnerStores$;
+ this.partnerStores$ = this._partnerStoreService.partners$;
}
/**
@@ -138,7 +139,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
.pipe(
switchMap(() => {
this.isLoading = true;
- return this._partnerStoreService.getPartnerStores(
+ return this._partnerStoreService.getPartners(
this._paginator.pageIndex,
this._paginator.pageSize,
this._sort.active,
diff --git a/src/app/modules/admin/member/partner/models/partner.ts b/src/app/modules/admin/member/partner/models/partner.ts
index 97041c0..0b776d2 100644
--- a/src/app/modules/admin/member/partner/models/partner.ts
+++ b/src/app/modules/admin/member/partner/models/partner.ts
@@ -20,6 +20,9 @@ export interface Partner {
comp?: number;
coupon?: number;
ownCharge?: number;
+ ownCash?: number;
+ ownComp?: number;
+ ownCoupon?: number;
bottomCharge?: number;
ownExchange?: number;
bottomExchange?: number;
@@ -28,4 +31,14 @@ export interface Partner {
accession?: string;
state?: string;
note?: string;
+ ip?: string;
+ totalPartnerCount?: number;
+ total?: number;
+ gameMoney?: number;
+ todayComp?: number;
+ totalDeposit?: number;
+ totalWithdraw?: number;
+ balance?: number;
+ registDate?: string;
+ finalSigninDate?: string;
}
diff --git a/src/app/modules/admin/member/partner/partner.module.ts b/src/app/modules/admin/member/partner/partner.module.ts
index 563378d..aee0b43 100644
--- a/src/app/modules/admin/member/partner/partner.module.ts
+++ b/src/app/modules/admin/member/partner/partner.module.ts
@@ -14,6 +14,7 @@ import { MatTooltipModule } from '@angular/material/tooltip';
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 { TranslocoModule } from '@ngneat/transloco';
@@ -43,6 +44,7 @@ import { partnerRoutes } from './partner.routing';
MatGridListModule,
MatSlideToggleModule,
MatRadioModule,
+ MatCheckboxModule,
],
})
export class PartnerModule {}
diff --git a/src/app/modules/admin/member/partner/partner.routing.ts b/src/app/modules/admin/member/partner/partner.routing.ts
index 0cf0c5c..950b85d 100644
--- a/src/app/modules/admin/member/partner/partner.routing.ts
+++ b/src/app/modules/admin/member/partner/partner.routing.ts
@@ -1,24 +1,68 @@
import { Route } from '@angular/router';
-import { ListComponent } from './components/list.component';
-import { ViewComponent } from '../user/components/view.component';
+import { AllListComponent } from './components/all-list.component';
+import { MainOfficeListComponent } from './components/main-office-list.component';
+import { OfficeListComponent } from './components/office-list.component';
+import { BranchListComponent } from './components/branch-list.component';
+import { DivisionListComponent } from './components/division-list.component';
+import { RecommendationListComponent } from './components/recommendation-list.component';
+import { StoreListComponent } from './components/store-list.component';
import { PartnersResolver } from './resolvers/partner.resolver';
-import { UserResolver } from '../user/resolvers/user.resolver';
export const partnerRoutes: Route[] = [
{
path: '',
- component: ListComponent,
+ pathMatch: 'full',
+ redirectTo: 'all',
+ },
+ {
+ path: 'all',
+ component: AllListComponent,
resolve: {
Partners: PartnersResolver,
},
},
{
- path: ':id',
- component: ViewComponent,
+ path: 'main-office',
+ component: MainOfficeListComponent,
resolve: {
- users: UserResolver,
+ Partners: PartnersResolver,
+ },
+ },
+ {
+ path: 'branch',
+ component: BranchListComponent,
+ resolve: {
+ Partners: PartnersResolver,
+ },
+ },
+ {
+ path: 'division',
+ component: DivisionListComponent,
+ resolve: {
+ Partners: PartnersResolver,
+ },
+ },
+ {
+ path: 'recommendation',
+ component: RecommendationListComponent,
+ resolve: {
+ Partners: PartnersResolver,
+ },
+ },
+ {
+ path: 'office',
+ component: OfficeListComponent,
+ resolve: {
+ Partners: PartnersResolver,
+ },
+ },
+ {
+ path: 'store',
+ component: StoreListComponent,
+ resolve: {
+ Partners: PartnersResolver,
},
},
];
diff --git a/src/assets/i18n/ko.json b/src/assets/i18n/ko.json
index 1c3901e..faa1e67 100644
--- a/src/assets/i18n/ko.json
+++ b/src/assets/i18n/ko.json
@@ -6,6 +6,7 @@
"Casinomoney": "CASINO 머니파악",
"Unconnected": "장기미접속회원",
"Project": "프로젝트",
+ "partner-management": "파트너관리",
"All Partner": "전체파트너",
"Partner Mainoffice": "본사",
"Partner Branch": "대본",