diff --git a/src/app/modules/admin/bank/deposit/components/list.component.html b/src/app/modules/admin/bank/deposit/components/list.component.html index e4c9d58..4e6a8db 100644 --- a/src/app/modules/admin/bank/deposit/components/list.component.html +++ b/src/app/modules/admin/bank/deposit/components/list.component.html @@ -25,31 +25,25 @@
-
- - - - -
+ + + + +
+
-
- -
-
- -
+ +
+
+
diff --git a/src/app/modules/admin/member/current-user/components/list.component.html b/src/app/modules/admin/member/current-user/components/list.component.html index ff04a41..e6001ea 100644 --- a/src/app/modules/admin/member/current-user/components/list.component.html +++ b/src/app/modules/admin/member/current-user/components/list.component.html @@ -132,6 +132,7 @@ mat-flat-button class="bet-mat-small-8" [color]="'primary'" + (click)="__onClickMessage($event)" > @@ -140,6 +141,7 @@ mat-flat-button class="bet-mat-small-8" [color]="'primary'" + (click)="viewCasino('eafcf73c-c98b-44a2-847b-751a3aebbaa6')" > 배팅내역 diff --git a/src/app/modules/admin/member/current-user/components/list.component.ts b/src/app/modules/admin/member/current-user/components/list.component.ts index e705f47..f9b60f7 100644 --- a/src/app/modules/admin/member/current-user/components/list.component.ts +++ b/src/app/modules/admin/member/current-user/components/list.component.ts @@ -33,6 +33,8 @@ import { CurrentUser } from '../models/current-user'; import { CurrentUserPagination } from '../models/current-user-pagination'; import { CurrentUserService } from '../services/current-user.service'; import { Router } from '@angular/router'; +import { MatDialog } from '@angular/material/dialog'; +import { MessageComposeComponent } from '../compose/message-compose.component'; @Component({ selector: 'current-user-list', @@ -102,7 +104,8 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { private _fuseConfirmationService: FuseConfirmationService, private _formBuilder: FormBuilder, private _currentUserService: CurrentUserService, - private router: Router + private router: Router, + private _matDialog: MatDialog ) {} // ----------------------------------------------------------------------------------------------------- @@ -205,6 +208,10 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { let url: string = 'member/user/' + id; this.router.navigateByUrl(url); } + viewCasino(id: string): void { + let url: string = 'game/casino'; + this.router.navigateByUrl(url); + } // ----------------------------------------------------------------------------------------------------- // @ Private methods // ----------------------------------------------------------------------------------------------------- @@ -230,4 +237,13 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { __trackByFn(index: number, item: any): any { return item.id || index; } + __onClickMessage(event: MouseEvent): void { + const dialogRef = this._matDialog.open(MessageComposeComponent, { + data: { price: '', memo: '' }, + }); + + dialogRef.afterClosed().subscribe((result) => { + console.log('Compose dialog was closed!'); + }); + } } diff --git a/src/app/modules/admin/member/current-user/compose/index.ts b/src/app/modules/admin/member/current-user/compose/index.ts new file mode 100644 index 0000000..409003d --- /dev/null +++ b/src/app/modules/admin/member/current-user/compose/index.ts @@ -0,0 +1,3 @@ +import { MessageComposeComponent } from './message-compose.component'; + +export const COMPOSE = [MessageComposeComponent]; diff --git a/src/app/modules/admin/member/current-user/compose/message-compose.component.html b/src/app/modules/admin/member/current-user/compose/message-compose.component.html new file mode 100644 index 0000000..1d55301 --- /dev/null +++ b/src/app/modules/admin/member/current-user/compose/message-compose.component.html @@ -0,0 +1,89 @@ +
+ +
+
쪽지보내기
+ +
+ + +
+
+ + 제목 + + +
+
+ + 글쓴이 + + +
+
+ + 받는이 + + +
+ + + 내용 + + + + 선택 + --선택--5008\n**입금계좌문의시(가상계좌1)****출금비밀번호문의시**----탈퇴,졸업관련----**졸업안내----입금관련문의---->>타인명의입금시----환전관련문의----**환전지연안내(환전량 + 증가)**은행점검(뱅킹장애)등으로 충환전지연안내서버점검안내서버점검완료안내 + + + +
+
+ + + + +
+
+
+
diff --git a/src/app/modules/admin/member/current-user/compose/message-compose.component.ts b/src/app/modules/admin/member/current-user/compose/message-compose.component.ts new file mode 100644 index 0000000..6a4639e --- /dev/null +++ b/src/app/modules/admin/member/current-user/compose/message-compose.component.ts @@ -0,0 +1,94 @@ +import { + ChangeDetectorRef, + Component, + Inject, + OnInit, + ViewEncapsulation, +} from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { SiteService } from 'app/modules/polyglot/site/services/site.service'; +import { IdentityService } from 'app/modules/polyglot/identity/services/identity.service'; +import { Site } from 'app/modules/proto/models/site_pb'; + +export interface MessageComposeData { + price: string; + memo: string; +} +export interface MessageComposeResult { + price: string; + memo: string; +} + +@Component({ + selector: 'app-message-compose', + templateUrl: './message-compose.component.html', + encapsulation: ViewEncapsulation.None, +}) +export class MessageComposeComponent implements OnInit { + composeForm!: FormGroup; + sites: any[] = []; + // quillModules: any = { + // toolbar: [ + // ['bold', 'italic', 'underline'], + // [{ align: [] }, { list: 'ordered' }, { list: 'bullet' }], + // ['clean'], + // ], + // }; + + /** + * Constructor + */ + constructor( + public matDialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public data: MessageComposeData, + private _formBuilder: FormBuilder, + private _identityService: IdentityService, + private _changeDetectorRef: ChangeDetectorRef + ) {} + + // ----------------------------------------------------------------------------------------------------- + // @ Lifecycle hooks + // ----------------------------------------------------------------------------------------------------- + + /** + * On init + */ + ngOnInit(): void { + // Create the form + this.composeForm = this._formBuilder.group({ + price: ['', [Validators.required]], + memo: ['', [Validators.required]], + }); + } + + // ----------------------------------------------------------------------------------------------------- + // @ Public methods + // ----------------------------------------------------------------------------------------------------- + + /** + * 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/current-user/current-user.module.ts b/src/app/modules/admin/member/current-user/current-user.module.ts index 9388804..17021a2 100644 --- a/src/app/modules/admin/member/current-user/current-user.module.ts +++ b/src/app/modules/admin/member/current-user/current-user.module.ts @@ -18,16 +18,18 @@ import { MatGridListModule } from '@angular/material/grid-list'; import { MatSlideToggleModule } from '@angular/material/slide-toggle'; import { MatRadioModule } from '@angular/material/radio'; import { MatCardModule } from '@angular/material/card'; +import { MatDialogModule } from '@angular/material/dialog'; import { TranslocoModule } from '@ngneat/transloco'; import { SharedModule } from 'app/shared/shared.module'; +import { COMPOSE } from './compose'; import { COMPONENTS } from './components'; import { currentUserRoutes } from './current-user.routing'; @NgModule({ - declarations: [COMPONENTS], + declarations: [COMPONENTS, COMPOSE], imports: [ TranslocoModule, SharedModule, @@ -50,6 +52,7 @@ import { currentUserRoutes } from './current-user.routing'; MatSlideToggleModule, MatRadioModule, MatCardModule, + MatDialogModule, ], }) export class CurrentUserModule {} diff --git a/src/app/modules/admin/member/partner-recommendation/components/list.component.html b/src/app/modules/admin/member/partner-recommendation/components/list.component.html index 5e8aaec..bb43b7f 100644 --- a/src/app/modules/admin/member/partner-recommendation/components/list.component.html +++ b/src/app/modules/admin/member/partner-recommendation/components/list.component.html @@ -1,333 +1,290 @@ -
- -
- -
- -
- -
추천코드등록
- -
- -
-
- -
- -
- - - - 검색어 - 매장아이디 - 매장닉네임 - - - - - - - - - -
-
- - -
- -
- - -
- -
-
선택
-
상부
-
- 아이디 -
- 닉네임 -
- 상태 -
-
등급
- - - -
- - - -
-
- -
-
{{ partnerRecommendation.highRank }}
-
- {{ partnerRecommendation.signinId }} -
- {{ partnerRecommendation.nickname }} -
- {{ partnerRecommendation.state }} -
-
- {{ partnerRecommendation.rank }} -
-
- {{ partnerRecommendation.bankName }} -
- {{ partnerRecommendation.accountHolder }} -
- {{ partnerRecommendation.accountNumber }} -
- - -
-
-
-
-
- -
- - -
-
- - +
+
+
+
+
- There are no data! -
- -
- - -
- -
-
- -
- -
- - - - 매장아이디 - 매장닉네임 - - - - - - - - - -
-
- -
- - -
- -
-
선택
-
상부
-
- 아이디 -
- 닉네임 -
-
- 등급 -
- 상태 -
- - +
+ 추천코드등록
- - -
+ -
- -
-
{{ partnerRecommendation.highRank }}
-
- {{ partnerRecommendation.signinId }} -
- {{ partnerRecommendation.nickname }} -
-
- {{ partnerRecommendation.rank }} -
- {{ partnerRecommendation.state }} -
-
{{ partnerRecommendation.useOrNot }}
- - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + 상위 + + {{ __getRefererMember(info) }} + + 등급 + {{ info.getMemberClass()?.getName() }} + 아이디 + {{ info.getUsername() }} + 닉네임 + {{ info.getNickname() }} + 머니1000원콤프0P계좌정보 + {{ info.getBankAccount() }} + {{ info.getBankAccount() }} + {{ info.getBankAccount() }} + 상태정상사이트 + {{ info.getSite().getUrl() }} + +
+ +
+
+ + +
+ + +
+ There are no data! +
+
-
- +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + 상위 + + {{ __getRefererMember(info) }} + + 등급 + {{ info.getMemberClass()?.getName() }} + 아이디 + {{ info.getUsername() }} + 닉네임 + {{ info.getNickname() }} + 사용여부Y회원수1 +
+ +
+
+ +
+ + + +
+ There are no data! +
+
- - - - - - -
- There are no data!
-
+
diff --git a/src/app/modules/admin/member/partner-recommendation/components/list.component.ts b/src/app/modules/admin/member/partner-recommendation/components/list.component.ts index b2549a0..023eb50 100644 --- a/src/app/modules/admin/member/partner-recommendation/components/list.component.ts +++ b/src/app/modules/admin/member/partner-recommendation/components/list.component.ts @@ -33,10 +33,14 @@ import { PartnerRecommendation as PartnerRecommendation } from '../models/partne import { PartnerRecommendationPagination as PartnerRecommendationPagination } from '../models/partner-recommendation-pagination'; import { PartnerRecommendationService as PartnerRecommendationService } from '../services/partner-recommendation.service'; -import { Router } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; import { RegistComposeComponent } from '../compose/regist-compose.component'; +import { MatTableDataSource } from '@angular/material/table'; +import { MemberModel } from 'app/modules/proto/models/member_pb'; +import { ListMembersResponse } from 'app/modules/proto/c2se/member_pb'; +import { SelectionModel } from '@angular/cdk/collections'; import { AddComposeComponent } from '../compose/add-compose.component'; import { DeleteComposeComponent } from '../compose/delete-compose.component'; @Component({ @@ -74,15 +78,45 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { @ViewChild(MatPaginator) private _paginator!: MatPaginator; @ViewChild(MatSort) private _sort!: MatSort; - partnerRecommendations$!: Observable; + registPartnerStoreDataSource: MatTableDataSource = + new MatTableDataSource(); + removePartnerStoreDataSource: MatTableDataSource = + new MatTableDataSource(); + + registPartnerStoreTableColumns: string[] = [ + 'select', + 'referrerMember', + 'memberClass', + 'username', + 'nickname', + 'amountMoney', + 'comp', + 'bankInfo', + 'state', + 'site', + ]; + + removePartnerStoreTableColumns: string[] = [ + 'select', + 'referrerMember', + 'memberClass', + 'username', + 'nickname', + 'isUse', + 'memberCount', + ]; __isSearchOpened1 = false; __isSearchOpened2 = false; + listMembers!: MemberModel[]; + isLoading = false; searchInputControl = new FormControl(); selectedPartnerRecommendation?: PartnerRecommendation; pagination?: PartnerRecommendationPagination; + selection = new SelectionModel(true, []); + private _unsubscribeAll: Subject = new Subject(); /** @@ -90,6 +124,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { */ constructor( private _changeDetectorRef: ChangeDetectorRef, + private _activatedRoute: ActivatedRoute, private _fuseConfirmationService: FuseConfirmationService, private _formBuilder: FormBuilder, private _partnerRecommendationService: PartnerRecommendationService, @@ -105,27 +140,40 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { * On init */ ngOnInit(): void { - // Get the pagination - this._partnerRecommendationService.pagination$ - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe((pagination: PartnerRecommendationPagination | undefined) => { - // Update the pagination - this.pagination = pagination; - - // Mark for check - this._changeDetectorRef.markForCheck(); - }); - // Get the products - this.partnerRecommendations$ = - this._partnerRecommendationService.partnerRecommendations$; + this._activatedRoute.data.subscribe((data) => { + let listMemberResult: ListMembersResponse.Result = + data['listPartnerStore']; + + this.listMembers = listMemberResult.getMembersList(); + + this.registPartnerStoreDataSource.data = listMemberResult + .getMembersList() + .filter( + (v: MemberModel) => + v.getMemberClass()?.getId() === + 'e11cac11-3825-4f4e-9cd5-39367f23f973' + ); + this.removePartnerStoreDataSource.data = listMemberResult + .getMembersList() + .filter( + (v: MemberModel) => + v.getMemberClass()?.getId() === + 'e11cac11-3825-4f4e-9cd5-39367f23f973' + ); + + /* console.log('dddd', listMemberResult.getMembersList()); */ + + // Mark for check + this._changeDetectorRef.markForCheck(); + }); } /** * After view init */ ngAfterViewInit(): void { - if (this._sort && this._paginator) { + /* if (this._sort && this._paginator) { // Set the initial sort this._sort.sort({ id: 'signinId', @@ -161,7 +209,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { }) ) .subscribe(); - } + } */ } /** @@ -185,6 +233,31 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { // @ Private methods // ----------------------------------------------------------------------------------------------------- + /** Selects all rows if they are not all selected; otherwise clear selection. */ + __toggleAllRows() { + if (this.__isAllSelected()) { + this.selection.clear(); + return; + } + + this.selection.select(...this.registPartnerStoreDataSource.data); + } + + __isAllSelected() { + const numSelected = this.selection.selected.length; + const numRows = this.registPartnerStoreDataSource.data.length; + return numSelected === numRows; + } + + /** The label for the checkbox on the passed row */ + __checkboxLabel(row?: MemberModel): string { + if (!row) { + return `${this.__isAllSelected() ? 'deselect' : 'select'} all`; + } + return `${ + this.selection.isSelected(row) ? 'deselect' : 'select' + } row ${row.getUsername()}`; + } /** * Create product */ @@ -225,6 +298,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { console.log('Compose dialog was closed!'); }); } + __onClickAdd(event: MouseEvent): void { const dialogRef = this._matDialog.open(AddComposeComponent); @@ -239,4 +313,11 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { console.log('Compose dialog was closed!'); }); } + + __getRefererMember(member: MemberModel): string { + /* console.log(member.getReferrerMember()?.getUsername()); + + const name = member.getReferrerMember()?.getUsername(); */ + return '없음'; + } } 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 index 6e3bed1..3bc163d 100644 --- a/src/app/modules/admin/member/partner-recommendation/partner-recommendation.module.ts +++ b/src/app/modules/admin/member/partner-recommendation/partner-recommendation.module.ts @@ -14,6 +14,7 @@ import { MatTooltipModule } from '@angular/material/tooltip'; import { MatGridListModule } from '@angular/material/grid-list'; import { MatRadioModule } from '@angular/material/radio'; import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatTableModule } from '@angular/material/table'; import { TranslocoModule } from '@ngneat/transloco'; @@ -44,6 +45,7 @@ import { partnerRecommendationRoutes } from './partner-recommendation.routing'; MatGridListModule, MatRadioModule, MatCheckboxModule, + MatTableModule, ], }) 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 index 09265b7..1855b7b 100644 --- a/src/app/modules/admin/member/partner-recommendation/partner-recommendation.routing.ts +++ b/src/app/modules/admin/member/partner-recommendation/partner-recommendation.routing.ts @@ -2,7 +2,10 @@ import { Route } from '@angular/router'; import { ListComponent } from './components/list.component'; -import { PartnerRecommendationsResolver } from './resolvers/partner-recommendation.resolver'; +import { + ListPartnerStoreResolver, + PartnerRecommendationsResolver, +} from './resolvers/partner-recommendation.resolver'; export const partnerRecommendationRoutes: Route[] = [ // { @@ -14,7 +17,7 @@ export const partnerRecommendationRoutes: Route[] = [ path: '', component: ListComponent, resolve: { - PartnerRecommendations: PartnerRecommendationsResolver, + listPartnerStore: ListPartnerStoreResolver, }, }, ]; 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 index 7afce94..cdb770f 100644 --- 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 @@ -5,6 +5,11 @@ import { Router, RouterStateSnapshot, } from '@angular/router'; +import { MemberService } from 'app/modules/polyglot/member/services/member.service'; +import { + ListMembersRequest, + ListMembersResponse, +} from 'app/modules/proto/c2se/member_pb'; import { catchError, Observable, throwError } from 'rxjs'; import { PartnerRecommendation } from '../models/partner-recommendation'; @@ -89,3 +94,35 @@ export class PartnerRecommendationsResolver implements Resolve { return this._partnerRecommendationService.getPartnerRecommendations(); } } + +@Injectable({ + providedIn: 'root', +}) +export class ListPartnerStoreResolver implements Resolve { + /** + * Constructor + */ + constructor(private _memberService: MemberService) {} + + // ----------------------------------------------------------------------------------------------------- + // @ Public methods + // ----------------------------------------------------------------------------------------------------- + + /** + * Resolver + * + * @param route + * @param state + */ + resolve( + route: ActivatedRouteSnapshot, + state: RouterStateSnapshot + ): + | Observable + | Promise + | ListMembersResponse.Result { + let req = new ListMembersRequest(); + + return this._memberService.listMembers(req); + } +} diff --git a/src/app/modules/admin/member/user/components/list.component.html b/src/app/modules/admin/member/user/components/list.component.html index 1704ba6..a1e319b 100644 --- a/src/app/modules/admin/member/user/components/list.component.html +++ b/src/app/modules/admin/member/user/components/list.component.html @@ -236,7 +236,7 @@ -