mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 18:44:14 +00:00
[DURACOM-191] fix runtime errors for store features
This commit is contained in:
@@ -33,6 +33,7 @@ import {
|
|||||||
import {
|
import {
|
||||||
QualityAssuranceEventsPageComponent
|
QualityAssuranceEventsPageComponent
|
||||||
} from '../../quality-assurance-notifications-pages/quality-assurance-events-page/quality-assurance-events-page.component';
|
} from '../../quality-assurance-notifications-pages/quality-assurance-events-page/quality-assurance-events-page.component';
|
||||||
|
import { provideSuggestionNotifications } from '../../notifications/provide-suggestion-notifications';
|
||||||
|
|
||||||
const providers = [
|
const providers = [
|
||||||
I18nBreadcrumbResolver,
|
I18nBreadcrumbResolver,
|
||||||
@@ -42,7 +43,8 @@ const providers = [
|
|||||||
QualityAssuranceEventsPageResolver,
|
QualityAssuranceEventsPageResolver,
|
||||||
QualityAssuranceSourcePageResolver,
|
QualityAssuranceSourcePageResolver,
|
||||||
QualityAssuranceBreadcrumbResolver,
|
QualityAssuranceBreadcrumbResolver,
|
||||||
QualityAssuranceBreadcrumbService
|
QualityAssuranceBreadcrumbService,
|
||||||
|
provideSuggestionNotifications(),
|
||||||
];
|
];
|
||||||
|
|
||||||
export const ROUTES: Route[] = [
|
export const ROUTES: Route[] = [
|
||||||
|
@@ -21,7 +21,7 @@ import { FindAllData, FindAllDataImpl } from '../../../data/base/find-all-data';
|
|||||||
/**
|
/**
|
||||||
* The service handling all Quality Assurance topic REST requests.
|
* The service handling all Quality Assurance topic REST requests.
|
||||||
*/
|
*/
|
||||||
@Injectable()
|
@Injectable({providedIn: 'root'})
|
||||||
@dataService(QUALITY_ASSURANCE_TOPIC_OBJECT)
|
@dataService(QUALITY_ASSURANCE_TOPIC_OBJECT)
|
||||||
export class QualityAssuranceTopicDataService extends IdentifiableDataService<QualityAssuranceTopicObject> {
|
export class QualityAssuranceTopicDataService extends IdentifiableDataService<QualityAssuranceTopicObject> {
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@ import { DefaultChangeAnalyzer } from '../../data/default-change-analyzer.servic
|
|||||||
/**
|
/**
|
||||||
* Service that retrieves Suggestion Source data
|
* Service that retrieves Suggestion Source data
|
||||||
*/
|
*/
|
||||||
@Injectable()
|
@Injectable({providedIn: 'root'})
|
||||||
@dataService(SUGGESTION_SOURCE)
|
@dataService(SUGGESTION_SOURCE)
|
||||||
export class SuggestionSourceDataService extends IdentifiableDataService<SuggestionSource> {
|
export class SuggestionSourceDataService extends IdentifiableDataService<SuggestionSource> {
|
||||||
|
|
||||||
|
@@ -3,13 +3,15 @@ import { LinkMenuItemModel } from '../shared/menu/menu-item/models/link.model';
|
|||||||
import { ThemedHomePageComponent } from './themed-home-page.component';
|
import { ThemedHomePageComponent } from './themed-home-page.component';
|
||||||
import { MenuItemType } from '../shared/menu/menu-item-type.model';
|
import { MenuItemType } from '../shared/menu/menu-item-type.model';
|
||||||
import { Route } from '@angular/router';
|
import { Route } from '@angular/router';
|
||||||
|
import { provideSuggestionNotifications } from '../notifications/provide-suggestion-notifications';
|
||||||
|
|
||||||
export const ROUTES: Route[] = [
|
export const ROUTES: Route[] = [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: ThemedHomePageComponent,
|
component: ThemedHomePageComponent,
|
||||||
providers: [
|
providers: [
|
||||||
HomePageResolver
|
HomePageResolver,
|
||||||
|
provideSuggestionNotifications()
|
||||||
],
|
],
|
||||||
pathMatch: 'full',
|
pathMatch: 'full',
|
||||||
data: {
|
data: {
|
||||||
|
@@ -3,12 +3,14 @@ import { AuthenticatedGuard } from '../core/auth/authenticated.guard';
|
|||||||
import {
|
import {
|
||||||
ThemedSubmissionImportExternalComponent
|
ThemedSubmissionImportExternalComponent
|
||||||
} from '../submission/import-external/themed-submission-import-external.component';
|
} from '../submission/import-external/themed-submission-import-external.component';
|
||||||
|
import { provideSubmission } from '../submission/provide-submission';
|
||||||
|
|
||||||
export const ROUTES: Route[] = [
|
export const ROUTES: Route[] = [
|
||||||
{
|
{
|
||||||
canActivate: [AuthenticatedGuard],
|
canActivate: [AuthenticatedGuard],
|
||||||
path: '',
|
path: '',
|
||||||
component: ThemedSubmissionImportExternalComponent,
|
component: ThemedSubmissionImportExternalComponent,
|
||||||
|
providers: [provideSubmission()],
|
||||||
pathMatch: 'full',
|
pathMatch: 'full',
|
||||||
data: {
|
data: {
|
||||||
title: 'submission.import-external.page.title'
|
title: 'submission.import-external.page.title'
|
||||||
|
@@ -2,6 +2,7 @@ import { MyDSpaceGuard } from './my-dspace.guard';
|
|||||||
import { ThemedMyDSpacePageComponent } from './themed-my-dspace-page.component';
|
import { ThemedMyDSpacePageComponent } from './themed-my-dspace-page.component';
|
||||||
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';
|
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';
|
||||||
import { Route } from '@angular/router';
|
import { Route } from '@angular/router';
|
||||||
|
import { provideSuggestionNotifications } from '../notifications/provide-suggestion-notifications';
|
||||||
|
|
||||||
export const ROUTES: Route[] = [
|
export const ROUTES: Route[] = [
|
||||||
{
|
{
|
||||||
@@ -10,6 +11,7 @@ export const ROUTES: Route[] = [
|
|||||||
resolve: {
|
resolve: {
|
||||||
breadcrumb: I18nBreadcrumbResolver
|
breadcrumb: I18nBreadcrumbResolver
|
||||||
},
|
},
|
||||||
|
providers: [provideSuggestionNotifications()],
|
||||||
data: {title: 'mydspace.title', breadcrumbKey: 'mydspace'},
|
data: {title: 'mydspace.title', breadcrumbKey: 'mydspace'},
|
||||||
canActivate: [
|
canActivate: [
|
||||||
MyDSpaceGuard
|
MyDSpaceGuard
|
||||||
|
@@ -17,7 +17,6 @@ import { UploadModule } from '../shared/upload/upload.module';
|
|||||||
import {
|
import {
|
||||||
MyDspaceQaEventsNotificationsComponent
|
MyDspaceQaEventsNotificationsComponent
|
||||||
} from './my-dspace-qa-events-notifications/my-dspace-qa-events-notifications.component';
|
} from './my-dspace-qa-events-notifications/my-dspace-qa-events-notifications.component';
|
||||||
import { NotificationsModule } from '../notifications/notifications.module';
|
|
||||||
|
|
||||||
const DECLARATIONS = [
|
const DECLARATIONS = [
|
||||||
MyDSpacePageComponent,
|
MyDSpacePageComponent,
|
||||||
@@ -34,7 +33,6 @@ const DECLARATIONS = [
|
|||||||
CommonModule,
|
CommonModule,
|
||||||
SearchModule,
|
SearchModule,
|
||||||
UploadModule,
|
UploadModule,
|
||||||
NotificationsModule,
|
|
||||||
...DECLARATIONS
|
...DECLARATIONS
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
|
@@ -25,7 +25,7 @@ import { RetrieveAllSourceAction } from './qa/source/quality-assurance-source.ac
|
|||||||
/**
|
/**
|
||||||
* The service handling the Notifications State.
|
* The service handling the Notifications State.
|
||||||
*/
|
*/
|
||||||
@Injectable()
|
@Injectable({providedIn: 'root'})
|
||||||
export class NotificationsStateService {
|
export class NotificationsStateService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1,108 +0,0 @@
|
|||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { Action, StoreConfig, StoreModule } from '@ngrx/store';
|
|
||||||
import { EffectsModule } from '@ngrx/effects';
|
|
||||||
|
|
||||||
import { storeModuleConfig } from '../app.reducer';
|
|
||||||
import { QualityAssuranceTopicsComponent } from './qa/topics/quality-assurance-topics.component';
|
|
||||||
import { QualityAssuranceEventsComponent } from './qa/events/quality-assurance-events.component';
|
|
||||||
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/notifications/qa/topics/quality-assurance-topic-data.service';
|
|
||||||
import {
|
|
||||||
QualityAssuranceEventDataService
|
|
||||||
} 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';
|
|
||||||
import { QualityAssuranceSourceComponent } from './qa/source/quality-assurance-source.component';
|
|
||||||
import { QualityAssuranceSourceService } from './qa/source/quality-assurance-source.service';
|
|
||||||
import {
|
|
||||||
QualityAssuranceSourceDataService
|
|
||||||
} from '../core/notifications/qa/source/quality-assurance-source-data.service';
|
|
||||||
import { EPersonDataComponent } from './qa/events/ePerson-data/ePerson-data.component';
|
|
||||||
import { SuggestionActionsComponent } from './suggestion-actions/suggestion-actions.component';
|
|
||||||
import { PublicationClaimComponent } from './suggestion-targets/publication-claim/publication-claim.component';
|
|
||||||
import { SuggestionListElementComponent } from './suggestion-list-element/suggestion-list-element.component';
|
|
||||||
import {
|
|
||||||
SuggestionEvidencesComponent
|
|
||||||
} from './suggestion-list-element/suggestion-evidences/suggestion-evidences.component';
|
|
||||||
import { SuggestionsPopupComponent } from './suggestions-popup/suggestions-popup.component';
|
|
||||||
import { SuggestionsNotificationComponent } from './suggestions-notification/suggestions-notification.component';
|
|
||||||
import { SuggestionsService } from './suggestions.service';
|
|
||||||
import { SuggestionSourceDataService } from '../core/notifications/source/suggestion-source-data.service';
|
|
||||||
import { SuggestionTargetDataService } from '../core/notifications/target/suggestion-target-data.service';
|
|
||||||
import { SuggestionTargetsStateService } from './suggestion-targets/suggestion-targets.state.service';
|
|
||||||
import { SuggestionsDataService } from '../core/notifications/suggestions-data.service';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const MODULES = [
|
|
||||||
CommonModule,
|
|
||||||
SearchModule,
|
|
||||||
StoreModule.forFeature('suggestionNotifications', suggestionNotificationsReducers, storeModuleConfig as StoreConfig<SuggestionNotificationsState, Action>),
|
|
||||||
EffectsModule.forFeature(notificationsEffects),
|
|
||||||
TranslateModule
|
|
||||||
];
|
|
||||||
|
|
||||||
const COMPONENTS = [
|
|
||||||
QualityAssuranceTopicsComponent,
|
|
||||||
QualityAssuranceEventsComponent,
|
|
||||||
QualityAssuranceSourceComponent,
|
|
||||||
EPersonDataComponent,
|
|
||||||
PublicationClaimComponent,
|
|
||||||
SuggestionActionsComponent,
|
|
||||||
SuggestionListElementComponent,
|
|
||||||
SuggestionEvidencesComponent,
|
|
||||||
SuggestionsPopupComponent,
|
|
||||||
SuggestionsNotificationComponent
|
|
||||||
];
|
|
||||||
|
|
||||||
const DIRECTIVES = [ ];
|
|
||||||
|
|
||||||
const ENTRY_COMPONENTS = [
|
|
||||||
ProjectEntryImportModalComponent
|
|
||||||
];
|
|
||||||
|
|
||||||
const PROVIDERS = [
|
|
||||||
NotificationsStateService,
|
|
||||||
QualityAssuranceTopicsService,
|
|
||||||
QualityAssuranceSourceService,
|
|
||||||
QualityAssuranceTopicDataService,
|
|
||||||
QualityAssuranceSourceDataService,
|
|
||||||
QualityAssuranceEventDataService,
|
|
||||||
SuggestionsService,
|
|
||||||
SuggestionSourceDataService,
|
|
||||||
SuggestionTargetDataService,
|
|
||||||
SuggestionTargetsStateService,
|
|
||||||
SuggestionsDataService
|
|
||||||
];
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
...MODULES,
|
|
||||||
...COMPONENTS,
|
|
||||||
...DIRECTIVES,
|
|
||||||
...ENTRY_COMPONENTS,
|
|
||||||
],
|
|
||||||
providers: [
|
|
||||||
...PROVIDERS
|
|
||||||
],
|
|
||||||
entryComponents: [
|
|
||||||
...ENTRY_COMPONENTS
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
...COMPONENTS,
|
|
||||||
...DIRECTIVES,
|
|
||||||
]
|
|
||||||
})
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This module handles all components that are necessary for the OpenAIRE components
|
|
||||||
*/
|
|
||||||
export class NotificationsModule {
|
|
||||||
}
|
|
15
src/app/notifications/provide-suggestion-notifications.ts
Normal file
15
src/app/notifications/provide-suggestion-notifications.ts
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import { importProvidersFrom, makeEnvironmentProviders } from '@angular/core';
|
||||||
|
import { EffectsModule } from '@ngrx/effects';
|
||||||
|
import { Action, StoreConfig, StoreModule } from '@ngrx/store';
|
||||||
|
import { storeModuleConfig } from '../app.reducer';
|
||||||
|
import { suggestionNotificationsReducers, SuggestionNotificationsState } from './notifications.reducer';
|
||||||
|
import { notificationsEffects } from './notifications-effects';
|
||||||
|
|
||||||
|
export const provideSuggestionNotifications = () => {
|
||||||
|
return makeEnvironmentProviders([
|
||||||
|
importProvidersFrom(
|
||||||
|
StoreModule.forFeature('suggestionNotifications', suggestionNotificationsReducers, storeModuleConfig as StoreConfig<SuggestionNotificationsState, Action>),
|
||||||
|
EffectsModule.forFeature(notificationsEffects),
|
||||||
|
),
|
||||||
|
]);
|
||||||
|
};
|
@@ -18,7 +18,7 @@ import { getFirstCompletedRemoteData } from '../../../core/shared/operators';
|
|||||||
/**
|
/**
|
||||||
* The service handling all Quality Assurance source requests to the REST service.
|
* The service handling all Quality Assurance source requests to the REST service.
|
||||||
*/
|
*/
|
||||||
@Injectable()
|
@Injectable({providedIn: 'root'})
|
||||||
export class QualityAssuranceSourceService {
|
export class QualityAssuranceSourceService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -18,7 +18,7 @@ import { hasValue } from '../../../shared/empty.util';
|
|||||||
/**
|
/**
|
||||||
* The service handling all Quality Assurance topic requests to the REST service.
|
* The service handling all Quality Assurance topic requests to the REST service.
|
||||||
*/
|
*/
|
||||||
@Injectable()
|
@Injectable({providedIn: 'root'})
|
||||||
export class QualityAssuranceTopicsService {
|
export class QualityAssuranceTopicsService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1,12 +1,14 @@
|
|||||||
import { Route } from '@angular/router';
|
import { Route } from '@angular/router';
|
||||||
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';
|
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';
|
||||||
import { ThemedProfilePageComponent } from './themed-profile-page.component';
|
import { ThemedProfilePageComponent } from './themed-profile-page.component';
|
||||||
|
import { provideSuggestionNotifications } from '../notifications/provide-suggestion-notifications';
|
||||||
|
|
||||||
export const ROUTES: Route[] = [
|
export const ROUTES: Route[] = [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
pathMatch: 'full',
|
pathMatch: 'full',
|
||||||
component: ThemedProfilePageComponent,
|
component: ThemedProfilePageComponent,
|
||||||
|
providers: [provideSuggestionNotifications()],
|
||||||
resolve: {breadcrumb: I18nBreadcrumbResolver},
|
resolve: {breadcrumb: I18nBreadcrumbResolver},
|
||||||
data: {breadcrumbKey: 'profile', title: 'profile.title'}
|
data: {breadcrumbKey: 'profile', title: 'profile.title'}
|
||||||
}
|
}
|
||||||
|
@@ -34,6 +34,7 @@ import {
|
|||||||
import { QualityAssuranceBreadcrumbResolver } from '../core/breadcrumbs/quality-assurance-breadcrumb.resolver';
|
import { QualityAssuranceBreadcrumbResolver } from '../core/breadcrumbs/quality-assurance-breadcrumb.resolver';
|
||||||
import { QualityAssuranceBreadcrumbService } from '../core/breadcrumbs/quality-assurance-breadcrumb.service';
|
import { QualityAssuranceBreadcrumbService } from '../core/breadcrumbs/quality-assurance-breadcrumb.service';
|
||||||
import { SourceDataResolver } from './quality-assurance-source-page-component/quality-assurance-source-data.resolver';
|
import { SourceDataResolver } from './quality-assurance-source-page-component/quality-assurance-source-data.resolver';
|
||||||
|
import { provideSuggestionNotifications } from '../notifications/provide-suggestion-notifications';
|
||||||
|
|
||||||
const providers = [
|
const providers = [
|
||||||
I18nBreadcrumbResolver,
|
I18nBreadcrumbResolver,
|
||||||
@@ -45,7 +46,8 @@ const providers = [
|
|||||||
QualityAssuranceEventsPageResolver,
|
QualityAssuranceEventsPageResolver,
|
||||||
QualityAssuranceSourcePageResolver,
|
QualityAssuranceSourcePageResolver,
|
||||||
QualityAssuranceBreadcrumbResolver,
|
QualityAssuranceBreadcrumbResolver,
|
||||||
QualityAssuranceBreadcrumbService
|
QualityAssuranceBreadcrumbService,
|
||||||
|
provideSuggestionNotifications()
|
||||||
];
|
];
|
||||||
|
|
||||||
export const ROUTES: Route[] = [
|
export const ROUTES: Route[] = [
|
||||||
@@ -131,10 +133,3 @@ export const ROUTES: Route[] = [
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
|
||||||
* Routing module for the Notifications section of the admin sidebar
|
|
||||||
*/
|
|
||||||
export class NotificationsPageRoutingModule {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
@@ -1,26 +0,0 @@
|
|||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
import {
|
|
||||||
QualityAssuranceTopicsPageComponent
|
|
||||||
} from './quality-assurance-topics-page/quality-assurance-topics-page.component';
|
|
||||||
import {
|
|
||||||
QualityAssuranceEventsPageComponent
|
|
||||||
} from './quality-assurance-events-page/quality-assurance-events-page.component';
|
|
||||||
import { NotificationsModule } from '../notifications/notifications.module';
|
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
NotificationsModule,
|
|
||||||
QualityAssuranceEventsPageComponent,
|
|
||||||
QualityAssuranceTopicsPageComponent
|
|
||||||
],
|
|
||||||
entryComponents: []
|
|
||||||
})
|
|
||||||
/**
|
|
||||||
* This module handles all components related to the notifications pages
|
|
||||||
*/
|
|
||||||
export class NotificationsPageModule {
|
|
||||||
|
|
||||||
}
|
|
15
src/app/submission/provide-submission.ts
Normal file
15
src/app/submission/provide-submission.ts
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import { importProvidersFrom, makeEnvironmentProviders } from '@angular/core';
|
||||||
|
import { EffectsModule } from '@ngrx/effects';
|
||||||
|
import { submissionEffects } from './submission.effects';
|
||||||
|
import { submissionReducers, SubmissionState } from './submission.reducers';
|
||||||
|
import { Action, StoreConfig, StoreModule } from '@ngrx/store';
|
||||||
|
import { storeModuleConfig } from '../app.reducer';
|
||||||
|
|
||||||
|
export const provideSubmission = () => {
|
||||||
|
return makeEnvironmentProviders([
|
||||||
|
importProvidersFrom(
|
||||||
|
StoreModule.forFeature('submission', submissionReducers, storeModuleConfig as StoreConfig<SubmissionState, Action>),
|
||||||
|
EffectsModule.forFeature(submissionEffects),
|
||||||
|
),
|
||||||
|
]);
|
||||||
|
};
|
@@ -3,6 +3,7 @@ import { Route } from '@angular/router';
|
|||||||
import { AuthenticatedGuard } from '../core/auth/authenticated.guard';
|
import { AuthenticatedGuard } from '../core/auth/authenticated.guard';
|
||||||
import { ThemedSubmissionSubmitComponent } from '../submission/submit/themed-submission-submit.component';
|
import { ThemedSubmissionSubmitComponent } from '../submission/submit/themed-submission-submit.component';
|
||||||
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';
|
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';
|
||||||
|
import { provideSubmission } from '../submission/provide-submission';
|
||||||
|
|
||||||
export const ROUTES: Route[] = [
|
export const ROUTES: Route[] = [
|
||||||
{
|
{
|
||||||
@@ -13,6 +14,9 @@ export const ROUTES: Route[] = [
|
|||||||
resolve: {
|
resolve: {
|
||||||
breadcrumb: I18nBreadcrumbResolver
|
breadcrumb: I18nBreadcrumbResolver
|
||||||
},
|
},
|
||||||
|
providers: [
|
||||||
|
provideSubmission(),
|
||||||
|
],
|
||||||
data: {title: 'submission.submit.title', breadcrumbKey: 'submission.submit'}
|
data: {title: 'submission.submit.title', breadcrumbKey: 'submission.submit'}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
@@ -3,6 +3,7 @@ import { SuggestionsPageComponent } from './suggestions-page.component';
|
|||||||
import { AuthenticatedGuard } from '../core/auth/authenticated.guard';
|
import { AuthenticatedGuard } from '../core/auth/authenticated.guard';
|
||||||
import { PublicationClaimBreadcrumbResolver } from '../core/breadcrumbs/publication-claim-breadcrumb.resolver';
|
import { PublicationClaimBreadcrumbResolver } from '../core/breadcrumbs/publication-claim-breadcrumb.resolver';
|
||||||
import { Route } from '@angular/router';
|
import { Route } from '@angular/router';
|
||||||
|
import { provideSuggestionNotifications } from '../notifications/provide-suggestion-notifications';
|
||||||
|
|
||||||
export const ROUTES: Route[] = [
|
export const ROUTES: Route[] = [
|
||||||
{
|
{
|
||||||
@@ -18,7 +19,8 @@ export const ROUTES: Route[] = [
|
|||||||
},
|
},
|
||||||
providers: [
|
providers: [
|
||||||
SuggestionsPageResolver,
|
SuggestionsPageResolver,
|
||||||
PublicationClaimBreadcrumbResolver
|
PublicationClaimBreadcrumbResolver,
|
||||||
|
provideSuggestionNotifications()
|
||||||
],
|
],
|
||||||
canActivate: [AuthenticatedGuard],
|
canActivate: [AuthenticatedGuard],
|
||||||
runGuardsAndResolvers: 'always',
|
runGuardsAndResolvers: 'always',
|
||||||
|
@@ -1,19 +0,0 @@
|
|||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { NotificationsModule } from '../notifications/notifications.module';
|
|
||||||
import { SuggestionsDataService } from '../core/notifications/suggestions-data.service';
|
|
||||||
import { SuggestionsService } from '../notifications/suggestions.service';
|
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
NotificationsModule,
|
|
||||||
TranslateModule
|
|
||||||
],
|
|
||||||
providers: [
|
|
||||||
SuggestionsDataService,
|
|
||||||
SuggestionsService
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class SuggestionsPageModule { }
|
|
@@ -20,12 +20,13 @@ import { ThemedFullItemPageComponent } from '../item-page/full/themed-full-item-
|
|||||||
import {
|
import {
|
||||||
AdvancedWorkflowActionPageComponent
|
AdvancedWorkflowActionPageComponent
|
||||||
} from './advanced-workflow-action/advanced-workflow-action-page/advanced-workflow-action-page.component';
|
} from './advanced-workflow-action/advanced-workflow-action-page/advanced-workflow-action-page.component';
|
||||||
|
import { provideSubmission } from '../submission/provide-submission';
|
||||||
|
|
||||||
export const ROUTES: Routes = [
|
export const ROUTES: Routes = [
|
||||||
{
|
{
|
||||||
path: ':id',
|
path: ':id',
|
||||||
resolve: {wfi: WorkflowItemPageResolver},
|
resolve: {wfi: WorkflowItemPageResolver},
|
||||||
providers: [WorkflowItemPageResolver, ItemFromWorkflowResolver],
|
providers: [WorkflowItemPageResolver, ItemFromWorkflowResolver, provideSubmission()],
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
canActivate: [AuthenticatedGuard],
|
canActivate: [AuthenticatedGuard],
|
||||||
|
@@ -1,57 +0,0 @@
|
|||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { SubmissionModule } from '../submission/submission.module';
|
|
||||||
import { WorkflowItemDeleteComponent } from './workflow-item-delete/workflow-item-delete.component';
|
|
||||||
import { WorkflowItemSendBackComponent } from './workflow-item-send-back/workflow-item-send-back.component';
|
|
||||||
import { ThemedWorkflowItemDeleteComponent } from './workflow-item-delete/themed-workflow-item-delete.component';
|
|
||||||
import {
|
|
||||||
ThemedWorkflowItemSendBackComponent
|
|
||||||
} from './workflow-item-send-back/themed-workflow-item-send-back.component';
|
|
||||||
import { StatisticsModule } from '../statistics/statistics.module';
|
|
||||||
import { ItemPageModule } from '../item-page/item-page.module';
|
|
||||||
import {
|
|
||||||
AdvancedWorkflowActionsLoaderComponent
|
|
||||||
} from './advanced-workflow-action/advanced-workflow-actions-loader/advanced-workflow-actions-loader.component';
|
|
||||||
import {
|
|
||||||
AdvancedWorkflowActionRatingComponent
|
|
||||||
} from './advanced-workflow-action/advanced-workflow-action-rating/advanced-workflow-action-rating.component';
|
|
||||||
import {
|
|
||||||
AdvancedWorkflowActionSelectReviewerComponent
|
|
||||||
} from './advanced-workflow-action/advanced-workflow-action-select-reviewer/advanced-workflow-action-select-reviewer.component';
|
|
||||||
import {
|
|
||||||
AdvancedWorkflowActionPageComponent
|
|
||||||
} from './advanced-workflow-action/advanced-workflow-action-page/advanced-workflow-action-page.component';
|
|
||||||
import { AccessControlModule } from '../access-control/access-control.module';
|
|
||||||
import {
|
|
||||||
ReviewersListComponent
|
|
||||||
} from './advanced-workflow-action/advanced-workflow-action-select-reviewer/reviewers-list/reviewers-list.component';
|
|
||||||
import { FormModule } from '../shared/form/form.module';
|
|
||||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
SubmissionModule,
|
|
||||||
StatisticsModule,
|
|
||||||
ItemPageModule,
|
|
||||||
AccessControlModule,
|
|
||||||
FormModule,
|
|
||||||
NgbModule,
|
|
||||||
WorkflowItemDeleteComponent,
|
|
||||||
ThemedWorkflowItemDeleteComponent,
|
|
||||||
WorkflowItemSendBackComponent,
|
|
||||||
ThemedWorkflowItemSendBackComponent,
|
|
||||||
AdvancedWorkflowActionsLoaderComponent,
|
|
||||||
AdvancedWorkflowActionRatingComponent,
|
|
||||||
AdvancedWorkflowActionSelectReviewerComponent,
|
|
||||||
AdvancedWorkflowActionPageComponent,
|
|
||||||
|
|
||||||
ReviewersListComponent
|
|
||||||
]
|
|
||||||
})
|
|
||||||
/**
|
|
||||||
* This module handles all modules that need to access the workflowitems edit page.
|
|
||||||
*/
|
|
||||||
export class WorkflowItemsEditPageModule {
|
|
||||||
|
|
||||||
}
|
|
@@ -10,16 +10,23 @@ import { WorkspaceItemsDeletePageComponent } from './workspaceitems-delete-page/
|
|||||||
import {
|
import {
|
||||||
ThemedWorkspaceItemsDeletePageComponent
|
ThemedWorkspaceItemsDeletePageComponent
|
||||||
} from './workspaceitems-delete-page/themed-workspaceitems-delete-page.component';
|
} from './workspaceitems-delete-page/themed-workspaceitems-delete-page.component';
|
||||||
|
import { provideSubmission } from '../submission/provide-submission';
|
||||||
|
|
||||||
|
const providers = [
|
||||||
|
WorkspaceItemPageResolver,
|
||||||
|
ItemFromWorkspaceResolver,
|
||||||
|
provideSubmission(),
|
||||||
|
];
|
||||||
|
|
||||||
export const ROUTES: Route[] = [
|
export const ROUTES: Route[] = [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
providers: [WorkspaceItemPageResolver, ItemFromWorkspaceResolver],
|
providers,
|
||||||
redirectTo: '/home', pathMatch: 'full'
|
redirectTo: '/home', pathMatch: 'full'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: ':id',
|
path: ':id',
|
||||||
providers: [WorkspaceItemPageResolver, ItemFromWorkspaceResolver],
|
providers,
|
||||||
resolve: {wsi: WorkspaceItemPageResolver},
|
resolve: {wsi: WorkspaceItemPageResolver},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
|
@@ -159,7 +159,6 @@ import {
|
|||||||
import { ItemStatusComponent } from './app/item-page/edit-item-page/item-status/item-status.component';
|
import { ItemStatusComponent } from './app/item-page/edit-item-page/item-status/item-status.component';
|
||||||
import { EditBitstreamPageComponent } from './app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component';
|
import { EditBitstreamPageComponent } from './app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component';
|
||||||
import { FormModule } from '../../app/shared/form/form.module';
|
import { FormModule } from '../../app/shared/form/form.module';
|
||||||
import { NotificationsModule } from '../../app/notifications/notifications.module';
|
|
||||||
import { UserMenuComponent } from './app/shared/auth-nav-menu/user-menu/user-menu.component';
|
import { UserMenuComponent } from './app/shared/auth-nav-menu/user-menu/user-menu.component';
|
||||||
import { BrowseByComponent } from './app/shared/browse-by/browse-by.component';
|
import { BrowseByComponent } from './app/shared/browse-by/browse-by.component';
|
||||||
import { RegisterEmailFormComponent } from './app/register-email-form/register-email-form.component';
|
import { RegisterEmailFormComponent } from './app/register-email-form/register-email-form.component';
|
||||||
@@ -285,7 +284,6 @@ const DECLARATIONS = [
|
|||||||
SystemWideAlertModule,
|
SystemWideAlertModule,
|
||||||
NgxGalleryModule,
|
NgxGalleryModule,
|
||||||
FormModule,
|
FormModule,
|
||||||
NotificationsModule,
|
|
||||||
...DECLARATIONS
|
...DECLARATIONS
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user