This commit is contained in:
Park Byung Eun 2022-08-24 03:01:30 +00:00
parent 4980163e55
commit 39d9fc0f19
2 changed files with 8 additions and 5 deletions

View File

@ -209,7 +209,7 @@
<th mat-header-cell *matHeaderCellDef>상위</th> <th mat-header-cell *matHeaderCellDef>상위</th>
<td mat-cell *matCellDef="let info"> <td mat-cell *matCellDef="let info">
<span class="font-medium text-right"> <span class="font-medium text-right">
{{ __getParentUserName(info) }} {{ __getRefferMemberUserName(info) }}
</span> </span>
</td> </td>
</ng-container> </ng-container>

View File

@ -19,7 +19,7 @@ import { FuseConfirmationService } from '@fuse/services/confirmation';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { MatTableDataSource } from '@angular/material/table'; import { MatTableDataSource } from '@angular/material/table';
import { MemberModel } from 'app/modules/proto/models/member_pb'; import { Member, MemberModel } from 'app/modules/proto/models/member_pb';
import { ListMembersResponse } from 'app/modules/proto/c2se/member_pb'; import { ListMembersResponse } from 'app/modules/proto/c2se/member_pb';
import { SelectionModel } from '@angular/cdk/collections'; import { SelectionModel } from '@angular/cdk/collections';
@ -377,10 +377,13 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
}); });
} }
__getRefferMemberUserName(info: MemberReferrerModel): string {
const find = this.listMembers.find(
(m) => m.getId() === info.getMember()?.getParentMemberId()
);
return !!find ? find.getUsername() : '없음';
}
__getParentUserName(info: MemberModel): string { __getParentUserName(info: MemberModel): string {
/* console.log(member.getReferrerMember()?.getUsername());
const name = member.getReferrerMember()?.getUsername(); */
const find = this.listMembers.find( const find = this.listMembers.find(
(m) => m.getId() === info.getParentMember()?.getId() (m) => m.getId() === info.getParentMember()?.getId()
); );