diff --git a/client/src/app/core/marked-translations.ts b/client/src/app/core/marked-translations.ts index 035e99ebf..b4587ac31 100644 --- a/client/src/app/core/marked-translations.ts +++ b/client/src/app/core/marked-translations.ts @@ -282,8 +282,6 @@ _('Can manage the projector'); _('Can see the front page'); _('Can manage tags'); _('Can manage configuration'); -_('Can use the chat'); -_('Can manage the chat'); _('Can manage logos and fonts'); _('Can see history'); // mediafiles diff --git a/client/src/app/core/repositories/common/chatmessage-repository.service.spec.ts b/client/src/app/core/repositories/common/chatmessage-repository.service.spec.ts deleted file mode 100644 index dbd9f6633..000000000 --- a/client/src/app/core/repositories/common/chatmessage-repository.service.spec.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { TestBed, inject } from '@angular/core/testing'; - -import { E2EImportsModule } from 'e2e-imports.module'; -import { ChatMessageRepositoryService } from './chatmessage-repository.service'; - -describe('ChatMessageRepositoryService', () => { - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [E2EImportsModule], - providers: [ChatMessageRepositoryService] - }); - }); - - it('should be created', inject([ChatMessageRepositoryService], (service: ChatMessageRepositoryService) => { - expect(service).toBeTruthy(); - })); -}); diff --git a/client/src/app/core/repositories/common/chatmessage-repository.service.ts b/client/src/app/core/repositories/common/chatmessage-repository.service.ts deleted file mode 100644 index 83b3d24d6..000000000 --- a/client/src/app/core/repositories/common/chatmessage-repository.service.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Injectable } from '@angular/core'; -import { DataStoreService } from '../../core-services/data-store.service'; -import { BaseRepository } from '../base-repository'; -import { CollectionStringMapperService } from '../../core-services/collectionStringMapper.service'; -import { ChatMessage } from 'app/shared/models/core/chat-message'; -import { ViewChatMessage } from 'app/site/common/models/view-chatmessage'; -import { ViewModelStoreService } from 'app/core/core-services/view-model-store.service'; -import { TranslateService } from '@ngx-translate/core'; -import { DataSendService } from 'app/core/core-services/data-send.service'; - -@Injectable({ - providedIn: 'root' -}) -export class ChatMessageRepositoryService extends BaseRepository { - public constructor( - DS: DataStoreService, - dataSend: DataSendService, - mapperService: CollectionStringMapperService, - viewModelStoreService: ViewModelStoreService, - translate: TranslateService - ) { - super(DS, dataSend, mapperService, viewModelStoreService, translate, ChatMessage); - } - - public getVerboseName = (plural: boolean = false) => { - return this.translate.instant(plural ? 'Chatmessages' : 'Chatmessage'); - }; - - protected createViewModel(message: ChatMessage): ViewChatMessage { - const viewChatMessage = new ViewChatMessage(message); - viewChatMessage.getVerboseName = this.getVerboseName; - return viewChatMessage; - } -} diff --git a/client/src/app/shared/models/core/chat-message.ts b/client/src/app/shared/models/core/chat-message.ts deleted file mode 100644 index ebe877c84..000000000 --- a/client/src/app/shared/models/core/chat-message.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { BaseModel } from '../base/base-model'; - -/** - * Representation of chat messages. - * @ignore - */ -export class ChatMessage extends BaseModel { - public static COLLECTIONSTRING = 'core/chat-message'; - public id: number; - public message: string; - public timestamp: string; // TODO: Type for timestamp - public user_id: number; - - public constructor(input?: any) { - super(ChatMessage.COLLECTIONSTRING, input); - } -} diff --git a/client/src/app/site/common/common.config.ts b/client/src/app/site/common/common.config.ts index 79defba95..65ac0c907 100644 --- a/client/src/app/site/common/common.config.ts +++ b/client/src/app/site/common/common.config.ts @@ -1,18 +1,7 @@ import { AppConfig } from '../../core/app-config'; -import { ChatMessage } from '../../shared/models/core/chat-message'; -import { ChatMessageRepositoryService } from 'app/core/repositories/common/chatmessage-repository.service'; -import { ViewChatMessage } from './models/view-chatmessage'; export const CommonAppConfig: AppConfig = { name: 'common', - models: [ - { - collectionString: 'core/chat-message', - model: ChatMessage, - viewModel: ViewChatMessage, - repository: ChatMessageRepositoryService - } - ], mainMenuEntries: [ { route: '/', diff --git a/client/src/app/site/common/models/view-chatmessage.ts b/client/src/app/site/common/models/view-chatmessage.ts deleted file mode 100644 index 2400bb73b..000000000 --- a/client/src/app/site/common/models/view-chatmessage.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { ChatMessage } from 'app/shared/models/core/chat-message'; -import { BaseViewModel } from 'app/site/base/base-view-model'; - -export class ViewChatMessage extends BaseViewModel { - public static COLLECTIONSTRING = ChatMessage.COLLECTIONSTRING; - - private _chatMessage: ChatMessage; - - /** - * This is set by the repository - */ - public getVerboseName; - - public get chatmessage(): ChatMessage { - return this._chatMessage; - } - - public get id(): number { - return this.chatmessage.id; - } - - public get message(): string { - return this.chatmessage.message; - } - - public constructor(message?: ChatMessage) { - super(ChatMessage.COLLECTIONSTRING); - this._chatMessage = message; - } - - public getTitle = () => { - return 'Chatmessage'; - }; - - public getModel(): ChatMessage { - return this.chatmessage; - } - - public updateDependencies(message: BaseViewModel): void {} -}