This commit is contained in:
richard-loafle 2020-02-04 11:27:53 +09:00
commit 0e59704533
14 changed files with 109 additions and 88 deletions

View File

@ -34,8 +34,8 @@
<ng-template mat-tab-label> <ng-template mat-tab-label>
<div <div
class="icon-item" class="icon-item"
[matBadgeHidden]="badgeChatUnReadCount <= 0" [matBadgeHidden]="(badgeChatUnReadCount$ | async) <= 0"
[matBadge]="badgeChatUnReadCount" [matBadge]="badgeChatUnReadCount$ | async"
matBadgeDescription="{{ matBadgeDescription="{{
'chat.badgeDescriptionForUnread' | translate 'chat.badgeDescriptionForUnread' | translate
}}" }}"

View File

@ -1,20 +1,14 @@
import { import { Component, OnInit, OnDestroy } from '@angular/core';
Component,
OnInit,
OnDestroy,
} from '@angular/core';
import { NGXLogger } from 'ngx-logger'; import { NGXLogger } from 'ngx-logger';
import { ucapAnimations } from '@ucap-webmessenger/ui'; import { ucapAnimations } from '@ucap-webmessenger/ui';
import { Subscription, Observable, } from 'rxjs'; import { Observable } from 'rxjs';
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 MessageStore from '@app/store/messenger/message'; import * as MessageStore from '@app/store/messenger/message';
import * as SettingsStore from '@app/store/messenger/settings'; import * as SettingsStore from '@app/store/messenger/settings';
import { MatTabChangeEvent } from '@angular/material'; import { MatTabChangeEvent } from '@angular/material';
import { import { MainMenu } from '@app/types';
MainMenu
} from '@app/types';
@Component({ @Component({
selector: 'app-layout-messenger-left-nav', selector: 'app-layout-messenger-left-nav',
@ -23,8 +17,7 @@ import {
animations: ucapAnimations animations: ucapAnimations
}) })
export class LeftNaviComponent implements OnInit, OnDestroy { export class LeftNaviComponent implements OnInit, OnDestroy {
badgeChatUnReadCount: number; badgeChatUnReadCount$: Observable<number>;
badgeChatUnReadCountSubscription: Subscription;
badgeMessageUnReadCount$: Observable<number>; badgeMessageUnReadCount$: Observable<number>;
badgeMessageInterval: any; badgeMessageInterval: any;
@ -33,13 +26,10 @@ export class LeftNaviComponent implements OnInit, OnDestroy {
constructor(private store: Store<any>, private logger: NGXLogger) {} constructor(private store: Store<any>, private logger: NGXLogger) {}
ngOnInit() { ngOnInit() {
this.badgeChatUnReadCountSubscription = this.store /** About Chat Badge */
.pipe( this.badgeChatUnReadCount$ = this.store.pipe(
select(AppStore.MessengerSelector.SyncSelector.selectChatUnreadCount) select(AppStore.MessengerSelector.SyncSelector.selectChatUnreadCount)
) );
.subscribe(count => {
this.badgeChatUnReadCount = count;
});
/** About Message Badge */ /** About Message Badge */
this.badgeMessageUnReadCount$ = this.store.pipe( this.badgeMessageUnReadCount$ = this.store.pipe(
@ -54,10 +44,6 @@ export class LeftNaviComponent implements OnInit, OnDestroy {
} }
ngOnDestroy(): void { ngOnDestroy(): void {
if (!!this.badgeChatUnReadCountSubscription) {
this.badgeChatUnReadCountSubscription.unsubscribe();
}
if (!!this.badgeMessageInterval) { if (!!this.badgeMessageInterval) {
clearInterval(this.badgeMessageInterval); clearInterval(this.badgeMessageInterval);
} }

View File

@ -17,7 +17,7 @@ import {
CreateChatDialogData, CreateChatDialogData,
CreateChatDialogResult CreateChatDialogResult
} from '@app/layouts/messenger/dialogs/chat/create-chat.dialog.component'; } from '@app/layouts/messenger/dialogs/chat/create-chat.dialog.component';
import { Subscription, Observable, merge } from 'rxjs'; import { Subscription, merge } from 'rxjs';
import { Store, select } from '@ngrx/store'; import { Store, select } from '@ngrx/store';
import * as AppStore from '@app/store'; import * as AppStore from '@app/store';
@ -76,11 +76,6 @@ export class LeftSideComponent implements OnInit, OnDestroy {
onLangChangeSubscription: Subscription; onLangChangeSubscription: Subscription;
badgeChatUnReadCount: number;
badgeChatUnReadCountSubscription: Subscription;
badgeMessageUnReadCount$: Observable<number>;
badgeMessageInterval: any;
/** 조직도에서 부서원 선택 */ /** 조직도에서 부서원 선택 */
selectedUserList: (UserInfo | UserInfoSS | UserInfoF | UserInfoDN)[] = []; selectedUserList: (UserInfo | UserInfoSS | UserInfoF | UserInfoDN)[] = [];
@ -113,14 +108,6 @@ export class LeftSideComponent implements OnInit, OnDestroy {
} }
ngOnInit() { ngOnInit() {
this.badgeChatUnReadCountSubscription = this.store
.pipe(
select(AppStore.MessengerSelector.SyncSelector.selectChatUnreadCount)
)
.subscribe(count => {
this.badgeChatUnReadCount = count;
});
this.loginResSubscription = this.store this.loginResSubscription = this.store
.pipe( .pipe(
select(AppStore.AccountSelector.AuthenticationSelector.loginRes), select(AppStore.AccountSelector.AuthenticationSelector.loginRes),
@ -130,17 +117,6 @@ export class LeftSideComponent implements OnInit, OnDestroy {
) )
.subscribe(); .subscribe();
/** About Message Badge */
this.badgeMessageUnReadCount$ = this.store.pipe(
select(AppStore.MessengerSelector.MessageSelector.unReadMessageCount)
);
this.getMessageUnreadCount();
this.badgeMessageInterval = setInterval(
() => this.getMessageUnreadCount(),
5 * 60 * 1000
);
this.setFabInitial(MainMenu.Group); this.setFabInitial(MainMenu.Group);
this.currentTabLable = MainMenu.Group; this.currentTabLable = MainMenu.Group;
@ -164,19 +140,12 @@ export class LeftSideComponent implements OnInit, OnDestroy {
} }
ngOnDestroy(): void { ngOnDestroy(): void {
if (!!this.badgeChatUnReadCountSubscription) {
this.badgeChatUnReadCountSubscription.unsubscribe();
}
if (!!this.loginResSubscription) { if (!!this.loginResSubscription) {
this.loginResSubscription.unsubscribe(); this.loginResSubscription.unsubscribe();
} }
if (!!this.onLangChangeSubscription) { if (!!this.onLangChangeSubscription) {
this.onLangChangeSubscription.unsubscribe(); this.onLangChangeSubscription.unsubscribe();
} }
if (!!this.badgeMessageInterval) {
clearInterval(this.badgeMessageInterval);
}
} }
async onClickNewChat(type: string = 'NORMAL') { async onClickNewChat(type: string = 'NORMAL') {

View File

@ -128,9 +128,9 @@
</div> </div>
<div class="message-section" [style.display]="isSearch ? 'block' : 'none'"> <div class="message-section" [style.display]="isSearch ? 'block' : 'none'">
<div class="search-sub"> <div class="search-sub input-lineless">
<form [formGroup]="fgSearchType" class="w-100-p"> <form [formGroup]="fgSearchType" class="w-100-p">
<mat-form-field style="width: 100px;"> <mat-form-field>
<mat-select <mat-select
value="A" value="A"
formControlName="searchMessageType" formControlName="searchMessageType"

View File

@ -30,10 +30,36 @@
position: relative; position: relative;
height: 100%; height: 100%;
} }
.search-sub {
padding: 0 20px;
font-size: 0.9em;
height: 50px;
align-items: center;
display: flex;
border-bottom: 1px solid #dddddd;
form {
.mat-form-field {
width: 30%;
flex: 0 0 auto;
margin-right: 10px;
font-size: 1em;
}
.mat-radio-group {
.mat-radio-button {
margin: 0 4px;
.mat-radio-label {
.mat-radio-label-content {
padding-left: 4px;
}
}
}
}
}
}
.no-search-result { .no-search-result {
padding-top: 10px; justify-content: center;
padding-left: 10px; align-items: center;
display: flex;
} }
} }
} }

View File

@ -22,7 +22,6 @@
color: #444444; color: #444444;
} }
} }
.mat-card-content { .mat-card-content {
flex: 0 0 auto; flex: 0 0 auto;
display: flex; display: flex;
@ -46,18 +45,12 @@
align-items: self-start; align-items: self-start;
justify-content: flex-start; justify-content: flex-start;
} }
}
.mat-ink-bar { .mat-ink-bar {
display: none; display: none;
} }
} }
} }
.mat-tab-body-wrapper {
border-left: 1px solid #dddddd;
position: relative;
height: 100%;
padding: 0 0 10px 10px;
}
}
} }
} }
@ -77,9 +70,11 @@
position: relative; position: relative;
height: 100%; height: 100%;
width: 100%; width: 100%;
.mat-tab-header { .mat-tab-header {
width: 160px; width: 160px;
flex-flow: column; flex-flow: column;
border-right: 1px solid #dddddd;
.mat-tab-label-container { .mat-tab-label-container {
.mat-tab-list { .mat-tab-list {
.mat-tab-labels { .mat-tab-labels {
@ -113,8 +108,15 @@
position: relative; position: relative;
.mat-list-item { .mat-list-item {
font-size: 15px; font-size: 15px;
.mat-tab-header {
border-right: none;
}
} }
.mat-divider { .mat-divider {
//margin-top: 10px;
}
.mat-subheader {
font-weight: 600;
} }
} }
} }

View File

@ -276,8 +276,9 @@ $daesang-grey: (
} }
.policy { .policy {
background-color: mat-color($accent, B100); color: mat-color($accent, B100);
} }
.mat-badge-accent .mat-badge-content, .mat-badge-accent .mat-badge-content,
.weblink .mat-badge-content { .weblink .mat-badge-content {
background-color: mat-color($warn, 400); background-color: mat-color($warn, 400);
@ -439,4 +440,7 @@ $daesang-grey: (
} }
} }
} }
.mat-calendar-body-selected{
background-color: mat-color($accent);
}
} }

