From 97f60c1e6c2161a2dcec5e4efa906aad2aafb0b3 Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Thu, 31 Jan 2019 13:40:27 +0100 Subject: [PATCH] Restructure the client, register Repositories and map to collection strings. --- client/package.json | 2 + client/src/app/app-routing.module.ts | 4 +- client/src/app/app.component.spec.ts | 2 +- client/src/app/app.component.ts | 12 ++--- client/src/app/app.module.ts | 6 +-- client/src/app/core/app-config.ts | 39 ++++++++++++++++ .../app-load.service.spec.ts | 0 .../app-load.service.ts | 21 ++++++--- .../auth-guard.service.ts | 0 .../auth.service.spec.ts | 0 .../auth.service.ts | 4 +- .../autoupdate.service.spec.ts | 0 .../autoupdate.service.ts | 4 +- .../collectionStringMapper.service.spec.ts} | 0 .../collectionStringMapper.service.ts} | 30 +++++++++--- .../data-send.service.spec.ts | 0 .../data-send.service.ts | 1 + .../data-store.service.spec.ts | 0 .../data-store.service.ts | 8 ++-- .../http.service.spec.ts | 0 .../http.service.ts | 2 + .../main-menu.service.spec.ts | 0 .../main-menu.service.ts | 1 + .../notify.service.spec.ts | 0 .../notify.service.ts | 1 + .../offline.service.spec.ts | 0 .../offline.service.ts | 0 .../openslides-status.service.spec.ts | 0 .../openslides-status.service.ts | 0 .../openslides.service.spec.ts | 0 .../openslides.service.ts | 0 .../operator.service.spec.ts | 0 .../operator.service.ts | 4 +- .../projector.service.spec.ts | 0 .../projector.service.ts | 0 .../pwa.service.spec.ts | 0 .../pwa.service.ts | 0 .../servertime.service.spec.ts | 0 .../servertime.service.ts | 3 +- .../storage.service.spec.ts | 0 .../storage.service.ts | 2 + .../time-travel.service.spec.ts | 0 .../time-travel.service.ts | 4 +- .../websocket.service.spec.ts | 0 .../websocket.service.ts | 4 +- client/src/app/core/core.module.ts | 28 ++--------- .../agenda}/agenda-repository.service.spec.ts | 0 .../agenda}/agenda-repository.service.ts | 20 ++++---- .../agenda}/topic-repository.service.spec.ts | 0 .../agenda}/topic-repository.service.ts | 14 +++--- .../assignment-repository.service.spec.ts | 0 .../assignment-repository.service.ts | 10 ++-- .../repositories}/base-repository.ts | 8 ++-- .../chatmessage-repository.service.spec.ts | 17 +++++++ .../common/chatmessage-repository.service.ts | 32 +++++++++++++ .../history-repository.service.spec.ts | 0 .../history}/history-repository.service.ts | 14 +++--- .../mediafile-repository.service.spec.ts | 0 .../mediafile-repository.service.ts | 14 +++--- .../category-repository.service.spec.ts | 0 .../motions}/category-repository.service.ts | 14 +++--- ...-recommendation-repository.service.spec.ts | 0 ...hange-recommendation-repository.service.ts | 13 +++--- .../motion-block-repository.service.spec.ts | 0 .../motion-block-repository.service.ts | 17 +++---- ...comment-section-repository.service.spec.ts | 0 ...tion-comment-section-repository.service.ts | 15 +++--- .../motion-repository.service.spec.ts | 0 .../motions}/motion-repository.service.ts | 34 +++++++------- ...atute-paragraph-repository.service.spec.ts | 0 .../statute-paragraph-repository.service.ts | 13 +++--- .../workflow-repository.service.spec.ts | 0 .../motions}/workflow-repository.service.ts | 14 +++--- .../countdown-repository.service.spec.ts | 0 .../countdown-repository.service.ts | 12 ++--- .../projector-repository.service.spec.ts | 0 .../projector-repository.service.ts | 14 +++--- ...rojectormessage-repository.service.spec.ts | 0 .../projectormessage-repository.service.ts | 10 ++-- .../tags}/tag-repository.service.spec.ts | 0 .../tags}/tag-repository.service.ts | 12 ++--- .../users}/group-repository.service.spec.ts | 0 .../users}/group-repository.service.ts | 14 +++--- .../personal-note-repository.service.spec.ts | 17 +++++++ .../users/personal-note-repository.service.ts | 38 +++++++++++++++ .../users}/user-repository.service.spec.ts | 0 .../users}/user-repository.service.ts | 16 +++---- .../app/core/translate/translation-parser.ts | 2 +- .../base-filter-list.service.spec.ts} | 8 ++-- .../base-filter-list.service.ts} | 4 +- .../base-import.service.ts | 0 .../base-sort-list.service.spec.ts} | 6 +-- .../base-sort-list.service.ts} | 4 +- .../choice.service.spec.ts | 0 .../choice.service.ts | 0 .../config.service.spec.ts | 0 .../config.service.ts | 2 +- .../constants.service.spec.ts | 0 .../constants.service.ts | 2 +- .../csv-export.service.spec.ts | 0 .../csv-export.service.ts | 5 +- .../ui-services}/diff.service.spec.ts | 0 .../ui-services}/diff.service.ts | 4 +- .../duration.service.spec.ts | 0 .../duration.service.ts | 0 .../file-export.service.spec.ts | 0 .../file-export.service.ts | 0 .../html-to-pdf.service.spec.ts | 0 .../html-to-pdf.service.ts | 0 .../linenumbering.service.spec.ts | 0 .../ui-services}/linenumbering.service.ts | 0 .../login-data.service.spec.ts | 0 .../login-data.service.ts | 3 +- .../ui-services}/media-manage.service.spec.ts | 0 .../ui-services}/media-manage.service.ts | 8 ++-- .../pdf-document.service.spec.ts | 2 +- .../pdf-document.service.ts | 2 +- .../personal-note.service.spec.ts | 0 .../ui-services}/personal-note.service.ts | 10 ++-- .../{ => ui-services}/poll.service.spec.ts | 0 .../core/{ => ui-services}/poll.service.ts | 0 .../projection-dialog.service.spec.ts} | 0 .../projection-dialog.service.ts | 2 +- .../prompt.service.spec.ts | 0 .../prompt.service.ts | 0 .../search.service.spec.ts | 0 .../search.service.ts | 2 +- .../theme.service.spec.ts | 0 .../theme.service.ts | 0 .../tree.service.spec.ts | 0 .../{services => ui-services}/tree.service.ts | 0 .../viewport.service.spec.ts | 0 .../viewport.service.ts | 0 .../fullscreen-projector-routing.module.ts | 21 +++++++++ .../fullscreen-projector.module.ts | 12 +++++ .../fullscreen-projector.component.html | 0 .../fullscreen-projector.component.scss | 0 .../fullscreen-projector.component.spec.ts | 4 +- .../fullscreen-projector.component.ts | 6 +-- .../copyright-sign.component.ts | 4 +- .../components/head-bar/head-bar.component.ts | 4 +- .../legal-notice-content.component.ts | 4 +- .../shared/components/logo/logo.component.ts | 4 +- .../meta-text-block.component.ts | 2 +- .../filter-menu/filter-menu.component.ts | 4 +- .../os-sort-bottom-sheet.component.ts | 4 +- .../os-sort-filter-bar.component.ts | 8 ++-- .../privacy-policy-content.component.ts | 2 +- .../projection-dialog.component.ts | 4 +- .../projector-button.component.ts | 4 +- .../projector/projector.component.html | 0 .../projector/projector.component.scss | 0 .../projector/projector.component.spec.ts | 5 +- .../projector/projector.component.ts | 13 +++--- .../slide-container.component.html | 0 .../slide-container.component.scss | 0 .../slide-container.component.spec.ts | 5 +- .../slide-container.component.ts | 4 +- .../sorting-tree/sorting-tree.component.ts | 2 +- .../app/shared/directives/perms.directive.ts | 2 +- .../shared/models/assignments/assignment.ts | 2 +- .../shared/models/base/agenda-base-model.ts | 2 +- .../src/app/shared/models/base/searchable.ts | 2 +- .../src/app/shared/models/motions/category.ts | 2 +- .../app/shared/models/motions/motion-block.ts | 2 +- .../src/app/shared/models/motions/motion.ts | 2 +- .../models/motions/statute-paragraph.ts | 2 +- client/src/app/shared/models/topics/topic.ts | 2 +- client/src/app/shared/models/users/user.ts | 2 +- client/src/app/shared/shared.module.ts | 10 +++- .../app/site/agenda/agenda-import.service.ts | 6 +-- client/src/app/site/agenda/agenda.config.ts | 8 ++-- .../agenda-import-list.component.ts | 4 +- .../agenda-list/agenda-list.component.ts | 12 ++--- .../agenda-sort/agenda-sort.component.ts | 2 +- .../item-info-dialog.component.ts | 2 +- .../speaker-list/speaker-list.component.ts | 8 ++-- .../topic-detail/topic-detail.component.ts | 8 ++-- .../services/agenda-csv-export.service.ts | 2 +- .../services/agenda-filter-list.service.ts | 8 ++-- .../agenda/services/agenda-pdf.service.ts | 2 +- .../assignment-list.component.ts | 4 +- .../site/assignments/assignments.config.ts | 12 ++++- .../services/assignment-filter.service.ts | 8 ++-- .../services/assignment-sort-list.service.ts | 4 +- client/src/app/site/base/app-config.ts | 34 -------------- client/src/app/site/base/base-import-list.ts | 2 +- .../app/site/common/common-routing.module.ts | 10 ---- client/src/app/site/common/common.config.ts | 9 ++-- client/src/app/site/common/common.module.ts | 13 +----- .../components/search/search.component.ts | 4 +- .../components/start/start.component.ts | 2 +- .../site/common/models/view-chatmessage.ts | 31 +++++++++++++ client/src/app/site/config/config.config.ts | 5 +- .../services/config-repository.service.ts | 12 ++--- .../history-list/history-list.component.ts | 2 +- client/src/app/site/history/history.config.ts | 5 +- .../login-mask/login-mask.component.ts | 10 ++-- .../media-upload/media-upload.component.ts | 4 +- .../mediafile-list.component.ts | 8 ++-- .../app/site/mediafiles/mediafile.config.ts | 12 ++++- .../services/mediafile-filter.service.ts | 8 ++-- .../services/mediafiles-sort-list.service.ts | 4 +- .../amendment-create-wizard.component.ts | 6 +-- .../call-list/call-list.component.ts | 2 +- .../category-list/category-list.component.ts | 4 +- .../manage-submitters.component.ts | 4 +- .../motion-block-detail.component.ts | 6 +-- .../motion-block-list.component.ts | 8 ++-- ...on-change-recommendation.component.spec.ts | 2 +- .../motion-change-recommendation.component.ts | 4 +- .../motion-comment-section-list.component.ts | 6 +-- .../motion-comments.component.ts | 4 +- .../motion-detail-diff.component.ts | 8 ++-- ...iginal-change-recommendations.component.ts | 4 +- .../motion-detail/motion-detail.component.ts | 22 ++++----- .../motion-export-dialog.component.ts | 2 +- .../motion-list/motion-list.component.ts | 16 +++---- .../motion-poll/motion-poll.component.ts | 8 ++-- .../personal-note/personal-note.component.ts | 2 +- .../statute-paragraph-list.component.ts | 4 +- .../site/motions/models/view-change-reco.ts | 2 +- .../models/view-motion-amended-paragraph.ts | 2 +- client/src/app/site/motions/motions.config.ts | 46 +++++++++++++++---- .../services/local-permissions.service.ts | 6 +-- .../services/motion-csv-export.service.ts | 4 +- .../services/motion-filter-list.service.ts | 18 ++++---- .../motions/services/motion-import.service.ts | 10 ++-- .../services/motion-multiselect.service.ts | 20 ++++---- .../services/motion-pdf-catalog.service.ts | 2 +- .../services/motion-pdf-export.service.ts | 4 +- .../motions/services/motion-pdf.service.ts | 8 ++-- .../services/motion-poll-pdf.service.ts | 8 ++-- .../motions/services/motion-poll.service.ts | 4 +- .../services/motion-sort-list.service.ts | 4 +- .../services/statute-csv-export.service.ts | 4 +- .../services/statute-import.service.ts | 4 +- .../countdown-list.component.html | 0 .../countdown-list.component.scss | 0 .../countdown-list.component.spec.ts | 0 .../countdown-list.component.ts | 4 +- .../projector-detail.component.ts | 15 +++--- .../projector-list.component.html | 2 +- .../projector-list.component.ts | 4 +- .../projectormessage-list.component.html | 0 .../projectormessage-list.component.scss | 0 .../projectormessage-list.component.spec.ts | 0 .../projectormessage-list.component.ts | 0 .../models/view-countdown.ts | 0 .../models/view-projectormessage.ts | 8 ++-- .../projector/projector-routing.module.ts | 10 ++++ .../app/site/projector/projector.config.ts | 15 ++++-- .../app/site/projector/projector.module.ts | 14 +++--- .../projector/services/clock-slide.service.ts | 2 +- ...rrent-list-of-of-speakers-slide.service.ts | 4 +- .../services/projector-data.service.ts | 2 +- client/src/app/site/site-routing.module.ts | 2 +- client/src/app/site/site.component.ts | 12 ++--- .../components/tag-list/tag-list.component.ts | 4 +- client/src/app/site/tags/tag.config.ts | 5 +- .../group-list/group-list.component.ts | 4 +- .../components/password/password.component.ts | 4 +- .../presence-detail.component.html | 0 .../presence-detail.component.spec.ts | 0 .../presence-detail.component.ts | 11 +++-- .../user-detail/user-detail.component.ts | 8 ++-- .../user-import/user-import-list.component.ts | 4 +- .../user-list/user-list.component.ts | 16 +++---- .../services/user-filter-list.service.ts | 10 ++-- .../users/services/user-import.service.ts | 6 +-- .../users/services/user-pdf-export.service.ts | 2 +- .../site/users/services/user-pdf.service.ts | 2 +- .../users/services/user-sort-list.service.ts | 4 +- .../app/site/users/users-routing.module.ts | 2 +- client/src/app/site/users/users.config.ts | 11 +++-- client/src/app/site/users/users.module.ts | 2 +- .../core/clock/core-clock-slide.component.ts | 2 +- 277 files changed, 868 insertions(+), 622 deletions(-) create mode 100644 client/src/app/core/app-config.ts rename client/src/app/core/{services => core-services}/app-load.service.spec.ts (100%) rename client/src/app/core/{services => core-services}/app-load.service.ts (83%) rename client/src/app/core/{services => core-services}/auth-guard.service.ts (100%) rename client/src/app/core/{services => core-services}/auth.service.spec.ts (100%) rename client/src/app/core/{services => core-services}/auth.service.ts (97%) rename client/src/app/core/{services => core-services}/autoupdate.service.spec.ts (100%) rename client/src/app/core/{services => core-services}/autoupdate.service.ts (97%) rename client/src/app/core/{services/collectionStringModelMapper.service.spec.ts => core-services/collectionStringMapper.service.spec.ts} (100%) rename client/src/app/core/{services/collectionStringModelMapper.service.ts => core-services/collectionStringMapper.service.ts} (61%) rename client/src/app/core/{services => core-services}/data-send.service.spec.ts (100%) rename client/src/app/core/{services => core-services}/data-send.service.ts (99%) rename client/src/app/core/{services => core-services}/data-store.service.spec.ts (100%) rename client/src/app/core/{services => core-services}/data-store.service.ts (98%) rename client/src/app/core/{services => core-services}/http.service.spec.ts (100%) rename client/src/app/core/{services => core-services}/http.service.ts (99%) rename client/src/app/core/{services => core-services}/main-menu.service.spec.ts (100%) rename client/src/app/core/{services => core-services}/main-menu.service.ts (99%) rename client/src/app/core/{services => core-services}/notify.service.spec.ts (100%) rename client/src/app/core/{services => core-services}/notify.service.ts (99%) rename client/src/app/core/{services => core-services}/offline.service.spec.ts (100%) rename client/src/app/core/{services => core-services}/offline.service.ts (100%) rename client/src/app/core/{services => core-services}/openslides-status.service.spec.ts (100%) rename client/src/app/core/{services => core-services}/openslides-status.service.ts (100%) rename client/src/app/core/{services => core-services}/openslides.service.spec.ts (100%) rename client/src/app/core/{services => core-services}/openslides.service.ts (100%) rename client/src/app/core/{services => core-services}/operator.service.spec.ts (100%) rename client/src/app/core/{services => core-services}/operator.service.ts (99%) rename client/src/app/core/{services => core-services}/projector.service.spec.ts (100%) rename client/src/app/core/{services => core-services}/projector.service.ts (100%) rename client/src/app/core/{services => core-services}/pwa.service.spec.ts (100%) rename client/src/app/core/{services => core-services}/pwa.service.ts (100%) rename client/src/app/core/{services => core-services}/servertime.service.spec.ts (100%) rename client/src/app/core/{services => core-services}/servertime.service.ts (99%) rename client/src/app/core/{services => core-services}/storage.service.spec.ts (100%) rename client/src/app/core/{services => core-services}/storage.service.ts (99%) rename client/src/app/core/{services => core-services}/time-travel.service.spec.ts (100%) rename client/src/app/core/{services => core-services}/time-travel.service.ts (96%) rename client/src/app/core/{services => core-services}/websocket.service.spec.ts (100%) rename client/src/app/core/{services => core-services}/websocket.service.ts (99%) rename client/src/app/{site/agenda/services => core/repositories/agenda}/agenda-repository.service.spec.ts (100%) rename client/src/app/{site/agenda/services => core/repositories/agenda}/agenda-repository.service.ts (93%) rename client/src/app/{site/agenda/services => core/repositories/agenda}/topic-repository.service.spec.ts (100%) rename client/src/app/{site/agenda/services => core/repositories/agenda}/topic-repository.service.ts (85%) rename client/src/app/{site/assignments/services => core/repositories/assignments}/assignment-repository.service.spec.ts (100%) rename client/src/app/{site/assignments/services => core/repositories/assignments}/assignment-repository.service.ts (82%) rename client/src/app/{site/base => core/repositories}/base-repository.ts (96%) create mode 100644 client/src/app/core/repositories/common/chatmessage-repository.service.spec.ts create mode 100644 client/src/app/core/repositories/common/chatmessage-repository.service.ts rename client/src/app/{site/history/services => core/repositories/history}/history-repository.service.spec.ts (100%) rename client/src/app/{site/history/services => core/repositories/history}/history-repository.service.ts (84%) rename client/src/app/{site/mediafiles/services => core/repositories/mediafiles}/mediafile-repository.service.spec.ts (100%) rename client/src/app/{site/mediafiles/services => core/repositories/mediafiles}/mediafile-repository.service.ts (85%) rename client/src/app/{site/motions/services => core/repositories/motions}/category-repository.service.spec.ts (100%) rename client/src/app/{site/motions/services => core/repositories/motions}/category-repository.service.ts (86%) rename client/src/app/{site/motions/services => core/repositories/motions}/change-recommendation-repository.service.spec.ts (100%) rename client/src/app/{site/motions/services => core/repositories/motions}/change-recommendation-repository.service.ts (92%) rename client/src/app/{site/motions/services => core/repositories/motions}/motion-block-repository.service.spec.ts (100%) rename client/src/app/{site/motions/services => core/repositories/motions}/motion-block-repository.service.ts (87%) rename client/src/app/{site/motions/services => core/repositories/motions}/motion-comment-section-repository.service.spec.ts (100%) rename client/src/app/{site/motions/services => core/repositories/motions}/motion-comment-section-repository.service.ts (87%) rename client/src/app/{site/motions/services => core/repositories/motions}/motion-repository.service.spec.ts (100%) rename client/src/app/{site/motions/services => core/repositories/motions}/motion-repository.service.ts (96%) rename client/src/app/{site/motions/services => core/repositories/motions}/statute-paragraph-repository.service.spec.ts (100%) rename client/src/app/{site/motions/services => core/repositories/motions}/statute-paragraph-repository.service.ts (80%) rename client/src/app/{site/motions/services => core/repositories/motions}/workflow-repository.service.spec.ts (100%) rename client/src/app/{site/motions/services => core/repositories/motions}/workflow-repository.service.ts (84%) rename client/src/app/{site/common/services => core/repositories/projector}/countdown-repository.service.spec.ts (100%) rename client/src/app/{site/common/services => core/repositories/projector}/countdown-repository.service.ts (71%) rename client/src/app/{site/projector/services => core/repositories/projector}/projector-repository.service.spec.ts (100%) rename client/src/app/{site/projector/services => core/repositories/projector}/projector-repository.service.ts (86%) rename client/src/app/{site/common/services => core/repositories/projector}/projectormessage-repository.service.spec.ts (100%) rename client/src/app/{site/common/services => core/repositories/projector}/projectormessage-repository.service.ts (73%) rename client/src/app/{site/tags/services => core/repositories/tags}/tag-repository.service.spec.ts (100%) rename client/src/app/{site/tags/services => core/repositories/tags}/tag-repository.service.ts (80%) rename client/src/app/{site/users/services => core/repositories/users}/group-repository.service.spec.ts (100%) rename client/src/app/{site/users/services => core/repositories/users}/group-repository.service.ts (92%) create mode 100644 client/src/app/core/repositories/users/personal-note-repository.service.spec.ts create mode 100644 client/src/app/core/repositories/users/personal-note-repository.service.ts rename client/src/app/{site/users/services => core/repositories/users}/user-repository.service.spec.ts (100%) rename client/src/app/{site/users/services => core/repositories/users}/user-repository.service.ts (95%) rename client/src/app/core/{services/filter-list.service.spec.ts => ui-services/base-filter-list.service.spec.ts} (65%) rename client/src/app/core/{services/filter-list.service.ts => ui-services/base-filter-list.service.ts} (98%) rename client/src/app/core/{services => ui-services}/base-import.service.ts (100%) rename client/src/app/core/{services/sort-list.service.spec.ts => ui-services/base-sort-list.service.spec.ts} (75%) rename client/src/app/core/{services/sort-list.service.ts => ui-services/base-sort-list.service.ts} (98%) rename client/src/app/core/{services => ui-services}/choice.service.spec.ts (100%) rename client/src/app/core/{services => ui-services}/choice.service.ts (100%) rename client/src/app/core/{services => ui-services}/config.service.spec.ts (100%) rename client/src/app/core/{services => ui-services}/config.service.ts (96%) rename client/src/app/core/{services => ui-services}/constants.service.spec.ts (100%) rename client/src/app/core/{services => ui-services}/constants.service.ts (97%) rename client/src/app/core/{services => ui-services}/csv-export.service.spec.ts (100%) rename client/src/app/core/{services => ui-services}/csv-export.service.ts (96%) rename client/src/app/{site/motions/services => core/ui-services}/diff.service.spec.ts (100%) rename client/src/app/{site/motions/services => core/ui-services}/diff.service.ts (99%) rename client/src/app/core/{services => ui-services}/duration.service.spec.ts (100%) rename client/src/app/core/{services => ui-services}/duration.service.ts (100%) rename client/src/app/core/{services => ui-services}/file-export.service.spec.ts (100%) rename client/src/app/core/{services => ui-services}/file-export.service.ts (100%) rename client/src/app/core/{services => ui-services}/html-to-pdf.service.spec.ts (100%) rename client/src/app/core/{services => ui-services}/html-to-pdf.service.ts (100%) rename client/src/app/{site/motions/services => core/ui-services}/linenumbering.service.spec.ts (100%) rename client/src/app/{site/motions/services => core/ui-services}/linenumbering.service.ts (100%) rename client/src/app/core/{services => ui-services}/login-data.service.spec.ts (100%) rename client/src/app/core/{services => ui-services}/login-data.service.ts (99%) rename client/src/app/{site/mediafiles/services => core/ui-services}/media-manage.service.spec.ts (100%) rename client/src/app/{site/mediafiles/services => core/ui-services}/media-manage.service.ts (93%) rename client/src/app/core/{services => ui-services}/pdf-document.service.spec.ts (85%) rename client/src/app/core/{services => ui-services}/pdf-document.service.ts (99%) rename client/src/app/{site/motions/services => core/ui-services}/personal-note.service.spec.ts (100%) rename client/src/app/{site/motions/services => core/ui-services}/personal-note.service.ts (93%) rename client/src/app/core/{ => ui-services}/poll.service.spec.ts (100%) rename client/src/app/core/{ => ui-services}/poll.service.ts (100%) rename client/src/app/core/{services/projection-dilog.service.spec.ts => ui-services/projection-dialog.service.spec.ts} (100%) rename client/src/app/core/{services => ui-services}/projection-dialog.service.ts (96%) rename client/src/app/core/{services => ui-services}/prompt.service.spec.ts (100%) rename client/src/app/core/{services => ui-services}/prompt.service.ts (100%) rename client/src/app/core/{services => ui-services}/search.service.spec.ts (100%) rename client/src/app/core/{services => ui-services}/search.service.ts (98%) rename client/src/app/core/{services => ui-services}/theme.service.spec.ts (100%) rename client/src/app/core/{services => ui-services}/theme.service.ts (100%) rename client/src/app/core/{services => ui-services}/tree.service.spec.ts (100%) rename client/src/app/core/{services => ui-services}/tree.service.ts (100%) rename client/src/app/core/{services => ui-services}/viewport.service.spec.ts (100%) rename client/src/app/core/{services => ui-services}/viewport.service.ts (100%) create mode 100644 client/src/app/fullscreen-projector/fullscreen-projector-routing.module.ts create mode 100644 client/src/app/fullscreen-projector/fullscreen-projector.module.ts rename client/src/app/{site/projector/components => fullscreen-projector}/fullscreen-projector/fullscreen-projector.component.html (100%) rename client/src/app/{site/projector/components => fullscreen-projector}/fullscreen-projector/fullscreen-projector.component.scss (100%) rename client/src/app/{site/projector/components => fullscreen-projector}/fullscreen-projector/fullscreen-projector.component.spec.ts (84%) rename client/src/app/{site/projector/components => fullscreen-projector}/fullscreen-projector/fullscreen-projector.component.ts (94%) rename client/src/app/{site/projector => shared}/components/projector/projector.component.html (100%) rename client/src/app/{site/projector => shared}/components/projector/projector.component.scss (100%) rename client/src/app/{site/projector => shared}/components/projector/projector.component.spec.ts (77%) rename client/src/app/{site/projector => shared}/components/projector/projector.component.ts (95%) rename client/src/app/{site/projector => shared}/components/slide-container/slide-container.component.html (100%) rename client/src/app/{site/projector => shared}/components/slide-container/slide-container.component.scss (100%) rename client/src/app/{site/projector => shared}/components/slide-container/slide-container.component.spec.ts (78%) rename client/src/app/{site/projector => shared}/components/slide-container/slide-container.component.ts (96%) delete mode 100644 client/src/app/site/base/app-config.ts create mode 100644 client/src/app/site/common/models/view-chatmessage.ts rename client/src/app/site/{common => projector}/components/countdown-list/countdown-list.component.html (100%) rename client/src/app/site/{common => projector}/components/countdown-list/countdown-list.component.scss (100%) rename client/src/app/site/{common => projector}/components/countdown-list/countdown-list.component.spec.ts (100%) rename client/src/app/site/{common => projector}/components/countdown-list/countdown-list.component.ts (96%) rename client/src/app/site/{common => projector}/components/projectormessage-list/projectormessage-list.component.html (100%) rename client/src/app/site/{common => projector}/components/projectormessage-list/projectormessage-list.component.scss (100%) rename client/src/app/site/{common => projector}/components/projectormessage-list/projectormessage-list.component.spec.ts (100%) rename client/src/app/site/{common => projector}/components/projectormessage-list/projectormessage-list.component.ts (100%) rename client/src/app/site/{common => projector}/models/view-countdown.ts (100%) rename client/src/app/site/{common => projector}/models/view-projectormessage.ts (84%) rename client/src/app/site/users/{ => components}/presence-detail/presence-detail.component.html (100%) rename client/src/app/site/users/{ => components}/presence-detail/presence-detail.component.spec.ts (100%) rename client/src/app/site/users/{ => components}/presence-detail/presence-detail.component.ts (93%) diff --git a/client/package.json b/client/package.json index 1886a58e7..81655863c 100644 --- a/client/package.json +++ b/client/package.json @@ -10,6 +10,7 @@ "README": "https://github.com/OpenSlides/OpenSlides/blob/master/client/README.md", "scripts": { "ng": "ng", + "ng-high-memory": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng", "start": "ng serve --proxy-config proxy.conf.json --host=0.0.0.0", "build": "ng build --prod --aot", "test": "ng test", @@ -77,6 +78,7 @@ "npm-run-all": "^4.1.5", "prettier": "^1.16.2", "protractor": "^5.4.2", + "source-map-explorer": "^1.6.0", "ts-node": "~8.0.2", "tslint": "~5.12.1", "tsutils": "^3.7.0", diff --git a/client/src/app/app-routing.module.ts b/client/src/app/app-routing.module.ts index 4f451f74b..60260308c 100644 --- a/client/src/app/app-routing.module.ts +++ b/client/src/app/app-routing.module.ts @@ -7,7 +7,6 @@ import { LoginLegalNoticeComponent } from './site/login/components/login-legal-n import { LoginPrivacyPolicyComponent } from './site/login/components/login-privacy-policy/login-privacy-policy.component'; import { ResetPasswordComponent } from './site/login/components/reset-password/reset-password.component'; import { ResetPasswordConfirmComponent } from './site/login/components/reset-password-confirm/reset-password-confirm.component'; -import { FullscreenProjectorComponent } from './site/projector/components/fullscreen-projector/fullscreen-projector.component'; /** * Global app routing @@ -24,8 +23,7 @@ const routes: Routes = [ { path: 'privacypolicy', component: LoginPrivacyPolicyComponent } ] }, - { path: 'projector', component: FullscreenProjectorComponent }, - { path: 'projector/:id', component: FullscreenProjectorComponent }, + { path: 'projector', loadChildren: './fullscreen-projector/fullscreen-projector.module#FullscreenProjectorModule' }, { path: '', loadChildren: './site/site.module#SiteModule' }, { path: '**', redirectTo: '' } ]; diff --git a/client/src/app/app.component.spec.ts b/client/src/app/app.component.spec.ts index 329d14d23..ae3cc2724 100644 --- a/client/src/app/app.component.spec.ts +++ b/client/src/app/app.component.spec.ts @@ -1,7 +1,7 @@ import { TestBed, async } from '@angular/core/testing'; import { AppComponent } from './app.component'; import { E2EImportsModule } from './../e2e-imports.module'; -import { ServertimeService } from './core/services/servertime.service'; +import { ServertimeService } from './core/core-services/servertime.service'; describe('AppComponent', () => { let servertimeService; diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index f4adef4ac..a5f75916c 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts @@ -1,11 +1,11 @@ import { Component } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; -import { OperatorService } from './core/services/operator.service'; -import { LoginDataService } from './core/services/login-data.service'; -import { ConfigService } from './core/services/config.service'; -import { ConstantsService } from './core/services/constants.service'; -import { ServertimeService } from './core/services/servertime.service'; -import { ThemeService } from './core/services/theme.service'; +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'; /** * Angular's global App Component diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts index 2abf1dc80..e1bb0ab1c 100644 --- a/client/src/app/app.module.ts +++ b/client/src/app/app.module.ts @@ -9,11 +9,8 @@ import { PapaParseModule } from 'ngx-papaparse'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { CoreModule } from './core/core.module'; - -// translation module. import { LoginModule } from './site/login/login.module'; -import { AppLoadService } from './core/services/app-load.service'; -import { ProjectorModule } from './site/projector/projector.module'; +import { AppLoadService } from './core/core-services/app-load.service'; import { SlidesModule } from './slides/slides.module'; import { OpenSlidesTranslateModule } from './core/translate/openslides-translate-module'; @@ -48,7 +45,6 @@ export function AppLoaderFactory(appLoadService: AppLoadService): () => Promise< LoginModule, PapaParseModule, ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production }), - ProjectorModule, SlidesModule.forRoot() ], providers: [{ provide: APP_INITIALIZER, useFactory: AppLoaderFactory, deps: [AppLoadService], multi: true }], diff --git a/client/src/app/core/app-config.ts b/client/src/app/core/app-config.ts new file mode 100644 index 000000000..cf278331b --- /dev/null +++ b/client/src/app/core/app-config.ts @@ -0,0 +1,39 @@ +import { ModelConstructor, BaseModel } from '../shared/models/base/base-model'; +import { MainMenuEntry } from './core-services/main-menu.service'; +import { Searchable } from '../shared/models/base/searchable'; +import { Type } from '@angular/core'; +import { BaseRepository } from './repositories/base-repository'; + +interface BaseModelEntry { + collectionString: string; + repository: Type>; +} + +export interface ModelEntry extends BaseModelEntry { + model: ModelConstructor; +} + +export interface SearchableModelEntry extends BaseModelEntry { + model: new (...args: any[]) => BaseModel & Searchable; + searchOrder: number; +} + +/** + * The configuration of an app. + */ +export interface AppConfig { + /** + * The name. + */ + name: string; + + /** + * All models, that should be registered. + */ + models?: (ModelEntry | SearchableModelEntry)[]; + + /** + * Main menu entries. + */ + mainMenuEntries?: MainMenuEntry[]; +} diff --git a/client/src/app/core/services/app-load.service.spec.ts b/client/src/app/core/core-services/app-load.service.spec.ts similarity index 100% rename from client/src/app/core/services/app-load.service.spec.ts rename to client/src/app/core/core-services/app-load.service.spec.ts diff --git a/client/src/app/core/services/app-load.service.ts b/client/src/app/core/core-services/app-load.service.ts similarity index 83% rename from client/src/app/core/services/app-load.service.ts rename to client/src/app/core/core-services/app-load.service.ts index 7af9fc7c5..e56d5e38e 100644 --- a/client/src/app/core/services/app-load.service.ts +++ b/client/src/app/core/core-services/app-load.service.ts @@ -1,8 +1,9 @@ -import { Injectable } from '@angular/core'; +import { Injectable, Injector } from '@angular/core'; + import { plugins } from '../../../plugins'; import { CommonAppConfig } from '../../site/common/common.config'; -import { AppConfig, SearchableModelEntry, ModelEntry } from '../../site/base/app-config'; -import { CollectionStringModelMapperService } from './collectionStringModelMapper.service'; +import { AppConfig, SearchableModelEntry, ModelEntry } from '../app-config'; +import { CollectionStringMapperService } from './collectionStringMapper.service'; import { MediafileAppConfig } from '../../site/mediafiles/mediafile.config'; import { MotionsAppConfig } from '../../site/motions/motions.config'; import { ConfigAppConfig } from '../../site/config/config.config'; @@ -12,9 +13,10 @@ import { UsersAppConfig } from '../../site/users/users.config'; import { TagAppConfig } from '../../site/tags/tag.config'; import { MainMenuService } from './main-menu.service'; import { HistoryAppConfig } from 'app/site/history/history.config'; -import { SearchService } from './search.service'; +import { SearchService } from '../ui-services/search.service'; import { isSearchable } from '../../shared/models/base/searchable'; import { ProjectorAppConfig } from 'app/site/projector/projector.config'; +import { BaseRepository } from 'app/core/repositories/base-repository'; /** * A list of all app configurations of all delivered apps. @@ -47,9 +49,10 @@ export class AppLoadService { * @param searchService */ public constructor( - private modelMapper: CollectionStringModelMapperService, + private modelMapper: CollectionStringMapperService, private mainMenuService: MainMenuService, - private searchService: SearchService + private searchService: SearchService, + private injector: Injector ) {} public async loadApps(): Promise { @@ -63,7 +66,11 @@ export class AppLoadService { appConfigs.forEach((config: AppConfig) => { if (config.models) { config.models.forEach(entry => { - this.modelMapper.registerCollectionElement(entry.collectionString, entry.model); + let repository: BaseRepository = null; + if (entry.repository) { + repository = this.injector.get(entry.repository); + } + this.modelMapper.registerCollectionElement(entry.collectionString, entry.model, repository); if (this.isSearchableModelEntry(entry)) { this.searchService.registerModel(entry.collectionString, entry.model, entry.searchOrder); } diff --git a/client/src/app/core/services/auth-guard.service.ts b/client/src/app/core/core-services/auth-guard.service.ts similarity index 100% rename from client/src/app/core/services/auth-guard.service.ts rename to client/src/app/core/core-services/auth-guard.service.ts diff --git a/client/src/app/core/services/auth.service.spec.ts b/client/src/app/core/core-services/auth.service.spec.ts similarity index 100% rename from client/src/app/core/services/auth.service.spec.ts rename to client/src/app/core/core-services/auth.service.spec.ts diff --git a/client/src/app/core/services/auth.service.ts b/client/src/app/core/core-services/auth.service.ts similarity index 97% rename from client/src/app/core/services/auth.service.ts rename to client/src/app/core/core-services/auth.service.ts index 6d97133b1..33e68633d 100644 --- a/client/src/app/core/services/auth.service.ts +++ b/client/src/app/core/core-services/auth.service.ts @@ -1,11 +1,11 @@ import { Injectable } from '@angular/core'; +import { Router } from '@angular/router'; -import { OperatorService } from 'app/core/services/operator.service'; +import { OperatorService } from 'app/core/core-services/operator.service'; import { OpenSlidesComponent } from '../../openslides.component'; import { environment } from 'environments/environment'; import { User } from '../../shared/models/users/user'; import { OpenSlidesService } from './openslides.service'; -import { Router } from '@angular/router'; import { HttpService } from './http.service'; /** diff --git a/client/src/app/core/services/autoupdate.service.spec.ts b/client/src/app/core/core-services/autoupdate.service.spec.ts similarity index 100% rename from client/src/app/core/services/autoupdate.service.spec.ts rename to client/src/app/core/core-services/autoupdate.service.spec.ts diff --git a/client/src/app/core/services/autoupdate.service.ts b/client/src/app/core/core-services/autoupdate.service.ts similarity index 97% rename from client/src/app/core/services/autoupdate.service.ts rename to client/src/app/core/core-services/autoupdate.service.ts index ef19b017b..09e2bd485 100644 --- a/client/src/app/core/services/autoupdate.service.ts +++ b/client/src/app/core/core-services/autoupdate.service.ts @@ -3,7 +3,7 @@ import { Injectable } from '@angular/core'; import { OpenSlidesComponent } from 'app/openslides.component'; import { WebsocketService } from './websocket.service'; -import { CollectionStringModelMapperService } from './collectionStringModelMapper.service'; +import { CollectionStringMapperService } from './collectionStringMapper.service'; import { DataStoreService } from './data-store.service'; import { BaseModel } from '../../shared/models/base/base-model'; @@ -58,7 +58,7 @@ export class AutoupdateService extends OpenSlidesComponent { public constructor( private websocketService: WebsocketService, private DS: DataStoreService, - private modelMapper: CollectionStringModelMapperService + private modelMapper: CollectionStringMapperService ) { super(); this.websocketService.getOberservable('autoupdate').subscribe(response => { diff --git a/client/src/app/core/services/collectionStringModelMapper.service.spec.ts b/client/src/app/core/core-services/collectionStringMapper.service.spec.ts similarity index 100% rename from client/src/app/core/services/collectionStringModelMapper.service.spec.ts rename to client/src/app/core/core-services/collectionStringMapper.service.spec.ts diff --git a/client/src/app/core/services/collectionStringModelMapper.service.ts b/client/src/app/core/core-services/collectionStringMapper.service.ts similarity index 61% rename from client/src/app/core/services/collectionStringModelMapper.service.ts rename to client/src/app/core/core-services/collectionStringMapper.service.ts index 9c749f085..b69ae9110 100644 --- a/client/src/app/core/services/collectionStringModelMapper.service.ts +++ b/client/src/app/core/core-services/collectionStringMapper.service.ts @@ -1,5 +1,7 @@ import { Injectable } from '@angular/core'; + import { ModelConstructor, BaseModel } from '../../shared/models/base/base-model'; +import { BaseRepository } from 'app/core/repositories/base-repository'; /** * Registeres the mapping of collection strings <--> actual types. Every Model should register itself here. @@ -7,12 +9,14 @@ import { ModelConstructor, BaseModel } from '../../shared/models/base/base-model @Injectable({ providedIn: 'root' }) -export class CollectionStringModelMapperService { +export class CollectionStringMapperService { /** * Mapps collection strings to model constructors. Accessed by {@method registerCollectionElement} and * {@method getCollectionStringType}. */ - private collectionStringsTypeMapping: { [collectionString: string]: ModelConstructor } = {}; + private collectionStringsTypeMapping: { + [collectionString: string]: [ModelConstructor, BaseRepository]; + } = {}; /** * Constructor to create the NotifyService. Registers itself to the WebsocketService. @@ -23,10 +27,14 @@ export class CollectionStringModelMapperService { /** * Registers the type to the collection string * @param collectionString - * @param type + * @param model */ - public registerCollectionElement(collectionString: string, type: ModelConstructor): void { - this.collectionStringsTypeMapping[collectionString] = type; + public registerCollectionElement( + collectionString: string, + model: ModelConstructor, + repository: BaseRepository + ): void { + this.collectionStringsTypeMapping[collectionString] = [model, repository]; } /** @@ -34,7 +42,15 @@ export class CollectionStringModelMapperService { * @param collectionString the requested collection */ public getModelConstructor(collectionString: string): ModelConstructor { - return this.collectionStringsTypeMapping[collectionString]; + return this.collectionStringsTypeMapping[collectionString][0]; + } + + /** + * Returns the repository of the requested collection or undefined, if it is not registered. + * @param collectionString the requested collection + */ + public getRepository(collectionString: string): BaseRepository { + return this.collectionStringsTypeMapping[collectionString][1]; } /** @@ -43,7 +59,7 @@ export class CollectionStringModelMapperService { */ public getCollectionString(ctor: ModelConstructor): string { return Object.keys(this.collectionStringsTypeMapping).find((collectionString: string) => { - return ctor === this.collectionStringsTypeMapping[collectionString]; + return ctor === this.collectionStringsTypeMapping[collectionString][0]; }); } } diff --git a/client/src/app/core/services/data-send.service.spec.ts b/client/src/app/core/core-services/data-send.service.spec.ts similarity index 100% rename from client/src/app/core/services/data-send.service.spec.ts rename to client/src/app/core/core-services/data-send.service.spec.ts diff --git a/client/src/app/core/services/data-send.service.ts b/client/src/app/core/core-services/data-send.service.ts similarity index 99% rename from client/src/app/core/services/data-send.service.ts rename to client/src/app/core/core-services/data-send.service.ts index cca8da869..f3a362cf5 100644 --- a/client/src/app/core/services/data-send.service.ts +++ b/client/src/app/core/core-services/data-send.service.ts @@ -1,4 +1,5 @@ import { Injectable } from '@angular/core'; + import { BaseModel } from '../../shared/models/base/base-model'; import { HttpService } from './http.service'; import { Identifiable } from '../../shared/models/base/identifiable'; diff --git a/client/src/app/core/services/data-store.service.spec.ts b/client/src/app/core/core-services/data-store.service.spec.ts similarity index 100% rename from client/src/app/core/services/data-store.service.spec.ts rename to client/src/app/core/core-services/data-store.service.spec.ts diff --git a/client/src/app/core/services/data-store.service.ts b/client/src/app/core/core-services/data-store.service.ts similarity index 98% rename from client/src/app/core/services/data-store.service.ts rename to client/src/app/core/core-services/data-store.service.ts index ead9c1267..19ac2bcc7 100644 --- a/client/src/app/core/services/data-store.service.ts +++ b/client/src/app/core/core-services/data-store.service.ts @@ -1,9 +1,10 @@ import { Injectable } from '@angular/core'; + import { Observable, Subject } from 'rxjs'; import { BaseModel, ModelConstructor } from '../../shared/models/base/base-model'; import { StorageService } from './storage.service'; -import { CollectionStringModelMapperService } from './collectionStringModelMapper.service'; +import { CollectionStringMapperService } from './collectionStringMapper.service'; /** * Represents information about a deleted model. @@ -126,10 +127,7 @@ export class DataStoreService { * @param storageService use StorageService to preserve the DataStore. * @param modelMapper */ - public constructor( - private storageService: StorageService, - private modelMapper: CollectionStringModelMapperService - ) {} + public constructor(private storageService: StorageService, private modelMapper: CollectionStringMapperService) {} /** * Gets the DataStore from cache and instantiate all models out of the serialized version. diff --git a/client/src/app/core/services/http.service.spec.ts b/client/src/app/core/core-services/http.service.spec.ts similarity index 100% rename from client/src/app/core/services/http.service.spec.ts rename to client/src/app/core/core-services/http.service.spec.ts diff --git a/client/src/app/core/services/http.service.ts b/client/src/app/core/core-services/http.service.ts similarity index 99% rename from client/src/app/core/services/http.service.ts rename to client/src/app/core/core-services/http.service.ts index 658771e4f..de679a000 100644 --- a/client/src/app/core/services/http.service.ts +++ b/client/src/app/core/core-services/http.service.ts @@ -1,6 +1,8 @@ import { Injectable } from '@angular/core'; import { HttpClient, HttpErrorResponse, HttpHeaders } from '@angular/common/http'; + import { TranslateService } from '@ngx-translate/core'; + import { formatQueryParams, QueryParams } from '../query-params'; import { OpenSlidesStatusService } from './openslides-status.service'; diff --git a/client/src/app/core/services/main-menu.service.spec.ts b/client/src/app/core/core-services/main-menu.service.spec.ts similarity index 100% rename from client/src/app/core/services/main-menu.service.spec.ts rename to client/src/app/core/core-services/main-menu.service.spec.ts diff --git a/client/src/app/core/services/main-menu.service.ts b/client/src/app/core/core-services/main-menu.service.ts similarity index 99% rename from client/src/app/core/services/main-menu.service.ts rename to client/src/app/core/core-services/main-menu.service.ts index 0e428683c..783055f20 100644 --- a/client/src/app/core/services/main-menu.service.ts +++ b/client/src/app/core/core-services/main-menu.service.ts @@ -1,4 +1,5 @@ import { Injectable } from '@angular/core'; + import { Subject } from 'rxjs'; /** diff --git a/client/src/app/core/services/notify.service.spec.ts b/client/src/app/core/core-services/notify.service.spec.ts similarity index 100% rename from client/src/app/core/services/notify.service.spec.ts rename to client/src/app/core/core-services/notify.service.spec.ts diff --git a/client/src/app/core/services/notify.service.ts b/client/src/app/core/core-services/notify.service.ts similarity index 99% rename from client/src/app/core/services/notify.service.ts rename to client/src/app/core/core-services/notify.service.ts index 40575d8a2..a4bc27d5d 100644 --- a/client/src/app/core/services/notify.service.ts +++ b/client/src/app/core/core-services/notify.service.ts @@ -1,4 +1,5 @@ import { Injectable } from '@angular/core'; + import { Subject, Observable } from 'rxjs'; import { OpenSlidesComponent } from 'app/openslides.component'; diff --git a/client/src/app/core/services/offline.service.spec.ts b/client/src/app/core/core-services/offline.service.spec.ts similarity index 100% rename from client/src/app/core/services/offline.service.spec.ts rename to client/src/app/core/core-services/offline.service.spec.ts diff --git a/client/src/app/core/services/offline.service.ts b/client/src/app/core/core-services/offline.service.ts similarity index 100% rename from client/src/app/core/services/offline.service.ts rename to client/src/app/core/core-services/offline.service.ts diff --git a/client/src/app/core/services/openslides-status.service.spec.ts b/client/src/app/core/core-services/openslides-status.service.spec.ts similarity index 100% rename from client/src/app/core/services/openslides-status.service.spec.ts rename to client/src/app/core/core-services/openslides-status.service.spec.ts diff --git a/client/src/app/core/services/openslides-status.service.ts b/client/src/app/core/core-services/openslides-status.service.ts similarity index 100% rename from client/src/app/core/services/openslides-status.service.ts rename to client/src/app/core/core-services/openslides-status.service.ts diff --git a/client/src/app/core/services/openslides.service.spec.ts b/client/src/app/core/core-services/openslides.service.spec.ts similarity index 100% rename from client/src/app/core/services/openslides.service.spec.ts rename to client/src/app/core/core-services/openslides.service.spec.ts diff --git a/client/src/app/core/services/openslides.service.ts b/client/src/app/core/core-services/openslides.service.ts similarity index 100% rename from client/src/app/core/services/openslides.service.ts rename to client/src/app/core/core-services/openslides.service.ts diff --git a/client/src/app/core/services/operator.service.spec.ts b/client/src/app/core/core-services/operator.service.spec.ts similarity index 100% rename from client/src/app/core/services/operator.service.spec.ts rename to client/src/app/core/core-services/operator.service.spec.ts diff --git a/client/src/app/core/services/operator.service.ts b/client/src/app/core/core-services/operator.service.ts similarity index 99% rename from client/src/app/core/services/operator.service.ts rename to client/src/app/core/core-services/operator.service.ts index 2201ed7aa..fbefe381c 100644 --- a/client/src/app/core/services/operator.service.ts +++ b/client/src/app/core/core-services/operator.service.ts @@ -1,6 +1,8 @@ import { Injectable } from '@angular/core'; -import { Observable, BehaviorSubject } from 'rxjs'; import { HttpClient } from '@angular/common/http'; + +import { Observable, BehaviorSubject } from 'rxjs'; + import { OpenSlidesComponent } from 'app/openslides.component'; import { Group } from 'app/shared/models/users/group'; import { User } from '../../shared/models/users/user'; diff --git a/client/src/app/core/services/projector.service.spec.ts b/client/src/app/core/core-services/projector.service.spec.ts similarity index 100% rename from client/src/app/core/services/projector.service.spec.ts rename to client/src/app/core/core-services/projector.service.spec.ts diff --git a/client/src/app/core/services/projector.service.ts b/client/src/app/core/core-services/projector.service.ts similarity index 100% rename from client/src/app/core/services/projector.service.ts rename to client/src/app/core/core-services/projector.service.ts diff --git a/client/src/app/core/services/pwa.service.spec.ts b/client/src/app/core/core-services/pwa.service.spec.ts similarity index 100% rename from client/src/app/core/services/pwa.service.spec.ts rename to client/src/app/core/core-services/pwa.service.spec.ts diff --git a/client/src/app/core/services/pwa.service.ts b/client/src/app/core/core-services/pwa.service.ts similarity index 100% rename from client/src/app/core/services/pwa.service.ts rename to client/src/app/core/core-services/pwa.service.ts diff --git a/client/src/app/core/services/servertime.service.spec.ts b/client/src/app/core/core-services/servertime.service.spec.ts similarity index 100% rename from client/src/app/core/services/servertime.service.spec.ts rename to client/src/app/core/core-services/servertime.service.spec.ts diff --git a/client/src/app/core/services/servertime.service.ts b/client/src/app/core/core-services/servertime.service.ts similarity index 99% rename from client/src/app/core/services/servertime.service.ts rename to client/src/app/core/core-services/servertime.service.ts index dc2068900..dddd5e377 100644 --- a/client/src/app/core/services/servertime.service.ts +++ b/client/src/app/core/core-services/servertime.service.ts @@ -1,9 +1,10 @@ import { Injectable } from '@angular/core'; +import { BehaviorSubject, Observable } from 'rxjs'; + import { OpenSlidesComponent } from 'app/openslides.component'; import { HttpService } from './http.service'; import { environment } from 'environments/environment.prod'; -import { BehaviorSubject, Observable } from 'rxjs'; /** * This service provides the timeoffset to the server and a user of this service diff --git a/client/src/app/core/services/storage.service.spec.ts b/client/src/app/core/core-services/storage.service.spec.ts similarity index 100% rename from client/src/app/core/services/storage.service.spec.ts rename to client/src/app/core/core-services/storage.service.spec.ts diff --git a/client/src/app/core/services/storage.service.ts b/client/src/app/core/core-services/storage.service.ts similarity index 99% rename from client/src/app/core/services/storage.service.ts rename to client/src/app/core/core-services/storage.service.ts index 40fd599bc..431246b84 100644 --- a/client/src/app/core/services/storage.service.ts +++ b/client/src/app/core/core-services/storage.service.ts @@ -1,5 +1,7 @@ import { Injectable } from '@angular/core'; + import { LocalStorage } from '@ngx-pwa/local-storage'; + import { OpenSlidesStatusService } from './openslides-status.service'; /** diff --git a/client/src/app/core/services/time-travel.service.spec.ts b/client/src/app/core/core-services/time-travel.service.spec.ts similarity index 100% rename from client/src/app/core/services/time-travel.service.spec.ts rename to client/src/app/core/core-services/time-travel.service.spec.ts diff --git a/client/src/app/core/services/time-travel.service.ts b/client/src/app/core/core-services/time-travel.service.ts similarity index 96% rename from client/src/app/core/services/time-travel.service.ts rename to client/src/app/core/core-services/time-travel.service.ts index 65eb0b9a9..e36e155c7 100644 --- a/client/src/app/core/services/time-travel.service.ts +++ b/client/src/app/core/core-services/time-travel.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@angular/core'; import { environment } from 'environments/environment'; -import { CollectionStringModelMapperService } from './collectionStringModelMapper.service'; +import { CollectionStringMapperService } from './collectionStringMapper.service'; import { History } from 'app/shared/models/core/history'; import { DataStoreService } from './data-store.service'; import { WebsocketService } from './websocket.service'; @@ -48,7 +48,7 @@ export class TimeTravelService { public constructor( private httpService: HttpService, private webSocketService: WebsocketService, - private modelMapperService: CollectionStringModelMapperService, + private modelMapperService: CollectionStringMapperService, private DS: DataStoreService, private OSStatus: OpenSlidesStatusService, private OpenSlides: OpenSlidesService diff --git a/client/src/app/core/services/websocket.service.spec.ts b/client/src/app/core/core-services/websocket.service.spec.ts similarity index 100% rename from client/src/app/core/services/websocket.service.spec.ts rename to client/src/app/core/core-services/websocket.service.spec.ts diff --git a/client/src/app/core/services/websocket.service.ts b/client/src/app/core/core-services/websocket.service.ts similarity index 99% rename from client/src/app/core/services/websocket.service.ts rename to client/src/app/core/core-services/websocket.service.ts index 4c2fcb818..9a73e956f 100644 --- a/client/src/app/core/services/websocket.service.ts +++ b/client/src/app/core/core-services/websocket.service.ts @@ -1,7 +1,9 @@ import { Injectable, NgZone, EventEmitter } from '@angular/core'; -import { Observable, Subject } from 'rxjs'; import { MatSnackBar, MatSnackBarRef, SimpleSnackBar } from '@angular/material'; + +import { Observable, Subject } from 'rxjs'; import { TranslateService } from '@ngx-translate/core'; + import { formatQueryParams, QueryParams } from '../query-params'; /** diff --git a/client/src/app/core/core.module.ts b/client/src/app/core/core.module.ts index 779933867..f7d2e7da1 100644 --- a/client/src/app/core/core.module.ts +++ b/client/src/app/core/core.module.ts @@ -2,37 +2,17 @@ import { NgModule, Optional, SkipSelf } from '@angular/core'; import { CommonModule } from '@angular/common'; import { Title } from '@angular/platform-browser'; -// Core Services, Directives -import { AuthGuard } from './services/auth-guard.service'; -import { AuthService } from './services/auth.service'; -import { AutoupdateService } from './services/autoupdate.service'; -import { DataStoreService } from './services/data-store.service'; -import { OperatorService } from './services/operator.service'; -import { WebsocketService } from './services/websocket.service'; -import { DataSendService } from './services/data-send.service'; -import { ViewportService } from './services/viewport.service'; +// Shared Components import { PromptDialogComponent } from '../shared/components/prompt-dialog/prompt-dialog.component'; -import { HttpService } from './services/http.service'; import { ChoiceDialogComponent } from '../shared/components/choice-dialog/choice-dialog.component'; import { ProjectionDialogComponent } from 'app/shared/components/projection-dialog/projection-dialog.component'; -/** Global Core Module. Contains all global (singleton) services - * +/** + * Global Core Module. */ @NgModule({ imports: [CommonModule], - providers: [ - Title, - AuthGuard, - AuthService, - AutoupdateService, - DataStoreService, - DataSendService, - HttpService, - OperatorService, - ViewportService, - WebsocketService - ], + providers: [Title], entryComponents: [PromptDialogComponent, ChoiceDialogComponent, ProjectionDialogComponent] }) export class CoreModule { diff --git a/client/src/app/site/agenda/services/agenda-repository.service.spec.ts b/client/src/app/core/repositories/agenda/agenda-repository.service.spec.ts similarity index 100% rename from client/src/app/site/agenda/services/agenda-repository.service.spec.ts rename to client/src/app/core/repositories/agenda/agenda-repository.service.spec.ts diff --git a/client/src/app/site/agenda/services/agenda-repository.service.ts b/client/src/app/core/repositories/agenda/agenda-repository.service.ts similarity index 93% rename from client/src/app/site/agenda/services/agenda-repository.service.ts rename to client/src/app/core/repositories/agenda/agenda-repository.service.ts index 40455ec57..e562f7b0d 100644 --- a/client/src/app/site/agenda/services/agenda-repository.service.ts +++ b/client/src/app/core/repositories/agenda/agenda-repository.service.ts @@ -2,22 +2,22 @@ import { Injectable } from '@angular/core'; import { tap, map } from 'rxjs/operators'; import { Observable } from 'rxjs'; -import { BaseRepository } from '../../base/base-repository'; +import { BaseRepository } from '../base-repository'; import { AgendaBaseModel } from '../../../shared/models/base/agenda-base-model'; import { BaseModel } from '../../../shared/models/base/base-model'; -import { CollectionStringModelMapperService } from '../../../core/services/collectionStringModelMapper.service'; -import { ConfigService } from 'app/core/services/config.service'; -import { DataSendService } from 'app/core/services/data-send.service'; -import { DataStoreService } from '../../../core/services/data-store.service'; -import { HttpService } from 'app/core/services/http.service'; +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 { 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 '../models/view-item'; -import { ViewSpeaker } from '../models/view-speaker'; -import { TreeService } from 'app/core/services/tree.service'; +import { ViewItem } from '../../../site/agenda/models/view-item'; +import { ViewSpeaker } from '../../../site/agenda/models/view-speaker'; +import { TreeService } from 'app/core/ui-services/tree.service'; /** * Repository service for users @@ -41,7 +41,7 @@ export class AgendaRepositoryService extends BaseRepository { public constructor( protected DS: DataStoreService, private httpService: HttpService, - mapperService: CollectionStringModelMapperService, + mapperService: CollectionStringMapperService, private config: ConfigService, private dataSend: DataSendService, private treeService: TreeService diff --git a/client/src/app/site/agenda/services/topic-repository.service.spec.ts b/client/src/app/core/repositories/agenda/topic-repository.service.spec.ts similarity index 100% rename from client/src/app/site/agenda/services/topic-repository.service.spec.ts rename to client/src/app/core/repositories/agenda/topic-repository.service.spec.ts diff --git a/client/src/app/site/agenda/services/topic-repository.service.ts b/client/src/app/core/repositories/agenda/topic-repository.service.ts similarity index 85% rename from client/src/app/site/agenda/services/topic-repository.service.ts rename to client/src/app/core/repositories/agenda/topic-repository.service.ts index 842e796de..cf7763083 100644 --- a/client/src/app/site/agenda/services/topic-repository.service.ts +++ b/client/src/app/core/repositories/agenda/topic-repository.service.ts @@ -1,15 +1,15 @@ import { Injectable } from '@angular/core'; import { Topic } from 'app/shared/models/topics/topic'; -import { BaseRepository } from 'app/site/base/base-repository'; +import { BaseRepository } from 'app/core/repositories/base-repository'; import { Mediafile } from 'app/shared/models/mediafiles/mediafile'; import { Item } from 'app/shared/models/agenda/item'; -import { DataStoreService } from 'app/core/services/data-store.service'; -import { DataSendService } from 'app/core/services/data-send.service'; -import { ViewTopic } from '../models/view-topic'; +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 { Identifiable } from 'app/shared/models/base/identifiable'; -import { CollectionStringModelMapperService } from 'app/core/services/collectionStringModelMapper.service'; -import { CreateTopic } from '../models/create-topic'; +import { CollectionStringMapperService } from 'app/core/core-services/collectionStringMapper.service'; +import { CreateTopic } from '../../../site/agenda/models/create-topic'; /** * Repository for topics @@ -27,7 +27,7 @@ export class TopicRepositoryService extends BaseRepository { */ public constructor( DS: DataStoreService, - mapperService: CollectionStringModelMapperService, + mapperService: CollectionStringMapperService, private dataSend: DataSendService ) { super(DS, mapperService, Topic, [Mediafile, Item]); diff --git a/client/src/app/site/assignments/services/assignment-repository.service.spec.ts b/client/src/app/core/repositories/assignments/assignment-repository.service.spec.ts similarity index 100% rename from client/src/app/site/assignments/services/assignment-repository.service.spec.ts rename to client/src/app/core/repositories/assignments/assignment-repository.service.spec.ts diff --git a/client/src/app/site/assignments/services/assignment-repository.service.ts b/client/src/app/core/repositories/assignments/assignment-repository.service.ts similarity index 82% rename from client/src/app/site/assignments/services/assignment-repository.service.ts rename to client/src/app/core/repositories/assignments/assignment-repository.service.ts index 4a2131fd5..87e64d09c 100644 --- a/client/src/app/site/assignments/services/assignment-repository.service.ts +++ b/client/src/app/core/repositories/assignments/assignment-repository.service.ts @@ -1,13 +1,13 @@ import { Injectable } from '@angular/core'; -import { ViewAssignment } from '../models/view-assignment'; +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 { BaseRepository } from '../../base/base-repository'; -import { DataStoreService } from '../../../core/services/data-store.service'; +import { BaseRepository } from '../base-repository'; +import { DataStoreService } from '../../core-services/data-store.service'; import { Identifiable } from '../../../shared/models/base/identifiable'; -import { CollectionStringModelMapperService } from '../../../core/services/collectionStringModelMapper.service'; +import { CollectionStringMapperService } from '../../core-services/collectionStringMapper.service'; /** * Repository Service for Assignments. @@ -24,7 +24,7 @@ export class AssignmentRepositoryService extends BaseRepository, protected depsModelCtors?: ModelConstructor[] ) { diff --git a/client/src/app/core/repositories/common/chatmessage-repository.service.spec.ts b/client/src/app/core/repositories/common/chatmessage-repository.service.spec.ts new file mode 100644 index 000000000..dbd9f6633 --- /dev/null +++ b/client/src/app/core/repositories/common/chatmessage-repository.service.spec.ts @@ -0,0 +1,17 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { E2EImportsModule } from 'e2e-imports.module'; +import { ChatMessageRepositoryService } from './chatmessage-repository.service'; + +describe('ChatMessageRepositoryService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [E2EImportsModule], + providers: [ChatMessageRepositoryService] + }); + }); + + it('should be created', inject([ChatMessageRepositoryService], (service: ChatMessageRepositoryService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/client/src/app/core/repositories/common/chatmessage-repository.service.ts b/client/src/app/core/repositories/common/chatmessage-repository.service.ts new file mode 100644 index 000000000..ab598a69d --- /dev/null +++ b/client/src/app/core/repositories/common/chatmessage-repository.service.ts @@ -0,0 +1,32 @@ +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 { CollectionStringMapperService } from '../../core-services/collectionStringMapper.service'; +import { ChatMessage } from 'app/shared/models/core/chat-message'; +import { ViewChatMessage } from 'app/site/common/models/view-chatmessage'; + +@Injectable({ + providedIn: 'root' +}) +export class ChatMessageRepositoryService extends BaseRepository { + public constructor(DS: DataStoreService, mapperService: CollectionStringMapperService) { + super(DS, mapperService, ChatMessage); + } + + protected createViewModel(message: ChatMessage): ViewChatMessage { + return new ViewChatMessage(message); + } + + public async create(message: ChatMessage): Promise { + throw new Error('TODO'); + } + + public async update(message: Partial, viewMessage: ViewChatMessage): Promise { + throw new Error('TODO'); + } + + public async delete(viewMessage: ViewChatMessage): Promise { + throw new Error('TODO'); + } +} diff --git a/client/src/app/site/history/services/history-repository.service.spec.ts b/client/src/app/core/repositories/history/history-repository.service.spec.ts similarity index 100% rename from client/src/app/site/history/services/history-repository.service.spec.ts rename to client/src/app/core/repositories/history/history-repository.service.spec.ts diff --git a/client/src/app/site/history/services/history-repository.service.ts b/client/src/app/core/repositories/history/history-repository.service.ts similarity index 84% rename from client/src/app/site/history/services/history-repository.service.ts rename to client/src/app/core/repositories/history/history-repository.service.ts index 36796e7ce..7de9491bd 100644 --- a/client/src/app/site/history/services/history-repository.service.ts +++ b/client/src/app/core/repositories/history/history-repository.service.ts @@ -1,14 +1,14 @@ import { Injectable } from '@angular/core'; -import { CollectionStringModelMapperService } from 'app/core/services/collectionStringModelMapper.service'; -import { DataStoreService } from 'app/core/services/data-store.service'; -import { BaseRepository } from 'app/site/base/base-repository'; +import { CollectionStringMapperService } from 'app/core/core-services/collectionStringMapper.service'; +import { DataStoreService } from 'app/core/core-services/data-store.service'; +import { BaseRepository } from 'app/core/repositories/base-repository'; 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/services/http.service'; -import { ViewHistory } from '../models/view-history'; -import { TimeTravelService } from 'app/core/services/time-travel.service'; +import { HttpService } from 'app/core/core-services/http.service'; +import { ViewHistory } from '../../../site/history/models/view-history'; +import { TimeTravelService } from 'app/core/core-services/time-travel.service'; import { BaseModel } from 'app/shared/models/base/base-model'; /** @@ -30,7 +30,7 @@ export class HistoryRepositoryService extends BaseRepository */ public constructor( DS: DataStoreService, - mapperService: CollectionStringModelMapperService, + mapperService: CollectionStringMapperService, private dataSend: DataSendService, private httpService: HttpService, private readonly lineNumbering: LinenumberingService, diff --git a/client/src/app/site/motions/services/statute-paragraph-repository.service.spec.ts b/client/src/app/core/repositories/motions/statute-paragraph-repository.service.spec.ts similarity index 100% rename from client/src/app/site/motions/services/statute-paragraph-repository.service.spec.ts rename to client/src/app/core/repositories/motions/statute-paragraph-repository.service.spec.ts diff --git a/client/src/app/site/motions/services/statute-paragraph-repository.service.ts b/client/src/app/core/repositories/motions/statute-paragraph-repository.service.ts similarity index 80% rename from client/src/app/site/motions/services/statute-paragraph-repository.service.ts rename to client/src/app/core/repositories/motions/statute-paragraph-repository.service.ts index b010f2442..2da75c95c 100644 --- a/client/src/app/site/motions/services/statute-paragraph-repository.service.ts +++ b/client/src/app/core/repositories/motions/statute-paragraph-repository.service.ts @@ -1,11 +1,12 @@ 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/base-repository'; -import { ViewStatuteParagraph } from '../models/view-statute-paragraph'; + +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 { CollectionStringModelMapperService } from '../../../core/services/collectionStringModelMapper.service'; +import { CollectionStringMapperService } from '../../core-services/collectionStringMapper.service'; /** * Repository Services for statute paragraphs @@ -29,7 +30,7 @@ export class StatuteParagraphRepositoryService extends BaseRepository { public constructor( DS: DataStoreService, - mapperService: CollectionStringModelMapperService, + mapperService: CollectionStringMapperService, private dataSend: DataSendService ) { super(DS, mapperService, Countdown); diff --git a/client/src/app/site/projector/services/projector-repository.service.spec.ts b/client/src/app/core/repositories/projector/projector-repository.service.spec.ts similarity index 100% rename from client/src/app/site/projector/services/projector-repository.service.spec.ts rename to client/src/app/core/repositories/projector/projector-repository.service.spec.ts diff --git a/client/src/app/site/projector/services/projector-repository.service.ts b/client/src/app/core/repositories/projector/projector-repository.service.ts similarity index 86% rename from client/src/app/site/projector/services/projector-repository.service.ts rename to client/src/app/core/repositories/projector/projector-repository.service.ts index dbb9661e7..60f001593 100644 --- a/client/src/app/site/projector/services/projector-repository.service.ts +++ b/client/src/app/core/repositories/projector/projector-repository.service.ts @@ -1,13 +1,13 @@ import { Injectable } from '@angular/core'; -import { BaseRepository } from '../../base/base-repository'; -import { CollectionStringModelMapperService } from '../../../core/services/collectionStringModelMapper.service'; -import { DataSendService } from '../../../core/services/data-send.service'; -import { DataStoreService } from '../../../core/services/data-store.service'; +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 '../models/view-projector'; +import { ViewProjector } from '../../../site/projector/models/view-projector'; import { Projector } from '../../../shared/models/core/projector'; -import { HttpService } from 'app/core/services/http.service'; +import { HttpService } from 'app/core/core-services/http.service'; /** * Directions for scale and scroll requests. @@ -35,7 +35,7 @@ export class ProjectorRepositoryService extends BaseRepository { - public constructor(DS: DataStoreService, mapperService: CollectionStringModelMapperService) { + public constructor(DS: DataStoreService, mapperService: CollectionStringMapperService) { super(DS, mapperService, ProjectorMessage); } diff --git a/client/src/app/site/tags/services/tag-repository.service.spec.ts b/client/src/app/core/repositories/tags/tag-repository.service.spec.ts similarity index 100% rename from client/src/app/site/tags/services/tag-repository.service.spec.ts rename to client/src/app/core/repositories/tags/tag-repository.service.spec.ts diff --git a/client/src/app/site/tags/services/tag-repository.service.ts b/client/src/app/core/repositories/tags/tag-repository.service.ts similarity index 80% rename from client/src/app/site/tags/services/tag-repository.service.ts rename to client/src/app/core/repositories/tags/tag-repository.service.ts index 4612abd18..f615e3d25 100644 --- a/client/src/app/site/tags/services/tag-repository.service.ts +++ b/client/src/app/core/repositories/tags/tag-repository.service.ts @@ -1,12 +1,12 @@ import { Injectable } from '@angular/core'; import { Tag } from '../../../shared/models/core/tag'; -import { ViewTag } from '../models/view-tag'; -import { DataSendService } from '../../../core/services/data-send.service'; -import { DataStoreService } from '../../../core/services/data-store.service'; -import { BaseRepository } from '../../base/base-repository'; +import { ViewTag } from '../../../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 { CollectionStringModelMapperService } from '../../../core/services/collectionStringModelMapper.service'; +import { CollectionStringMapperService } from '../../core-services/collectionStringMapper.service'; /** * Repository Services for Tags @@ -33,7 +33,7 @@ export class TagRepositoryService extends BaseRepository { */ public constructor( protected DS: DataStoreService, - mapperService: CollectionStringModelMapperService, + mapperService: CollectionStringMapperService, private dataSend: DataSendService ) { super(DS, mapperService, Tag); diff --git a/client/src/app/site/users/services/group-repository.service.spec.ts b/client/src/app/core/repositories/users/group-repository.service.spec.ts similarity index 100% rename from client/src/app/site/users/services/group-repository.service.spec.ts rename to client/src/app/core/repositories/users/group-repository.service.spec.ts diff --git a/client/src/app/site/users/services/group-repository.service.ts b/client/src/app/core/repositories/users/group-repository.service.ts similarity index 92% rename from client/src/app/site/users/services/group-repository.service.ts rename to client/src/app/core/repositories/users/group-repository.service.ts index 16ab7e498..c6067951e 100644 --- a/client/src/app/site/users/services/group-repository.service.ts +++ b/client/src/app/core/repositories/users/group-repository.service.ts @@ -1,13 +1,13 @@ import { Injectable } from '@angular/core'; -import { BaseRepository } from '../../base/base-repository'; -import { CollectionStringModelMapperService } from '../../../core/services/collectionStringModelMapper.service'; -import { ConstantsService } from '../../../core/services/constants.service'; -import { DataSendService } from '../../../core/services/data-send.service'; -import { DataStoreService } from '../../../core/services/data-store.service'; +import { BaseRepository } from '../base-repository'; +import { CollectionStringMapperService } from '../../core-services/collectionStringMapper.service'; +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 '../models/view-group'; +import { ViewGroup } from '../../../site/users/models/view-group'; /** * Shape of a permission @@ -48,7 +48,7 @@ export class GroupRepositoryService extends BaseRepository { */ public constructor( DS: DataStoreService, - mapperService: CollectionStringModelMapperService, + mapperService: CollectionStringMapperService, private dataSend: DataSendService, private constants: ConstantsService ) { diff --git a/client/src/app/core/repositories/users/personal-note-repository.service.spec.ts b/client/src/app/core/repositories/users/personal-note-repository.service.spec.ts new file mode 100644 index 000000000..6e4d1df80 --- /dev/null +++ b/client/src/app/core/repositories/users/personal-note-repository.service.spec.ts @@ -0,0 +1,17 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { E2EImportsModule } from '../../../../e2e-imports.module'; +import { PersonalNoteRepositoryService } from './personal-note-repository.service'; + +describe('PersonalNoteRepositoryService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [E2EImportsModule], + providers: [PersonalNoteRepositoryService] + }); + }); + + it('should be created', inject([PersonalNoteRepositoryService], (service: PersonalNoteRepositoryService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/client/src/app/core/repositories/users/personal-note-repository.service.ts b/client/src/app/core/repositories/users/personal-note-repository.service.ts new file mode 100644 index 000000000..e2aa6797e --- /dev/null +++ b/client/src/app/core/repositories/users/personal-note-repository.service.ts @@ -0,0 +1,38 @@ +import { Injectable } from '@angular/core'; + +import { DataStoreService } from '../../core-services/data-store.service'; +import { BaseRepository } from '../base-repository'; +import { CollectionStringMapperService } from '../../core-services/collectionStringMapper.service'; +import { PersonalNote } from 'app/shared/models/users/personal-note'; +import { Identifiable } from 'app/shared/models/base/identifiable'; + +/** + */ +@Injectable({ + providedIn: 'root' +}) +export class PersonalNoteRepositoryService extends BaseRepository { + /** + * @param DS The DataStore + * @param mapperService Maps collection strings to classes + */ + public constructor(protected DS: DataStoreService, mapperService: CollectionStringMapperService) { + super(DS, mapperService, PersonalNote); + } + + protected createViewModel(personalNote: PersonalNote): any { + return {}; + } + + public async create(personalNote: PersonalNote): Promise { + throw new Error('TODO'); + } + + public async update(personalNote: Partial, viewPersonalNote: any): Promise { + throw new Error('TODO'); + } + + public async delete(viewPersonalNote: any): Promise { + throw new Error('TODO'); + } +} diff --git a/client/src/app/site/users/services/user-repository.service.spec.ts b/client/src/app/core/repositories/users/user-repository.service.spec.ts similarity index 100% rename from client/src/app/site/users/services/user-repository.service.spec.ts rename to client/src/app/core/repositories/users/user-repository.service.spec.ts diff --git a/client/src/app/site/users/services/user-repository.service.ts b/client/src/app/core/repositories/users/user-repository.service.ts similarity index 95% rename from client/src/app/site/users/services/user-repository.service.ts rename to client/src/app/core/repositories/users/user-repository.service.ts index e4103153b..4acb039a8 100644 --- a/client/src/app/site/users/services/user-repository.service.ts +++ b/client/src/app/core/repositories/users/user-repository.service.ts @@ -1,15 +1,15 @@ import { Injectable } from '@angular/core'; -import { BaseRepository } from '../../base/base-repository'; -import { ViewUser } from '../models/view-user'; +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 { DataStoreService } from '../../../core/services/data-store.service'; -import { DataSendService } from '../../../core/services/data-send.service'; +import { DataStoreService } from '../../core-services/data-store.service'; +import { DataSendService } from '../../core-services/data-send.service'; import { Identifiable } from '../../../shared/models/base/identifiable'; -import { CollectionStringModelMapperService } from '../../../core/services/collectionStringModelMapper.service'; -import { ConfigService } from 'app/core/services/config.service'; -import { HttpService } from 'app/core/services/http.service'; +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'; import { TranslateService } from '@ngx-translate/core'; import { environment } from '../../../../environments/environment'; @@ -37,7 +37,7 @@ export class UserRepositoryService extends BaseRepository { */ public constructor( DS: DataStoreService, - mapperService: CollectionStringModelMapperService, + mapperService: CollectionStringMapperService, private dataSend: DataSendService, private translate: TranslateService, private httpService: HttpService, diff --git a/client/src/app/core/translate/translation-parser.ts b/client/src/app/core/translate/translation-parser.ts index f8215248c..54e98f2bd 100644 --- a/client/src/app/core/translate/translation-parser.ts +++ b/client/src/app/core/translate/translation-parser.ts @@ -1,5 +1,5 @@ import { TranslateDefaultParser, TranslateStore } from '@ngx-translate/core'; -import { ConfigService } from '../services/config.service'; +import { ConfigService } from '../ui-services/config.service'; import { Injectable } from '@angular/core'; export interface CustomTranslation { diff --git a/client/src/app/core/services/filter-list.service.spec.ts b/client/src/app/core/ui-services/base-filter-list.service.spec.ts similarity index 65% rename from client/src/app/core/services/filter-list.service.spec.ts rename to client/src/app/core/ui-services/base-filter-list.service.spec.ts index 033316b47..7884fbc21 100644 --- a/client/src/app/core/services/filter-list.service.spec.ts +++ b/client/src/app/core/ui-services/base-filter-list.service.spec.ts @@ -1,17 +1,17 @@ import { TestBed } from '@angular/core/testing'; -import { FilterListService } from './filter-list.service'; +import { BaseFilterListService } from './base-filter-list.service'; import { E2EImportsModule } from '../../../e2e-imports.module'; -describe('FilterListService', () => { +describe('BaseFilterListService', () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [E2EImportsModule], - providers: [FilterListService] + providers: [BaseFilterListService] }); }); - // TODO testing needs a BaseViewComponent + // TODO testing needs an actual service.. // it('should be created', inject([FilterListService], (service: FilterListService) => { // expect(service).toBeTruthy(); // })); diff --git a/client/src/app/core/services/filter-list.service.ts b/client/src/app/core/ui-services/base-filter-list.service.ts similarity index 98% rename from client/src/app/core/services/filter-list.service.ts rename to client/src/app/core/ui-services/base-filter-list.service.ts index 5847db210..ba82c12cf 100644 --- a/client/src/app/core/services/filter-list.service.ts +++ b/client/src/app/core/ui-services/base-filter-list.service.ts @@ -3,7 +3,7 @@ import { BehaviorSubject, Observable } from 'rxjs'; import { BaseModel } from '../../shared/models/base/base-model'; import { BaseViewModel } from '../../site/base/base-view-model'; -import { StorageService } from './storage.service'; +import { StorageService } from '../core-services/storage.service'; /** * Describes the available filters for a listView. @@ -39,7 +39,7 @@ export interface OsFilterOption { * and will receive their filtered data as observable */ -export abstract class FilterListService { +export abstract class BaseFilterListService { /** * stores the currently used raw data to be used for the filter */ diff --git a/client/src/app/core/services/base-import.service.ts b/client/src/app/core/ui-services/base-import.service.ts similarity index 100% rename from client/src/app/core/services/base-import.service.ts rename to client/src/app/core/ui-services/base-import.service.ts diff --git a/client/src/app/core/services/sort-list.service.spec.ts b/client/src/app/core/ui-services/base-sort-list.service.spec.ts similarity index 75% rename from client/src/app/core/services/sort-list.service.spec.ts rename to client/src/app/core/ui-services/base-sort-list.service.spec.ts index e3bfc9dba..12538bc04 100644 --- a/client/src/app/core/services/sort-list.service.spec.ts +++ b/client/src/app/core/ui-services/base-sort-list.service.spec.ts @@ -1,13 +1,13 @@ import { TestBed } from '@angular/core/testing'; -import { SortListService } from './sort-list.service'; +import { BaseSortListService } from './base-sort-list.service'; import { E2EImportsModule } from '../../../e2e-imports.module'; -describe('SortListService', () => { +describe('BaseSortListService', () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [E2EImportsModule], - providers: [SortListService] + providers: [BaseSortListService] }); }); diff --git a/client/src/app/core/services/sort-list.service.ts b/client/src/app/core/ui-services/base-sort-list.service.ts similarity index 98% rename from client/src/app/core/services/sort-list.service.ts rename to client/src/app/core/ui-services/base-sort-list.service.ts index af1015094..f4dd0a975 100644 --- a/client/src/app/core/services/sort-list.service.ts +++ b/client/src/app/core/ui-services/base-sort-list.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'; import { BehaviorSubject } from 'rxjs'; import { BaseViewModel } from '../../site/base/base-view-model'; import { TranslateService } from '@ngx-translate/core'; -import { StorageService } from './storage.service'; +import { StorageService } from '../core-services/storage.service'; /** * Describes the sorting columns of an associated ListView, and their state. @@ -25,7 +25,7 @@ export interface OsSortingItem { @Injectable({ providedIn: 'root' }) -export abstract class SortListService { +export abstract class BaseSortListService { /** * Observable output that submits the newly sorted data each time a sorting has been done */ diff --git a/client/src/app/core/services/choice.service.spec.ts b/client/src/app/core/ui-services/choice.service.spec.ts similarity index 100% rename from client/src/app/core/services/choice.service.spec.ts rename to client/src/app/core/ui-services/choice.service.spec.ts diff --git a/client/src/app/core/services/choice.service.ts b/client/src/app/core/ui-services/choice.service.ts similarity index 100% rename from client/src/app/core/services/choice.service.ts rename to client/src/app/core/ui-services/choice.service.ts diff --git a/client/src/app/core/services/config.service.spec.ts b/client/src/app/core/ui-services/config.service.spec.ts similarity index 100% rename from client/src/app/core/services/config.service.spec.ts rename to client/src/app/core/ui-services/config.service.spec.ts diff --git a/client/src/app/core/services/config.service.ts b/client/src/app/core/ui-services/config.service.ts similarity index 96% rename from client/src/app/core/services/config.service.ts rename to client/src/app/core/ui-services/config.service.ts index 51cbb89ac..b0aa0a9b0 100644 --- a/client/src/app/core/services/config.service.ts +++ b/client/src/app/core/ui-services/config.service.ts @@ -3,7 +3,7 @@ import { Injectable } from '@angular/core'; import { OpenSlidesComponent } from 'app/openslides.component'; import { Observable, BehaviorSubject } from 'rxjs'; import { Config } from '../../shared/models/core/config'; -import { DataStoreService } from './data-store.service'; +import { DataStoreService } from '../core-services/data-store.service'; /** * Handler for config variables. diff --git a/client/src/app/core/services/constants.service.spec.ts b/client/src/app/core/ui-services/constants.service.spec.ts similarity index 100% rename from client/src/app/core/services/constants.service.spec.ts rename to client/src/app/core/ui-services/constants.service.spec.ts diff --git a/client/src/app/core/services/constants.service.ts b/client/src/app/core/ui-services/constants.service.ts similarity index 97% rename from client/src/app/core/services/constants.service.ts rename to client/src/app/core/ui-services/constants.service.ts index 6b08ba1c9..7d7ecccad 100644 --- a/client/src/app/core/services/constants.service.ts +++ b/client/src/app/core/ui-services/constants.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@angular/core'; import { OpenSlidesComponent } from 'app/openslides.component'; -import { WebsocketService } from './websocket.service'; +import { WebsocketService } from '../core-services/websocket.service'; import { Observable, of, Subject } from 'rxjs'; /** diff --git a/client/src/app/core/services/csv-export.service.spec.ts b/client/src/app/core/ui-services/csv-export.service.spec.ts similarity index 100% rename from client/src/app/core/services/csv-export.service.spec.ts rename to client/src/app/core/ui-services/csv-export.service.spec.ts diff --git a/client/src/app/core/services/csv-export.service.ts b/client/src/app/core/ui-services/csv-export.service.ts similarity index 96% rename from client/src/app/core/services/csv-export.service.ts rename to client/src/app/core/ui-services/csv-export.service.ts index c64807161..353f8077a 100644 --- a/client/src/app/core/services/csv-export.service.ts +++ b/client/src/app/core/ui-services/csv-export.service.ts @@ -21,7 +21,7 @@ export interface CsvColumnDefinitionProperty { * @returns true, if the object is a property definition. This is also asserted for TypeScript. */ function isPropertyDefinition(obj: any): obj is CsvColumnDefinitionProperty { - return 'property' in obj; + return (>obj).property !== undefined; } /** @@ -41,7 +41,8 @@ interface CsvColumnDefinitionMap { * @returns true, if the objct is a map definition. This is also asserted for TypeScript. */ function isMapDefinition(obj: any): obj is CsvColumnDefinitionMap { - return 'map' in obj; + const columnDefinitionMap = >obj; + return columnDefinitionMap.map !== undefined && columnDefinitionMap.label !== undefined; } /** diff --git a/client/src/app/site/motions/services/diff.service.spec.ts b/client/src/app/core/ui-services/diff.service.spec.ts similarity index 100% rename from client/src/app/site/motions/services/diff.service.spec.ts rename to client/src/app/core/ui-services/diff.service.spec.ts diff --git a/client/src/app/site/motions/services/diff.service.ts b/client/src/app/core/ui-services/diff.service.ts similarity index 99% rename from client/src/app/site/motions/services/diff.service.ts rename to client/src/app/core/ui-services/diff.service.ts index 945dd571d..b19a59e59 100644 --- a/client/src/app/site/motions/services/diff.service.ts +++ b/client/src/app/core/ui-services/diff.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@angular/core'; import { LinenumberingService } from './linenumbering.service'; -import { ViewMotion } from '../models/view-motion'; -import { ViewUnifiedChange } from '../models/view-unified-change'; +import { ViewMotion } from '../../site/motions/models/view-motion'; +import { ViewUnifiedChange } from '../../site/motions/models/view-unified-change'; const ELEMENT_NODE = 1; const TEXT_NODE = 3; diff --git a/client/src/app/core/services/duration.service.spec.ts b/client/src/app/core/ui-services/duration.service.spec.ts similarity index 100% rename from client/src/app/core/services/duration.service.spec.ts rename to client/src/app/core/ui-services/duration.service.spec.ts diff --git a/client/src/app/core/services/duration.service.ts b/client/src/app/core/ui-services/duration.service.ts similarity index 100% rename from client/src/app/core/services/duration.service.ts rename to client/src/app/core/ui-services/duration.service.ts diff --git a/client/src/app/core/services/file-export.service.spec.ts b/client/src/app/core/ui-services/file-export.service.spec.ts similarity index 100% rename from client/src/app/core/services/file-export.service.spec.ts rename to client/src/app/core/ui-services/file-export.service.spec.ts diff --git a/client/src/app/core/services/file-export.service.ts b/client/src/app/core/ui-services/file-export.service.ts similarity index 100% rename from client/src/app/core/services/file-export.service.ts rename to client/src/app/core/ui-services/file-export.service.ts diff --git a/client/src/app/core/services/html-to-pdf.service.spec.ts b/client/src/app/core/ui-services/html-to-pdf.service.spec.ts similarity index 100% rename from client/src/app/core/services/html-to-pdf.service.spec.ts rename to client/src/app/core/ui-services/html-to-pdf.service.spec.ts diff --git a/client/src/app/core/services/html-to-pdf.service.ts b/client/src/app/core/ui-services/html-to-pdf.service.ts similarity index 100% rename from client/src/app/core/services/html-to-pdf.service.ts rename to client/src/app/core/ui-services/html-to-pdf.service.ts diff --git a/client/src/app/site/motions/services/linenumbering.service.spec.ts b/client/src/app/core/ui-services/linenumbering.service.spec.ts similarity index 100% rename from client/src/app/site/motions/services/linenumbering.service.spec.ts rename to client/src/app/core/ui-services/linenumbering.service.spec.ts diff --git a/client/src/app/site/motions/services/linenumbering.service.ts b/client/src/app/core/ui-services/linenumbering.service.ts similarity index 100% rename from client/src/app/site/motions/services/linenumbering.service.ts rename to client/src/app/core/ui-services/linenumbering.service.ts diff --git a/client/src/app/core/services/login-data.service.spec.ts b/client/src/app/core/ui-services/login-data.service.spec.ts similarity index 100% rename from client/src/app/core/services/login-data.service.spec.ts rename to client/src/app/core/ui-services/login-data.service.spec.ts diff --git a/client/src/app/core/services/login-data.service.ts b/client/src/app/core/ui-services/login-data.service.ts similarity index 99% rename from client/src/app/core/services/login-data.service.ts rename to client/src/app/core/ui-services/login-data.service.ts index c8900840b..7771f852c 100644 --- a/client/src/app/core/services/login-data.service.ts +++ b/client/src/app/core/ui-services/login-data.service.ts @@ -1,8 +1,9 @@ import { Injectable } from '@angular/core'; +import { BehaviorSubject, Observable } from 'rxjs'; + import { OpenSlidesComponent } from 'app/openslides.component'; import { ConfigService } from './config.service'; -import { BehaviorSubject, Observable } from 'rxjs'; /** * This service holds the privacy policy and the legal notice, so they are available diff --git a/client/src/app/site/mediafiles/services/media-manage.service.spec.ts b/client/src/app/core/ui-services/media-manage.service.spec.ts similarity index 100% rename from client/src/app/site/mediafiles/services/media-manage.service.spec.ts rename to client/src/app/core/ui-services/media-manage.service.spec.ts diff --git a/client/src/app/site/mediafiles/services/media-manage.service.ts b/client/src/app/core/ui-services/media-manage.service.ts similarity index 93% rename from client/src/app/site/mediafiles/services/media-manage.service.ts rename to client/src/app/core/ui-services/media-manage.service.ts index fd3b7368b..e5122c386 100644 --- a/client/src/app/site/mediafiles/services/media-manage.service.ts +++ b/client/src/app/core/ui-services/media-manage.service.ts @@ -1,8 +1,10 @@ import { Injectable } from '@angular/core'; -import { HttpService } from 'app/core/services/http.service'; -import { ConfigService } from 'app/core/services/config.service'; + import { Observable } from 'rxjs'; -import { ViewMediafile } from '../models/view-mediafile'; + +import { HttpService } from 'app/core/core-services/http.service'; +import { ConfigService } from 'app/core/ui-services/config.service'; +import { ViewMediafile } from '../../site/mediafiles/models/view-mediafile'; /** * The structure of an image config object diff --git a/client/src/app/core/services/pdf-document.service.spec.ts b/client/src/app/core/ui-services/pdf-document.service.spec.ts similarity index 85% rename from client/src/app/core/services/pdf-document.service.spec.ts rename to client/src/app/core/ui-services/pdf-document.service.spec.ts index f383a4995..d420e6449 100644 --- a/client/src/app/core/services/pdf-document.service.spec.ts +++ b/client/src/app/core/ui-services/pdf-document.service.spec.ts @@ -1,6 +1,6 @@ import { TestBed } from '@angular/core/testing'; -import { PdfDocumentService } from './pdf-document.service'; +import { PdfDocumentService } from '../ui-services/pdf-document.service'; import { E2EImportsModule } from 'e2e-imports.module'; describe('PdfDocumentService', () => { diff --git a/client/src/app/core/services/pdf-document.service.ts b/client/src/app/core/ui-services/pdf-document.service.ts similarity index 99% rename from client/src/app/core/services/pdf-document.service.ts rename to client/src/app/core/ui-services/pdf-document.service.ts index a195f7248..4c0a6baf0 100644 --- a/client/src/app/core/services/pdf-document.service.ts +++ b/client/src/app/core/ui-services/pdf-document.service.ts @@ -6,7 +6,7 @@ import pdfMake from 'pdfmake/build/pdfmake'; import { TranslateService } from '@ngx-translate/core'; import { ConfigService } from './config.service'; -import { HttpService } from './http.service'; +import { HttpService } from '../core-services/http.service'; /** * Provides the general document structure for PDF documents, such as page margins, header, footer and styles. diff --git a/client/src/app/site/motions/services/personal-note.service.spec.ts b/client/src/app/core/ui-services/personal-note.service.spec.ts similarity index 100% rename from client/src/app/site/motions/services/personal-note.service.spec.ts rename to client/src/app/core/ui-services/personal-note.service.spec.ts diff --git a/client/src/app/site/motions/services/personal-note.service.ts b/client/src/app/core/ui-services/personal-note.service.ts similarity index 93% rename from client/src/app/site/motions/services/personal-note.service.ts rename to client/src/app/core/ui-services/personal-note.service.ts index f7857fa8b..9e162e3b6 100644 --- a/client/src/app/site/motions/services/personal-note.service.ts +++ b/client/src/app/core/ui-services/personal-note.service.ts @@ -1,10 +1,10 @@ import { Injectable } from '@angular/core'; import { Observable, BehaviorSubject } from 'rxjs'; -import { DataStoreService } from '../../../core/services/data-store.service'; -import { OperatorService } from '../../../core/services/operator.service'; -import { PersonalNote, PersonalNoteObject, PersonalNoteContent } from '../../../shared/models/users/personal-note'; -import { BaseModel } from '../../../shared/models/base/base-model'; -import { HttpService } from '../../../core/services/http.service'; +import { DataStoreService } from '../core-services/data-store.service'; +import { OperatorService } from '../core-services/operator.service'; +import { PersonalNote, PersonalNoteObject, PersonalNoteContent } from '../../shared/models/users/personal-note'; +import { BaseModel } from '../../shared/models/base/base-model'; +import { HttpService } from '../core-services/http.service'; /** * All subjects are organized by the collection string and id of the model. diff --git a/client/src/app/core/poll.service.spec.ts b/client/src/app/core/ui-services/poll.service.spec.ts similarity index 100% rename from client/src/app/core/poll.service.spec.ts rename to client/src/app/core/ui-services/poll.service.spec.ts diff --git a/client/src/app/core/poll.service.ts b/client/src/app/core/ui-services/poll.service.ts similarity index 100% rename from client/src/app/core/poll.service.ts rename to client/src/app/core/ui-services/poll.service.ts diff --git a/client/src/app/core/services/projection-dilog.service.spec.ts b/client/src/app/core/ui-services/projection-dialog.service.spec.ts similarity index 100% rename from client/src/app/core/services/projection-dilog.service.spec.ts rename to client/src/app/core/ui-services/projection-dialog.service.spec.ts diff --git a/client/src/app/core/services/projection-dialog.service.ts b/client/src/app/core/ui-services/projection-dialog.service.ts similarity index 96% rename from client/src/app/core/services/projection-dialog.service.ts rename to client/src/app/core/ui-services/projection-dialog.service.ts index 33a6448e2..afe147133 100644 --- a/client/src/app/core/services/projection-dialog.service.ts +++ b/client/src/app/core/ui-services/projection-dialog.service.ts @@ -7,7 +7,7 @@ import { ProjectionDialogComponent, ProjectionDialogReturnType } from 'app/shared/components/projection-dialog/projection-dialog.component'; -import { ProjectorService } from './projector.service'; +import { ProjectorService } from '../core-services/projector.service'; /** * Manages the projection dialog. Projects the result of the user's choice. diff --git a/client/src/app/core/services/prompt.service.spec.ts b/client/src/app/core/ui-services/prompt.service.spec.ts similarity index 100% rename from client/src/app/core/services/prompt.service.spec.ts rename to client/src/app/core/ui-services/prompt.service.spec.ts diff --git a/client/src/app/core/services/prompt.service.ts b/client/src/app/core/ui-services/prompt.service.ts similarity index 100% rename from client/src/app/core/services/prompt.service.ts rename to client/src/app/core/ui-services/prompt.service.ts diff --git a/client/src/app/core/services/search.service.spec.ts b/client/src/app/core/ui-services/search.service.spec.ts similarity index 100% rename from client/src/app/core/services/search.service.spec.ts rename to client/src/app/core/ui-services/search.service.spec.ts diff --git a/client/src/app/core/services/search.service.ts b/client/src/app/core/ui-services/search.service.ts similarity index 98% rename from client/src/app/core/services/search.service.ts rename to client/src/app/core/ui-services/search.service.ts index 51cd37e2c..201e7abff 100644 --- a/client/src/app/core/services/search.service.ts +++ b/client/src/app/core/ui-services/search.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; import { BaseModel } from '../../shared/models/base/base-model'; -import { DataStoreService } from './data-store.service'; +import { DataStoreService } from '../core-services/data-store.service'; import { Searchable } from '../../shared/models/base/searchable'; /** diff --git a/client/src/app/core/services/theme.service.spec.ts b/client/src/app/core/ui-services/theme.service.spec.ts similarity index 100% rename from client/src/app/core/services/theme.service.spec.ts rename to client/src/app/core/ui-services/theme.service.spec.ts diff --git a/client/src/app/core/services/theme.service.ts b/client/src/app/core/ui-services/theme.service.ts similarity index 100% rename from client/src/app/core/services/theme.service.ts rename to client/src/app/core/ui-services/theme.service.ts diff --git a/client/src/app/core/services/tree.service.spec.ts b/client/src/app/core/ui-services/tree.service.spec.ts similarity index 100% rename from client/src/app/core/services/tree.service.spec.ts rename to client/src/app/core/ui-services/tree.service.spec.ts diff --git a/client/src/app/core/services/tree.service.ts b/client/src/app/core/ui-services/tree.service.ts similarity index 100% rename from client/src/app/core/services/tree.service.ts rename to client/src/app/core/ui-services/tree.service.ts diff --git a/client/src/app/core/services/viewport.service.spec.ts b/client/src/app/core/ui-services/viewport.service.spec.ts similarity index 100% rename from client/src/app/core/services/viewport.service.spec.ts rename to client/src/app/core/ui-services/viewport.service.spec.ts diff --git a/client/src/app/core/services/viewport.service.ts b/client/src/app/core/ui-services/viewport.service.ts similarity index 100% rename from client/src/app/core/services/viewport.service.ts rename to client/src/app/core/ui-services/viewport.service.ts diff --git a/client/src/app/fullscreen-projector/fullscreen-projector-routing.module.ts b/client/src/app/fullscreen-projector/fullscreen-projector-routing.module.ts new file mode 100644 index 000000000..c98334b5d --- /dev/null +++ b/client/src/app/fullscreen-projector/fullscreen-projector-routing.module.ts @@ -0,0 +1,21 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { FullscreenProjectorComponent } from './fullscreen-projector/fullscreen-projector.component'; + +const routes: Routes = [ + { + path: '', + component: FullscreenProjectorComponent + }, + { + path: ':id', + component: FullscreenProjectorComponent + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class FullscreenProjectorRoutingModule {} diff --git a/client/src/app/fullscreen-projector/fullscreen-projector.module.ts b/client/src/app/fullscreen-projector/fullscreen-projector.module.ts new file mode 100644 index 000000000..08c16c4d8 --- /dev/null +++ b/client/src/app/fullscreen-projector/fullscreen-projector.module.ts @@ -0,0 +1,12 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { SharedModule } from 'app/shared/shared.module'; +import { FullscreenProjectorComponent } from './fullscreen-projector/fullscreen-projector.component'; +import { FullscreenProjectorRoutingModule } from './fullscreen-projector-routing.module'; + +@NgModule({ + imports: [CommonModule, FullscreenProjectorRoutingModule, SharedModule], + declarations: [FullscreenProjectorComponent] +}) +export class FullscreenProjectorModule {} diff --git a/client/src/app/site/projector/components/fullscreen-projector/fullscreen-projector.component.html b/client/src/app/fullscreen-projector/fullscreen-projector/fullscreen-projector.component.html similarity index 100% rename from client/src/app/site/projector/components/fullscreen-projector/fullscreen-projector.component.html rename to client/src/app/fullscreen-projector/fullscreen-projector/fullscreen-projector.component.html diff --git a/client/src/app/site/projector/components/fullscreen-projector/fullscreen-projector.component.scss b/client/src/app/fullscreen-projector/fullscreen-projector/fullscreen-projector.component.scss similarity index 100% rename from client/src/app/site/projector/components/fullscreen-projector/fullscreen-projector.component.scss rename to client/src/app/fullscreen-projector/fullscreen-projector/fullscreen-projector.component.scss diff --git a/client/src/app/site/projector/components/fullscreen-projector/fullscreen-projector.component.spec.ts b/client/src/app/fullscreen-projector/fullscreen-projector/fullscreen-projector.component.spec.ts similarity index 84% rename from client/src/app/site/projector/components/fullscreen-projector/fullscreen-projector.component.spec.ts rename to client/src/app/fullscreen-projector/fullscreen-projector/fullscreen-projector.component.spec.ts index 35ac50f2f..43f5d174f 100644 --- a/client/src/app/site/projector/components/fullscreen-projector/fullscreen-projector.component.spec.ts +++ b/client/src/app/fullscreen-projector/fullscreen-projector/fullscreen-projector.component.spec.ts @@ -2,7 +2,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { FullscreenProjectorComponent } from './fullscreen-projector.component'; import { E2EImportsModule } from 'e2e-imports.module'; -import { ProjectorModule } from '../../projector.module'; +import { FullscreenProjectorModule } from '../fullscreen-projector.module'; describe('FullscreenProjectorComponent', () => { let component: FullscreenProjectorComponent; @@ -10,7 +10,7 @@ describe('FullscreenProjectorComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [E2EImportsModule, ProjectorModule] + imports: [E2EImportsModule, FullscreenProjectorModule] }).compileComponents(); })); diff --git a/client/src/app/site/projector/components/fullscreen-projector/fullscreen-projector.component.ts b/client/src/app/fullscreen-projector/fullscreen-projector/fullscreen-projector.component.ts similarity index 94% rename from client/src/app/site/projector/components/fullscreen-projector/fullscreen-projector.component.ts rename to client/src/app/fullscreen-projector/fullscreen-projector/fullscreen-projector.component.ts index 41e5582df..f186080c0 100644 --- a/client/src/app/site/projector/components/fullscreen-projector/fullscreen-projector.component.ts +++ b/client/src/app/fullscreen-projector/fullscreen-projector/fullscreen-projector.component.ts @@ -1,13 +1,13 @@ import { Component, OnInit, ViewChild, ElementRef } from '@angular/core'; -import { AuthService } from 'app/core/services/auth.service'; +import { AuthService } from 'app/core/core-services/auth.service'; import { ActivatedRoute } from '@angular/router'; import { Subject } from 'rxjs'; -import { OperatorService } from 'app/core/services/operator.service'; +import { OperatorService } from 'app/core/core-services/operator.service'; import { ViewProjector } from 'app/site/projector/models/view-projector'; import { Size } from 'app/site/projector/size'; -import { ProjectorRepositoryService } from 'app/site/projector/services/projector-repository.service'; +import { ProjectorRepositoryService } from 'app/core/repositories/projector/projector-repository.service'; /** * The fullscreen projector. Bootstraps OpenSlides, gets the requested projector, 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 d844c3cf0..2b1f09e51 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/services/operator.service'; -import { NotifyService, NotifyResponse } from '../../../core/services/notify.service'; +import { OperatorService } from '../../../core/core-services/operator.service'; +import { NotifyService, NotifyResponse } from '../../../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 1a2c05a2e..dff57c184 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/services/viewport.service'; -import { MainMenuService } from '../../../core/services/main-menu.service'; +import { ViewportService } from '../../../core/ui-services/viewport.service'; +import { MainMenuService } from '../../../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 2592e844e..1bf036a86 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/services/login-data.service'; +import { LoginDataService } from '../../../core/ui-services/login-data.service'; import { environment } from 'environments/environment'; -import { HttpService } from '../../../core/services/http.service'; +import { HttpService } from '../../../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 9ac58d43c..8c47a74bb 100644 --- a/client/src/app/shared/components/logo/logo.component.ts +++ b/client/src/app/shared/components/logo/logo.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit, Input } from '@angular/core'; -import { MediaManageService } from '../../../site/mediafiles/services/media-manage.service'; -import { ConfigService } from 'app/core/services/config.service'; +import { MediaManageService } from '../../../core/ui-services/media-manage.service'; +import { ConfigService } from 'app/core/ui-services/config.service'; /** * Reusable Logo component for Apps. 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 585324a6b..044eae4ea 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/services/viewport.service'; +import { ViewportService } from '../../../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 3dce88d3e..920a8cb53 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,5 +1,5 @@ import { Output, Component, OnInit, EventEmitter, Input } from '@angular/core'; -import { FilterListService, OsFilterOption } from '../../../../core/services/filter-list.service'; +import { BaseFilterListService, OsFilterOption } from '../../../../core/ui-services/base-filter-list.service'; /** * Component for selecting the filters in a filter menu. @@ -30,7 +30,7 @@ export class FilterMenuComponent implements OnInit { * the FilterListService; unsure about how to get them in any other way. */ @Input() - public service: FilterListService; // TODO (M, V) + public service: BaseFilterListService; // TODO (M, V) /** * Constructor. Does nothing. 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 bbb0c55b5..0630792a4 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,7 @@ 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 { SortListService } from '../../../../core/services/sort-list.service'; +import { BaseSortListService } from '../../../../core/ui-services/base-sort-list.service'; /** * A bottom sheet used for setting a list's sorting, used by {@link SortFilterBarComponent} @@ -25,7 +25,7 @@ export class OsSortBottomSheetComponent implements OnIn * @param sheetRef */ public constructor( - @Inject(MAT_BOTTOM_SHEET_DATA) public data: SortListService, + @Inject(MAT_BOTTOM_SHEET_DATA) public data: BaseSortListService, private sheetRef: MatBottomSheetRef ) {} 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 c97e869a6..13ea304fd 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 @@ -6,9 +6,9 @@ import { TranslateService } from '@ngx-translate/core'; import { BaseViewModel } from '../../../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/services/sort-list.service'; -import { SortListService } from '../../../core/services/sort-list.service'; -import { ViewportService } from '../../../core/services/viewport.service'; +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'; /** * Reusable bar for list views, offering sorting and filter options. @@ -34,7 +34,7 @@ export class OsSortFilterBarComponent { * The currently active sorting service for the list view */ @Input() - public sortService: SortListService; + public sortService: BaseSortListService; /** Optional number to overwrite the display of the filtered data count, if any additional filters * (e.g. the angular search bar) are applied on top of these filters 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 23da96abe..59eec83ad 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/services/login-data.service'; +import { LoginDataService } from '../../../core/ui-services/login-data.service'; /** * Shared component to hold the content of the Privacy Policy. diff --git a/client/src/app/shared/components/projection-dialog/projection-dialog.component.ts b/client/src/app/shared/components/projection-dialog/projection-dialog.component.ts index 740d21548..4997d665e 100644 --- a/client/src/app/shared/components/projection-dialog/projection-dialog.component.ts +++ b/client/src/app/shared/components/projection-dialog/projection-dialog.component.ts @@ -2,9 +2,9 @@ import { Component, Inject } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; import { ProjectorElementBuildDeskriptor } from 'app/site/base/projectable'; -import { DataStoreService } from 'app/core/services/data-store.service'; +import { DataStoreService } from 'app/core/core-services/data-store.service'; import { Projector, IdentifiableProjectorElement } from 'app/shared/models/core/projector'; -import { ProjectorService } from 'app/core/services/projector.service'; +import { ProjectorService } from 'app/core/core-services/projector.service'; import { SlideOption, isSlideDecisionOption, diff --git a/client/src/app/shared/components/projector-button/projector-button.component.ts b/client/src/app/shared/components/projector-button/projector-button.component.ts index ac6c678de..f8fb91fcb 100644 --- a/client/src/app/shared/components/projector-button/projector-button.component.ts +++ b/client/src/app/shared/components/projector-button/projector-button.component.ts @@ -6,8 +6,8 @@ import { isProjectable, isProjectorElementBuildDeskriptor } from 'app/site/base/projectable'; -import { ProjectionDialogService } from 'app/core/services/projection-dialog.service'; -import { ProjectorService } from '../../../core/services/projector.service'; +import { ProjectorService } from 'app/core/core-services/projector.service'; +import { ProjectionDialogService } from 'app/core/ui-services/projection-dialog.service'; /** * The projector button to project something on the projector. diff --git a/client/src/app/site/projector/components/projector/projector.component.html b/client/src/app/shared/components/projector/projector.component.html similarity index 100% rename from client/src/app/site/projector/components/projector/projector.component.html rename to client/src/app/shared/components/projector/projector.component.html diff --git a/client/src/app/site/projector/components/projector/projector.component.scss b/client/src/app/shared/components/projector/projector.component.scss similarity index 100% rename from client/src/app/site/projector/components/projector/projector.component.scss rename to client/src/app/shared/components/projector/projector.component.scss diff --git a/client/src/app/site/projector/components/projector/projector.component.spec.ts b/client/src/app/shared/components/projector/projector.component.spec.ts similarity index 77% rename from client/src/app/site/projector/components/projector/projector.component.spec.ts rename to client/src/app/shared/components/projector/projector.component.spec.ts index 44c707690..008a073fb 100644 --- a/client/src/app/site/projector/components/projector/projector.component.spec.ts +++ b/client/src/app/shared/components/projector/projector.component.spec.ts @@ -1,8 +1,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { ProjectorComponent } from './projector.component'; -import { E2EImportsModule } from '../../../../../e2e-imports.module'; -import { ProjectorModule } from '../../projector.module'; +import { E2EImportsModule } from 'e2e-imports.module'; describe('ProjectorComponent', () => { let component: ProjectorComponent; @@ -10,7 +9,7 @@ describe('ProjectorComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [E2EImportsModule, ProjectorModule] + imports: [E2EImportsModule] }).compileComponents(); })); diff --git a/client/src/app/site/projector/components/projector/projector.component.ts b/client/src/app/shared/components/projector/projector.component.ts similarity index 95% rename from client/src/app/site/projector/components/projector/projector.component.ts rename to client/src/app/shared/components/projector/projector.component.ts index 1993b3beb..5b8c06206 100644 --- a/client/src/app/site/projector/components/projector/projector.component.ts +++ b/client/src/app/shared/components/projector/projector.component.ts @@ -1,14 +1,15 @@ import { Component, Input, ViewChild, ElementRef, OnDestroy } from '@angular/core'; import { Title } from '@angular/platform-browser'; + import { TranslateService } from '@ngx-translate/core'; +import { Subscription, Subject } from 'rxjs'; import { BaseComponent } from 'app/base.component'; -import { ViewProjector } from '../../models/view-projector'; -import { ProjectorDataService, SlideData } from '../../services/projector-data.service'; -import { Subscription, Subject } from 'rxjs'; -import { ProjectorRepositoryService } from '../../services/projector-repository.service'; -import { ConfigService } from 'app/core/services/config.service'; -import { Size } from '../../size'; +import { ConfigService } from 'app/core/ui-services/config.service'; +import { ViewProjector } from 'app/site/projector/models/view-projector'; +import { Size } from 'app/site/projector/size'; +import { SlideData, ProjectorDataService } from 'app/site/projector/services/projector-data.service'; +import { ProjectorRepositoryService } from 'app/core/repositories/projector/projector-repository.service'; /** * THE projector. Cares about scaling and the right size and resolution. diff --git a/client/src/app/site/projector/components/slide-container/slide-container.component.html b/client/src/app/shared/components/slide-container/slide-container.component.html similarity index 100% rename from client/src/app/site/projector/components/slide-container/slide-container.component.html rename to client/src/app/shared/components/slide-container/slide-container.component.html diff --git a/client/src/app/site/projector/components/slide-container/slide-container.component.scss b/client/src/app/shared/components/slide-container/slide-container.component.scss similarity index 100% rename from client/src/app/site/projector/components/slide-container/slide-container.component.scss rename to client/src/app/shared/components/slide-container/slide-container.component.scss diff --git a/client/src/app/site/projector/components/slide-container/slide-container.component.spec.ts b/client/src/app/shared/components/slide-container/slide-container.component.spec.ts similarity index 78% rename from client/src/app/site/projector/components/slide-container/slide-container.component.spec.ts rename to client/src/app/shared/components/slide-container/slide-container.component.spec.ts index b0d6deb5e..7b85179ad 100644 --- a/client/src/app/site/projector/components/slide-container/slide-container.component.spec.ts +++ b/client/src/app/shared/components/slide-container/slide-container.component.spec.ts @@ -1,8 +1,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { SlideContainerComponent } from './slide-container.component'; -import { E2EImportsModule } from '../../../../../e2e-imports.module'; -import { ProjectorModule } from '../../projector.module'; +import { E2EImportsModule } from 'e2e-imports.module'; describe('SlideContainerComponent', () => { let component: SlideContainerComponent; @@ -10,7 +9,7 @@ describe('SlideContainerComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [E2EImportsModule, ProjectorModule] + imports: [E2EImportsModule] }).compileComponents(); })); diff --git a/client/src/app/site/projector/components/slide-container/slide-container.component.ts b/client/src/app/shared/components/slide-container/slide-container.component.ts similarity index 96% rename from client/src/app/site/projector/components/slide-container/slide-container.component.ts rename to client/src/app/shared/components/slide-container/slide-container.component.ts index c8653e53f..43759d1d1 100644 --- a/client/src/app/site/projector/components/slide-container/slide-container.component.ts +++ b/client/src/app/shared/components/slide-container/slide-container.component.ts @@ -3,11 +3,11 @@ import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; import { BaseComponent } from 'app/base.component'; -import { SlideData } from '../../services/projector-data.service'; import { SlideManager } from 'app/slides/services/slide-manager.service'; import { BaseSlideComponent } from 'app/slides/base-slide-component'; import { SlideOptions } from 'app/slides/slide-manifest'; -import { ConfigService } from 'app/core/services/config.service'; +import { ConfigService } from 'app/core/ui-services/config.service'; +import { SlideData } from 'app/site/projector/services/projector-data.service'; /** * Container for one slide. Cares about the position (scale, scroll) in the projector, diff --git a/client/src/app/shared/components/sorting-tree/sorting-tree.component.ts b/client/src/app/shared/components/sorting-tree/sorting-tree.component.ts index 3af6db442..65821fccd 100644 --- a/client/src/app/shared/components/sorting-tree/sorting-tree.component.ts +++ b/client/src/app/shared/components/sorting-tree/sorting-tree.component.ts @@ -7,7 +7,7 @@ import { Subscription, Observable } from 'rxjs'; import { Identifiable } from 'app/shared/models/base/identifiable'; import { Displayable } from 'app/shared/models/base/displayable'; -import { OSTreeNode, TreeService } from 'app/core/services/tree.service'; +import { OSTreeNode, TreeService } from 'app/core/ui-services/tree.service'; /** * The data representation for the sort event. diff --git a/client/src/app/shared/directives/perms.directive.ts b/client/src/app/shared/directives/perms.directive.ts index cea8c0504..e9623e870 100644 --- a/client/src/app/shared/directives/perms.directive.ts +++ b/client/src/app/shared/directives/perms.directive.ts @@ -2,7 +2,7 @@ import { Directive, Input, TemplateRef, ViewContainerRef, OnDestroy, OnInit } fr import { Subscription } from 'rxjs'; -import { OperatorService, Permission } from 'app/core/services/operator.service'; +import { OperatorService, Permission } from 'app/core/core-services/operator.service'; import { OpenSlidesComponent } from 'app/openslides.component'; /** diff --git a/client/src/app/shared/models/assignments/assignment.ts b/client/src/app/shared/models/assignments/assignment.ts index b8af1bb17..7d9d54d62 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/services/search.service'; +import { SearchRepresentation } from '../../../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 e1e7c9d96..9cd714764 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/services/search.service'; +import { SearchRepresentation } from '../../../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 7d4fc6bb2..dce5d2d8f 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/services/search.service'; +import { SearchRepresentation } from '../../../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 36f0dcad3..19e4fde2c 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/services/search.service'; +import { SearchRepresentation } from '../../../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 49b2b3256..9206faf93 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/services/search.service'; +import { SearchRepresentation } from '../../../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 0b9177db1..3f3c585ba 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/services/search.service'; +import { SearchRepresentation } from '../../../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 dabbf32e5..d3bfa11e5 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/services/search.service'; +import { SearchRepresentation } from '../../../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 33b03fad7..75ab7f29a 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/services/search.service'; +import { SearchRepresentation } from '../../../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 c79f027aa..b23c20ffc 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/services/search.service'; +import { SearchRepresentation } from '../../../core/ui-services/search.service'; import { BaseModel } from '../base/base-model'; /** diff --git a/client/src/app/shared/shared.module.ts b/client/src/app/shared/shared.module.ts index 238dc8276..77e1d9b60 100644 --- a/client/src/app/shared/shared.module.ts +++ b/client/src/app/shared/shared.module.ts @@ -79,6 +79,8 @@ import { ProjectionDialogComponent } from './components/projection-dialog/projec import { ResizedDirective } from './directives/resized.directive'; import { MetaTextBlockComponent } from './components/meta-text-block/meta-text-block.component'; import { OpenSlidesTranslateModule } from '../core/translate/openslides-translate-module'; +import { ProjectorComponent } from './components/projector/projector.component'; +import { SlideContainerComponent } from './components/slide-container/slide-container.component'; /** * Share Module for all "dumb" components and pipes. @@ -192,7 +194,9 @@ import { OpenSlidesTranslateModule } from '../core/translate/openslides-translat ProjectorButtonComponent, ProjectionDialogComponent, ResizedDirective, - MetaTextBlockComponent + MetaTextBlockComponent, + ProjectorComponent, + SlideContainerComponent ], declarations: [ PermsDirective, @@ -216,7 +220,9 @@ import { OpenSlidesTranslateModule } from '../core/translate/openslides-translat ProjectorButtonComponent, ProjectionDialogComponent, ResizedDirective, - MetaTextBlockComponent + MetaTextBlockComponent, + ProjectorComponent, + SlideContainerComponent ], providers: [ { provide: DateAdapter, useClass: OpenSlidesDateAdapter }, diff --git a/client/src/app/site/agenda/agenda-import.service.ts b/client/src/app/site/agenda/agenda-import.service.ts index e05833a8e..027956820 100644 --- a/client/src/app/site/agenda/agenda-import.service.ts +++ b/client/src/app/site/agenda/agenda-import.service.ts @@ -3,11 +3,11 @@ import { MatSnackBar } from '@angular/material'; import { Papa } from 'ngx-papaparse'; import { TranslateService } from '@ngx-translate/core'; -import { BaseImportService, NewEntry } from 'app/core/services/base-import.service'; +import { BaseImportService, NewEntry } from 'app/core/ui-services/base-import.service'; import { CreateTopic } from './models/create-topic'; -import { DurationService } from 'app/core/services/duration.service'; +import { DurationService } from 'app/core/ui-services/duration.service'; import { itemVisibilityChoices } from 'app/shared/models/agenda/item'; -import { TopicRepositoryService } from './services/topic-repository.service'; +import { TopicRepositoryService } from '../../core/repositories/agenda/topic-repository.service'; import { ViewCreateTopic } from './models/view-create-topic'; @Injectable({ diff --git a/client/src/app/site/agenda/agenda.config.ts b/client/src/app/site/agenda/agenda.config.ts index 097f027ba..43dfac779 100644 --- a/client/src/app/site/agenda/agenda.config.ts +++ b/client/src/app/site/agenda/agenda.config.ts @@ -1,12 +1,14 @@ -import { AppConfig } from '../base/app-config'; +import { AppConfig } from '../../core/app-config'; import { Item } from '../../shared/models/agenda/item'; import { Topic } from '../../shared/models/topics/topic'; +import { AgendaRepositoryService } from 'app/core/repositories/agenda/agenda-repository.service'; +import { TopicRepositoryService } from 'app/core/repositories/agenda/topic-repository.service'; export const AgendaAppConfig: AppConfig = { name: 'agenda', models: [ - { collectionString: 'agenda/item', model: Item }, - { collectionString: 'topics/topic', model: Topic, searchOrder: 1 } + { collectionString: 'agenda/item', model: Item, repository: AgendaRepositoryService }, + { collectionString: 'topics/topic', model: Topic, searchOrder: 1, repository: TopicRepositoryService } ], mainMenuEntries: [ { diff --git a/client/src/app/site/agenda/components/agenda-import-list/agenda-import-list.component.ts b/client/src/app/site/agenda/components/agenda-import-list/agenda-import-list.component.ts index d679a22f8..8714a7950 100644 --- a/client/src/app/site/agenda/components/agenda-import-list/agenda-import-list.component.ts +++ b/client/src/app/site/agenda/components/agenda-import-list/agenda-import-list.component.ts @@ -6,8 +6,8 @@ import { TranslateService } from '@ngx-translate/core'; import { AgendaImportService } from '../../agenda-import.service'; import { BaseImportListComponent } from 'app/site/base/base-import-list'; -import { DurationService } from 'app/core/services/duration.service'; -import { FileExportService } from 'app/core/services/file-export.service'; +import { DurationService } from 'app/core/ui-services/duration.service'; +import { FileExportService } from 'app/core/ui-services/file-export.service'; import { itemVisibilityChoices } from 'app/shared/models/agenda/item'; import { ViewCreateTopic } from '../../models/view-create-topic'; diff --git a/client/src/app/site/agenda/components/agenda-list/agenda-list.component.ts b/client/src/app/site/agenda/components/agenda-list/agenda-list.component.ts index 451083400..62122c3e5 100644 --- a/client/src/app/site/agenda/components/agenda-list/agenda-list.component.ts +++ b/client/src/app/site/agenda/components/agenda-list/agenda-list.component.ts @@ -5,18 +5,18 @@ import { MatSnackBar, MatDialog } from '@angular/material'; import { TranslateService } from '@ngx-translate/core'; import { AgendaFilterListService } from '../../services/agenda-filter-list.service'; -import { AgendaRepositoryService } from '../../services/agenda-repository.service'; +import { AgendaRepositoryService } from '../../../../core/repositories/agenda/agenda-repository.service'; import { ListViewBaseComponent } from 'app/site/base/list-view-base'; -import { PromptService } from '../../../../core/services/prompt.service'; +import { PromptService } from '../../../../core/ui-services/prompt.service'; import { ViewItem } from '../../models/view-item'; import { AgendaCsvExportService } from '../../services/agenda-csv-export.service'; import { AgendaPdfService } from '../../services/agenda-pdf.service'; -import { ConfigService } from 'app/core/services/config.service'; -import { DurationService } from 'app/core/services/duration.service'; +import { ConfigService } from 'app/core/ui-services/config.service'; +import { DurationService } from 'app/core/ui-services/duration.service'; import { ItemInfoDialogComponent } from '../item-info-dialog/item-info-dialog.component'; -import { PdfDocumentService } from 'app/core/services/pdf-document.service'; -import { ViewportService } from 'app/core/services/viewport.service'; +import { PdfDocumentService } from 'app/core/ui-services/pdf-document.service'; +import { ViewportService } from 'app/core/ui-services/viewport.service'; /** * List view for the agenda. diff --git a/client/src/app/site/agenda/components/agenda-sort/agenda-sort.component.ts b/client/src/app/site/agenda/components/agenda-sort/agenda-sort.component.ts index 0daa51c41..ce2bfab01 100644 --- a/client/src/app/site/agenda/components/agenda-sort/agenda-sort.component.ts +++ b/client/src/app/site/agenda/components/agenda-sort/agenda-sort.component.ts @@ -5,7 +5,7 @@ import { MatSnackBar } from '@angular/material'; import { TranslateService } from '@ngx-translate/core'; import { Observable } from 'rxjs'; -import { AgendaRepositoryService } from '../../services/agenda-repository.service'; +import { AgendaRepositoryService } from '../../../../core/repositories/agenda/agenda-repository.service'; import { BaseViewComponent } from '../../../base/base-view'; import { OSTreeSortEvent } from 'app/shared/components/sorting-tree/sorting-tree.component'; import { ViewItem } from '../../models/view-item'; diff --git a/client/src/app/site/agenda/components/item-info-dialog/item-info-dialog.component.ts b/client/src/app/site/agenda/components/item-info-dialog/item-info-dialog.component.ts index 76a73bba3..48091e7f1 100644 --- a/client/src/app/site/agenda/components/item-info-dialog/item-info-dialog.component.ts +++ b/client/src/app/site/agenda/components/item-info-dialog/item-info-dialog.component.ts @@ -4,7 +4,7 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; import { ViewItem } from '../../models/view-item'; import { itemVisibilityChoices } from 'app/shared/models/agenda/item'; -import { DurationService } from 'app/core/services/duration.service'; +import { DurationService } from 'app/core/ui-services/duration.service'; /** * Dialog component to change agenda item details diff --git a/client/src/app/site/agenda/components/speaker-list/speaker-list.component.ts b/client/src/app/site/agenda/components/speaker-list/speaker-list.component.ts index c5b0c57a2..6dac056b0 100644 --- a/client/src/app/site/agenda/components/speaker-list/speaker-list.component.ts +++ b/client/src/app/site/agenda/components/speaker-list/speaker-list.component.ts @@ -6,15 +6,15 @@ import { BehaviorSubject } from 'rxjs'; import { SpeakerState } from 'app/shared/models/agenda/speaker'; import { User } from 'app/shared/models/users/user'; import { ViewSpeaker } from '../../models/view-speaker'; -import { DataStoreService } from 'app/core/services/data-store.service'; -import { AgendaRepositoryService } from '../../services/agenda-repository.service'; +import { DataStoreService } from 'app/core/core-services/data-store.service'; +import { AgendaRepositoryService } from '../../../../core/repositories/agenda/agenda-repository.service'; import { ViewItem } from '../../models/view-item'; -import { OperatorService } from 'app/core/services/operator.service'; +import { OperatorService } from 'app/core/core-services/operator.service'; import { BaseViewComponent } from 'app/site/base/base-view'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; import { MatSnackBar } from '@angular/material'; -import { PromptService } from 'app/core/services/prompt.service'; +import { PromptService } from 'app/core/ui-services/prompt.service'; /** * The list of speakers for agenda items. diff --git a/client/src/app/site/agenda/components/topic-detail/topic-detail.component.ts b/client/src/app/site/agenda/components/topic-detail/topic-detail.component.ts index d0a591f91..ae329129b 100644 --- a/client/src/app/site/agenda/components/topic-detail/topic-detail.component.ts +++ b/client/src/app/site/agenda/components/topic-detail/topic-detail.component.ts @@ -7,12 +7,12 @@ import { MatSnackBar } from '@angular/material'; import { TranslateService } from '@ngx-translate/core'; import { BaseViewComponent } from 'app/site/base/base-view'; -import { PromptService } from 'app/core/services/prompt.service'; -import { TopicRepositoryService } from '../../services/topic-repository.service'; +import { PromptService } from 'app/core/ui-services/prompt.service'; +import { TopicRepositoryService } from '../../../../core/repositories/agenda/topic-repository.service'; import { ViewTopic } from '../../models/view-topic'; -import { OperatorService } from 'app/core/services/operator.service'; +import { OperatorService } from 'app/core/core-services/operator.service'; import { BehaviorSubject } from 'rxjs'; -import { DataStoreService } from 'app/core/services/data-store.service'; +import { DataStoreService } from 'app/core/core-services/data-store.service'; import { Mediafile } from 'app/shared/models/mediafiles/mediafile'; import { Item, itemVisibilityChoices } from 'app/shared/models/agenda/item'; import { CreateTopic } from '../../models/create-topic'; diff --git a/client/src/app/site/agenda/services/agenda-csv-export.service.ts b/client/src/app/site/agenda/services/agenda-csv-export.service.ts index f9eb6eaff..417d7e49e 100644 --- a/client/src/app/site/agenda/services/agenda-csv-export.service.ts +++ b/client/src/app/site/agenda/services/agenda-csv-export.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; -import { CsvExportService } from 'app/core/services/csv-export.service'; +import { CsvExportService } from 'app/core/ui-services/csv-export.service'; import { ViewItem } from '../models/view-item'; /** 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 ce49e6a86..8df8d6f3b 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,15 +1,15 @@ import { Injectable } from '@angular/core'; -import { FilterListService, OsFilter, OsFilterOption } from '../../../core/services/filter-list.service'; +import { BaseFilterListService, OsFilter, OsFilterOption } from '../../../core/ui-services/base-filter-list.service'; import { Item, itemVisibilityChoices } from '../../../shared/models/agenda/item'; import { ViewItem } from '../models/view-item'; -import { StorageService } from 'app/core/services/storage.service'; -import { AgendaRepositoryService } from './agenda-repository.service'; +import { StorageService } from 'app/core/core-services/storage.service'; +import { AgendaRepositoryService } from '../../../core/repositories/agenda/agenda-repository.service'; @Injectable({ providedIn: 'root' }) -export class AgendaFilterListService extends FilterListService { +export class AgendaFilterListService extends BaseFilterListService { protected name = 'Agenda'; public filterOptions: OsFilter[] = []; diff --git a/client/src/app/site/agenda/services/agenda-pdf.service.ts b/client/src/app/site/agenda/services/agenda-pdf.service.ts index b1fc5e57c..8fc6e0458 100644 --- a/client/src/app/site/agenda/services/agenda-pdf.service.ts +++ b/client/src/app/site/agenda/services/agenda-pdf.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; -import { TreeService, OSTreeNode } from 'app/core/services/tree.service'; +import { TreeService, OSTreeNode } from 'app/core/ui-services/tree.service'; import { ViewItem } from '../models/view-item'; /** 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 d76590bf1..5b0b5c3a0 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 '../services/assignment-repository.service'; +import { AssignmentRepositoryService } from '../../../core/repositories/assignments/assignment-repository.service'; import { ListViewBaseComponent } from '../../base/list-view-base'; -import { PromptService } from '../../../core/services/prompt.service'; +import { PromptService } from '../../../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/assignments.config.ts b/client/src/app/site/assignments/assignments.config.ts index 12a0e672d..08f48105d 100644 --- a/client/src/app/site/assignments/assignments.config.ts +++ b/client/src/app/site/assignments/assignments.config.ts @@ -1,9 +1,17 @@ -import { AppConfig } from '../base/app-config'; +import { AppConfig } from '../../core/app-config'; import { Assignment } from '../../shared/models/assignments/assignment'; +import { AssignmentRepositoryService } from 'app/core/repositories/assignments/assignment-repository.service'; export const AssignmentsAppConfig: AppConfig = { name: 'assignments', - models: [{ collectionString: 'assignments/assignment', model: Assignment, searchOrder: 3 }], + models: [ + { + collectionString: 'assignments/assignment', + model: Assignment, + searchOrder: 3, + repository: AssignmentRepositoryService + } + ], mainMenuEntries: [ { route: '/assignments', 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 acb5fb114..e99433d02 100644 --- a/client/src/app/site/assignments/services/assignment-filter.service.ts +++ b/client/src/app/site/assignments/services/assignment-filter.service.ts @@ -1,15 +1,15 @@ import { Injectable } from '@angular/core'; -import { AssignmentRepositoryService } from './assignment-repository.service'; +import { AssignmentRepositoryService } from '../../../core/repositories/assignments/assignment-repository.service'; import { Assignment, assignmentPhase } from '../../../shared/models/assignments/assignment'; -import { FilterListService, OsFilter, OsFilterOption } from '../../../core/services/filter-list.service'; -import { StorageService } from 'app/core/services/storage.service'; +import { BaseFilterListService, OsFilter, OsFilterOption } from '../../../core/ui-services/base-filter-list.service'; +import { StorageService } from 'app/core/core-services/storage.service'; import { ViewAssignment } from '../models/view-assignment'; @Injectable({ providedIn: 'root' }) -export class AssignmentFilterListService extends FilterListService { +export class AssignmentFilterListService extends BaseFilterListService { protected name = 'Assignment'; public filterOptions: OsFilter[]; 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 46b5c2bbb..abe038070 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,11 +1,11 @@ import { Injectable } from '@angular/core'; -import { SortListService, OsSortingDefinition } from '../../../core/services/sort-list.service'; +import { BaseSortListService, OsSortingDefinition } from '../../../core/ui-services/base-sort-list.service'; import { ViewAssignment } from '../models/view-assignment'; @Injectable({ providedIn: 'root' }) -export class AssignmentSortListService extends SortListService { +export class AssignmentSortListService extends BaseSortListService { public sortOptions: OsSortingDefinition = { sortProperty: 'assignment', sortAscending: true, diff --git a/client/src/app/site/base/app-config.ts b/client/src/app/site/base/app-config.ts deleted file mode 100644 index 81a8653f9..000000000 --- a/client/src/app/site/base/app-config.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { ModelConstructor, BaseModel } from '../../shared/models/base/base-model'; -import { MainMenuEntry } from '../../core/services/main-menu.service'; -import { Searchable } from '../../shared/models/base/searchable'; - -export interface ModelEntry { - collectionString: string; - model: ModelConstructor; -} - -export interface SearchableModelEntry { - collectionString: string; - model: new (...args: any[]) => BaseModel & Searchable; - searchOrder: number; -} - -/** - * The configuration of an app. - */ -export interface AppConfig { - /** - * The name. - */ - name: string; - - /** - * All models, that should be registered. - */ - models?: (ModelEntry | SearchableModelEntry)[]; - - /** - * Main menu entries. - */ - mainMenuEntries?: MainMenuEntry[]; -} diff --git a/client/src/app/site/base/base-import-list.ts b/client/src/app/site/base/base-import-list.ts index 7a448917d..7d5df79c6 100644 --- a/client/src/app/site/base/base-import-list.ts +++ b/client/src/app/site/base/base-import-list.ts @@ -3,7 +3,7 @@ import { ViewChild, OnInit } from '@angular/core'; import { BaseViewComponent } from './base-view'; import { BaseViewModel } from './base-view-model'; -import { NewEntry, ValueLabelCombination, BaseImportService } from 'app/core/services/base-import.service'; +import { NewEntry, ValueLabelCombination, BaseImportService } from 'app/core/ui-services/base-import.service'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; diff --git a/client/src/app/site/common/common-routing.module.ts b/client/src/app/site/common/common-routing.module.ts index 7134e9e48..91eadfc70 100644 --- a/client/src/app/site/common/common-routing.module.ts +++ b/client/src/app/site/common/common-routing.module.ts @@ -4,8 +4,6 @@ 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 { CountdownListComponent } from './components/countdown-list/countdown-list.component'; -import { ProjectorMessageListComponent } from './components/projectormessage-list/projectormessage-list.component'; const routes: Routes = [ { @@ -23,14 +21,6 @@ const routes: Routes = [ { path: 'search', component: SearchComponent - }, - { - path: 'countdowns', - component: CountdownListComponent - }, - { - path: 'messages', - component: ProjectorMessageListComponent } ]; diff --git a/client/src/app/site/common/common.config.ts b/client/src/app/site/common/common.config.ts index 0fadab14c..58444ffcd 100644 --- a/client/src/app/site/common/common.config.ts +++ b/client/src/app/site/common/common.config.ts @@ -1,13 +1,10 @@ -import { AppConfig } from '../base/app-config'; +import { AppConfig } from '../../core/app-config'; import { ChatMessage } from '../../shared/models/core/chat-message'; -import { Tag } from '../../shared/models/core/tag'; +import { ChatMessageRepositoryService } from 'app/core/repositories/common/chatmessage-repository.service'; export const CommonAppConfig: AppConfig = { name: 'common', - models: [ - { collectionString: 'core/chat-message', model: ChatMessage }, - { collectionString: 'core/tag', model: Tag } - ], + models: [{ collectionString: 'core/chat-message', model: ChatMessage, repository: ChatMessageRepositoryService }], mainMenuEntries: [ { route: '/', diff --git a/client/src/app/site/common/common.module.ts b/client/src/app/site/common/common.module.ts index 7f0399b1a..48e0e2203 100644 --- a/client/src/app/site/common/common.module.ts +++ b/client/src/app/site/common/common.module.ts @@ -7,20 +7,11 @@ 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 './services/countdown-repository.service'; -import { CountdownListComponent } from './components/countdown-list/countdown-list.component'; -import { ProjectorMessageListComponent } from './components/projectormessage-list/projectormessage-list.component'; +import { CountdownRepositoryService } from '../../core/repositories/projector/countdown-repository.service'; @NgModule({ providers: [CountdownRepositoryService], imports: [AngularCommonModule, CommonRoutingModule, SharedModule], - declarations: [ - PrivacyPolicyComponent, - StartComponent, - LegalNoticeComponent, - SearchComponent, - CountdownListComponent, - ProjectorMessageListComponent - ] + declarations: [PrivacyPolicyComponent, StartComponent, LegalNoticeComponent, SearchComponent] }) export class CommonModule {} diff --git a/client/src/app/site/common/components/search/search.component.ts b/client/src/app/site/common/components/search/search.component.ts index 320403518..ec53c305e 100644 --- a/client/src/app/site/common/components/search/search.component.ts +++ b/client/src/app/site/common/components/search/search.component.ts @@ -8,8 +8,8 @@ import { Subject } from 'rxjs'; import { auditTime, debounceTime } from 'rxjs/operators'; import { TranslateService } from '@ngx-translate/core'; -import { DataStoreService } from 'app/core/services/data-store.service'; -import { SearchService, SearchModel, SearchResult } from 'app/core/services/search.service'; +import { DataStoreService } from 'app/core/core-services/data-store.service'; +import { SearchService, SearchModel, SearchResult } from 'app/core/ui-services/search.service'; import { BaseViewComponent } from '../../../base/base-view'; type SearchModelEnabled = SearchModel & { enabled: boolean }; 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 c65ff9d10..faab7e2dd 100644 --- a/client/src/app/site/common/components/start/start.component.ts +++ b/client/src/app/site/common/components/start/start.component.ts @@ -6,7 +6,7 @@ import { TranslateService } from '@ngx-translate/core'; // showcase // for testing the DS and BaseModel import { Config } from '../../../../shared/models/core/config'; -import { DataStoreService } from '../../../../core/services/data-store.service'; +import { DataStoreService } from '../../../../core/core-services/data-store.service'; @Component({ selector: 'os-start', diff --git a/client/src/app/site/common/models/view-chatmessage.ts b/client/src/app/site/common/models/view-chatmessage.ts new file mode 100644 index 000000000..d4b1591c6 --- /dev/null +++ b/client/src/app/site/common/models/view-chatmessage.ts @@ -0,0 +1,31 @@ +import { ChatMessage } from 'app/shared/models/core/chat-message'; +import { BaseViewModel } from 'app/site/base/base-view-model'; + +export class ViewChatMessage extends BaseViewModel { + private _message: ChatMessage; + + public get chatmessage(): ChatMessage { + return this._message ? this._message : null; + } + + public get id(): number { + return this.chatmessage ? this.chatmessage.id : null; + } + + public get message(): string { + return this.chatmessage ? this.chatmessage.message : null; + } + + public constructor(message?: ChatMessage) { + super(); + this._message = message; + } + + public getTitle(): string { + return 'Chatmessage'; + } + + public updateValues(message: ChatMessage): void { + console.log('Update message TODO with vals:', message); + } +} diff --git a/client/src/app/site/config/config.config.ts b/client/src/app/site/config/config.config.ts index ca6d7cbf9..35edb2eab 100644 --- a/client/src/app/site/config/config.config.ts +++ b/client/src/app/site/config/config.config.ts @@ -1,9 +1,10 @@ -import { AppConfig } from '../base/app-config'; +import { AppConfig } from '../../core/app-config'; import { Config } from '../../shared/models/core/config'; +import { ConfigRepositoryService } from './services/config-repository.service'; export const ConfigAppConfig: AppConfig = { name: 'settings', - models: [{ collectionString: 'core/config', model: Config }], + models: [{ collectionString: 'core/config', model: Config, repository: ConfigRepositoryService }], mainMenuEntries: [ { route: '/settings', 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 fd0461f6c..ada2f65bf 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 '../../base/base-repository'; +import { BaseRepository } from '../../../core/repositories/base-repository'; import { ViewConfig } from '../models/view-config'; import { Config } from '../../../shared/models/core/config'; import { Observable, BehaviorSubject } from 'rxjs'; -import { DataStoreService } from '../../../core/services/data-store.service'; -import { ConstantsService } from '../../../core/services/constants.service'; -import { HttpService } from '../../../core/services/http.service'; +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 { CollectionStringModelMapperService } from '../../../core/services/collectionStringModelMapper.service'; +import { CollectionStringMapperService } from '../../../core/core-services/collectionStringMapper.service'; /** * Holds a single config item. @@ -94,7 +94,7 @@ export class ConfigRepositoryService extends BaseRepository */ public constructor( DS: DataStoreService, - mapperService: CollectionStringModelMapperService, + mapperService: CollectionStringMapperService, private constantsService: ConstantsService, private http: HttpService ) { diff --git a/client/src/app/site/history/components/history-list/history-list.component.ts b/client/src/app/site/history/components/history-list/history-list.component.ts index df6fb03f9..677315446 100644 --- a/client/src/app/site/history/components/history-list/history-list.component.ts +++ b/client/src/app/site/history/components/history-list/history-list.component.ts @@ -6,7 +6,7 @@ import { Subject } from 'rxjs'; import { TranslateService } from '@ngx-translate/core'; import { ListViewBaseComponent } from 'app/site/base/list-view-base'; -import { HistoryRepositoryService } from '../../services/history-repository.service'; +import { HistoryRepositoryService } from '../../../../core/repositories/history/history-repository.service'; import { ViewHistory } from '../../models/view-history'; /** diff --git a/client/src/app/site/history/history.config.ts b/client/src/app/site/history/history.config.ts index 657b2afa4..c802ef518 100644 --- a/client/src/app/site/history/history.config.ts +++ b/client/src/app/site/history/history.config.ts @@ -1,5 +1,6 @@ -import { AppConfig } from '../base/app-config'; +import { AppConfig } from '../../core/app-config'; import { History } from 'app/shared/models/core/history'; +import { HistoryRepositoryService } from 'app/core/repositories/history/history-repository.service'; /** * Config object for history. @@ -7,7 +8,7 @@ import { History } from 'app/shared/models/core/history'; */ export const HistoryAppConfig: AppConfig = { name: 'history', - models: [{ collectionString: 'core/history', model: History }], + models: [{ collectionString: 'core/history', model: History, repository: HistoryRepositoryService }], mainMenuEntries: [ { route: '/history', 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 5c540fcce..b0203a62b 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 @@ -2,15 +2,15 @@ import { Component, OnInit } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; import { BaseComponent } from 'app/base.component'; -import { AuthService } from 'app/core/services/auth.service'; -import { OperatorService } from 'app/core/services/operator.service'; +import { AuthService } from 'app/core/core-services/auth.service'; +import { OperatorService } from 'app/core/core-services/operator.service'; import { FormGroup, Validators, FormBuilder } from '@angular/forms'; import { TranslateService } from '@ngx-translate/core'; import { environment } from 'environments/environment'; -import { OpenSlidesService } from '../../../../core/services/openslides.service'; -import { LoginDataService } from '../../../../core/services/login-data.service'; +import { OpenSlidesService } from '../../../../core/core-services/openslides.service'; +import { LoginDataService } from '../../../../core/ui-services/login-data.service'; import { ParentErrorStateMatcher } from '../../../../shared/parent-error-state-matcher'; -import { HttpService } from '../../../../core/services/http.service'; +import { HttpService } from '../../../../core/core-services/http.service'; /** * Login mask component. diff --git a/client/src/app/site/mediafiles/components/media-upload/media-upload.component.ts b/client/src/app/site/mediafiles/components/media-upload/media-upload.component.ts index 95fc03ba8..8e933e1df 100644 --- a/client/src/app/site/mediafiles/components/media-upload/media-upload.component.ts +++ b/client/src/app/site/mediafiles/components/media-upload/media-upload.component.ts @@ -7,8 +7,8 @@ import { UploadEvent, FileSystemFileEntry } from 'ngx-file-drop'; import { TranslateService } from '@ngx-translate/core'; import { BaseViewComponent } from 'app/site/base/base-view'; -import { OperatorService } from 'app/core/services/operator.service'; -import { MediafileRepositoryService } from '../../services/mediafile-repository.service'; +import { OperatorService } from 'app/core/core-services/operator.service'; +import { MediafileRepositoryService } from '../../../../core/repositories/mediafiles/mediafile-repository.service'; /** * To hold the structure of files to upload diff --git a/client/src/app/site/mediafiles/components/mediafile-list/mediafile-list.component.ts b/client/src/app/site/mediafiles/components/mediafile-list/mediafile-list.component.ts index 81cbea14a..1c69da1b9 100644 --- a/client/src/app/site/mediafiles/components/mediafile-list/mediafile-list.component.ts +++ b/client/src/app/site/mediafiles/components/mediafile-list/mediafile-list.component.ts @@ -8,13 +8,13 @@ import { TranslateService } from '@ngx-translate/core'; import { ListViewBaseComponent } from '../../../base/list-view-base'; import { ViewMediafile } from '../../models/view-mediafile'; -import { MediafileRepositoryService } from '../../services/mediafile-repository.service'; -import { MediaManageService } from '../../services/media-manage.service'; -import { PromptService } from 'app/core/services/prompt.service'; +import { MediafileRepositoryService } from '../../../../core/repositories/mediafiles/mediafile-repository.service'; +import { MediaManageService } from '../../../../core/ui-services/media-manage.service'; +import { PromptService } from 'app/core/ui-services/prompt.service'; import { Mediafile } from 'app/shared/models/mediafiles/mediafile'; import { MediafileFilterListService } from '../../services/mediafile-filter.service'; import { MediafilesSortListService } from '../../services/mediafiles-sort-list.service'; -import { ViewportService } from 'app/core/services/viewport.service'; +import { ViewportService } from 'app/core/ui-services/viewport.service'; /** * Lists all the uploaded files. diff --git a/client/src/app/site/mediafiles/mediafile.config.ts b/client/src/app/site/mediafiles/mediafile.config.ts index 30e985dc1..694b14701 100644 --- a/client/src/app/site/mediafiles/mediafile.config.ts +++ b/client/src/app/site/mediafiles/mediafile.config.ts @@ -1,9 +1,17 @@ -import { AppConfig } from '../base/app-config'; +import { AppConfig } from '../../core/app-config'; import { Mediafile } from '../../shared/models/mediafiles/mediafile'; +import { MediafileRepositoryService } from 'app/core/repositories/mediafiles/mediafile-repository.service'; export const MediafileAppConfig: AppConfig = { name: 'mediafiles', - models: [{ collectionString: 'mediafiles/mediafile', model: Mediafile, searchOrder: 5 }], + models: [ + { + collectionString: 'mediafiles/mediafile', + model: Mediafile, + searchOrder: 5, + repository: MediafileRepositoryService + } + ], mainMenuEntries: [ { route: '/mediafiles', 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 7f93e6c54..3f596cc21 100644 --- a/client/src/app/site/mediafiles/services/mediafile-filter.service.ts +++ b/client/src/app/site/mediafiles/services/mediafile-filter.service.ts @@ -1,15 +1,15 @@ import { Injectable } from '@angular/core'; -import { FilterListService, OsFilter } from '../../../core/services/filter-list.service'; +import { BaseFilterListService, OsFilter } from '../../../core/ui-services/base-filter-list.service'; import { Mediafile } from '../../../shared/models/mediafiles/mediafile'; import { ViewMediafile } from '../models/view-mediafile'; -import { StorageService } from 'app/core/services/storage.service'; -import { MediafileRepositoryService } from './mediafile-repository.service'; +import { StorageService } from 'app/core/core-services/storage.service'; +import { MediafileRepositoryService } from '../../../core/repositories/mediafiles/mediafile-repository.service'; @Injectable({ providedIn: 'root' }) -export class MediafileFilterListService extends FilterListService { +export class MediafileFilterListService extends BaseFilterListService { protected name = 'Mediafile'; public filterOptions: OsFilter[] = [ 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 07a34a078..44c6f904e 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,11 +1,11 @@ import { Injectable } from '@angular/core'; -import { SortListService, OsSortingDefinition } from '../../../core/services/sort-list.service'; +import { BaseSortListService, OsSortingDefinition } from '../../../core/ui-services/base-sort-list.service'; import { ViewMediafile } from '../models/view-mediafile'; @Injectable({ providedIn: 'root' }) -export class MediafilesSortListService extends SortListService { +export class MediafilesSortListService extends BaseSortListService { public sortOptions: OsSortingDefinition = { sortProperty: 'title', sortAscending: true, diff --git a/client/src/app/site/motions/components/amendment-create-wizard/amendment-create-wizard.component.ts b/client/src/app/site/motions/components/amendment-create-wizard/amendment-create-wizard.component.ts index caadfe4e8..8ddcfb8d9 100644 --- a/client/src/app/site/motions/components/amendment-create-wizard/amendment-create-wizard.component.ts +++ b/client/src/app/site/motions/components/amendment-create-wizard/amendment-create-wizard.component.ts @@ -5,11 +5,11 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { MatSnackBar } from '@angular/material'; import { TranslateService } from '@ngx-translate/core'; -import { ConfigService } from '../../../../core/services/config.service'; +import { ConfigService } from '../../../../core/ui-services/config.service'; -import { MotionRepositoryService } from '../../services/motion-repository.service'; +import { MotionRepositoryService } from '../../../../core/repositories/motions/motion-repository.service'; import { ViewMotion } from '../../models/view-motion'; -import { LinenumberingService } from '../../services/linenumbering.service'; +import { LinenumberingService } from '../../../../core/ui-services/linenumbering.service'; import { BaseViewComponent } from '../../../base/base-view'; import { CreateMotion } from '../../models/create-motion'; diff --git a/client/src/app/site/motions/components/call-list/call-list.component.ts b/client/src/app/site/motions/components/call-list/call-list.component.ts index 0013b3499..c340c8f47 100644 --- a/client/src/app/site/motions/components/call-list/call-list.component.ts +++ b/client/src/app/site/motions/components/call-list/call-list.component.ts @@ -6,7 +6,7 @@ import { TranslateService } from '@ngx-translate/core'; import { Observable } from 'rxjs'; import { BaseViewComponent } from '../../../base/base-view'; -import { MotionRepositoryService } from '../../services/motion-repository.service'; +import { MotionRepositoryService } from '../../../../core/repositories/motions/motion-repository.service'; import { ViewMotion } from '../../models/view-motion'; import { OSTreeSortEvent } from 'app/shared/components/sorting-tree/sorting-tree.component'; import { MotionCsvExportService } from '../../services/motion-csv-export.service'; 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 10e585f13..08008c709 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 @@ -4,12 +4,12 @@ import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; import { Category } from '../../../../shared/models/motions/category'; -import { CategoryRepositoryService } from '../../services/category-repository.service'; +import { CategoryRepositoryService } from '../../../../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 { PromptService } from 'app/core/services/prompt.service'; +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/manage-submitters/manage-submitters.component.ts b/client/src/app/site/motions/components/manage-submitters/manage-submitters.component.ts index 7ead1666c..42cd85c34 100644 --- a/client/src/app/site/motions/components/manage-submitters/manage-submitters.component.ts +++ b/client/src/app/site/motions/components/manage-submitters/manage-submitters.component.ts @@ -7,9 +7,9 @@ import { TranslateService } from '@ngx-translate/core'; import { BehaviorSubject, Observable } from 'rxjs'; import { BaseViewComponent } from 'app/site/base/base-view'; -import { DataStoreService } from 'app/core/services/data-store.service'; +import { DataStoreService } from 'app/core/core-services/data-store.service'; import { LocalPermissionsService } from '../../services/local-permissions.service'; -import { MotionRepositoryService } from '../../services/motion-repository.service'; +import { MotionRepositoryService } from '../../../../core/repositories/motions/motion-repository.service'; import { User } from 'app/shared/models/users/user'; import { ViewMotion } from '../../models/view-motion'; diff --git a/client/src/app/site/motions/components/motion-block-detail/motion-block-detail.component.ts b/client/src/app/site/motions/components/motion-block-detail/motion-block-detail.component.ts index bb6cc47f4..344fa8190 100644 --- a/client/src/app/site/motions/components/motion-block-detail/motion-block-detail.component.ts +++ b/client/src/app/site/motions/components/motion-block-detail/motion-block-detail.component.ts @@ -8,10 +8,10 @@ import { TranslateService } from '@ngx-translate/core'; import { ListViewBaseComponent } from 'app/site/base/list-view-base'; import { MotionBlock } from 'app/shared/models/motions/motion-block'; -import { MotionBlockRepositoryService } from '../../services/motion-block-repository.service'; -import { MotionRepositoryService } from '../../services/motion-repository.service'; +import { MotionBlockRepositoryService } from '../../../../core/repositories/motions/motion-block-repository.service'; +import { MotionRepositoryService } from '../../../../core/repositories/motions/motion-repository.service'; import { ViewMotionBlock } from '../../models/view-motion-block'; -import { PromptService } from 'app/core/services/prompt.service'; +import { PromptService } from 'app/core/ui-services/prompt.service'; import { ViewMotion } from '../../models/view-motion'; /** diff --git a/client/src/app/site/motions/components/motion-block-list/motion-block-list.component.ts b/client/src/app/site/motions/components/motion-block-list/motion-block-list.component.ts index bf2b7cb46..1572f3687 100644 --- a/client/src/app/site/motions/components/motion-block-list/motion-block-list.component.ts +++ b/client/src/app/site/motions/components/motion-block-list/motion-block-list.component.ts @@ -10,11 +10,11 @@ import { TranslateService } from '@ngx-translate/core'; import { ListViewBaseComponent } from 'app/site/base/list-view-base'; import { MotionBlock } from 'app/shared/models/motions/motion-block'; import { Item, itemVisibilityChoices } from 'app/shared/models/agenda/item'; -import { DataStoreService } from 'app/core/services/data-store.service'; -import { MotionBlockRepositoryService } from '../../services/motion-block-repository.service'; +import { DataStoreService } from 'app/core/core-services/data-store.service'; +import { MotionBlockRepositoryService } from '../../../../core/repositories/motions/motion-block-repository.service'; import { ViewMotionBlock } from '../../models/view-motion-block'; -import { AgendaRepositoryService } from 'app/site/agenda/services/agenda-repository.service'; -import { PromptService } from '../../../../core/services/prompt.service'; +import { AgendaRepositoryService } from 'app/core/repositories/agenda/agenda-repository.service'; +import { PromptService } from '../../../../core/ui-services/prompt.service'; /** * Table for the motion blocks diff --git a/client/src/app/site/motions/components/motion-change-recommendation/motion-change-recommendation.component.spec.ts b/client/src/app/site/motions/components/motion-change-recommendation/motion-change-recommendation.component.spec.ts index e31dd8113..1572dba08 100644 --- a/client/src/app/site/motions/components/motion-change-recommendation/motion-change-recommendation.component.spec.ts +++ b/client/src/app/site/motions/components/motion-change-recommendation/motion-change-recommendation.component.spec.ts @@ -6,7 +6,7 @@ import { } from './motion-change-recommendation.component'; import { E2EImportsModule } from '../../../../../e2e-imports.module'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; -import { ModificationType } from '../../services/diff.service'; +import { ModificationType } from '../../../../core/ui-services/diff.service'; import { ViewChangeReco } from '../../models/view-change-reco'; describe('MotionChangeRecommendationComponent', () => { diff --git a/client/src/app/site/motions/components/motion-change-recommendation/motion-change-recommendation.component.ts b/client/src/app/site/motions/components/motion-change-recommendation/motion-change-recommendation.component.ts index 6afc79f85..ce45e8b2e 100644 --- a/client/src/app/site/motions/components/motion-change-recommendation/motion-change-recommendation.component.ts +++ b/client/src/app/site/motions/components/motion-change-recommendation/motion-change-recommendation.component.ts @@ -1,8 +1,8 @@ import { Component, Inject } from '@angular/core'; -import { LineRange, ModificationType } from '../../services/diff.service'; +import { LineRange, ModificationType } from '../../../../core/ui-services/diff.service'; import { MAT_DIALOG_DATA, MatDialogRef, MatSnackBar } from '@angular/material'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { ChangeRecommendationRepositoryService } from '../../services/change-recommendation-repository.service'; +import { ChangeRecommendationRepositoryService } from '../../../../core/repositories/motions/change-recommendation-repository.service'; import { ViewChangeReco } from '../../models/view-change-reco'; import { BaseViewComponent } from '../../../base/base-view'; import { Title } from '@angular/platform-browser'; 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 ea6200426..53ef29e80 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 { FormGroup, FormBuilder, Validators } from '@angular/forms'; import { MotionCommentSection } from '../../../../shared/models/motions/motion-comment-section'; import { ViewMotionCommentSection } from '../../models/view-motion-comment-section'; -import { MotionCommentSectionRepositoryService } from '../../services/motion-comment-section-repository.service'; -import { PromptService } from '../../../../core/services/prompt.service'; +import { MotionCommentSectionRepositoryService } from '../../../../core/repositories/motions/motion-comment-section-repository.service'; +import { PromptService } from '../../../../core/ui-services/prompt.service'; import { BehaviorSubject } from 'rxjs'; import { Group } from '../../../../shared/models/users/group'; -import { DataStoreService } from '../../../../core/services/data-store.service'; +import { DataStoreService } from '../../../../core/core-services/data-store.service'; import { BaseViewComponent } from '../../../base/base-view'; import { MatSnackBar } from '@angular/material'; 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 f241d3a65..24e8d16d7 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,9 +5,9 @@ import { FormGroup, FormBuilder } from '@angular/forms'; import { TranslateService } from '@ngx-translate/core'; import { BaseViewComponent } from '../../../../site/base/base-view'; -import { MotionCommentSectionRepositoryService } from '../../services/motion-comment-section-repository.service'; +import { MotionCommentSectionRepositoryService } from '../../../../core/repositories/motions/motion-comment-section-repository.service'; import { ViewMotionCommentSection } from '../../models/view-motion-comment-section'; -import { OperatorService } from '../../../../core/services/operator.service'; +import { OperatorService } from '../../../../core/core-services/operator.service'; import { MotionComment } from '../../../../shared/models/motions/motion-comment'; import { ViewMotion } from '../../models/view-motion'; diff --git a/client/src/app/site/motions/components/motion-detail-diff/motion-detail-diff.component.ts b/client/src/app/site/motions/components/motion-detail-diff/motion-detail-diff.component.ts index d92952e86..d63ccc017 100644 --- a/client/src/app/site/motions/components/motion-detail-diff/motion-detail-diff.component.ts +++ b/client/src/app/site/motions/components/motion-detail-diff/motion-detail-diff.component.ts @@ -2,18 +2,18 @@ import { AfterViewInit, Component, ElementRef, EventEmitter, Input, Output } fro import { LineNumberingMode, ViewMotion } from '../../models/view-motion'; import { ViewUnifiedChange, ViewUnifiedChangeType } from '../../models/view-unified-change'; import { DomSanitizer, SafeHtml, Title } from '@angular/platform-browser'; -import { MotionRepositoryService } from '../../services/motion-repository.service'; -import { LineRange, ModificationType } from '../../services/diff.service'; +import { MotionRepositoryService } from '../../../../core/repositories/motions/motion-repository.service'; +import { LineRange, ModificationType } from '../../../../core/ui-services/diff.service'; import { ViewChangeReco } from '../../models/view-change-reco'; import { MatDialog, MatSnackBar } from '@angular/material'; -import { ChangeRecommendationRepositoryService } from '../../services/change-recommendation-repository.service'; +import { ChangeRecommendationRepositoryService } from '../../../../core/repositories/motions/change-recommendation-repository.service'; import { MotionChangeRecommendationComponent, MotionChangeRecommendationComponentData } from '../motion-change-recommendation/motion-change-recommendation.component'; import { BaseViewComponent } from '../../../base/base-view'; import { TranslateService } from '@ngx-translate/core'; -import { ConfigService } from '../../../../core/services/config.service'; +import { ConfigService } from '../../../../core/ui-services/config.service'; /** * This component displays the original motion text with the change blocks inside. diff --git a/client/src/app/site/motions/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.ts b/client/src/app/site/motions/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.ts index 0dbd97f42..6d152d848 100644 --- a/client/src/app/site/motions/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.ts +++ b/client/src/app/site/motions/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.ts @@ -9,9 +9,9 @@ import { OnChanges, SimpleChanges } from '@angular/core'; -import { LineRange, ModificationType } from '../../services/diff.service'; +import { LineRange, ModificationType } from '../../../../core/ui-services/diff.service'; import { ViewChangeReco } from '../../models/view-change-reco'; -import { OperatorService } from '../../../../core/services/operator.service'; +import { OperatorService } from '../../../../core/core-services/operator.service'; /** * This component displays the original motion text with annotated change commendations 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 48983b424..7981963ad 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 @@ -7,15 +7,15 @@ import { MatDialog, MatExpansionPanel, MatSnackBar, MatCheckboxChange } from '@a import { take, takeWhile, multicast, skipWhile } from 'rxjs/operators'; import { TranslateService } from '@ngx-translate/core'; -import { AgendaRepositoryService } from 'app/site/agenda/services/agenda-repository.service'; +import { AgendaRepositoryService } from 'app/core/repositories/agenda/agenda-repository.service'; import { BaseViewComponent } from '../../../base/base-view'; import { Category } from '../../../../shared/models/motions/category'; -import { ChangeRecommendationRepositoryService } from '../../services/change-recommendation-repository.service'; +import { ChangeRecommendationRepositoryService } from '../../../../core/repositories/motions/change-recommendation-repository.service'; import { ChangeRecoMode, LineNumberingMode, ViewMotion } from '../../models/view-motion'; import { CreateMotion } from '../../models/create-motion'; -import { ConfigService } from '../../../../core/services/config.service'; -import { DataStoreService } from '../../../../core/services/data-store.service'; -import { DiffLinesInParagraph, LineRange } from '../../services/diff.service'; +import { ConfigService } from '../../../../core/ui-services/config.service'; +import { DataStoreService } from '../../../../core/core-services/data-store.service'; +import { DiffLinesInParagraph, LineRange } from '../../../../core/ui-services/diff.service'; import { itemVisibilityChoices, Item } from 'app/shared/models/agenda/item'; import { LocalPermissionsService } from '../../services/local-permissions.service'; import { Mediafile } from 'app/shared/models/mediafiles/mediafile'; @@ -26,19 +26,19 @@ import { MotionChangeRecommendationComponentData } from '../motion-change-recommendation/motion-change-recommendation.component'; import { MotionPdfExportService } from '../../services/motion-pdf-export.service'; -import { MotionRepositoryService } from '../../services/motion-repository.service'; +import { MotionRepositoryService } from '../../../../core/repositories/motions/motion-repository.service'; import { PersonalNoteContent } from 'app/shared/models/users/personal-note'; -import { PersonalNoteService } from '../../services/personal-note.service'; -import { PromptService } from 'app/core/services/prompt.service'; -import { StatuteParagraphRepositoryService } from '../../services/statute-paragraph-repository.service'; +import { PersonalNoteService } from '../../../../core/ui-services/personal-note.service'; +import { PromptService } from '../../../../core/ui-services/prompt.service'; +import { StatuteParagraphRepositoryService } from '../../../../core/repositories/motions/statute-paragraph-repository.service'; import { User } from '../../../../shared/models/users/user'; import { ViewChangeReco } from '../../models/view-change-reco'; import { ViewCreateMotion } from '../../models/view-create-motion'; -import { ViewportService } from '../../../../core/services/viewport.service'; +import { ViewportService } from '../../../../core/ui-services/viewport.service'; import { ViewUnifiedChange } from '../../models/view-unified-change'; import { ViewStatuteParagraph } from '../../models/view-statute-paragraph'; import { Workflow } from 'app/shared/models/motions/workflow'; -import { LinenumberingService } from '../../services/linenumbering.service'; +import { LinenumberingService } from '../../../../core/ui-services/linenumbering.service'; /** * Component for the motion detail view diff --git a/client/src/app/site/motions/components/motion-export-dialog/motion-export-dialog.component.ts b/client/src/app/site/motions/components/motion-export-dialog/motion-export-dialog.component.ts index a3e2e1f43..413fb455b 100644 --- a/client/src/app/site/motions/components/motion-export-dialog/motion-export-dialog.component.ts +++ b/client/src/app/site/motions/components/motion-export-dialog/motion-export-dialog.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { FormGroup, FormBuilder } from '@angular/forms'; import { MatDialogRef, MatButtonToggle } from '@angular/material'; -import { ConfigService } from 'app/core/services/config.service'; +import { ConfigService } from 'app/core/ui-services/config.service'; import { LineNumberingMode, ChangeRecoMode } from '../../models/view-motion'; /** 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 c0e3543fc..e5ca4527e 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 @@ -5,28 +5,28 @@ import { MatSnackBar, MatDialog } from '@angular/material'; import { TranslateService } from '@ngx-translate/core'; -import { CategoryRepositoryService } from '../../services/category-repository.service'; -import { ConfigService } from '../../../../core/services/config.service'; +import { CategoryRepositoryService } from '../../../../core/repositories/motions/category-repository.service'; +import { ConfigService } from '../../../../core/ui-services/config.service'; import { ListViewBaseComponent } from '../../../base/list-view-base'; import { LocalPermissionsService } from '../../services/local-permissions.service'; -import { MotionBlockRepositoryService } from '../../services/motion-block-repository.service'; +import { MotionBlockRepositoryService } from '../../../../core/repositories/motions/motion-block-repository.service'; import { MotionCsvExportService } from '../../services/motion-csv-export.service'; import { MotionFilterListService } from '../../services/motion-filter-list.service'; import { MotionMultiselectService } from '../../services/motion-multiselect.service'; -import { MotionRepositoryService } from '../../services/motion-repository.service'; +import { MotionRepositoryService } from '../../../../core/repositories/motions/motion-repository.service'; import { MotionSortListService } from '../../services/motion-sort-list.service'; -import { TagRepositoryService } from 'app/site/tags/services/tag-repository.service'; +import { TagRepositoryService } from 'app/core/repositories/tags/tag-repository.service'; import { ViewCategory } from '../../models/view-category'; 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 { WorkflowRepositoryService } from '../../services/workflow-repository.service'; +import { WorkflowRepositoryService } from '../../../../core/repositories/motions/workflow-repository.service'; import { MotionPdfExportService } from '../../services/motion-pdf-export.service'; import { MotionExportDialogComponent } from '../motion-export-dialog/motion-export-dialog.component'; -import { OperatorService } from '../../../../core/services/operator.service'; -import { ViewportService } from '../../../../core/services/viewport.service'; +import { OperatorService } from '../../../../core/core-services/operator.service'; +import { ViewportService } from '../../../../core/ui-services/viewport.service'; /** * Component that displays all the motions in a Table using DataSource. diff --git a/client/src/app/site/motions/components/motion-poll/motion-poll.component.ts b/client/src/app/site/motions/components/motion-poll/motion-poll.component.ts index e35eae2a8..e50e230e4 100644 --- a/client/src/app/site/motions/components/motion-poll/motion-poll.component.ts +++ b/client/src/app/site/motions/components/motion-poll/motion-poll.component.ts @@ -2,14 +2,14 @@ import { Component, OnInit, Input } from '@angular/core'; import { MatDialog } from '@angular/material'; import { TranslateService } from '@ngx-translate/core'; -import { CalculablePollKey } from 'app/core/poll.service'; -import { ConstantsService } from 'app/core/services/constants.service'; +import { CalculablePollKey } from 'app/core/ui-services/poll.service'; +import { ConstantsService } from 'app/core/ui-services/constants.service'; import { LocalPermissionsService } from '../../services/local-permissions.service'; import { MotionPoll } from 'app/shared/models/motions/motion-poll'; import { MotionPollService } from '../../services/motion-poll.service'; import { MotionPollDialogComponent } from './motion-poll-dialog.component'; -import { MotionRepositoryService } from '../../services/motion-repository.service'; -import { PromptService } from 'app/core/services/prompt.service'; +import { MotionRepositoryService } from '../../../../core/repositories/motions/motion-repository.service'; +import { PromptService } from 'app/core/ui-services/prompt.service'; import { MotionPollPdfService } from '../../services/motion-poll-pdf.service'; /** 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 d7c6240ad..8b56621e6 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 @@ -2,7 +2,7 @@ import { Component, Input, OnDestroy } from '@angular/core'; import { BaseComponent } from '../../../../base.component'; import { ViewMotion } from '../../models/view-motion'; -import { PersonalNoteService } from '../../services/personal-note.service'; +import { PersonalNoteService } from '../../../../core/ui-services/personal-note.service'; import { Subscription } from 'rxjs'; import { FormBuilder, FormGroup } from '@angular/forms'; import { PersonalNoteContent } from '../../../../shared/models/users/personal-note'; 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 13465c69c..ea67e6437 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 @@ -4,10 +4,10 @@ import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; import { FormGroup, FormBuilder, Validators } from '@angular/forms'; -import { PromptService } from '../../../../core/services/prompt.service'; +import { PromptService } from '../../../../core/ui-services/prompt.service'; import { StatuteParagraph } from '../../../../shared/models/motions/statute-paragraph'; import { ViewStatuteParagraph } from '../../models/view-statute-paragraph'; -import { StatuteParagraphRepositoryService } from '../../services/statute-paragraph-repository.service'; +import { StatuteParagraphRepositoryService } from '../../../../core/repositories/motions/statute-paragraph-repository.service'; import { BaseViewComponent } from '../../../base/base-view'; import { MatSnackBar } from '@angular/material'; import { StatuteCsvExportService } from '../../services/statute-csv-export.service'; 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 a22f591d1..df611d07f 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 '../services/diff.service'; +import { ModificationType } from '../../../core/ui-services/diff.service'; import { ViewUnifiedChange, ViewUnifiedChangeType } from './view-unified-change'; /** 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 58426edb7..806871e81 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,6 +1,6 @@ import { ViewUnifiedChange, ViewUnifiedChangeType } from './view-unified-change'; import { ViewMotion } from './view-motion'; -import { LineRange } from '../services/diff.service'; +import { LineRange } from '../../../core/ui-services/diff.service'; import { MergeAmendment } from '../../../shared/models/motions/workflow-state'; /** diff --git a/client/src/app/site/motions/motions.config.ts b/client/src/app/site/motions/motions.config.ts index 9bf4a76a3..20423bd3f 100644 --- a/client/src/app/site/motions/motions.config.ts +++ b/client/src/app/site/motions/motions.config.ts @@ -1,4 +1,4 @@ -import { AppConfig } from '../base/app-config'; +import { AppConfig } from '../../core/app-config'; import { Motion } from '../../shared/models/motions/motion'; import { Category } from '../../shared/models/motions/category'; import { Workflow } from '../../shared/models/motions/workflow'; @@ -6,17 +6,47 @@ import { MotionCommentSection } from '../../shared/models/motions/motion-comment import { MotionChangeReco } from '../../shared/models/motions/motion-change-reco'; import { MotionBlock } from '../../shared/models/motions/motion-block'; import { StatuteParagraph } from '../../shared/models/motions/statute-paragraph'; +import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service'; +import { CategoryRepositoryService } from 'app/core/repositories/motions/category-repository.service'; +import { WorkflowRepositoryService } from 'app/core/repositories/motions/workflow-repository.service'; +import { MotionCommentSectionRepositoryService } from 'app/core/repositories/motions/motion-comment-section-repository.service'; +import { MotionBlockRepositoryService } from 'app/core/repositories/motions/motion-block-repository.service'; +import { StatuteParagraphRepositoryService } from 'app/core/repositories/motions/statute-paragraph-repository.service'; +import { ChangeRecommendationRepositoryService } from 'app/core/repositories/motions/change-recommendation-repository.service'; export const MotionsAppConfig: AppConfig = { name: 'motions', models: [ - { collectionString: 'motions/motion', model: Motion, searchOrder: 2 }, - { collectionString: 'motions/category', model: Category, searchOrder: 6 }, - { collectionString: 'motions/workflow', model: Workflow }, - { collectionString: 'motions/motion-comment-section', model: MotionCommentSection }, - { collectionString: 'motions/motion-change-recommendation', model: MotionChangeReco }, - { collectionString: 'motions/motion-block', model: MotionBlock, searchOrder: 7 }, - { collectionString: 'motions/statute-paragraph', model: StatuteParagraph, searchOrder: 9 } + { collectionString: 'motions/motion', model: Motion, searchOrder: 2, repository: MotionRepositoryService }, + { + collectionString: 'motions/category', + model: Category, + searchOrder: 6, + repository: CategoryRepositoryService + }, + { collectionString: 'motions/workflow', model: Workflow, repository: WorkflowRepositoryService }, + { + collectionString: 'motions/motion-comment-section', + model: MotionCommentSection, + repository: MotionCommentSectionRepositoryService + }, + { + collectionString: 'motions/motion-change-recommendation', + model: MotionChangeReco, + repository: ChangeRecommendationRepositoryService + }, + { + collectionString: 'motions/motion-block', + model: MotionBlock, + searchOrder: 7, + repository: MotionBlockRepositoryService + }, + { + collectionString: 'motions/statute-paragraph', + model: StatuteParagraph, + searchOrder: 9, + repository: StatuteParagraphRepositoryService + } ], mainMenuEntries: [ { 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 7a2e4b99b..0d6816a2c 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/services/operator.service'; +import { OperatorService } from '../../../core/core-services/operator.service'; import { ViewMotion } from '../models/view-motion'; -import { ConfigService } from '../../../core/services/config.service'; -import { ConstantsService } from 'app/core/services/constants.service'; +import { ConfigService } from '../../../core/ui-services/config.service'; +import { ConstantsService } from 'app/core/ui-services/constants.service'; @Injectable({ providedIn: 'root' diff --git a/client/src/app/site/motions/services/motion-csv-export.service.ts b/client/src/app/site/motions/services/motion-csv-export.service.ts index 3c29bb14c..b919c7027 100644 --- a/client/src/app/site/motions/services/motion-csv-export.service.ts +++ b/client/src/app/site/motions/services/motion-csv-export.service.ts @@ -2,9 +2,9 @@ import { Injectable } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; -import { CsvExportService, CsvColumnDefinitionProperty } from 'app/core/services/csv-export.service'; +import { CsvExportService, CsvColumnDefinitionProperty } from 'app/core/ui-services/csv-export.service'; import { ViewMotion } from '../models/view-motion'; -import { FileExportService } from 'app/core/services/file-export.service'; +import { FileExportService } from 'app/core/ui-services/file-export.service'; /** * Exports CSVs for motions. Collect all CSV types here to have them in one place. 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 b0babf707..be5b4338e 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,22 +1,22 @@ import { Injectable } from '@angular/core'; -import { FilterListService, OsFilter, OsFilterOption } from '../../../core/services/filter-list.service'; +import { BaseFilterListService, OsFilter, OsFilterOption } from '../../../core/ui-services/base-filter-list.service'; import { Motion } from '../../../shared/models/motions/motion'; import { ViewMotion } from '../models/view-motion'; -import { CategoryRepositoryService } from './category-repository.service'; -import { WorkflowRepositoryService } from './workflow-repository.service'; -import { StorageService } from '../../../core/services/storage.service'; -import { MotionRepositoryService } from './motion-repository.service'; -import { MotionBlockRepositoryService } from './motion-block-repository.service'; -import { MotionCommentSectionRepositoryService } from './motion-comment-section-repository.service'; +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 { TranslateService } from '@ngx-translate/core'; -import { ConfigService } from 'app/core/services/config.service'; +import { ConfigService } from 'app/core/ui-services/config.service'; import { ViewWorkflow } from '../models/view-workflow'; @Injectable({ providedIn: 'root' }) -export class MotionFilterListService extends FilterListService { +export class MotionFilterListService extends BaseFilterListService { protected name = 'Motion'; /** 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 5a1432cbf..0ee128d56 100644 --- a/client/src/app/site/motions/services/motion-import.service.ts +++ b/client/src/app/site/motions/services/motion-import.service.ts @@ -4,14 +4,14 @@ import { Papa } from 'ngx-papaparse'; import { TranslateService } from '@ngx-translate/core'; import { Category } from 'app/shared/models/motions/category'; -import { CategoryRepositoryService } from './category-repository.service'; +import { CategoryRepositoryService } from '../../../core/repositories/motions/category-repository.service'; import { CreateMotion } from '../models/create-motion'; import { MotionBlock } from 'app/shared/models/motions/motion-block'; -import { MotionBlockRepositoryService } from './motion-block-repository.service'; -import { MotionRepositoryService } from './motion-repository.service'; -import { UserRepositoryService } from '../../users/services/user-repository.service'; +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 { ViewCsvCreateMotion, CsvMapping } from '../models/view-csv-create-motion'; -import { BaseImportService, NewEntry } from 'app/core/services/base-import.service'; +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 f7b49a2e3..809d805be 100644 --- a/client/src/app/site/motions/services/motion-multiselect.service.ts +++ b/client/src/app/site/motions/services/motion-multiselect.service.ts @@ -3,18 +3,18 @@ import { Injectable } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; import { ViewMotion } from '../models/view-motion'; -import { ChoiceService } from 'app/core/services/choice.service'; -import { PromptService } from 'app/core/services/prompt.service'; -import { MotionRepositoryService } from './motion-repository.service'; -import { UserRepositoryService } from 'app/site/users/services/user-repository.service'; -import { WorkflowRepositoryService } from './workflow-repository.service'; -import { CategoryRepositoryService } from './category-repository.service'; -import { TagRepositoryService } from 'app/site/tags/services/tag-repository.service'; -import { HttpService } from 'app/core/services/http.service'; -import { AgendaRepositoryService } from 'app/site/agenda/services/agenda-repository.service'; +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 { 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 { 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 './motion-block-repository.service'; +import { MotionBlockRepositoryService } from '../../../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-catalog.service.ts b/client/src/app/site/motions/services/motion-pdf-catalog.service.ts index 69d9c64f2..05a61361b 100644 --- a/client/src/app/site/motions/services/motion-pdf-catalog.service.ts +++ b/client/src/app/site/motions/services/motion-pdf-catalog.service.ts @@ -4,7 +4,7 @@ import { TranslateService } from '@ngx-translate/core'; import { ViewMotion, LineNumberingMode, ChangeRecoMode } from '../models/view-motion'; import { MotionPdfService } from './motion-pdf.service'; -import { ConfigService } from 'app/core/services/config.service'; +import { ConfigService } from 'app/core/ui-services/config.service'; import { Category } from 'app/shared/models/motions/category'; /** diff --git a/client/src/app/site/motions/services/motion-pdf-export.service.ts b/client/src/app/site/motions/services/motion-pdf-export.service.ts index 6e34a2c60..06853cafe 100644 --- a/client/src/app/site/motions/services/motion-pdf-export.service.ts +++ b/client/src/app/site/motions/services/motion-pdf-export.service.ts @@ -3,9 +3,9 @@ import { Injectable } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; import { MotionPdfService } from './motion-pdf.service'; -import { PdfDocumentService } from 'app/core/services/pdf-document.service'; +import { PdfDocumentService } from 'app/core/ui-services/pdf-document.service'; import { ViewMotion, LineNumberingMode, ChangeRecoMode } from '../models/view-motion'; -import { ConfigService } from 'app/core/services/config.service'; +import { ConfigService } from 'app/core/ui-services/config.service'; import { MotionPdfCatalogService } from './motion-pdf-catalog.service'; /** 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 7e916c50e..f41d3b948 100644 --- a/client/src/app/site/motions/services/motion-pdf.service.ts +++ b/client/src/app/site/motions/services/motion-pdf.service.ts @@ -3,11 +3,11 @@ import { Injectable } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; import { ViewMotion, LineNumberingMode, ChangeRecoMode } from '../models/view-motion'; -import { MotionRepositoryService } from './motion-repository.service'; -import { ConfigService } from 'app/core/services/config.service'; -import { ChangeRecommendationRepositoryService } from './change-recommendation-repository.service'; +import { MotionRepositoryService } from '../../../core/repositories/motions/motion-repository.service'; +import { ConfigService } from 'app/core/ui-services/config.service'; +import { ChangeRecommendationRepositoryService } from '../../../core/repositories/motions/change-recommendation-repository.service'; import { ViewUnifiedChange } from '../models/view-unified-change'; -import { HtmlToPdfService } from 'app/core/services/html-to-pdf.service'; +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 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 28e34c63c..e4c1fbd39 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 @@ -2,11 +2,11 @@ import { Injectable } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; -import { ConfigService } from 'app/core/services/config.service'; +import { ConfigService } from 'app/core/ui-services/config.service'; import { MotionPoll } from 'app/shared/models/motions/motion-poll'; -import { MotionRepositoryService } from './motion-repository.service'; -import { PdfDocumentService } from 'app/core/services/pdf-document.service'; -import { UserRepositoryService } from 'app/site/users/services/user-repository.service'; +import { MotionRepositoryService } from '../../../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'; /** * Creates a pdf for a motion poll. Takes as input any motionPoll diff --git a/client/src/app/site/motions/services/motion-poll.service.ts b/client/src/app/site/motions/services/motion-poll.service.ts index 1704329c9..040d3219b 100644 --- a/client/src/app/site/motions/services/motion-poll.service.ts +++ b/client/src/app/site/motions/services/motion-poll.service.ts @@ -1,8 +1,8 @@ import { Injectable } from '@angular/core'; -import { ConfigService } from 'app/core/services/config.service'; +import { ConfigService } from 'app/core/ui-services/config.service'; import { MotionPoll } from 'app/shared/models/motions/motion-poll'; -import { PollService } from 'app/core/poll.service'; +import { PollService } from 'app/core/ui-services/poll.service'; export type CalculablePollKey = 'votesvalid' | 'votesinvalid' | 'votescast' | 'yes' | 'no' | 'abstain'; 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 ed09c20f2..6db27574e 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,11 +1,11 @@ import { Injectable } from '@angular/core'; -import { SortListService, OsSortingDefinition } from '../../../core/services/sort-list.service'; +import { BaseSortListService, OsSortingDefinition } from '../../../core/ui-services/base-sort-list.service'; import { ViewMotion } from '../models/view-motion'; @Injectable({ providedIn: 'root' }) -export class MotionSortListService extends SortListService { +export class MotionSortListService extends BaseSortListService { public sortOptions: OsSortingDefinition = { sortProperty: 'callListWeight', sortAscending: true, diff --git a/client/src/app/site/motions/services/statute-csv-export.service.ts b/client/src/app/site/motions/services/statute-csv-export.service.ts index 7d9647b4e..ba56e2a50 100644 --- a/client/src/app/site/motions/services/statute-csv-export.service.ts +++ b/client/src/app/site/motions/services/statute-csv-export.service.ts @@ -2,9 +2,9 @@ import { Injectable } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; -import { CsvExportService, CsvColumnDefinitionProperty } from 'app/core/services/csv-export.service'; +import { CsvExportService, CsvColumnDefinitionProperty } from 'app/core/ui-services/csv-export.service'; import { ViewStatuteParagraph } from '../models/view-statute-paragraph'; -import { FileExportService } from 'app/core/services/file-export.service'; +import { FileExportService } from 'app/core/ui-services/file-export.service'; /** * Exports CSVs for statute paragraphs. diff --git a/client/src/app/site/motions/services/statute-import.service.ts b/client/src/app/site/motions/services/statute-import.service.ts index a05b4c994..fe6fe384b 100644 --- a/client/src/app/site/motions/services/statute-import.service.ts +++ b/client/src/app/site/motions/services/statute-import.service.ts @@ -3,10 +3,10 @@ import { MatSnackBar } from '@angular/material'; import { Papa } from 'ngx-papaparse'; import { TranslateService } from '@ngx-translate/core'; -import { BaseImportService, NewEntry } from 'app/core/services/base-import.service'; +import { BaseImportService, NewEntry } from 'app/core/ui-services/base-import.service'; import { StatuteParagraph } from 'app/shared/models/motions/statute-paragraph'; -import { StatuteParagraphRepositoryService } from './statute-paragraph-repository.service'; import { ViewStatuteParagraph } from '../models/view-statute-paragraph'; +import { StatuteParagraphRepositoryService } from 'app/core/repositories/motions/statute-paragraph-repository.service'; /** * Service for motion imports diff --git a/client/src/app/site/common/components/countdown-list/countdown-list.component.html b/client/src/app/site/projector/components/countdown-list/countdown-list.component.html similarity index 100% rename from client/src/app/site/common/components/countdown-list/countdown-list.component.html rename to client/src/app/site/projector/components/countdown-list/countdown-list.component.html diff --git a/client/src/app/site/common/components/countdown-list/countdown-list.component.scss b/client/src/app/site/projector/components/countdown-list/countdown-list.component.scss similarity index 100% rename from client/src/app/site/common/components/countdown-list/countdown-list.component.scss rename to client/src/app/site/projector/components/countdown-list/countdown-list.component.scss diff --git a/client/src/app/site/common/components/countdown-list/countdown-list.component.spec.ts b/client/src/app/site/projector/components/countdown-list/countdown-list.component.spec.ts similarity index 100% rename from client/src/app/site/common/components/countdown-list/countdown-list.component.spec.ts rename to client/src/app/site/projector/components/countdown-list/countdown-list.component.spec.ts diff --git a/client/src/app/site/common/components/countdown-list/countdown-list.component.ts b/client/src/app/site/projector/components/countdown-list/countdown-list.component.ts similarity index 96% rename from client/src/app/site/common/components/countdown-list/countdown-list.component.ts rename to client/src/app/site/projector/components/countdown-list/countdown-list.component.ts index bca61da4b..663515397 100644 --- a/client/src/app/site/common/components/countdown-list/countdown-list.component.ts +++ b/client/src/app/site/projector/components/countdown-list/countdown-list.component.ts @@ -4,11 +4,11 @@ import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; import { FormGroup, FormBuilder, Validators } from '@angular/forms'; -import { PromptService } from '../../../../core/services/prompt.service'; +import { PromptService } from '../../../../core/ui-services/prompt.service'; import { BaseViewComponent } from '../../../base/base-view'; import { MatSnackBar } from '@angular/material'; import { ViewCountdown } from '../../models/view-countdown'; -import { CountdownRepositoryService } from '../../services/countdown-repository.service'; +import { CountdownRepositoryService } from '../../../../core/repositories/projector/countdown-repository.service'; import { Countdown } from 'app/shared/models/core/countdown'; /** diff --git a/client/src/app/site/projector/components/projector-detail/projector-detail.component.ts b/client/src/app/site/projector/components/projector-detail/projector-detail.component.ts index d67ce7e2e..5d71dc692 100644 --- a/client/src/app/site/projector/components/projector-detail/projector-detail.component.ts +++ b/client/src/app/site/projector/components/projector-detail/projector-detail.component.ts @@ -5,17 +5,20 @@ import { ActivatedRoute } from '@angular/router'; import { TranslateService } from '@ngx-translate/core'; -import { ProjectorRepositoryService, ScrollScaleDirection } from '../../services/projector-repository.service'; +import { + ProjectorRepositoryService, + ScrollScaleDirection +} from '../../../../core/repositories/projector/projector-repository.service'; import { ViewProjector } from '../../models/view-projector'; import { BaseViewComponent } from 'app/site/base/base-view'; -import { ProjectorService } from 'app/core/services/projector.service'; +import { ProjectorService } from 'app/core/core-services/projector.service'; import { moveItemInArray, CdkDragDrop } from '@angular/cdk/drag-drop'; import { ProjectorElement } from 'app/shared/models/core/projector'; import { SlideManager } from 'app/slides/services/slide-manager.service'; -import { CountdownRepositoryService } from 'app/site/common/services/countdown-repository.service'; -import { ProjectorMessageRepositoryService } from 'app/site/common/services/projectormessage-repository.service'; -import { ViewProjectorMessage } from 'app/site/common/models/view-projectormessage'; -import { ViewCountdown } from 'app/site/common/models/view-countdown'; +import { CountdownRepositoryService } from 'app/core/repositories/projector/countdown-repository.service'; +import { ProjectorMessageRepositoryService } from 'app/core/repositories/projector/projectormessage-repository.service'; +import { ViewProjectorMessage } from 'app/site/projector/models/view-projectormessage'; +import { ViewCountdown } from 'app/site/projector/models/view-countdown'; import { Projectable } from 'app/site/base/projectable'; import { CurrentListOfSpeakersSlideService } from '../../services/current-list-of-of-speakers-slide.service'; diff --git a/client/src/app/site/projector/components/projector-list/projector-list.component.html b/client/src/app/site/projector/components/projector-list/projector-list.component.html index ffb843980..2e29984ee 100644 --- a/client/src/app/site/projector/components/projector-list/projector-list.component.html +++ b/client/src/app/site/projector/components/projector-list/projector-list.component.html @@ -111,7 +111,7 @@ - diff --git a/client/src/app/site/projector/components/projector-list/projector-list.component.ts b/client/src/app/site/projector/components/projector-list/projector-list.component.ts index 50fe6ffa2..fe1a973a2 100644 --- a/client/src/app/site/projector/components/projector-list/projector-list.component.ts +++ b/client/src/app/site/projector/components/projector-list/projector-list.component.ts @@ -5,11 +5,11 @@ import { MatSnackBar } from '@angular/material'; import { TranslateService } from '@ngx-translate/core'; -import { ProjectorRepositoryService } from '../../services/projector-repository.service'; +import { ProjectorRepositoryService } from '../../../../core/repositories/projector/projector-repository.service'; import { ViewProjector } from '../../models/view-projector'; import { Projector } from 'app/shared/models/core/projector'; import { BaseViewComponent } from 'app/site/base/base-view'; -import { PromptService } from 'app/core/services/prompt.service'; +import { PromptService } from 'app/core/ui-services/prompt.service'; import { ClockSlideService } from '../../services/clock-slide.service'; /** diff --git a/client/src/app/site/common/components/projectormessage-list/projectormessage-list.component.html b/client/src/app/site/projector/components/projectormessage-list/projectormessage-list.component.html similarity index 100% rename from client/src/app/site/common/components/projectormessage-list/projectormessage-list.component.html rename to client/src/app/site/projector/components/projectormessage-list/projectormessage-list.component.html diff --git a/client/src/app/site/common/components/projectormessage-list/projectormessage-list.component.scss b/client/src/app/site/projector/components/projectormessage-list/projectormessage-list.component.scss similarity index 100% rename from client/src/app/site/common/components/projectormessage-list/projectormessage-list.component.scss rename to client/src/app/site/projector/components/projectormessage-list/projectormessage-list.component.scss diff --git a/client/src/app/site/common/components/projectormessage-list/projectormessage-list.component.spec.ts b/client/src/app/site/projector/components/projectormessage-list/projectormessage-list.component.spec.ts similarity index 100% rename from client/src/app/site/common/components/projectormessage-list/projectormessage-list.component.spec.ts rename to client/src/app/site/projector/components/projectormessage-list/projectormessage-list.component.spec.ts diff --git a/client/src/app/site/common/components/projectormessage-list/projectormessage-list.component.ts b/client/src/app/site/projector/components/projectormessage-list/projectormessage-list.component.ts similarity index 100% rename from client/src/app/site/common/components/projectormessage-list/projectormessage-list.component.ts rename to client/src/app/site/projector/components/projectormessage-list/projectormessage-list.component.ts diff --git a/client/src/app/site/common/models/view-countdown.ts b/client/src/app/site/projector/models/view-countdown.ts similarity index 100% rename from client/src/app/site/common/models/view-countdown.ts rename to client/src/app/site/projector/models/view-countdown.ts diff --git a/client/src/app/site/common/models/view-projectormessage.ts b/client/src/app/site/projector/models/view-projectormessage.ts similarity index 84% rename from client/src/app/site/common/models/view-projectormessage.ts rename to client/src/app/site/projector/models/view-projectormessage.ts index e6afd4ea3..342b0964d 100644 --- a/client/src/app/site/common/models/view-projectormessage.ts +++ b/client/src/app/site/projector/models/view-projectormessage.ts @@ -5,16 +5,16 @@ import { ProjectorMessage } from 'app/shared/models/core/projector-message'; export class ViewProjectorMessage extends BaseProjectableModel { private _message: ProjectorMessage; - public get messaage(): ProjectorMessage { + public get projctormessage(): ProjectorMessage { return this._message ? this._message : null; } public get id(): number { - return this.messaage ? this.messaage.id : null; + return this.projctormessage ? this.projctormessage.id : null; } public get message(): string { - return this.messaage ? this.messaage.message : null; + return this.projctormessage ? this.projctormessage.message : null; } public constructor(message?: ProjectorMessage) { @@ -23,7 +23,7 @@ export class ViewProjectorMessage extends BaseProjectableModel { } public getTitle(): string { - return 'Message 1'; + return 'Message'; } public updateValues(message: ProjectorMessage): void { diff --git a/client/src/app/site/projector/projector-routing.module.ts b/client/src/app/site/projector/projector-routing.module.ts index 26f7c6f72..28899efd5 100644 --- a/client/src/app/site/projector/projector-routing.module.ts +++ b/client/src/app/site/projector/projector-routing.module.ts @@ -2,6 +2,8 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { ProjectorListComponent } from './components/projector-list/projector-list.component'; import { ProjectorDetailComponent } from './components/projector-detail/projector-detail.component'; +import { CountdownListComponent } from './components/countdown-list/countdown-list.component'; +import { ProjectorMessageListComponent } from './components/projectormessage-list/projectormessage-list.component'; const routes: Routes = [ { @@ -11,6 +13,14 @@ const routes: Routes = [ { path: 'detail/:id', component: ProjectorDetailComponent + }, + { + path: 'countdowns', + component: CountdownListComponent + }, + { + path: 'messages', + component: ProjectorMessageListComponent } ]; diff --git a/client/src/app/site/projector/projector.config.ts b/client/src/app/site/projector/projector.config.ts index eeb1797b6..d5b478c67 100644 --- a/client/src/app/site/projector/projector.config.ts +++ b/client/src/app/site/projector/projector.config.ts @@ -1,14 +1,21 @@ -import { AppConfig } from '../base/app-config'; +import { AppConfig } from '../../core/app-config'; import { Projector } from 'app/shared/models/core/projector'; import { Countdown } from 'app/shared/models/core/countdown'; import { ProjectorMessage } from 'app/shared/models/core/projector-message'; +import { ProjectorRepositoryService } from 'app/core/repositories/projector/projector-repository.service'; +import { CountdownRepositoryService } from 'app/core/repositories/projector/countdown-repository.service'; +import { ProjectorMessageRepositoryService } from 'app/core/repositories/projector/projectormessage-repository.service'; export const ProjectorAppConfig: AppConfig = { name: 'projector', models: [ - { collectionString: 'core/projector', model: Projector }, - { collectionString: 'core/countdown', model: Countdown }, - { collectionString: 'core/projector-message', model: ProjectorMessage } + { collectionString: 'core/projector', model: Projector, repository: ProjectorRepositoryService }, + { collectionString: 'core/countdown', model: Countdown, repository: CountdownRepositoryService }, + { + collectionString: 'core/projector-message', + model: ProjectorMessage, + repository: ProjectorMessageRepositoryService + } ], mainMenuEntries: [ { diff --git a/client/src/app/site/projector/projector.module.ts b/client/src/app/site/projector/projector.module.ts index 2b19be505..e03749bae 100644 --- a/client/src/app/site/projector/projector.module.ts +++ b/client/src/app/site/projector/projector.module.ts @@ -3,24 +3,22 @@ import { CommonModule } from '@angular/common'; import { ProjectorRoutingModule } from './projector-routing.module'; import { SharedModule } from '../../shared/shared.module'; -import { ProjectorComponent } from './components/projector/projector.component'; import { ProjectorListComponent } from './components/projector-list/projector-list.component'; import { ProjectorDetailComponent } from './components/projector-detail/projector-detail.component'; -import { SlideContainerComponent } from './components/slide-container/slide-container.component'; -import { FullscreenProjectorComponent } from './components/fullscreen-projector/fullscreen-projector.component'; import { ClockSlideService } from './services/clock-slide.service'; -import { ProjectorRepositoryService } from './services/projector-repository.service'; import { ProjectorDataService } from './services/projector-data.service'; +import { CurrentListOfSpeakersSlideService } from './services/current-list-of-of-speakers-slide.service'; +import { CountdownListComponent } from './components/countdown-list/countdown-list.component'; +import { ProjectorMessageListComponent } from './components/projectormessage-list/projectormessage-list.component'; @NgModule({ - providers: [ClockSlideService, ProjectorDataService, ProjectorRepositoryService], + providers: [ClockSlideService, ProjectorDataService, CurrentListOfSpeakersSlideService], imports: [CommonModule, ProjectorRoutingModule, SharedModule], declarations: [ - ProjectorComponent, ProjectorListComponent, ProjectorDetailComponent, - SlideContainerComponent, - FullscreenProjectorComponent + CountdownListComponent, + ProjectorMessageListComponent ] }) export class ProjectorModule {} diff --git a/client/src/app/site/projector/services/clock-slide.service.ts b/client/src/app/site/projector/services/clock-slide.service.ts index d82e91737..5a47c116f 100644 --- a/client/src/app/site/projector/services/clock-slide.service.ts +++ b/client/src/app/site/projector/services/clock-slide.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -import { ProjectorService } from 'app/core/services/projector.service'; +import { ProjectorService } from 'app/core/core-services/projector.service'; import { ViewProjector } from '../models/view-projector'; import { IdentifiableProjectorElement } from 'app/shared/models/core/projector'; diff --git a/client/src/app/site/projector/services/current-list-of-of-speakers-slide.service.ts b/client/src/app/site/projector/services/current-list-of-of-speakers-slide.service.ts index 0689d664e..10386b599 100644 --- a/client/src/app/site/projector/services/current-list-of-of-speakers-slide.service.ts +++ b/client/src/app/site/projector/services/current-list-of-of-speakers-slide.service.ts @@ -1,8 +1,8 @@ import { Injectable } from '@angular/core'; -import { ProjectorService } from 'app/core/services/projector.service'; +import { ProjectorService } from 'app/core/core-services/projector.service'; import { ViewProjector } from '../models/view-projector'; import { IdentifiableProjectorElement } from 'app/shared/models/core/projector'; -import { ProjectorRepositoryService } from './projector-repository.service'; +import { ProjectorRepositoryService } from 'app/core/repositories/projector/projector-repository.service'; import { BehaviorSubject, Observable } from 'rxjs'; import { SlideManager } from 'app/slides/services/slide-manager.service'; import { AgendaBaseModel } from 'app/shared/models/base/agenda-base-model'; diff --git a/client/src/app/site/projector/services/projector-data.service.ts b/client/src/app/site/projector/services/projector-data.service.ts index 71a4cb535..156427429 100644 --- a/client/src/app/site/projector/services/projector-data.service.ts +++ b/client/src/app/site/projector/services/projector-data.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { WebsocketService } from 'app/core/services/websocket.service'; +import { WebsocketService } from 'app/core/core-services/websocket.service'; import { Observable, BehaviorSubject } from 'rxjs'; import { ProjectorElement } from 'app/shared/models/core/projector'; diff --git a/client/src/app/site/site-routing.module.ts b/client/src/app/site/site-routing.module.ts index 1e884a909..4b56f5694 100644 --- a/client/src/app/site/site-routing.module.ts +++ b/client/src/app/site/site-routing.module.ts @@ -3,7 +3,7 @@ import { Routes, RouterModule } from '@angular/router'; import { SiteComponent } from './site.component'; -import { AuthGuard } from '../core/services/auth-guard.service'; +import { AuthGuard } from '../core/core-services/auth-guard.service'; /** * Routung to all OpenSlides apps diff --git a/client/src/app/site/site.component.ts b/client/src/app/site/site.component.ts index 1273c5427..49ce81dd1 100644 --- a/client/src/app/site/site.component.ts +++ b/client/src/app/site/site.component.ts @@ -5,14 +5,14 @@ import { MatDialog, MatSidenav } from '@angular/material'; import { TranslateService } from '@ngx-translate/core'; -import { AuthService } from '../core/services/auth.service'; -import { OperatorService } from '../core/services/operator.service'; +import { AuthService } from '../core/core-services/auth.service'; +import { OperatorService } from '../core/core-services/operator.service'; import { BaseComponent } from '../base.component'; import { pageTransition, navItemAnim } from '../shared/animations'; -import { ViewportService } from '../core/services/viewport.service'; -import { MainMenuService } from '../core/services/main-menu.service'; -import { OpenSlidesStatusService } from '../core/services/openslides-status.service'; -import { TimeTravelService } from '../core/services/time-travel.service'; +import { ViewportService } from '../core/ui-services/viewport.service'; +import { MainMenuService } from '../core/core-services/main-menu.service'; +import { OpenSlidesStatusService } from '../core/core-services/openslides-status.service'; +import { TimeTravelService } from '../core/core-services/time-travel.service'; @Component({ selector: 'os-site', 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 78239f215..26a351606 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 @@ -3,10 +3,10 @@ import { TranslateService } from '@ngx-translate/core'; import { Title } from '@angular/platform-browser'; import { Tag } from '../../../../shared/models/core/tag'; import { ListViewBaseComponent } from '../../../base/list-view-base'; -import { TagRepositoryService } from '../../services/tag-repository.service'; +import { TagRepositoryService } from '../../../../core/repositories/tags/tag-repository.service'; import { ViewTag } from '../../models/view-tag'; import { FormGroup, FormControl, Validators } from '@angular/forms'; -import { PromptService } from '../../../../core/services/prompt.service'; +import { PromptService } from '../../../../core/ui-services/prompt.service'; import { MatSnackBar } from '@angular/material'; /** diff --git a/client/src/app/site/tags/tag.config.ts b/client/src/app/site/tags/tag.config.ts index 0e1aeedc4..1b0f4d0ae 100644 --- a/client/src/app/site/tags/tag.config.ts +++ b/client/src/app/site/tags/tag.config.ts @@ -1,7 +1,8 @@ -import { AppConfig } from '../base/app-config'; +import { AppConfig } from '../../core/app-config'; import { Tag } from '../../shared/models/core/tag'; +import { TagRepositoryService } from 'app/core/repositories/tags/tag-repository.service'; export const TagAppConfig: AppConfig = { name: 'tag', - models: [{ collectionString: 'core/tag', model: Tag, searchOrder: 8 }] + models: [{ collectionString: 'core/tag', model: Tag, searchOrder: 8, repository: TagRepositoryService }] }; 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 8d8217410..6aa42a72a 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 @@ -4,11 +4,11 @@ import { TranslateService } from '@ngx-translate/core'; import { MatTableDataSource, MatSnackBar } from '@angular/material'; import { FormGroup, FormControl, Validators } from '@angular/forms'; -import { GroupRepositoryService } from '../../services/group-repository.service'; +import { GroupRepositoryService } from '../../../../core/repositories/users/group-repository.service'; import { ViewGroup } from '../../models/view-group'; import { Group } from '../../../../shared/models/users/group'; import { BaseViewComponent } from '../../../base/base-view'; -import { PromptService } from '../../../../core/services/prompt.service'; +import { PromptService } from '../../../../core/ui-services/prompt.service'; /** * Component for the Group-List and permission matrix 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 2e7eb49e8..7f2ae6b08 100644 --- a/client/src/app/site/users/components/password/password.component.ts +++ b/client/src/app/site/users/components/password/password.component.ts @@ -6,8 +6,8 @@ import { MatSnackBar } from '@angular/material'; import { Title } from '@angular/platform-browser'; import { ViewUser } from '../../models/view-user'; -import { UserRepositoryService } from '../../services/user-repository.service'; -import { OperatorService } from '../../../../core/services/operator.service'; +import { UserRepositoryService } from '../../../../core/repositories/users/user-repository.service'; +import { OperatorService } from '../../../../core/core-services/operator.service'; import { BaseViewComponent } from '../../../../site/base/base-view'; /** diff --git a/client/src/app/site/users/presence-detail/presence-detail.component.html b/client/src/app/site/users/components/presence-detail/presence-detail.component.html similarity index 100% rename from client/src/app/site/users/presence-detail/presence-detail.component.html rename to client/src/app/site/users/components/presence-detail/presence-detail.component.html diff --git a/client/src/app/site/users/presence-detail/presence-detail.component.spec.ts b/client/src/app/site/users/components/presence-detail/presence-detail.component.spec.ts similarity index 100% rename from client/src/app/site/users/presence-detail/presence-detail.component.spec.ts rename to client/src/app/site/users/components/presence-detail/presence-detail.component.spec.ts diff --git a/client/src/app/site/users/presence-detail/presence-detail.component.ts b/client/src/app/site/users/components/presence-detail/presence-detail.component.ts similarity index 93% rename from client/src/app/site/users/presence-detail/presence-detail.component.ts rename to client/src/app/site/users/components/presence-detail/presence-detail.component.ts index f010a0b8b..6557de39a 100644 --- a/client/src/app/site/users/presence-detail/presence-detail.component.ts +++ b/client/src/app/site/users/components/presence-detail/presence-detail.component.ts @@ -1,13 +1,14 @@ import { Component, OnInit } from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; -import { Subscription } from 'rxjs'; -import { ConfigService } from 'app/core/services/config.service'; -import { OperatorService } from 'app/core/services/operator.service'; -import { UserRepositoryService } from '../services/user-repository.service'; -import { ViewUser } from '../models/view-user'; +import { Subscription } from 'rxjs'; import { TranslateService } from '@ngx-translate/core'; +import { ConfigService } from 'app/core/ui-services/config.service'; +import { OperatorService } from 'app/core/core-services/operator.service'; +import { UserRepositoryService } from 'app/core/repositories/users/user-repository.service'; +import { ViewUser } from '../../models/view-user'; + /** * This component offers an input field for user numbers, and sets/unsets the * 'is_present' status for the user associated with that number, giving a feedback 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 5c20722ad..508c07f91 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 @@ -7,13 +7,13 @@ import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; import { BaseViewComponent } from '../../../base/base-view'; -import { DataStoreService } from '../../../../core/services/data-store.service'; +import { DataStoreService } from '../../../../core/core-services/data-store.service'; import { genders } from 'app/shared/models/users/user'; import { Group } from '../../../../shared/models/users/group'; -import { OperatorService } from '../../../../core/services/operator.service'; -import { PromptService } from '../../../../core/services/prompt.service'; +import { OperatorService } from '../../../../core/core-services/operator.service'; +import { PromptService } from '../../../../core/ui-services/prompt.service'; import { UserPdfExportService } from '../../services/user-pdf-export.service'; -import { UserRepositoryService } from '../../services/user-repository.service'; +import { UserRepositoryService } from '../../../../core/repositories/users/user-repository.service'; import { ViewUser } from '../../models/view-user'; /** diff --git a/client/src/app/site/users/components/user-import/user-import-list.component.ts b/client/src/app/site/users/components/user-import/user-import-list.component.ts index d1f739a20..c6ab50c96 100644 --- a/client/src/app/site/users/components/user-import/user-import-list.component.ts +++ b/client/src/app/site/users/components/user-import/user-import-list.component.ts @@ -4,9 +4,9 @@ import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; import { BaseImportListComponent } from 'app/site/base/base-import-list'; -import { FileExportService } from 'app/core/services/file-export.service'; +import { FileExportService } from 'app/core/ui-services/file-export.service'; import { FormBuilder, FormGroup } from '@angular/forms'; -import { NewEntry } from 'app/core/services/base-import.service'; +import { NewEntry } from 'app/core/ui-services/base-import.service'; import { UserImportService } from '../../services/user-import.service'; import { ViewUser } from '../../models/view-user'; diff --git a/client/src/app/site/users/components/user-list/user-list.component.ts b/client/src/app/site/users/components/user-list/user-list.component.ts index d615a09a9..c033ed932 100644 --- a/client/src/app/site/users/components/user-list/user-list.component.ts +++ b/client/src/app/site/users/components/user-list/user-list.component.ts @@ -4,18 +4,18 @@ import { Router, ActivatedRoute } from '@angular/router'; import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; -import { ChoiceService } from '../../../../core/services/choice.service'; -import { ConfigService } from 'app/core/services/config.service'; -import { CsvExportService } from '../../../../core/services/csv-export.service'; -import { GroupRepositoryService } from '../../services/group-repository.service'; +import { ChoiceService } from '../../../../core/ui-services/choice.service'; +import { ConfigService } from 'app/core/ui-services/config.service'; +import { CsvExportService } from '../../../../core/ui-services/csv-export.service'; +import { GroupRepositoryService } from '../../../../core/repositories/users/group-repository.service'; import { ListViewBaseComponent } from '../../../base/list-view-base'; -import { PromptService } from '../../../../core/services/prompt.service'; +import { PromptService } from '../../../../core/ui-services/prompt.service'; import { UserFilterListService } from '../../services/user-filter-list.service'; -import { UserRepositoryService } from '../../services/user-repository.service'; +import { UserRepositoryService } from '../../../../core/repositories/users/user-repository.service'; import { UserPdfExportService } from '../../services/user-pdf-export.service'; import { UserSortListService } from '../../services/user-sort-list.service'; -import { ViewportService } from '../../../../core/services/viewport.service'; -import { OperatorService } from '../../../../core/services/operator.service'; +import { ViewportService } from '../../../../core/ui-services/viewport.service'; +import { OperatorService } from '../../../../core/core-services/operator.service'; import { ViewUser } from '../../models/view-user'; /** 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 2422f0447..82a3de5ef 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,16 +1,16 @@ import { Injectable } from '@angular/core'; -import { FilterListService, OsFilter } from '../../../core/services/filter-list.service'; -import { StorageService } from '../../../core/services/storage.service'; +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 { ViewUser } from '../models/view-user'; -import { GroupRepositoryService } from './group-repository.service'; -import { UserRepositoryService } from './user-repository.service'; +import { GroupRepositoryService } from '../../../core/repositories/users/group-repository.service'; +import { UserRepositoryService } from '../../../core/repositories/users/user-repository.service'; @Injectable({ providedIn: 'root' }) -export class UserFilterListService extends FilterListService { +export class UserFilterListService extends BaseFilterListService { protected name = 'User'; private userGroupFilterOptions = { 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 7d5ef42be..5426be532 100644 --- a/client/src/app/site/users/services/user-import.service.ts +++ b/client/src/app/site/users/services/user-import.service.ts @@ -2,12 +2,12 @@ import { Injectable } from '@angular/core'; import { MatSnackBar } from '@angular/material'; import { Papa } from 'ngx-papaparse'; -import { BaseImportService, NewEntry } from 'app/core/services/base-import.service'; +import { BaseImportService, NewEntry } from 'app/core/ui-services/base-import.service'; import { Group } from 'app/shared/models/users/group'; -import { GroupRepositoryService } from './group-repository.service'; +import { GroupRepositoryService } from '../../../core/repositories/users/group-repository.service'; import { TranslateService } from '@ngx-translate/core'; import { User } from 'app/shared/models/users/user'; -import { UserRepositoryService } from './user-repository.service'; +import { UserRepositoryService } from '../../../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-pdf-export.service.ts b/client/src/app/site/users/services/user-pdf-export.service.ts index 1de3482ef..beebbecad 100644 --- a/client/src/app/site/users/services/user-pdf-export.service.ts +++ b/client/src/app/site/users/services/user-pdf-export.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; -import { PdfDocumentService } from 'app/core/services/pdf-document.service'; +import { PdfDocumentService } from 'app/core/ui-services/pdf-document.service'; import { UserPdfService } from './user-pdf.service'; import { ViewUser } from '../models/view-user'; diff --git a/client/src/app/site/users/services/user-pdf.service.ts b/client/src/app/site/users/services/user-pdf.service.ts index 89712be49..1a62c2b6e 100644 --- a/client/src/app/site/users/services/user-pdf.service.ts +++ b/client/src/app/site/users/services/user-pdf.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; -import { ConfigService } from 'app/core/services/config.service'; +import { ConfigService } from 'app/core/ui-services/config.service'; 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 e0152eed0..090f840ed 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,11 +1,11 @@ import { Injectable } from '@angular/core'; -import { SortListService, OsSortingDefinition } from '../../../core/services/sort-list.service'; +import { BaseSortListService, OsSortingDefinition } from '../../../core/ui-services/base-sort-list.service'; import { ViewUser } from '../models/view-user'; @Injectable({ providedIn: 'root' }) -export class UserSortListService extends SortListService { +export class UserSortListService extends BaseSortListService { public sortOptions: OsSortingDefinition = { sortProperty: 'first_name', sortAscending: true, diff --git a/client/src/app/site/users/users-routing.module.ts b/client/src/app/site/users/users-routing.module.ts index c8fe3eda5..926dd396d 100644 --- a/client/src/app/site/users/users-routing.module.ts +++ b/client/src/app/site/users/users-routing.module.ts @@ -3,7 +3,7 @@ import { Routes, RouterModule } from '@angular/router'; import { GroupListComponent } from './components/group-list/group-list.component'; import { PasswordComponent } from './components/password/password.component'; -import { PresenceDetailComponent } from './presence-detail/presence-detail.component'; +import { PresenceDetailComponent } from './components/presence-detail/presence-detail.component'; import { UserDetailComponent } from './components/user-detail/user-detail.component'; import { UserImportListComponent } from './components/user-import/user-import-list.component'; import { UserListComponent } from './components/user-list/user-list.component'; diff --git a/client/src/app/site/users/users.config.ts b/client/src/app/site/users/users.config.ts index 04dafea67..ecea1c412 100644 --- a/client/src/app/site/users/users.config.ts +++ b/client/src/app/site/users/users.config.ts @@ -1,14 +1,17 @@ -import { AppConfig } from '../base/app-config'; +import { AppConfig } from '../../core/app-config'; import { User } from '../../shared/models/users/user'; import { Group } from '../../shared/models/users/group'; import { PersonalNote } from '../../shared/models/users/personal-note'; +import { UserRepositoryService } from 'app/core/repositories/users/user-repository.service'; +import { GroupRepositoryService } from 'app/core/repositories/users/group-repository.service'; +import { PersonalNoteRepositoryService } from 'app/core/repositories/users/personal-note-repository.service'; export const UsersAppConfig: AppConfig = { name: 'users', models: [ - { collectionString: 'users/user', model: User, searchOrder: 4 }, - { collectionString: 'users/group', model: Group }, - { collectionString: 'users/personal-note', model: PersonalNote } + { collectionString: 'users/user', model: User, searchOrder: 4, repository: UserRepositoryService }, + { collectionString: 'users/group', model: Group, repository: GroupRepositoryService }, + { collectionString: 'users/personal-note', model: PersonalNote, repository: PersonalNoteRepositoryService } ], mainMenuEntries: [ { diff --git a/client/src/app/site/users/users.module.ts b/client/src/app/site/users/users.module.ts index 9ac5accbf..5cc943f5e 100644 --- a/client/src/app/site/users/users.module.ts +++ b/client/src/app/site/users/users.module.ts @@ -3,7 +3,7 @@ import { CommonModule } from '@angular/common'; import { GroupListComponent } from './components/group-list/group-list.component'; import { PasswordComponent } from './components/password/password.component'; -import { PresenceDetailComponent } from './presence-detail/presence-detail.component'; +import { PresenceDetailComponent } from './components/presence-detail/presence-detail.component'; import { SharedModule } from '../../shared/shared.module'; import { UserDetailComponent } from './components/user-detail/user-detail.component'; import { UserImportListComponent } from './components/user-import/user-import-list.component'; diff --git a/client/src/app/slides/core/clock/core-clock-slide.component.ts b/client/src/app/slides/core/clock/core-clock-slide.component.ts index 760be78f5..f1e0727a3 100644 --- a/client/src/app/slides/core/clock/core-clock-slide.component.ts +++ b/client/src/app/slides/core/clock/core-clock-slide.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, OnDestroy } from '@angular/core'; import { BaseSlideComponent } from 'app/slides/base-slide-component'; -import { ServertimeService } from 'app/core/services/servertime.service'; +import { ServertimeService } from 'app/core/core-services/servertime.service'; import { Subscription } from 'rxjs'; @Component({