129 lines
3.4 KiB
Plaintext
129 lines
3.4 KiB
Plaintext
|
private standbyRoomSubject: Subject<void> = new Subject();
|
||
|
|
||
|
this.store
|
||
|
.pipe(
|
||
|
takeUntil(merge(this.ngOnDestroySubject, this.standbyRoomSubject, this.roomIdSubject)),
|
||
|
select(RoomSelector.standbyRooms, this.roomId)
|
||
|
)
|
||
|
.subscribe((standbyRooms) => {
|
||
|
const findRoomId = (standbyRooms || []).filter(
|
||
|
(sbr) => sbr === this.roomId
|
||
|
);
|
||
|
|
||
|
if (!!findRoomId && findRoomId.length > 0 && !!this.currentRoomInfo) {
|
||
|
const dialogRef = this.dialog.open<
|
||
|
SettingDialogComponent,
|
||
|
SettingDialogData,
|
||
|
SettingDialogResult
|
||
|
>(SettingDialogComponent, {
|
||
|
panelClass: 'min-create-dialog',
|
||
|
data: {
|
||
|
roomInfo: this.currentRoomInfo
|
||
|
}
|
||
|
});
|
||
|
|
||
|
dialogRef
|
||
|
.afterClosed()
|
||
|
.pipe(take(1))
|
||
|
.subscribe((result) => {
|
||
|
this.standbyRoomSubject.next();
|
||
|
this.standbyRoomSubject.complete();
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// combineLatest([
|
||
|
// this.store.pipe(select(RoomSelector.room, this.roomId)),
|
||
|
// this.store.pipe(select(RoomSelector.standbyRooms, this.roomId))
|
||
|
// ])
|
||
|
// .pipe(
|
||
|
// takeUntil(merge(this.standbyRoomSubject, this.roomIdSubject)),
|
||
|
// ex(([roomInfo, standbyRooms]) => {
|
||
|
// const findRoomId = (standbyRooms || []).filter(
|
||
|
// (sbr) => sbr === this.roomId
|
||
|
// );
|
||
|
// if (!!findRoomId && findRoomId.length > 0 && !!roomInfo) {
|
||
|
// const dialogRef = this.dialog.open<
|
||
|
// SettingDialogComponent,
|
||
|
// SettingDialogData,
|
||
|
// SettingDialogResult
|
||
|
// >(SettingDialogComponent, {
|
||
|
// panelClass: 'min-create-dialog',
|
||
|
// data: {
|
||
|
// roomInfo
|
||
|
// }
|
||
|
// });
|
||
|
|
||
|
// dialogRef
|
||
|
// .afterClosed()
|
||
|
// .pipe(take(1))
|
||
|
// .subscribe((result) => {
|
||
|
// this.standbyRoomSubject.next();
|
||
|
// this.standbyRoomSubject.complete();
|
||
|
// });
|
||
|
// }
|
||
|
// })
|
||
|
// )
|
||
|
// .subscribe();
|
||
|
// }
|
||
|
|
||
|
|
||
|
this.store.dispatch(
|
||
|
RoomActions.updateTimeRoomInterval({
|
||
|
req: {
|
||
|
roomId: this.roomInfo.roomId,
|
||
|
timerInterval
|
||
|
} as UpdateTimerSetRequest
|
||
|
})
|
||
|
);
|
||
|
|
||
|
|
||
|
this.store.dispatch(
|
||
|
RoomActions.update({
|
||
|
req: {
|
||
|
roomId: this.roomInfo.roomId,
|
||
|
roomName,
|
||
|
receiveAlarm: this.roomInfo.receiveAlarm,
|
||
|
syncAll: roomNameChangeTarget.toUpperCase() === 'ALL' ? true : false
|
||
|
} as UpdateRequest
|
||
|
})
|
||
|
);
|
||
|
|
||
|
|
||
|
width: rect.width - 30 + '',
|
||
|
height: rect.height,
|
||
|
panelClass: 'ucap-edit-group-name-dialog',
|
||
|
data: {
|
||
|
type: 'NICKNAME',
|
||
|
curValue: userInfo.nickName,
|
||
|
placeholder: '닉네임을 설정하세요.',
|
||
|
maxLength: 20,
|
||
|
left: rect.left + 70,
|
||
|
top: rect.top
|
||
|
}
|
||
|
|
||
|
const matDialogConfig: MatDialogConfig = new MatDialogConfig();
|
||
|
|
||
|
matDialogConfig.position = {
|
||
|
left: `${this.data.left}px`,
|
||
|
top: `${this.data.top}px`
|
||
|
};
|
||
|
|
||
|
this.dialogRef.updatePosition(matDialogConfig.position);
|
||
|
|
||
|
matDialogConfig.position = {
|
||
|
left: `${this.data.left}px`,
|
||
|
top: `${this.data.top}px`
|
||
|
};
|
||
|
|
||
|
|
||
|
bottom: 1219.8000183105469
|
||
|
height: 485.3999938964844
|
||
|
left: 460
|
||
|
right: 1494
|
||
|
top: 734.4000244140625
|
||
|
width: 1034
|
||
|
x: 460
|
||
|
y: 734.4000244140625
|
||
|
|
||
|
label, category, dialog {title, contents, button }, error, menu
|