ui can create new version if dmp version status is current
This commit is contained in:
parent
67ed7db89d
commit
96894f4ca4
|
@ -185,6 +185,7 @@ export class DmpListingComponent extends BaseComponent implements OnInit { //IBr
|
|||
nameof<Dmp>(x => x.status),
|
||||
nameof<Dmp>(x => x.accessType),
|
||||
nameof<Dmp>(x => x.version),
|
||||
nameof<Dmp>(x => x.versionStatus),
|
||||
nameof<Dmp>(x => x.groupId),
|
||||
nameof<Dmp>(x => x.updatedAt),
|
||||
nameof<Dmp>(x => x.belongsToCurrentTenant),
|
||||
|
|
|
@ -28,6 +28,7 @@ import { DmpInvitationDialogComponent } from '../../invitation/dialog/dmp-invita
|
|||
import { NewVersionDmpDialogComponent } from '../../new-version-dialog/dmp-new-version-dialog.component';
|
||||
import { AppPermission } from '@app/core/common/enum/permission.enum';
|
||||
import { FileTransformerEntityType } from '@app/core/common/enum/file-transformer-entity-type';
|
||||
import { DmpVersionStatus } from '@app/core/common/enum/dmp-version-status';
|
||||
|
||||
@Component({
|
||||
selector: 'app-dmp-listing-item-component',
|
||||
|
@ -224,7 +225,7 @@ export class DmpListingItemComponent extends BaseComponent implements OnInit {
|
|||
}
|
||||
|
||||
canCreateNewVersion(dmp: Dmp): boolean {
|
||||
return (this.dmp.authorizationFlags?.some(x => x === AppPermission.CreateNewVersionDmp) || this.authentication.hasPermission(AppPermission.CreateNewVersionDmp)) && this.isPublic == false && this.dmp.belongsToCurrentTenant != false;
|
||||
return (this.dmp.authorizationFlags?.some(x => x === AppPermission.CreateNewVersionDmp) || this.authentication.hasPermission(AppPermission.CreateNewVersionDmp)) && this.dmp.versionStatus === DmpVersionStatus.Current && this.isPublic == false && this.dmp.belongsToCurrentTenant != false;
|
||||
}
|
||||
|
||||
canDeleteDmp(dmp: Dmp): boolean {
|
||||
|
|
|
@ -47,6 +47,7 @@ import { IsActive } from '@app/core/common/enum/is-active.enum';
|
|||
import { DmpFinalizeDialogComponent, DmpFinalizeDialogOutput } from '../dmp-finalize-dialog/dmp-finalize-dialog.component';
|
||||
import { DmpEditorResolver } from '../dmp-editor-blueprint/dmp-editor.resolver';
|
||||
import { FileTransformerEntityType } from '@app/core/common/enum/file-transformer-entity-type';
|
||||
import { DmpVersionStatus } from '@app/core/common/enum/dmp-version-status';
|
||||
|
||||
@Component({
|
||||
selector: 'app-dmp-overview',
|
||||
|
@ -218,7 +219,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
|||
}
|
||||
|
||||
canCreateNewVersion(): boolean {
|
||||
return (this.dmp.authorizationFlags?.some(x => x === AppPermission.CreateNewVersionDmp) || this.authentication.hasPermission(AppPermission.CreateNewVersionDmp)) && this.isPublicView == false && this.dmp.belongsToCurrentTenant != false;
|
||||
return (this.dmp.authorizationFlags?.some(x => x === AppPermission.CreateNewVersionDmp) || this.authentication.hasPermission(AppPermission.CreateNewVersionDmp)) && this.dmp.versionStatus === DmpVersionStatus.Current && this.isPublicView == false && this.dmp.belongsToCurrentTenant != false;
|
||||
}
|
||||
|
||||
canDeleteDmp(): boolean {
|
||||
|
@ -728,6 +729,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
|||
nameof<Dmp>(x => x.status),
|
||||
nameof<Dmp>(x => x.accessType),
|
||||
nameof<Dmp>(x => x.version),
|
||||
nameof<Dmp>(x => x.versionStatus),
|
||||
nameof<Dmp>(x => x.groupId),
|
||||
nameof<Dmp>(x => x.version),
|
||||
nameof<Dmp>(x => x.updatedAt),
|
||||
|
|
Loading…
Reference in New Issue