removing retain assignments checkbox from upgade vfModule screen
[vid.git] / vid-webpack-master / src / app / shared / components / genericFormPopup / genericFormServices / vfModuleUpgrade / vfModule.upgrade.popuop.service.ts
index afc099c..60d981c 100644 (file)
@@ -44,7 +44,6 @@ export class VfModuleUpgradePopupService extends VfModulePopupServiceBase {
 
   getControls(serviceId: string, vnfStoreKey: string, vfModuleStoreKey: string, isUpdateMode: boolean): FormControlModel[]  {
     let result: FormControlModel[] =[
-      this.getRetainAssignmentsControl(),
       this._sharedControllersService.getSDNCControl(null, true)
     ];
 
@@ -70,6 +69,7 @@ export class VfModuleUpgradePopupService extends VfModulePopupServiceBase {
 
     this.updateFormValueWithSupplementaryFile(form, that);
 
+form.value[UpgradeFormControlNames.RETAIN_ASSIGNMENTS] = false;
     this._store.dispatch(upgradeVFModule(modelName, vnfStoreKey, serviceInstanceId, dynamicModelName));
     this._store.dispatch(mergeObjectByPathAction(['serviceInstance', serviceInstanceId, 'vnfs', vnfStoreKey, 'vfModules', modelName, dynamicModelName], form.value));
     this._sharedTreeService.upgradeBottomUp(node, serviceInstanceId);
@@ -88,15 +88,4 @@ export class VfModuleUpgradePopupService extends VfModulePopupServiceBase {
       validations: []
     })
   };
-
-  getRetainAssignmentsControl = (): CheckboxFormControl => {
-    return new CheckboxFormControl({
-      type: FormControlType.CHECKBOX,
-      controlName: UpgradeFormControlNames.RETAIN_ASSIGNMENTS,
-      displayName: 'Retain Assignments',
-      dataTestId: UpgradeFormControlNames.RETAIN_ASSIGNMENTS,
-      value: false,
-      validations: []
-    })
-  };
 }