Merge "CDS add Swagger annotations for BP Model API"
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts
index 96e54d9..e9affec 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts
@@ -52,6 +52,7 @@
     dataTarget: any = '';
     ngUnsubscribe = new Subject();
     private designerState: any;
+    packageId: any;
 
     constructor(
         private route: ActivatedRoute,
@@ -63,7 +64,8 @@
         private designerStore: DesignerStore,
         private toastService: ToastrService,
         private ngxService: NgxUiLoaderService,
-        private packageCreationExtractionService: PackageCreationExtractionService
+        private packageCreationExtractionService: PackageCreationExtractionService,
+        private activatedRoute: ActivatedRoute,
     ) {
         super();
 
@@ -100,6 +102,9 @@
             this.metadataClasses = this.metadataClasses.replace('complete', '');
             this.isSaveEnabled = false;
         }
+        this.activatedRoute.paramMap.subscribe(res => {
+            this.packageId = res.get('id');
+        });
 
 
     }
@@ -135,7 +140,7 @@
 
     editBluePrint() {
         this.ngxService.start();
-        this.configurationDashboardService.deletePackage(this.viewedPackage.id).subscribe(res => {
+        this.configurationDashboardService.deletePackage(this.packageId).subscribe(res => {
             this.formTreeData();
             this.saveBluePrintToDataBase();