Merge branch 'feature/BETERAN-BACKEND-APP-BROWSER-init' of https://gitlab.loafle.net/bet/beteran-backend-app-browser into feature/BETERAN-BACKEND-APP-BROWSER-init
This commit is contained in:
commit
f0c418a658
|
@ -25,16 +25,17 @@
|
||||||
>on00, on01, on02</span
|
>on00, on01, on02</span
|
||||||
> -->
|
> -->
|
||||||
<mat-chip-list aria-label="Fish selection">
|
<mat-chip-list aria-label="Fish selection">
|
||||||
<mat-chip color="accent">on00</mat-chip>
|
<mat-chip
|
||||||
<mat-chip color="accent">on01</mat-chip>
|
*ngFor="let parent of parentMembers"
|
||||||
<mat-chip color="accent" selected>on02</mat-chip>
|
color="accent"
|
||||||
<mat-chip color="accent" selected>on03</mat-chip>
|
>{{ parent.getUsername() }}</mat-chip
|
||||||
|
>
|
||||||
</mat-chip-list>
|
</mat-chip-list>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center text-secondary my-1">
|
<div class="flex items-center text-secondary my-1">
|
||||||
<span>사이트명</span>
|
<span>사이트명</span>
|
||||||
<span class="mx-2">•</span>
|
<span class="mx-2">•</span>
|
||||||
<span>test.com</span>
|
<span>{{ currentMember?.getSite()?.getUrl() }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center text-secondary my-1">
|
<div class="flex items-center text-secondary my-1">
|
||||||
<span>가입일자</span>
|
<span>가입일자</span>
|
||||||
|
@ -46,7 +47,7 @@
|
||||||
<div class="flex items-center text-secondary my-1">
|
<div class="flex items-center text-secondary my-1">
|
||||||
<span>하부회원수</span>
|
<span>하부회원수</span>
|
||||||
<span class="mx-2">•</span>
|
<span class="mx-2">•</span>
|
||||||
<span>0명</span>
|
<span>{{ currentMember?.getChildMemberCount() }}명</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center text-secondary my-1">
|
<div class="flex items-center text-secondary my-1">
|
||||||
<span>총입금</span>
|
<span>총입금</span>
|
||||||
|
|
|
@ -26,6 +26,7 @@ import { FuseConfirmationService } from '@fuse/services/confirmation';
|
||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
import {
|
import {
|
||||||
GetMemberResponse,
|
GetMemberResponse,
|
||||||
|
ListMembersResponse,
|
||||||
UpdateMemberForPasswordRequest,
|
UpdateMemberForPasswordRequest,
|
||||||
UpdateMemberForStateRequest,
|
UpdateMemberForStateRequest,
|
||||||
UpdateMemberRequest,
|
UpdateMemberRequest,
|
||||||
|
@ -132,7 +133,9 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
fuseAlertConfirmConfigForm!: FormGroup;
|
fuseAlertConfirmConfigForm!: FormGroup;
|
||||||
|
|
||||||
/* currentMember?: User; */
|
/* currentMember?: User; */
|
||||||
|
listMembers?: MemberModel[];
|
||||||
currentMember?: MemberModel;
|
currentMember?: MemberModel;
|
||||||
|
parentMembers?: MemberModel[] = [];
|
||||||
|
|
||||||
panels: any[] = [];
|
panels: any[] = [];
|
||||||
selectedPanel: string = 'accountInfo';
|
selectedPanel: string = 'accountInfo';
|
||||||
|
@ -300,8 +303,10 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
});
|
});
|
||||||
|
|
||||||
this._activatedRoute.data.subscribe((data) => {
|
this._activatedRoute.data.subscribe((data) => {
|
||||||
let member: GetMemberResponse.Result = data['member'];
|
let listMembers: ListMembersResponse.Result = data['listmembers'];
|
||||||
|
this.listMembers = listMembers.getMembersList();
|
||||||
|
|
||||||
|
let member: GetMemberResponse.Result = data['member'];
|
||||||
this.currentMember = member.getMember();
|
this.currentMember = member.getMember();
|
||||||
|
|
||||||
let listMemberLevelsResult: ListMemberLevelsResponse.Result =
|
let listMemberLevelsResult: ListMemberLevelsResponse.Result =
|
||||||
|
@ -356,6 +361,27 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
canBetSlot: memberGameSetting?.getCanBetSlot(),
|
canBetSlot: memberGameSetting?.getCanBetSlot(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const firstParent = this.currentMember?.getParentMember();
|
||||||
|
if (!!firstParent) {
|
||||||
|
const secondParent = this.listMembers.find(
|
||||||
|
(v) => v.getId() === firstParent?.getParentMemberId()
|
||||||
|
);
|
||||||
|
if (!!secondParent) {
|
||||||
|
const thirdParent = this.listMembers.find(
|
||||||
|
(v) => v.getId() === secondParent?.getParentMember()?.getId()
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!!thirdParent) {
|
||||||
|
const fourParent = this.listMembers.find(
|
||||||
|
(v) => v.getId() === thirdParent?.getParentMember()?.getId()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.getParentMembers(this.currentMember);
|
||||||
|
console.log(this.parentMembers);
|
||||||
|
|
||||||
// Mark for check
|
// Mark for check
|
||||||
this._changeDetectorRef.markForCheck();
|
this._changeDetectorRef.markForCheck();
|
||||||
});
|
});
|
||||||
|
@ -803,4 +829,16 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private getParentMembers(member: MemberModel | undefined): void {
|
||||||
|
const findMember = this.listMembers?.find(
|
||||||
|
(v) => v.getId() === member?.getParentMember()?.getId()
|
||||||
|
);
|
||||||
|
if (!!findMember) {
|
||||||
|
this.parentMembers?.push(findMember);
|
||||||
|
this.getParentMembers(findMember);
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@ export const userRoutes: Route[] = [
|
||||||
component: ViewComponent,
|
component: ViewComponent,
|
||||||
resolve: {
|
resolve: {
|
||||||
member: MemberResolver,
|
member: MemberResolver,
|
||||||
|
listmembers: ListMemberResolver,
|
||||||
listMemberLevels: ListMemberLevelsResolver,
|
listMemberLevels: ListMemberLevelsResolver,
|
||||||
listMemberBanks: ListMemberBanksResolver,
|
listMemberBanks: ListMemberBanksResolver,
|
||||||
listSites: SiteResolver,
|
listSites: SiteResolver,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user