remove circular dependencies

This commit is contained in:
Art Lowel
2020-08-28 11:34:17 +02:00
parent cc618ebadd
commit 21e8879f77
84 changed files with 415 additions and 373 deletions

View File

@@ -0,0 +1,62 @@
import { DSpaceObject } from './core/shared/dspace-object.model';
import { Community } from './core/shared/community.model';
import { Collection } from './core/shared/collection.model';
import { Item } from './core/shared/item.model';
import { getCommunityPageRoute } from './+community-page/community-page-routing-paths';
import { getCollectionPageRoute } from './+collection-page/collection-page-routing-paths';
import { getItemPageRoute } from './+item-page/item-page-routing-paths';
export const BITSTREAM_MODULE_PATH = 'bitstreams';
export function getBitstreamModuleRoute() {
return `/${BITSTREAM_MODULE_PATH}`;
}
export const ADMIN_MODULE_PATH = 'admin';
export function getAdminModuleRoute() {
return `/${ADMIN_MODULE_PATH}`;
}
export const PROFILE_MODULE_PATH = 'profile';
export function getProfileModuleRoute() {
return `/${PROFILE_MODULE_PATH}`;
}
export const REGISTER_PATH = 'register';
export function getRegisterRoute() {
return `/${REGISTER_PATH}`;
}
export const FORGOT_PASSWORD_PATH = 'forgot';
export function getForgotPasswordRoute() {
return `/${FORGOT_PASSWORD_PATH}`;
}
export const WORKFLOW_ITEM_MODULE_PATH = 'workflowitems';
export function getWorkflowItemModuleRoute() {
return `/${WORKFLOW_ITEM_MODULE_PATH}`;
}
export function getDSORoute(dso: DSpaceObject): string {
switch ((dso as any).type) {
case Community.type.value:
return getCommunityPageRoute(dso.uuid);
case Collection.type.value:
return getCollectionPageRoute(dso.uuid);
case Item.type.value:
return getItemPageRoute(dso.uuid);
}
}
export const UNAUTHORIZED_PATH = 'unauthorized';
export function getUnauthorizedRoute() {
return `/${UNAUTHORIZED_PATH}`;
}