diff options
author | 2020-08-25 13:35:40 +0000 | |
---|---|---|
committer | 2020-08-25 13:35:40 +0000 | |
commit | a6defbafb46a5db6b3bf633d1a9c32f503060f55 (patch) | |
tree | 883de1d7e46d7c3510008a7cddbb107bdb33d633 /cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation | |
parent | 14791b79e4cad6aab49880607009883ee94fc1d2 (diff) | |
parent | 543868e6267b62e84d01f611cfab79d493a8c197 (diff) |
Merge "fixing issues in configuration package"
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation')
2 files changed, 4 insertions, 7 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.html index e77356d6c..c86dd26cf 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.html +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.html @@ -32,7 +32,7 @@ <div class="single-line-model"> <label class="label-name">Name <span>*</span></label> <div class="label-input"> - <input type="input" [readOnly]="!packageNameAndVersionEnables" (change)="checkRequiredElements()" [(ngModel)]="metaDataTab.name" + <input type="input" (change)="checkRequiredElements()" [(ngModel)]="metaDataTab.name" placeholder="Package name"> </div> <!--<div class="model-note-container error-message"> @@ -44,7 +44,7 @@ <div class="single-line-model"> <label class="label-name">Version <span>*</span></label> <div class="label-input"> - <input type="input" [readOnly]="!packageNameAndVersionEnables" (change)="checkRequiredElements()" [(ngModel)]="metaDataTab.version" + <input type="input" (change)="checkRequiredElements()" [(ngModel)]="metaDataTab.version" (input)="validatePackageNameAndVersion()" pattern="(\d+)\.(\d+)\.(\d+)" placeholder="Example: 1.0.0"> </div> <div class="model-note-container error-message">{{errorMessage}}</div> diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.ts index 4e0e5c977..af5b875f7 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.ts @@ -11,7 +11,7 @@ import {ActivatedRoute} from '@angular/router'; styleUrls: ['./metadata-tab.component.css'] }) export class MetadataTabComponent implements OnInit { - packageNameAndVersionEnables = true; + counter = 0; tags = new Set<string>(); customKeysMap = new Map(); @@ -22,7 +22,7 @@ export class MetadataTabComponent implements OnInit { modeType = this.modes[0].name; metaDataTab: MetaDataTabModel = new MetaDataTabModel(); errorMessage: string; - versionPattern = '(\d+)\.(\d+)\.(\d+)'; + versionPattern = '^(\\d+\\.)?(\\d+\\.)?(\\*|\\d+)$'; constructor( private route: ActivatedRoute, @@ -37,9 +37,6 @@ export class MetadataTabComponent implements OnInit { this.metaDataTab.mapOfCustomKey = this.customKeysMap; this.metaDataTab.mode = this.modeType; - const id = this.route.snapshot.paramMap.get('id'); - id ? this.packageNameAndVersionEnables = false : - this.packageNameAndVersionEnables = true; this.packageCreationStore.state$.subscribe(element => { if (element && element.metaData) { |