Code Review
/
vid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
allow LOB multi-selection for vnf -fix test
[vid.git]
/
vid-webpack-master
/
src
/
app
/
shared
/
components
/
genericFormPopup
/
generic-form-popup.component.ts
diff --git
a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.ts
b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.ts
index
eb60865
..
7368dd6
100644
(file)
--- a/
vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.ts
+++ b/
vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.ts
@@
-8,7
+8,7
@@
import * as _ from "lodash";
import {NgRedux} from "@angular-redux/store";
import {AppState} from "../../store/reducers";
import {ServicePopupService} from "./genericFormServices/service/service.popup.service";
import {NgRedux} from "@angular-redux/store";
import {AppState} from "../../store/reducers";
import {ServicePopupService} from "./genericFormServices/service/service.popup.service";
-import {ActivatedRoute} from "@angular/router";
+import {ActivatedRoute
, Router
} from "@angular/router";
import {AaiService} from "../../services/aaiService/aai.service";
import {GenericFormPopupService} from "./generic-form-popup.service";
import {FormControlModel} from "../../models/formControlModels/formControl.model";
import {AaiService} from "../../services/aaiService/aai.service";
import {GenericFormPopupService} from "./generic-form-popup.service";
import {FormControlModel} from "../../models/formControlModels/formControl.model";
@@
-47,13
+47,12
@@
export class GenericFormPopupComponent extends DialogComponent<PopupModel, boole
type: PopupType;
uuidData: UUIDData;
showTemplateBtn: boolean = false;
type: PopupType;
uuidData: UUIDData;
showTemplateBtn: boolean = false;
- isShowPreviousInstantiationBtn: boolean = false;
isUpdateMode: boolean;
node: ITreeNode = null;
hasGeneralApiError: boolean = false;
parentElementClassName = 'content';
errorMsg = 'Page contains errors. Please see details next to the relevant fields.';
isUpdateMode: boolean;
node: ITreeNode = null;
hasGeneralApiError: boolean = false;
parentElementClassName = 'content';
errorMsg = 'Page contains errors. Please see details next to the relevant fields.';
-
+ serviceModelId : string;
servicesQty = 1;
quantityOptions = _.range(1, 51)
servicesQty = 1;
quantityOptions = _.range(1, 51)
@@
-65,6
+64,7
@@
export class GenericFormPopupComponent extends DialogComponent<PopupModel, boole
private _aaiService: AaiService,
private _dialogService: DialogService,
private _route: ActivatedRoute,
private _aaiService: AaiService,
private _dialogService: DialogService,
private _route: ActivatedRoute,
+ private _router : Router,
private _genericFormPopupService: GenericFormPopupService) {
super(dialogService);
}
private _genericFormPopupService: GenericFormPopupService) {
super(dialogService);
}
@@
-86,9
+86,9
@@
export class GenericFormPopupComponent extends DialogComponent<PopupModel, boole
this._route
.queryParams
.subscribe(params => {
this._route
.queryParams
.subscribe(params => {
-
console.log('changed')
;
- if (
params['serviceModelId']
&& params['isCreate'] == "true") {
- this.onInitForCreateNewServicePopup();
+
this.serviceModelId = params['serviceModelId']
;
+ if (
this.serviceModelId
&& params['isCreate'] == "true") {
+ this.onInitForCreateNewServicePopup(
params['isInstantiationTemplateExists']
);
}
});
}
});
@@
-106,7
+106,7
@@
export class GenericFormPopupComponent extends DialogComponent<PopupModel, boole
}
}
}
}
- private onInitForCreateNewServicePopup() {
+ private onInitForCreateNewServicePopup(
isInstantiationTemplateExists : boolean
) {
this._genericFormPopupService.initReduxOnCreateNewService().then((serviceModelId: string) => {
this.uuidData = <any>{
bulkSize: 1,
this._genericFormPopupService.initReduxOnCreateNewService().then((serviceModelId: string) => {
this.uuidData = <any>{
bulkSize: 1,
@@
-115,9
+115,8
@@
export class GenericFormPopupComponent extends DialogComponent<PopupModel, boole
serviceId: serviceModelId,
popupService: this._servicePopupService,
};
serviceId: serviceModelId,
popupService: this._servicePopupService,
};
- this.showTemplateBtn = !!this._store.getState().global.flags["FLAG_2004_INSTANTIATION_TEMPLATES_POPUP"];
- this.
isShowPreviousInstantiationBtn = !!this._store.getState().global.flags["FLAG_2004_TEMP_BUTTON_TO_INSTANTIATION_STATUS_FILTER"]
;
+ this.
showTemplateBtn = this._genericFormPopupService.shouldShowTemplateBtn(isInstantiationTemplateExists)
;
this.uuidData.popupService.closeDialogEvent.subscribe((that) => {
this.closeDialog(that);
this.uuidData.popupService.closeDialogEvent.subscribe((that) => {
this.closeDialog(that);
@@
-154,7
+153,7
@@
export class GenericFormPopupComponent extends DialogComponent<PopupModel, boole
openTemplateModal = (): void => {
openTemplateModal = (): void => {
- this._
dialogService.addDialog(InstantiationTemplatesModalComponent, {
});
+ this._
router.navigate(['/instantiationTemplatesPopup'], { queryParams: { serviceModelId: this.serviceModelId}, queryParamsHandling: 'merge'
});
}
}
}
}