diff options
author | 2020-09-23 04:25:36 +0000 | |
---|---|---|
committer | 2020-09-23 04:25:36 +0000 | |
commit | 15e4b8a1204cb1acad60c0f3ff6e2fc88fb3ab62 (patch) | |
tree | e75d4440152f5573a72b5099440acf96f3e29c1b /cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/import-package/import-package.component.ts | |
parent | 31ec7420e2b289419fd15acbef5e83d516a66a23 (diff) | |
parent | 81d82489f5592770a9e5f9ee137bfc1558b48153 (diff) |
Merge "adding saving simple function at designer"
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/import-package/import-package.component.ts')
-rw-r--r-- | cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/import-package/import-package.component.ts | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/import-package/import-package.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/import-package/import-package.component.ts index 0f582d7f6..50799a531 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/import-package/import-package.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/import-package/import-package.component.ts @@ -2,6 +2,7 @@ import {Component, OnInit} from '@angular/core'; import {FileSystemFileEntry, NgxFileDropEntry} from 'ngx-file-drop'; import {PackageCreationExtractionService} from '../../package-creation/package-creation-extraction.service'; import {Router} from '@angular/router'; +import {PackageCreationStore} from '../../package-creation/package-creation.store'; @Component({ selector: 'app-import-package', @@ -16,10 +17,13 @@ export class ImportPackageComponent implements OnInit { public files: NgxFileDropEntry[] = []; constructor(private packageCreationExtractionService: PackageCreationExtractionService, + private packageCreationStore: PackageCreationStore, private router: Router) { + this.packageCreationStore.clear(); } ngOnInit() { + this.packageCreationStore.clear(); } removeInitFile(index) { @@ -70,10 +74,10 @@ export class ImportPackageComponent implements OnInit { } saveFileToStore() { - for (const droppedFile of this.uploadedFiles) { - const file = this.getFile(droppedFile); - this.packageCreationExtractionService.extractBlobToStore(file); - } + console.log(this.uploadedFiles.length); + const file = this.getFile(this.uploadedFiles[this.uploadedFiles.length - 1]); + this.packageCreationStore.clear(); + this.packageCreationExtractionService.extractBlobToStore(file); } openFilesInCreationPackage() { |