diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index a5f75916c..fe1e5c7f6 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts @@ -1,11 +1,13 @@ import { Component } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; + import { OperatorService } from './core/core-services/operator.service'; import { LoginDataService } from './core/ui-services/login-data.service'; import { ConfigService } from './core/ui-services/config.service'; import { ConstantsService } from './core/ui-services/constants.service'; import { ServertimeService } from './core/core-services/servertime.service'; import { ThemeService } from './core/ui-services/theme.service'; +import { CountUsersService } from './core/ui-services/count-users.service'; /** * Angular's global App Component @@ -35,7 +37,8 @@ export class AppComponent { loginDataService: LoginDataService, constantsService: ConstantsService, // Needs to be started, so it can register itself to the WebsocketService servertimeService: ServertimeService, - themeService: ThemeService + themeService: ThemeService, + countUsersService: CountUsersService // Needed to register itself. ) { // manually add the supported languages translate.addLangs(['en', 'de', 'cs']); diff --git a/client/src/app/core/core-services/data-store.service.ts b/client/src/app/core/core-services/data-store.service.ts index 19ac2bcc7..f106700f6 100644 --- a/client/src/app/core/core-services/data-store.service.ts +++ b/client/src/app/core/core-services/data-store.service.ts @@ -137,7 +137,6 @@ export class DataStoreService { // This promise will be resolved with the maximal change id of the cache. const store = await this.storageService.get(DataStoreService.cachePrefix + 'DS'); if (store) { - console.log('init from storage:', store); // There is a store. Deserialize it this.jsonStore = store; this.modelStore = this.deserializeJsonStore(this.jsonStore); @@ -186,7 +185,6 @@ export class DataStoreService { * Clears the complete DataStore and Cache. */ public async clear(): Promise { - console.log('DS clear'); this.modelStore = {}; this.jsonStore = {}; this._maxChangeId = 0; diff --git a/client/src/app/core/core-services/notify.service.ts b/client/src/app/core/core-services/notify.service.ts index a4bc27d5d..16fc55aac 100644 --- a/client/src/app/core/core-services/notify.service.ts +++ b/client/src/app/core/core-services/notify.service.ts @@ -120,8 +120,11 @@ export class NotifyService extends OpenSlidesComponent { * @param content The payload to send. * @param channels Multiple channels to send this message to. */ - public sendToChannels(name: string, content: T, ...channles: string[]): void { - this.send(name, content, null, channles); + public sendToChannels(name: string, content: T, ...channels: string[]): void { + if (channels.length < 1) { + throw new Error('You have to provide at least one channel'); + } + this.send(name, content, null, channels); } /** diff --git a/client/src/app/core/core-services/openslides.service.ts b/client/src/app/core/core-services/openslides.service.ts index e8652bc46..d370f41c4 100644 --- a/client/src/app/core/core-services/openslides.service.ts +++ b/client/src/app/core/core-services/openslides.service.ts @@ -74,7 +74,6 @@ export class OpenSlidesService extends OpenSlidesComponent { public async afterLoginBootup(userId: number): Promise { // Else, check, which user was logged in last time const lastUserId = await this.storageService.get('lastUserLoggedIn'); - console.log('user transition:', lastUserId, '->', userId); // if the user changed, reset the cache and save the new user. if (userId !== lastUserId) { await this.DS.clear(); @@ -88,7 +87,6 @@ export class OpenSlidesService extends OpenSlidesComponent { */ private async setupDataStoreAndWebSocket(): Promise { let changeId = await this.DS.initFromStorage(); - console.log('change ID on DS setup', changeId); if (changeId > 0) { changeId += 1; } diff --git a/client/src/app/core/core-services/websocket.service.ts b/client/src/app/core/core-services/websocket.service.ts index 9a73e956f..58f57b239 100644 --- a/client/src/app/core/core-services/websocket.service.ts +++ b/client/src/app/core/core-services/websocket.service.ts @@ -112,7 +112,6 @@ export class WebsocketService { socketPath += window.location.hostname + ':' + window.location.port + '/ws/'; socketPath += formatQueryParams(queryParams); - console.log('connect to', socketPath); this.websocket = new WebSocket(socketPath); // connection established. If this connect attept was a retry, diff --git a/client/src/app/core/repositories/agenda/agenda-repository.service.ts b/client/src/app/core/repositories/agenda/agenda-repository.service.ts index e562f7b0d..126dadc2d 100644 --- a/client/src/app/core/repositories/agenda/agenda-repository.service.ts +++ b/client/src/app/core/repositories/agenda/agenda-repository.service.ts @@ -3,20 +3,20 @@ import { tap, map } from 'rxjs/operators'; import { Observable } from 'rxjs'; import { BaseRepository } from '../base-repository'; -import { AgendaBaseModel } from '../../../shared/models/base/agenda-base-model'; -import { BaseModel } from '../../../shared/models/base/base-model'; +import { AgendaBaseModel } from 'app/shared/models/base/agenda-base-model'; +import { BaseModel } from 'app/shared/models/base/base-model'; import { CollectionStringMapperService } from '../../core-services/collectionStringMapper.service'; import { ConfigService } from 'app/core/ui-services/config.service'; import { DataSendService } from 'app/core/core-services/data-send.service'; import { DataStoreService } from '../../core-services/data-store.service'; import { HttpService } from 'app/core/core-services/http.service'; -import { Identifiable } from '../../../shared/models/base/identifiable'; -import { Item } from '../../../shared/models/agenda/item'; +import { Identifiable } from 'app/shared/models/base/identifiable'; +import { Item } from 'app/shared/models/agenda/item'; import { OSTreeSortEvent } from 'app/shared/components/sorting-tree/sorting-tree.component'; import { Speaker } from 'app/shared/models/agenda/speaker'; import { User } from 'app/shared/models/users/user'; -import { ViewItem } from '../../../site/agenda/models/view-item'; -import { ViewSpeaker } from '../../../site/agenda/models/view-speaker'; +import { ViewItem } from 'app/site/agenda/models/view-item'; +import { ViewSpeaker } from 'app/site/agenda/models/view-speaker'; import { TreeService } from 'app/core/ui-services/tree.service'; /** diff --git a/client/src/app/core/repositories/agenda/topic-repository.service.ts b/client/src/app/core/repositories/agenda/topic-repository.service.ts index cf7763083..3281d0a5f 100644 --- a/client/src/app/core/repositories/agenda/topic-repository.service.ts +++ b/client/src/app/core/repositories/agenda/topic-repository.service.ts @@ -6,10 +6,10 @@ import { Mediafile } from 'app/shared/models/mediafiles/mediafile'; import { Item } from 'app/shared/models/agenda/item'; import { DataStoreService } from 'app/core/core-services/data-store.service'; import { DataSendService } from 'app/core/core-services/data-send.service'; -import { ViewTopic } from '../../../site/agenda/models/view-topic'; +import { ViewTopic } from 'app/site/agenda/models/view-topic'; import { Identifiable } from 'app/shared/models/base/identifiable'; import { CollectionStringMapperService } from 'app/core/core-services/collectionStringMapper.service'; -import { CreateTopic } from '../../../site/agenda/models/create-topic'; +import { CreateTopic } from 'app/site/agenda/models/create-topic'; /** * Repository for topics diff --git a/client/src/app/core/repositories/assignments/assignment-repository.service.ts b/client/src/app/core/repositories/assignments/assignment-repository.service.ts index 87e64d09c..206262706 100644 --- a/client/src/app/core/repositories/assignments/assignment-repository.service.ts +++ b/client/src/app/core/repositories/assignments/assignment-repository.service.ts @@ -1,12 +1,12 @@ import { Injectable } from '@angular/core'; -import { ViewAssignment } from '../../../site/assignments/models/view-assignment'; -import { Assignment } from '../../../shared/models/assignments/assignment'; -import { User } from '../../../shared/models/users/user'; -import { Tag } from '../../../shared/models/core/tag'; -import { Item } from '../../../shared/models/agenda/item'; +import { ViewAssignment } from 'app/site/assignments/models/view-assignment'; +import { Assignment } from 'app/shared/models/assignments/assignment'; +import { User } from 'app/shared/models/users/user'; +import { Tag } from 'app/shared/models/core/tag'; +import { Item } from 'app/shared/models/agenda/item'; import { BaseRepository } from '../base-repository'; import { DataStoreService } from '../../core-services/data-store.service'; -import { Identifiable } from '../../../shared/models/base/identifiable'; +import { Identifiable } from 'app/shared/models/base/identifiable'; import { CollectionStringMapperService } from '../../core-services/collectionStringMapper.service'; /** diff --git a/client/src/app/core/repositories/common/chatmessage-repository.service.ts b/client/src/app/core/repositories/common/chatmessage-repository.service.ts index ab598a69d..ecd54f40f 100644 --- a/client/src/app/core/repositories/common/chatmessage-repository.service.ts +++ b/client/src/app/core/repositories/common/chatmessage-repository.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@angular/core'; import { DataStoreService } from '../../core-services/data-store.service'; import { BaseRepository } from '../base-repository'; -import { Identifiable } from '../../../shared/models/base/identifiable'; +import { Identifiable } from 'app/shared/models/base/identifiable'; 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'; diff --git a/client/src/app/core/repositories/history/history-repository.service.ts b/client/src/app/core/repositories/history/history-repository.service.ts index 7de9491bd..ba35245f2 100644 --- a/client/src/app/core/repositories/history/history-repository.service.ts +++ b/client/src/app/core/repositories/history/history-repository.service.ts @@ -7,7 +7,7 @@ import { History } from 'app/shared/models/core/history'; import { User } from 'app/shared/models/users/user'; import { Identifiable } from 'app/shared/models/base/identifiable'; import { HttpService } from 'app/core/core-services/http.service'; -import { ViewHistory } from '../../../site/history/models/view-history'; +import { ViewHistory } from 'app/site/history/models/view-history'; import { TimeTravelService } from 'app/core/core-services/time-travel.service'; import { BaseModel } from 'app/shared/models/base/base-model'; diff --git a/client/src/app/core/repositories/mediafiles/mediafile-repository.service.ts b/client/src/app/core/repositories/mediafiles/mediafile-repository.service.ts index 16bb4b775..11dce35bd 100644 --- a/client/src/app/core/repositories/mediafiles/mediafile-repository.service.ts +++ b/client/src/app/core/repositories/mediafiles/mediafile-repository.service.ts @@ -1,11 +1,11 @@ import { Injectable } from '@angular/core'; import { BaseRepository } from '../base-repository'; -import { ViewMediafile } from '../../../site/mediafiles/models/view-mediafile'; -import { Mediafile } from '../../../shared/models/mediafiles/mediafile'; -import { User } from '../../../shared/models/users/user'; +import { ViewMediafile } from 'app/site/mediafiles/models/view-mediafile'; +import { Mediafile } from 'app/shared/models/mediafiles/mediafile'; +import { User } from 'app/shared/models/users/user'; import { DataStoreService } from '../../core-services/data-store.service'; -import { Identifiable } from '../../../shared/models/base/identifiable'; +import { Identifiable } from 'app/shared/models/base/identifiable'; import { CollectionStringMapperService } from '../../core-services/collectionStringMapper.service'; import { DataSendService } from 'app/core/core-services/data-send.service'; import { HttpService } from 'app/core/core-services/http.service'; diff --git a/client/src/app/core/repositories/motions/category-repository.service.ts b/client/src/app/core/repositories/motions/category-repository.service.ts index 7fc975f72..ab61a3725 100644 --- a/client/src/app/core/repositories/motions/category-repository.service.ts +++ b/client/src/app/core/repositories/motions/category-repository.service.ts @@ -1,13 +1,13 @@ import { Injectable } from '@angular/core'; -import { Category } from '../../../shared/models/motions/category'; -import { ViewCategory } from '../../../site/motions/models/view-category'; +import { Category } from 'app/shared/models/motions/category'; +import { ViewCategory } from 'app/site/motions/models/view-category'; import { DataSendService } from '../../core-services/data-send.service'; import { DataStoreService } from '../../core-services/data-store.service'; import { BaseRepository } from '../base-repository'; -import { Motion } from '../../../shared/models/motions/motion'; +import { Motion } from 'app/shared/models/motions/motion'; import { HttpService } from '../../core-services/http.service'; -import { Identifiable } from '../../../shared/models/base/identifiable'; +import { Identifiable } from 'app/shared/models/base/identifiable'; import { CollectionStringMapperService } from '../../core-services/collectionStringMapper.service'; /** diff --git a/client/src/app/core/repositories/motions/change-recommendation-repository.service.ts b/client/src/app/core/repositories/motions/change-recommendation-repository.service.ts index fd9bf02ed..0043b1421 100644 --- a/client/src/app/core/repositories/motions/change-recommendation-repository.service.ts +++ b/client/src/app/core/repositories/motions/change-recommendation-repository.service.ts @@ -4,14 +4,14 @@ import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; import { DataSendService } from '../../core-services/data-send.service'; -import { User } from '../../../shared/models/users/user'; -import { Category } from '../../../shared/models/motions/category'; -import { Workflow } from '../../../shared/models/motions/workflow'; +import { User } from 'app/shared/models/users/user'; +import { Category } from 'app/shared/models/motions/category'; +import { Workflow } from 'app/shared/models/motions/workflow'; import { BaseRepository } from '../base-repository'; import { DataStoreService } from '../../core-services/data-store.service'; -import { MotionChangeReco } from '../../../shared/models/motions/motion-change-reco'; -import { ViewChangeReco } from '../../../site/motions/models/view-change-reco'; -import { Identifiable } from '../../../shared/models/base/identifiable'; +import { MotionChangeReco } from 'app/shared/models/motions/motion-change-reco'; +import { ViewChangeReco } from 'app/site/motions/models/view-change-reco'; +import { Identifiable } from 'app/shared/models/base/identifiable'; import { CollectionStringMapperService } from '../../core-services/collectionStringMapper.service'; /** diff --git a/client/src/app/core/repositories/motions/motion-block-repository.service.ts b/client/src/app/core/repositories/motions/motion-block-repository.service.ts index 8e990448e..35f4ec405 100644 --- a/client/src/app/core/repositories/motions/motion-block-repository.service.ts +++ b/client/src/app/core/repositories/motions/motion-block-repository.service.ts @@ -12,8 +12,8 @@ import { Identifiable } from 'app/shared/models/base/identifiable'; import { Motion } from 'app/shared/models/motions/motion'; import { MotionBlock } from 'app/shared/models/motions/motion-block'; import { MotionRepositoryService } from './motion-repository.service'; -import { ViewMotion } from '../../../site/motions/models/view-motion'; -import { ViewMotionBlock } from '../../../site/motions/models/view-motion-block'; +import { ViewMotion } from 'app/site/motions/models/view-motion'; +import { ViewMotionBlock } from 'app/site/motions/models/view-motion-block'; /** * Repository service for motion blocks diff --git a/client/src/app/core/repositories/motions/motion-comment-section-repository.service.ts b/client/src/app/core/repositories/motions/motion-comment-section-repository.service.ts index 14e4cf23a..7c616683d 100644 --- a/client/src/app/core/repositories/motions/motion-comment-section-repository.service.ts +++ b/client/src/app/core/repositories/motions/motion-comment-section-repository.service.ts @@ -3,10 +3,10 @@ import { Injectable } from '@angular/core'; import { DataSendService } from '../../core-services/data-send.service'; import { DataStoreService } from '../../core-services/data-store.service'; import { BaseRepository } from '../base-repository'; -import { ViewMotionCommentSection } from '../../../site/motions/models/view-motion-comment-section'; -import { MotionCommentSection } from '../../../shared/models/motions/motion-comment-section'; -import { Group } from '../../../shared/models/users/group'; -import { Identifiable } from '../../../shared/models/base/identifiable'; +import { ViewMotionCommentSection } from 'app/site/motions/models/view-motion-comment-section'; +import { MotionCommentSection } from 'app/shared/models/motions/motion-comment-section'; +import { Group } from 'app/shared/models/users/group'; +import { Identifiable } from 'app/shared/models/base/identifiable'; import { CollectionStringMapperService } from '../../core-services/collectionStringMapper.service'; import { HttpService } from 'app/core/core-services/http.service'; diff --git a/client/src/app/core/repositories/motions/motion-repository.service.ts b/client/src/app/core/repositories/motions/motion-repository.service.ts index 0efc76d3f..e4b27c4e2 100644 --- a/client/src/app/core/repositories/motions/motion-repository.service.ts +++ b/client/src/app/core/repositories/motions/motion-repository.service.ts @@ -5,21 +5,21 @@ import { Observable } from 'rxjs'; import { tap, map } from 'rxjs/operators'; import { BaseRepository } from '../base-repository'; -import { Category } from '../../../shared/models/motions/category'; -import { ChangeRecoMode, ViewMotion } from '../../../site/motions/models/view-motion'; +import { Category } from 'app/shared/models/motions/category'; +import { ChangeRecoMode, ViewMotion } from 'app/site/motions/models/view-motion'; import { CollectionStringMapperService } from '../../core-services/collectionStringMapper.service'; -import { CreateMotion } from '../../../site/motions/models/create-motion'; +import { CreateMotion } from 'app/site/motions/models/create-motion'; import { DataSendService } from '../../core-services/data-send.service'; import { DataStoreService } from '../../core-services/data-store.service'; import { DiffLinesInParagraph, DiffService, LineRange, ModificationType } from '../../ui-services/diff.service'; import { HttpService } from 'app/core/core-services/http.service'; -import { Identifiable } from '../../../shared/models/base/identifiable'; +import { Identifiable } from 'app/shared/models/base/identifiable'; import { Item } from 'app/shared/models/agenda/item'; import { LinenumberingService } from '../../ui-services/linenumbering.service'; import { Mediafile } from 'app/shared/models/mediafiles/mediafile'; -import { Motion } from '../../../shared/models/motions/motion'; +import { Motion } from 'app/shared/models/motions/motion'; import { MotionBlock } from 'app/shared/models/motions/motion-block'; -import { MotionChangeReco } from '../../../shared/models/motions/motion-change-reco'; +import { MotionChangeReco } from 'app/shared/models/motions/motion-change-reco'; import { MotionPoll } from 'app/shared/models/motions/motion-poll'; import { OSTreeSortEvent } from 'app/shared/components/sorting-tree/sorting-tree.component'; import { PersonalNoteService } from '../../ui-services/personal-note.service'; diff --git a/client/src/app/core/repositories/motions/statute-paragraph-repository.service.ts b/client/src/app/core/repositories/motions/statute-paragraph-repository.service.ts index 2da75c95c..e8a6ebe2f 100644 --- a/client/src/app/core/repositories/motions/statute-paragraph-repository.service.ts +++ b/client/src/app/core/repositories/motions/statute-paragraph-repository.service.ts @@ -3,9 +3,9 @@ import { Injectable } from '@angular/core'; import { DataSendService } from '../../core-services/data-send.service'; import { DataStoreService } from '../../core-services/data-store.service'; import { BaseRepository } from '../base-repository'; -import { ViewStatuteParagraph } from '../../../site/motions/models/view-statute-paragraph'; -import { StatuteParagraph } from '../../../shared/models/motions/statute-paragraph'; -import { Identifiable } from '../../../shared/models/base/identifiable'; +import { ViewStatuteParagraph } from 'app/site/motions/models/view-statute-paragraph'; +import { StatuteParagraph } from 'app/shared/models/motions/statute-paragraph'; +import { Identifiable } from 'app/shared/models/base/identifiable'; import { CollectionStringMapperService } from '../../core-services/collectionStringMapper.service'; /** diff --git a/client/src/app/core/repositories/motions/workflow-repository.service.ts b/client/src/app/core/repositories/motions/workflow-repository.service.ts index 960cd9466..a3926287a 100644 --- a/client/src/app/core/repositories/motions/workflow-repository.service.ts +++ b/client/src/app/core/repositories/motions/workflow-repository.service.ts @@ -1,14 +1,14 @@ import { Injectable } from '@angular/core'; -import { Workflow } from '../../../shared/models/motions/workflow'; -import { ViewWorkflow } from '../../../site/motions/models/view-workflow'; +import { Workflow } from 'app/shared/models/motions/workflow'; +import { ViewWorkflow } from 'app/site/motions/models/view-workflow'; import { DataSendService } from '../../core-services/data-send.service'; import { DataStoreService } from '../../core-services/data-store.service'; import { BaseRepository } from '../base-repository'; -import { Identifiable } from '../../../shared/models/base/identifiable'; +import { Identifiable } from 'app/shared/models/base/identifiable'; import { CollectionStringMapperService } from '../../core-services/collectionStringMapper.service'; import { WorkflowState } from 'app/shared/models/motions/workflow-state'; -import { ViewMotion } from '../../../site/motions/models/view-motion'; +import { ViewMotion } from 'app/site/motions/models/view-motion'; /** * Repository Services for Categories diff --git a/client/src/app/core/repositories/projector/countdown-repository.service.ts b/client/src/app/core/repositories/projector/countdown-repository.service.ts index 954db7bd6..4d3a4f111 100644 --- a/client/src/app/core/repositories/projector/countdown-repository.service.ts +++ b/client/src/app/core/repositories/projector/countdown-repository.service.ts @@ -2,10 +2,10 @@ import { Injectable } from '@angular/core'; import { DataSendService } from '../../core-services/data-send.service'; import { DataStoreService } from '../../core-services/data-store.service'; import { BaseRepository } from '../base-repository'; -import { Identifiable } from '../../../shared/models/base/identifiable'; +import { Identifiable } from 'app/shared/models/base/identifiable'; import { CollectionStringMapperService } from '../../core-services/collectionStringMapper.service'; -import { ViewCountdown } from '../../../site/projector/models/view-countdown'; -import { Countdown } from '../../../shared/models/core/countdown'; +import { ViewCountdown } from 'app/site/projector/models/view-countdown'; +import { Countdown } from 'app/shared/models/core/countdown'; @Injectable({ providedIn: 'root' diff --git a/client/src/app/core/repositories/projector/projector-repository.service.ts b/client/src/app/core/repositories/projector/projector-repository.service.ts index 60f001593..1410cde96 100644 --- a/client/src/app/core/repositories/projector/projector-repository.service.ts +++ b/client/src/app/core/repositories/projector/projector-repository.service.ts @@ -4,9 +4,9 @@ import { BaseRepository } from '../base-repository'; import { CollectionStringMapperService } from '../../core-services/collectionStringMapper.service'; import { DataSendService } from '../../core-services/data-send.service'; import { DataStoreService } from '../../core-services/data-store.service'; -import { Identifiable } from '../../../shared/models/base/identifiable'; -import { ViewProjector } from '../../../site/projector/models/view-projector'; -import { Projector } from '../../../shared/models/core/projector'; +import { Identifiable } from 'app/shared/models/base/identifiable'; +import { ViewProjector } from 'app/site/projector/models/view-projector'; +import { Projector } from 'app/shared/models/core/projector'; import { HttpService } from 'app/core/core-services/http.service'; /** diff --git a/client/src/app/core/repositories/projector/projectormessage-repository.service.ts b/client/src/app/core/repositories/projector/projectormessage-repository.service.ts index cff525de1..98dd352df 100644 --- a/client/src/app/core/repositories/projector/projectormessage-repository.service.ts +++ b/client/src/app/core/repositories/projector/projectormessage-repository.service.ts @@ -1,10 +1,10 @@ import { Injectable } from '@angular/core'; import { DataStoreService } from '../../core-services/data-store.service'; import { BaseRepository } from '../base-repository'; -import { Identifiable } from '../../../shared/models/base/identifiable'; +import { Identifiable } from 'app/shared/models/base/identifiable'; import { CollectionStringMapperService } from '../../core-services/collectionStringMapper.service'; import { ProjectorMessage } from 'app/shared/models/core/projector-message'; -import { ViewProjectorMessage } from '../../../site/projector/models/view-projectormessage'; +import { ViewProjectorMessage } from 'app/site/projector/models/view-projectormessage'; @Injectable({ providedIn: 'root' diff --git a/client/src/app/core/repositories/tags/tag-repository.service.ts b/client/src/app/core/repositories/tags/tag-repository.service.ts index f615e3d25..ea81504db 100644 --- a/client/src/app/core/repositories/tags/tag-repository.service.ts +++ b/client/src/app/core/repositories/tags/tag-repository.service.ts @@ -1,11 +1,11 @@ import { Injectable } from '@angular/core'; -import { Tag } from '../../../shared/models/core/tag'; -import { ViewTag } from '../../../site/tags/models/view-tag'; +import { Tag } from 'app/shared/models/core/tag'; +import { ViewTag } from 'app/site/tags/models/view-tag'; import { DataSendService } from '../../core-services/data-send.service'; import { DataStoreService } from '../../core-services/data-store.service'; import { BaseRepository } from '../base-repository'; -import { Identifiable } from '../../../shared/models/base/identifiable'; +import { Identifiable } from 'app/shared/models/base/identifiable'; import { CollectionStringMapperService } from '../../core-services/collectionStringMapper.service'; /** diff --git a/client/src/app/core/repositories/users/group-repository.service.ts b/client/src/app/core/repositories/users/group-repository.service.ts index 7d2709fc9..33349aaec 100644 --- a/client/src/app/core/repositories/users/group-repository.service.ts +++ b/client/src/app/core/repositories/users/group-repository.service.ts @@ -5,9 +5,9 @@ import { CollectionStringMapperService } from '../../core-services/collectionStr import { ConstantsService } from '../../ui-services/constants.service'; import { DataSendService } from '../../core-services/data-send.service'; import { DataStoreService } from '../../core-services/data-store.service'; -import { Group } from '../../../shared/models/users/group'; -import { Identifiable } from '../../../shared/models/base/identifiable'; -import { ViewGroup } from '../../../site/users/models/view-group'; +import { Group } from 'app/shared/models/users/group'; +import { Identifiable } from 'app/shared/models/base/identifiable'; +import { ViewGroup } from 'app/site/users/models/view-group'; /** * Shape of a permission diff --git a/client/src/app/core/repositories/users/user-repository.service.ts b/client/src/app/core/repositories/users/user-repository.service.ts index 4acb039a8..404c88b37 100644 --- a/client/src/app/core/repositories/users/user-repository.service.ts +++ b/client/src/app/core/repositories/users/user-repository.service.ts @@ -1,12 +1,12 @@ import { Injectable } from '@angular/core'; import { BaseRepository } from '../base-repository'; -import { ViewUser } from '../../../site/users/models/view-user'; -import { User } from '../../../shared/models/users/user'; -import { Group } from '../../../shared/models/users/group'; +import { ViewUser } from 'app/site/users/models/view-user'; +import { User } from 'app/shared/models/users/user'; +import { Group } from 'app/shared/models/users/group'; import { DataStoreService } from '../../core-services/data-store.service'; import { DataSendService } from '../../core-services/data-send.service'; -import { Identifiable } from '../../../shared/models/base/identifiable'; +import { Identifiable } from 'app/shared/models/base/identifiable'; import { CollectionStringMapperService } from '../../core-services/collectionStringMapper.service'; import { ConfigService } from 'app/core/ui-services/config.service'; import { HttpService } from 'app/core/core-services/http.service'; diff --git a/client/src/app/core/ui-services/count-users.service.spec.ts b/client/src/app/core/ui-services/count-users.service.spec.ts new file mode 100644 index 000000000..e505d55d4 --- /dev/null +++ b/client/src/app/core/ui-services/count-users.service.spec.ts @@ -0,0 +1,17 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { E2EImportsModule } from '../../../e2e-imports.module'; +import { CountUsersService } from './count-users.service'; + +describe('CountUsersService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [E2EImportsModule], + providers: [CountUsersService] + }); + }); + + it('should be created', inject([CountUsersService], (service: CountUsersService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/client/src/app/core/ui-services/count-users.service.ts b/client/src/app/core/ui-services/count-users.service.ts new file mode 100644 index 000000000..2c4a54ce2 --- /dev/null +++ b/client/src/app/core/ui-services/count-users.service.ts @@ -0,0 +1,107 @@ +import { Injectable } from '@angular/core'; + +import { Observable, Subject } from 'rxjs'; + +import { OpenSlidesComponent } from 'app/openslides.component'; +import { NotifyService } from '../core-services/notify.service'; +import { OperatorService } from '../core-services/operator.service'; + +interface CountUserRequest { + token: string; +} + +interface CountUserResponse extends CountUserRequest { + userId: number; +} + +const REQUEST_NAME = 'count-user-request'; +const RESPONSE_NAME = 'count-user-response'; + +/** + * Provides functionality to count users with notify. + * Sends requests to all active instances, which (hopefully) respond to this message. + * Here, the answers will be collected and aggegated. + */ +@Injectable({ + providedIn: 'root' +}) +export class CountUsersService extends OpenSlidesComponent { + private activeCounts: { [token: string]: Subject } = {}; + + private currentUserId: number; + + /** + * Sets up all listeners + * + * @param notifyService + * @param operator + */ + public constructor(private notifyService: NotifyService, operator: OperatorService) { + super(); + + // Listen for requests to send an answer. + this.notifyService.getMessageObservable(REQUEST_NAME).subscribe(request => { + if (request.content.token) { + this.notifyService.sendToChannels( + RESPONSE_NAME, + { + token: request.content.token, + userId: this.currentUserId + }, + request.senderChannelName + ); + } + }); + + // Listen for responses and distribute them through `activeCounts` + this.notifyService.getMessageObservable(RESPONSE_NAME).subscribe(response => { + if (response.content.userId && response.content.token && this.activeCounts[response.content.token]) { + this.activeCounts[response.content.token].next(response.content.userId); + } + }); + + // Look for the current user. + operator.getObservable().subscribe(user => (this.currentUserId = user ? user.id : null)); + } + + /** + * @returns a generated track token to keep track of the counting. + */ + private generateTrackToken(): string { + let token = ''; + const characters = '0123456789abcdef'; + for (let i = 0; i < 32; i++) { + token += characters.charAt(Math.floor(Math.random() * characters.length)); + } + return token; + } + + /** + * Starts the counting process + * + * @returns a tuple: the first entry is a token, which can be used to stop the + * counting with `stopCounting`. The second entry is an observable, where all user + * ids will be published. + */ + public countUsers(): [string, Observable] { + const trackToken = this.generateTrackToken(); + const subject = new Subject(); + this.activeCounts[trackToken] = subject; + this.notifyService.sendToAllUsers(REQUEST_NAME, { + token: trackToken + }); + return [trackToken, this.activeCounts[trackToken].asObservable()]; + } + + /** + * Stops an active counting by the provided token + * + * @param token The count to stop + */ + public stopCounting(trackToken: string): void { + if (this.activeCounts[trackToken]) { + this.activeCounts[trackToken].complete(); + delete this.activeCounts[trackToken]; + } + } +} diff --git a/client/src/app/shared/components/copyright-sign/copyright-sign.component.ts b/client/src/app/shared/components/copyright-sign/copyright-sign.component.ts index 2b1f09e51..5f1e6270d 100644 --- a/client/src/app/shared/components/copyright-sign/copyright-sign.component.ts +++ b/client/src/app/shared/components/copyright-sign/copyright-sign.component.ts @@ -4,8 +4,8 @@ import { Component, OnInit, OnDestroy } from '@angular/core'; import { MatDialogRef, MatDialog } from '@angular/material'; -import { OperatorService } from '../../../core/core-services/operator.service'; -import { NotifyService, NotifyResponse } from '../../../core/core-services/notify.service'; +import { OperatorService } from 'app/core/core-services/operator.service'; +import { NotifyService, NotifyResponse } from 'app/core/core-services/notify.service'; import { Subscription } from 'rxjs'; /** diff --git a/client/src/app/shared/components/head-bar/head-bar.component.ts b/client/src/app/shared/components/head-bar/head-bar.component.ts index dff57c184..f232ba5c5 100644 --- a/client/src/app/shared/components/head-bar/head-bar.component.ts +++ b/client/src/app/shared/components/head-bar/head-bar.component.ts @@ -2,8 +2,8 @@ import { Component, Input, Output, EventEmitter } from '@angular/core'; import { Location } from '@angular/common'; import { Router, ActivatedRoute } from '@angular/router'; -import { ViewportService } from '../../../core/ui-services/viewport.service'; -import { MainMenuService } from '../../../core/core-services/main-menu.service'; +import { ViewportService } from 'app/core/ui-services/viewport.service'; +import { MainMenuService } from 'app/core/core-services/main-menu.service'; /** * Reusable head bar component for Apps. diff --git a/client/src/app/shared/components/legal-notice-content/legal-notice-content.component.ts b/client/src/app/shared/components/legal-notice-content/legal-notice-content.component.ts index 1bf036a86..0cb2d5340 100644 --- a/client/src/app/shared/components/legal-notice-content/legal-notice-content.component.ts +++ b/client/src/app/shared/components/legal-notice-content/legal-notice-content.component.ts @@ -2,9 +2,9 @@ import { Component, OnInit } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; -import { LoginDataService } from '../../../core/ui-services/login-data.service'; +import { LoginDataService } from 'app/core/ui-services/login-data.service'; import { environment } from 'environments/environment'; -import { HttpService } from '../../../core/core-services/http.service'; +import { HttpService } from 'app/core/core-services/http.service'; /** * Characterize a plugin. This data is retrieved from the server diff --git a/client/src/app/shared/components/logo/logo.component.ts b/client/src/app/shared/components/logo/logo.component.ts index 8c47a74bb..fa2b0a5d9 100644 --- a/client/src/app/shared/components/logo/logo.component.ts +++ b/client/src/app/shared/components/logo/logo.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, Input } from '@angular/core'; -import { MediaManageService } from '../../../core/ui-services/media-manage.service'; +import { MediaManageService } from 'app/core/ui-services/media-manage.service'; import { ConfigService } from 'app/core/ui-services/config.service'; /** diff --git a/client/src/app/shared/components/meta-text-block/meta-text-block.component.ts b/client/src/app/shared/components/meta-text-block/meta-text-block.component.ts index 044eae4ea..b9c11a600 100644 --- a/client/src/app/shared/components/meta-text-block/meta-text-block.component.ts +++ b/client/src/app/shared/components/meta-text-block/meta-text-block.component.ts @@ -1,7 +1,7 @@ import { Component, Input } from '@angular/core'; import { BaseComponent } from '../../../base.component'; -import { ViewportService } from '../../../core/ui-services/viewport.service'; +import { ViewportService } from 'app/core/ui-services/viewport.service'; /** * Component for the motion comments view diff --git a/client/src/app/shared/components/os-sort-filter-bar/filter-menu/filter-menu.component.ts b/client/src/app/shared/components/os-sort-filter-bar/filter-menu/filter-menu.component.ts index bdd4f4566..d448c7836 100644 --- a/client/src/app/shared/components/os-sort-filter-bar/filter-menu/filter-menu.component.ts +++ b/client/src/app/shared/components/os-sort-filter-bar/filter-menu/filter-menu.component.ts @@ -1,4 +1,5 @@ import { Output, Component, OnInit, EventEmitter, Input } from '@angular/core'; + import { BaseFilterListService, OsFilterOption } from 'app/core/ui-services/base-filter-list.service'; /** diff --git a/client/src/app/shared/components/os-sort-filter-bar/os-sort-bottom-sheet/os-sort-bottom-sheet.component.ts b/client/src/app/shared/components/os-sort-filter-bar/os-sort-bottom-sheet/os-sort-bottom-sheet.component.ts index eec486716..d2456d449 100644 --- a/client/src/app/shared/components/os-sort-filter-bar/os-sort-bottom-sheet/os-sort-bottom-sheet.component.ts +++ b/client/src/app/shared/components/os-sort-filter-bar/os-sort-bottom-sheet/os-sort-bottom-sheet.component.ts @@ -1,7 +1,8 @@ import { Inject, Component, OnInit } from '@angular/core'; import { MatBottomSheetRef, MAT_BOTTOM_SHEET_DATA } from '@angular/material'; -import { BaseViewModel } from '../../../../site/base/base-view-model'; + import { BaseSortListService } from 'app/core/ui-services/base-sort-list.service'; +import { BaseViewModel } from 'app/site/base/base-view-model'; /** * A bottom sheet used for setting a list's sorting, used by {@link SortFilterBarComponent} diff --git a/client/src/app/shared/components/os-sort-filter-bar/os-sort-filter-bar.component.ts b/client/src/app/shared/components/os-sort-filter-bar/os-sort-filter-bar.component.ts index 13ea304fd..9f9be61a6 100644 --- a/client/src/app/shared/components/os-sort-filter-bar/os-sort-filter-bar.component.ts +++ b/client/src/app/shared/components/os-sort-filter-bar/os-sort-filter-bar.component.ts @@ -3,12 +3,12 @@ import { MatBottomSheet } from '@angular/material'; import { TranslateService } from '@ngx-translate/core'; -import { BaseViewModel } from '../../../site/base/base-view-model'; +import { BaseViewModel } from 'app/site/base/base-view-model'; import { OsSortBottomSheetComponent } from './os-sort-bottom-sheet/os-sort-bottom-sheet.component'; import { FilterMenuComponent } from './filter-menu/filter-menu.component'; -import { OsSortingItem } from '../../../core/ui-services/base-sort-list.service'; -import { BaseSortListService } from '../../../core/ui-services/base-sort-list.service'; -import { ViewportService } from '../../../core/ui-services/viewport.service'; +import { OsSortingItem } from 'app/core/ui-services/base-sort-list.service'; +import { BaseSortListService } from 'app/core/ui-services/base-sort-list.service'; +import { ViewportService } from 'app/core/ui-services/viewport.service'; /** * Reusable bar for list views, offering sorting and filter options. diff --git a/client/src/app/shared/components/privacy-policy-content/privacy-policy-content.component.ts b/client/src/app/shared/components/privacy-policy-content/privacy-policy-content.component.ts index 59eec83ad..456935e44 100644 --- a/client/src/app/shared/components/privacy-policy-content/privacy-policy-content.component.ts +++ b/client/src/app/shared/components/privacy-policy-content/privacy-policy-content.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; -import { LoginDataService } from '../../../core/ui-services/login-data.service'; +import { LoginDataService } from 'app/core/ui-services/login-data.service'; /** * Shared component to hold the content of the Privacy Policy. diff --git a/client/src/app/shared/models/assignments/assignment.ts b/client/src/app/shared/models/assignments/assignment.ts index 7d9d54d62..d013044c3 100644 --- a/client/src/app/shared/models/assignments/assignment.ts +++ b/client/src/app/shared/models/assignments/assignment.ts @@ -1,7 +1,7 @@ import { AssignmentUser } from './assignment-user'; import { Poll } from './poll'; import { AgendaBaseModel } from '../base/agenda-base-model'; -import { SearchRepresentation } from '../../../core/ui-services/search.service'; +import { SearchRepresentation } from 'app/core/ui-services/search.service'; export const assignmentPhase = [ { key: 0, name: 'Searching for candidates' }, diff --git a/client/src/app/shared/models/base/agenda-base-model.ts b/client/src/app/shared/models/base/agenda-base-model.ts index 9cd714764..25a5cafea 100644 --- a/client/src/app/shared/models/base/agenda-base-model.ts +++ b/client/src/app/shared/models/base/agenda-base-model.ts @@ -1,6 +1,6 @@ import { AgendaInformation } from './agenda-information'; import { Searchable } from './searchable'; -import { SearchRepresentation } from '../../../core/ui-services/search.service'; +import { SearchRepresentation } from 'app/core/ui-services/search.service'; import { BaseModel } from './base-model'; /** diff --git a/client/src/app/shared/models/base/searchable.ts b/client/src/app/shared/models/base/searchable.ts index dce5d2d8f..0a11a4ef0 100644 --- a/client/src/app/shared/models/base/searchable.ts +++ b/client/src/app/shared/models/base/searchable.ts @@ -1,5 +1,5 @@ import { DetailNavigable } from './detail-navigable'; -import { SearchRepresentation } from '../../../core/ui-services/search.service'; +import { SearchRepresentation } from 'app/core/ui-services/search.service'; /** * Asserts, if the given object is searchable. diff --git a/client/src/app/shared/models/motions/category.ts b/client/src/app/shared/models/motions/category.ts index 19e4fde2c..761a60307 100644 --- a/client/src/app/shared/models/motions/category.ts +++ b/client/src/app/shared/models/motions/category.ts @@ -1,6 +1,6 @@ import { BaseModel } from '../base/base-model'; import { Searchable } from '../base/searchable'; -import { SearchRepresentation } from '../../../core/ui-services/search.service'; +import { SearchRepresentation } from 'app/core/ui-services/search.service'; /** * Representation of a motion category. Has the nested property "File" diff --git a/client/src/app/shared/models/motions/motion-block.ts b/client/src/app/shared/models/motions/motion-block.ts index 9206faf93..0dc597b03 100644 --- a/client/src/app/shared/models/motions/motion-block.ts +++ b/client/src/app/shared/models/motions/motion-block.ts @@ -1,5 +1,5 @@ import { AgendaBaseModel } from '../base/agenda-base-model'; -import { SearchRepresentation } from '../../../core/ui-services/search.service'; +import { SearchRepresentation } from 'app/core/ui-services/search.service'; /** * Representation of a motion block. diff --git a/client/src/app/shared/models/motions/motion.ts b/client/src/app/shared/models/motions/motion.ts index 3f3c585ba..3f6fa7e9f 100644 --- a/client/src/app/shared/models/motions/motion.ts +++ b/client/src/app/shared/models/motions/motion.ts @@ -1,7 +1,7 @@ import { MotionSubmitter } from './motion-submitter'; import { MotionComment } from './motion-comment'; import { AgendaBaseModel } from '../base/agenda-base-model'; -import { SearchRepresentation } from '../../../core/ui-services/search.service'; +import { SearchRepresentation } from 'app/core/ui-services/search.service'; import { MotionPoll } from './motion-poll'; /** diff --git a/client/src/app/shared/models/motions/statute-paragraph.ts b/client/src/app/shared/models/motions/statute-paragraph.ts index d3bfa11e5..037b132d5 100644 --- a/client/src/app/shared/models/motions/statute-paragraph.ts +++ b/client/src/app/shared/models/motions/statute-paragraph.ts @@ -1,6 +1,6 @@ import { BaseModel } from '../base/base-model'; import { Searchable } from '../base/searchable'; -import { SearchRepresentation } from '../../../core/ui-services/search.service'; +import { SearchRepresentation } from 'app/core/ui-services/search.service'; /** * Representation of a statute paragraph. diff --git a/client/src/app/shared/models/topics/topic.ts b/client/src/app/shared/models/topics/topic.ts index 75ab7f29a..a4125d0f5 100644 --- a/client/src/app/shared/models/topics/topic.ts +++ b/client/src/app/shared/models/topics/topic.ts @@ -1,5 +1,5 @@ import { AgendaBaseModel } from '../base/agenda-base-model'; -import { SearchRepresentation } from '../../../core/ui-services/search.service'; +import { SearchRepresentation } from 'app/core/ui-services/search.service'; /** * Representation of a topic. diff --git a/client/src/app/shared/models/users/user.ts b/client/src/app/shared/models/users/user.ts index 2a8b7161b..9fe7eb1f0 100644 --- a/client/src/app/shared/models/users/user.ts +++ b/client/src/app/shared/models/users/user.ts @@ -1,5 +1,5 @@ import { Searchable } from '../base/searchable'; -import { SearchRepresentation } from '../../../core/ui-services/search.service'; +import { SearchRepresentation } from 'app/core/ui-services/search.service'; import { BaseModel } from '../base/base-model'; import { DetailNavigable } from '../base/detail-navigable'; diff --git a/client/src/app/site/agenda/models/view-item.ts b/client/src/app/site/agenda/models/view-item.ts index 5919c1801..657b79531 100644 --- a/client/src/app/site/agenda/models/view-item.ts +++ b/client/src/app/site/agenda/models/view-item.ts @@ -1,6 +1,6 @@ import { BaseViewModel } from '../../base/base-view-model'; -import { Item } from '../../../shared/models/agenda/item'; -import { AgendaBaseModel } from '../../../shared/models/base/agenda-base-model'; +import { Item } from 'app/shared/models/agenda/item'; +import { AgendaBaseModel } from 'app/shared/models/base/agenda-base-model'; import { Speaker } from 'app/shared/models/agenda/speaker'; export class ViewItem extends BaseViewModel { diff --git a/client/src/app/site/agenda/services/agenda-filter-list.service.ts b/client/src/app/site/agenda/services/agenda-filter-list.service.ts index 8df8d6f3b..d67b48e60 100644 --- a/client/src/app/site/agenda/services/agenda-filter-list.service.ts +++ b/client/src/app/site/agenda/services/agenda-filter-list.service.ts @@ -1,10 +1,10 @@ import { Injectable } from '@angular/core'; -import { BaseFilterListService, OsFilter, OsFilterOption } from '../../../core/ui-services/base-filter-list.service'; -import { Item, itemVisibilityChoices } from '../../../shared/models/agenda/item'; +import { BaseFilterListService, OsFilter, OsFilterOption } from 'app/core/ui-services/base-filter-list.service'; +import { Item, itemVisibilityChoices } from 'app/shared/models/agenda/item'; import { ViewItem } from '../models/view-item'; import { StorageService } from 'app/core/core-services/storage.service'; -import { AgendaRepositoryService } from '../../../core/repositories/agenda/agenda-repository.service'; +import { AgendaRepositoryService } from 'app/core/repositories/agenda/agenda-repository.service'; @Injectable({ providedIn: 'root' diff --git a/client/src/app/site/assignments/assignment-list/assignment-list.component.ts b/client/src/app/site/assignments/assignment-list/assignment-list.component.ts index 5b0b5c3a0..be4a7229d 100644 --- a/client/src/app/site/assignments/assignment-list/assignment-list.component.ts +++ b/client/src/app/site/assignments/assignment-list/assignment-list.component.ts @@ -4,9 +4,9 @@ import { TranslateService } from '@ngx-translate/core'; import { Title } from '@angular/platform-browser'; import { AssignmentFilterListService } from '../services/assignment-filter.service'; -import { AssignmentRepositoryService } from '../../../core/repositories/assignments/assignment-repository.service'; +import { AssignmentRepositoryService } from 'app/core/repositories/assignments/assignment-repository.service'; import { ListViewBaseComponent } from '../../base/list-view-base'; -import { PromptService } from '../../../core/ui-services/prompt.service'; +import { PromptService } from 'app/core/ui-services/prompt.service'; import { ViewAssignment } from '../models/view-assignment'; import { AssignmentSortListService } from '../services/assignment-sort-list.service'; diff --git a/client/src/app/site/assignments/models/view-assignment.ts b/client/src/app/site/assignments/models/view-assignment.ts index 561569136..c400a13b3 100644 --- a/client/src/app/site/assignments/models/view-assignment.ts +++ b/client/src/app/site/assignments/models/view-assignment.ts @@ -1,8 +1,8 @@ import { BaseViewModel } from '../../base/base-view-model'; -import { Assignment } from '../../../shared/models/assignments/assignment'; -import { Tag } from '../../../shared/models/core/tag'; -import { User } from '../../../shared/models/users/user'; -import { Item } from '../../../shared/models/agenda/item'; +import { Assignment } from 'app/shared/models/assignments/assignment'; +import { Tag } from 'app/shared/models/core/tag'; +import { User } from 'app/shared/models/users/user'; +import { Item } from 'app/shared/models/agenda/item'; export class ViewAssignment extends BaseViewModel { private _assignment: Assignment; diff --git a/client/src/app/site/assignments/services/assignment-filter.service.ts b/client/src/app/site/assignments/services/assignment-filter.service.ts index e99433d02..289c9df57 100644 --- a/client/src/app/site/assignments/services/assignment-filter.service.ts +++ b/client/src/app/site/assignments/services/assignment-filter.service.ts @@ -1,8 +1,8 @@ import { Injectable } from '@angular/core'; -import { AssignmentRepositoryService } from '../../../core/repositories/assignments/assignment-repository.service'; -import { Assignment, assignmentPhase } from '../../../shared/models/assignments/assignment'; -import { BaseFilterListService, OsFilter, OsFilterOption } from '../../../core/ui-services/base-filter-list.service'; +import { AssignmentRepositoryService } from 'app/core/repositories/assignments/assignment-repository.service'; +import { Assignment, assignmentPhase } from 'app/shared/models/assignments/assignment'; +import { BaseFilterListService, OsFilter, OsFilterOption } from 'app/core/ui-services/base-filter-list.service'; import { StorageService } from 'app/core/core-services/storage.service'; import { ViewAssignment } from '../models/view-assignment'; diff --git a/client/src/app/site/assignments/services/assignment-sort-list.service.ts b/client/src/app/site/assignments/services/assignment-sort-list.service.ts index abe038070..ec6e11c8e 100644 --- a/client/src/app/site/assignments/services/assignment-sort-list.service.ts +++ b/client/src/app/site/assignments/services/assignment-sort-list.service.ts @@ -1,5 +1,6 @@ import { Injectable } from '@angular/core'; -import { BaseSortListService, OsSortingDefinition } from '../../../core/ui-services/base-sort-list.service'; + +import { BaseSortListService, OsSortingDefinition } from 'app/core/ui-services/base-sort-list.service'; import { ViewAssignment } from '../models/view-assignment'; @Injectable({ diff --git a/client/src/app/site/common/common.module.ts b/client/src/app/site/common/common.module.ts index 48e0e2203..2ab393a66 100644 --- a/client/src/app/site/common/common.module.ts +++ b/client/src/app/site/common/common.module.ts @@ -7,11 +7,10 @@ import { PrivacyPolicyComponent } from './components/privacy-policy/privacy-poli import { StartComponent } from './components/start/start.component'; import { LegalNoticeComponent } from './components/legal-notice/legal-notice.component'; import { SearchComponent } from './components/search/search.component'; -import { CountdownRepositoryService } from '../../core/repositories/projector/countdown-repository.service'; +import { CountUsersComponent } from './components/count-users/count-users.component'; @NgModule({ - providers: [CountdownRepositoryService], imports: [AngularCommonModule, CommonRoutingModule, SharedModule], - declarations: [PrivacyPolicyComponent, StartComponent, LegalNoticeComponent, SearchComponent] + declarations: [PrivacyPolicyComponent, StartComponent, LegalNoticeComponent, SearchComponent, CountUsersComponent] }) export class CommonModule {} diff --git a/client/src/app/site/common/components/count-users/count-users.component.html b/client/src/app/site/common/components/count-users/count-users.component.html new file mode 100644 index 000000000..4b088e3e8 --- /dev/null +++ b/client/src/app/site/common/components/count-users/count-users.component.html @@ -0,0 +1,22 @@ + + + +
+

+ {{ userIds().length }} active users + ({{ stats.activeUserHandles }} connections) +

+

Groups

+
    +
  • + {{ stats.groups[groupId].name }}: + {{ userInGroupIds(groupId).length }} active users + ({{ stats.groups[groupId].userHandleCount }} connections) +
  • +
+
+
diff --git a/client/src/app/site/common/components/count-users/count-users.component.spec.ts b/client/src/app/site/common/components/count-users/count-users.component.spec.ts new file mode 100644 index 000000000..706141fc2 --- /dev/null +++ b/client/src/app/site/common/components/count-users/count-users.component.spec.ts @@ -0,0 +1,26 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { CountUsersComponent } from './count-users.component'; +import { E2EImportsModule } from '../../../../../e2e-imports.module'; + +describe('CountUsersComponent', () => { + let component: CountUsersComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + imports: [E2EImportsModule], + declarations: [CountUsersComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(CountUsersComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/client/src/app/site/common/components/count-users/count-users.component.ts b/client/src/app/site/common/components/count-users/count-users.component.ts new file mode 100644 index 000000000..abb7de8bc --- /dev/null +++ b/client/src/app/site/common/components/count-users/count-users.component.ts @@ -0,0 +1,55 @@ +import { Component, OnDestroy } from '@angular/core'; + +import { Observable } from 'rxjs'; +import { auditTime } from 'rxjs/operators'; + +import { CountUsersStatisticsService, CountUserStatistics } from '../../services/count-user-statistics.service'; + +/** + * This component provides an interface to count users + */ +@Component({ + selector: 'os-count-users', + templateUrl: './count-users.component.html' +}) +export class CountUsersComponent implements OnDestroy { + public token: string = null; + public stats: CountUserStatistics = null; + + public constructor(private countUsersStatisticService: CountUsersStatisticsService) {} + + public countUsers(): void { + if (this.token) { + return; + } + let statsObservable: Observable; + [this.token, statsObservable] = this.countUsersStatisticService.countUsers(); + statsObservable.pipe(auditTime(100)).subscribe(stats => { + this.stats = stats; + }); + } + + public stopCounting(): void { + if (this.token) { + this.countUsersStatisticService.stopCounting(this.token); + this.token = null; + this.stats = null; + } + } + + public userIds(): number[] { + return Object.keys(this.stats.activeUsers).map(id => +id); + } + + public groupIds(): number[] { + return Object.keys(this.stats.groups).map(id => +id); + } + + public userInGroupIds(groupId: number): number[] { + return Object.keys(this.stats.groups[groupId].users).map(id => +id); + } + + public ngOnDestroy(): void { + this.stopCounting(); + } +} diff --git a/client/src/app/site/common/components/legal-notice/legal-notice.component.html b/client/src/app/site/common/components/legal-notice/legal-notice.component.html index 6ec3f8340..30b81be85 100644 --- a/client/src/app/site/common/components/legal-notice/legal-notice.component.html +++ b/client/src/app/site/common/components/legal-notice/legal-notice.component.html @@ -5,3 +5,5 @@ + + diff --git a/client/src/app/site/common/components/legal-notice/legal-notice.component.scss b/client/src/app/site/common/components/legal-notice/legal-notice.component.scss deleted file mode 100644 index e69de29bb..000000000 diff --git a/client/src/app/site/common/components/legal-notice/legal-notice.component.spec.ts b/client/src/app/site/common/components/legal-notice/legal-notice.component.spec.ts index ff6df19d7..3a7016230 100644 --- a/client/src/app/site/common/components/legal-notice/legal-notice.component.spec.ts +++ b/client/src/app/site/common/components/legal-notice/legal-notice.component.spec.ts @@ -2,6 +2,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { LegalNoticeComponent } from './legal-notice.component'; import { E2EImportsModule } from '../../../../../e2e-imports.module'; +import { CountUsersComponent } from '../count-users/count-users.component'; describe('LegalNoticeComponent', () => { let component: LegalNoticeComponent; @@ -10,7 +11,7 @@ describe('LegalNoticeComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ imports: [E2EImportsModule], - declarations: [LegalNoticeComponent] + declarations: [LegalNoticeComponent, CountUsersComponent] }).compileComponents(); })); diff --git a/client/src/app/site/common/components/legal-notice/legal-notice.component.ts b/client/src/app/site/common/components/legal-notice/legal-notice.component.ts index a0e874f95..387297c85 100644 --- a/client/src/app/site/common/components/legal-notice/legal-notice.component.ts +++ b/client/src/app/site/common/components/legal-notice/legal-notice.component.ts @@ -1,12 +1,9 @@ -import { Component, OnInit } from '@angular/core'; +import { Component } from '@angular/core'; @Component({ selector: 'os-legal-notice', - templateUrl: './legal-notice.component.html', - styleUrls: ['./legal-notice.component.scss'] + templateUrl: './legal-notice.component.html' }) -export class LegalNoticeComponent implements OnInit { +export class LegalNoticeComponent { public constructor() {} - - public ngOnInit(): void {} } diff --git a/client/src/app/site/common/components/start/start.component.ts b/client/src/app/site/common/components/start/start.component.ts index f95985eb6..9e59fa02e 100644 --- a/client/src/app/site/common/components/start/start.component.ts +++ b/client/src/app/site/common/components/start/start.component.ts @@ -5,7 +5,7 @@ import { BaseComponent } from 'app/base.component'; import { TranslateService } from '@ngx-translate/core'; // showcase // for testing the DS and BaseModel -import { Config } from '../../../../shared/models/core/config'; +import { Config } from 'app/shared/models/core/config'; import { DataStoreService } from 'app/core/core-services/data-store.service'; @Component({ diff --git a/client/src/app/site/common/services/count-user-statistics.service.ts b/client/src/app/site/common/services/count-user-statistics.service.ts new file mode 100644 index 000000000..3b40865a0 --- /dev/null +++ b/client/src/app/site/common/services/count-user-statistics.service.ts @@ -0,0 +1,102 @@ +import { Injectable } from '@angular/core'; + +import { OpenSlidesComponent } from 'app/openslides.component'; +import { CountUsersService } from 'app/core/ui-services/count-users.service'; +import { Observable, BehaviorSubject } from 'rxjs'; +import { UserRepositoryService } from 'app/core/repositories/users/user-repository.service'; + +/** + * The format of the count statistic + */ +export interface CountUserStatistics { + activeUserHandles: number; + activeUsers: { + [id: number]: number; + }; + groups: { + [id: number]: { + name: string; + users: { + [id: number]: number; + }; + userHandleCount: number; + }; + }; +} + +/** + * Provides statistics for counting users + */ +@Injectable({ + providedIn: 'root' +}) +export class CountUsersStatisticsService extends OpenSlidesComponent { + private runningCounts: { [token: string]: BehaviorSubject } = {}; + + public constructor(private countUserService: CountUsersService, private userRepo: UserRepositoryService) { + super(); + } + + /** + * Starts counting users. + * + * @returns a 2-tuple: A token to stop the counting with `stopCounting` and + * an observable where the statistics are published. + */ + public countUsers(): [string, Observable] { + let token: string; + let userIdObservable: Observable; + + // Start counting + // TODO: maybe we shold bet the observable bofore the actual countig was + // started. We might miss some user ids. + [token, userIdObservable] = this.countUserService.countUsers(); + this.runningCounts[token] = new BehaviorSubject({ + activeUserHandles: 0, + activeUsers: {}, + groups: {} + }); + + // subscribe to responses + userIdObservable.subscribe(userId => { + const stats = this.runningCounts[token].getValue(); + const user = this.userRepo.getViewModel(userId); + + // Add to user stats + stats.activeUserHandles++; + if (!stats.activeUsers[userId]) { + stats.activeUsers[userId] = 0; + } + stats.activeUsers[userId]++; + + // Add to group stats + const groups = user ? user.groups : []; + groups.forEach(group => { + if (!stats.groups[group.id]) { + stats.groups[group.id] = { + name: group.name, + users: {}, + userHandleCount: 0 + }; + } + stats.groups[group.id].userHandleCount++; + stats.groups[group.id].users[userId] = stats.activeUsers[userId]; + }); + this.runningCounts[token].next(stats); + }); + + return [token, this.runningCounts[token].asObservable()]; + } + + /** + * Stop an active count. + * + * @param token The token to identify the current count + */ + public stopCounting(token: string): void { + if (this.runningCounts[token]) { + this.runningCounts[token].complete(); + delete this.runningCounts[token]; + } + } +} diff --git a/client/src/app/site/config/components/config-field/config-field.component.ts b/client/src/app/site/config/components/config-field/config-field.component.ts index ba5a661ee..7877ece84 100644 --- a/client/src/app/site/config/components/config-field/config-field.component.ts +++ b/client/src/app/site/config/components/config-field/config-field.component.ts @@ -8,7 +8,7 @@ import { ViewConfig } from '../../models/view-config'; import { BaseComponent } from '../../../../base.component'; import { FormGroup, FormBuilder } from '@angular/forms'; import { ConfigRepositoryService } from '../../services/config-repository.service'; -import { ParentErrorStateMatcher } from '../../../../shared/parent-error-state-matcher'; +import { ParentErrorStateMatcher } from 'app/shared/parent-error-state-matcher'; /** * List view for the categories. diff --git a/client/src/app/site/config/models/view-config.ts b/client/src/app/site/config/models/view-config.ts index 508e9c1f1..3957f2d33 100644 --- a/client/src/app/site/config/models/view-config.ts +++ b/client/src/app/site/config/models/view-config.ts @@ -1,5 +1,5 @@ import { BaseViewModel } from '../../base/base-view-model'; -import { Config } from '../../../shared/models/core/config'; +import { Config } from 'app/shared/models/core/config'; interface ConfigChoice { value: string; diff --git a/client/src/app/site/config/services/config-repository.service.ts b/client/src/app/site/config/services/config-repository.service.ts index ada2f65bf..2efa7308e 100644 --- a/client/src/app/site/config/services/config-repository.service.ts +++ b/client/src/app/site/config/services/config-repository.service.ts @@ -1,14 +1,14 @@ import { Injectable } from '@angular/core'; -import { BaseRepository } from '../../../core/repositories/base-repository'; +import { BaseRepository } from 'app/core/repositories/base-repository'; import { ViewConfig } from '../models/view-config'; -import { Config } from '../../../shared/models/core/config'; +import { Config } from 'app/shared/models/core/config'; import { Observable, BehaviorSubject } from 'rxjs'; -import { DataStoreService } from '../../../core/core-services/data-store.service'; -import { ConstantsService } from '../../../core/ui-services/constants.service'; -import { HttpService } from '../../../core/core-services/http.service'; -import { Identifiable } from '../../../shared/models/base/identifiable'; -import { CollectionStringMapperService } from '../../../core/core-services/collectionStringMapper.service'; +import { DataStoreService } from 'app/core/core-services/data-store.service'; +import { ConstantsService } from 'app/core/ui-services/constants.service'; +import { HttpService } from 'app/core/core-services/http.service'; +import { Identifiable } from 'app/shared/models/base/identifiable'; +import { CollectionStringMapperService } from 'app/core/core-services/collectionStringMapper.service'; /** * Holds a single config item. diff --git a/client/src/app/site/login/components/login-mask/login-mask.component.ts b/client/src/app/site/login/components/login-mask/login-mask.component.ts index 91f5c7b9a..310576eb6 100644 --- a/client/src/app/site/login/components/login-mask/login-mask.component.ts +++ b/client/src/app/site/login/components/login-mask/login-mask.component.ts @@ -9,7 +9,7 @@ import { TranslateService } from '@ngx-translate/core'; import { environment } from 'environments/environment'; import { OpenSlidesService } from 'app/core/core-services/openslides.service'; import { LoginDataService } from 'app/core/ui-services/login-data.service'; -import { ParentErrorStateMatcher } from '../../../../shared/parent-error-state-matcher'; +import { ParentErrorStateMatcher } from 'app/shared/parent-error-state-matcher'; import { HttpService } from 'app/core/core-services/http.service'; /** diff --git a/client/src/app/site/mediafiles/models/view-mediafile.ts b/client/src/app/site/mediafiles/models/view-mediafile.ts index d63cb8438..7c04c473c 100644 --- a/client/src/app/site/mediafiles/models/view-mediafile.ts +++ b/client/src/app/site/mediafiles/models/view-mediafile.ts @@ -1,6 +1,6 @@ import { BaseViewModel } from '../../base/base-view-model'; -import { Mediafile } from '../../../shared/models/mediafiles/mediafile'; -import { User } from '../../../shared/models/users/user'; +import { Mediafile } from 'app/shared/models/mediafiles/mediafile'; +import { User } from 'app/shared/models/users/user'; export class ViewMediafile extends BaseViewModel { private _mediafile: Mediafile; diff --git a/client/src/app/site/mediafiles/services/mediafile-filter.service.ts b/client/src/app/site/mediafiles/services/mediafile-filter.service.ts index 3f596cc21..bf673de86 100644 --- a/client/src/app/site/mediafiles/services/mediafile-filter.service.ts +++ b/client/src/app/site/mediafiles/services/mediafile-filter.service.ts @@ -1,10 +1,10 @@ import { Injectable } from '@angular/core'; -import { BaseFilterListService, OsFilter } from '../../../core/ui-services/base-filter-list.service'; -import { Mediafile } from '../../../shared/models/mediafiles/mediafile'; +import { BaseFilterListService, OsFilter } from 'app/core/ui-services/base-filter-list.service'; +import { Mediafile } from 'app/shared/models/mediafiles/mediafile'; import { ViewMediafile } from '../models/view-mediafile'; import { StorageService } from 'app/core/core-services/storage.service'; -import { MediafileRepositoryService } from '../../../core/repositories/mediafiles/mediafile-repository.service'; +import { MediafileRepositoryService } from 'app/core/repositories/mediafiles/mediafile-repository.service'; @Injectable({ providedIn: 'root' diff --git a/client/src/app/site/mediafiles/services/mediafiles-sort-list.service.ts b/client/src/app/site/mediafiles/services/mediafiles-sort-list.service.ts index 44c6f904e..ef5f57edd 100644 --- a/client/src/app/site/mediafiles/services/mediafiles-sort-list.service.ts +++ b/client/src/app/site/mediafiles/services/mediafiles-sort-list.service.ts @@ -1,5 +1,6 @@ import { Injectable } from '@angular/core'; -import { BaseSortListService, OsSortingDefinition } from '../../../core/ui-services/base-sort-list.service'; + +import { BaseSortListService, OsSortingDefinition } from 'app/core/ui-services/base-sort-list.service'; import { ViewMediafile } from '../models/view-mediafile'; @Injectable({ diff --git a/client/src/app/site/motions/components/category-list/category-list.component.ts b/client/src/app/site/motions/components/category-list/category-list.component.ts index ff525fdd4..ff2da676c 100644 --- a/client/src/app/site/motions/components/category-list/category-list.component.ts +++ b/client/src/app/site/motions/components/category-list/category-list.component.ts @@ -3,12 +3,12 @@ import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; -import { Category } from '../../../../shared/models/motions/category'; +import { Category } from 'app/shared/models/motions/category'; import { CategoryRepositoryService } from 'app/core/repositories/motions/category-repository.service'; import { ViewCategory } from '../../models/view-category'; import { FormGroup, FormBuilder, Validators } from '@angular/forms'; -import { Motion } from '../../../../shared/models/motions/motion'; -import { SortingListComponent } from '../../../../shared/components/sorting-list/sorting-list.component'; +import { Motion } from 'app/shared/models/motions/motion'; +import { SortingListComponent } from 'app/shared/components/sorting-list/sorting-list.component'; import { PromptService } from 'app/core/ui-services/prompt.service'; import { BaseViewComponent } from '../../../base/base-view'; import { MatSnackBar } from '@angular/material'; diff --git a/client/src/app/site/motions/components/motion-comment-section-list/motion-comment-section-list.component.ts b/client/src/app/site/motions/components/motion-comment-section-list/motion-comment-section-list.component.ts index e7e63c981..24d41eccc 100644 --- a/client/src/app/site/motions/components/motion-comment-section-list/motion-comment-section-list.component.ts +++ b/client/src/app/site/motions/components/motion-comment-section-list/motion-comment-section-list.component.ts @@ -6,11 +6,11 @@ import { TranslateService } from '@ngx-translate/core'; import { BehaviorSubject } from 'rxjs'; import { FormGroup, FormBuilder, Validators } from '@angular/forms'; -import { MotionCommentSection } from '../../../../shared/models/motions/motion-comment-section'; +import { MotionCommentSection } from 'app/shared/models/motions/motion-comment-section'; import { ViewMotionCommentSection } from '../../models/view-motion-comment-section'; import { MotionCommentSectionRepositoryService } from 'app/core/repositories/motions/motion-comment-section-repository.service'; import { PromptService } from 'app/core/ui-services/prompt.service'; -import { Group } from '../../../../shared/models/users/group'; +import { Group } from 'app/shared/models/users/group'; import { DataStoreService } from 'app/core/core-services/data-store.service'; import { BaseViewComponent } from '../../../base/base-view'; diff --git a/client/src/app/site/motions/components/motion-comments/motion-comments.component.ts b/client/src/app/site/motions/components/motion-comments/motion-comments.component.ts index 1e58f210e..d6e3bdb94 100644 --- a/client/src/app/site/motions/components/motion-comments/motion-comments.component.ts +++ b/client/src/app/site/motions/components/motion-comments/motion-comments.component.ts @@ -5,12 +5,12 @@ import { FormGroup, FormBuilder } from '@angular/forms'; import { TranslateService } from '@ngx-translate/core'; -import { BaseViewComponent } from '../../../../site/base/base-view'; import { MotionCommentSectionRepositoryService } from 'app/core/repositories/motions/motion-comment-section-repository.service'; import { ViewMotionCommentSection } from '../../models/view-motion-comment-section'; import { OperatorService } from 'app/core/core-services/operator.service'; -import { MotionComment } from '../../../../shared/models/motions/motion-comment'; +import { MotionComment } from 'app/shared/models/motions/motion-comment'; import { ViewMotion } from '../../models/view-motion'; +import { BaseViewComponent } from 'app/site/base/base-view'; /** * Component for the motion comments view diff --git a/client/src/app/site/motions/components/motion-detail/motion-detail.component.ts b/client/src/app/site/motions/components/motion-detail/motion-detail.component.ts index 125bb3b62..00bf5ccdf 100644 --- a/client/src/app/site/motions/components/motion-detail/motion-detail.component.ts +++ b/client/src/app/site/motions/components/motion-detail/motion-detail.component.ts @@ -10,7 +10,7 @@ import { TranslateService } from '@ngx-translate/core'; import { AgendaRepositoryService } from 'app/core/repositories/agenda/agenda-repository.service'; import { BaseViewComponent } from '../../../base/base-view'; -import { Category } from '../../../../shared/models/motions/category'; +import { Category } from 'app/shared/models/motions/category'; import { ChangeRecommendationRepositoryService } from 'app/core/repositories/motions/change-recommendation-repository.service'; import { ChangeRecoMode, LineNumberingMode, ViewMotion } from '../../models/view-motion'; import { CreateMotion } from '../../models/create-motion'; @@ -20,7 +20,7 @@ import { DiffLinesInParagraph, LineRange } from 'app/core/ui-services/diff.servi import { itemVisibilityChoices, Item } from 'app/shared/models/agenda/item'; import { LocalPermissionsService } from '../../services/local-permissions.service'; import { Mediafile } from 'app/shared/models/mediafiles/mediafile'; -import { Motion } from '../../../../shared/models/motions/motion'; +import { Motion } from 'app/shared/models/motions/motion'; import { MotionBlock } from 'app/shared/models/motions/motion-block'; import { MotionChangeRecommendationComponent, @@ -32,7 +32,7 @@ import { PersonalNoteContent } from 'app/shared/models/users/personal-note'; import { PersonalNoteService } from 'app/core/ui-services/personal-note.service'; import { PromptService } from 'app/core/ui-services/prompt.service'; import { StatuteParagraphRepositoryService } from 'app/core/repositories/motions/statute-paragraph-repository.service'; -import { User } from '../../../../shared/models/users/user'; +import { User } from 'app/shared/models/users/user'; import { ViewChangeReco } from '../../models/view-change-reco'; import { ViewCreateMotion } from '../../models/view-create-motion'; import { ViewportService } from 'app/core/ui-services/viewport.service'; diff --git a/client/src/app/site/motions/components/motion-list/motion-list.component.ts b/client/src/app/site/motions/components/motion-list/motion-list.component.ts index 5914935d4..d7b846941 100644 --- a/client/src/app/site/motions/components/motion-list/motion-list.component.ts +++ b/client/src/app/site/motions/components/motion-list/motion-list.component.ts @@ -21,7 +21,7 @@ import { ViewMotion } from '../../models/view-motion'; import { ViewMotionBlock } from '../../models/view-motion-block'; import { ViewTag } from 'app/site/tags/models/view-tag'; import { ViewWorkflow } from '../../models/view-workflow'; -import { WorkflowState } from '../../../../shared/models/motions/workflow-state'; +import { WorkflowState } from 'app/shared/models/motions/workflow-state'; import { WorkflowRepositoryService } from 'app/core/repositories/motions/workflow-repository.service'; import { MotionPdfExportService } from '../../services/motion-pdf-export.service'; import { MotionExportDialogComponent } from '../motion-export-dialog/motion-export-dialog.component'; diff --git a/client/src/app/site/motions/components/personal-note/personal-note.component.ts b/client/src/app/site/motions/components/personal-note/personal-note.component.ts index cea41570c..095886f17 100644 --- a/client/src/app/site/motions/components/personal-note/personal-note.component.ts +++ b/client/src/app/site/motions/components/personal-note/personal-note.component.ts @@ -6,7 +6,7 @@ import { Subscription } from 'rxjs'; import { BaseComponent } from '../../../../base.component'; import { ViewMotion } from '../../models/view-motion'; import { PersonalNoteService } from 'app/core/ui-services/personal-note.service'; -import { PersonalNoteContent } from '../../../../shared/models/users/personal-note'; +import { PersonalNoteContent } from 'app/shared/models/users/personal-note'; /** * Component for the motion comments view diff --git a/client/src/app/site/motions/components/statute-paragraph-list/statute-paragraph-list.component.ts b/client/src/app/site/motions/components/statute-paragraph-list/statute-paragraph-list.component.ts index 88387ba97..02c5ee11a 100644 --- a/client/src/app/site/motions/components/statute-paragraph-list/statute-paragraph-list.component.ts +++ b/client/src/app/site/motions/components/statute-paragraph-list/statute-paragraph-list.component.ts @@ -6,7 +6,7 @@ import { MatSnackBar } from '@angular/material'; import { TranslateService } from '@ngx-translate/core'; import { PromptService } from 'app/core/ui-services/prompt.service'; -import { StatuteParagraph } from '../../../../shared/models/motions/statute-paragraph'; +import { StatuteParagraph } from 'app/shared/models/motions/statute-paragraph'; import { ViewStatuteParagraph } from '../../models/view-statute-paragraph'; import { StatuteParagraphRepositoryService } from 'app/core/repositories/motions/statute-paragraph-repository.service'; import { BaseViewComponent } from '../../../base/base-view'; diff --git a/client/src/app/site/motions/models/view-category.ts b/client/src/app/site/motions/models/view-category.ts index 728e14a4b..e74ce221b 100644 --- a/client/src/app/site/motions/models/view-category.ts +++ b/client/src/app/site/motions/models/view-category.ts @@ -1,4 +1,4 @@ -import { Category } from '../../../shared/models/motions/category'; +import { Category } from 'app/shared/models/motions/category'; import { BaseViewModel } from '../../base/base-view-model'; /** diff --git a/client/src/app/site/motions/models/view-change-reco.ts b/client/src/app/site/motions/models/view-change-reco.ts index df611d07f..3bf5da364 100644 --- a/client/src/app/site/motions/models/view-change-reco.ts +++ b/client/src/app/site/motions/models/view-change-reco.ts @@ -1,7 +1,7 @@ import { BaseViewModel } from '../../base/base-view-model'; -import { MotionChangeReco } from '../../../shared/models/motions/motion-change-reco'; -import { BaseModel } from '../../../shared/models/base/base-model'; -import { ModificationType } from '../../../core/ui-services/diff.service'; +import { MotionChangeReco } from 'app/shared/models/motions/motion-change-reco'; +import { BaseModel } from 'app/shared/models/base/base-model'; +import { ModificationType } from 'app/core/ui-services/diff.service'; import { ViewUnifiedChange, ViewUnifiedChangeType } from './view-unified-change'; /** diff --git a/client/src/app/site/motions/models/view-create-motion.ts b/client/src/app/site/motions/models/view-create-motion.ts index 55ca89e05..b14cb899b 100644 --- a/client/src/app/site/motions/models/view-create-motion.ts +++ b/client/src/app/site/motions/models/view-create-motion.ts @@ -1,7 +1,7 @@ -import { Category } from '../../../shared/models/motions/category'; -import { User } from '../../../shared/models/users/user'; -import { Workflow } from '../../../shared/models/motions/workflow'; -import { WorkflowState } from '../../../shared/models/motions/workflow-state'; +import { Category } from 'app/shared/models/motions/category'; +import { User } from 'app/shared/models/users/user'; +import { Workflow } from 'app/shared/models/motions/workflow'; +import { WorkflowState } from 'app/shared/models/motions/workflow-state'; import { Item } from 'app/shared/models/agenda/item'; import { MotionBlock } from 'app/shared/models/motions/motion-block'; import { ViewMotion } from './view-motion'; diff --git a/client/src/app/site/motions/models/view-motion-amended-paragraph.ts b/client/src/app/site/motions/models/view-motion-amended-paragraph.ts index 806871e81..483787693 100644 --- a/client/src/app/site/motions/models/view-motion-amended-paragraph.ts +++ b/client/src/app/site/motions/models/view-motion-amended-paragraph.ts @@ -1,7 +1,7 @@ import { ViewUnifiedChange, ViewUnifiedChangeType } from './view-unified-change'; import { ViewMotion } from './view-motion'; -import { LineRange } from '../../../core/ui-services/diff.service'; -import { MergeAmendment } from '../../../shared/models/motions/workflow-state'; +import { LineRange } from 'app/core/ui-services/diff.service'; +import { MergeAmendment } from 'app/shared/models/motions/workflow-state'; /** * This represents the Unified Diff part of an amendments. diff --git a/client/src/app/site/motions/models/view-motion-comment-section.ts b/client/src/app/site/motions/models/view-motion-comment-section.ts index 2d72a88e6..024ccf5da 100644 --- a/client/src/app/site/motions/models/view-motion-comment-section.ts +++ b/client/src/app/site/motions/models/view-motion-comment-section.ts @@ -1,7 +1,7 @@ import { BaseViewModel } from '../../base/base-view-model'; -import { MotionCommentSection } from '../../../shared/models/motions/motion-comment-section'; -import { Group } from '../../../shared/models/users/group'; -import { BaseModel } from '../../../shared/models/base/base-model'; +import { MotionCommentSection } from 'app/shared/models/motions/motion-comment-section'; +import { Group } from 'app/shared/models/users/group'; +import { BaseModel } from 'app/shared/models/base/base-model'; /** * Motion comment section class for the View diff --git a/client/src/app/site/motions/models/view-motion.ts b/client/src/app/site/motions/models/view-motion.ts index 59f5a7f58..8fe2411ce 100644 --- a/client/src/app/site/motions/models/view-motion.ts +++ b/client/src/app/site/motions/models/view-motion.ts @@ -1,16 +1,16 @@ -import { BaseModel } from '../../../shared/models/base/base-model'; +import { BaseModel } from 'app/shared/models/base/base-model'; import { BaseProjectableModel } from 'app/site/base/base-projectable-model'; -import { Category } from '../../../shared/models/motions/category'; -import { MotionComment } from '../../../shared/models/motions/motion-comment'; +import { Category } from 'app/shared/models/motions/category'; +import { MotionComment } from 'app/shared/models/motions/motion-comment'; import { Item } from 'app/shared/models/agenda/item'; import { Mediafile } from 'app/shared/models/mediafiles/mediafile'; -import { Motion } from '../../../shared/models/motions/motion'; +import { Motion } from 'app/shared/models/motions/motion'; import { MotionBlock } from 'app/shared/models/motions/motion-block'; import { PersonalNoteContent } from 'app/shared/models/users/personal-note'; -import { User } from '../../../shared/models/users/user'; +import { User } from 'app/shared/models/users/user'; import { ViewMotionCommentSection } from './view-motion-comment-section'; -import { Workflow } from '../../../shared/models/motions/workflow'; -import { WorkflowState } from '../../../shared/models/motions/workflow-state'; +import { Workflow } from 'app/shared/models/motions/workflow'; +import { WorkflowState } from 'app/shared/models/motions/workflow-state'; import { ProjectorElementBuildDeskriptor } from 'app/site/base/projectable'; import { Tag } from 'app/shared/models/core/tag'; diff --git a/client/src/app/site/motions/models/view-statute-paragraph.ts b/client/src/app/site/motions/models/view-statute-paragraph.ts index 3c855eff6..7a3b3401c 100644 --- a/client/src/app/site/motions/models/view-statute-paragraph.ts +++ b/client/src/app/site/motions/models/view-statute-paragraph.ts @@ -1,7 +1,7 @@ import { BaseViewModel } from '../../base/base-view-model'; -import { Group } from '../../../shared/models/users/group'; -import { BaseModel } from '../../../shared/models/base/base-model'; -import { StatuteParagraph } from '../../../shared/models/motions/statute-paragraph'; +import { Group } from 'app/shared/models/users/group'; +import { BaseModel } from 'app/shared/models/base/base-model'; +import { StatuteParagraph } from 'app/shared/models/motions/statute-paragraph'; /** * State paragrpah class for the View diff --git a/client/src/app/site/motions/models/view-workflow.ts b/client/src/app/site/motions/models/view-workflow.ts index 95d792256..d2ca191ec 100644 --- a/client/src/app/site/motions/models/view-workflow.ts +++ b/client/src/app/site/motions/models/view-workflow.ts @@ -1,5 +1,5 @@ -import { Workflow } from '../../../shared/models/motions/workflow'; -import { WorkflowState } from '../../../shared/models/motions/workflow-state'; +import { Workflow } from 'app/shared/models/motions/workflow'; +import { WorkflowState } from 'app/shared/models/motions/workflow-state'; import { BaseViewModel } from '../../base/base-view-model'; /** diff --git a/client/src/app/site/motions/services/local-permissions.service.ts b/client/src/app/site/motions/services/local-permissions.service.ts index e6d1cbacb..e44af9f66 100644 --- a/client/src/app/site/motions/services/local-permissions.service.ts +++ b/client/src/app/site/motions/services/local-permissions.service.ts @@ -1,8 +1,8 @@ import { Injectable } from '@angular/core'; -import { OperatorService } from '../../../core/core-services/operator.service'; +import { OperatorService } from 'app/core/core-services/operator.service'; import { ViewMotion } from '../models/view-motion'; -import { ConfigService } from '../../../core/ui-services/config.service'; +import { ConfigService } from 'app/core/ui-services/config.service'; import { ConstantsService } from 'app/core/ui-services/constants.service'; interface OpenSlidesSettings { diff --git a/client/src/app/site/motions/services/motion-filter-list.service.ts b/client/src/app/site/motions/services/motion-filter-list.service.ts index be5b4338e..4ca44b0f9 100644 --- a/client/src/app/site/motions/services/motion-filter-list.service.ts +++ b/client/src/app/site/motions/services/motion-filter-list.service.ts @@ -1,14 +1,14 @@ import { Injectable } from '@angular/core'; -import { BaseFilterListService, OsFilter, OsFilterOption } from '../../../core/ui-services/base-filter-list.service'; -import { Motion } from '../../../shared/models/motions/motion'; +import { BaseFilterListService, OsFilter, OsFilterOption } from 'app/core/ui-services/base-filter-list.service'; +import { Motion } from 'app/shared/models/motions/motion'; import { ViewMotion } from '../models/view-motion'; -import { CategoryRepositoryService } from '../../../core/repositories/motions/category-repository.service'; -import { WorkflowRepositoryService } from '../../../core/repositories/motions/workflow-repository.service'; -import { StorageService } from '../../../core/core-services/storage.service'; -import { MotionRepositoryService } from '../../../core/repositories/motions/motion-repository.service'; -import { MotionBlockRepositoryService } from '../../../core/repositories/motions/motion-block-repository.service'; -import { MotionCommentSectionRepositoryService } from '../../../core/repositories/motions/motion-comment-section-repository.service'; +import { CategoryRepositoryService } from 'app/core/repositories/motions/category-repository.service'; +import { WorkflowRepositoryService } from 'app/core/repositories/motions/workflow-repository.service'; +import { StorageService } from 'app/core/core-services/storage.service'; +import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service'; +import { MotionBlockRepositoryService } from 'app/core/repositories/motions/motion-block-repository.service'; +import { MotionCommentSectionRepositoryService } from 'app/core/repositories/motions/motion-comment-section-repository.service'; import { TranslateService } from '@ngx-translate/core'; import { ConfigService } from 'app/core/ui-services/config.service'; import { ViewWorkflow } from '../models/view-workflow'; diff --git a/client/src/app/site/motions/services/motion-import.service.ts b/client/src/app/site/motions/services/motion-import.service.ts index a52615842..74a950403 100644 --- a/client/src/app/site/motions/services/motion-import.service.ts +++ b/client/src/app/site/motions/services/motion-import.service.ts @@ -5,12 +5,12 @@ import { Papa } from 'ngx-papaparse'; import { TranslateService } from '@ngx-translate/core'; import { Category } from 'app/shared/models/motions/category'; -import { CategoryRepositoryService } from '../../../core/repositories/motions/category-repository.service'; +import { CategoryRepositoryService } from 'app/core/repositories/motions/category-repository.service'; import { CreateMotion } from '../models/create-motion'; import { MotionBlock } from 'app/shared/models/motions/motion-block'; -import { MotionBlockRepositoryService } from '../../../core/repositories/motions/motion-block-repository.service'; -import { MotionRepositoryService } from '../../../core/repositories/motions/motion-repository.service'; -import { UserRepositoryService } from '../../../core/repositories/users/user-repository.service'; +import { MotionBlockRepositoryService } from 'app/core/repositories/motions/motion-block-repository.service'; +import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service'; +import { UserRepositoryService } from 'app/core/repositories/users/user-repository.service'; import { ViewCsvCreateMotion, CsvMapping } from '../models/view-csv-create-motion'; import { BaseImportService, NewEntry } from 'app/core/ui-services/base-import.service'; import { ViewMotion } from '../models/view-motion'; diff --git a/client/src/app/site/motions/services/motion-multiselect.service.ts b/client/src/app/site/motions/services/motion-multiselect.service.ts index 809d805be..615d9ea18 100644 --- a/client/src/app/site/motions/services/motion-multiselect.service.ts +++ b/client/src/app/site/motions/services/motion-multiselect.service.ts @@ -5,16 +5,16 @@ import { TranslateService } from '@ngx-translate/core'; import { ViewMotion } from '../models/view-motion'; import { ChoiceService } from 'app/core/ui-services/choice.service'; import { PromptService } from 'app/core/ui-services/prompt.service'; -import { MotionRepositoryService } from '../../../core/repositories/motions/motion-repository.service'; +import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service'; import { UserRepositoryService } from 'app/core/repositories/users/user-repository.service'; -import { WorkflowRepositoryService } from '../../../core/repositories/motions/workflow-repository.service'; -import { CategoryRepositoryService } from '../../../core/repositories/motions/category-repository.service'; +import { WorkflowRepositoryService } from 'app/core/repositories/motions/workflow-repository.service'; +import { CategoryRepositoryService } from 'app/core/repositories/motions/category-repository.service'; import { TagRepositoryService } from 'app/core/repositories/tags/tag-repository.service'; import { HttpService } from 'app/core/core-services/http.service'; import { AgendaRepositoryService } from 'app/core/repositories/agenda/agenda-repository.service'; import { Displayable } from 'app/shared/models/base/displayable'; import { Identifiable } from 'app/shared/models/base/identifiable'; -import { MotionBlockRepositoryService } from '../../../core/repositories/motions/motion-block-repository.service'; +import { MotionBlockRepositoryService } from 'app/core/repositories/motions/motion-block-repository.service'; /** * Contains all multiselect actions for the motion list view. diff --git a/client/src/app/site/motions/services/motion-pdf.service.ts b/client/src/app/site/motions/services/motion-pdf.service.ts index c115d9f9a..3d9daf86a 100644 --- a/client/src/app/site/motions/services/motion-pdf.service.ts +++ b/client/src/app/site/motions/services/motion-pdf.service.ts @@ -2,13 +2,12 @@ import { Injectable } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; -import { ChangeRecommendationRepositoryService } from '../../../core/repositories/motions/change-recommendation-repository.service'; -import { ConfigService } from 'app/core/ui-services/config.service'; -import { MotionRepositoryService } from '../../../core/repositories/motions/motion-repository.service'; -import { HtmlToPdfService } from 'app/core/ui-services/html-to-pdf.service'; import { ViewMotion, LineNumberingMode, ChangeRecoMode } from '../models/view-motion'; +import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service'; +import { ConfigService } from 'app/core/ui-services/config.service'; +import { ChangeRecommendationRepositoryService } from 'app/core/repositories/motions/change-recommendation-repository.service'; import { ViewUnifiedChange } from '../models/view-unified-change'; - +import { HtmlToPdfService } from 'app/core/ui-services/html-to-pdf.service'; /** * Converts a motion to pdf. Can be used from the motion detail view or executed on a list of motions * Provides the public method `motionToDocDef(motion: Motion)` which should be convenient to use. diff --git a/client/src/app/site/motions/services/motion-poll-pdf.service.ts b/client/src/app/site/motions/services/motion-poll-pdf.service.ts index 1fae64ca4..c4377c113 100644 --- a/client/src/app/site/motions/services/motion-poll-pdf.service.ts +++ b/client/src/app/site/motions/services/motion-poll-pdf.service.ts @@ -4,7 +4,7 @@ import { TranslateService } from '@ngx-translate/core'; import { ConfigService } from 'app/core/ui-services/config.service'; import { MotionPoll } from 'app/shared/models/motions/motion-poll'; -import { MotionRepositoryService } from '../../../core/repositories/motions/motion-repository.service'; +import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service'; import { PdfDocumentService } from 'app/core/ui-services/pdf-document.service'; import { UserRepositoryService } from 'app/core/repositories/users/user-repository.service'; diff --git a/client/src/app/site/motions/services/motion-sort-list.service.ts b/client/src/app/site/motions/services/motion-sort-list.service.ts index 28c424a8d..f2277ce35 100644 --- a/client/src/app/site/motions/services/motion-sort-list.service.ts +++ b/client/src/app/site/motions/services/motion-sort-list.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -import { BaseSortListService, OsSortingDefinition } from '../../../core/ui-services/base-sort-list.service'; +import { BaseSortListService, OsSortingDefinition } from 'app/core/ui-services/base-sort-list.service'; import { ViewMotion } from '../models/view-motion'; @Injectable({ diff --git a/client/src/app/site/projector/models/view-countdown.ts b/client/src/app/site/projector/models/view-countdown.ts index b6bd8977a..ec7a50aed 100644 --- a/client/src/app/site/projector/models/view-countdown.ts +++ b/client/src/app/site/projector/models/view-countdown.ts @@ -1,4 +1,4 @@ -import { Countdown } from '../../../shared/models/core/countdown'; +import { Countdown } from 'app/shared/models/core/countdown'; import { BaseProjectableModel } from 'app/site/base/base-projectable-model'; import { ProjectorElementBuildDeskriptor } from 'app/site/base/projectable'; diff --git a/client/src/app/site/tags/components/tag-list/tag-list.component.ts b/client/src/app/site/tags/components/tag-list/tag-list.component.ts index 310a13047..ff09f8bee 100644 --- a/client/src/app/site/tags/components/tag-list/tag-list.component.ts +++ b/client/src/app/site/tags/components/tag-list/tag-list.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; import { Title } from '@angular/platform-browser'; -import { Tag } from '../../../../shared/models/core/tag'; +import { Tag } from 'app/shared/models/core/tag'; import { ListViewBaseComponent } from '../../../base/list-view-base'; import { TagRepositoryService } from 'app/core/repositories/tags/tag-repository.service'; import { ViewTag } from '../../models/view-tag'; diff --git a/client/src/app/site/tags/models/view-tag.ts b/client/src/app/site/tags/models/view-tag.ts index 806472a6e..e75c728b1 100644 --- a/client/src/app/site/tags/models/view-tag.ts +++ b/client/src/app/site/tags/models/view-tag.ts @@ -1,4 +1,4 @@ -import { Tag } from '../../../shared/models/core/tag'; +import { Tag } from 'app/shared/models/core/tag'; import { BaseViewModel } from '../../base/base-view-model'; /** diff --git a/client/src/app/site/users/components/group-list/group-list.component.ts b/client/src/app/site/users/components/group-list/group-list.component.ts index 6bc8d91c3..a342b42da 100644 --- a/client/src/app/site/users/components/group-list/group-list.component.ts +++ b/client/src/app/site/users/components/group-list/group-list.component.ts @@ -6,7 +6,7 @@ import { FormGroup, FormControl, Validators } from '@angular/forms'; import { GroupRepositoryService } from 'app/core/repositories/users/group-repository.service'; import { ViewGroup } from '../../models/view-group'; -import { Group } from '../../../../shared/models/users/group'; +import { Group } from 'app/shared/models/users/group'; import { BaseViewComponent } from '../../../base/base-view'; import { PromptService } from 'app/core/ui-services/prompt.service'; diff --git a/client/src/app/site/users/components/password/password.component.ts b/client/src/app/site/users/components/password/password.component.ts index e09d619b2..584c3f71c 100644 --- a/client/src/app/site/users/components/password/password.component.ts +++ b/client/src/app/site/users/components/password/password.component.ts @@ -8,7 +8,7 @@ import { Title } from '@angular/platform-browser'; import { ViewUser } from '../../models/view-user'; import { UserRepositoryService } from 'app/core/repositories/users/user-repository.service'; import { OperatorService } from 'app/core/core-services/operator.service'; -import { BaseViewComponent } from '../../../../site/base/base-view'; +import { BaseViewComponent } from 'app/site/base/base-view'; /** * Component for the Password-Reset Handling diff --git a/client/src/app/site/users/components/user-detail/user-detail.component.ts b/client/src/app/site/users/components/user-detail/user-detail.component.ts index 65c01bcbb..6f92d9165 100644 --- a/client/src/app/site/users/components/user-detail/user-detail.component.ts +++ b/client/src/app/site/users/components/user-detail/user-detail.component.ts @@ -9,7 +9,7 @@ import { TranslateService } from '@ngx-translate/core'; import { BaseViewComponent } from '../../../base/base-view'; import { DataStoreService } from 'app/core/core-services/data-store.service'; import { genders } from 'app/shared/models/users/user'; -import { Group } from '../../../../shared/models/users/group'; +import { Group } from 'app/shared/models/users/group'; import { OperatorService } from 'app/core/core-services/operator.service'; import { PromptService } from 'app/core/ui-services/prompt.service'; import { UserPdfExportService } from '../../services/user-pdf-export.service'; diff --git a/client/src/app/site/users/models/view-group.ts b/client/src/app/site/users/models/view-group.ts index 926ce23d6..1d9b211d1 100644 --- a/client/src/app/site/users/models/view-group.ts +++ b/client/src/app/site/users/models/view-group.ts @@ -1,6 +1,6 @@ import { BaseViewModel } from '../../base/base-view-model'; -import { Group } from '../../../shared/models/users/group'; -import { BaseModel } from '../../../shared/models/base/base-model'; +import { Group } from 'app/shared/models/users/group'; +import { BaseModel } from 'app/shared/models/base/base-model'; export class ViewGroup extends BaseViewModel { private _group: Group; diff --git a/client/src/app/site/users/models/view-user.ts b/client/src/app/site/users/models/view-user.ts index eae8dbe23..ebcec97a7 100644 --- a/client/src/app/site/users/models/view-user.ts +++ b/client/src/app/site/users/models/view-user.ts @@ -1,6 +1,6 @@ -import { User } from '../../../shared/models/users/user'; -import { Group } from '../../../shared/models/users/group'; -import { BaseModel } from '../../../shared/models/base/base-model'; +import { User } from 'app/shared/models/users/user'; +import { Group } from 'app/shared/models/users/group'; +import { BaseModel } from 'app/shared/models/base/base-model'; import { BaseProjectableModel } from 'app/site/base/base-projectable-model'; import { ProjectorElementBuildDeskriptor } from 'app/site/base/projectable'; diff --git a/client/src/app/site/users/services/user-filter-list.service.ts b/client/src/app/site/users/services/user-filter-list.service.ts index 82a3de5ef..b8720daa5 100644 --- a/client/src/app/site/users/services/user-filter-list.service.ts +++ b/client/src/app/site/users/services/user-filter-list.service.ts @@ -1,11 +1,11 @@ import { Injectable } from '@angular/core'; -import { BaseFilterListService, OsFilter } from '../../../core/ui-services/base-filter-list.service'; -import { StorageService } from '../../../core/core-services/storage.service'; -import { User } from '../../../shared/models/users/user'; +import { BaseFilterListService, OsFilter } from 'app/core/ui-services/base-filter-list.service'; +import { StorageService } from 'app/core/core-services/storage.service'; +import { User } from 'app/shared/models/users/user'; import { ViewUser } from '../models/view-user'; -import { GroupRepositoryService } from '../../../core/repositories/users/group-repository.service'; -import { UserRepositoryService } from '../../../core/repositories/users/user-repository.service'; +import { GroupRepositoryService } from 'app/core/repositories/users/group-repository.service'; +import { UserRepositoryService } from 'app/core/repositories/users/user-repository.service'; @Injectable({ providedIn: 'root' diff --git a/client/src/app/site/users/services/user-import.service.ts b/client/src/app/site/users/services/user-import.service.ts index 5426be532..5c23b4acc 100644 --- a/client/src/app/site/users/services/user-import.service.ts +++ b/client/src/app/site/users/services/user-import.service.ts @@ -4,10 +4,10 @@ import { Papa } from 'ngx-papaparse'; import { BaseImportService, NewEntry } from 'app/core/ui-services/base-import.service'; import { Group } from 'app/shared/models/users/group'; -import { GroupRepositoryService } from '../../../core/repositories/users/group-repository.service'; +import { GroupRepositoryService } from 'app/core/repositories/users/group-repository.service'; import { TranslateService } from '@ngx-translate/core'; import { User } from 'app/shared/models/users/user'; -import { UserRepositoryService } from '../../../core/repositories/users/user-repository.service'; +import { UserRepositoryService } from 'app/core/repositories/users/user-repository.service'; import { ViewCsvCreateUser, CsvMapping } from '../models/view-csv-create-user'; import { ViewUser } from '../models/view-user'; diff --git a/client/src/app/site/users/services/user-sort-list.service.ts b/client/src/app/site/users/services/user-sort-list.service.ts index 090f840ed..3813c58bb 100644 --- a/client/src/app/site/users/services/user-sort-list.service.ts +++ b/client/src/app/site/users/services/user-sort-list.service.ts @@ -1,5 +1,6 @@ import { Injectable } from '@angular/core'; -import { BaseSortListService, OsSortingDefinition } from '../../../core/ui-services/base-sort-list.service'; + +import { BaseSortListService, OsSortingDefinition } from 'app/core/ui-services/base-sort-list.service'; import { ViewUser } from '../models/view-user'; @Injectable({