From 66156f26367372ef22ec7d7ab8272927c4d0f07b Mon Sep 17 00:00:00 2001 From: corrado lombardi Date: Tue, 23 Aug 2022 19:29:41 +0200 Subject: [PATCH 1/2] [DSC-763] [CST-6699] added other workspace items option --- src/app/core/shared/context.model.ts | 1 + src/app/my-dspace-page/my-dspace-configuration-value-type.ts | 1 + src/app/my-dspace-page/my-dspace-configuration.service.ts | 2 ++ src/assets/i18n/en.json5 | 4 ++++ 4 files changed, 8 insertions(+) diff --git a/src/app/core/shared/context.model.ts b/src/app/core/shared/context.model.ts index 4533342b3e1..5d4dcc398a1 100644 --- a/src/app/core/shared/context.model.ts +++ b/src/app/core/shared/context.model.ts @@ -8,6 +8,7 @@ export enum Context { Search = 'search', Workflow = 'workflow', Workspace = 'workspace', + OtherWorkspace = 'otherworkspace', AdminMenu = 'adminMenu', EntitySearchModalWithNameVariants = 'EntitySearchModalWithNameVariants', EntitySearchModal = 'EntitySearchModal', diff --git a/src/app/my-dspace-page/my-dspace-configuration-value-type.ts b/src/app/my-dspace-page/my-dspace-configuration-value-type.ts index baf2f0b9208..6fca4ccf53e 100644 --- a/src/app/my-dspace-page/my-dspace-configuration-value-type.ts +++ b/src/app/my-dspace-page/my-dspace-configuration-value-type.ts @@ -1,4 +1,5 @@ export enum MyDSpaceConfigurationValueType { Workspace = 'workspace', + OtherWorkspace = 'otherworkspace', Workflow = 'workflow' } diff --git a/src/app/my-dspace-page/my-dspace-configuration.service.ts b/src/app/my-dspace-page/my-dspace-configuration.service.ts index 9bd2de1944e..7b8fa722855 100644 --- a/src/app/my-dspace-page/my-dspace-configuration.service.ts +++ b/src/app/my-dspace-page/my-dspace-configuration.service.ts @@ -20,6 +20,7 @@ import { Context } from '../core/shared/context.model'; export const MyDSpaceConfigurationToContextMap = new Map([ [MyDSpaceConfigurationValueType.Workspace, Context.Workspace], + [MyDSpaceConfigurationValueType.OtherWorkspace, Context.OtherWorkspace], [MyDSpaceConfigurationValueType.Workflow, Context.Workflow] ]); @@ -107,6 +108,7 @@ export class MyDSpaceConfigurationService extends SearchConfigurationService { const availableConf: MyDSpaceConfigurationValueType[] = []; if (isSubmitter) { availableConf.push(MyDSpaceConfigurationValueType.Workspace); + availableConf.push(MyDSpaceConfigurationValueType.OtherWorkspace); } if (isController || isAdmin) { availableConf.push(MyDSpaceConfigurationValueType.Workflow); diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5 index 19aef588fa2..e5d01805e39 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -3754,6 +3754,8 @@ "mydspace.show.workspace": "Your Submissions", + "mydspace.show.otherworkspace": "Other Workspace Submissions", + "mydspace.status.archived": "Archived", "mydspace.status.validation": "Validation", @@ -6173,6 +6175,8 @@ + "otherworkspace.search.results.head": "Workspace submissions", + "workspace.search.results.head": "Your submissions", "workflowAdmin.search.results.head": "Administer Workflow", From ce7032ac11ca88013ac37897821bed5ab886d076 Mon Sep 17 00:00:00 2001 From: corrado lombardi Date: Thu, 29 Dec 2022 19:05:49 +0100 Subject: [PATCH 2/2] [DSC-763] Updated test expectations --- .../my-dspace-page/my-dspace-configuration.service.spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/my-dspace-page/my-dspace-configuration.service.spec.ts b/src/app/my-dspace-page/my-dspace-configuration.service.spec.ts index b87c77c5e99..95d90657b7d 100644 --- a/src/app/my-dspace-page/my-dspace-configuration.service.spec.ts +++ b/src/app/my-dspace-page/my-dspace-configuration.service.spec.ts @@ -188,7 +188,8 @@ describe('MyDSpaceConfigurationService', () => { expect(list$).toBeObservable(cold('(b|)', { b: [ - MyDSpaceConfigurationValueType.Workspace + MyDSpaceConfigurationValueType.Workspace, + MyDSpaceConfigurationValueType.OtherWorkspace ] })); }); @@ -231,6 +232,7 @@ describe('MyDSpaceConfigurationService', () => { expect(list$).toBeObservable(cold('(b|)', { b: [ MyDSpaceConfigurationValueType.Workspace, + MyDSpaceConfigurationValueType.OtherWorkspace, MyDSpaceConfigurationValueType.Workflow ] }));