유저선택팝업 > 새로운 대화 개설시 300명 제한 로직 추가.

This commit is contained in:
leejinho 2020-03-17 10:35:59 +09:00
parent 517d8a4d37
commit 069b3e6e67
2 changed files with 50 additions and 5 deletions

View File

@ -262,8 +262,48 @@
</mat-chip>
</mat-chip-list>
</div>
<span>
{{ selectedUserList.length }}
{{ 'common.units.persons' | translate }}
</span>
<ng-container
*ngIf="
data.type === UserSelectDialogType.NewChat;
then newchatcount;
else defaultcount
"
></ng-container>
<ng-template #newchatcount>
<span
[ngClass]="
selectedUserList.length >=
environment.productConfig.CommonSetting.maxChatRoomUser
? 'text-warn-color'
: ''
"
>
{{ selectedUserList.length }} /
{{ environment.productConfig.CommonSetting.maxChatRoomUser - 1 }}
{{ 'common.units.persons' | translate }}
</span>
<span
class="text-warn-color"
style="float: right;"
*ngIf="
selectedUserList.length >=
environment.productConfig.CommonSetting.maxChatRoomUser
"
>
({{
'chat.errors.maxCountOfRoomMemberWith'
| translate
: {
maxCount:
environment.productConfig.CommonSetting.maxChatRoomUser - 1
}
}})
</span>
</ng-template>
<ng-template #defaultcount>
<span>
{{ selectedUserList.length }}
{{ 'common.units.persons' | translate }}
</span>
</ng-template>
</ng-template>

View File

@ -134,6 +134,7 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy {
currentTabIndex: number;
UserSelectDialogType = UserSelectDialogType;
environment = environment;
loginRes: LoginResponse;
loginResSubscription: Subscription;
@ -740,8 +741,12 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy {
if (this.selectedUserList.length === 0 && !this.selectedRoom) {
return true;
}
return false;
} else if (this.data.type === UserSelectDialogType.NewChat) {
return (
this.selectedUserList.length >=
this.environment.productConfig.CommonSetting.maxChatRoomUser
);
} else {
return false;
}