diff options
author | 2020-08-30 14:56:27 +0200 | |
---|---|---|
committer | 2020-08-30 15:17:04 +0200 | |
commit | e78a071a0f9a530e98bcc73b4ad31097fe053e81 (patch) | |
tree | 6c13e19f22be921d7d89b53732a35564c73158a7 /cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation | |
parent | 65a445a2afd3ca2d1022d2e7c7fc71ec12698e87 (diff) |
fixing metadata at editing package
Issue-ID: CCSDK-2336
Signed-off-by: ShaabanEltanany <shaaban.eltanany.ext@orange.com>
Change-Id: I4eafbacb1dddf4644ecd60a00af4980f8e9ffc69
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation')
2 files changed, 15 insertions, 5 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.html index fc001b11b..48d4dd57f 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.html +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.html @@ -36,7 +36,7 @@ <div class="nav nav-tabs " id="nav-tab" role="tablist"> <a class="nav-item nav-link active" id="nav-metadata-tab" data-toggle="tab" href="#nav-metadata" role="tab" aria-controls="nav-metadata" aria-selected="false" - autofocus #nameit (focusout)="test()">METADATA</a> + autofocus #nameit (focusout)="saveMetaData()" [classList]="metadataClasses">METADATA</a> <a class="nav-item nav-link" id="nav-template-tab" data-toggle="tab" href="#nav-template" role="tab" aria-controls="nav-template" aria-selected="false">TEMPLATE & MAPPING</a> <a class="nav-item nav-link" id="nav-scripts-tab" data-toggle="tab" href="#nav-scripts" @@ -53,7 +53,7 @@ <div class="row mt-4"> <div class="col"> <div class="tab-content" id="nav-tabContent"> - <div class="tab-pane fade show active" id="nav-metadata" role="tabpanel" + <div class="tab-pane fade show active" id="nav-metadata" role="tabpanel" aria-labelledby="nav-metadata-tab"> <app-metadata-tab></app-metadata-tab> </div> diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.ts index bba45c810..e91313b2e 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.ts @@ -67,6 +67,7 @@ export class PackageCreationComponent implements OnInit { @ViewChild('nameit', {static: true}) elementRef: ElementRef; versionPattern = '^(\\d+\\.)?(\\d+\\.)?(\\*|\\d+)$'; + metadataClasses = 'nav-item nav-link active complete'; ngOnInit() { this.elementRef.nativeElement.focus(); @@ -76,8 +77,14 @@ export class PackageCreationComponent implements OnInit { && cbaPackage.metaData.name && cbaPackage.metaData.version && regexp.test(cbaPackage.metaData.version)) { this.isSaveEnabled = true; + if (!this.metadataClasses.includes('complete')) { + console.log('added'); + this.metadataClasses += 'complete'; + } + console.log('perhaps it is been added'); } else { this.isSaveEnabled = false; + this.metadataClasses = this.metadataClasses.replace('complete', ''); } }); } @@ -127,11 +134,14 @@ export class PackageCreationComponent implements OnInit { } - test() { - this.metadataTabComponent.saveMetaDataToStore(); - } goBackToDashBorad() { this.router.navigate(['/packages']); } + + saveMetaData() { + console.log('executed change'); + this.metadataTabComponent.saveMetaDataToStore(); + + } } |