From 4feb70f1a6ddce552f12e2b9cc5daf0d24fd4d82 Mon Sep 17 00:00:00 2001 From: RachithaRamappa93 Date: Thu, 18 Feb 2021 22:03:28 +0530 Subject: Audit screen fix Change-Id: I03aa8b5a7c78a0a1441d0ba20ec15169b90d4362 Issue-ID: VID-945 Signed-off-by: rachitha.ramappa@att.com --- .../drawing-board-header.service.ts | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header') 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 80ce6e055..4dcee2deb 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 @@ -50,11 +50,21 @@ export class DrawingBoardHeaderService{ let instance: ServiceInstance = this.store.getState().service.serviceInstance[serviceModelId]; let model = new ServiceModel(this.store.getState().service.serviceHierarchy[serviceModelId]); let serviceInfoModel: ServiceInfoModel = this.store.getState().service.serviceInfoModel; - console.log("ShowAuditInfo : ServiceInfoModel from drawing-board-header service : ", serviceInfoModel); - if(serviceInfoModel != null || serviceInfoModel != undefined){ + if(serviceInfoModel == null || serviceInfoModel == undefined){ + console.log("serviceInfoModel is null or undefined"); + let serviceInfoModelNew : any = { + serviceInstanceId : instance.instanceId, + serviceInstanceName: instance.instanceName, + serviceModelVersion: instance.modelInfo.modelVersion, + serviceModelName: instance.modelInfo.modelName, + aLaCarte: true + }; + console.log("New service Info Model : ", serviceInfoModelNew); + AuditInfoModalComponent.openModal.next(serviceInfoModelNew); + // AuditInfoModalComponent.openInstanceAuditInfoModal.next({instanceId : serviceModelId , type : 'SERVICE', model : model , instance : instance}); + } else { + console.log("ServiceInfoModel is not null: ", serviceInfoModel); AuditInfoModalComponent.openModal.next(serviceInfoModel); - } else{ - AuditInfoModalComponent.openInstanceAuditInfoModal.next({instanceId : serviceModelId , type : 'SERVICE', model : model , instance : instance}); } } -- cgit 1.2.3-korg