diff options
author | Einat Vinouze <einat.vinouze@intl.att.com> | 2019-08-27 16:01:01 +0300 |
---|---|---|
committer | Ittay Stern <ittay.stern@att.com> | 2019-09-09 07:01:36 +0000 |
commit | e1f7974f0badbd4440d5b7ea5f1b1cb2d4973818 (patch) | |
tree | 46be9cdc44cbb475527bc3c43df23d16f7579d29 /vid-webpack-master/src/app/shared/storeUtil/utils/reducersHelper.ts | |
parent | e25b88b5a7a0f3bf63ca7160a441b53145484bcc (diff) |
Adding feature: Replace vfmodule
Issue-ID: VID-603
Change-Id: I59068a0979d6fb733e4243c8f78921f396dc9d17
Signed-off-by: Einat Vinouze <einat.vinouze@intl.att.com>
Signed-off-by: Amichai Hemli <amichai.hemli@intl.att.com>
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-webpack-master/src/app/shared/storeUtil/utils/reducersHelper.ts')
-rw-r--r-- | vid-webpack-master/src/app/shared/storeUtil/utils/reducersHelper.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/vid-webpack-master/src/app/shared/storeUtil/utils/reducersHelper.ts b/vid-webpack-master/src/app/shared/storeUtil/utils/reducersHelper.ts index 5722811ce..c192ece48 100644 --- a/vid-webpack-master/src/app/shared/storeUtil/utils/reducersHelper.ts +++ b/vid-webpack-master/src/app/shared/storeUtil/utils/reducersHelper.ts @@ -3,8 +3,7 @@ import {ActionOnFirstLevel} from "./firstLevel/firstLevel.actions"; import {ServiceInstanceActions} from "../../models/serviceInstanceActions"; import {ServiceState} from "./main.reducer"; -export function deleteFirstLevel(state: ServiceState, action: ActionOnFirstLevel,shouldUpdateServiceValidationCounter: boolean) -{ +export function deleteFirstLevel(state: ServiceState, action: ActionOnFirstLevel,shouldUpdateServiceValidationCounter: boolean){ let newState = _.cloneDeep(state); let firstLevel = newState.serviceInstance[action.serviceId][action.firstLevelName][action.storeKey]; let oldAction = firstLevel.action; @@ -22,4 +21,10 @@ export function updateServiceValidationCounter(newState: any, oldValidationState } else if (!oldValidationState && newValidationState) { newState.serviceInstance[serviceUuid].validationCounter++; } + resetUpgradeStatus(newState, serviceUuid); }; + +function resetUpgradeStatus(newState: any, serviceUuid: string){ + newState.serviceInstance[serviceUuid].upgradedVFMSonsCounter = 0; + newState.serviceInstance[serviceUuid].isUpgraded = false; +} |