1. 즐겨찾기 > 프로필 오픈 > 동료삭제시 '소속부서'그룹에서도 삭제되는 문제 수정.
2. 소속부서 인원들은 타 그룹에서 프로필을 오픈한 것 이외에 다른곳에서 프로필 오픈시 동료 추가삭제 버튼 표현하지 않도록 수정.
This commit is contained in:
parent
4d303df05a
commit
dbdc164e0f
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "ucap-webmessenger",
|
||||
"version": "0.0.4",
|
||||
"version": "0.0.5",
|
||||
"author": {
|
||||
"name": "LG CNS",
|
||||
"email": "lgucap@lgcns.com"
|
||||
|
|
|
@ -481,16 +481,18 @@ export class GroupComponent implements OnInit, OnDestroy {
|
|||
);
|
||||
switch (menuType) {
|
||||
case 'VIEW_PROFILE':
|
||||
let useBuddyButton = false;
|
||||
if (
|
||||
!!group &&
|
||||
environment.productConfig.CommonSetting.useMyDeptGroup &&
|
||||
environment.productConfig.CommonSetting.myDeptGroupSeq !== group.seq
|
||||
) {
|
||||
useBuddyButton = true;
|
||||
}
|
||||
this.openProfile.emit({
|
||||
userSeq: userInfo.seq,
|
||||
openProfileOptions: {
|
||||
useDelBuddybutton:
|
||||
!!group &&
|
||||
environment.productConfig.CommonSetting.useMyDeptGroup &&
|
||||
environment.productConfig.CommonSetting.myDeptGroupSeq ===
|
||||
group.seq
|
||||
? false
|
||||
: true
|
||||
useBuddyButton
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
@ -628,15 +630,19 @@ export class GroupComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
onClickOpenProfile(userSeq: number, group: GroupDetailData) {
|
||||
let useBuddyButton = false;
|
||||
if (
|
||||
!!group &&
|
||||
environment.productConfig.CommonSetting.useMyDeptGroup &&
|
||||
environment.productConfig.CommonSetting.myDeptGroupSeq !== group.seq
|
||||
) {
|
||||
useBuddyButton = true;
|
||||
}
|
||||
|
||||
this.openProfile.emit({
|
||||
userSeq,
|
||||
openProfileOptions: {
|
||||
useDelBuddybutton:
|
||||
!!group &&
|
||||
environment.productConfig.CommonSetting.useMyDeptGroup &&
|
||||
environment.productConfig.CommonSetting.myDeptGroupSeq === group.seq
|
||||
? false
|
||||
: true
|
||||
useBuddyButton
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
[isBuddy]="isBuddy"
|
||||
[isFavorit]="isFavorit"
|
||||
[openProfileOptions]="data.openProfileOptions"
|
||||
[useBuddyToggleButton]="useBuddyToggleButton"
|
||||
[authInfo]="authInfo"
|
||||
(openChat)="onClickChat($event)"
|
||||
(sendMessage)="onClickSendMessage($event)"
|
||||
|
|
|
@ -78,8 +78,10 @@ export class ProfileDialogComponent implements OnInit, OnDestroy {
|
|||
isBuddy: boolean;
|
||||
isFavorit: boolean;
|
||||
editableProfileImage: boolean;
|
||||
useBuddyToggleButton: boolean;
|
||||
|
||||
selectAllBuddy2Subscription: Subscription;
|
||||
myDeptUserListSubscription: Subscription;
|
||||
|
||||
constructor(
|
||||
public dialogRef: MatDialogRef<ProfileDialogData, ProfileDialogResult>,
|
||||
|
@ -128,12 +130,37 @@ export class ProfileDialogComponent implements OnInit, OnDestroy {
|
|||
})
|
||||
)
|
||||
.subscribe();
|
||||
|
||||
if (!!this.data.openProfileOptions) {
|
||||
this.useBuddyToggleButton = !!this.data.openProfileOptions.useBuddyButton;
|
||||
} else {
|
||||
this.getCheckMyDeptUser();
|
||||
}
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
if (!!this.selectAllBuddy2Subscription) {
|
||||
this.selectAllBuddy2Subscription.unsubscribe();
|
||||
}
|
||||
if (!!this.myDeptUserListSubscription) {
|
||||
this.myDeptUserListSubscription.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
getCheckMyDeptUser() {
|
||||
this.myDeptUserListSubscription = this.store
|
||||
.pipe(
|
||||
select(
|
||||
AppStore.MessengerSelector.QuerySelector.myDepartmentUserInfoList
|
||||
),
|
||||
map(myDeptUserList => {
|
||||
const users = myDeptUserList.filter(
|
||||
buddy => buddy.seq === this.data.userInfo.seq
|
||||
);
|
||||
this.useBuddyToggleButton = users.length === 0;
|
||||
})
|
||||
)
|
||||
.subscribe();
|
||||
}
|
||||
|
||||
onClickChat(userInfo: UserInfoSS) {
|
||||
|
@ -339,6 +366,8 @@ export class ProfileDialogComponent implements OnInit, OnDestroy {
|
|||
SyncStore.delBuddyAndClear({ seq: param.userInfo.seq })
|
||||
);
|
||||
this.isBuddy = false;
|
||||
|
||||
this.getCheckMyDeptUser();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1015,8 +1015,9 @@ export class Effects {
|
|||
// 소속부서(내부서) 고정그룹 사용시 소속부서원을 삭제하지 않는다.
|
||||
if (
|
||||
environment.productConfig.CommonSetting.useMyDeptGroup &&
|
||||
myDeptUserList.filter(deptUser => deptUser.seq === group.seq)
|
||||
.length > 0
|
||||
environment.productConfig.CommonSetting.fixedGroupSeqs.filter(
|
||||
fixedGroupSeq => fixedGroupSeq === group.seq
|
||||
).length > 0
|
||||
) {
|
||||
// skip;;
|
||||
} else {
|
||||
|
|
|
@ -199,6 +199,9 @@
|
|||
"notificationIsOn": "Notification is on",
|
||||
"notificationIsOff": "Notification is off",
|
||||
"typeMessage": "Type your message.",
|
||||
"btnAttachFile": "Attach files",
|
||||
"btnSticker": "Sticker",
|
||||
"btnTranslate": "Translate",
|
||||
"event": {
|
||||
"inviteToRoomWith": "{{owner}} invited {{inviter}}.",
|
||||
"exitFromRoomWith": "{{exitor}} has left.",
|
||||
|
|
|
@ -199,6 +199,9 @@
|
|||
"notificationIsOn": "알림 켜짐",
|
||||
"notificationIsOff": "알림 꺼짐",
|
||||
"typeMessage": "대화를 입력하세요.",
|
||||
"btnAttachFile": "첨부파일",
|
||||
"btnSticker": "스티커",
|
||||
"btnTranslate": "번역",
|
||||
"event": {
|
||||
"inviteToRoomWith": "{{owner}}이 {{inviter}}을 초대했습니다.",
|
||||
"exitFromRoomWith": "{{exitor}}님이 퇴장하셨습니다.",
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
export interface OpenProfileOptions {
|
||||
useDelBuddybutton?: boolean;
|
||||
useBuddyButton?: boolean;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,12 @@
|
|||
fxLayoutAlign="center center"
|
||||
>
|
||||
<div class="add-option">
|
||||
<button mat-icon-button class="material-icons" (click)="onClickFileInput()">
|
||||
<button
|
||||
mat-icon-button
|
||||
class="material-icons"
|
||||
(click)="onClickFileInput()"
|
||||
matTooltip="{{ 'chat.btnAttachFile' | translate }}"
|
||||
>
|
||||
<mat-icon>attach_file</mat-icon>
|
||||
</button>
|
||||
<input
|
||||
|
@ -20,6 +25,7 @@
|
|||
mat-icon-button
|
||||
class="material-icons"
|
||||
(click)="onClickStickerSelector()"
|
||||
matTooltip="{{ 'chat.btnSticker' | translate }}"
|
||||
>
|
||||
<mat-icon>sentiment_satisfied_alt</mat-icon>
|
||||
</button>
|
||||
|
@ -28,6 +34,7 @@
|
|||
mat-icon-button
|
||||
class="material-icons"
|
||||
(click)="onClickTranslation()"
|
||||
matTooltip="{{ 'chat.btnTranslate' | translate }}"
|
||||
>
|
||||
<mat-icon>g_translate</mat-icon>
|
||||
</button>
|
||||
|
|
|
@ -34,6 +34,7 @@ import { VideoConferenceComponent as MBVideoConferenceComponent } from './compon
|
|||
import { AllimComponent as MBAllimComponent } from './components/message-box/allim.component';
|
||||
import { SearchComponent } from './components/search.component';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { MatTooltipModule } from '@angular/material';
|
||||
|
||||
const COMPONENTS = [
|
||||
FormComponent,
|
||||
|
@ -72,6 +73,7 @@ const PROVIDERS = [DatePipe];
|
|||
MatInputModule,
|
||||
MatButtonModule,
|
||||
MatMenuModule,
|
||||
MatTooltipModule,
|
||||
|
||||
TranslateModule,
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
stroke-linecap="butt"
|
||||
stroke-linejoin="round"
|
||||
class="on"
|
||||
*ngIf="!isBuddy"
|
||||
*ngIf="getShowBuddyToggleBtn('ADD')"
|
||||
(click)="onClickAddBuddy()"
|
||||
matTooltip="{{ 'profile.addBuddy' | translate }}"
|
||||
>
|
||||
|
@ -120,7 +120,7 @@
|
|||
stroke-linecap="butt"
|
||||
stroke-linejoin="round"
|
||||
class="on"
|
||||
*ngIf="getShowBuddyDelBtn()"
|
||||
*ngIf="getShowBuddyToggleBtn('DEL')"
|
||||
(click)="onClickDelBuddy()"
|
||||
matTooltip="{{ 'profile.removeBuddy' | translate }}"
|
||||
>
|
||||
|
|
|
@ -41,6 +41,8 @@ export class ProfileComponent implements OnInit {
|
|||
@Input()
|
||||
openProfileOptions?: OpenProfileOptions;
|
||||
@Input()
|
||||
useBuddyToggleButton: boolean;
|
||||
@Input()
|
||||
authInfo: AuthResponse;
|
||||
|
||||
@Output()
|
||||
|
@ -225,18 +227,21 @@ export class ProfileComponent implements OnInit {
|
|||
return true;
|
||||
}
|
||||
|
||||
getShowBuddyDelBtn(): boolean {
|
||||
if (!!this.isBuddy) {
|
||||
if (
|
||||
!!this.openProfileOptions &&
|
||||
!this.openProfileOptions.useDelBuddybutton
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
getShowBuddyToggleBtn(type: 'DEL' | 'ADD'): boolean {
|
||||
let rtn = false;
|
||||
if (!this.useBuddyToggleButton) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
if (type === 'ADD') {
|
||||
if (!this.isBuddy) {
|
||||
rtn = true;
|
||||
}
|
||||
} else if (type === 'DEL') {
|
||||
if (!!this.isBuddy) {
|
||||
rtn = true;
|
||||
}
|
||||
}
|
||||
return rtn;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user