bug fix
This commit is contained in:
parent
1a3201d231
commit
5838b6d7c5
|
@ -361,24 +361,6 @@ 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);
|
this.getParentMembers(this.currentMember);
|
||||||
console.log(this.parentMembers);
|
console.log(this.parentMembers);
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ import { Route } from '@angular/router';
|
||||||
import { ListComponent } from 'app/modules/admin/member/user/components/list.component';
|
import { ListComponent } from 'app/modules/admin/member/user/components/list.component';
|
||||||
import { ViewComponent } from 'app/modules/admin/member/user/components/view.component';
|
import { ViewComponent } from 'app/modules/admin/member/user/components/view.component';
|
||||||
import {
|
import {
|
||||||
|
ListAllMemberResolver,
|
||||||
ListMemberResolver,
|
ListMemberResolver,
|
||||||
MemberResolver,
|
MemberResolver,
|
||||||
} from 'app/shared/resolvers/member.resolver';
|
} from 'app/shared/resolvers/member.resolver';
|
||||||
|
@ -28,7 +29,7 @@ export const userRoutes: Route[] = [
|
||||||
component: ViewComponent,
|
component: ViewComponent,
|
||||||
resolve: {
|
resolve: {
|
||||||
member: MemberResolver,
|
member: MemberResolver,
|
||||||
listmembers: ListMemberResolver,
|
listmembers: ListAllMemberResolver,
|
||||||
listMemberLevels: ListMemberLevelsResolver,
|
listMemberLevels: ListMemberLevelsResolver,
|
||||||
listMemberBanks: ListMemberBanksResolver,
|
listMemberBanks: ListMemberBanksResolver,
|
||||||
listSites: SiteResolver,
|
listSites: SiteResolver,
|
||||||
|
|
|
@ -14,6 +14,37 @@ import { GetMemberResponse } from 'app/modules/proto/c2se/member_pb';
|
||||||
|
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root',
|
||||||
|
})
|
||||||
|
export class ListAllMemberResolver implements Resolve<any> {
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*/
|
||||||
|
constructor(private _router: Router, private _memberService: MemberService) {}
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------------------------------
|
||||||
|
// @ Public methods
|
||||||
|
// -----------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resolver
|
||||||
|
*
|
||||||
|
* @param route
|
||||||
|
* @param state
|
||||||
|
*/
|
||||||
|
|
||||||
|
resolve(
|
||||||
|
route: ActivatedRouteSnapshot,
|
||||||
|
state: RouterStateSnapshot
|
||||||
|
):
|
||||||
|
| Observable<ListMembersResponse.Result>
|
||||||
|
| Promise<ListMembersResponse.Result>
|
||||||
|
| ListMembersResponse.Result {
|
||||||
|
let req = new ListMembersRequest();
|
||||||
|
return this._memberService.listMembers(req);
|
||||||
|
}
|
||||||
|
}
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user