diff options
author | 2020-01-05 13:02:40 +0000 | |
---|---|---|
committer | 2020-01-05 13:02:40 +0000 | |
commit | a98e5f9165caf14f058d03cbc6749420adefe568 (patch) | |
tree | c67447bc2e1f6a1b9894df9832828178d2c58d67 /vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.ts | |
parent | f790c78af7bb4f3226a55fff2758eefc034ca5d9 (diff) | |
parent | b51ac2ce386fa1d5f9806dae6e177b18e293c61f (diff) |
Merge "Template modal - Start from Scratch button + UT"
Diffstat (limited to 'vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.ts')
-rw-r--r-- | vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.ts | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.ts index 20655d54a..1c86b3ddb 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.ts @@ -1,7 +1,7 @@ import {Component, OnDestroy, OnInit} from "@angular/core"; import {DialogComponent, DialogService} from "ng2-bootstrap-modal"; import {IframeService} from "../../../utils/iframe.service"; -import {ActivatedRoute} from "@angular/router"; +import {ActivatedRoute, Router} from "@angular/router"; import {ServiceInfoService} from "../../../server/serviceInfo/serviceInfo.service"; import {InstantiationTemplatesModalService} from "./instantiation.templates.modal.service"; import {InstantiationTemplatesRowModel} from "./instantiation.templates.row.model"; @@ -20,6 +20,7 @@ import {forkJoin} from "rxjs"; export class InstantiationTemplatesModalComponent extends DialogComponent<string, boolean> implements OnInit, OnDestroy { + serviceModelId: string = null; selectedInstantiation: InstantiationTemplatesRowModel = null; templateModalComponentService: InstantiationTemplatesModalService; originalTableData: InstantiationTemplatesRowModel[] = []; @@ -34,6 +35,7 @@ export class InstantiationTemplatesModalComponent extends DialogComponent<string private _instantiationStatusComponentService: InstantiationStatusComponentService, private _aaiService: AaiService, private _store : NgRedux<AppState>, + private _router : Router, private _route: ActivatedRoute) { super(dialogService); this.templateModalComponentService = _templateModalComponentService; @@ -44,8 +46,8 @@ export class InstantiationTemplatesModalComponent extends DialogComponent<string this._route .queryParams .subscribe(params => { - - const getServiceJobInfoRoute = this._serviceInfoService.getTemplatesInfo(true, params['serviceModelId']); + this.serviceModelId = params['serviceModelId']; + const getServiceJobInfoRoute = this._serviceInfoService.getTemplatesInfo(true, this.serviceModelId); const getUserIdRoute = this._aaiService.getUserId(); forkJoin([getServiceJobInfoRoute, getUserIdRoute]).subscribe(([jobs]) => { @@ -70,4 +72,9 @@ export class InstantiationTemplatesModalComponent extends DialogComponent<string closeModal(): void { this._iframeService.closeIframe(this.dialogService, this); } + + + closeModalAndOpenNewServiceModal(): void { + this._templateModalComponentService.navigateToNewServiceModal(this.serviceModelId); + } } |