# 이슈처리

49 대화방이름 빈칸으로 설정 시 숫자로 보여짐 :: 아예 빈값이면 저렇게 되고, ' '빈칸 하나를 넣으면 초기화 되는데 이를 필수입력하도록 수정하여 처리.

83 빈칸 입력 후 그룹 추가 시 추가되지 않음 :: 필수입력으로 처리 및 빈문자열 유효성 검사
This commit is contained in:
leejinho 2020-01-07 16:17:27 +09:00
parent a8bfcae761
commit 4f8695e5a3
6 changed files with 36 additions and 10 deletions

View File

@ -66,10 +66,9 @@
<video
controls
*ngIf="selectedFile.info.type === FileType.Video"
[src]="getImageUrl(selectedFile)"
class="preview-video"
>
<source [src]="getImageUrl(selectedFile)" />
</video>
></video>
</div>
<ul>
<li class="name">{{ selectedFile.info.name }}</li>

View File

@ -52,7 +52,10 @@ import {
ConfirmDialogComponent,
ConfirmDialogResult,
ConfirmDialogData,
DialogService
DialogService,
AlertDialogComponent,
AlertDialogResult,
AlertDialogData
} from '@ucap-webmessenger/ui';
export interface CreateChatDialogData {
@ -619,6 +622,22 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy {
return;
}
if (this.inputForm.get('groupName').value.trim().length === 0) {
this.dialogService.open<
AlertDialogComponent,
AlertDialogData,
AlertDialogResult
>(AlertDialogComponent, {
data: {
title: '',
html: `그룹명은 필수입력입니다.`
}
});
this.inputForm.setValue({ groupName: '' });
return;
}
let cfmMsg = `새로운 그룹을 추가하시겠습니까?`;
if (this.selectedUserList.length === 0) {
cfmMsg += `<br/>빈 그룹으로 생성됩니다.`;
@ -649,7 +668,7 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy {
selectedRoom: this.selectedRoom,
groupName:
this.data.type === UserSelectDialogType.NewGroup
? this.inputForm.get('groupName').value
? this.inputForm.get('groupName').value.trim()
: '',
oldGroup:
this.data.type === UserSelectDialogType.EditMember

View File

@ -47,7 +47,12 @@
>
No
</button>
<button mat-flat-button (click)="onClickChoice(true)" class="mat-primary">
<button
mat-flat-button
[disabled]="inputForm.invalid"
(click)="onClickChoice(true)"
class="mat-primary"
>
Yes
</button>
</mat-card-actions>

View File

@ -1,6 +1,6 @@
import { RoomInfo } from '@ucap-webmessenger/protocol-room';
import { Component, OnInit, Inject } from '@angular/core';
import { FormGroup, FormBuilder } from '@angular/forms';
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
export interface EditChatRoomDialogData {
@ -50,7 +50,10 @@ export class EditChatRoomDialogComponent implements OnInit {
ngOnInit(): void {
this.inputForm = this.formBuilder.group({
roomName: [this.data.roomInfo.roomName],
roomName: [
this.data.roomInfo.roomName,
!this.data.roomInfo.isTimeRoom ? [Validators.required] : []
],
changeTarget: ['me'],
timerInterval: [this.data.roomInfo.timeRoomInterval]
});

View File

@ -11,7 +11,7 @@
class="mat-mini-fab mat-button-base mat-accent mat-elevation-z"
>
<mat-icon>add</mat-icon>
<span class="mat-fab__label">새 그룹 추가</span>
<span class="mat-fab__label">{{ 'group.addNew' | translate }}</span>
</button>
<div *ngIf="isShowAddGroupField" class="input-groupname-box">
<mat-form-field hintLabel="특수문자는 '-,_'만 사용할 수 있습니다.">

View File

@ -1,5 +1,5 @@
<mat-card class="confirm-card mat-elevation-z">
<mat-card-header>
<mat-card-header *ngIf="data.title">
<mat-card-title>{{ data.title }}</mat-card-title>
<!-- <mat-card-subtitle>Confirm</mat-card-subtitle> -->
</mat-card-header>