mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
[DURACOM-191] optimize application states providers
This commit is contained in:
@@ -1,12 +1,8 @@
|
||||
import {
|
||||
Route,
|
||||
RouterModule,
|
||||
} from '@angular/router';
|
||||
import { Route } from '@angular/router';
|
||||
|
||||
import { AuthenticatedGuard } from '../../core/auth/authenticated.guard';
|
||||
import { I18nBreadcrumbResolver } from '../../core/breadcrumbs/i18n-breadcrumb.resolver';
|
||||
import { QualityAssuranceBreadcrumbResolver } from '../../core/breadcrumbs/quality-assurance-breadcrumb.resolver';
|
||||
import { provideSuggestionNotifications } from '../../notifications/provide-suggestion-notifications';
|
||||
import { AdminNotificationsPublicationClaimPageResolver } from '../../quality-assurance-notifications-pages/notifications-suggestion-targets-page/notifications-suggestion-targets-page-resolver.service';
|
||||
import { QualityAssuranceEventsPageComponent } from '../../quality-assurance-notifications-pages/quality-assurance-events-page/quality-assurance-events-page.component';
|
||||
import { QualityAssuranceEventsPageResolver } from '../../quality-assurance-notifications-pages/quality-assurance-events-page/quality-assurance-events-page.resolver';
|
||||
@@ -21,93 +17,82 @@ import {
|
||||
QUALITY_ASSURANCE_EDIT_PATH,
|
||||
} from './admin-notifications-routing-paths';
|
||||
|
||||
const providers = [
|
||||
provideSuggestionNotifications(),
|
||||
];
|
||||
|
||||
export const ROUTES: Route[] = [
|
||||
RouterModule.forChild([
|
||||
{
|
||||
canActivate: [ AuthenticatedGuard ],
|
||||
path: `${PUBLICATION_CLAIMS_PATH}`,
|
||||
component: AdminNotificationsPublicationClaimPageComponent,
|
||||
pathMatch: 'full',
|
||||
resolve: {
|
||||
breadcrumb: I18nBreadcrumbResolver,
|
||||
suggestionTargetParams: AdminNotificationsPublicationClaimPageResolver,
|
||||
},
|
||||
providers,
|
||||
data: {
|
||||
title: 'admin.notifications.publicationclaim.page.title',
|
||||
breadcrumbKey: 'admin.notifications.publicationclaim',
|
||||
showBreadcrumbsFluid: false,
|
||||
},
|
||||
{
|
||||
canActivate: [ AuthenticatedGuard ],
|
||||
path: `${PUBLICATION_CLAIMS_PATH}`,
|
||||
component: AdminNotificationsPublicationClaimPageComponent,
|
||||
pathMatch: 'full',
|
||||
resolve: {
|
||||
breadcrumb: I18nBreadcrumbResolver,
|
||||
suggestionTargetParams: AdminNotificationsPublicationClaimPageResolver,
|
||||
},
|
||||
{
|
||||
canActivate: [AuthenticatedGuard],
|
||||
path: `${QUALITY_ASSURANCE_EDIT_PATH}/:sourceId`,
|
||||
component: QualityAssuranceTopicsPageComponent,
|
||||
pathMatch: 'full',
|
||||
resolve: {
|
||||
breadcrumb: QualityAssuranceBreadcrumbResolver,
|
||||
openaireQualityAssuranceTopicsParams: QualityAssuranceTopicsPageResolver,
|
||||
},
|
||||
providers,
|
||||
data: {
|
||||
title: 'admin.quality-assurance.page.title',
|
||||
breadcrumbKey: 'admin.quality-assurance',
|
||||
showBreadcrumbsFluid: false,
|
||||
},
|
||||
data: {
|
||||
title: 'admin.notifications.publicationclaim.page.title',
|
||||
breadcrumbKey: 'admin.notifications.publicationclaim',
|
||||
showBreadcrumbsFluid: false,
|
||||
},
|
||||
{
|
||||
canActivate: [ AuthenticatedGuard ],
|
||||
path: `${QUALITY_ASSURANCE_EDIT_PATH}/:sourceId/target/:targetId`,
|
||||
component: QualityAssuranceTopicsPageComponent,
|
||||
pathMatch: 'full',
|
||||
resolve: {
|
||||
breadcrumb: I18nBreadcrumbResolver,
|
||||
openaireQualityAssuranceTopicsParams: QualityAssuranceTopicsPageResolver,
|
||||
},
|
||||
providers,
|
||||
data: {
|
||||
title: 'admin.quality-assurance.page.title',
|
||||
breadcrumbKey: 'admin.quality-assurance',
|
||||
showBreadcrumbsFluid: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
canActivate: [AuthenticatedGuard],
|
||||
path: `${QUALITY_ASSURANCE_EDIT_PATH}/:sourceId`,
|
||||
component: QualityAssuranceTopicsPageComponent,
|
||||
pathMatch: 'full',
|
||||
resolve: {
|
||||
breadcrumb: QualityAssuranceBreadcrumbResolver,
|
||||
openaireQualityAssuranceTopicsParams: QualityAssuranceTopicsPageResolver,
|
||||
},
|
||||
{
|
||||
canActivate: [AuthenticatedGuard],
|
||||
path: `${QUALITY_ASSURANCE_EDIT_PATH}`,
|
||||
component: QualityAssuranceSourcePageComponent,
|
||||
pathMatch: 'full',
|
||||
resolve: {
|
||||
breadcrumb: I18nBreadcrumbResolver,
|
||||
openaireQualityAssuranceSourceParams: QualityAssuranceSourcePageResolver,
|
||||
sourceData: SourceDataResolver,
|
||||
},
|
||||
providers,
|
||||
data: {
|
||||
title: 'admin.notifications.source.breadcrumbs',
|
||||
breadcrumbKey: 'admin.notifications.source',
|
||||
showBreadcrumbsFluid: false,
|
||||
},
|
||||
data: {
|
||||
title: 'admin.quality-assurance.page.title',
|
||||
breadcrumbKey: 'admin.quality-assurance',
|
||||
showBreadcrumbsFluid: false,
|
||||
},
|
||||
{
|
||||
canActivate: [AuthenticatedGuard],
|
||||
path: `${QUALITY_ASSURANCE_EDIT_PATH}/:sourceId/:topicId`,
|
||||
component: QualityAssuranceEventsPageComponent,
|
||||
pathMatch: 'full',
|
||||
resolve: {
|
||||
breadcrumb: QualityAssuranceBreadcrumbResolver,
|
||||
openaireQualityAssuranceEventsParams: QualityAssuranceEventsPageResolver,
|
||||
},
|
||||
providers,
|
||||
data: {
|
||||
title: 'admin.notifications.event.page.title',
|
||||
breadcrumbKey: 'admin.notifications.event',
|
||||
showBreadcrumbsFluid: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
canActivate: [ AuthenticatedGuard ],
|
||||
path: `${QUALITY_ASSURANCE_EDIT_PATH}/:sourceId/target/:targetId`,
|
||||
component: QualityAssuranceTopicsPageComponent,
|
||||
pathMatch: 'full',
|
||||
resolve: {
|
||||
breadcrumb: I18nBreadcrumbResolver,
|
||||
openaireQualityAssuranceTopicsParams: QualityAssuranceTopicsPageResolver,
|
||||
},
|
||||
]),
|
||||
data: {
|
||||
title: 'admin.quality-assurance.page.title',
|
||||
breadcrumbKey: 'admin.quality-assurance',
|
||||
showBreadcrumbsFluid: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
canActivate: [AuthenticatedGuard],
|
||||
path: `${QUALITY_ASSURANCE_EDIT_PATH}`,
|
||||
component: QualityAssuranceSourcePageComponent,
|
||||
pathMatch: 'full',
|
||||
resolve: {
|
||||
breadcrumb: I18nBreadcrumbResolver,
|
||||
openaireQualityAssuranceSourceParams: QualityAssuranceSourcePageResolver,
|
||||
sourceData: SourceDataResolver,
|
||||
},
|
||||
data: {
|
||||
title: 'admin.notifications.source.breadcrumbs',
|
||||
breadcrumbKey: 'admin.notifications.source',
|
||||
showBreadcrumbsFluid: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
canActivate: [AuthenticatedGuard],
|
||||
path: `${QUALITY_ASSURANCE_EDIT_PATH}/:sourceId/:topicId`,
|
||||
component: QualityAssuranceEventsPageComponent,
|
||||
pathMatch: 'full',
|
||||
resolve: {
|
||||
breadcrumb: QualityAssuranceBreadcrumbResolver,
|
||||
openaireQualityAssuranceEventsParams: QualityAssuranceEventsPageResolver,
|
||||
},
|
||||
data: {
|
||||
title: 'admin.notifications.event.page.title',
|
||||
breadcrumbKey: 'admin.notifications.event',
|
||||
showBreadcrumbsFluid: false,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
@@ -1,18 +1,10 @@
|
||||
import { importProvidersFrom } from '@angular/core';
|
||||
import {
|
||||
ExtraOptions,
|
||||
NoPreloading,
|
||||
Route,
|
||||
} from '@angular/router';
|
||||
import { EffectsModule } from '@ngrx/effects';
|
||||
import {
|
||||
Action,
|
||||
StoreConfig,
|
||||
StoreModule,
|
||||
} from '@ngrx/store';
|
||||
|
||||
import { NOTIFICATIONS_MODULE_PATH } from './admin/admin-routing-paths';
|
||||
import { storeModuleConfig } from './app.reducer';
|
||||
import {
|
||||
ACCESS_CONTROL_MODULE_PATH,
|
||||
ADMIN_MODULE_PATH,
|
||||
@@ -42,15 +34,12 @@ import { ServerCheckGuard } from './core/server-check/server-check.guard';
|
||||
import { ThemedForbiddenComponent } from './forbidden/themed-forbidden.component';
|
||||
import { ITEM_MODULE_PATH } from './item-page/item-page-routing-paths';
|
||||
import { MenuResolver } from './menu.resolver';
|
||||
import { provideSuggestionNotificationsState } from './notifications/provide-suggestion-notifications-state';
|
||||
import { ThemedPageErrorComponent } from './page-error/themed-page-error.component';
|
||||
import { ThemedPageInternalServerErrorComponent } from './page-internal-server-error/themed-page-internal-server-error.component';
|
||||
import { ThemedPageNotFoundComponent } from './pagenotfound/themed-pagenotfound.component';
|
||||
import { PROCESS_MODULE_PATH } from './process-page/process-page-routing.paths';
|
||||
import { submissionEffects } from './submission/submission.effects';
|
||||
import {
|
||||
submissionReducers,
|
||||
SubmissionState,
|
||||
} from './submission/submission.reducers';
|
||||
import { provideSubmissionState } from './submission/provide-submission-state';
|
||||
import { SUGGESTION_MODULE_PATH } from './suggestions-page/suggestions-page-routing-paths';
|
||||
|
||||
export const APP_ROUTES: Route[] = [
|
||||
@@ -74,6 +63,7 @@ export const APP_ROUTES: Route[] = [
|
||||
loadChildren: () => import('./home-page/home-page-routes')
|
||||
.then((m) => m.ROUTES),
|
||||
data: { showBreadcrumbs: false },
|
||||
providers: [provideSuggestionNotificationsState()],
|
||||
canActivate: [EndUserAgreementCurrentUserGuard],
|
||||
},
|
||||
{
|
||||
@@ -146,6 +136,7 @@ export const APP_ROUTES: Route[] = [
|
||||
path: 'mydspace',
|
||||
loadChildren: () => import('./my-dspace-page/my-dspace-page-routes')
|
||||
.then((m) => m.ROUTES),
|
||||
providers: [provideSuggestionNotificationsState()],
|
||||
canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard],
|
||||
},
|
||||
{
|
||||
@@ -170,12 +161,14 @@ export const APP_ROUTES: Route[] = [
|
||||
path: NOTIFICATIONS_MODULE_PATH,
|
||||
loadChildren: () => import('./admin/admin-notifications/admin-notifications-routes')
|
||||
.then((m) => m.ROUTES),
|
||||
providers: [provideSuggestionNotificationsState()],
|
||||
canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard],
|
||||
},
|
||||
{
|
||||
path: NOTIFICATIONS_MODULE_PATH,
|
||||
loadChildren: () => import('./quality-assurance-notifications-pages/notifications-pages-routes')
|
||||
.then((m) => m.ROUTES),
|
||||
providers: [provideSuggestionNotificationsState()],
|
||||
canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard],
|
||||
},
|
||||
{
|
||||
@@ -192,11 +185,7 @@ export const APP_ROUTES: Route[] = [
|
||||
path: 'submit',
|
||||
loadChildren: () => import('./submit-page/submit-page-routes')
|
||||
.then((m) => m.ROUTES),
|
||||
providers: [
|
||||
importProvidersFrom(
|
||||
StoreModule.forFeature('submission', submissionReducers, storeModuleConfig as StoreConfig<SubmissionState, Action>),
|
||||
EffectsModule.forFeature(submissionEffects),
|
||||
)],
|
||||
providers: [provideSubmissionState()],
|
||||
canActivate: [EndUserAgreementCurrentUserGuard],
|
||||
},
|
||||
{
|
||||
@@ -209,20 +198,12 @@ export const APP_ROUTES: Route[] = [
|
||||
path: 'workspaceitems',
|
||||
loadChildren: () => import('./workspaceitems-edit-page/workspaceitems-edit-page-routes')
|
||||
.then((m) => m.ROUTES),
|
||||
providers: [
|
||||
importProvidersFrom(
|
||||
StoreModule.forFeature('submission', submissionReducers, storeModuleConfig as StoreConfig<SubmissionState, Action>),
|
||||
EffectsModule.forFeature(submissionEffects),
|
||||
)],
|
||||
providers: [provideSubmissionState()],
|
||||
canActivate: [EndUserAgreementCurrentUserGuard],
|
||||
},
|
||||
{
|
||||
path: WORKFLOW_ITEM_MODULE_PATH,
|
||||
providers: [
|
||||
importProvidersFrom(
|
||||
StoreModule.forFeature('submission', submissionReducers, storeModuleConfig as StoreConfig<SubmissionState, Action>),
|
||||
EffectsModule.forFeature(submissionEffects),
|
||||
)],
|
||||
providers: [provideSubmissionState()],
|
||||
loadChildren: () => import('./workflowitems-edit-page/workflowitems-edit-page-routes')
|
||||
.then((m) => m.ROUTES),
|
||||
canActivate: [EndUserAgreementCurrentUserGuard],
|
||||
@@ -231,6 +212,7 @@ export const APP_ROUTES: Route[] = [
|
||||
path: PROFILE_MODULE_PATH,
|
||||
loadChildren: () => import('./profile-page/profile-page-routes')
|
||||
.then((m) => m.ROUTES),
|
||||
providers: [provideSuggestionNotificationsState()],
|
||||
canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard],
|
||||
},
|
||||
{
|
||||
@@ -243,6 +225,7 @@ export const APP_ROUTES: Route[] = [
|
||||
path: SUGGESTION_MODULE_PATH,
|
||||
loadChildren: () => import('./suggestions-page/suggestions-page-routes')
|
||||
.then((m) => m.ROUTES),
|
||||
providers: [provideSuggestionNotificationsState()],
|
||||
canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard],
|
||||
},
|
||||
{
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import { Route } from '@angular/router';
|
||||
|
||||
import { provideSuggestionNotifications } from '../notifications/provide-suggestion-notifications';
|
||||
import { LinkMenuItemModel } from '../shared/menu/menu-item/models/link.model';
|
||||
import { MenuItemType } from '../shared/menu/menu-item-type.model';
|
||||
import { HomePageResolver } from './home-page.resolver';
|
||||
@@ -10,9 +9,6 @@ export const ROUTES: Route[] = [
|
||||
{
|
||||
path: '',
|
||||
component: ThemedHomePageComponent,
|
||||
providers: [
|
||||
provideSuggestionNotifications(),
|
||||
],
|
||||
pathMatch: 'full',
|
||||
data: {
|
||||
title: 'home.title',
|
||||
|
@@ -2,14 +2,12 @@ import { Route } from '@angular/router';
|
||||
|
||||
import { AuthenticatedGuard } from '../core/auth/authenticated.guard';
|
||||
import { ThemedSubmissionImportExternalComponent } from '../submission/import-external/themed-submission-import-external.component';
|
||||
import { provideSubmission } from '../submission/provide-submission';
|
||||
|
||||
export const ROUTES: Route[] = [
|
||||
{
|
||||
canActivate: [AuthenticatedGuard],
|
||||
path: '',
|
||||
component: ThemedSubmissionImportExternalComponent,
|
||||
providers: [provideSubmission()],
|
||||
pathMatch: 'full',
|
||||
data: {
|
||||
title: 'submission.import-external.page.title',
|
||||
|
@@ -1,7 +1,6 @@
|
||||
import { Route } from '@angular/router';
|
||||
|
||||
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';
|
||||
import { provideSuggestionNotifications } from '../notifications/provide-suggestion-notifications';
|
||||
import { MyDSpaceGuard } from './my-dspace.guard';
|
||||
import { ThemedMyDSpacePageComponent } from './themed-my-dspace-page.component';
|
||||
|
||||
@@ -12,7 +11,6 @@ export const ROUTES: Route[] = [
|
||||
resolve: {
|
||||
breadcrumb: I18nBreadcrumbResolver,
|
||||
},
|
||||
providers: [provideSuggestionNotifications()],
|
||||
data: { title: 'mydspace.title', breadcrumbKey: 'mydspace' },
|
||||
canActivate: [
|
||||
MyDSpaceGuard,
|
||||
|
@@ -1,4 +1,5 @@
|
||||
import {
|
||||
EnvironmentProviders,
|
||||
importProvidersFrom,
|
||||
makeEnvironmentProviders,
|
||||
} from '@angular/core';
|
||||
@@ -16,7 +17,7 @@ import {
|
||||
} from './notifications.reducer';
|
||||
import { notificationsEffects } from './notifications-effects';
|
||||
|
||||
export const provideSuggestionNotifications = () => {
|
||||
export const provideSuggestionNotificationsState = (): EnvironmentProviders => {
|
||||
return makeEnvironmentProviders([
|
||||
importProvidersFrom(
|
||||
StoreModule.forFeature('suggestionNotifications', suggestionNotificationsReducers, storeModuleConfig as StoreConfig<SuggestionNotificationsState, Action>),
|
@@ -1,7 +1,6 @@
|
||||
import { Route } from '@angular/router';
|
||||
|
||||
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';
|
||||
import { provideSuggestionNotifications } from '../notifications/provide-suggestion-notifications';
|
||||
import { ThemedProfilePageComponent } from './themed-profile-page.component';
|
||||
|
||||
export const ROUTES: Route[] = [
|
||||
@@ -9,7 +8,6 @@ export const ROUTES: Route[] = [
|
||||
path: '',
|
||||
pathMatch: 'full',
|
||||
component: ThemedProfilePageComponent,
|
||||
providers: [provideSuggestionNotifications()],
|
||||
resolve: { breadcrumb: I18nBreadcrumbResolver },
|
||||
data: { breadcrumbKey: 'profile', title: 'profile.title' },
|
||||
},
|
||||
|
@@ -3,7 +3,6 @@ import { Route } from '@angular/router';
|
||||
import { AuthenticatedGuard } from '../core/auth/authenticated.guard';
|
||||
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';
|
||||
import { QualityAssuranceBreadcrumbResolver } from '../core/breadcrumbs/quality-assurance-breadcrumb.resolver';
|
||||
import { provideSuggestionNotifications } from '../notifications/provide-suggestion-notifications';
|
||||
import {
|
||||
NOTIFICATIONS_RECITER_SUGGESTION_PATH,
|
||||
QUALITY_ASSURANCE_EDIT_PATH,
|
||||
@@ -18,17 +17,12 @@ import { QualityAssuranceSourcePageResolver } from './quality-assurance-source-p
|
||||
import { QualityAssuranceTopicsPageComponent } from './quality-assurance-topics-page/quality-assurance-topics-page.component';
|
||||
import { QualityAssuranceTopicsPageResolver } from './quality-assurance-topics-page/quality-assurance-topics-page-resolver.service';
|
||||
|
||||
const providers = [
|
||||
provideSuggestionNotifications(),
|
||||
];
|
||||
|
||||
export const ROUTES: Route[] = [
|
||||
{
|
||||
canActivate: [AuthenticatedGuard],
|
||||
path: `${NOTIFICATIONS_RECITER_SUGGESTION_PATH}`,
|
||||
component: NotificationsSuggestionTargetsPageComponent,
|
||||
pathMatch: 'full',
|
||||
providers,
|
||||
resolve: {
|
||||
breadcrumb: I18nBreadcrumbResolver,
|
||||
reciterSuggestionTargetParams: AdminNotificationsPublicationClaimPageResolver,
|
||||
@@ -44,7 +38,6 @@ export const ROUTES: Route[] = [
|
||||
path: `${QUALITY_ASSURANCE_EDIT_PATH}/:sourceId`,
|
||||
component: QualityAssuranceTopicsPageComponent,
|
||||
pathMatch: 'full',
|
||||
providers,
|
||||
resolve: {
|
||||
breadcrumb: QualityAssuranceBreadcrumbResolver,
|
||||
openaireQualityAssuranceTopicsParams: QualityAssuranceTopicsPageResolver,
|
||||
@@ -60,7 +53,6 @@ export const ROUTES: Route[] = [
|
||||
path: `${QUALITY_ASSURANCE_EDIT_PATH}/:sourceId/target/:targetId`,
|
||||
component: QualityAssuranceTopicsPageComponent,
|
||||
pathMatch: 'full',
|
||||
providers,
|
||||
resolve: {
|
||||
breadcrumb: I18nBreadcrumbResolver,
|
||||
openaireQualityAssuranceTopicsParams: QualityAssuranceTopicsPageResolver,
|
||||
@@ -76,7 +68,6 @@ export const ROUTES: Route[] = [
|
||||
path: `${QUALITY_ASSURANCE_EDIT_PATH}`,
|
||||
component: QualityAssuranceSourcePageComponent,
|
||||
pathMatch: 'full',
|
||||
providers,
|
||||
resolve: {
|
||||
breadcrumb: I18nBreadcrumbResolver,
|
||||
openaireQualityAssuranceSourceParams: QualityAssuranceSourcePageResolver,
|
||||
@@ -93,7 +84,6 @@ export const ROUTES: Route[] = [
|
||||
path: `${QUALITY_ASSURANCE_EDIT_PATH}/:sourceId/:topicId`,
|
||||
component: QualityAssuranceEventsPageComponent,
|
||||
pathMatch: 'full',
|
||||
providers,
|
||||
resolve: {
|
||||
breadcrumb: QualityAssuranceBreadcrumbResolver,
|
||||
openaireQualityAssuranceEventsParams: QualityAssuranceEventsPageResolver,
|
||||
|
@@ -1,4 +1,5 @@
|
||||
import {
|
||||
EnvironmentProviders,
|
||||
importProvidersFrom,
|
||||
makeEnvironmentProviders,
|
||||
} from '@angular/core';
|
||||
@@ -16,7 +17,7 @@ import {
|
||||
SubmissionState,
|
||||
} from './submission.reducers';
|
||||
|
||||
export const provideSubmission = () => {
|
||||
export const provideSubmissionState = (): EnvironmentProviders => {
|
||||
return makeEnvironmentProviders([
|
||||
importProvidersFrom(
|
||||
StoreModule.forFeature('submission', submissionReducers, storeModuleConfig as StoreConfig<SubmissionState, Action>),
|
||||
@@ -24,3 +25,4 @@ export const provideSubmission = () => {
|
||||
),
|
||||
]);
|
||||
};
|
||||
|
@@ -2,7 +2,6 @@ import { Route } from '@angular/router';
|
||||
|
||||
import { AuthenticatedGuard } from '../core/auth/authenticated.guard';
|
||||
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';
|
||||
import { provideSubmission } from '../submission/provide-submission';
|
||||
import { ThemedSubmissionSubmitComponent } from '../submission/submit/themed-submission-submit.component';
|
||||
|
||||
export const ROUTES: Route[] = [
|
||||
@@ -14,9 +13,6 @@ export const ROUTES: Route[] = [
|
||||
resolve: {
|
||||
breadcrumb: I18nBreadcrumbResolver,
|
||||
},
|
||||
providers: [
|
||||
provideSubmission(),
|
||||
],
|
||||
data: { title: 'submission.submit.title', breadcrumbKey: 'submission.submit' },
|
||||
},
|
||||
];
|
||||
|
@@ -2,7 +2,6 @@ import { Route } from '@angular/router';
|
||||
|
||||
import { AuthenticatedGuard } from '../core/auth/authenticated.guard';
|
||||
import { PublicationClaimBreadcrumbResolver } from '../core/breadcrumbs/publication-claim-breadcrumb.resolver';
|
||||
import { provideSuggestionNotifications } from '../notifications/provide-suggestion-notifications';
|
||||
import { SuggestionsPageComponent } from './suggestions-page.component';
|
||||
import { SuggestionsPageResolver } from './suggestions-page.resolver';
|
||||
|
||||
@@ -18,9 +17,6 @@ export const ROUTES: Route[] = [
|
||||
breadcrumbKey: 'admin.notifications.publicationclaim',
|
||||
showBreadcrumbsFluid: false,
|
||||
},
|
||||
providers: [
|
||||
provideSuggestionNotifications(),
|
||||
],
|
||||
canActivate: [AuthenticatedGuard],
|
||||
runGuardsAndResolvers: 'always',
|
||||
component: SuggestionsPageComponent,
|
||||
|
@@ -4,7 +4,6 @@ import { AuthenticatedGuard } from '../core/auth/authenticated.guard';
|
||||
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';
|
||||
import { ThemedFullItemPageComponent } from '../item-page/full/themed-full-item-page.component';
|
||||
import { ThemedSubmissionEditComponent } from '../submission/edit/themed-submission-edit.component';
|
||||
import { provideSubmission } from '../submission/provide-submission';
|
||||
import { AdvancedWorkflowActionPageComponent } from './advanced-workflow-action/advanced-workflow-action-page/advanced-workflow-action-page.component';
|
||||
import { ItemFromWorkflowResolver } from './item-from-workflow.resolver';
|
||||
import { ThemedWorkflowItemDeleteComponent } from './workflow-item-delete/themed-workflow-item-delete.component';
|
||||
@@ -22,7 +21,6 @@ export const ROUTES: Routes = [
|
||||
{
|
||||
path: ':id',
|
||||
resolve: { wfi: WorkflowItemPageResolver },
|
||||
providers: [provideSubmission()],
|
||||
children: [
|
||||
{
|
||||
canActivate: [AuthenticatedGuard],
|
||||
|
@@ -4,25 +4,18 @@ import { AuthenticatedGuard } from '../core/auth/authenticated.guard';
|
||||
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';
|
||||
import { ThemedFullItemPageComponent } from '../item-page/full/themed-full-item-page.component';
|
||||
import { ThemedSubmissionEditComponent } from '../submission/edit/themed-submission-edit.component';
|
||||
import { provideSubmission } from '../submission/provide-submission';
|
||||
import { ItemFromWorkspaceResolver } from './item-from-workspace.resolver';
|
||||
import { WorkspaceItemPageResolver } from './workspace-item-page.resolver';
|
||||
import { ThemedWorkspaceItemsDeletePageComponent } from './workspaceitems-delete-page/themed-workspaceitems-delete-page.component';
|
||||
import { WorkspaceItemsDeletePageComponent } from './workspaceitems-delete-page/workspaceitems-delete-page.component';
|
||||
|
||||
const providers = [
|
||||
provideSubmission(),
|
||||
];
|
||||
|
||||
export const ROUTES: Route[] = [
|
||||
{
|
||||
path: '',
|
||||
providers,
|
||||
redirectTo: '/home', pathMatch: 'full',
|
||||
},
|
||||
{
|
||||
path: ':id',
|
||||
providers,
|
||||
resolve: { wsi: WorkspaceItemPageResolver },
|
||||
children: [
|
||||
{
|
||||
|
Reference in New Issue
Block a user