Skip to content

Commit d7be627

Browse files
115215: Removed hardcoded options in favor of the ones from ClaimedTaskActionsLoaderComponent & AdvancedWorkflowActionsLoaderComponent
1 parent 2d957bf commit d7be627

9 files changed

Lines changed: 7 additions & 38 deletions

src/app/shared/mydspace-actions/claimed-task/abstract/claimed-task-actions-abstract.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export abstract class ClaimedTaskActionsAbstractComponent extends MyDSpaceReload
3838
/**
3939
* The workflow task option the child component represents
4040
*/
41-
abstract option: string;
41+
@Input() option: string;
4242

4343
object: ClaimedTask;
4444

src/app/shared/mydspace-actions/claimed-task/approve/claimed-task-actions-approve.component.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ export const WORKFLOW_TASK_OPTION_APPROVE = 'submit_approve';
3838
* Component for displaying and processing the approve action on a workflow task item
3939
*/
4040
export class ClaimedTaskActionsApproveComponent extends ClaimedTaskActionsAbstractComponent {
41-
/**
42-
* This component represents the approve option
43-
*/
44-
option = WORKFLOW_TASK_OPTION_APPROVE;
4541

4642
constructor(protected injector: Injector,
4743
protected router: Router,

src/app/shared/mydspace-actions/claimed-task/decline-task/claimed-task-actions-decline-task.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ export const WORKFLOW_TASK_OPTION_DECLINE_TASK = 'submit_decline_task';
3939
*/
4040
export class ClaimedTaskActionsDeclineTaskComponent extends ClaimedTaskActionsAbstractComponent {
4141

42-
option = WORKFLOW_TASK_OPTION_DECLINE_TASK;
43-
4442
constructor(protected injector: Injector,
4543
protected router: Router,
4644
protected notificationsService: NotificationsService,

src/app/shared/mydspace-actions/claimed-task/edit-metadata/claimed-task-actions-edit-metadata.component.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ export const WORKFLOW_TASK_OPTION_EDIT_METADATA = 'submit_edit_metadata';
3434
* Component for displaying the edit metadata action on a workflow task item
3535
*/
3636
export class ClaimedTaskActionsEditMetadataComponent extends ClaimedTaskActionsAbstractComponent {
37-
/**
38-
* This component represents the edit metadata option
39-
*/
40-
option = WORKFLOW_TASK_OPTION_EDIT_METADATA;
4137

4238
constructor(protected injector: Injector,
4339
protected router: Router,

src/app/shared/mydspace-actions/claimed-task/rating/advanced-claimed-task-action-rating.component.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ import {
1414

1515
import { RequestService } from '../../../../core/data/request.service';
1616
import { SearchService } from '../../../../core/shared/search/search.service';
17-
import {
18-
ADVANCED_WORKFLOW_ACTION_RATING,
19-
ADVANCED_WORKFLOW_TASK_OPTION_RATING,
20-
} from '../../../../workflowitems-edit-page/advanced-workflow-action/advanced-workflow-action-rating/advanced-workflow-action-rating.component';
17+
import { ADVANCED_WORKFLOW_ACTION_RATING } from '../../../../workflowitems-edit-page/advanced-workflow-action/advanced-workflow-action-rating/advanced-workflow-action-rating.component';
2118
import { NotificationsService } from '../../../notifications/notifications.service';
2219
import { AdvancedClaimedTaskActionsAbstractComponent } from '../abstract/advanced-claimed-task-actions-abstract.component';
2320

@@ -33,11 +30,6 @@ import { AdvancedClaimedTaskActionsAbstractComponent } from '../abstract/advance
3330
})
3431
export class AdvancedClaimedTaskActionRatingComponent extends AdvancedClaimedTaskActionsAbstractComponent {
3532

36-
/**
37-
* This component represents the advanced select option
38-
*/
39-
option = ADVANCED_WORKFLOW_TASK_OPTION_RATING;
40-
4133
workflowType = ADVANCED_WORKFLOW_ACTION_RATING;
4234

4335
constructor(

src/app/shared/mydspace-actions/claimed-task/reject/claimed-task-actions-reject.component.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ export const WORKFLOW_TASK_OPTION_REJECT = 'submit_reject';
5050
* Component for displaying and processing the reject action on a workflow task item
5151
*/
5252
export class ClaimedTaskActionsRejectComponent extends ClaimedTaskActionsAbstractComponent implements OnInit {
53-
/**
54-
* This component represents the reject option
55-
*/
56-
option = WORKFLOW_TASK_OPTION_REJECT;
5753

5854
/**
5955
* The reject form group

src/app/shared/mydspace-actions/claimed-task/return-to-pool/claimed-task-actions-return-to-pool.component.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ export const WORKFLOW_TASK_OPTION_RETURN_TO_POOL = 'return_to_pool';
3636
* Component for displaying and processing the return to pool action on a workflow task item
3737
*/
3838
export class ClaimedTaskActionsReturnToPoolComponent extends ClaimedTaskActionsAbstractComponent {
39-
/**
40-
* This component represents the return to pool option
41-
*/
42-
option = WORKFLOW_TASK_OPTION_RETURN_TO_POOL;
4339

4440
constructor(protected injector: Injector,
4541
protected router: Router,

src/app/shared/mydspace-actions/claimed-task/select-reviewer/advanced-claimed-task-action-select-reviewer.component.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ import {
1414

1515
import { RequestService } from '../../../../core/data/request.service';
1616
import { SearchService } from '../../../../core/shared/search/search.service';
17-
import {
18-
ADVANCED_WORKFLOW_ACTION_SELECT_REVIEWER,
19-
ADVANCED_WORKFLOW_TASK_OPTION_SELECT_REVIEWER,
20-
} from '../../../../workflowitems-edit-page/advanced-workflow-action/advanced-workflow-action-select-reviewer/advanced-workflow-action-select-reviewer.component';
17+
import { ADVANCED_WORKFLOW_ACTION_SELECT_REVIEWER } from '../../../../workflowitems-edit-page/advanced-workflow-action/advanced-workflow-action-select-reviewer/advanced-workflow-action-select-reviewer.component';
2118
import { NotificationsService } from '../../../notifications/notifications.service';
2219
import { AdvancedClaimedTaskActionsAbstractComponent } from '../abstract/advanced-claimed-task-actions-abstract.component';
2320

@@ -33,11 +30,6 @@ import { AdvancedClaimedTaskActionsAbstractComponent } from '../abstract/advance
3330
})
3431
export class AdvancedClaimedTaskActionSelectReviewerComponent extends AdvancedClaimedTaskActionsAbstractComponent {
3532

36-
/**
37-
* This component represents the advanced select option
38-
*/
39-
option = ADVANCED_WORKFLOW_TASK_OPTION_SELECT_REVIEWER;
40-
4133
workflowType = ADVANCED_WORKFLOW_ACTION_SELECT_REVIEWER;
4234

4335
constructor(

src/app/workflowitems-edit-page/workflow-item-action-page.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Location } from '@angular/common';
22
import {
33
Directive,
4+
Input,
45
OnInit,
56
} from '@angular/core';
67
import {
@@ -42,7 +43,9 @@ import { NotificationsService } from '../shared/notifications/notifications.serv
4243
standalone: true,
4344
})
4445
export abstract class WorkflowItemActionPageDirective implements OnInit {
45-
public type;
46+
47+
@Input() type: string;
48+
4649
public wfi$: Observable<WorkflowItem>;
4750
public item$: Observable<Item>;
4851
protected previousQueryParameters?: Params;

0 commit comments

Comments
 (0)