This commit is contained in:
leejh 2019-10-18 13:02:51 +09:00
commit 7b67d21ff3
6 changed files with 53 additions and 42 deletions

View File

@ -5,7 +5,7 @@
<mat-icon>chat</mat-icon>
</button>
</div>
<mat-tab-group mat-stretch-tabs>
<mat-tab-group mat-stretch-tabs animationDuration="0ms">
<mat-tab>
<ng-template mat-tab-label>
<mat-icon>group</mat-icon>
@ -14,8 +14,14 @@
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>
<mat-icon [matBadgeHidden]="((badgeChatUnReadCount$ | async) <= 0)" [matBadge]="badgeChatUnReadCount$ | async"
matBadgeDescription="확인하지 않은 메시지가 있습니다." matBadgeColor="accent" matBadgePosition="above after">chat</mat-icon>
<mat-icon
[matBadgeHidden]="(badgeChatUnReadCount$ | async) <= 0"
[matBadge]="badgeChatUnReadCount$ | async"
matBadgeDescription="확인하지 않은 메시지가 있습니다."
matBadgeColor="accent"
matBadgePosition="above after"
>chat</mat-icon
>
</ng-template>
<app-layout-chat-left-sidenav-chat></app-layout-chat-left-sidenav-chat>
</mat-tab>

View File

@ -82,9 +82,7 @@ export class GroupComponent implements OnInit, OnDestroy {
loginRes: LoginResponse;
loginResSubscription: Subscription;
sessionVerinfo = this.sessionStorageService.get<VersionInfo2Response>(
KEY_VER_INFO
);
sessionVerinfo: VersionInfo2Response;
constructor(
private store: Store<any>,
@ -94,6 +92,9 @@ export class GroupComponent implements OnInit, OnDestroy {
) {}
ngOnInit() {
this.sessionVerinfo = this.sessionStorageService.get<VersionInfo2Response>(
KEY_VER_INFO
);
const loginInfo = this.sessionStorageService.get<LoginInfo>(KEY_LOGIN_INFO);
this.companyCode = loginInfo.companyCode;
@ -148,6 +149,7 @@ export class GroupComponent implements OnInit, OnDestroy {
}
ngOnDestroy(): void {
this.logger.debug('ngOnDestroy');
if (!!this.loginResSubscription) {
this.loginResSubscription.unsubscribe();
}

View File

@ -1,51 +1,57 @@
<mat-accordion #groupAccordion="matAccordion" [multi]="true">
<mat-expansion-panel *ngIf="favoritBuddyList.length > 0 && !checkable" [togglePosition]="'before'">
<mat-accordion
#groupAccordion="matAccordion"
[multi]="true"
[displayMode]="'flat'"
>
<mat-expansion-panel
*ngIf="favoritBuddyList.length > 0 && !checkable"
[togglePosition]="'before'"
>
<mat-expansion-panel-header>
<mat-panel-title> 즐겨찾기 </mat-panel-title>
<mat-panel-description> </mat-panel-description>
</mat-expansion-panel-header>
<ng-container *ngFor="let favUserList of favoritBuddyList">
<ng-template [ngTemplateOutlet]="expansionPanelItemTemplateRef"
[ngTemplateOutletContext]="{ $implicit: favUserList }">
<ng-template
[ngTemplateOutlet]="expansionPanelItemTemplateRef"
[ngTemplateOutletContext]="{ $implicit: favUserList }"
>
</ng-template>
</ng-container>
<!-- <ucap-profile-user-list-item
*ngFor="let favUserList of favoritBuddyList"
[userInfo]="favUserList"
(click)="onClickBuddy(favUserList)"
>
</ucap-profile-user-list-item> -->
</mat-expansion-panel>
<mat-expansion-panel *ngFor="let groupBuddy of groupBuddyList" [togglePosition]="'before'">
<mat-expansion-panel
*ngFor="let groupBuddy of groupBuddyList"
[togglePosition]="'before'"
>
<mat-expansion-panel-header>
<mat-panel-title> {{ groupBuddy.group.name }} </mat-panel-title>
<mat-panel-description>
<span class="more-spacer"></span>
<button mat-icon-button aria-label="group menu" *ngIf="!checkable"
(click)="onClickMore($event, groupBuddy.group)">
<button
mat-icon-button
aria-label="group menu"
*ngIf="!checkable"
(click)="onClickMore($event, groupBuddy.group)"
>
<mat-icon>more_vert</mat-icon>
</button>
<mat-checkbox *ngIf="checkable" #checkbox [checked]="getCheckedGroup(groupBuddy)"
(change)="onChangeCheck(checkbox.checked, groupBuddy)" (click)="$event.stopPropagation()"></mat-checkbox>
<mat-checkbox
*ngIf="checkable"
#checkbox
[checked]="getCheckedGroup(groupBuddy)"
(change)="onChangeCheck(checkbox.checked, groupBuddy)"
(click)="$event.stopPropagation()"
></mat-checkbox>
</mat-panel-description>
</mat-expansion-panel-header>
<ng-container *ngFor="let userInfo of groupBuddy.buddyList">
<ng-template [ngTemplateOutlet]="expansionPanelItemTemplateRef"
[ngTemplateOutletContext]="{ $implicit: userInfo }"></ng-template>
<ng-template
[ngTemplateOutlet]="expansionPanelItemTemplateRef"
[ngTemplateOutletContext]="{ $implicit: userInfo }"
></ng-template>
</ng-container>
<!-- <ucap-profile-user-list-item
*ngFor="let userInfo of groupBuddy.buddyList"
[userInfo]="userInfo"
(click)="onClickBuddy(userInfo)"
>
</ucap-profile-user-list-item> -->
<!-- <ucap-profile-user-list-item *ngFor="let userInfo of groupBuddy.buddyList" [userInfo]="userInfo"
[presence]="presence">
</ucap-profile-user-list-item> -->
</mat-expansion-panel>
</mat-accordion>

View File

@ -4,8 +4,8 @@
<span
class="presence"
[ngClass]="getPresence(PresenceType.PC)"
*ngIf="userPresence && userPresence.pcStatus"
>{{ userPresence.pcStatus }}
*ngIf="presence && presence.pcStatus"
>{{ presence.pcStatus }}
</span>
<dl class="item-default">
<dt>

View File

@ -37,9 +37,7 @@ export class UserListItemComponent implements OnInit, OnDestroy {
@Input()
profileImageRoot?: string;
@Input()
set presence(value: StatusBulkInfo | StatusInfo) {
this.userPresence = value;
}
presence: StatusBulkInfo | StatusInfo;
@Input()
checkable = false;
@Input()
@ -58,7 +56,6 @@ export class UserListItemComponent implements OnInit, OnDestroy {
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN;
}>();
userPresence: StatusBulkInfo | StatusInfo;
PresenceType = PresenceType;
// private profileImageRootSubscription: Subscription;
@ -94,7 +91,7 @@ export class UserListItemComponent implements OnInit, OnDestroy {
let rtnClass = '';
switch (type) {
case 'pc':
status = this.userPresence.pcStatus;
status = this.presence.pcStatus;
break;
}

View File

@ -8,10 +8,10 @@ import { ucapAnimations } from '../animations';
selector: 'ucap-ui-imaage',
template: `
<img
#imageElement
[src]="imageSrc"
[style]="baseStyle"
[ngClass]="classList"
[@fadeInOut]
/>
`,
styles: [],