mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
[DURACOM-191] Fix issue with migration to standalone components
This commit is contained in:
@@ -0,0 +1,48 @@
|
|||||||
|
import { Route } from '@angular/router';
|
||||||
|
|
||||||
|
import { I18nBreadcrumbResolver } from '../../core/breadcrumbs/i18n-breadcrumb.resolver';
|
||||||
|
import { NotifyInfoGuard } from '../../core/coar-notify/notify-info/notify-info.guard';
|
||||||
|
import { SiteAdministratorGuard } from '../../core/data/feature-authorization/feature-authorization-guard/site-administrator.guard';
|
||||||
|
import { AdminNotifyDashboardComponent } from './admin-notify-dashboard.component';
|
||||||
|
import { AdminNotifyIncomingComponent } from './admin-notify-logs/admin-notify-incoming/admin-notify-incoming.component';
|
||||||
|
import { AdminNotifyOutgoingComponent } from './admin-notify-logs/admin-notify-outgoing/admin-notify-outgoing.component';
|
||||||
|
|
||||||
|
export const ROUTES: Route[] = [
|
||||||
|
{
|
||||||
|
canActivate: [SiteAdministratorGuard, NotifyInfoGuard],
|
||||||
|
path: '',
|
||||||
|
resolve: {
|
||||||
|
breadcrumb: I18nBreadcrumbResolver,
|
||||||
|
},
|
||||||
|
component: AdminNotifyDashboardComponent,
|
||||||
|
pathMatch: 'full',
|
||||||
|
data: {
|
||||||
|
title: 'admin.notify.dashboard.page.title',
|
||||||
|
breadcrumbKey: 'admin.notify.dashboard',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'inbound',
|
||||||
|
resolve: {
|
||||||
|
breadcrumb: I18nBreadcrumbResolver,
|
||||||
|
},
|
||||||
|
component: AdminNotifyIncomingComponent,
|
||||||
|
canActivate: [SiteAdministratorGuard, NotifyInfoGuard],
|
||||||
|
data: {
|
||||||
|
title: 'admin.notify.dashboard.page.title',
|
||||||
|
breadcrumbKey: 'admin.notify.dashboard',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'outbound',
|
||||||
|
resolve: {
|
||||||
|
breadcrumb: I18nBreadcrumbResolver,
|
||||||
|
},
|
||||||
|
component: AdminNotifyOutgoingComponent,
|
||||||
|
canActivate: [SiteAdministratorGuard, NotifyInfoGuard],
|
||||||
|
data: {
|
||||||
|
title: 'admin.notify.dashboard.page.title',
|
||||||
|
breadcrumbKey: 'admin.notify.dashboard',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
@@ -1,59 +0,0 @@
|
|||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { RouterModule } from '@angular/router';
|
|
||||||
|
|
||||||
import { I18nBreadcrumbResolver } from '../../core/breadcrumbs/i18n-breadcrumb.resolver';
|
|
||||||
import { NotifyInfoGuard } from '../../core/coar-notify/notify-info/notify-info.guard';
|
|
||||||
import { SiteAdministratorGuard } from '../../core/data/feature-authorization/feature-authorization-guard/site-administrator.guard';
|
|
||||||
import { AdminNotifyDashboardComponent } from './admin-notify-dashboard.component';
|
|
||||||
import { AdminNotifyIncomingComponent } from './admin-notify-logs/admin-notify-incoming/admin-notify-incoming.component';
|
|
||||||
import { AdminNotifyOutgoingComponent } from './admin-notify-logs/admin-notify-outgoing/admin-notify-outgoing.component';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
RouterModule.forChild([
|
|
||||||
{
|
|
||||||
canActivate: [SiteAdministratorGuard, NotifyInfoGuard],
|
|
||||||
path: '',
|
|
||||||
resolve: {
|
|
||||||
breadcrumb: I18nBreadcrumbResolver,
|
|
||||||
},
|
|
||||||
component: AdminNotifyDashboardComponent,
|
|
||||||
pathMatch: 'full',
|
|
||||||
data: {
|
|
||||||
title: 'admin.notify.dashboard.page.title',
|
|
||||||
breadcrumbKey: 'admin.notify.dashboard',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'inbound',
|
|
||||||
resolve: {
|
|
||||||
breadcrumb: I18nBreadcrumbResolver,
|
|
||||||
},
|
|
||||||
component: AdminNotifyIncomingComponent,
|
|
||||||
canActivate: [SiteAdministratorGuard, NotifyInfoGuard],
|
|
||||||
data: {
|
|
||||||
title: 'admin.notify.dashboard.page.title',
|
|
||||||
breadcrumbKey: 'admin.notify.dashboard',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'outbound',
|
|
||||||
resolve: {
|
|
||||||
breadcrumb: I18nBreadcrumbResolver,
|
|
||||||
},
|
|
||||||
component: AdminNotifyOutgoingComponent,
|
|
||||||
canActivate: [SiteAdministratorGuard, NotifyInfoGuard],
|
|
||||||
data: {
|
|
||||||
title: 'admin.notify.dashboard.page.title',
|
|
||||||
breadcrumbKey: 'admin.notify.dashboard',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]),
|
|
||||||
],
|
|
||||||
})
|
|
||||||
/**
|
|
||||||
* Routing module for the Notifications section of the admin sidebar
|
|
||||||
*/
|
|
||||||
export class AdminNotifyDashboardRoutingModule {
|
|
||||||
|
|
||||||
}
|
|
@@ -33,6 +33,7 @@ import { AdminNotifyMessagesService } from '../services/admin-notify-messages.se
|
|||||||
selector: 'ds-admin-notify-search-result',
|
selector: 'ds-admin-notify-search-result',
|
||||||
templateUrl: './admin-notify-search-result.component.html',
|
templateUrl: './admin-notify-search-result.component.html',
|
||||||
providers: [
|
providers: [
|
||||||
|
DatePipe,
|
||||||
{
|
{
|
||||||
provide: SEARCH_CONFIG_SERVICE,
|
provide: SEARCH_CONFIG_SERVICE,
|
||||||
useClass: SearchConfigurationService,
|
useClass: SearchConfigurationService,
|
||||||
|
@@ -32,13 +32,13 @@ import { AdminNotifyMessage } from '../models/admin-notify-message.model';
|
|||||||
import { ADMIN_NOTIFY_MESSAGE } from '../models/admin-notify-message.resource-type';
|
import { ADMIN_NOTIFY_MESSAGE } from '../models/admin-notify-message.resource-type';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injectable service responsible for fetching/sending data from/to the REST API on the messages endpoint.
|
* Injectable service responsible for fetching/sending data from/to the REST API on the messages' endpoint.
|
||||||
*
|
*
|
||||||
* @export
|
* @export
|
||||||
* @class AdminNotifyMessagesService
|
* @class AdminNotifyMessagesService
|
||||||
* @extends {IdentifiableDataService<AdminNotifyMessage>}
|
* @extends {IdentifiableDataService<AdminNotifyMessage>}
|
||||||
*/
|
*/
|
||||||
@Injectable()
|
@Injectable({ providedIn: 'root' })
|
||||||
@dataService(ADMIN_NOTIFY_MESSAGE)
|
@dataService(ADMIN_NOTIFY_MESSAGE)
|
||||||
export class AdminNotifyMessagesService extends IdentifiableDataService<AdminNotifyMessage> {
|
export class AdminNotifyMessagesService extends IdentifiableDataService<AdminNotifyMessage> {
|
||||||
|
|
||||||
|
@@ -1,8 +1,10 @@
|
|||||||
|
import { Route } from '@angular/router';
|
||||||
|
|
||||||
import { I18nBreadcrumbResolver } from '../../core/breadcrumbs/i18n-breadcrumb.resolver';
|
import { I18nBreadcrumbResolver } from '../../core/breadcrumbs/i18n-breadcrumb.resolver';
|
||||||
import { FilteredCollectionsComponent } from './filtered-collections/filtered-collections.component';
|
import { FilteredCollectionsComponent } from './filtered-collections/filtered-collections.component';
|
||||||
import { FilteredItemsComponent } from './filtered-items/filtered-items.component';
|
import { FilteredItemsComponent } from './filtered-items/filtered-items.component';
|
||||||
|
|
||||||
export const ROUTES = [
|
export const ROUTES: Route[] = [
|
||||||
{
|
{
|
||||||
path: 'collections',
|
path: 'collections',
|
||||||
resolve: { breadcrumb: I18nBreadcrumbResolver },
|
resolve: { breadcrumb: I18nBreadcrumbResolver },
|
||||||
|
@@ -8,6 +8,7 @@ import { MetadataImportPageComponent } from './admin-import-metadata-page/metada
|
|||||||
import {
|
import {
|
||||||
LDN_PATH,
|
LDN_PATH,
|
||||||
NOTIFICATIONS_MODULE_PATH,
|
NOTIFICATIONS_MODULE_PATH,
|
||||||
|
NOTIFY_DASHBOARD_MODULE_PATH,
|
||||||
REGISTRIES_MODULE_PATH,
|
REGISTRIES_MODULE_PATH,
|
||||||
REPORTS_MODULE_PATH,
|
REPORTS_MODULE_PATH,
|
||||||
} from './admin-routing-paths';
|
} from './admin-routing-paths';
|
||||||
@@ -90,4 +91,9 @@ export const ROUTES: Route[] = [
|
|||||||
loadChildren: () => import('./admin-reports/admin-reports-routes')
|
loadChildren: () => import('./admin-reports/admin-reports-routes')
|
||||||
.then((m) => m.ROUTES),
|
.then((m) => m.ROUTES),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: NOTIFY_DASHBOARD_MODULE_PATH,
|
||||||
|
loadChildren: () => import('./admin-notify-dashboard/admin-notify-dashboard-routes')
|
||||||
|
.then((m) => m.ROUTES),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import { AdminNotifySearchResultComponent } from '../../../../admin/admin-notify-dashboard/admin-notify-search-result/admin-notify-search-result.component';
|
||||||
import { AdminNotifySearchResult } from '../../../../admin/admin-notify-dashboard/models/admin-notify-message-search-result.model';
|
import { AdminNotifySearchResult } from '../../../../admin/admin-notify-dashboard/models/admin-notify-message-search-result.model';
|
||||||
import { Context } from '../../../../core/shared/context.model';
|
import { Context } from '../../../../core/shared/context.model';
|
||||||
import { GenericConstructor } from '../../../../core/shared/generic-constructor';
|
import { GenericConstructor } from '../../../../core/shared/generic-constructor';
|
||||||
@@ -22,7 +23,7 @@ export const TABUTABLE_DECORATOR_MAP =
|
|||||||
new Map<string | GenericConstructor<ListableObject>, Map<ViewMode, Map<Context, Map<string, TabulatableComponentType>>>>([
|
new Map<string | GenericConstructor<ListableObject>, Map<ViewMode, Map<Context, Map<string, TabulatableComponentType>>>>([
|
||||||
[AdminNotifySearchResult, new Map([
|
[AdminNotifySearchResult, new Map([
|
||||||
[ViewMode.Table, new Map([
|
[ViewMode.Table, new Map([
|
||||||
[Context.CoarNotify, new Map([[DEFAULT_THEME, TabulatableResultListElementsComponent as any]])],
|
[Context.CoarNotify, new Map([[DEFAULT_THEME, AdminNotifySearchResultComponent as any]])],
|
||||||
])],
|
])],
|
||||||
])],
|
])],
|
||||||
]);
|
]);
|
||||||
|
@@ -7,6 +7,7 @@ import { SearchResult } from '../../../search/models/search-result.model';
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-search-result-table-element',
|
selector: 'ds-search-result-table-element',
|
||||||
template: ``,
|
template: ``,
|
||||||
|
standalone: true,
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
* Component that describes the implementations and interfaces needed from any extension of this class to be used in search results for visualization in ViewMode.Table
|
* Component that describes the implementations and interfaces needed from any extension of this class to be used in search results for visualization in ViewMode.Table
|
||||||
|
Reference in New Issue
Block a user