View File

@ -331,6 +331,7 @@ export class WriteComponent implements OnInit, OnDestroy, AfterViewInit {
private checkContentLength() { private checkContentLength() {
const result = this.parseContent(); const result = this.parseContent();
if (!result) { if (!result) {
this.contentLength = 0;
return; return;
} }
@ -572,6 +573,7 @@ export class WriteComponent implements OnInit, OnDestroy, AfterViewInit {
} else { } else {
this.editor.nativeElement.appendChild(node); this.editor.nativeElement.appendChild(node);
} }
selection.empty();
} }
private inEditor(el) { private inEditor(el) {

View File

@ -14,9 +14,11 @@
(selected)="onSelectedDate($event)" (selected)="onSelectedDate($event)"
></ucap-pick-date> ></ucap-pick-date>
</div> </div>
<div fxFlex="30px" style="margin-top: 30px;"> <div class="pick-time">
<span flFlex="1 1 auto"></span> <span class="icon-img"
<span style="width: 100px;"> ><i class="mid mdi-clock-check-outline"></i
></span>
<span class="pick-time-select">
<ucap-pick-time <ucap-pick-time
[hour]="selectedDate.hour()" [hour]="selectedDate.hour()"
[hourStep]="hourStep" [hourStep]="hourStep"
@ -33,8 +35,8 @@
</div> </div>
<div fxFlex="40%" style="margin-left: 30px;"> <div fxFlex="40%" style="margin-left: 30px;">
<div fxLayout="column"> <div fxLayout="column">
<div fxFlex="40px" style="margin-top: 30px;"> <div fxFlex="40px" style="margin-top: 30px;" class="Reservation-dete">
<span flFlexFill style="font-size: 22px;"> <span flFlexFill style="font-size: 20px;" class="text-accent-dark">
{{ selectedDate.format('MMM DD YYYY, HH:mm') }} {{ selectedDate.format('MMM DD YYYY, HH:mm') }}
</span> </span>
</div> </div>
@ -102,12 +104,11 @@
</mat-card-content> </mat-card-content>
<mat-card-actions> <mat-card-actions>
<div class="actions-container"> <div class="actions-container">
<div class="actions-message"> <div class="actions-message text-warn-color">
<span *ngIf="dateIsToEarly"> <span *ngIf="dateIsToEarly">
{{ 'message.errors.minTimeReservation' | translate }} {{ 'message.errors.minTimeReservation' | translate }}
</span> </span>
</div> </div>
<div class="actions-spacer"></div>
<div class="actions"> <div class="actions">
<button <button
mat-stroked-button mat-stroked-button
@ -117,7 +118,7 @@
{{ 'common.messages.cancel' | translate }} {{ 'common.messages.cancel' | translate }}
</button> </button>
<button <button
mat-stroked-button mat-flat-button
[disabled]="dateIsToEarly" [disabled]="dateIsToEarly"
(click)="onClickSend()" (click)="onClickSend()"
class="mat-primary" class="mat-primary"

View File

@ -4,9 +4,10 @@
.actions-container { .actions-container {
display: flex; display: flex;
position: fixed; flex-flow: column;
.actions-message { .actions-message {
font-size: 0.9em;
} }
.actions-spacer { .actions-spacer {
@ -14,5 +15,22 @@
} }
.actions { .actions {
margin-left: auto;
button {
margin-left: 8px;
}
}
}
.pick-time {
display: flex;
flex-flow: row;
margin-top: 20px;
width: 100%;
&-select {
width: 100%;
}
.icon-img {
margin-right: 20px;
} }
} }

View File

@ -79,10 +79,10 @@
'settings.notification.receiveForMobileTypeAlways' | translate 'settings.notification.receiveForMobileTypeAlways' | translate
}}</mat-checkbox }}</mat-checkbox
> >
<br />({{ <span class="text-guide">({{
'settings.notification.descriptionReceiveForMobileTypeAlways' 'settings.notification.descriptionReceiveForMobileTypeAlways'
| translate | translate
}}) }})</span>
</span> </span>
</mat-list-item> </mat-list-item>
@ -102,10 +102,10 @@
'settings.notification.receiveForMessageTypePopup' | translate 'settings.notification.receiveForMessageTypePopup' | translate
}}</mat-checkbox }}</mat-checkbox
> >
<br />({{ <span class="text-guide">({{
'settings.notification.descriptionReceiveForMobileTypePopup' 'settings.notification.descriptionReceiveForMobileTypePopup'
| translate | translate
}}) }})</span>
</span> </span>
</mat-list-item> </mat-list-item>
</mat-list> </mat-list>

View File

@ -9,3 +9,13 @@
.item-input[fullWidth] { .item-input[fullWidth] {
width: 100%; width: 100%;
} }
.text-guide {
display: block;
font-size: 0.9em;
color: rgb(0, 0, 0, 0.7);
}
.mat-radio-container {
margin-right: 20px;
}

View File

@ -7,9 +7,12 @@
border-bottom: 1px solid rgba(0, 0, 0, 0.12); border-bottom: 1px solid rgba(0, 0, 0, 0.12);
.hour-input { .hour-input {
width: 40px; width: 60px;
+ span {
padding: 0 10px;
}
} }
.minute-input { .minute-input {
width: 40px; width: 60px;
} }
} }

View File

@ -26,7 +26,7 @@
font-size: 1rem; font-size: 1rem;
color: inherit; color: inherit;
outline: none; outline: none;
text-align: end; text-align: start;
&:disabled { &:disabled {
background-color: transparent; background-color: transparent;