# 이슈처리
42 스크롤 좌측으로 보여짐 :: 스크롤 위치 수정. 46 그룹 특수문자 입력 가능함 :: form validator 추가로 유효성 검사 추가.
This commit is contained in:
parent
c3296091cb
commit
e213e99913
|
@ -4,6 +4,10 @@
|
||||||
|
|
||||||
//조직도 레이아웃 변경
|
//조직도 레이아웃 변경
|
||||||
::ng-deep .dialog-org {
|
::ng-deep .dialog-org {
|
||||||
|
.ps__rail-y {
|
||||||
|
left: auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
.oraganization-tab {
|
.oraganization-tab {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 380px;
|
height: 380px;
|
||||||
|
|
|
@ -4,10 +4,15 @@ import {
|
||||||
OnInit,
|
OnInit,
|
||||||
OnDestroy,
|
OnDestroy,
|
||||||
Inject,
|
Inject,
|
||||||
EventEmitter,
|
|
||||||
ChangeDetectorRef
|
ChangeDetectorRef
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
import {
|
||||||
|
FormGroup,
|
||||||
|
FormBuilder,
|
||||||
|
Validators,
|
||||||
|
ValidatorFn,
|
||||||
|
AbstractControl
|
||||||
|
} from '@angular/forms';
|
||||||
import {
|
import {
|
||||||
MatDialogRef,
|
MatDialogRef,
|
||||||
MAT_DIALOG_DATA,
|
MAT_DIALOG_DATA,
|
||||||
|
@ -15,11 +20,10 @@ import {
|
||||||
} from '@angular/material';
|
} from '@angular/material';
|
||||||
import { NGXLogger } from 'ngx-logger';
|
import { NGXLogger } from 'ngx-logger';
|
||||||
import { Observable, combineLatest, Subscription, of } from 'rxjs';
|
import { Observable, combineLatest, Subscription, of } from 'rxjs';
|
||||||
import { map, tap, catchError, take } from 'rxjs/operators';
|
import { map, tap, catchError } from 'rxjs/operators';
|
||||||
|
|
||||||
import { Store, select } from '@ngrx/store';
|
import { Store, select } from '@ngrx/store';
|
||||||
import * as AppStore from '@app/store';
|
import * as AppStore from '@app/store';
|
||||||
import * as QueryStore from '@app/store/messenger/query';
|
|
||||||
import * as StatusStore from '@app/store/messenger/status';
|
import * as StatusStore from '@app/store/messenger/status';
|
||||||
|
|
||||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
|
@ -240,7 +244,7 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy {
|
||||||
.subscribe();
|
.subscribe();
|
||||||
|
|
||||||
this.inputForm = this.formBuilder.group({
|
this.inputForm = this.formBuilder.group({
|
||||||
groupName: ['', [Validators.required]]
|
groupName: ['', [Validators.required, this.checkSpecialCharacter()]]
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this.data.type === UserSelectDialogType.EditChatMember) {
|
if (this.data.type === UserSelectDialogType.EditChatMember) {
|
||||||
|
@ -250,6 +254,15 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy {
|
||||||
this.currentTabIndex = 0;
|
this.currentTabIndex = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
checkSpecialCharacter(): ValidatorFn {
|
||||||
|
return (control: AbstractControl): { [key: string]: any } | null => {
|
||||||
|
const forbidden = /[\{\}\[\]\/?.;:|\)*~`!^+<>@\#$%&\\\=\(\'\"]/g.test(
|
||||||
|
control.value
|
||||||
|
);
|
||||||
|
return forbidden ? { groupName: { value: control.value } } : null;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
if (!!this.roomSubscription) {
|
if (!!this.roomSubscription) {
|
||||||
this.roomSubscription.unsubscribe();
|
this.roomSubscription.unsubscribe();
|
||||||
|
|
|
@ -29,7 +29,12 @@
|
||||||
>
|
>
|
||||||
{{ 'common.messages.no' | translate }}
|
{{ 'common.messages.no' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button mat-flat-button (click)="onClickChoice(true)" class="mat-primary">
|
<button
|
||||||
|
mat-flat-button
|
||||||
|
(click)="onClickChoice(true)"
|
||||||
|
[disabled]="this.inputForm.invalid"
|
||||||
|
class="mat-primary"
|
||||||
|
>
|
||||||
{{ 'common.messages.yes' | translate }}
|
{{ 'common.messages.yes' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</mat-card-actions>
|
</mat-card-actions>
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
import { Component, OnInit, Inject } from '@angular/core';
|
import { Component, OnInit, Inject } from '@angular/core';
|
||||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
import {
|
||||||
|
FormGroup,
|
||||||
|
FormBuilder,
|
||||||
|
Validators,
|
||||||
|
ValidatorFn,
|
||||||
|
AbstractControl
|
||||||
|
} from '@angular/forms';
|
||||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
|
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
|
||||||
import { GroupDetailData } from '@ucap-webmessenger/protocol-sync';
|
import { GroupDetailData } from '@ucap-webmessenger/protocol-sync';
|
||||||
|
|
||||||
|
@ -31,10 +37,22 @@ export class EditGroupDialogComponent implements OnInit {
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.inputForm = this.formBuilder.group({
|
this.inputForm = this.formBuilder.group({
|
||||||
groupName: [this.data.group.name, [Validators.required]]
|
groupName: [
|
||||||
|
this.data.group.name,
|
||||||
|
[Validators.required, this.checkSpecialCharacter()]
|
||||||
|
]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
checkSpecialCharacter(): ValidatorFn {
|
||||||
|
return (control: AbstractControl): { [key: string]: any } | null => {
|
||||||
|
const forbidden = /[\{\}\[\]\/?.;:|\)*~`!^+<>@\#$%&\\\=\(\'\"]/g.test(
|
||||||
|
control.value
|
||||||
|
);
|
||||||
|
return forbidden ? { groupName: { value: control.value } } : null;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
onClickChoice(choice: boolean): void {
|
onClickChoice(choice: boolean): void {
|
||||||
this.dialogRef.close({
|
this.dialogRef.close({
|
||||||
choice,
|
choice,
|
||||||
|
|
|
@ -191,7 +191,7 @@
|
||||||
"removeEvent": "대화 삭제",
|
"removeEvent": "대화 삭제",
|
||||||
"recallEvent": "대화 회수",
|
"recallEvent": "대화 회수",
|
||||||
"modifyRoomMember": "대화방 멤버 편집",
|
"modifyRoomMember": "대화방 멤버 편집",
|
||||||
"ejectFromRoom": "강퇴",
|
"ejectFromRoom": "강제 퇴장",
|
||||||
"confirmEjectFromRoom": "{{targetMember}} 님을 대화방에서 퇴장 시키겠습니까?",
|
"confirmEjectFromRoom": "{{targetMember}} 님을 대화방에서 퇴장 시키겠습니까?",
|
||||||
"badgeDescriptionForUnread": "확인하지 않은 메시지가 있습니다.",
|
"badgeDescriptionForUnread": "확인하지 않은 메시지가 있습니다.",
|
||||||
"getRoomNameInProgress": "대화방명을 가져오고 있습니다.",
|
"getRoomNameInProgress": "대화방명을 가져오고 있습니다.",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user