Skip to content

Commit 5f7ff24

Browse files
committed
[DURACOM-327] Reorganize code to remove dependency between core and app classes
1 parent dbcf2eb commit 5f7ff24

20 files changed

Lines changed: 30 additions & 34 deletions

src/app/app-routing-paths.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
export const COAR_NOTIFY_SUPPORT = 'coar-notify-support';
22

3-
export const HOME_PAGE_PATH = 'home';
4-
5-
export function getHomePageRoute() {
6-
return `/${HOME_PAGE_PATH}`;
7-
}
8-
93
export const ADMIN_MODULE_PATH = 'admin';
104

115
export function getAdminModuleRoute() {

src/app/core/reload/reload.guard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
} from '@dspace/config/app-config.interface';
1313
import { isNotEmpty } from '@dspace/shared/utils/empty.util';
1414

15-
import { HOME_PAGE_PATH } from '../../app-routing-paths';
15+
import { HOME_PAGE_PATH } from '../router/core-routing-paths';
1616

1717
/**
1818
* A guard redirecting the user to the URL provided in the route's query params

src/app/core/router/core-routing-paths.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,9 @@ export const LEGACY_BITSTREAM_MODULE_PATH = 'bitstream';
4848
export function getBitstreamModuleRoute() {
4949
return `/${BITSTREAM_MODULE_PATH}`;
5050
}
51+
52+
export const HOME_PAGE_PATH = 'home';
53+
54+
export function getHomePageRoute() {
55+
return `/${HOME_PAGE_PATH}`;
56+
}
File renamed without changes.

src/app/core/shared/listable-notification-object.model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { LISTABLE_NOTIFICATION_OBJECT } from '../../shared/object-list/listable-notification-object/listable-notification-object.resource-type';
21
import { typedObject } from '../cache/builders/build-decorators';
32
import { TypedObject } from '../cache/typed-object.model';
43
import { NotificationType } from '../notification-system/models/notification-type';
54
import { GenericConstructor } from './generic-constructor';
5+
import { LISTABLE_NOTIFICATION_OBJECT } from './object-collection/listable-notification-object.resource-type';
66
import { ListableObject } from './object-collection/listable-object.model';
77
import { ResourceType } from './resource-type';
88

src/app/shared/object-list/listable-notification-object/listable-notification-object.resource-type.ts renamed to src/app/core/shared/object-collection/listable-notification-object.resource-type.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ResourceType } from '@dspace/core/shared/resource-type';
1+
import { ResourceType } from '../resource-type';
22

33
/**
44
* The resource type for {@link ListableNotificationObject}

src/app/core/testing/health-endpoint.mocks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
HealthInfoResponse,
55
HealthResponse,
66
HealthStatus,
7-
} from '../../health-page/models/health-component.model';
7+
} from '../shared/health-component.model';
88

99
export const HealthResponseObj: HealthResponse = {
1010
'status': HealthStatus.UP_WITH_ISSUES,

src/app/core/testing/search-service.mock.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { of } from 'rxjs';
22

3-
import { SearchService } from '../../shared/search/search.service';
4-
5-
export function getMockSearchService(): SearchService {
3+
export function getMockSearchService() {
64
return jasmine.createSpyObj('searchService', {
75
search: '',
86
getEndpoint: of('discover/search/objects'),

src/app/health-page/health-info/health-info-component/health-info-component.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import {
33
Component,
44
Input,
55
} from '@angular/core';
6+
import { HealthInfoComponent } from '@dspace/core/shared/health-component.model';
67
import { NgbCollapseModule } from '@ng-bootstrap/ng-bootstrap';
78

89
import { ObjNgFor } from '../../../shared/utils/object-ngfor.pipe';
910
import { HealthComponentComponent } from '../../health-panel/health-component/health-component.component';
10-
import { HealthInfoComponent } from '../../models/health-component.model';
1111

1212
/**
1313
* Shows a health info object

src/app/health-page/health-info/health-info.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import {
44
Input,
55
OnInit,
66
} from '@angular/core';
7+
import { HealthInfoResponse } from '@dspace/core/shared/health-component.model';
78
import { NgbAccordionModule } from '@ng-bootstrap/ng-bootstrap';
89
import { TranslateService } from '@ngx-translate/core';
910

1011
import { ObjNgFor } from '../../shared/utils/object-ngfor.pipe';
1112
import { HealthStatusComponent } from '../health-panel/health-status/health-status.component';
12-
import { HealthInfoResponse } from '../models/health-component.model';
1313
import { HealthInfoComponentComponent } from './health-info-component/health-info-component.component';
1414

1515
/**

0 commit comments

Comments
 (0)