mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-11 03:53:02 +00:00
collection is not modifiable in workflowitem section
This commit is contained in:
@@ -5,5 +5,6 @@
|
|||||||
[submissionDefinition]="submissionDefinition"
|
[submissionDefinition]="submissionDefinition"
|
||||||
[submissionErrors]="submissionErrors"
|
[submissionErrors]="submissionErrors"
|
||||||
[item]="item"
|
[item]="item"
|
||||||
|
[collectionModifiable]="collectionModifiable"
|
||||||
[submissionId]="submissionId"></ds-submission-form>
|
[submissionId]="submissionId"></ds-submission-form>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -34,6 +34,8 @@ export class SubmissionEditComponent implements OnDestroy, OnInit {
|
|||||||
* The collection id this submission belonging to
|
* The collection id this submission belonging to
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
|
public collectionModifiable: boolean;
|
||||||
|
|
||||||
public collectionId: string;
|
public collectionId: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -109,6 +111,9 @@ export class SubmissionEditComponent implements OnDestroy, OnInit {
|
|||||||
* Retrieve workspaceitem/workflowitem from server and initialize all instance variables
|
* Retrieve workspaceitem/workflowitem from server and initialize all instance variables
|
||||||
*/
|
*/
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
|
this.collectionModifiable = this.route.snapshot.data['collectionModifiable'];
|
||||||
|
|
||||||
this.subs.push(
|
this.subs.push(
|
||||||
this.route.paramMap.pipe(
|
this.route.paramMap.pipe(
|
||||||
switchMap((params: ParamMap) => this.submissionService.retrieveSubmission(params.get('id'))),
|
switchMap((params: ParamMap) => this.submissionService.retrieveSubmission(params.get('id'))),
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
class="btn btn-outline-primary"
|
class="btn btn-outline-primary"
|
||||||
(blur)="onClose()"
|
(blur)="onClose()"
|
||||||
(click)="onClose()"
|
(click)="onClose()"
|
||||||
[disabled]="(processingChange$ | async)"
|
[disabled]="(processingChange$ | async) || collectionModifiable"
|
||||||
ngbDropdownToggle>
|
ngbDropdownToggle>
|
||||||
<span *ngIf="(processingChange$ | async)"><i class='fas fa-circle-notch fa-spin'></i></span>
|
<span *ngIf="(processingChange$ | async)"><i class='fas fa-circle-notch fa-spin'></i></span>
|
||||||
<span *ngIf="!(processingChange$ | async)">{{ selectedCollectionName$ | async }}</span>
|
<span *ngIf="!(processingChange$ | async)">{{ selectedCollectionName$ | async }}</span>
|
||||||
|
@@ -52,6 +52,12 @@ export class SubmissionFormCollectionComponent implements OnChanges, OnInit {
|
|||||||
*/
|
*/
|
||||||
@Input() currentDefinition: string;
|
@Input() currentDefinition: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the collection can be modifiable by the user
|
||||||
|
* @type {booelan}
|
||||||
|
*/
|
||||||
|
@Input() collectionModifiable: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The submission id
|
* The submission id
|
||||||
* @type {string}
|
* @type {string}
|
||||||
@@ -144,6 +150,7 @@ export class SubmissionFormCollectionComponent implements OnChanges, OnInit {
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.pathCombiner = new JsonPatchOperationPathCombiner('sections', 'collection');
|
this.pathCombiner = new JsonPatchOperationPathCombiner('sections', 'collection');
|
||||||
this.available$ = this.sectionsService.isSectionTypeAvailable(this.submissionId, SectionsType.collection);
|
this.available$ = this.sectionsService.isSectionTypeAvailable(this.submissionId, SectionsType.collection);
|
||||||
|
console.log("this.collectionModifiable", this.collectionModifiable)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
<ds-submission-form-collection [currentCollectionId]="collectionId"
|
<ds-submission-form-collection [currentCollectionId]="collectionId"
|
||||||
[currentDefinition]="definitionId"
|
[currentDefinition]="definitionId"
|
||||||
[submissionId]="submissionId"
|
[submissionId]="submissionId"
|
||||||
|
[collectionModifiable]="collectionModifiable"
|
||||||
(collectionChange)="onCollectionChange($event)">
|
(collectionChange)="onCollectionChange($event)">
|
||||||
</ds-submission-form-collection>
|
</ds-submission-form-collection>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -34,8 +34,16 @@ export class SubmissionFormComponent implements OnChanges, OnDestroy {
|
|||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@Input() collectionId: string;
|
@Input() collectionId: string;
|
||||||
|
|
||||||
@Input() item: Item;
|
@Input() item: Item;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the collection can be modifiable by the user
|
||||||
|
* @type {booelan}
|
||||||
|
*/
|
||||||
|
@Input() collectionModifiable: boolean;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The list of submission's sections
|
* The list of submission's sections
|
||||||
* @type {WorkspaceitemSectionsObject}
|
* @type {WorkspaceitemSectionsObject}
|
||||||
|
@@ -34,7 +34,11 @@ import {
|
|||||||
resolve: {
|
resolve: {
|
||||||
breadcrumb: I18nBreadcrumbResolver
|
breadcrumb: I18nBreadcrumbResolver
|
||||||
},
|
},
|
||||||
data: { title: 'workflow-item.edit.title', breadcrumbKey: 'workflow-item.edit' }
|
data: {
|
||||||
|
title: 'workflow-item.edit.title',
|
||||||
|
breadcrumbKey: 'workflow-item.edit',
|
||||||
|
collectionModifiable: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
canActivate: [AuthenticatedGuard],
|
canActivate: [AuthenticatedGuard],
|
||||||
|
Reference in New Issue
Block a user