Merge branch 'dmp-refactoring' of https://code-repo.d4science.org/MaDgiK-CITE/argos into dmp-refactoring
This commit is contained in:
commit
466141ff56
|
@ -57,8 +57,10 @@
|
|||
<button [disabled]="saving" mat-menu-item (click)="formSubmit()" type="button">{{ 'DMP-EDITOR.ACTIONS.SAVE-AND-CONTINUE' | translate }}</button>
|
||||
</mat-menu>
|
||||
</div>
|
||||
<div class="col-auto d-flex align-items-center" [matTooltipDisabled]="canFinalize && formGroup.pristine" matTooltip="{{'DMP-EDITOR.ACTIONS.FINALIZE.CAN-NOT-FINALIZE' | translate}}">
|
||||
<button [disabled]="!canFinalize || !formGroup.pristine" mat-raised-button class="save-btn mr-2" type="button" (click)="finalize()">{{ 'DMP-EDITOR.ACTIONS.FINALIZE.FINALIZE' | translate }}</button>
|
||||
</div>
|
||||
<div *ngIf="formGroup.pristine" class="col-auto d-flex align-items-center">
|
||||
<button [disabled]="saving" *ngIf="canFinalize" mat-raised-button class="save-btn mr-2" type="button" (click)="finalize()">{{ 'DMP-EDITOR.ACTIONS.FINALIZE' | translate }}</button>
|
||||
<button [disabled]="saving" *ngIf="isLocked" mat-raised-button class="save-btn mr-2" type="button">{{ 'DMP-EDITOR.ACTIONS.LOCKED' | translate}}</button>
|
||||
<button [disabled]="saving" *ngIf="canReverseFinalize" mat-raised-button class="save-btn mr-2" type="button" (click)="reverseFinalization()">{{ 'DMP-EDITOR.ACTIONS.REVERSE' | translate }}</button>
|
||||
</div>
|
||||
|
|
|
@ -123,7 +123,7 @@ export class DmpEditorComponent extends BaseEditor<DmpEditorModel, Dmp> implemen
|
|||
}
|
||||
|
||||
protected get canFinalize(): boolean {
|
||||
return !this.isDeleted && !this.isNew && this.canEdit && this.isLockedByUser && !this.isFinalized && this.item.status == DmpStatus.Draft && (this.hasPermission(this.authService.permissionEnum.EditDmp) || this.item?.authorizationFlags?.some(x => x === AppPermission.EditDmp));
|
||||
return !this.isDeleted && !this.isNew && this.canEdit && this.isLockedByUser && !this.isFinalized && (this.hasPermission(this.authService.permissionEnum.EditDmp) || this.item?.authorizationFlags?.some(x => x === AppPermission.EditDmp));
|
||||
}
|
||||
|
||||
protected get canReverseFinalize(): boolean {
|
||||
|
|
|
@ -1596,6 +1596,10 @@
|
|||
"DISCARD-EDITED-CONFIRM": "Yes, revert changes.",
|
||||
"DISCARD-EDITED-DENY": "No."
|
||||
},
|
||||
"FINALIZE": {
|
||||
"FINALIZE": "Finalize",
|
||||
"CAN-NOT-FINALIZE": "Save your changes first"
|
||||
},
|
||||
"SAVE": "Save",
|
||||
"DELETE": "Delete",
|
||||
"ADD-DESCRIPTION-IN-SECTION": "Add Description",
|
||||
|
@ -1609,7 +1613,6 @@
|
|||
"EXPORT": "Export",
|
||||
"SAVE-AND-CLOSE": "Save & Close",
|
||||
"SAVE-AND-CONTINUE": "Save & Continue",
|
||||
"FINALIZE": "Finalize",
|
||||
"REVERSE": "Undo Finalization",
|
||||
"LOCKED": "Locked"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue