쪽지 답장 기능 추가.
This commit is contained in:
parent
12f09c33dd
commit
4ee3448228
|
@ -20,7 +20,10 @@ import {
|
||||||
AlertDialogResult,
|
AlertDialogResult,
|
||||||
AlertDialogData
|
AlertDialogData
|
||||||
} from '@ucap-webmessenger/ui';
|
} from '@ucap-webmessenger/ui';
|
||||||
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
import {
|
||||||
|
LoginResponse,
|
||||||
|
RoleCode
|
||||||
|
} from '@ucap-webmessenger/protocol-authentication';
|
||||||
import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type';
|
import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type';
|
||||||
import {
|
import {
|
||||||
MessageApiService,
|
MessageApiService,
|
||||||
|
@ -51,6 +54,13 @@ import {
|
||||||
import * as AppStore from '@app/store';
|
import * as AppStore from '@app/store';
|
||||||
import * as MessageStore from '@app/store/messenger/message';
|
import * as MessageStore from '@app/store/messenger/message';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
import {
|
||||||
|
MessageWriteDialogComponent,
|
||||||
|
MessageWriteDialogResult,
|
||||||
|
MessageWriteDialogData
|
||||||
|
} from '../../dialogs/message/message-write.dialog.component';
|
||||||
|
import { UserInfo } from '@ucap-webmessenger/protocol-sync';
|
||||||
|
import { EmployeeType } from '@ucap-webmessenger/protocol-room';
|
||||||
|
|
||||||
export interface MessageTypeData {
|
export interface MessageTypeData {
|
||||||
displayName: string;
|
displayName: string;
|
||||||
|
@ -172,6 +182,7 @@ export class MessageBoxComponent
|
||||||
MessageDetailDialogResult
|
MessageDetailDialogResult
|
||||||
>(MessageDetailDialogComponent, {
|
>(MessageDetailDialogComponent, {
|
||||||
width: '600px',
|
width: '600px',
|
||||||
|
hasBackdrop: false,
|
||||||
data: {
|
data: {
|
||||||
detail: info,
|
detail: info,
|
||||||
loginRes: this.loginRes,
|
loginRes: this.loginRes,
|
||||||
|
@ -192,6 +203,10 @@ export class MessageBoxComponent
|
||||||
// 단건 발송취소(예약)
|
// 단건 발송취소(예약)
|
||||||
this.doMessageCancelReservation(result.messageInfo);
|
this.doMessageCancelReservation(result.messageInfo);
|
||||||
break;
|
break;
|
||||||
|
case 'REPLY':
|
||||||
|
// 답장
|
||||||
|
this.doMessageReply(result.messageInfo);
|
||||||
|
break;
|
||||||
case 'UPDATE':
|
case 'UPDATE':
|
||||||
// 예약 수정
|
// 예약 수정
|
||||||
this.getRetrieveMessage(MessageType.Reservation, 0);
|
this.getRetrieveMessage(MessageType.Reservation, 0);
|
||||||
|
@ -367,6 +382,24 @@ export class MessageBoxComponent
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
doMessageReply(messageInfo: MessageDetailInfo): void {
|
||||||
|
this.dialogService.open<
|
||||||
|
MessageWriteDialogComponent,
|
||||||
|
MessageWriteDialogData,
|
||||||
|
MessageWriteDialogResult
|
||||||
|
>(MessageWriteDialogComponent, {
|
||||||
|
width: '600px',
|
||||||
|
height: '600px',
|
||||||
|
disableClose: true,
|
||||||
|
hasBackdrop: false,
|
||||||
|
data: {
|
||||||
|
loginRes: this.loginRes,
|
||||||
|
environmentsInfo: this.environmentsInfo,
|
||||||
|
receiverList: [this.convertDetailReceivertoUserInfo(messageInfo)]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private setMessageTypeData() {
|
private setMessageTypeData() {
|
||||||
const messageTypeData = this.translateService.instant('message.type');
|
const messageTypeData = this.translateService.instant('message.type');
|
||||||
|
|
||||||
|
@ -394,4 +427,40 @@ export class MessageBoxComponent
|
||||||
|
|
||||||
this.messageTypeList = messageTypeList;
|
this.messageTypeList = messageTypeList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private convertDetailReceivertoUserInfo(base: MessageDetailInfo): UserInfo {
|
||||||
|
return {
|
||||||
|
seq: base.sendUserSeq,
|
||||||
|
name: base.sendUserName,
|
||||||
|
profileImageFile: '',
|
||||||
|
grade: '',
|
||||||
|
intro: '',
|
||||||
|
companyCode: '',
|
||||||
|
hpNumber: '',
|
||||||
|
lineNumber: '',
|
||||||
|
email: '',
|
||||||
|
isMobile: false,
|
||||||
|
deptName: '',
|
||||||
|
isFavorit: false,
|
||||||
|
isBuddy: false,
|
||||||
|
isActive: false,
|
||||||
|
roleCd: RoleCode.Self,
|
||||||
|
employeeNum: '',
|
||||||
|
madn: '',
|
||||||
|
hardSadn: '',
|
||||||
|
fmcSadn: '',
|
||||||
|
nameEn: '',
|
||||||
|
nameCn: '',
|
||||||
|
gradeEn: '',
|
||||||
|
gradeCn: '',
|
||||||
|
deptNameEn: '',
|
||||||
|
deptNameCn: '',
|
||||||
|
isPrivacyAgree: false,
|
||||||
|
isValidLogin: false,
|
||||||
|
employeeType: EmployeeType.Regular,
|
||||||
|
nickName: '',
|
||||||
|
|
||||||
|
order: ''
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<mat-card class="confirm-card mat-elevation-z">
|
<mat-card class="confirm-card mat-elevation-z">
|
||||||
<mat-card-header>
|
<mat-card-header cdkDrag cdkDragRootElement=".cdk-overlay-pane" cdkDragHandle>
|
||||||
<mat-card-title>
|
<mat-card-title>
|
||||||
<ng-container [ngSwitch]="messageInfo.type">
|
<ng-container [ngSwitch]="messageInfo.type">
|
||||||
<span *ngSwitchCase="MessageType.Receive">{{
|
<span *ngSwitchCase="MessageType.Receive">{{
|
||||||
|
@ -249,11 +249,14 @@
|
||||||
</mat-drawer>
|
</mat-drawer>
|
||||||
</mat-drawer-container>
|
</mat-drawer-container>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<!-- <mat-card-actions class="button-farm flex-row">
|
<mat-card-actions class="button-farm flex-row">
|
||||||
<button mat-stroked-button (click)="onClickConfirm()" class="mat-primary">
|
<button mat-stroked-button (click)="onClickConfirm()" class="mat-primary">
|
||||||
Confirm
|
{{ 'common.messages.confirm' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</mat-card-actions> -->
|
<button mat-flat-button (click)="onClickReply()" class="mat-primary">
|
||||||
|
{{ 'message.sendReply' | translate }}
|
||||||
|
</button>
|
||||||
|
</mat-card-actions>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|
||||||
<mat-menu #messageMenu="matMenu" xPosition="after" yPosition="below">
|
<mat-menu #messageMenu="matMenu" xPosition="after" yPosition="below">
|
||||||
|
|
|
@ -655,4 +655,11 @@ export class MessageDetailDialogComponent implements OnInit {
|
||||||
returnType: 'CLOSE'
|
returnType: 'CLOSE'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onClickReply(): void {
|
||||||
|
this.dialogRef.close({
|
||||||
|
returnType: 'REPLY',
|
||||||
|
messageInfo: this.messageInfo
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<mat-card class="confirm-card mat-elevation-z">
|
<mat-card class="confirm-card mat-elevation-z">
|
||||||
<mat-card-header>
|
<mat-card-header cdkDrag cdkDragRootElement=".cdk-overlay-pane" cdkDragHandle>
|
||||||
<mat-card-title>
|
<mat-card-title>
|
||||||
{{ (isModify ? 'message.modify' : 'message.sendTo') | translate }}
|
{{ (isModify ? 'message.modify' : 'message.sendTo') | translate }}
|
||||||
</mat-card-title>
|
</mat-card-title>
|
||||||
|
|
|
@ -295,6 +295,7 @@
|
||||||
"modify": "Modify message",
|
"modify": "Modify message",
|
||||||
"sendTo": "Send message",
|
"sendTo": "Send message",
|
||||||
"sendReservation": "Send reservation",
|
"sendReservation": "Send reservation",
|
||||||
|
"sendReply": "Send reply",
|
||||||
"placeholderForSearch": "search for name, title, content",
|
"placeholderForSearch": "search for name, title, content",
|
||||||
"searchTypeName": "Name",
|
"searchTypeName": "Name",
|
||||||
"searchTypeTitle": "Title",
|
"searchTypeTitle": "Title",
|
||||||
|
|
|
@ -295,6 +295,7 @@
|
||||||
"modify": "쪽지 수정",
|
"modify": "쪽지 수정",
|
||||||
"sendTo": "쪽지 보내기",
|
"sendTo": "쪽지 보내기",
|
||||||
"sendReservation": "쪽지 예약 보내기",
|
"sendReservation": "쪽지 예약 보내기",
|
||||||
|
"sendReply": "답장",
|
||||||
"placeholderForSearch": "이름, 제목, 내용 검색",
|
"placeholderForSearch": "이름, 제목, 내용 검색",
|
||||||
"searchTypeName": "이름",
|
"searchTypeName": "이름",
|
||||||
"searchTypeTitle": "제목",
|
"searchTypeTitle": "제목",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user