From 922172d9aef30d4a84afa467cb9e2d1c04e772c5 Mon Sep 17 00:00:00 2001 From: FrancescoMolinaro Date: Wed, 13 Dec 2023 11:55:10 +0100 Subject: [PATCH] refactor, improve code according to suggestions --- .../admin-notifications-routing.module.ts | 2 +- .../admin-notifications.module.ts | 4 +-- ...quality-assurance-source-data.resolver.ts} | 4 +-- src/app/core/core.module.ts | 6 ++-- ...ality-assurance-event-data.service.spec.ts | 0 .../quality-assurance-event-data.service.ts | 0 ...ty-assurance-event-object.resource-type.ts | 0 .../models/quality-assurance-event.model.ts | 0 ...y-assurance-source-object.resource-type.ts | 0 .../models/quality-assurance-source.model.ts | 0 ...ty-assurance-topic-object.resource-type.ts | 0 .../models/quality-assurance-topic.model.ts | 0 ...lity-assurance-source-data.service.spec.ts | 0 .../quality-assurance-source-data.service.ts | 0 ...ality-assurance-topic-data.service.spec.ts | 0 .../quality-assurance-topic-data.service.ts | 0 .../notifications-effects.ts} | 2 +- .../notifications-state.service.spec.ts} | 30 ++++++++-------- .../notifications-state.service.ts} | 8 ++--- .../notifications.module.ts} | 18 +++++----- .../notifications.reducer.ts} | 0 .../quality-assurance-events.component.html | 7 ++-- .../quality-assurance-events.component.scss | 0 ...quality-assurance-events.component.spec.ts | 4 +-- .../quality-assurance-events.component.ts | 8 +++-- .../project-entry-import-modal.component.html | 4 +-- .../project-entry-import-modal.component.scss | 0 ...oject-entry-import-modal.component.spec.ts | 0 .../project-entry-import-modal.component.ts | 2 +- .../quality-assurance-source.actions.ts | 8 ++--- .../quality-assurance-source.component.html | 0 .../quality-assurance-source.component.scss | 0 ...quality-assurance-source.component.spec.ts | 4 +-- .../quality-assurance-source.component.ts | 8 ++--- .../quality-assurance-source.effects.ts | 4 +-- .../quality-assurance-source.reducer.spec.ts | 0 .../quality-assurance-source.reducer.ts | 2 +- .../quality-assurance-source.service.spec.ts | 2 +- .../quality-assurance-source.service.ts | 4 +-- .../quality-assurance-topics.actions.ts | 8 ++--- .../quality-assurance-topics.component.html | 0 .../quality-assurance-topics.component.scss | 0 ...quality-assurance-topics.component.spec.ts | 4 +-- .../quality-assurance-topics.component.ts | 8 ++--- .../quality-assurance-topics.effects.ts | 4 +-- .../quality-assurance-topics.reducer.spec.ts | 0 .../quality-assurance-topics.reducer.ts | 2 +- .../quality-assurance-topics.service.spec.ts | 2 +- .../quality-assurance-topics.service.ts | 4 +-- .../selectors.ts | 6 ++-- src/app/shared/mocks/notifications.mock.ts | 34 +++++++++---------- 51 files changed, 104 insertions(+), 99 deletions(-) rename src/app/admin/admin-notifications/admin-quality-assurance-source-page-component/{admin-quality-assurance-source-data.reslover.ts => admin-quality-assurance-source-data.resolver.ts} (87%) rename src/app/core/{suggestion-notifications => notifications}/qa/events/quality-assurance-event-data.service.spec.ts (100%) rename src/app/core/{suggestion-notifications => notifications}/qa/events/quality-assurance-event-data.service.ts (100%) rename src/app/core/{suggestion-notifications => notifications}/qa/models/quality-assurance-event-object.resource-type.ts (100%) rename src/app/core/{suggestion-notifications => notifications}/qa/models/quality-assurance-event.model.ts (100%) rename src/app/core/{suggestion-notifications => notifications}/qa/models/quality-assurance-source-object.resource-type.ts (100%) rename src/app/core/{suggestion-notifications => notifications}/qa/models/quality-assurance-source.model.ts (100%) rename src/app/core/{suggestion-notifications => notifications}/qa/models/quality-assurance-topic-object.resource-type.ts (100%) rename src/app/core/{suggestion-notifications => notifications}/qa/models/quality-assurance-topic.model.ts (100%) rename src/app/core/{suggestion-notifications => notifications}/qa/source/quality-assurance-source-data.service.spec.ts (100%) rename src/app/core/{suggestion-notifications => notifications}/qa/source/quality-assurance-source-data.service.ts (100%) rename src/app/core/{suggestion-notifications => notifications}/qa/topics/quality-assurance-topic-data.service.spec.ts (100%) rename src/app/core/{suggestion-notifications => notifications}/qa/topics/quality-assurance-topic-data.service.ts (100%) rename src/app/{suggestion-notifications/suggestion-notifications-effects.ts => notifications/notifications-effects.ts} (84%) rename src/app/{suggestion-notifications/suggestion-notifications-state.service.spec.ts => notifications/notifications-state.service.spec.ts} (93%) rename src/app/{suggestion-notifications/suggestion-notifications-state.service.ts => notifications/notifications-state.service.ts} (95%) rename src/app/{suggestion-notifications/suggestion-notifications.module.ts => notifications/notifications.module.ts} (78%) rename src/app/{suggestion-notifications/suggestion-notifications.reducer.ts => notifications/notifications.reducer.ts} (100%) rename src/app/{suggestion-notifications => notifications}/qa/events/quality-assurance-events.component.html (96%) rename src/app/{suggestion-notifications => notifications}/qa/events/quality-assurance-events.component.scss (100%) rename src/app/{suggestion-notifications => notifications}/qa/events/quality-assurance-events.component.spec.ts (98%) rename src/app/{suggestion-notifications => notifications}/qa/events/quality-assurance-events.component.ts (98%) rename src/app/{suggestion-notifications => notifications}/qa/project-entry-import-modal/project-entry-import-modal.component.html (94%) rename src/app/{suggestion-notifications => notifications}/qa/project-entry-import-modal/project-entry-import-modal.component.scss (100%) rename src/app/{suggestion-notifications => notifications}/qa/project-entry-import-modal/project-entry-import-modal.component.spec.ts (100%) rename src/app/{suggestion-notifications => notifications}/qa/project-entry-import-modal/project-entry-import-modal.component.ts (98%) rename src/app/{suggestion-notifications => notifications}/qa/source/quality-assurance-source.actions.ts (85%) rename src/app/{suggestion-notifications => notifications}/qa/source/quality-assurance-source.component.html (100%) rename src/app/{suggestion-notifications => notifications}/qa/source/quality-assurance-source.component.scss (100%) rename src/app/{suggestion-notifications => notifications}/qa/source/quality-assurance-source.component.spec.ts (96%) rename src/app/{suggestion-notifications => notifications}/qa/source/quality-assurance-source.component.ts (92%) rename src/app/{suggestion-notifications => notifications}/qa/source/quality-assurance-source.effects.ts (94%) rename src/app/{suggestion-notifications => notifications}/qa/source/quality-assurance-source.reducer.spec.ts (100%) rename src/app/{suggestion-notifications => notifications}/qa/source/quality-assurance-source.reducer.ts (93%) rename src/app/{suggestion-notifications => notifications}/qa/source/quality-assurance-source.service.spec.ts (96%) rename src/app/{suggestion-notifications => notifications}/qa/source/quality-assurance-source.service.ts (91%) rename src/app/{suggestion-notifications => notifications}/qa/topics/quality-assurance-topics.actions.ts (84%) rename src/app/{suggestion-notifications => notifications}/qa/topics/quality-assurance-topics.component.html (100%) rename src/app/{suggestion-notifications => notifications}/qa/topics/quality-assurance-topics.component.scss (100%) rename src/app/{suggestion-notifications => notifications}/qa/topics/quality-assurance-topics.component.spec.ts (96%) rename src/app/{suggestion-notifications => notifications}/qa/topics/quality-assurance-topics.component.ts (93%) rename src/app/{suggestion-notifications => notifications}/qa/topics/quality-assurance-topics.effects.ts (94%) rename src/app/{suggestion-notifications => notifications}/qa/topics/quality-assurance-topics.reducer.spec.ts (100%) rename src/app/{suggestion-notifications => notifications}/qa/topics/quality-assurance-topics.reducer.ts (93%) rename src/app/{suggestion-notifications => notifications}/qa/topics/quality-assurance-topics.service.spec.ts (96%) rename src/app/{suggestion-notifications => notifications}/qa/topics/quality-assurance-topics.service.ts (92%) rename src/app/{suggestion-notifications => notifications}/selectors.ts (95%) diff --git a/src/app/admin/admin-notifications/admin-notifications-routing.module.ts b/src/app/admin/admin-notifications/admin-notifications-routing.module.ts index dc0d82c1d9..de12a48ade 100644 --- a/src/app/admin/admin-notifications/admin-notifications-routing.module.ts +++ b/src/app/admin/admin-notifications/admin-notifications-routing.module.ts @@ -11,7 +11,7 @@ import { AdminQualityAssuranceTopicsPageResolver } from './admin-quality-assuran import { AdminQualityAssuranceEventsPageResolver } from './admin-quality-assurance-events-page/admin-quality-assurance-events-page.resolver'; import { AdminQualityAssuranceSourcePageComponent } from './admin-quality-assurance-source-page-component/admin-quality-assurance-source-page.component'; import { AdminQualityAssuranceSourcePageResolver } from './admin-quality-assurance-source-page-component/admin-quality-assurance-source-page-resolver.service'; -import { SourceDataResolver } from './admin-quality-assurance-source-page-component/admin-quality-assurance-source-data.reslover'; +import { SourceDataResolver } from './admin-quality-assurance-source-page-component/admin-quality-assurance-source-data.resolver'; @NgModule({ imports: [ diff --git a/src/app/admin/admin-notifications/admin-notifications.module.ts b/src/app/admin/admin-notifications/admin-notifications.module.ts index 159baedfec..84475a1623 100644 --- a/src/app/admin/admin-notifications/admin-notifications.module.ts +++ b/src/app/admin/admin-notifications/admin-notifications.module.ts @@ -6,7 +6,7 @@ import { AdminNotificationsRoutingModule } from './admin-notifications-routing.m import { AdminQualityAssuranceTopicsPageComponent } from './admin-quality-assurance-topics-page/admin-quality-assurance-topics-page.component'; import { AdminQualityAssuranceEventsPageComponent } from './admin-quality-assurance-events-page/admin-quality-assurance-events-page.component'; import { AdminQualityAssuranceSourcePageComponent } from './admin-quality-assurance-source-page-component/admin-quality-assurance-source-page.component'; -import {SuggestionNotificationsModule} from '../../suggestion-notifications/suggestion-notifications.module'; +import {NotificationsModule} from '../../notifications/notifications.module'; @NgModule({ imports: [ @@ -14,7 +14,7 @@ import {SuggestionNotificationsModule} from '../../suggestion-notifications/sugg SharedModule, CoreModule.forRoot(), AdminNotificationsRoutingModule, - SuggestionNotificationsModule + NotificationsModule ], declarations: [ AdminQualityAssuranceTopicsPageComponent, diff --git a/src/app/admin/admin-notifications/admin-quality-assurance-source-page-component/admin-quality-assurance-source-data.reslover.ts b/src/app/admin/admin-notifications/admin-quality-assurance-source-page-component/admin-quality-assurance-source-data.resolver.ts similarity index 87% rename from src/app/admin/admin-notifications/admin-quality-assurance-source-page-component/admin-quality-assurance-source-data.reslover.ts rename to src/app/admin/admin-notifications/admin-quality-assurance-source-page-component/admin-quality-assurance-source-data.resolver.ts index 8475732aed..6201e0a743 100644 --- a/src/app/admin/admin-notifications/admin-quality-assurance-source-page-component/admin-quality-assurance-source-data.reslover.ts +++ b/src/app/admin/admin-notifications/admin-quality-assurance-source-page-component/admin-quality-assurance-source-data.resolver.ts @@ -3,8 +3,8 @@ import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot, Router } from '@a import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; import { PaginatedList } from '../../../core/data/paginated-list.model'; -import { QualityAssuranceSourceObject } from '../../../core/suggestion-notifications/qa/models/quality-assurance-source.model'; -import { QualityAssuranceSourceService } from '../../../suggestion-notifications/qa/source/quality-assurance-source.service'; +import { QualityAssuranceSourceObject } from '../../../core/notifications/qa/models/quality-assurance-source.model'; +import { QualityAssuranceSourceService } from '../../../notifications/qa/source/quality-assurance-source.service'; /** * This class represents a resolver that retrieve the route data before the route is activated. */ diff --git a/src/app/core/core.module.ts b/src/app/core/core.module.ts index e176af7d55..b3abf5f877 100644 --- a/src/app/core/core.module.ts +++ b/src/app/core/core.module.ts @@ -157,9 +157,9 @@ import { SequenceService } from './shared/sequence.service'; import { CoreState } from './core-state.model'; import { GroupDataService } from './eperson/group-data.service'; import { SubmissionAccessesModel } from './config/models/config-submission-accesses.model'; -import { QualityAssuranceTopicObject } from './suggestion-notifications/qa/models/quality-assurance-topic.model'; -import { QualityAssuranceEventObject } from './suggestion-notifications/qa/models/quality-assurance-event.model'; -import { QualityAssuranceSourceObject } from './suggestion-notifications/qa/models/quality-assurance-source.model'; +import { QualityAssuranceTopicObject } from './notifications/qa/models/quality-assurance-topic.model'; +import { QualityAssuranceEventObject } from './notifications/qa/models/quality-assurance-event.model'; +import { QualityAssuranceSourceObject } from './notifications/qa/models/quality-assurance-source.model'; import { RatingAdvancedWorkflowInfo } from './tasks/models/rating-advanced-workflow-info.model'; import { AdvancedWorkflowInfo } from './tasks/models/advanced-workflow-info.model'; import { SelectReviewerAdvancedWorkflowInfo } from './tasks/models/select-reviewer-advanced-workflow-info.model'; diff --git a/src/app/core/suggestion-notifications/qa/events/quality-assurance-event-data.service.spec.ts b/src/app/core/notifications/qa/events/quality-assurance-event-data.service.spec.ts similarity index 100% rename from src/app/core/suggestion-notifications/qa/events/quality-assurance-event-data.service.spec.ts rename to src/app/core/notifications/qa/events/quality-assurance-event-data.service.spec.ts diff --git a/src/app/core/suggestion-notifications/qa/events/quality-assurance-event-data.service.ts b/src/app/core/notifications/qa/events/quality-assurance-event-data.service.ts similarity index 100% rename from src/app/core/suggestion-notifications/qa/events/quality-assurance-event-data.service.ts rename to src/app/core/notifications/qa/events/quality-assurance-event-data.service.ts diff --git a/src/app/core/suggestion-notifications/qa/models/quality-assurance-event-object.resource-type.ts b/src/app/core/notifications/qa/models/quality-assurance-event-object.resource-type.ts similarity index 100% rename from src/app/core/suggestion-notifications/qa/models/quality-assurance-event-object.resource-type.ts rename to src/app/core/notifications/qa/models/quality-assurance-event-object.resource-type.ts diff --git a/src/app/core/suggestion-notifications/qa/models/quality-assurance-event.model.ts b/src/app/core/notifications/qa/models/quality-assurance-event.model.ts similarity index 100% rename from src/app/core/suggestion-notifications/qa/models/quality-assurance-event.model.ts rename to src/app/core/notifications/qa/models/quality-assurance-event.model.ts diff --git a/src/app/core/suggestion-notifications/qa/models/quality-assurance-source-object.resource-type.ts b/src/app/core/notifications/qa/models/quality-assurance-source-object.resource-type.ts similarity index 100% rename from src/app/core/suggestion-notifications/qa/models/quality-assurance-source-object.resource-type.ts rename to src/app/core/notifications/qa/models/quality-assurance-source-object.resource-type.ts diff --git a/src/app/core/suggestion-notifications/qa/models/quality-assurance-source.model.ts b/src/app/core/notifications/qa/models/quality-assurance-source.model.ts similarity index 100% rename from src/app/core/suggestion-notifications/qa/models/quality-assurance-source.model.ts rename to src/app/core/notifications/qa/models/quality-assurance-source.model.ts diff --git a/src/app/core/suggestion-notifications/qa/models/quality-assurance-topic-object.resource-type.ts b/src/app/core/notifications/qa/models/quality-assurance-topic-object.resource-type.ts similarity index 100% rename from src/app/core/suggestion-notifications/qa/models/quality-assurance-topic-object.resource-type.ts rename to src/app/core/notifications/qa/models/quality-assurance-topic-object.resource-type.ts diff --git a/src/app/core/suggestion-notifications/qa/models/quality-assurance-topic.model.ts b/src/app/core/notifications/qa/models/quality-assurance-topic.model.ts similarity index 100% rename from src/app/core/suggestion-notifications/qa/models/quality-assurance-topic.model.ts rename to src/app/core/notifications/qa/models/quality-assurance-topic.model.ts diff --git a/src/app/core/suggestion-notifications/qa/source/quality-assurance-source-data.service.spec.ts b/src/app/core/notifications/qa/source/quality-assurance-source-data.service.spec.ts similarity index 100% rename from src/app/core/suggestion-notifications/qa/source/quality-assurance-source-data.service.spec.ts rename to src/app/core/notifications/qa/source/quality-assurance-source-data.service.spec.ts diff --git a/src/app/core/suggestion-notifications/qa/source/quality-assurance-source-data.service.ts b/src/app/core/notifications/qa/source/quality-assurance-source-data.service.ts similarity index 100% rename from src/app/core/suggestion-notifications/qa/source/quality-assurance-source-data.service.ts rename to src/app/core/notifications/qa/source/quality-assurance-source-data.service.ts diff --git a/src/app/core/suggestion-notifications/qa/topics/quality-assurance-topic-data.service.spec.ts b/src/app/core/notifications/qa/topics/quality-assurance-topic-data.service.spec.ts similarity index 100% rename from src/app/core/suggestion-notifications/qa/topics/quality-assurance-topic-data.service.spec.ts rename to src/app/core/notifications/qa/topics/quality-assurance-topic-data.service.spec.ts diff --git a/src/app/core/suggestion-notifications/qa/topics/quality-assurance-topic-data.service.ts b/src/app/core/notifications/qa/topics/quality-assurance-topic-data.service.ts similarity index 100% rename from src/app/core/suggestion-notifications/qa/topics/quality-assurance-topic-data.service.ts rename to src/app/core/notifications/qa/topics/quality-assurance-topic-data.service.ts diff --git a/src/app/suggestion-notifications/suggestion-notifications-effects.ts b/src/app/notifications/notifications-effects.ts similarity index 84% rename from src/app/suggestion-notifications/suggestion-notifications-effects.ts rename to src/app/notifications/notifications-effects.ts index ac5d9f8f92..bf70a05855 100644 --- a/src/app/suggestion-notifications/suggestion-notifications-effects.ts +++ b/src/app/notifications/notifications-effects.ts @@ -1,7 +1,7 @@ import { QualityAssuranceSourceEffects } from './qa/source/quality-assurance-source.effects'; import { QualityAssuranceTopicsEffects } from './qa/topics/quality-assurance-topics.effects'; -export const suggestionNotificationsEffects = [ +export const notificationsEffects = [ QualityAssuranceTopicsEffects, QualityAssuranceSourceEffects ]; diff --git a/src/app/suggestion-notifications/suggestion-notifications-state.service.spec.ts b/src/app/notifications/notifications-state.service.spec.ts similarity index 93% rename from src/app/suggestion-notifications/suggestion-notifications-state.service.spec.ts rename to src/app/notifications/notifications-state.service.spec.ts index ac669ed954..f07b4f5697 100644 --- a/src/app/suggestion-notifications/suggestion-notifications-state.service.spec.ts +++ b/src/app/notifications/notifications-state.service.spec.ts @@ -2,8 +2,8 @@ import { TestBed } from '@angular/core/testing'; import { Store, StoreModule } from '@ngrx/store'; import { provideMockStore } from '@ngrx/store/testing'; import { cold } from 'jasmine-marbles'; -import { suggestionNotificationsReducers } from './suggestion-notifications.reducer'; -import { SuggestionNotificationsStateService } from './suggestion-notifications-state.service'; +import { suggestionNotificationsReducers } from './notifications.reducer'; +import { NotificationsStateService } from './notifications-state.service'; import { qualityAssuranceSourceObjectMissingPid, qualityAssuranceSourceObjectMoreAbstract, @@ -16,7 +16,7 @@ import { RetrieveAllTopicsAction } from './qa/topics/quality-assurance-topics.ac import { RetrieveAllSourceAction } from './qa/source/quality-assurance-source.actions'; describe('NotificationsStateService', () => { - let service: SuggestionNotificationsStateService; + let service: NotificationsStateService; let serviceAsAny: any; let store: any; let initialState: any; @@ -67,14 +67,14 @@ describe('NotificationsStateService', () => { ], providers: [ provideMockStore({ initialState }), - { provide: SuggestionNotificationsStateService, useValue: service } + { provide: NotificationsStateService, useValue: service } ] }).compileComponents(); }); beforeEach(() => { store = TestBed.get(Store); - service = new SuggestionNotificationsStateService(store); + service = new NotificationsStateService(store); serviceAsAny = service; spyOn(store, 'dispatch'); }); @@ -159,14 +159,14 @@ describe('NotificationsStateService', () => { ], providers: [ provideMockStore({ initialState }), - { provide: SuggestionNotificationsStateService, useValue: service } + { provide: NotificationsStateService, useValue: service } ] }).compileComponents(); }); beforeEach(() => { store = TestBed.get(Store); - service = new SuggestionNotificationsStateService(store); + service = new NotificationsStateService(store); serviceAsAny = service; spyOn(store, 'dispatch'); }); @@ -255,14 +255,14 @@ describe('NotificationsStateService', () => { ], providers: [ provideMockStore({ initialState }), - { provide: SuggestionNotificationsStateService, useValue: service } + { provide: NotificationsStateService, useValue: service } ] }).compileComponents(); }); beforeEach(() => { store = TestBed.get(Store); - service = new SuggestionNotificationsStateService(store); + service = new NotificationsStateService(store); serviceAsAny = service; spyOn(store, 'dispatch'); }); @@ -325,14 +325,14 @@ describe('NotificationsStateService', () => { ], providers: [ provideMockStore({ initialState }), - { provide: SuggestionNotificationsStateService, useValue: service } + { provide: NotificationsStateService, useValue: service } ] }).compileComponents(); }); beforeEach(() => { store = TestBed.get(Store); - service = new SuggestionNotificationsStateService(store); + service = new NotificationsStateService(store); serviceAsAny = service; spyOn(store, 'dispatch'); }); @@ -417,14 +417,14 @@ describe('NotificationsStateService', () => { ], providers: [ provideMockStore({ initialState }), - { provide: SuggestionNotificationsStateService, useValue: service } + { provide: NotificationsStateService, useValue: service } ] }).compileComponents(); }); beforeEach(() => { store = TestBed.get(Store); - service = new SuggestionNotificationsStateService(store); + service = new NotificationsStateService(store); serviceAsAny = service; spyOn(store, 'dispatch'); }); @@ -513,14 +513,14 @@ describe('NotificationsStateService', () => { ], providers: [ provideMockStore({ initialState }), - { provide: SuggestionNotificationsStateService, useValue: service } + { provide: NotificationsStateService, useValue: service } ] }).compileComponents(); }); beforeEach(() => { store = TestBed.get(Store); - service = new SuggestionNotificationsStateService(store); + service = new NotificationsStateService(store); serviceAsAny = service; spyOn(store, 'dispatch'); }); diff --git a/src/app/suggestion-notifications/suggestion-notifications-state.service.ts b/src/app/notifications/notifications-state.service.ts similarity index 95% rename from src/app/suggestion-notifications/suggestion-notifications-state.service.ts rename to src/app/notifications/notifications-state.service.ts index ec1ea2e039..c123cfa304 100644 --- a/src/app/suggestion-notifications/suggestion-notifications-state.service.ts +++ b/src/app/notifications/notifications-state.service.ts @@ -16,17 +16,17 @@ import { getQualityAssuranceSourceCurrentPageSelector, getQualityAssuranceSourceTotalsSelector } from './selectors'; -import { QualityAssuranceTopicObject } from '../core/suggestion-notifications/qa/models/quality-assurance-topic.model'; -import { SuggestionNotificationsState } from './suggestion-notifications.reducer'; +import { QualityAssuranceTopicObject } from '../core/notifications/qa/models/quality-assurance-topic.model'; +import { SuggestionNotificationsState } from './notifications.reducer'; import { RetrieveAllTopicsAction } from './qa/topics/quality-assurance-topics.actions'; -import { QualityAssuranceSourceObject } from '../core/suggestion-notifications/qa/models/quality-assurance-source.model'; +import { QualityAssuranceSourceObject } from '../core/notifications/qa/models/quality-assurance-source.model'; import { RetrieveAllSourceAction } from './qa/source/quality-assurance-source.actions'; /** * The service handling the Notifications State. */ @Injectable() -export class SuggestionNotificationsStateService { +export class NotificationsStateService { /** * Initialize the service variables. diff --git a/src/app/suggestion-notifications/suggestion-notifications.module.ts b/src/app/notifications/notifications.module.ts similarity index 78% rename from src/app/suggestion-notifications/suggestion-notifications.module.ts rename to src/app/notifications/notifications.module.ts index eac527d672..7003ed3cc8 100644 --- a/src/app/suggestion-notifications/suggestion-notifications.module.ts +++ b/src/app/notifications/notifications.module.ts @@ -8,16 +8,16 @@ import { SharedModule } from '../shared/shared.module'; import { storeModuleConfig } from '../app.reducer'; import { QualityAssuranceTopicsComponent } from './qa/topics/quality-assurance-topics.component'; import { QualityAssuranceEventsComponent } from './qa/events/quality-assurance-events.component'; -import { SuggestionNotificationsStateService } from './suggestion-notifications-state.service'; -import { suggestionNotificationsReducers, SuggestionNotificationsState } from './suggestion-notifications.reducer'; -import { suggestionNotificationsEffects } from './suggestion-notifications-effects'; +import { NotificationsStateService } from './notifications-state.service'; +import { suggestionNotificationsReducers, SuggestionNotificationsState } from './notifications.reducer'; +import { notificationsEffects } from './notifications-effects'; import { QualityAssuranceTopicsService } from './qa/topics/quality-assurance-topics.service'; import { QualityAssuranceTopicDataService -} from '../core/suggestion-notifications/qa/topics/quality-assurance-topic-data.service'; +} from '../core/notifications/qa/topics/quality-assurance-topic-data.service'; import { QualityAssuranceEventDataService -} from '../core/suggestion-notifications/qa/events/quality-assurance-event-data.service'; +} from '../core/notifications/qa/events/quality-assurance-event-data.service'; import { ProjectEntryImportModalComponent } from './qa/project-entry-import-modal/project-entry-import-modal.component'; import { TranslateModule } from '@ngx-translate/core'; import { SearchModule } from '../shared/search/search.module'; @@ -25,7 +25,7 @@ import { QualityAssuranceSourceComponent } from './qa/source/quality-assurance-s import { QualityAssuranceSourceService } from './qa/source/quality-assurance-source.service'; import { QualityAssuranceSourceDataService -} from '../core/suggestion-notifications/qa/source/quality-assurance-source-data.service'; +} from '../core/notifications/qa/source/quality-assurance-source-data.service'; const MODULES = [ CommonModule, @@ -33,7 +33,7 @@ const MODULES = [ SearchModule, CoreModule.forRoot(), StoreModule.forFeature('suggestionNotifications', suggestionNotificationsReducers, storeModuleConfig as StoreConfig), - EffectsModule.forFeature(suggestionNotificationsEffects), + EffectsModule.forFeature(notificationsEffects), TranslateModule ]; @@ -50,7 +50,7 @@ const ENTRY_COMPONENTS = [ ]; const PROVIDERS = [ - SuggestionNotificationsStateService, + NotificationsStateService, QualityAssuranceTopicsService, QualityAssuranceSourceService, QualityAssuranceTopicDataService, @@ -82,5 +82,5 @@ const PROVIDERS = [ /** * This module handles all components that are necessary for the OpenAIRE components */ -export class SuggestionNotificationsModule { +export class NotificationsModule { } diff --git a/src/app/suggestion-notifications/suggestion-notifications.reducer.ts b/src/app/notifications/notifications.reducer.ts similarity index 100% rename from src/app/suggestion-notifications/suggestion-notifications.reducer.ts rename to src/app/notifications/notifications.reducer.ts diff --git a/src/app/suggestion-notifications/qa/events/quality-assurance-events.component.html b/src/app/notifications/qa/events/quality-assurance-events.component.html similarity index 96% rename from src/app/suggestion-notifications/qa/events/quality-assurance-events.component.html rename to src/app/notifications/qa/events/quality-assurance-events.component.html index 7f1b166d24..d6bd828ed4 100644 --- a/src/app/suggestion-notifications/qa/events/quality-assurance-events.component.html +++ b/src/app/notifications/qa/events/quality-assurance-events.component.html @@ -52,13 +52,14 @@ {{eventElement.title}} {{eventElement.title}}

{{'quality-assurance.event.table.pidtype' | translate}} {{eventElement.event.message.type}}

{{'quality-assurance.event.table.pidvalue' | translate}}
- + {{eventElement.event.message.value}} {{eventElement.event.message.value}} @@ -84,7 +85,7 @@

{{'quality-assurance.event.table.project' | translate}}
- {{eventElement.event.message.title}} + {{eventElement.event.message.title}}

{{'quality-assurance.event.table.acronym' | translate}} {{eventElement.event.message.acronym}}
@@ -96,7 +97,7 @@


{{(eventElement.hasProject ? 'quality-assurance.event.project.found' : 'quality-assurance.event.project.notFound') | translate}} - {{eventElement.handle}} + {{eventElement.handle}}