(QuickChat) Don't use types from outside

This commit is contained in:
sercan 2021-08-31 10:16:13 +03:00
parent fe7e2514a6
commit 138a43da59
3 changed files with 24 additions and 3 deletions

View File

@ -1,9 +1,9 @@
import { Component, ElementRef, HostBinding, HostListener, NgZone, OnDestroy, OnInit, Renderer2, ViewChild, ViewEncapsulation } from '@angular/core';
import { ScrollStrategy, ScrollStrategyOptions } from '@angular/cdk/overlay';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { Chat } from 'app/modules/admin/apps/chat/chat.types';
import { QuickChatService } from 'app/layout/common/quick-chat/quick-chat.service';
import { ScrollStrategy, ScrollStrategyOptions } from '@angular/cdk/overlay';
import { Chat } from 'app/layout/common/quick-chat/quick-chat.types';
@Component({
selector : 'quick-chat',

View File

@ -2,7 +2,7 @@ import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { BehaviorSubject, Observable, of, throwError } from 'rxjs';
import { map, switchMap, tap } from 'rxjs/operators';
import { Chat } from 'app/modules/admin/apps/chat/chat.types';
import { Chat } from 'app/layout/common/quick-chat/quick-chat.types';
@Injectable({
providedIn: 'root'

View File

@ -1,3 +1,5 @@
import { Contact } from 'app/modules/admin/apps/chat/chat.types';
export interface Notification
{
id: string;
@ -10,3 +12,22 @@ export interface Notification
useRouter?: boolean;
read: boolean;
}
export interface Chat
{
id?: string;
contactId?: string;
contact?: Contact;
unreadCount?: number;
muted?: boolean;
lastMessage?: string;
lastMessageAt?: string;
messages?: {
id?: string;
chatId?: string;
contactId?: string;
isMine?: boolean;
value?: string;
createdAt?: string;
}[];
}