summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2019-07-07 19:23:03 +0300
committerIttay Stern <ittay.stern@att.com>2019-07-08 16:13:43 +0300
commitf792671ae247a931f34d902e9276202b5016ef9a (patch)
tree6104971e8074c9a3d720836276ff18619719ec02 /vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts
parentfc62274e8d15964d63c62bf0e2f4abc040252ee9 (diff)
Merge from ecomp 718fd196 - Modern UI
Issue-ID: VID-378 Change-Id: I2736b98426e324ec3aa233b034229ba84d99839f Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts')
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts25
1 files changed, 23 insertions, 2 deletions
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts
index 946c5cab5..7df2f3a3f 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts
@@ -11,6 +11,7 @@ import * as _ from 'lodash';
import {ErrorMsgService} from "../../../shared/components/error-msg/error-msg.service";
import {DrawingBoardModes} from "../drawing-board.modes";
import {ServiceInstance} from "../../../shared/models/serviceInstance";
+import {FeatureFlagsService, Features} from "../../../shared/services/featureFlag/feature-flags.service";
@Injectable()
export class DrawingBoardHeaderService{
@@ -38,7 +39,13 @@ export class DrawingBoardHeaderService{
showAuditInfo(serviceModelId) : void {
let instance: ServiceInstance = this.store.getState().service.serviceInstance[serviceModelId];
let model = new ServiceModel(this.store.getState().service.serviceHierarchy[serviceModelId]);
- AuditInfoModalComponent.openInstanceAuditInfoModal.next({instanceId : serviceModelId , type : 'SERVICE', model : model , instance : instance, trackById: instance.trackById});
+ AuditInfoModalComponent.openInstanceAuditInfoModal.next({instanceId : serviceModelId , type : 'SERVICE', model : model , instance : instance});
+ }
+
+ toggleResumeService(serviceModelId, isResume: boolean) : void {
+ const action: ServiceInstanceActions = isResume ? ServiceInstanceActions.Resume : ServiceInstanceActions.None;
+ this.store.dispatch(addServiceAction(serviceModelId, action));
+
}
@@ -49,7 +56,7 @@ export class DrawingBoardHeaderService{
const serviceInstance = this.store.getState().service.serviceInstance[serviceInstanceId];
if(!_.isNil(serviceInstance)){
const validationCounter = serviceInstance.validationCounter;
- if (!_.isNil(this.errorMsgService.errorMsgObject)&& mode !== DrawingBoardModes.RETRY_EDIT) return true;
+ if (!_.isNil(this.errorMsgService.errorMsgObject) && mode !== DrawingBoardModes.RETRY_EDIT) return true;
if(validationCounter > 0) return true;
if(serviceInstance.action !== ServiceInstanceActions.None) return false;
if(mode === DrawingBoardModes.RETRY_EDIT) return false;
@@ -83,4 +90,18 @@ export class DrawingBoardHeaderService{
return mode === DrawingBoardModes.CREATE || ((mode === DrawingBoardModes.RETRY_EDIT || mode === DrawingBoardModes.EDIT)&&
!_.isNil(serviceInstance) && !_.isNil(serviceInstance[serviceModelId])&& serviceInstance[serviceModelId].action === ServiceInstanceActions.Create);
}
+
+ showResumeService(serviceModelId: string): boolean {
+ const serviceInstance: ServiceInstance = !_.isNil(this.store.getState().service.serviceInstance)? this.store.getState().service.serviceInstance[serviceModelId] : null;
+ if (serviceInstance)
+ {
+ return FeatureFlagsService.getFlagState(Features.FLAG_1908_RESUME_MACRO_SERVICE, this.store) &&
+ serviceInstance.vidNotions.instantiationType.toLowerCase() === "macro" &&
+ serviceInstance.subscriptionServiceType.toLowerCase() !== "transport" &&
+ serviceInstance.orchStatus &&
+ (serviceInstance.orchStatus.toLowerCase() === "assigned" ||
+ serviceInstance.orchStatus.toLowerCase() === "inventoried");
+ }
+ return false;
+ }
}