diff --git a/src/app/shared/mydspace-actions/claimed-task/abstract/claimed-task-actions-abstract.component.ts b/src/app/shared/mydspace-actions/claimed-task/abstract/claimed-task-actions-abstract.component.ts index 3d410ca8f6..9ecdad6ab8 100644 --- a/src/app/shared/mydspace-actions/claimed-task/abstract/claimed-task-actions-abstract.component.ts +++ b/src/app/shared/mydspace-actions/claimed-task/abstract/claimed-task-actions-abstract.component.ts @@ -38,7 +38,7 @@ export abstract class ClaimedTaskActionsAbstractComponent extends MyDSpaceReload /** * The workflow task option the child component represents */ - abstract option: string; + @Input() option: string; object: ClaimedTask; diff --git a/src/app/shared/mydspace-actions/claimed-task/approve/claimed-task-actions-approve.component.ts b/src/app/shared/mydspace-actions/claimed-task/approve/claimed-task-actions-approve.component.ts index 97a21b29ee..265b87273c 100644 --- a/src/app/shared/mydspace-actions/claimed-task/approve/claimed-task-actions-approve.component.ts +++ b/src/app/shared/mydspace-actions/claimed-task/approve/claimed-task-actions-approve.component.ts @@ -38,10 +38,6 @@ export const WORKFLOW_TASK_OPTION_APPROVE = 'submit_approve'; * Component for displaying and processing the approve action on a workflow task item */ export class ClaimedTaskActionsApproveComponent extends ClaimedTaskActionsAbstractComponent { - /** - * This component represents the approve option - */ - option = WORKFLOW_TASK_OPTION_APPROVE; constructor(protected injector: Injector, protected router: Router, diff --git a/src/app/shared/mydspace-actions/claimed-task/decline-task/claimed-task-actions-decline-task.component.ts b/src/app/shared/mydspace-actions/claimed-task/decline-task/claimed-task-actions-decline-task.component.ts index 79492de722..74df54e9e0 100644 --- a/src/app/shared/mydspace-actions/claimed-task/decline-task/claimed-task-actions-decline-task.component.ts +++ b/src/app/shared/mydspace-actions/claimed-task/decline-task/claimed-task-actions-decline-task.component.ts @@ -39,8 +39,6 @@ export const WORKFLOW_TASK_OPTION_DECLINE_TASK = 'submit_decline_task'; */ export class ClaimedTaskActionsDeclineTaskComponent extends ClaimedTaskActionsAbstractComponent { - option = WORKFLOW_TASK_OPTION_DECLINE_TASK; - constructor(protected injector: Injector, protected router: Router, protected notificationsService: NotificationsService, diff --git a/src/app/shared/mydspace-actions/claimed-task/edit-metadata/claimed-task-actions-edit-metadata.component.ts b/src/app/shared/mydspace-actions/claimed-task/edit-metadata/claimed-task-actions-edit-metadata.component.ts index 331910bc82..ec9ef2cc51 100644 --- a/src/app/shared/mydspace-actions/claimed-task/edit-metadata/claimed-task-actions-edit-metadata.component.ts +++ b/src/app/shared/mydspace-actions/claimed-task/edit-metadata/claimed-task-actions-edit-metadata.component.ts @@ -34,10 +34,6 @@ export const WORKFLOW_TASK_OPTION_EDIT_METADATA = 'submit_edit_metadata'; * Component for displaying the edit metadata action on a workflow task item */ export class ClaimedTaskActionsEditMetadataComponent extends ClaimedTaskActionsAbstractComponent { - /** - * This component represents the edit metadata option - */ - option = WORKFLOW_TASK_OPTION_EDIT_METADATA; constructor(protected injector: Injector, protected router: Router, diff --git a/src/app/shared/mydspace-actions/claimed-task/rating/advanced-claimed-task-action-rating.component.ts b/src/app/shared/mydspace-actions/claimed-task/rating/advanced-claimed-task-action-rating.component.ts index 785964ec46..a29253c023 100644 --- a/src/app/shared/mydspace-actions/claimed-task/rating/advanced-claimed-task-action-rating.component.ts +++ b/src/app/shared/mydspace-actions/claimed-task/rating/advanced-claimed-task-action-rating.component.ts @@ -14,10 +14,7 @@ import { import { RequestService } from '../../../../core/data/request.service'; import { SearchService } from '../../../../core/shared/search/search.service'; -import { - ADVANCED_WORKFLOW_ACTION_RATING, - ADVANCED_WORKFLOW_TASK_OPTION_RATING, -} from '../../../../workflowitems-edit-page/advanced-workflow-action/advanced-workflow-action-rating/advanced-workflow-action-rating.component'; +import { ADVANCED_WORKFLOW_ACTION_RATING } from '../../../../workflowitems-edit-page/advanced-workflow-action/advanced-workflow-action-rating/advanced-workflow-action-rating.component'; import { NotificationsService } from '../../../notifications/notifications.service'; import { AdvancedClaimedTaskActionsAbstractComponent } from '../abstract/advanced-claimed-task-actions-abstract.component'; @@ -33,11 +30,6 @@ import { AdvancedClaimedTaskActionsAbstractComponent } from '../abstract/advance }) export class AdvancedClaimedTaskActionRatingComponent extends AdvancedClaimedTaskActionsAbstractComponent { - /** - * This component represents the advanced select option - */ - option = ADVANCED_WORKFLOW_TASK_OPTION_RATING; - workflowType = ADVANCED_WORKFLOW_ACTION_RATING; constructor( diff --git a/src/app/shared/mydspace-actions/claimed-task/reject/claimed-task-actions-reject.component.ts b/src/app/shared/mydspace-actions/claimed-task/reject/claimed-task-actions-reject.component.ts index 5ec7c25629..9a8c98c66e 100644 --- a/src/app/shared/mydspace-actions/claimed-task/reject/claimed-task-actions-reject.component.ts +++ b/src/app/shared/mydspace-actions/claimed-task/reject/claimed-task-actions-reject.component.ts @@ -50,10 +50,6 @@ export const WORKFLOW_TASK_OPTION_REJECT = 'submit_reject'; * Component for displaying and processing the reject action on a workflow task item */ export class ClaimedTaskActionsRejectComponent extends ClaimedTaskActionsAbstractComponent implements OnInit { - /** - * This component represents the reject option - */ - option = WORKFLOW_TASK_OPTION_REJECT; /** * The reject form group diff --git a/src/app/shared/mydspace-actions/claimed-task/return-to-pool/claimed-task-actions-return-to-pool.component.ts b/src/app/shared/mydspace-actions/claimed-task/return-to-pool/claimed-task-actions-return-to-pool.component.ts index 4964ba88bd..ea93769b9d 100644 --- a/src/app/shared/mydspace-actions/claimed-task/return-to-pool/claimed-task-actions-return-to-pool.component.ts +++ b/src/app/shared/mydspace-actions/claimed-task/return-to-pool/claimed-task-actions-return-to-pool.component.ts @@ -36,10 +36,6 @@ export const WORKFLOW_TASK_OPTION_RETURN_TO_POOL = 'return_to_pool'; * Component for displaying and processing the return to pool action on a workflow task item */ export class ClaimedTaskActionsReturnToPoolComponent extends ClaimedTaskActionsAbstractComponent { - /** - * This component represents the return to pool option - */ - option = WORKFLOW_TASK_OPTION_RETURN_TO_POOL; constructor(protected injector: Injector, protected router: Router, diff --git a/src/app/shared/mydspace-actions/claimed-task/select-reviewer/advanced-claimed-task-action-select-reviewer.component.ts b/src/app/shared/mydspace-actions/claimed-task/select-reviewer/advanced-claimed-task-action-select-reviewer.component.ts index 4409ac74d5..d892642da7 100644 --- a/src/app/shared/mydspace-actions/claimed-task/select-reviewer/advanced-claimed-task-action-select-reviewer.component.ts +++ b/src/app/shared/mydspace-actions/claimed-task/select-reviewer/advanced-claimed-task-action-select-reviewer.component.ts @@ -14,10 +14,7 @@ import { import { RequestService } from '../../../../core/data/request.service'; import { SearchService } from '../../../../core/shared/search/search.service'; -import { - ADVANCED_WORKFLOW_ACTION_SELECT_REVIEWER, - ADVANCED_WORKFLOW_TASK_OPTION_SELECT_REVIEWER, -} from '../../../../workflowitems-edit-page/advanced-workflow-action/advanced-workflow-action-select-reviewer/advanced-workflow-action-select-reviewer.component'; +import { ADVANCED_WORKFLOW_ACTION_SELECT_REVIEWER } from '../../../../workflowitems-edit-page/advanced-workflow-action/advanced-workflow-action-select-reviewer/advanced-workflow-action-select-reviewer.component'; import { NotificationsService } from '../../../notifications/notifications.service'; import { AdvancedClaimedTaskActionsAbstractComponent } from '../abstract/advanced-claimed-task-actions-abstract.component'; @@ -33,11 +30,6 @@ import { AdvancedClaimedTaskActionsAbstractComponent } from '../abstract/advance }) export class AdvancedClaimedTaskActionSelectReviewerComponent extends AdvancedClaimedTaskActionsAbstractComponent { - /** - * This component represents the advanced select option - */ - option = ADVANCED_WORKFLOW_TASK_OPTION_SELECT_REVIEWER; - workflowType = ADVANCED_WORKFLOW_ACTION_SELECT_REVIEWER; constructor( diff --git a/src/app/workflowitems-edit-page/workflow-item-action-page.component.ts b/src/app/workflowitems-edit-page/workflow-item-action-page.component.ts index 6e1a9b3a31..f187d26b99 100644 --- a/src/app/workflowitems-edit-page/workflow-item-action-page.component.ts +++ b/src/app/workflowitems-edit-page/workflow-item-action-page.component.ts @@ -1,6 +1,7 @@ import { Location } from '@angular/common'; import { Directive, + Input, OnInit, } from '@angular/core'; import { @@ -42,7 +43,9 @@ import { NotificationsService } from '../shared/notifications/notifications.serv standalone: true, }) export abstract class WorkflowItemActionPageDirective implements OnInit { - public type; + + @Input() type: string; + public wfi$: Observable; public item$: Observable; protected previousQueryParameters?: Params;