diff --git a/CA和CR的Tab上加入文档预览按钮/AegApiTool_mxJPO.java b/CA和CR的Tab上加入文档预览按钮/AegApiTool_mxJPO.java
new file mode 100644
index 0000000..7804e8e
--- /dev/null
+++ b/CA和CR的Tab上加入文档预览按钮/AegApiTool_mxJPO.java
@@ -0,0 +1,92 @@
+import com.matrixone.apps.domain.DomainObject;
+import com.matrixone.apps.domain.util.MqlUtil;
+import matrix.db.Context;
+import matrix.db.File;
+import matrix.db.FileItr;
+import matrix.db.FileList;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.logging.Logger;
+
+public class AegApiTool_mxJPO {
+
+ private static final String basePath = "/kkFileView2/kkFileView-4.4.0";
+ private static final String targetDir = basePath + "/file/demo/";
+ private static final Logger LOGGER = Logger.getLogger(AegCADemote_mxJPO.class.getName());
+ private static final String tempFilePath = "/kkFileView2/kkFileView-4.4.0/file/demo/";
+
+ public Map downloadFile(Context context1, String[] args) throws Exception {
+ String physicalId = args[0];
+ String documentName = args[1];
+ LOGGER.info("physicalId ==> " + physicalId);
+ LOGGER.info("documentName ==> " + documentName);
+ LOGGER.info("context.name ==> " + context1.getUser());
+
+ Context context=new Context("");
+ context.setUser("admin_platform");
+ context.setPassword("Aeg12345678");
+ context.connect();
+
+ String getItemIdInfo = "temp query bus * * * where 'physicalId == " + physicalId + "' select id dump |";
+ String itemIdInfo = MqlUtil.mqlCommand(context, getItemIdInfo);
+
+ String itemId = itemIdInfo.split("\\|")[3];
+ DomainObject domainObject = DomainObject.newInstance(context, itemId);
+
+ String getFileFormat = "print bus " + itemId + " select format[].file.format dump |" ;
+ String fileFormat = MqlUtil.mqlCommand(context, getFileFormat);
+ String[] formatArray=fileFormat.split("\\|");
+
+ boolean isFlag = false;
+ String displayName = "";
+
+ for(String format : formatArray)
+ {
+ FileList fileList = domainObject.getFiles(context, format);
+ FileItr fileItr = new FileItr(fileList);
+
+ while (fileItr.next())
+ {
+ File file = fileItr.obj();
+ String fileName = file.getName();
+
+ LOGGER.info("fileName ==> " + fileName);
+ LOGGER.info("documentName ==> " + documentName);
+
+// if(documentName.equals(fileName.substring(0, fileName.lastIndexOf('.')))) {
+// domainObject.checkoutFile(context, false, format, fileName, tempFilePath);
+// displayName = fileName;
+// isFlag = true;
+// }
+
+ Path path = Paths.get(targetDir);
+
+ if(!Files.exists(path)){
+ Files.createDirectories(path);
+ System.out.println("目录创建成功:" + targetDir);
+ } else {
+ System.out.println("目录已存在,跳过创建:" + targetDir);
+ }
+
+ domainObject.checkoutFile(context, false, format, fileName, tempFilePath);
+ displayName = fileName;
+ isFlag = true;
+ }
+ }
+
+ Map map = new HashMap<>();
+ map.put("displayName", displayName);
+
+ if(isFlag) {
+ map.put("isFlag","true");
+ return map;
+ } else {
+ map.put("isFlag","false");
+ return map;
+ }
+ }
+}
diff --git a/CA和CR的Tab上加入文档预览按钮/AegDownloadFile.jar b/CA和CR的Tab上加入文档预览按钮/AegDownloadFile.jar
new file mode 100644
index 0000000..19a6b1d
Binary files /dev/null and b/CA和CR的Tab上加入文档预览按钮/AegDownloadFile.jar differ
diff --git a/CA和CR的Tab上加入文档预览按钮/CA和CR配置详情.docx b/CA和CR的Tab上加入文档预览按钮/CA和CR配置详情.docx
new file mode 100644
index 0000000..ca01520
--- /dev/null
+++ b/CA和CR的Tab上加入文档预览按钮/CA和CR配置详情.docx
@@ -0,0 +1,21 @@
+第一步:
+ :下载并安装LibreOffice
+ wget https://downloadarchive.documentfoundation.org/libreoffice/old/7.5.3.2/rpm/x86_64/LibreOffice_7.5.3.2_Linux_x86-64_rpm.tar.gz
+ tar -zxvf LibreOffice_7.5.3.2_Linux_x86-64_rpm.tar.gz
+ cd LibreOffice_7.5.3.2_Linux_x86-64_rpm/RPMS/
+ sudo rpm -ivh *.rpm --nodeps - force
+ :下载并安装kkFileView
+ tar -zxvf kkFileView-4.4.0.tar.gz
+ cd /kkFileView2/kkFileView-4.4.0/bin/
+ ./startup.sh
+ :添加JPO
+ : 添加Jar包
+ :修改ENOChgGovernanceUX_zh.js 添加中文名字;
+
+ :修改 ENOChgGovernanceUX.js 文件;
+ 在CA的Tab上添加按钮
+ 搜索createCusTab
+ 然后一路配置下去
+ 在CR 的Tab上添加按钮
+ 搜索createCrCusTab
+ 然后一路配置下去
diff --git a/CA和CR的Tab上加入文档预览按钮/CommonTools_mxJPO.java b/CA和CR的Tab上加入文档预览按钮/CommonTools_mxJPO.java
new file mode 100644
index 0000000..ff44f62
--- /dev/null
+++ b/CA和CR的Tab上加入文档预览按钮/CommonTools_mxJPO.java
@@ -0,0 +1,272 @@
+
+import com.dassault_systemes.enovia.changeorder.factory.ChangeOrderFactory;
+import com.dassault_systemes.enovia.changeorder.interfaces.IChangeOrderServices;
+import com.dassault_systemes.enovia.changerequest.factory.ChangeRequestFactory;
+import com.dassault_systemes.enovia.changerequest.interfaces.IAffectedItem;
+import com.dassault_systemes.enovia.changerequest.interfaces.IChangeRequest;
+import com.dassault_systemes.enovia.changerequest.interfaces.IChangeRequestServices;
+import com.dassault_systemes.enovia.enterprisechangemgt.common.ChangeAction;
+import com.dassault_systemes.enovia.enterprisechangemgtapp.common.ChangeRequest;
+import com.dassault_systemes.platform.ven.jackson.databind.ObjectMapper;
+import com.matrixone.apps.cpd.json.JSONObject;
+import com.matrixone.apps.domain.DomainObject;
+import com.matrixone.apps.domain.util.FrameworkException;
+import com.matrixone.apps.domain.util.MapList;
+import com.matrixone.apps.domain.util.MqlUtil;
+import matrix.db.Context;
+
+import java.util.*;
+import java.util.logging.Logger;
+
+public class CommonTools_mxJPO {
+
+ private static final Logger LOGGER = Logger.getLogger(CommonTools_mxJPO.class.getName());
+
+ public String getInfoByObjId(Context context, String[] args) {
+
+ String objId = args[0];
+ String selectVal = args[1];
+
+ StringBuilder stringBuilder = new StringBuilder();
+
+ List list = new ArrayList<>();
+
+ if(selectVal.contains("|")){
+ String[] selectValInfo = selectVal.split("\\|");
+ for (String value : selectValInfo){
+ list.add(value);
+ stringBuilder.append(value);
+ stringBuilder.append(" ");
+ }
+ } else {
+ list.add(selectVal);
+ stringBuilder.append(selectVal);
+ }
+
+ String queryInfo = "print bus " + objId + " select " + stringBuilder + " dump |";
+ JSONObject jsonObject = new JSONObject();
+
+ try {
+ String selInfo = MqlUtil.mqlCommand(context, queryInfo);
+
+ if(selInfo.isEmpty()){
+ return "fail";
+ }
+
+ if(selInfo.contains("|")){
+ String[] queryInfoSplit = selInfo.split("\\|");
+ for (int i = 0; i < queryInfoSplit.length; i++) {
+ jsonObject.put(list.get(i),queryInfoSplit[i]);
+ }
+ } else{
+ jsonObject.put(list.get(0),selInfo);
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ return jsonObject.toString();
+ }
+
+ public String getInfoByPhyId(Context context, String[] args){
+
+ String physicalId = args[0];
+ String selectVal = args[1];
+
+ StringBuilder stringBuilder = new StringBuilder();
+ List list = new ArrayList<>();
+
+ if(selectVal.contains("|")){
+ String[] selectValInfo = selectVal.split("\\|");
+ for (String value : selectValInfo){
+ list.add(value);
+ stringBuilder.append(value);
+ stringBuilder.append(" ");
+ }
+ } else {
+ list.add(selectVal);
+ stringBuilder.append(selectVal);
+ }
+
+ String queryInfo = "temp query bus * * * where 'physicalid==" + physicalId + "' select " + stringBuilder + " dump |";
+ JSONObject jsonObject = new JSONObject();
+
+ try {
+ String selInfo = MqlUtil.mqlCommand(context, queryInfo);
+
+ if(selInfo.isEmpty()){
+ return "fail";
+ }
+
+ if(selInfo.contains("|")){
+ String[] queryInfoSplit = selInfo.split("\\|");
+ for (int i = 3; i < queryInfoSplit.length; i++) {
+ jsonObject.put(list.get(i-3),queryInfoSplit[i]);
+ }
+ } else{
+ jsonObject.put(list.get(0),selInfo);
+ }
+
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ return jsonObject.toString();
+ }
+
+ public String getInfoByObjIdAndVersion(Context context, String[] args){
+ String name = args[0];
+ String version = args[1];
+ String selectList = args[2];
+
+ StringBuilder stringBuilder = new StringBuilder();
+ List list = new ArrayList<>();
+
+ if(selectList.contains("|")){
+ String[] selectValInfo = selectList.split("\\|");
+ for (String value : selectValInfo){
+ list.add(value);
+ stringBuilder.append(value);
+ stringBuilder.append(" ");
+ }
+ } else {
+ list.add(selectList);
+ stringBuilder.append(selectList);
+ }
+
+ String queryInfo = "temp query bus * " + name + " " + version + " select " + stringBuilder + " dump |";
+ JSONObject jsonObject = new JSONObject();
+
+ try {
+ String selInfo = MqlUtil.mqlCommand(context, queryInfo);
+
+ if(selInfo.isEmpty()){
+ return "fail";
+ }
+
+ if(selInfo.contains("|")){
+ String[] queryInfoSplit = selInfo.split("\\|");
+ for (int i = 3; i < queryInfoSplit.length; i++) {
+ jsonObject.put(list.get(i-3),queryInfoSplit[i]);
+ }
+ } else{
+ jsonObject.put(list.get(0),selInfo);
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ return jsonObject.toString();
+ }
+
+ public String getProposedChangeInfoByName(Context context, String[] args) throws Exception {
+ String Name = args[0];
+ LOGGER.info("Name ==> " + Name);
+
+ String getObjId = "temp query bus * " + Name + " * select id dump |";
+ LOGGER.info("getObjId ==> " + getObjId);
+ String objId = MqlUtil.mqlCommand(context, getObjId);
+ System.out.println(objId);
+
+ if(!objId.isEmpty()){
+ ChangeAction changeAction = new ChangeAction(objId.split("\\|")[3]);
+ MapList mapList = changeAction.getAffectedItems(context);
+ MapList realizedChangesList = changeAction.getRealizedChanges(context);
+
+ Map response = new HashMap<>();
+
+ response.put("proposedChanges", processItems(context, mapList));
+ response.put("realizedChanges", processItems(context, realizedChangesList));
+ ObjectMapper mapper = new ObjectMapper();
+ return mapper.writeValueAsString(response);
+ }
+ return "";
+ }
+
+ public List
'),
+ n.dialog({
+ body: i,
+ title: t.ECM_CA_Action_EBOMSync_CollabStatus,
+ buttons: [
+ {
+ className: 'primary',
+ value: t.ECM_CA_Collab_Dialog_Done,
+ action: function (e) {
+ e.hide();
+ },
+ },
+ ],
+ });
+ });
+ break;
+ default:
+ console.log('Match not found');
+ }
+ 'chgBOMSync' != o && e.closeDialog();
+ }
+ }),
+ (CancelCallback = function (t) {
+ e.closeDialog(t);
+ });
+ },
+ };
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeAction/facets/proposedChanges/ChgCAProposedChangesView',
+ [
+ 'DS/ENOChangeActionUX/scripts/Views/CANewProposedView',
+ 'DS/ENOChgServices/scripts/services/ChgDataProcess',
+ 'DS/ENOChgServices/scripts/services/ChgDataService',
+ 'DS/PlatformAPI/PlatformAPI',
+ ],
+ function (e, t, i, n) {
+ 'use strict';
+ return {
+ createProposedChangesView: function (o) {
+ var a = {};
+ (a = UWA.merge(a, o)),
+ (this._modelEvents = a.contextDetails._modelEvents),
+ (this.id = a.id);
+ let r = a.contextDetails.title;
+ var s = 'pid:' + a.id,
+ l = '';
+ a.targetclassName = a.target.className;
+ let c = {
+ id: s,
+ name: a.contextDetails.name,
+ title: r,
+ description: a.contextDetails.description,
+ severity: a.contextDetails.severity,
+ maturity: a.contextDetails.maturity,
+ invokedFrom: 'gov',
+ isSelected: a.isSelected,
+ init_options: a,
+ },
+ d = a.target,
+ u = new new e._createView_TestProposed(
+ 'div',
+ 'test-proposed-facet',
+ !0,
+ c,
+ )();
+ (u.container = d),
+ i.getChangeActionUserAccess(a.id).then(function (e) {
+ (l = e.data[0]),
+ (l = t.processAccessBitCA(l)),
+ (u.model = {
+ id: s,
+ name: a.contextDetails.name,
+ title: r,
+ description: a.contextDetails.description,
+ severity: a.contextDetails.severity,
+ maturity: a.contextDetails.maturity,
+ invokedFrom: 'gov',
+ isSelected: a.isSelected,
+ get: function (e) {
+ return 'userAccess' == e
+ ? l
+ : 'id' == e
+ ? s
+ : 'synopsis' === e
+ ? r
+ : void 0;
+ },
+ fetch: function (e) {
+ console.log('dummy fetch called...!'),
+ n.publish('load-dependency' + widget.id, s),
+ e.onComplete();
+ },
+ }),
+ d.addContent(u.render());
+ });
+ },
+ };
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/decision/ChgCRDecisionfacet',
+ [
+ 'UWA/Core',
+ 'DS/EditPropWidget/facets/Common/FacetsBase',
+ 'DS/EditPropWidget/constants/EditPropConstants',
+ 'UWA/Class/Model',
+ 'DS/UIKIT/Mask',
+ 'css!DS/ENOChgGovernanceUX/ENOChgGovernanceUX',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ ],
+ function (e, t, i, n, o, a, r) {
+ 'use strict';
+ return t.extend({
+ init: function () {
+ this._parent.apply(this, arguments),
+ this.elements.container ||
+ (this.elements.container = e.createElement('div', {
+ id: 'decision-CR-container',
+ }));
+ },
+ updateFacet: function () {
+ var e = UWA.createElement('div', {
+ html: r.CHG_GOV_Empty_DataGrid_PlaceHolder,
+ });
+ document.getElementById('decision-CR-container').setContent(''),
+ e.inject(this.elements.container);
+ },
+ destroyComponent: function () {
+ e.is(this.destroy, 'function') && this.destroy();
+ },
+ });
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/ChgCODataGridViewToolbar',
+ ['i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS'],
+ function (e) {
+ var t = Object.create(null);
+ return (
+ (t.toolbar = null),
+ (t.sortingData = {
+ menu: [
+ {
+ type: 'PushItem',
+ title: e.CHG_GOV_DataGrid_Column_Severity,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-alpha-sorting-a-z',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/ChgCODataGridLayout',
+ func: 'sortBySeverity',
+ },
+ },
+ {
+ type: 'PushItem',
+ title: e.CHG_GOV_DataGrid_Column_Maturity,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-alpha-sorting-a-z',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/ChgCODataGridLayout',
+ func: 'sortByMaturity',
+ },
+ },
+ ],
+ }),
+ (t.viewData = {
+ menu: [
+ {
+ type: 'CheckItem',
+ title: e.CHG_TOOLTIP_GRID_VIEW,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-view-list',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/ChgCODataGridLayout',
+ func: 'changeView',
+ },
+ tooltip: e.CHG_TOOLTIP_GRID_VIEW,
+ },
+ {
+ type: 'CheckItem',
+ title: e.CHG_TOOLTIP_TILE_VIEW,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-view-small-tile',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/ChgCOTileViewLayout',
+ func: 'changeView',
+ },
+ tooltip: e.CHG_TOOLTIP_TILE_VIEW,
+ },
+ ],
+ }),
+ (t.filterData = {
+ menu: [
+ {
+ type: 'CheckItem',
+ title: e.CHG_Filter_ActiveCO,
+ state: 'selected',
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/ChgCODataGridLayout',
+ func: 'filterView',
+ argument: {
+ filter: 'activeCO',
+ },
+ },
+ tooltip: e.CHG_Filter_ActiveCO_Def,
+ },
+ {
+ type: 'CheckItem',
+ title: e.CHG_Filter_InactiveCO,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/ChgCODataGridLayout',
+ func: 'filterView',
+ argument: {
+ filter: 'inactiveCO',
+ },
+ },
+ tooltip: e.CHG_Filter_InactiveCO_Def,
+ },
+ ],
+ }),
+ (t.writetoolbarDefination = function () {
+ return {
+ entries: [
+ {
+ id: 'filter',
+ className: 'menuCA',
+ dataElements: {
+ typeRepresentation: 'sortingdropdown',
+ icon: {
+ iconName: 'list-filter',
+ fontIconFamily: 1,
+ },
+ value: this.filterData,
+ },
+ position: 'far',
+ tooltip: e.CHG_Toolbar_FilterBy,
+ category: 'View',
+ },
+ {
+ id: 'view',
+ className: 'menuCA',
+ dataElements: {
+ typeRepresentation: 'sortingdropdown',
+ icon: {
+ iconName: 'view-legacy-thb',
+ fontIconFamily: 1,
+ },
+ value: this.viewData,
+ },
+ position: 'far',
+ category: 'View',
+ },
+ {
+ id: 'sorting',
+ className: 'menuCA',
+ dataElements: {
+ typeRepresentation: 'sortingdropdown',
+ icon: {
+ iconName: 'sorting',
+ fontIconFamily: 1,
+ },
+ value: this.sortingData,
+ },
+ position: 'far',
+ tooltip: e.CHG_TOOLTIP_SORT,
+ category: 'View',
+ },
+ ],
+ };
+ }),
+ t
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeAction/facets/realizedChanges/ChgCARealiedChangesToolbarMenu',
+ ['UWA/Core', 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS'],
+ function (e, t) {
+ let i = Object.create(null);
+ return (
+ (i.filterMenu = {
+ menu: [
+ {
+ type: 'CheckItem',
+ title: t.CHG_GOV_Realized_Tracked_SF,
+ state: 'selected',
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-change-action-realized',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeAction/facets/realizedChanges/ChgCARealiedChangesToolbarHandler',
+ func: 'filterViewHandler',
+ argument: {
+ filter: 'TRACKED',
+ },
+ },
+ tooltip: t.CHG_GOV_Realized_Tracked,
+ },
+ {
+ type: 'CheckItem',
+ title: t.CHG_GOV_Realized_Moved_SF,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-move-to',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeAction/facets/realizedChanges/ChgCARealiedChangesToolbarHandler',
+ func: 'filterViewHandler',
+ argument: {
+ filter: 'MOVED',
+ },
+ },
+ tooltip: t.CHG_GOV_Realized_Moved,
+ },
+ {
+ type: 'CheckItem',
+ title: t.CHG_GOV_Realized_Ignored_SF,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-ignore',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeAction/facets/realizedChanges/ChgCARealiedChangesToolbarHandler',
+ func: 'filterViewHandler',
+ argument: {
+ filter: 'IGNORED',
+ },
+ },
+ tooltip: t.CHG_GOV_Realized_Ignored,
+ },
+ ],
+ }),
+ (i.expandCollapseMenu = {
+ menu: [
+ {
+ type: 'CheckItem',
+ title: t.CHG_GOV_Expand_All,
+ state: 'selected',
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-flow-tree-expand-down',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeAction/facets/realizedChanges/ChgCARealiedChangesToolbarHandler',
+ func: 'expandCollapseHandler',
+ argument: {
+ action: 'EXPAND',
+ },
+ },
+ tooltip: t.CHG_GOV_Expand_All,
+ },
+ {
+ type: 'CheckItem',
+ title: t.CHG_GOV_Collapse_All,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-flow-tree-expand-up',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeAction/facets/realizedChanges/ChgCARealiedChangesToolbarHandler',
+ func: 'expandCollapseHandler',
+ argument: {
+ action: 'COLLAPSE',
+ },
+ },
+ tooltip: t.CHG_GOV_Collapse_All,
+ },
+ ],
+ }),
+ (i.switchViewMenu = {
+ menu: [
+ {
+ type: 'CheckItem',
+ title: t.CHG_TOOLTIP_GRID_VIEW,
+ state: 'selected',
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-view-list',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeAction/facets/realizedChanges/ChgCARealiedChangesToolbarHandler',
+ func: 'switchViewHandler',
+ argument: {
+ type: 'DGV',
+ },
+ },
+ tooltip: t.CHG_TOOLTIP_GRID_VIEW,
+ },
+ {
+ type: 'CheckItem',
+ title: t.CHG_TOOLTIP_LARGE_TILE_VIEW,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-view-big-tile',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeAction/facets/realizedChanges/ChgCARealiedChangesToolbarHandler',
+ func: 'switchViewHandler',
+ argument: {
+ type: 'LTLV',
+ },
+ },
+ tooltip: t.CHG_TOOLTIP_LARGE_TILE_VIEW,
+ },
+ ],
+ }),
+ (i.getFilterMenu = function (n) {
+ return (
+ n &&
+ (e.is(n.trackedObjects) &&
+ (i.filterMenu.menu[0].title =
+ t.CHG_GOV_Realized_Tracked + ' (' + n.trackedObjects + ')'),
+ e.is(n.movedObjects) &&
+ (i.filterMenu.menu[1].title =
+ t.CHG_GOV_Realized_Moved + ' (' + n.movedObjects + ')'),
+ e.is(n.ignoredObjects) &&
+ (i.filterMenu.menu[2].title =
+ t.CHG_GOV_Realized_Ignored + ' (' + n.ignoredObjects + ')')),
+ i.filterMenu
+ );
+ }),
+ i
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/model/changeRequest/facets/impactAnalysis/ChgCRImpactAnalysisDataGridModel',
+ [
+ 'UWA/Class/Model',
+ 'DS/TreeModel/TreeDocument',
+ 'DS/TreeModel/TreeNodeModel',
+ 'DS/TreeModel/DataModelSet',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgServices/scripts/services/ChgMembersServices',
+ 'DS/ENOChgServices/scripts/services/ChgDataService',
+ 'DS/ENOChgServices/scripts/services/ChgDataProcess',
+ 'DS/TreeModel/BaseFilter',
+ 'DS/ENOChgServices/scripts/services/ChgErrors',
+ 'require',
+ ],
+ function (e, t, i, n, o, a, r, s, l, c, d, u) {
+ 'use strict';
+ var g = c.inherit({
+ publishedProperties: {},
+ isDataFiltered: function (e) {
+ var t = e.getAttributeValue('id');
+ return (
+ !(!this.filterModel || !this.filterModel.allowedIDs) &&
+ -1 === this.filterModel.allowedIDs.indexOf(t)
+ );
+ },
+ isEmpty: function () {
+ return void 0 === this.filterModel.allowedIDs;
+ },
+ }),
+ p = e.extend({
+ init: function (e, t) {
+ (this.contextID = e), (this.contextDetails = t);
+ },
+ setTreeDocument: function (e) {
+ this.treeDocument = e;
+ },
+ getTreeDocument: function () {
+ return this.treeDocument;
+ },
+ createTreeDocument: function () {
+ var e = new t({
+ id: 'crImpactAnalysis',
+ useAsyncPreExpand: !0,
+ });
+ return (
+ (e.isChildOf = function (e) {
+ for (var t = e.getChildren(), i = 0; i < t.length; i++)
+ if (this.options.grid.id == t[i].options.grid.id) return !0;
+ return !1;
+ }),
+ this.setTreeDocument(e),
+ e
+ );
+ },
+ registerCustomFilter: function () {
+ this.treeDocument
+ .getFilterManager()
+ .registerFilter('stringRole', g);
+ },
+ loadImpactAnalysisData: function (e, t) {
+ e.prepareUpdate();
+ var n = this.createTreeDocumentNodeModel(t);
+ e.addRoot(n),
+ n.length > 1 &&
+ 'true' == o.getGlobalVariable().CHG_IA_COLUMN_ASSESSMENT &&
+ 'Cancelled' != n[0].options.grid.maturity &&
+ e.addRoot(
+ new i({
+ label: a.CHG_GOV_IA_LastColumn_label,
+ grid: {
+ isLastNode: !0,
+ id: 'ia_Total',
+ title: a.CHG_GOV_IA_LastColumn_label,
+ },
+ }),
+ ),
+ e.pushUpdate();
+ },
+ createTreeDocumentNodeModel: function (e) {
+ for (var t = [], i = 0; i < e.length; i++) {
+ var n = this.createTreeNode(e[i]);
+ t.push(n);
+ }
+ return t;
+ },
+ createTreeNode: function (e) {
+ let t = this.createCustomOwnerField(e);
+ e.chgObjOwner = t;
+ var n = this.createCustomNameField(e);
+ e.ia_name = n;
+ var a,
+ r = e.name + ' | ' + e.ownerFullName,
+ s = e.maturityNLS,
+ l = this.getStatusBarIcons(e),
+ c = this.statusbarIconsTooltips(e);
+ (a = o.getGlobalVariable().is3DSpace
+ ? UWA.String.escapeHTML(e.title)
+ : e.title),
+ (e.refinement = this.createCustomRefinementField(e.refinement));
+ var d = this.getCustomTooltip(e);
+ return new i({
+ label: a,
+ subLabel: r,
+ description: s,
+ grid: e,
+ icons: [e.icon],
+ thumbnail: e.thumbnail,
+ contextualMenu: ['dummy placeholder'],
+ customTooltip: d,
+ statusbarIcons: l,
+ statusbarIconsTooltips: c,
+ useAsyncPreExpand: !0,
+ });
+ },
+ getStatusBarIcons: function (e) {
+ var t = [];
+ return 'Cancelled' == e.maturity && t.push('block'), t;
+ },
+ statusbarIconsTooltips: function (e) {
+ var t = [];
+ return 'Cancelled' == e.maturity && t.push(e.cancelComment), t;
+ },
+ createCustomNameField: function (e) {
+ var t = new UWA.Element('div', {});
+ UWA.createElement('span', {
+ html: e.name,
+ }).inject(t);
+ var i = new UWA.Element('div', {
+ class: 'iconsDiv',
+ });
+ if ('Cancelled' == e.maturity) {
+ var n = new UWA.Element('div', {
+ class: 'gridIconContainer',
+ title: e.cancelComment,
+ });
+ UWA.createElement('div', {
+ class: 'fonticon fonticon-block',
+ }).inject(n),
+ n.inject(i);
+ }
+ if (
+ e.Dispatch_From_ParentCR &&
+ e.Dispatch_From_ParentCR.length > 0 &&
+ e.Dispatch_To &&
+ e.Dispatch_To.length > 0
+ ) {
+ var o = UWA.createElement('div', {
+ class: 'fonticon fonticon-graph-egraph',
+ styles: {
+ color: 'grey',
+ },
+ }),
+ a = UWA.createElement('div', {
+ class: 'fonticon fonticon-up',
+ styles: {
+ color: 'grey',
+ },
+ }),
+ r = UWA.createElement('div', {
+ class: 'fonticon fonticon-down',
+ styles: {
+ color: 'grey',
+ marginLeft: '-5px',
+ },
+ });
+ o.inject(i), a.inject(i), r.inject(i);
+ } else if (
+ e.Dispatch_From_ParentCR &&
+ e.Dispatch_From_ParentCR.length > 0
+ ) {
+ (o = UWA.createElement('div', {
+ class: 'fonticon fonticon-graph-egraph',
+ styles: {
+ color: 'grey',
+ },
+ })),
+ (a = UWA.createElement('div', {
+ class: 'fonticon fonticon-up',
+ styles: {
+ color: 'grey',
+ },
+ }));
+ o.inject(i), a.inject(i);
+ } else if (e.Dispatch_To && e.Dispatch_To.length > 0) {
+ (o = UWA.createElement('div', {
+ class: 'fonticon fonticon-graph-egraph',
+ styles: {
+ color: 'grey',
+ },
+ })),
+ (r = UWA.createElement('div', {
+ class: 'fonticon fonticon-down',
+ styles: {
+ color: 'grey',
+ },
+ }));
+ o.inject(i), r.inject(i);
+ }
+ return i.inject(t), t.outerHTML;
+ },
+ createCustomRefinementField: function (e) {
+ var t = new UWA.Element('div', {
+ class: 'cr-ia-refinement-val',
+ });
+ return (
+ (e = UWA.createElement('a', {
+ html: e,
+ })).inject(t),
+ t.outerHTML
+ );
+ },
+ createCustomOwnerField: function (e) {
+ var t = '/api/user/getpicture/login/' + e.owner + '/format/normal',
+ i = o.getGlobalVariable().computeSwymUrl(t),
+ n = new UWA.Element('div', {
+ class: 'members',
+ }),
+ a = new UWA.Element('div', {
+ class: 'assignee',
+ }),
+ s = '';
+ if (o.getGlobalVariable().isSwymInstalled)
+ s = UWA.createElement('img', {
+ class: 'userIcon',
+ src: i,
+ });
+ else {
+ var l = r.getAvatarDetails(e.ownerFullName);
+ (s = UWA.createElement('div', {
+ html: l.avatarStr,
+ class: 'avatarIcon',
+ })).style.setProperty('background', l.avatarColor);
+ }
+ s.inject(a);
+ var c = UWA.createElement('span', {
+ class: 'userName',
+ html: e.ownerFullName,
+ });
+ return a.inject(n), c.inject(n), n.outerHTML;
+ },
+ createCustomSeverity: function (e) {
+ var t = 'sevLow wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-level-low';
+ 'Medium' == e.severity
+ ? (t = 'sevMed wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-level-medium')
+ : 'High' == e.severity &&
+ (t = 'sevHigh wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-level-high');
+ var i = new UWA.Element('div', {}),
+ n = new UWA.Element('div', {
+ class: 'gridIconContainer',
+ });
+ UWA.createElement('div', {
+ class: t,
+ }).inject(n);
+ var o = UWA.createElement('span', {
+ html: e.severityNLS,
+ });
+ return n.inject(i), o.inject(i), i.outerHTML;
+ },
+ getCustomTooltip: function (e) {
+ return (
+ a.CHG_GOV_DataGrid_Column_Title +
+ ': ' +
+ e.title +
+ '\n' +
+ a.CHG_GOV_DataGrid_Column_Name +
+ ': ' +
+ e.name +
+ '\n' +
+ a.CHG_GOV_DataGrid_Column_Owner +
+ ': ' +
+ e.ownerFullName +
+ '\n' +
+ a.CHG_GOV_DataGrid_Column_Maturity +
+ ': ' +
+ e.maturityNLS
+ );
+ },
+ updateNodeIndexed: function (e, t) {
+ console.log(t);
+ },
+ removeNodeInModelFromId: function (e) {
+ this.treeDocument.prepareUpdate();
+ for (
+ var t = this.treeDocument.getAllDescendants(), i = 0;
+ i < t.length;
+ i++
+ )
+ t[i].options.grid.id === e && t[i].remove();
+ this.treeDocument.pushUpdate();
+ },
+ addNodeInModelFromId: function (e) {
+ const t = this;
+ let n = !1;
+ 0 == this.treeDocument.getChildren().length &&
+ this.treeDocument._modelEvents.publish({
+ event: 'treeNotEmpty',
+ });
+ const r = this.contextDetails.id;
+ s.getImpactAnalysisFromId(e).then((e) => {
+ let s = l.processCRImpactAnalysis(e, r);
+ var c = p.prototype.createTreeDocumentNodeModel(s);
+ if (
+ (t.treeDocument.prepareUpdate(),
+ 0 == t.treeDocument.getRoots().length)
+ )
+ t.treeDocument.addRoot(c);
+ else
+ for (var u = c.length - 1; u >= 0; u--)
+ t.treeDocument.addRoot(c[u], 0);
+ t.treeDocument.pushUpdate();
+ for (let e of t.treeDocument.getAllDescendants())
+ if ('ia_Total' === e.options.grid.id) {
+ n = !0;
+ break;
+ }
+ !1 === n &&
+ 'true' == o.getGlobalVariable().CHG_IA_COLUMN_ASSESSMENT &&
+ 'Cancelled' != c[0].options.grid.maturity &&
+ t.treeDocument.addRoot(
+ new i({
+ label: a.CHG_GOV_IA_LastColumn_label,
+ grid: {
+ isLastNode: !0,
+ id: 'ia_Total',
+ title: a.CHG_GOV_IA_LastColumn_label,
+ },
+ }),
+ ),
+ d.warn(a.CHG_CUSTOM_COLUMN_WARN_IA, !0);
+ });
+ },
+ filterView: function (e, t) {
+ let i = t,
+ n = e.matchingIDs;
+ i.setFilterModel({
+ role: {
+ filterId: 'stringRole',
+ filterModel: {
+ allowedIDs: n,
+ },
+ },
+ });
+ },
+ enableColorizeView: function (e, t) {
+ let i = t.getAllDescendants();
+ var n, o;
+ (n = e),
+ (o = function (e, t) {
+ i.map((i) => {
+ if (i.options.grid.id === t) {
+ var n = {
+ grid: {
+ biColor: e,
+ },
+ color: e,
+ };
+ i.updateOptions(n);
+ }
+ });
+ }),
+ UWA.is(n, 'array') &&
+ n.forEach(function (e) {
+ var t = e.color,
+ i = e.id;
+ o(t, i);
+ });
+ },
+ disableColorizeView: function (e, t) {
+ t.getAllDescendants().map((e) => {
+ e.updateOptions({
+ grid: {
+ biColor: 'rgba(0, 0, 0, 0)',
+ },
+ color: 'rgba(0, 0, 0, 0)',
+ });
+ });
+ },
+ });
+ return p;
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactedItem/ChgCRImpactedItemReportViewToolbar',
+ [
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ ],
+ function (e, t) {
+ let i = Object.create(null);
+ return (
+ (i.viewData = {
+ menu: [
+ {
+ type: 'CheckItem',
+ title: t.CHG_TOOLTIP_GRID_VIEW,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-view-list',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/ChgCRImpactAnalysisDataGridLayout',
+ func: 'changeImpactView',
+ argument: {
+ view: 'GridView',
+ },
+ },
+ tooltip: t.CHG_TOOLTIP_GRID_VIEW,
+ },
+ {
+ type: 'CheckItem',
+ title: t.CHG_TOOLTIP_TILE_VIEW,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-view-small-tile',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/ChgCRImpactAnalysisDataGridLayout',
+ func: 'changeImpactView',
+ argument: {
+ view: 'TileView',
+ },
+ },
+ tooltip: t.CHG_TOOLTIP_TILE_VIEW,
+ },
+ ],
+ }),
+ (i.writetoolbarDefinition = function (e) {
+ let t = {
+ entries: [
+ {
+ id: 'view',
+ dataElements: {
+ typeRepresentation: 'addDropdown',
+ icon: {
+ iconName: 'view-legacy-thb',
+ fontIconFamily: 1,
+ className: 'currentView',
+ },
+ value: this.viewData,
+ },
+ position: 'far',
+ category: 'View',
+ },
+ ],
+ };
+ return JSON.stringify(t);
+ }),
+ i
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/components/ChangeImpactsView/ChgChangeImpactsFeatureUtil',
+ [
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgServices/scripts/services/ChgCustomAttributeService',
+ ],
+ function (e, t) {
+ 'use strict';
+ return {
+ createCustomColumn: function (i) {
+ let n = this;
+ return new Promise(function (i, o) {
+ let a = e.getGlobalVariable().changeActionSubTypes;
+ t.getCombinedClassList(a).then(function (e) {
+ t.getPropertyForClassGrid(e).then(function (e) {
+ let o = t.makeCombinedColumnList(e),
+ a = n.filterColumn(o);
+ i(a);
+ });
+ });
+ });
+ },
+ filterColumn: function (e) {
+ let t = this,
+ i = [],
+ n = [
+ 'ds6w:label',
+ 'ds6w:severity',
+ 'ds6w:status',
+ 'ds6w:type',
+ 'ds6w:identifier',
+ 'ds6w:responsible',
+ 'ds6w:project',
+ ];
+ for (let t of n) for (let i of e) i.delete(t);
+ for (let n of e)
+ return (
+ n.forEach((e, n, o) => {
+ let a = t.createColumnDefination(e, n);
+ i.push(a);
+ }),
+ i
+ );
+ },
+ createColumnDefination: function (e, t) {
+ e.dataType.replace('http://www.w3.org/2001/XMLSchema#', '');
+ let i = e.dataType.replace('http://www.w3.org/2001/XMLSchema#', '');
+ return {
+ text: e.vocabColumnsNameNLS,
+ dataIndex: t,
+ editableFlag: !1,
+ allowUnsafeHTMLContent: !0,
+ visibleFlag: !1,
+ dataType: i,
+ getCellTypeRepresentation: function (e) {
+ return null != e.cellModel ? 'string' : 'functionIcon';
+ },
+ getCellSemantics: function (e) {
+ if (null != e.cellModel);
+ else if ('undefined' == e.cellModel || null == e.cellModel)
+ return {
+ icon: {
+ iconName: 'reload wux-ui-3ds-spin',
+ fontIconFamily: WUXManagedFontIcons.Font3DS,
+ },
+ };
+ },
+ getCellValue: function (e, i) {
+ return e.nodeModel.getAttributeValue(t);
+ },
+ };
+ },
+ };
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/members/util/ChgAddMemberView',
+ [
+ 'UWA/Class/View',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'UWA/Core',
+ 'DS/Handlebars/Handlebars4',
+ ],
+ function (e, t, i, n) {
+ return e.extend({
+ name: 'chg-add-member',
+ tagName: 'div',
+ className: 'chg-add-member',
+ setup: function () {
+ (this.template =
+ ' \t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t| ' +
+ t.CHG_Add_Member_Change_Coordinator +
+ ' | \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t | \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t| ' +
+ t.CHG_Add_Member_Assignee +
+ ' | \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t | \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t| ' +
+ t.CHG_Add_Member_Approver +
+ ' | \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t | \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t| ' +
+ t.CHG_Add_Member_Follower +
+ ' | \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t | \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t
'),
+ (this.renderer = this.getTemplate(this.template));
+ },
+ init: function (e) {
+ (e = i.clone(e || {}, !1)), this._parent.call(this, e);
+ },
+ render: function () {
+ this.name, this.cid;
+ this.container.empty(), (containerReference = this.container);
+ var e = UWA.createElement('div', {
+ class: 'chg-member-view',
+ styles: {
+ height: '10%',
+ },
+ }),
+ t = this.renderer();
+ return e.addContent(t), e.inject(containerReference), this;
+ },
+ injectSubView: function (e, t) {
+ var i = this.container.getElement(t);
+ e && i && i.grab(e.render().getContent());
+ },
+ getTemplate: function (e) {
+ var t = n.compile(e),
+ i = this;
+ return (
+ (i.data = {
+ placeholder: i.options.placeholder,
+ }),
+ function () {
+ return t(i.data);
+ }
+ );
+ },
+ domEvents: {
+ 'click .change-coordinator-field-search': function () {
+ this.dispatchEvent('searchChangeCoordinator', arguments);
+ },
+ 'click .assignee-field-search': function () {
+ this.dispatchEvent('searchAssignee', arguments);
+ },
+ 'click .approver-field-search': function () {
+ this.dispatchEvent('searchApprover', arguments);
+ },
+ 'click .informed-user-field-search': function () {
+ this.dispatchEvent('searchInformedUser', arguments);
+ },
+ },
+ });
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/model/facets/changeOrchestration/ChgOrchestrationDataGridModel',
+ [
+ 'UWA/Class/Model',
+ 'DS/TreeModel/TreeDocument',
+ 'DS/TreeModel/TreeNodeModel',
+ 'DS/TreeModel/DataModelSet',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgServices/scripts/services/ChgMembersServices',
+ 'DS/ENOChgServices/scripts/services/ChgDataService',
+ 'DS/ENOChgServices/scripts/services/ChgDataProcess',
+ 'DS/ENOChgServices/scripts/services/ChgIDCardCommonServices',
+ 'DS/ENOChgServices/scripts/services/ChgErrors',
+ 'DS/UIKIT/Mask',
+ 'DS/TreeModel/BaseFilter',
+ 'require',
+ ],
+ function (e, t, i, n, o, a, r, s, l, c, d, u, g, p) {
+ 'use strict';
+ var h = g.inherit({
+ publishedProperties: {},
+ isDataFiltered: function (e) {
+ var t = e.getAttributeValue('id');
+ return (
+ !(!this.filterModel || !this.filterModel.allowedIDs) &&
+ -1 === this.filterModel.allowedIDs.indexOf(t)
+ );
+ },
+ isEmpty: function () {
+ return void 0 === this.filterModel.allowedIDs;
+ },
+ }),
+ m = e.extend({
+ init: function (e, t) {
+ (this.contextID = e), (this.contextDetails = t);
+ },
+ setTreeDocument: function (e) {
+ this.treeDocument = e;
+ },
+ getTreeDocument: function () {
+ return this.treeDocument;
+ },
+ createTreeDocument: function () {
+ var e = new t({
+ id: 'coOrchestration',
+ useAsyncPreExpand: !0,
+ });
+ return (
+ e.onPreExpand(function (e) {
+ var t = e.target.options.grid.id;
+ console.log('call for children' + e.target),
+ t &&
+ s.getChangeOrchestration(t).then(
+ function (t) {
+ l.processedChangeOrchestrationSummaryList(t).then(
+ function (t) {
+ var i = m.prototype.createTreeDocumentNodeModel(t);
+ if (e.target.hasChildren())
+ for (
+ var n = !1, o = e.target.getChildren(), a = 0;
+ a < i.length;
+ a++
+ ) {
+ n = !1;
+ for (var r = 0; r < o.length; r++)
+ if (
+ o[r].options.grid.id == i[a].options.grid.id
+ ) {
+ n = !0;
+ break;
+ }
+ n || e.target.addChild(i[r]);
+ }
+ else e.target.addChild(i);
+ e.target.preExpandDone();
+ },
+ );
+ },
+ function (e) {
+ return Promise.reject(e);
+ },
+ );
+ }),
+ (e.isChildOf = function (e) {
+ for (var t = e.getChildren(), i = 0; i < t.length; i++)
+ if (this.options.grid.id == t[i].options.grid.id) return !0;
+ return !1;
+ }),
+ this.setTreeDocument(e),
+ e
+ );
+ },
+ registerCustomFilter: function () {
+ this.treeDocument
+ .getFilterManager()
+ .registerFilter('stringRole', h);
+ },
+ loadChangeOrchestrationData: function (e, t) {
+ e.prepareUpdate();
+ var i = this.createTreeDocumentNodeModel(t);
+ if (
+ (e.addRoot(i), e.pushUpdate(), o.getGlobalVariable().is3DSpace)
+ ) {
+ console.log('unmasking orchestration item 3dspace');
+ let e = document.getElementById(
+ 'coOrchestrationFullViewContainer',
+ );
+ e && u.isMasked(e) && u.unmask(e);
+ } else {
+ let e = document.getElementById('coOrchestration');
+ e && u.isMasked(e) && u.unmask(e);
+ }
+ },
+ createTreeDocumentNodeModel: function (e) {
+ for (var t = [], i = 0; i < e.length; i++) {
+ var n = this.createTreeNode(e[i]);
+ t.push(n);
+ }
+ return t;
+ },
+ createTreeNode: function (e) {
+ var t = this.createCustomNameField(e);
+ e.chgObjName = t;
+ var n = this.createCustomSeverity(e);
+ e.sev = n;
+ var a = this.createCustomChangeCoordinatorField(e);
+ e.chgObjCoordinator = a;
+ var r = this.createCustomOwnerField(e);
+ e.chgObjOwner = r;
+ var s,
+ l = e.name + ' | ' + e.ownerFullName,
+ c = e.maturityNLS,
+ d = this.getStatusBarIcons(e),
+ u = this.statusbarIconsTooltips(e),
+ g = this.getCustomTooltip(e);
+ return (
+ (s = o.getGlobalVariable().is3DSpace
+ ? '' +
+ UWA.String.escapeHTML(e.title) +
+ ''
+ : e.title),
+ new i({
+ label: s,
+ subLabel: l,
+ description: c,
+ children: e.isKindOfChangeAction ? null : [],
+ grid: e,
+ icons: [e.iconURL],
+ thumbnail: e.thumbnail,
+ contextualMenu: ['Copy1', 'Move1'],
+ statusbarIcons: d,
+ statusbarIconsTooltips: u,
+ customTooltip: g,
+ useAsyncPreExpand: !0,
+ })
+ );
+ },
+ createCustomNameField: function (e) {
+ var t = new UWA.Element('div', {
+ class:
+ 'wux-tweakers wux-tweakers-string wux-tweakers-string-label wux-tweakers-labelonly',
+ }),
+ i = UWA.createElement('span', {
+ html: e.name,
+ });
+ i.style.setProperty('text-overflow', 'ellipsis'), i.inject(t);
+ var n = new UWA.Element('div', {
+ class: 'iconsDiv',
+ });
+ if ('TRUE' == e.ecm_change_on_hold) {
+ var o = new UWA.Element('div', {
+ class: 'gridIconContainer',
+ title: a.CHG_GOV_TOOLTIP_HOLD,
+ });
+ UWA.createElement('div', {
+ class: 'fonticon fonticon-pause',
+ }).inject(o),
+ o.inject(n);
+ }
+ return n.inject(t), t.outerHTML;
+ },
+ createCustomSeverity: function (e) {
+ var t = 'sevLow wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-level-low';
+ 'Medium' == e.severity
+ ? (t = 'sevMed wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-level-medium')
+ : 'High' == e.severity &&
+ (t = 'sevHigh wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-level-high');
+ var i = new UWA.Element('div', {}),
+ n = new UWA.Element('div', {
+ class: 'gridIconContainer',
+ });
+ UWA.createElement('div', {
+ class: t,
+ }).inject(n);
+ var o = UWA.createElement('span', {
+ html: e.severityNLS,
+ });
+ return n.inject(i), o.inject(i), i.outerHTML;
+ },
+ createCustomChangeCoordinatorField: function (e) {
+ var t = new UWA.Element('div', {
+ class: 'members',
+ });
+ if ('' != e.changeCoordinatorFullName) {
+ var i = new UWA.Element('div', {
+ class: 'assignee',
+ }),
+ n =
+ '/api/user/getpicture/login/' +
+ e.changeCoordinator +
+ '/format/normal',
+ a = o.getGlobalVariable().computeSwymUrl(n),
+ s = '';
+ if (o.getGlobalVariable().isSwymInstalled)
+ s = UWA.createElement('img', {
+ class: 'userIcon',
+ src: a,
+ });
+ else {
+ var l = r.getAvatarDetails(e.changeCoordinatorFullName);
+ (s = UWA.createElement('div', {
+ html: l.avatarStr,
+ class: 'avatarIcon',
+ })).style.setProperty('background', l.avatarColor);
+ }
+ s.inject(i);
+ var c = UWA.createElement('span', {
+ class: 'userName',
+ html: e.changeCoordinatorFullName,
+ });
+ i.inject(t), c.inject(t);
+ }
+ return t.outerHTML;
+ },
+ createCustomOwnerField: function (e) {
+ var t = '/api/user/getpicture/login/' + e.owner + '/format/normal',
+ i = o.getGlobalVariable().computeSwymUrl(t),
+ n = new UWA.Element('div', {
+ class: 'members',
+ }),
+ a = new UWA.Element('div', {
+ class: 'assignee',
+ }),
+ s = '';
+ if (o.getGlobalVariable().isSwymInstalled)
+ s = UWA.createElement('img', {
+ class: 'userIcon',
+ src: i,
+ });
+ else {
+ var l = r.getAvatarDetails(e.ownerFullName);
+ (s = UWA.createElement('div', {
+ html: l.avatarStr,
+ class: 'avatarIcon',
+ })).style.setProperty('background', l.avatarColor);
+ }
+ s.inject(a);
+ var c = UWA.createElement('span', {
+ class: 'userName',
+ html: e.ownerFullName,
+ });
+ return a.inject(n), c.inject(n), n.outerHTML;
+ },
+ getStatusBarIcons: function (e) {
+ var t = [];
+ return (
+ 'Low' == e.severity
+ ? t.push('level-low')
+ : 'Medium' == e.severity
+ ? t.push('level-medium')
+ : 'High' == e.severity && t.push('level-high'),
+ 'TRUE' == e.ecm_change_on_hold && t.push('pause'),
+ t
+ );
+ },
+ statusbarIconsTooltips: function (e) {
+ var t = [];
+ return (
+ t.push(e.severityNLS),
+ 'TRUE' == e.ecm_change_on_hold && t.push(a.CHG_GOV_TOOLTIP_HOLD),
+ t
+ );
+ },
+ getCustomTooltip: function (e) {
+ return (
+ a.CHG_GOV_DataGrid_Column_Title +
+ ': ' +
+ e.title +
+ '\n' +
+ a.CHG_GOV_DataGrid_Column_Name +
+ ': ' +
+ e.name +
+ '\n' +
+ a.CHG_GOV_DataGrid_Column_Severity +
+ ': ' +
+ e.severityNLS +
+ '\n' +
+ a.CHG_GOV_DataGrid_Column_Owner +
+ ': ' +
+ e.ownerFullName +
+ '\n' +
+ a.CHG_GOV_DataGrid_Column_Maturity +
+ ': ' +
+ e.maturityNLS
+ );
+ },
+ updateNodeIndexed: function (e, t) {
+ console.log(t);
+ },
+ addNewChildren: function (e) {
+ var t = this;
+ if (this.treeDocument.getSelectedNodes().length > 1)
+ d.error(
+ a.CHG_GOV_ChangeOrchestration_AddExisting_Single_Selection,
+ );
+ else {
+ this.treeDocument.getSelectedNodes().length
+ ? this.treeDocument.getSelectedNodes()[0].options.grid.id
+ : this.contextID;
+ var i = document.getElementById('outer-orchestration-grid-div');
+ 'undefined' != i && null != i && u.mask(i),
+ 'Change Order' == e.type
+ ? s.getChangeOrderInfo(e.objectID).then(
+ function (e) {
+ l.processedChangeOrchestrationSummaryList(e).then(
+ function (e) {
+ m.prototype.addNodesInLayoutModel(
+ t.treeDocument,
+ e,
+ !0,
+ ),
+ u.unmask(i);
+ },
+ );
+ },
+ function (e) {
+ u.unmask(i);
+ },
+ )
+ : 'Change Action' == e.type &&
+ s.getNewCADetails(e.objectID).then(
+ function (e) {
+ var t = l.processChangeActionInContext(e).processData;
+ console.log(t),
+ require([
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/changeOrchestration/ChgOrchestrationDataGridLayout',
+ ], function (e) {
+ e.addNodesInLayout(t), u.unmask(i);
+ });
+ },
+ function (e) {
+ u.unmask(i);
+ },
+ );
+ }
+ },
+ addExistingChildren: function (e) {
+ var t,
+ i = this;
+ if (this.treeDocument.getSelectedNodes().length > 1)
+ d.error(
+ a.CHG_GOV_ChangeOrchestration_AddExisting_Single_Selection,
+ );
+ else {
+ t = this.treeDocument.getSelectedNodes().length
+ ? this.treeDocument.getSelectedNodes()[0].options.grid.id
+ : this.contextID;
+ var n = document.getElementById('outer-orchestration-grid-div');
+ 'undefined' != n && null != n && u.mask(n),
+ s.addExistingChangeOrchestration(t, e).then(
+ function (e) {
+ l.processedChangeOrchestrationSummaryList(e).then(function (
+ e,
+ ) {
+ m.prototype.addNodesInLayoutModel(i.treeDocument, e),
+ u.unmask(n);
+ });
+ },
+ function (e) {
+ u.unmask(n);
+ },
+ );
+ }
+ },
+ addNodesInLayoutModel: function (e, t, i = !1) {
+ 0 == e.getChildren().length &&
+ e._modelEvents.publish({
+ event: 'treeNotEmpty',
+ });
+ var n,
+ o,
+ a = m.prototype.createTreeDocumentNodeModel(t);
+ if (
+ (e.getSelectedNodes().length
+ ? ((n = !1), (o = e.getSelectedNodes()[0]))
+ : (n = !0),
+ n)
+ ) {
+ if ((e.prepareUpdate(), 0 == e.getRoots().length)) e.addRoot(a);
+ else for (var r = a.length - 1; r >= 0; r--) e.addRoot(a[r], 0);
+ if ((e.pushUpdate(), i))
+ try {
+ let e = p('DS/ENOChgProbes/scripts/ChgCloudProbeUtils');
+ var s = t[0];
+ e.cloudProbeUtils.sendChgObjectCreateTrackerEvent({
+ createData: s,
+ View: 'Change Orchestration',
+ });
+ } catch (e) {
+ console.log(e);
+ }
+ } else if (null == o.getChildren()) e.addRoot(a, 0);
+ else {
+ if ((o.prepareUpdate(), 0 == o.getChildren().length))
+ o.addChild(a);
+ else for (r = a.length - 1; r >= 0; r--) o.addChild(a[r], 0);
+ o.pushUpdate(), o.isExpanded() || o.expand();
+ }
+ },
+ removeChildren: function () {
+ var e = this,
+ t = e.treeDocument.getSelectedNodes();
+ if (t.length) {
+ var i,
+ n,
+ r = t[0].getParent().options.grid.id;
+ void 0 === r
+ ? ((i = e.contextID), (n = !0))
+ : ((i = r), (n = !1));
+ var l = [];
+ l.push({
+ id: t[0].options.grid.id,
+ type: t[0].options.grid.type,
+ });
+ for (var c = 1; c < t.length; c++) {
+ if (r !== t[c].getParent().options.grid.id) {
+ if (
+ (d.error(
+ a.CHG_GOV_ChangeOrchestration_Toolbar_Invalid_Selection,
+ ),
+ o.getGlobalVariable().is3DSpace)
+ ) {
+ console.log('unmasking orchestration item 3dspace');
+ let e = document.getElementById(
+ 'coOrchestrationFullViewContainer',
+ );
+ e && u.isMasked(e) && u.unmask(e);
+ } else {
+ let e = document.getElementById('coOrchestration');
+ e && u.isMasked(e) && u.unmask(e);
+ }
+ return;
+ }
+ l.push({
+ id: t[c].options.grid.id,
+ type: t[c].options.grid.type,
+ });
+ }
+ s.removeChangeOrchestration(i, l).then(
+ function (i) {
+ if (n) {
+ for (var r = 0; r < t.length; r++)
+ e.treeDocument.removeRoot(t[r]);
+ 0 == e.treeDocument.getChildren().length &&
+ e.treeDocument._modelEvents.publish({
+ event: 'treeEmpty',
+ });
+ } else {
+ var s = t[0].getParent();
+ s.prepareUpdate();
+ for (r = 0; r < t.length; r++) s.removeChild(t[r]);
+ s.pushUpdate();
+ }
+ if (o.getGlobalVariable().is3DSpace) {
+ console.log('unmasking orchestration item 3dspace');
+ let e = document.getElementById(
+ 'coOrchestrationFullViewContainer',
+ );
+ e && u.isMasked(e) && u.unmask(e);
+ } else {
+ let e = document.getElementById('coOrchestration');
+ e && u.isMasked(e) && u.unmask(e);
+ }
+ d.success(
+ a.CHG_GOV_ChangeOrchestration_Toolbar_Remove_Success,
+ );
+ },
+ function (e) {
+ if (o.getGlobalVariable().is3DSpace) {
+ console.log('unmasking orchestration item 3dspace');
+ let e = document.getElementById(
+ 'coOrchestrationFullViewContainer',
+ );
+ e && u.isMasked(e) && u.unmask(e);
+ } else {
+ let e = document.getElementById('coOrchestration');
+ e && u.isMasked(e) && u.unmask(e);
+ }
+ },
+ );
+ } else d.error(a.CHG_GOV_ChangeOrchestration_Remove_No_Objects);
+ },
+ filterView: function (e, t) {
+ let i = t,
+ n = e.matchingIDs;
+ i.setFilterModel({
+ role: {
+ filterId: 'stringRole',
+ filterModel: {
+ allowedIDs: n,
+ },
+ },
+ });
+ },
+ enableColorizeView: function (e, t) {
+ let i = t.getAllDescendants();
+ var n, o;
+ (n = e),
+ (o = function (e, t) {
+ i.map((i) => {
+ if (i.options.grid.id === t) {
+ var n = {
+ grid: {
+ biColor: e,
+ },
+ color: e,
+ };
+ i.updateOptions(n);
+ }
+ });
+ }),
+ UWA.is(n, 'array') &&
+ n.forEach(function (e) {
+ var t = e.color,
+ i = e.id;
+ o(t, i);
+ });
+ },
+ disableColorizeView: function (e, t) {
+ t.getAllDescendants().map((e) => {
+ e.updateOptions({
+ grid: {
+ biColor: 'rgba(0, 0, 0, 0)',
+ },
+ color: 'rgba(0, 0, 0, 0)',
+ });
+ });
+ },
+ });
+ return m;
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/model/facets/relatedScope/ChgRelatedScopeDataGridModel',
+ [
+ 'UWA/Class/Model',
+ 'DS/TreeModel/TreeDocument',
+ 'DS/TreeModel/TreeNodeModel',
+ 'DS/TreeModel/DataModelSet',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgServices/scripts/services/ChgMembersServices',
+ 'DS/ENOChgServices/scripts/services/ChgDataService',
+ 'DS/ENOChgServices/scripts/services/ChgDataProcess',
+ 'DS/ENOChgServices/scripts/services/ChgErrors',
+ 'DS/PlatformAPI/PlatformAPI',
+ 'DS/UIKIT/Mask',
+ 'DS/TreeModel/BaseFilter',
+ ],
+ function (e, t, i, n, o, a, r, s, l, c, d, u, g) {
+ 'use strict';
+ let p = g.inherit({
+ publishedProperties: {},
+ isDataFiltered: function (e) {
+ let t = e.getAttributeValue('id');
+ return (
+ !(!this.filterModel || !this.filterModel.allowedIDs) &&
+ -1 === this.filterModel.allowedIDs.indexOf(t)
+ );
+ },
+ isEmpty: function () {
+ return void 0 === this.filterModel.allowedIDs;
+ },
+ }),
+ h = e.extend({
+ init: function (e) {
+ this.parentCRId = e;
+ },
+ setTreeDocument: function (e) {
+ this.treeDocument = e;
+ },
+ getTreeDocument: function () {
+ return this.treeDocument;
+ },
+ createTreeDocument: function () {
+ let e = new t({
+ useAsyncPreExpand: !0,
+ });
+ return (
+ (e.isChildOf = function (e) {
+ let t = e.getChildren();
+ for (let e = 0; e < t.length; e++)
+ if (this.options.grid.id == t[e].options.grid.id) return !0;
+ return !1;
+ }),
+ this.setTreeDocument(e),
+ e
+ );
+ },
+ registerCustomFilter: function () {
+ this.treeDocument
+ .getFilterManager()
+ .registerFilter('stringRole', p);
+ },
+ loadRelatedScopeData: function (e, t) {
+ e.prepareUpdate();
+ let i = this.createTreeDocumentNodeModel(t);
+ e.addRoot(i), e.pushUpdate();
+ },
+ createTreeDocumentNodeModel: function (e) {
+ let t = [];
+ for (let i = 0; i < e.length; i++) {
+ let n = this.createTreeNode(e[i]);
+ t.push(n);
+ }
+ return t;
+ },
+ createTreeNode: function (e) {
+ let t = this.createCustomOwnerField(e);
+ e.chgObjOwner = t;
+ let n = e.previewicon,
+ o = e.name + ' | ' + e.ownerFullName,
+ a = e.currentNLS;
+ var r = this.getCustomTooltip(e);
+ return new i({
+ label: e.title,
+ subLabel: o,
+ description: a,
+ grid: e,
+ customTooltip: r,
+ icons: [e.icon],
+ thumbnail: n,
+ useAsyncPreExpand: !0,
+ });
+ },
+ createCustomOwnerField: function (e) {
+ let t = '/api/user/getpicture/login/' + e.owner + '/format/normal',
+ i = o.getGlobalVariable().computeSwymUrl(t),
+ n = new UWA.Element('div', {
+ class: 'members',
+ }),
+ a = new UWA.Element('div', {
+ class: 'assignee',
+ }),
+ s = '';
+ if (o.getGlobalVariable().isSwymInstalled)
+ s = UWA.createElement('img', {
+ class: 'userIcon',
+ src: i,
+ });
+ else {
+ let t = r.getAvatarDetails(e.ownerFullName);
+ (s = UWA.createElement('div', {
+ html: t.avatarStr,
+ class: 'avatarIcon',
+ })).style.setProperty('background', t.avatarColor);
+ }
+ s.inject(a);
+ let l = UWA.createElement('span', {
+ class: 'userName',
+ html: e.ownerFullName,
+ });
+ return a.inject(n), l.inject(n), n.outerHTML;
+ },
+ getCustomTooltip: function (e) {
+ return (
+ a.CHG_GOV_DataGrid_Column_Title +
+ ': ' +
+ e.title +
+ '\n' +
+ a.CHG_GOV_DataGrid_Column_Name +
+ ': ' +
+ e.name +
+ '\n' +
+ a.CHG_GOV_DataGrid_Column_Owner +
+ ': ' +
+ e.ownerFullName +
+ '\n' +
+ a.CHG_GOV_DataGrid_Column_Maturity +
+ ': ' +
+ e.currentNLS
+ );
+ },
+ addExistingChildren: function (e) {
+ let t = this;
+ return new Promise(function (i, n) {
+ let o = t.parentCRId,
+ a = document.getElementById('outer-relatedScope-grid-div');
+ 'undefined' != a && null != a && u.mask(a),
+ s.updateExistingCORelatedScope(o, e).then(
+ function (e) {
+ var n = {
+ contextid: o,
+ length: e.data.length,
+ };
+ d.publish('relatedScope:update', n);
+ let r = [];
+ e && (r = e.data),
+ h.prototype.addNodesInLayoutModel(t.treeDocument, r),
+ i(e),
+ u.unmask(a);
+ },
+ function (e) {
+ u.unmask(a), n(e);
+ },
+ );
+ });
+ },
+ removeExistingChildren: function (e) {
+ let t = this;
+ return new Promise(function (i, n) {
+ let o = t.parentCRId,
+ r = document.getElementById('outer-CO-relatedScope-grid-div');
+ 'undefined' != r && null != r && u.mask(r),
+ s.removeExistingCORelatedScope(o, e).then(
+ function (e) {
+ let n = t.treeDocument.getSelectedNodes();
+ i(n);
+ for (let e = 0; e < n.length; e++)
+ t.treeDocument.removeRoot(n[e]);
+ if (0 == t.treeDocument.getAllDescendants().length) {
+ var s = {
+ contextid: o,
+ length: t.treeDocument.getAllDescendants().length,
+ };
+ d.publish('relatedScope:update', s);
+ }
+ c.success(a.CHG_GOV_relatedScope_Remove_Success),
+ u.unmask(r);
+ },
+ function (e) {
+ u.unmask(r), n();
+ },
+ );
+ });
+ },
+ addNodesInLayoutModel: function (e, t) {
+ let i = h.prototype.createTreeDocumentNodeModel(t);
+ if ((e.prepareUpdate(), 0 == e.getRoots().length)) e.addRoot(i);
+ else for (let t = i.length - 1; t >= 0; t--) e.addRoot(i[t], 0);
+ e.pushUpdate();
+ },
+ filterView: function (e, t) {
+ let i = t,
+ n = e.matchingIDs;
+ i.setFilterModel({
+ role: {
+ filterId: 'stringRole',
+ filterModel: {
+ allowedIDs: n,
+ },
+ },
+ });
+ },
+ enableColorizeView: function (e, t) {
+ let i = t.getAllDescendants();
+ var n, o;
+ (n = e),
+ (o = function (e, t) {
+ i.map((i) => {
+ if (i.options.grid.id === t) {
+ var n = {
+ grid: {
+ biColor: e,
+ },
+ color: e,
+ };
+ i.updateOptions(n);
+ }
+ });
+ }),
+ UWA.is(n, 'array') &&
+ n.forEach(function (e) {
+ var t = e.color,
+ i = e.id;
+ o(t, i);
+ });
+ },
+ disableColorizeView: function (e, t) {
+ t.getAllDescendants().map((e) => {
+ e.updateOptions({
+ grid: {
+ biColor: 'rgba(0, 0, 0, 0)',
+ },
+ color: 'rgba(0, 0, 0, 0)',
+ });
+ });
+ },
+ });
+ return h;
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeAction/facets/flowdown/ChgCAFlowdownfacet',
+ [
+ 'UWA/Core',
+ 'DS/EditPropWidget/facets/Common/FacetsBase',
+ 'DS/ENOChgServices/scripts/services/ChgDataService',
+ 'DS/EditPropWidget/constants/EditPropConstants',
+ 'UWA/Class/Model',
+ 'DS/UIKIT/Mask',
+ 'DS/PlatformAPI/PlatformAPI',
+ 'css!DS/ENOChgGovernanceUX/ENOChgGovernanceUX',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'require',
+ ],
+ function (e, t, i, n, o, a, r, s, l, c) {
+ 'use strict';
+ return t.extend({
+ init: function () {
+ this._parent.apply(this, arguments),
+ this.elements.container ||
+ (this.elements.container = e.createElement('div', {
+ id: 'flowdwon-CA-container',
+ }));
+ },
+ updateFacet: function () {
+ var e = this;
+ a.mask(this.elements.container);
+ var t = e.getModel();
+ if (1 != t.isMergedModel()) {
+ if (!t) return !1;
+ e.elements.container.setContent('');
+ var n = {
+ id: t.get('objectId'),
+ };
+ i.getObjectTypeInformation(n.id).then(function (t) {
+ if ('Change Action' == t) {
+ let t = n.id;
+ i.getChangeActionUserAccess(t).then(function (e) {
+ e.data[0].id, e.data[0];
+ });
+ var o = e.elements.container;
+ let s = c(
+ 'DS/ENOChangeActionUX/scripts/Views/CANewProposedView',
+ );
+ s &&
+ s.addProposedWithFlowdown({
+ target: o,
+ });
+ let l = () => {
+ o.empty(),
+ s.addProposedWithFlowdown({
+ target: o,
+ });
+ };
+ r.unsubscribe(`CA_Flowdown:${widget.id}`),
+ r.subscribe(`CA_Flowdown:${widget.id}`, function (e) {
+ l();
+ }),
+ a.unmask(e.elements.container);
+ }
+ });
+ }
+ },
+ destroyComponent: function () {
+ e.is(this.destroy, 'function') && this.destroy();
+ },
+ });
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/members/util/ChgMembersFeaturesUtil',
+ [
+ 'UWA/Core',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'require',
+ ],
+ function (e, t, i) {
+ 'use strict';
+ var n = {
+ showRMBMenuOnGrid: function (e, t) {
+ return new Promise(function (o, a) {
+ var r = 'false',
+ s = {},
+ l = i(
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/members/util/ChgMembersGridUtil',
+ ),
+ c = t.cellInfos.nodeModel.getTreeDocument().getSelectedNodes(),
+ d = c[0].options.grid.roles;
+ s.currentObjType = c[0].options.grid.type;
+ var u = 0;
+ c.length > 1 && (r = 'true'),
+ d.indexOf('Approver') >= 0
+ ? ((s.Approver = 'DISCONNECT'), u++)
+ : (s.Approver = 'CONNECT'),
+ d.indexOf('Coordinator') >= 0
+ ? ((s.Coordinator = 'DISCONNECT'), u++)
+ : (s.Coordinator = 'CONNECT'),
+ d.indexOf('Follower') >= 0
+ ? ((s.Follower = 'DISCONNECT'), u++)
+ : (s.Follower = 'CONNECT'),
+ d.indexOf('Assignee') >= 0
+ ? ((s.Assignee = 'DISCONNECT'), u++)
+ : (s.Assignee = 'CONNECT');
+ var g = d.indexOf('Owner') >= 0 || d.indexOf('Originator') >= 0;
+ if ((0 == g && 1 == u && (s.showConfirmation = !0), 'false' == r))
+ var p = i(
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/members/ChgMembersDataGridLayout',
+ );
+ var h = [],
+ m = t.cellInfos.nodeModel.options.grid.id,
+ C = t.cellInfos.nodeModel.options.grid.type,
+ v = t.cellInfos.nodeModel.options.grid.name,
+ f = t.cellInfos.nodeModel.options.grid.displayType;
+ 'Group' == C &&
+ ((C = 'foaf:Group'),
+ (v = t.cellInfos.nodeModel.options.grid.fullName),
+ (f = t.cellInfos.nodeModel.options.grid.type));
+ var b = {
+ objectId: m,
+ objectType: C,
+ displayName: v,
+ displayType: f,
+ facetName: 'dependency',
+ };
+ [].push(b);
+ var w = i(
+ 'DS/ENOChgServices/scripts/services/ChgIDCardCommonServices',
+ ).openWith(b),
+ D = [];
+ D.push(w),
+ Promise.all(D).then(function (i) {
+ 'Person' == s.currentObjType &&
+ (1 == p.setCoordinatorAccessBit &&
+ (1 != l.isChangeCoordinatorConnected ||
+ (1 == l.isChangeCoordinatorConnected &&
+ 'DISCONNECT' == s.Coordinator)) &&
+ h.push(n.getChangeCoordinatorMenu(e, t, s)),
+ 1 == p.ManageFollowersAccessBit &&
+ h.push(n.getFollowerMenu(e, t, s)),
+ 1 == p.ManageAssigneesAccessBit &&
+ h.push(n.getAssigneeMenu(e, t, s))),
+ 'Group' == s.currentObjType &&
+ (1 == p.ManageFollowersAccessBit &&
+ h.push(n.getFollowerMenu(e, t, s)),
+ 1 == p.ManageAssigneesAccessBit &&
+ h.push(n.getAssigneeMenu(e, t, s))),
+ 1 == p.setCoordinatorAccessBit &&
+ 0 == g &&
+ h.push(n.getDeleteMenu(e, t, s)),
+ i[0] && h.push(i[0]),
+ o(h);
+ });
+ });
+ },
+ getChangeCoordinatorMenu: function (e, i, n) {
+ var o = {
+ type: 'CheckItem',
+ title: t.CHG_Member_Menu_Change_Coordinator,
+ action: {
+ callback: function () {
+ require([
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/members/ChgMembersDataGridLayout',
+ ], function (e) {
+ console.log('Coordinator : ' + n.Coordinator),
+ (n.role = 'Coordinator'),
+ e.updatePersonRole(i.cellInfos, n);
+ });
+ },
+ },
+ };
+ return 'DISCONNECT' == n.Coordinator && (o.state = 'selected'), o;
+ },
+ getFollowerMenu: function (e, i, n) {
+ var o = {
+ type: 'CheckItem',
+ title: t.CHG_Member_Menu_Follower,
+ action: {
+ callback: function () {
+ require([
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/members/ChgMembersDataGridLayout',
+ ], function (e) {
+ console.log('Follower : ' + n.Follower),
+ (n.role = 'Follower'),
+ e.updatePersonRole(i.cellInfos, n);
+ });
+ },
+ },
+ };
+ return 'DISCONNECT' == n.Follower && (o.state = 'selected'), o;
+ },
+ getAssigneeMenu: function (e, i, n) {
+ var o = {
+ type: 'CheckItem',
+ title: t.CHG_Member_Menu_Assignee,
+ action: {
+ callback: function () {
+ require([
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/members/ChgMembersDataGridLayout',
+ ], function (e) {
+ console.log('Assignee : ' + n.Assignee),
+ (n.role = 'Assignee'),
+ e.updatePersonRole(i.cellInfos, n);
+ });
+ },
+ },
+ };
+ return 'DISCONNECT' == n.Assignee && (o.state = 'selected'), o;
+ },
+ getDeleteMenu: function (e, i, n) {
+ return {
+ type: 'PushItem',
+ title: t.CHG_Member_Menu_Remove,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-remove',
+ },
+ action: {
+ callback: function () {
+ require([
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/members/ChgMembersDataGridLayout',
+ ], function (e) {
+ console.log('remove '),
+ (n.role = []),
+ 'DISCONNECT' == n.Follower && n.role.push('Follower'),
+ 'DISCONNECT' == n.Approver && n.role.push('Approver'),
+ 'DISCONNECT' == n.Coordinator && n.role.push('Coordinator'),
+ 'DISCONNECT' == n.Assignee && n.role.push('Assignee'),
+ (n.showConfirmation = !0),
+ e.updatePersonRole(i.cellInfos, n);
+ });
+ },
+ },
+ };
+ },
+ };
+ return n;
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/members/ChgCRMembersDataGridViewToolbar',
+ ['i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS'],
+ function (e) {
+ var t = Object.create(null);
+ return (
+ (t.toolbar = null),
+ (t.viewData = {
+ menu: [
+ {
+ type: 'CheckItem',
+ title: e.CHG_TOOLTIP_GRID_VIEW,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-view-list',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/members/ChgCRMembersDataGridLayout',
+ func: 'changeView',
+ },
+ tooltip: e.CHG_TOOLTIP_GRID_VIEW,
+ },
+ {
+ type: 'CheckItem',
+ title: e.CHG_TOOLTIP_TILE_VIEW,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-view-small-tile',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/members/ChgCRMembersTileViewLayout',
+ func: 'changeView',
+ },
+ tooltip: e.CHG_TOOLTIP_TILE_VIEW,
+ },
+ ],
+ }),
+ (t.writetoolbarDefinition = function () {
+ return {
+ entries: [
+ {
+ id: 'add',
+ dataElements: {
+ typeRepresentation: 'functionIcon',
+ icon: {
+ iconName: 'user-add',
+ fontIconFamily: 1,
+ },
+ tooltip: e.CHG_Member_Toolbar_AddMember,
+ position: 'far',
+ category: 'addRemove',
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/members/ChgCRAddMemberLayout',
+ func: 'launchAddMemberPanel',
+ },
+ },
+ },
+ {
+ id: 'remove',
+ dataElements: {
+ typeRepresentation: 'functionIcon',
+ icon: {
+ iconName: 'remove',
+ fontIconFamily: 1,
+ },
+ tooltip: e.CHG_Member_Toolbar_Remove,
+ position: 'far',
+ disabled: !0,
+ category: 'addRemove',
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/members/ChgCRMembersDataGridLayout',
+ func: 'removeHandler',
+ },
+ },
+ },
+ {
+ id: 'filter',
+ dataElements: {
+ typeRepresentation: 'functionIcon',
+ icon: {
+ iconName: 'filter',
+ fontIconFamily: 1,
+ },
+ tooltip: e.CHG_Member_Toolbar_Filter,
+ position: 'far',
+ category: 'View',
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/members/ChgCRMemberFilterLayout',
+ func: 'launchFilterMemberPanel',
+ },
+ },
+ },
+ {
+ id: 'view',
+ dataElements: {
+ typeRepresentation: 'sortingdropdown',
+ icon: {
+ iconName: 'view-legacy-thb',
+ fontIconFamily: 1,
+ },
+ value: this.viewData,
+ },
+ position: 'far',
+ category: 'View',
+ },
+ ],
+ };
+ }),
+ t
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/ChgCRDataGridReportViewToolbar',
+ ['i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS'],
+ function (e) {
+ let t = Object.create(null);
+ return (
+ (t.viewData = {
+ menu: [
+ {
+ type: 'CheckItem',
+ title: e.CHG_TOOLTIP_GRID_VIEW,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-view-list',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/ChgCRImpactAnalysisDataGridLayout',
+ func: 'changeCRView',
+ argument: {
+ view: 'GridView',
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_GRID_VIEW,
+ },
+ {
+ type: 'CheckItem',
+ title: e.CHG_TOOLTIP_TILE_VIEW,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-view-small-tile',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/ChgCRImpactAnalysisDataGridLayout',
+ func: 'changeCRView',
+ argument: {
+ view: 'TileView',
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_TILE_VIEW,
+ },
+ ],
+ }),
+ (t.writetoolbarDefinition = function (e) {
+ return {
+ entries: [
+ {
+ id: 'view',
+ dataElements: {
+ typeRepresentation: 'addDropdown',
+ icon: {
+ iconName: 'view-legacy-thb',
+ fontIconFamily: 1,
+ className: 'currentView',
+ },
+ value: this.viewData,
+ },
+ position: 'far',
+ category: 'View',
+ },
+ ],
+ };
+ }),
+ t
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovCommonDelete',
+ [
+ 'UWA/Core',
+ 'DS/ENOChgServices/scripts/services/ChgDataService',
+ 'DS/ENOChgServices/scripts/services/ChgErrors',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgServices/scripts/services/ChgInfodialog',
+ 'DS/UIKIT/Mask',
+ 'require',
+ ],
+ function (e, t, i, n, o, a, r) {
+ 'use strict';
+ return {
+ deleteNodes: function (r, s, l, c, d) {
+ for (
+ var u = n.CHG_GOV_Delete_Info_Content + '
', g = [], p = 0;
+ p < r.length;
+ p++
+ ) {
+ var h = r[p];
+ u += e.String.escapeHTML(h.nodeTitle) + ' (' + h.nodeName + ')
';
+ var m = {
+ physicalid: h.physicalid,
+ };
+ g.push(m);
+ }
+ var C = function (e) {
+ if (e.report && e.report.length > 0) {
+ for (var t = [], o = 0; o < e.report.length; o++) {
+ t.push(e.report[o].physicalids);
+ var r = e.report,
+ d = r[o].displaytype,
+ u = r[o].name,
+ g = r[o].error;
+ }
+ i.error(
+ n.CHG_GOV_Operation_Partially_Failed +
+ '
' +
+ d +
+ ' ' +
+ u +
+ ': ' +
+ g,
+ );
+ } else if (e.data && e.data.length > 0) {
+ var p = [];
+ for (o = 0; o < e.data.length; o++) p.push(e.data[o].id);
+ l(p, c),
+ i.success(
+ n.CHG_GOV_ChangeOrchestration_Toolbar_Delete_Success,
+ );
+ } else if (e.results && e.results.length > 0) {
+ for (p = [], o = 0; o < e.results.length; o++)
+ p.push(e.results[o].physicalid);
+ l(p, c),
+ i.success(
+ n.CHG_GOV_ChangeOrchestration_Toolbar_Delete_Success,
+ );
+ } else
+ i.warn(n.CHG_GOV_ChangeOrchestration_Toolbar_Delete_Failure);
+ 'undefined' != s && null != s && a.unmask(s);
+ },
+ v = [
+ {
+ label: n.CHG_GOV_OK_Button_Label,
+ handler: function () {
+ 'undefined' != s && null != s && a.mask(s),
+ 'ImpactAnalysis' === d
+ ? t.deleteImpactAnalysis(r[0].parentCRId, g).then(
+ function (e) {
+ C(e);
+ },
+ function (e) {
+ return a.unmask(s), Promise.reject(e);
+ },
+ )
+ : t.deleteObjectStructure(g).then(
+ function (e) {
+ C(e);
+ },
+ function (e) {
+ return a.unmask(s), Promise.reject(e);
+ },
+ ),
+ o.closeDialog();
+ },
+ className: 'primary',
+ },
+ {
+ label: n.CHG_GOV_CANCEL_Button_Label,
+ handler: function () {
+ o.closeDialog();
+ },
+ className: 'default',
+ },
+ ],
+ f = {
+ title: n.CHG_GOV_Delete_Info_Title,
+ content: u,
+ buttonArray: v,
+ };
+ o.launchInfoDailog(f);
+ },
+ };
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/model/changeRequest/facets/contributors/ChgCRContributorsDataGridModel',
+ [
+ 'UWA/Class/Model',
+ 'DS/TreeModel/TreeDocument',
+ 'DS/TreeModel/TreeNodeModel',
+ 'DS/TreeModel/DataModelSet',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgServices/scripts/services/ChgMembersServices',
+ 'DS/ENOChgServices/scripts/services/ChgDataService',
+ 'DS/UIKIT/Mask',
+ 'DS/ENOChgServices/scripts/services/ChgErrors',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ ],
+ function (e, t, i, n, o, a, r, s, l, c) {
+ 'use strict';
+ let d = e.extend({
+ init: function (e, t) {
+ (this.parentCRId = e), (this.impactAnalysisId = t);
+ },
+ setTreeDocument: function (e) {
+ this.treeDocument = e;
+ },
+ getTreeDocument: function () {
+ return this.treeDocument;
+ },
+ createTreeDocument: function () {
+ let e = new t({
+ useAsyncPreExpand: !0,
+ });
+ return (
+ (e.isChildOf = function (e) {
+ let t = e.getChildren();
+ for (let e = 0; e < t.length; e++)
+ if (this.options.grid.id == t[e].options.grid.id) return !0;
+ return !1;
+ }),
+ this.setTreeDocument(e),
+ e
+ );
+ },
+ loadContributor: function (e, t) {
+ e.prepareUpdate();
+ let i = this.createTreeDocumentNodeModel(t);
+ e.addRoot(i), e.pushUpdate();
+ },
+ createTreeDocumentNodeModel: function (e) {
+ let t = [];
+ for (let i = 0; i < e.length; i++) {
+ let n = this.createTreeNode(e[i]);
+ t.push(n);
+ }
+ return t;
+ },
+ createTreeNode: function (e) {
+ var t = '';
+ e.icon, e.roleList;
+ 'Person' == e.type
+ ? (t = this.getPersonImageDiv(e, !0)).addClassName(
+ 'chg-member-profile-picture',
+ )
+ : 'Group' == e.type || 'Group Proxy' == e.type
+ ? (t = this.getUserGroupImageDiv(e, !0)).addClassName(
+ 'chg-member-profile-picture',
+ )
+ : (t = e.thumbnail);
+ let n = new i({
+ label: e.personFullName,
+ description: c.CHG_Add_Member_Assignee,
+ grid: e,
+ icons: [e.icon],
+ thumbnail: t,
+ });
+ return (
+ ('Group' != e.type && 'Group Proxy' != e.type) ||
+ (n.options.label = e.title),
+ n
+ );
+ },
+ createCustomOwnerField: function (e) {
+ let t = '/api/user/getpicture/login/' + e.name + '/format/normal',
+ i = o.getGlobalVariable().computeSwymUrl(t),
+ n = new UWA.Element('div', {
+ class: 'members',
+ }),
+ r = new UWA.Element('div', {
+ class: 'assignee',
+ }),
+ s = '';
+ if (o.getGlobalVariable().isSwymInstalled)
+ s = UWA.createElement('img', {
+ class: 'userIcon',
+ src: i,
+ });
+ else {
+ let t = a.getAvatarDetails(e.personFullName);
+ (s = UWA.createElement('div', {
+ html: t.avatarStr,
+ class: 'avatarIcon',
+ })).style.setProperty('background', t.avatarColor);
+ }
+ s.inject(r);
+ let l = UWA.createElement('span', {
+ class: 'userName',
+ html: e.personFullName,
+ });
+ return r.inject(n), l.inject(n), n.outerHTML;
+ },
+ getPersonImageDiv: function (e, t) {
+ null == e.name && (e.name = e.userid);
+ var i = '/api/user/getpicture/login/' + e.name + '/format/normal';
+ i = o.getGlobalVariable().computeSwymUrl(i);
+ var n = new UWA.Element('div', {}),
+ r = '';
+ if (o.getGlobalVariable().isSwymInstalled)
+ r = UWA.createElement('img', {
+ class: 'userIcon',
+ src: i,
+ });
+ else {
+ var s = a.getAvatarDetails(e.personFullName);
+ (r = UWA.createElement('div', {
+ html: s.avatarStr,
+ })),
+ 1 == t
+ ? (r.addClassName('chg-member-profile-picture'),
+ r.addClassName('chg-team-profile-text'))
+ : r.addClassName('avatarIcon'),
+ r.style.setProperty('background', s.avatarColor);
+ }
+ return r.inject(n), n;
+ },
+ getUserGroupImageDiv: function (e, t) {
+ var i = new UWA.Element('div', {}),
+ n = '';
+ return (
+ (n = UWA.createElement('img', {
+ class: 'userIcon',
+ src: e.icon,
+ })),
+ 1 == t
+ ? (n.addClassName('chg-member-profile-picture'),
+ n.addClassName('chg-team-profile-text'))
+ : n.addClassName('avatarIcon'),
+ n.inject(i),
+ i
+ );
+ },
+ addExistingChildren: function (e) {
+ let t = this;
+ return new Promise(function (i, n) {
+ let o = t.impactAnalysisId,
+ a = t.parentCRId,
+ l = document.getElementById('outer-contributor-grid-div');
+ 'undefined' != l && null != l && s.mask(l),
+ r.updateExistingContributors(a, o, e).then(
+ function (e) {
+ let n = [];
+ e && (n = e.data),
+ d.prototype.addNodesInLayoutModel(t.treeDocument, n),
+ i(e),
+ s.unmask(l);
+ },
+ function (e) {
+ s.unmask(l), n(e);
+ },
+ );
+ });
+ },
+ addNodesInLayoutModel: function (e, t) {
+ let i = d.prototype.createTreeDocumentNodeModel(t);
+ if ((e.prepareUpdate(), 0 == e.getRoots().length)) e.addRoot(i);
+ else for (let t = i.length - 1; t >= 0; t--) e.addRoot(i[t], 0);
+ e.pushUpdate(),
+ e.getRoots().length > 0 &&
+ e._modelEvents.publish({
+ event: 'treeNotEmpty',
+ });
+ },
+ removeExistingChildren: function (e) {
+ let t = this;
+ return new Promise(function (i, n) {
+ let o = t.impactAnalysisId,
+ a = t.parentCRId,
+ d = document.getElementById('outer-contributor-grid-div');
+ 'undefined' != d && null != d && s.mask(d),
+ r.updateExistingContributors(a, o, e).then(
+ function (e) {
+ let n = t.treeDocument.getSelectedNodes();
+ i(n);
+ for (let e = 0; e < n.length; e++)
+ t.treeDocument.removeRoot(n[e]);
+ 0 == t.treeDocument.getRoots().length &&
+ t.treeDocument._modelEvents.publish({
+ event: 'treeEmpty',
+ }),
+ l.success(
+ c.CHG_Contributors_Toolbar_RemoveContributor_suceess,
+ ),
+ s.unmask(d);
+ },
+ function (e) {
+ s.unmask(d), n();
+ },
+ );
+ });
+ },
+ });
+ return d;
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeAction/ChgCreateChangeAction',
+ [
+ 'DS/ENONewWidget/ENONewLauncher',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/UIKIT/Mask',
+ 'require',
+ ],
+ function (e, t, i, n, o) {
+ return {
+ launchCreateChangeActionDialog: function (a) {
+ console.log(
+ 'launchCreateChangeActionDialog ............................',
+ );
+ let r = widget.getValue('DefaultCASubType')
+ ? widget.getValue('DefaultCASubType')
+ : 'Change Action',
+ s = {
+ context: {
+ service: '3DSpace',
+ tenant: t.getGlobalVariable().tenant,
+ header: {
+ SecurityContext: t.getGlobalVariable().getSecurityContext(),
+ },
+ },
+ labelTopBar: i.CHG_NEW_CHANGE_ACTION_FORM,
+ type: 'Change Action',
+ silentMode: !1,
+ overlay: !0,
+ options: {
+ typeName: 'Change Action',
+ preferedType: r,
+ select: [],
+ },
+ events: {
+ onSuccess: function (e) {
+ a && (a.isClickProcessing = !1);
+ var t = document.getElementsByClassName('moduleWrapper')[0];
+ (null == t && 'undefined' == t) || n.mask(t);
+ let i = e.result[0].identifier,
+ r = {};
+ (r.context = i), (r.type = 'ChangeAction');
+ let s = o(
+ 'DS/ENOChgGovernanceUX/scripts/view/ChgChangeOrderHome',
+ ),
+ l = o(
+ 'DS/ENOChgGovernanceUX/scripts/util/changeAction/ChgChangeActionUtil',
+ );
+ s.launchPropertyPanelContext(r),
+ l.displayObjectInfoInsideIDcard(i, !0);
+ },
+ onFailure: function (e) {
+ a && (a.isClickProcessing = !1),
+ console.log('onFailure...............' + e);
+ },
+ onCancel: function (e) {
+ a && (a.isClickProcessing = !1);
+ },
+ },
+ };
+ var l = {
+ commandInfo: {
+ type: 'Change Action',
+ facet: 'Start a New Activity',
+ action: 'CA>Start a New Activity>New Change Action',
+ },
+ };
+ o(
+ 'DS/ENOChgProbes/scripts/ChgCloudProbeUtils',
+ ).cloudProbeUtils.genericCommandClickEventForAnalytics({
+ inputJSON: l,
+ }),
+ new e().CreateNew(s);
+ },
+ };
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/model/changeRequest/facets/impactBasis/ChgCRImpactBasisDataGridModel',
+ [
+ 'UWA/Class/Model',
+ 'DS/TreeModel/TreeDocument',
+ 'DS/TreeModel/TreeNodeModel',
+ 'DS/TreeModel/DataModelSet',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgServices/scripts/services/ChgMembersServices',
+ 'DS/ENOChgServices/scripts/services/ChgDataService',
+ 'DS/ENOChgServices/scripts/services/ChgErrors',
+ 'DS/TreeModel/BaseFilter',
+ 'DS/UIKIT/Mask',
+ ],
+ function (e, t, i, n, o, a, r, s, l, c, d) {
+ 'use strict';
+ let u = c.inherit({
+ publishedProperties: {},
+ isDataFiltered: function (e) {
+ var t = e.getAttributeValue('id');
+ return (
+ !(!this.filterModel || !this.filterModel.allowedIDs) &&
+ -1 === this.filterModel.allowedIDs.indexOf(t)
+ );
+ },
+ isEmpty: function () {
+ return void 0 === this.filterModel.allowedIDs;
+ },
+ }),
+ g = e.extend({
+ init: function (e, t) {
+ (this.parentCRId = e), (this.impactAnalysisId = t);
+ },
+ setTreeDocument: function (e) {
+ this.treeDocument = e;
+ },
+ getTreeDocument: function () {
+ return this.treeDocument;
+ },
+ createTreeDocument: function () {
+ let e = new t({
+ id: 'crImpactBasis',
+ useAsyncPreExpand: !0,
+ });
+ return (
+ (e.isChildOf = function (e) {
+ let t = e.getChildren();
+ for (let e = 0; e < t.length; e++)
+ if (this.options.grid.id == t[e].options.grid.id) return !0;
+ return !1;
+ }),
+ this.setTreeDocument(e),
+ e
+ );
+ },
+ registerCustomFilter: function () {
+ this.treeDocument
+ .getFilterManager()
+ .registerFilter('stringRole', u);
+ },
+ loadImpactBasisData: function (e, t) {
+ e.prepareUpdate();
+ let i = this.createTreeDocumentNodeModel(t);
+ e.addRoot(i), e.pushUpdate();
+ },
+ createTreeDocumentNodeModel: function (e) {
+ let t = [];
+ for (let i = 0; i < e.length; i++) {
+ let n = this.createTreeNode(e[i]);
+ t.push(n);
+ }
+ return t;
+ },
+ createTreeNode: function (e) {
+ let t = this.createCustomOwnerField(e);
+ e.chgObjOwner = t;
+ let n = e.name + ' | ' + e.ownerFullName,
+ a = e.currentNLS;
+ var r,
+ s = this.getCustomTooltip(e);
+ return (
+ (r = o.getGlobalVariable().is3DSpace
+ ? '' +
+ UWA.String.escapeHTML(e.title) +
+ ''
+ : e.title),
+ new i({
+ label: r,
+ subLabel: n,
+ description: a,
+ grid: e,
+ icons: [e.icon],
+ thumbnail: e.previewicon,
+ contextualMenu: ['dummy placeholder'],
+ useAsyncPreExpand: !0,
+ customTooltip: s,
+ })
+ );
+ },
+ createCustomOwnerField: function (e) {
+ let t = '/api/user/getpicture/login/' + e.owner + '/format/normal',
+ i = o.getGlobalVariable().computeSwymUrl(t),
+ n = new UWA.Element('div', {
+ class: 'members',
+ }),
+ a = new UWA.Element('div', {
+ class: 'assignee',
+ }),
+ s = '';
+ if (o.getGlobalVariable().isSwymInstalled)
+ s = UWA.createElement('img', {
+ class: 'userIcon',
+ src: i,
+ });
+ else {
+ let t = r.getAvatarDetails(e.ownerFullName);
+ (s = UWA.createElement('div', {
+ html: t.avatarStr,
+ class: 'avatarIcon',
+ })).style.setProperty('background', t.avatarColor);
+ }
+ s.inject(a);
+ let l = UWA.createElement('span', {
+ class: 'userName',
+ html: e.ownerFullName,
+ });
+ return a.inject(n), l.inject(n), n.outerHTML;
+ },
+ getCustomTooltip: function (e) {
+ return (
+ a.CHG_GOV_DataGrid_Column_Title +
+ ': ' +
+ e.title +
+ '\n' +
+ a.CHG_GOV_DataGrid_Column_Name +
+ ': ' +
+ e.name +
+ '\n' +
+ a.CHG_GOV_DataGrid_Column_Owner +
+ ': ' +
+ e.ownerFullName +
+ '\n' +
+ a.CHG_GOV_DataGrid_Column_Maturity +
+ ': ' +
+ e.currentNLS
+ );
+ },
+ addExistingChildren: function (e) {
+ let t = this;
+ return new Promise(function (i, n) {
+ let o = t.impactAnalysisId,
+ a = t.parentCRId,
+ r = document.getElementById('outer-impactBasis-grid-div');
+ 'undefined' != r && null != r && d.mask(r),
+ s.updateExistingImpactBasis(a, o, e).then(
+ function (e) {
+ let n = [];
+ e && (n = e.data);
+ let o = [];
+ for (let e of n) (e.reasonForChange = ''), o.push(e);
+ g.prototype.addNodesInLayoutModel(t.treeDocument, o),
+ i(e),
+ d.unmask(r);
+ },
+ function (e) {
+ d.unmask(r), n(e);
+ },
+ );
+ });
+ },
+ removeExistingChildren: function (e) {
+ let t = this;
+ return new Promise(function (i, n) {
+ let o = t.impactAnalysisId,
+ r = t.parentCRId,
+ c = document.getElementById('outer-impactBasis-grid-div');
+ 'undefined' != c && null != c && d.mask(c),
+ s.updateExistingImpactBasis(r, o, e).then(
+ function (e) {
+ let n = t.treeDocument.getSelectedNodes();
+ i(n);
+ for (let e = 0; e < n.length; e++)
+ t.treeDocument.removeRoot(n[e]);
+ l.success(a.CHG_GOV_ImpactBasis_Remove_Success),
+ d.unmask(c);
+ },
+ function (e) {
+ d.unmask(c), n();
+ },
+ );
+ });
+ },
+ addNodesInLayoutModel: function (e, t) {
+ let i = g.prototype.createTreeDocumentNodeModel(t);
+ if ((e.prepareUpdate(), 0 == e.getRoots().length)) e.addRoot(i);
+ else for (let t = i.length - 1; t >= 0; t--) e.addRoot(i[t], 0);
+ e.pushUpdate();
+ },
+ filterView: function (e, t) {
+ let i = t,
+ n = e.matchingIDs;
+ i.setFilterModel({
+ role: {
+ filterId: 'stringRole',
+ filterModel: {
+ allowedIDs: n,
+ },
+ },
+ });
+ },
+ enableColorizeView: function (e, t) {
+ let i = t.getAllDescendants();
+ var n, o;
+ (n = e),
+ (o = function (e, t) {
+ i.map((i) => {
+ if (i.options.grid.id === t) {
+ var n = {
+ grid: {
+ biColor: e,
+ },
+ color: e,
+ };
+ i.updateOptions(n);
+ }
+ });
+ }),
+ UWA.is(n, 'array') &&
+ n.forEach(function (e) {
+ var t = e.color,
+ i = e.id;
+ o(t, i);
+ });
+ },
+ disableColorizeView: function (e, t) {
+ t.getAllDescendants().map((e) => {
+ e.updateOptions({
+ grid: {
+ biColor: 'rgba(0, 0, 0, 0)',
+ },
+ color: 'rgba(0, 0, 0, 0)',
+ });
+ });
+ },
+ });
+ return g;
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/ChgCRDataGridViewToolbar',
+ ['i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS'],
+ function (e) {
+ let t = Object.create(null);
+ return (
+ (t.toolbar = null),
+ (t.sortingData = {
+ menu: [
+ {
+ type: 'PushItem',
+ title: e.CHG_GOV_DataGrid_Column_Severity,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-alpha-sorting-a-z',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/ChgCRDataGridLayout',
+ func: 'sortBySeverity',
+ },
+ },
+ {
+ type: 'PushItem',
+ title: e.CHG_GOV_DataGrid_Column_Maturity,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-alpha-sorting-a-z',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/ChgCRDataGridLayout',
+ func: 'sortByMaturity',
+ },
+ },
+ ],
+ }),
+ (t.viewData = {
+ menu: [
+ {
+ type: 'CheckItem',
+ title: e.CHG_TOOLTIP_GRID_VIEW,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-view-list',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/ChgCRDataGridLayout',
+ func: 'changeView',
+ },
+ tooltip: e.CHG_TOOLTIP_GRID_VIEW,
+ },
+ {
+ type: 'CheckItem',
+ title: e.CHG_TOOLTIP_TILE_VIEW,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-view-small-tile',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/ChgCRTileViewLayout',
+ func: 'changeView',
+ },
+ tooltip: e.CHG_TOOLTIP_TILE_VIEW,
+ },
+ ],
+ }),
+ (t.filterData = {
+ menu: [
+ {
+ type: 'CheckItem',
+ title: e.CHG_Filter_ActiveCR,
+ state: 'selected',
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/ChgCRDataGridLayout',
+ func: 'filterView',
+ argument: {
+ filter: 'activeCR',
+ },
+ },
+ tooltip: e.CHG_Filter_ActiveCR_Def,
+ },
+ {
+ type: 'CheckItem',
+ title: e.CHG_Filter_InactiveCR,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/ChgCRDataGridLayout',
+ func: 'filterView',
+ argument: {
+ filter: 'inactiveCR',
+ },
+ },
+ tooltip: e.CHG_Filter_InactiveCR_Def,
+ },
+ ],
+ }),
+ (t.writetoolbarDefination = function () {
+ return {
+ entries: [
+ {
+ id: 'filter',
+ className: 'menuCA',
+ dataElements: {
+ typeRepresentation: 'sortingdropdown',
+ icon: {
+ iconName: 'list-filter',
+ fontIconFamily: 1,
+ },
+ value: this.filterData,
+ },
+ position: 'far',
+ tooltip: e.CHG_Toolbar_FilterBy,
+ category: 'View',
+ },
+ {
+ id: 'view',
+ className: 'menuCA',
+ dataElements: {
+ typeRepresentation: 'sortingdropdown',
+ icon: {
+ iconName: 'view-legacy-thb',
+ fontIconFamily: 1,
+ },
+ value: this.viewData,
+ },
+ position: 'far',
+ category: 'View',
+ },
+ {
+ id: 'sorting',
+ className: 'menuCA',
+ dataElements: {
+ typeRepresentation: 'sortingdropdown',
+ icon: {
+ iconName: 'sorting',
+ fontIconFamily: 1,
+ },
+ value: this.sortingData,
+ },
+ position: 'far',
+ tooltip: e.CHG_TOOLTIP_SORT,
+ category: 'View',
+ },
+ ],
+ };
+ }),
+ t
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/decision/ChgDecisionfacet',
+ [
+ 'UWA/Core',
+ 'DS/ENOChgGovernanceUX/scripts/components/decisionView/ChgDecisionView',
+ 'DS/EditPropWidget/facets/Common/FacetsBase',
+ 'DS/EditPropWidget/constants/EditPropConstants',
+ 'UWA/Class/Model',
+ 'DS/UIKIT/Mask',
+ 'css!DS/ENOChgGovernanceUX/ENOChgGovernanceUX',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ ],
+ function (e, t, i, n, o, a, r, s) {
+ 'use strict';
+ return i.extend({
+ init: function () {
+ this._parent.apply(this, arguments),
+ this.elements.container ||
+ (this.elements.container = e.createElement('div', {
+ id: 'DecisionContainer',
+ class:
+ 'decisions-facet-container chg-decisions-facet-container',
+ }));
+ },
+ updateFacet: function () {
+ a.mask(this.elements.container);
+ var e = this.getModel();
+ if (!e || '' == e.get('objectId'))
+ return a.unmask(this.elements.container), !1;
+ this.elements.container.setContent('');
+ var i = {
+ id: e.get('objectId'),
+ target: this.elements.container,
+ };
+ t.createDecisionView(i);
+ },
+ destroyComponent: function () {
+ e.is(this.destroy, 'function') && this.destroy();
+ },
+ });
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgDataGridUtil',
+ [
+ 'UWA/Core',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgServices/scripts/services/ChgNativeInitService',
+ 'DS/ENOXVersionExplorerController/VersionExplorerController',
+ 'DS/LifecycleServices/LifecycleServicesSettings',
+ 'DS/Windows/ImmersiveFrame',
+ 'DS/Windows/Dialog',
+ 'require',
+ 'DS/LifecycleCmd/MaturityCmd',
+ 'DS/ENOChgServices/scripts/services/ChgInfraService',
+ 'DS/ENOChgGovernanceUX/scripts/util/DocumentUtils',
+ 'DS/ENOChgServices/scripts/services/ChgErrors',
+ ],
+ function (e, t, i, n, o, a, r, s, l, c, d, u, g) {
+ 'use strict';
+ let p = Object.create(null);
+ return (
+ (p.getColumnDefinition = function (n) {
+ if (n && n.dataIndex) {
+ var o = this;
+ switch (n.dataIndex) {
+ case 'titleTree':
+ return {
+ dataIndex: 'tree',
+ text: i.CHG_GOV_DataGrid_Column_Title,
+ editableFlag: !!e.is(n.editableFlag) && n.editableFlag,
+ visibleFlag: !e.is(n.visibleFlag) || n.visibleFlag,
+ alwaysVisibleFlag:
+ !e.is(n.alwaysVisibleFlag) || n.alwaysVisibleFlag,
+ pinned: 'left',
+ width: e.is(n.width) ? n.width : 200,
+ filterId: 'stringRegexp',
+ filterModel: '',
+ };
+ case 'title':
+ return {
+ dataIndex: n.dataIndex,
+ text: i.CHG_GOV_DataGrid_Column_Title,
+ editableFlag: !!e.is(n.editableFlag) && n.editableFlag,
+ visibleFlag: !e.is(n.visibleFlag) || n.visibleFlag,
+ alwaysVisibleFlag:
+ !e.is(n.alwaysVisibleFlag) || n.alwaysVisibleFlag,
+ width: e.is(n.width) ? n.width : 200,
+ typeRepresentation: 'url',
+ filterId: 'stringRegexp',
+ filterModel: '',
+ getCellValue: function (e) {
+ if (e.nodeModel)
+ return {
+ icon: e.nodeModel.getAttributeValue('icon'),
+ label: e.nodeModel.getAttributeValue('title'),
+ };
+ },
+ };
+ case 'name':
+ return {
+ dataIndex: n.dataIndex,
+ text: i.CHG_GOV_DataGrid_Column_Name,
+ editableFlag: !!e.is(n.editableFlag) && n.editableFlag,
+ visibleFlag: !e.is(n.visibleFlag) || n.visibleFlag,
+ alwaysVisibleFlag:
+ !!e.is(n.alwaysVisibleFlag) && n.alwaysVisibleFlag,
+ allowUnsafeHTMLContent:
+ !!e.is(n.allowUnsafeHTMLContent) &&
+ n.allowUnsafeHTMLContent,
+ width: e.is(n.width) ? n.width : 150,
+ filterId: 'stringRegexp',
+ filterModel: '',
+ };
+ case 'chgObjName':
+ case 'co_name':
+ return {
+ dataIndex: n.dataIndex,
+ text: i.CHG_GOV_DataGrid_Column_Name,
+ editableFlag: !!e.is(n.editableFlag) && n.editableFlag,
+ visibleFlag: !e.is(n.visibleFlag) || n.visibleFlag,
+ alwaysVisibleFlag:
+ !!e.is(n.alwaysVisibleFlag) && n.alwaysVisibleFlag,
+ allowUnsafeHTMLContent:
+ !e.is(n.allowUnsafeHTMLContent) || n.allowUnsafeHTMLContent,
+ width: e.is(n.width) ? n.width : 150,
+ filterId: 'stringRegexp',
+ filterModel: '',
+ getCellGroupingKey: function (e) {
+ return e.nodeModel.options.grid.name;
+ },
+ };
+ case 'typeNLS':
+ return {
+ dataIndex: n.dataIndex,
+ text: i.CHG_GOV_DataGrid_Column_Type,
+ editableFlag: !!e.is(n.editableFlag) && n.editableFlag,
+ visibleFlag: !!e.is(n.visibleFlag) && n.visibleFlag,
+ alwaysVisibleFlag:
+ !!e.is(n.alwaysVisibleFlag) && n.alwaysVisibleFlag,
+ filterId: 'set',
+ filterModel: [],
+ };
+ case 'revision':
+ return {
+ dataIndex: n.dataIndex,
+ text: i.CHG_GOV_DataGrid_Column_Revision,
+ editableFlag: !!e.is(n.editableFlag) && n.editableFlag,
+ visibleFlag: !e.is(n.visibleFlag) || n.visibleFlag,
+ alwaysVisibleFlag:
+ !!e.is(n.alwaysVisibleFlag) && n.alwaysVisibleFlag,
+ width: 65,
+ filterId: 'set',
+ filterModel: [],
+ };
+ case 'maturityNLS':
+ return {
+ dataIndex: n.dataIndex,
+ text: i.CHG_GOV_DataGrid_Column_Maturity,
+ editableFlag: !!e.is(n.editableFlag) && n.editableFlag,
+ visibleFlag: !e.is(n.visibleFlag) || n.visibleFlag,
+ alwaysVisibleFlag:
+ !!e.is(n.alwaysVisibleFlag) && n.alwaysVisibleFlag,
+ allowUnsafeHTMLContent: !0,
+ filterId: 'set',
+ filterModel: [],
+ };
+ case 'maturityWithBadge':
+ return {
+ dataIndex: n.dataIndex,
+ text: i.CHG_GOV_DataGrid_Column_Maturity,
+ typeRepresentation: 'tag',
+ className: 'lc-maturity-state',
+ filterId: 'set',
+ filterModel: [],
+ width: 100,
+ getCellClassName: function (e) {
+ if (e.nodeModel) {
+ var t,
+ i = e.nodeModel.options.grid.maturity;
+ if (i) {
+ if (!1 === i.contains('.'))
+ i = e.nodeModel.getReferenceValue('policy') + '.' + i;
+ t = o.getAndCreateMaturityClass(
+ i,
+ 'wux-controls-label',
+ );
+ }
+ return t;
+ }
+ },
+ };
+ case 'currentNLS':
+ return {
+ dataIndex: n.dataIndex,
+ text: i.CHG_GOV_DataGrid_Column_Maturity,
+ editableFlag: !!e.is(n.editableFlag) && n.editableFlag,
+ visibleFlag: !e.is(n.visibleFlag) || n.visibleFlag,
+ alwaysVisibleFlag:
+ !!e.is(n.alwaysVisibleFlag) && n.alwaysVisibleFlag,
+ allowUnsafeHTMLContent: !0,
+ filterId: 'set',
+ filterModel: [],
+ };
+ case 'collabspaceNLS':
+ return {
+ dataIndex: n.dataIndex,
+ text: i.CHG_GOV_DataGrid_Column_CollabSpace,
+ editableFlag: !!e.is(n.editableFlag) && n.editableFlag,
+ visibleFlag: !!e.is(n.visibleFlag) && n.visibleFlag,
+ alwaysVisibleFlag:
+ !!e.is(n.alwaysVisibleFlag) && n.alwaysVisibleFlag,
+ filterId: 'set',
+ filterModel: [],
+ };
+ case 'organizationNLS':
+ return {
+ dataIndex: n.dataIndex,
+ text: i.CHG_GOV_DataGrid_Column_Organization,
+ editableFlag: !!e.is(n.editableFlag) && n.editableFlag,
+ visibleFlag: !!e.is(n.visibleFlag) && n.visibleFlag,
+ sortableFlag: !e.is(n.sortableFlag) || n.sortableFlag,
+ alwaysVisibleFlag:
+ !!e.is(n.alwaysVisibleFlag) && n.alwaysVisibleFlag,
+ filterId: 'set',
+ filterModel: [],
+ };
+ case 'reasonForChange':
+ return {
+ dataIndex: n.dataIndex,
+ text: i.Chg_GOV_Reason_For_Change,
+ editableFlag: !e.is(n.editableFlag) || n.editableFlag,
+ visibleFlag: !e.is(n.visibleFlag) || n.visibleFlag,
+ alwaysVisibleFlag:
+ !!e.is(n.alwaysVisibleFlag) && n.alwaysVisibleFlag,
+ typeRepresentation: 'editor',
+ massUpdateAllowedFlag:
+ !e.is(n.massUpdateAllowedFlag) || n.massUpdateAllowedFlag,
+ filterId: 'stringRegexp',
+ filterModel: '',
+ };
+ case 'applicabilityNLS':
+ return {
+ dataIndex: n.dataIndex,
+ text: i.CHG_GOV_DataGrid_Column_Applicability,
+ editableFlag: !!e.is(n.editableFlag) && n.editableFlag,
+ visibleFlag: !!e.is(n.visibleFlag) && n.visibleFlag,
+ alwaysVisibleFlag:
+ !!e.is(n.alwaysVisibleFlag) && n.alwaysVisibleFlag,
+ filterId: 'stringRegexp',
+ filterModel: '',
+ };
+ case 'modificationDate':
+ return {
+ dataIndex: n.dataIndex,
+ text: i.CHG_GOV_DataGrid_Column_ModificationDate,
+ editableFlag: !!e.is(n.editableFlag) && n.editableFlag,
+ visibleFlag: !!e.is(n.visibleFlag) && n.visibleFlag,
+ alwaysVisibleFlag:
+ !!e.is(n.alwaysVisibleFlag) && n.alwaysVisibleFlag,
+ filterModel: '',
+ };
+ case 'creationDate':
+ return {
+ dataIndex: n.dataIndex,
+ text: i.CHG_GOV_DataGrid_Column_CreationDate,
+ editableFlag: !!e.is(n.editableFlag) && n.editableFlag,
+ visibleFlag: !!e.is(n.visibleFlag) && n.visibleFlag,
+ alwaysVisibleFlag:
+ !!e.is(n.alwaysVisibleFlag) && n.alwaysVisibleFlag,
+ filterModel: '',
+ };
+ case 'severityNLS':
+ return {
+ dataIndex: n.dataIndex,
+ text: i.CHG_GOV_DataGrid_Column_Severity,
+ editableFlag: !!e.is(n.editableFlag) && n.editableFlag,
+ typeRepresentation: 'url',
+ filterId: 'set',
+ filterModel: [],
+ getCellValue: function (e) {
+ if (e.nodeModel) {
+ var t = e.nodeModel.getAttributeValue('severity');
+ let i, n;
+ return (
+ 'Low' == t
+ ? ((i = 'level-low'), (n = 'success'))
+ : 'Medium' == t
+ ? ((i = 'level-medium'), (n = 'warning'))
+ : 'High' == t && ((i = 'level-high'), (n = 'error')),
+ {
+ icon: i,
+ label: e.nodeModel.getAttributeValue('severityNLS'),
+ emphasize: n,
+ }
+ );
+ }
+ },
+ getCellClassName: function (e) {
+ return e && e.nodeModel ? 'change-sev' : null;
+ },
+ compareFunction: function (e, t, i, n, o) {
+ return 'undefined' != i.options.grid.severityGrade &&
+ 'undefined' != n.options.grid.severityGrade
+ ? i.options.grid.severityGrade ==
+ n.options.grid.severityGrade
+ ? 0
+ : i.options.grid.severityGrade <
+ n.options.grid.severityGrade
+ ? -1
+ : 1
+ : 0;
+ },
+ getCellGroupingKey: function (e) {
+ return e.nodeModel.options.grid.severityNLS;
+ },
+ };
+ case 'ownerFullName':
+ return {
+ dataIndex: n.dataIndex,
+ text: i.CHG_GOV_DataGrid_Column_Owner,
+ editableFlag: !!e.is(n.editableFlag) && n.editableFlag,
+ visibleFlag: !e.is(n.visibleFlag) || n.visibleFlag,
+ alwaysVisibleFlag:
+ !!e.is(n.alwaysVisibleFlag) && n.alwaysVisibleFlag,
+ typeRepresentation: 'user',
+ filterId: 'set',
+ filterModel: [],
+ getCellValue: function (e) {
+ if (e.nodeModel) {
+ if (t.getGlobalVariable().isSwymInstalled) {
+ var i =
+ '/api/user/getpicture/login/' +
+ e.nodeModel.getAttributeValue('owner') +
+ '/format/normal';
+ return {
+ icon: (i = t.getGlobalVariable().computeSwymUrl(i)),
+ label: e.nodeModel.getAttributeValue('ownerFullName'),
+ };
+ }
+ return {
+ label: e.nodeModel.getAttributeValue('ownerFullName'),
+ };
+ }
+ },
+ getCellGroupingKey: function (e) {
+ return e.nodeModel.options.grid.ownerFullName;
+ },
+ };
+ case 'changeCoordinatorFullName':
+ return {
+ dataIndex: n.dataIndex,
+ text: i.CHG_GOV_DataGrid_Column_ChangeCoordinator,
+ editableFlag: !!e.is(n.editableFlag) && n.editableFlag,
+ visibleFlag: !!e.is(n.visibleFlag) && n.visibleFlag,
+ alwaysVisibleFlag:
+ !!e.is(n.alwaysVisibleFlag) && n.alwaysVisibleFlag,
+ typeRepresentation: 'user',
+ filterId: 'set',
+ filterModel: [],
+ getCellValue: function (e) {
+ if (e.nodeModel) {
+ if (t.getGlobalVariable().isSwymInstalled) {
+ var i =
+ '/api/user/getpicture/login/' +
+ e.nodeModel.getAttributeValue('changeCoordinator') +
+ '/format/normal';
+ return {
+ icon: (i = t.getGlobalVariable().computeSwymUrl(i)),
+ label: e.nodeModel.getAttributeValue(
+ 'changeCoordinatorFullName',
+ ),
+ };
+ }
+ return {
+ label: e.nodeModel.getAttributeValue(
+ 'changeCoordinatorFullName',
+ ),
+ };
+ }
+ },
+ getCellGroupingKey: function (e) {
+ return e.nodeModel.options.grid.changeCoordinatorFullName;
+ },
+ };
+ }
+ }
+ }),
+ (p.launchVersionExplorer = function (n) {
+ var l = e.createElement('div', {
+ styles: {
+ height: '100%',
+ },
+ }),
+ c = new o({
+ versionGraphContainer: l,
+ }),
+ d = [
+ {
+ '3DSpace': t.getGlobalVariable().baseURL,
+ platformId: t.getGlobalVariable().tenant,
+ },
+ ];
+ a.setOption('platform_services', d),
+ c.setSingleSelectionMode(),
+ c.setCheckVersionExternalFunction(
+ 'ENOXVersionExplorerOpenVersion',
+ function (e) {
+ return !1;
+ },
+ ),
+ c.publishEvent('ENOXVersionExplorerLoadVersionModel', {
+ id: n.id,
+ securityContext: t.getGlobalVariable().getSecurityContext(),
+ tenantId: t.getGlobalVariable().tenant,
+ type: n.type,
+ context: null,
+ onComplete: function () {},
+ });
+ var u = new r({
+ identifier: 'WebUX_IMF_ECM_VERSION_EXP',
+ });
+ new s({
+ immersiveFrame: u,
+ title:
+ (n.title_prefix ? n.title_prefix : i.CHG_GOV_VE_Revisions) +
+ ' : ' +
+ n.name,
+ content: l,
+ height: 360,
+ width: 620,
+ resizableFlag: !0,
+ modalFlag: !0,
+ identifier: 'WebUX_PANEL_ECM_VERSION_EXP',
+ });
+ u.inject(widget.body);
+ }),
+ (p.getRelationalExplorerMenu = function (e) {
+ var o = e.selectedNodeIDs;
+ return {
+ type: 'PushItem',
+ title: i.CHG_GOV_Menu_Relational_Explorer,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-object-related',
+ },
+ action: {
+ callback: function (e) {
+ require([
+ 'DS/ENOChgGovernanceUX/scripts/util/ProbesRMBCommandUtil',
+ ], function (e) {
+ e.createProbesData('Relations');
+ }),
+ t.getGlobalVariable().isNative
+ ? n.DispatchEventToWin('onRelations', o)
+ : require([
+ 'DS/ENOChgServices/scripts/services/ChgIDCardCommonServices',
+ ], function (e) {
+ e.openRelationalExplorer(o);
+ });
+ },
+ },
+ };
+ }),
+ (p.getMaturityMenu = function (e, t, n) {
+ var o = this;
+ return {
+ type: 'PushItem',
+ title: i.CHG_GOV_Menu_Maturity,
+ fonticon: {
+ family: 1,
+ content: 'fonticon fonticon-collaborative-lifecycle-management',
+ },
+ action: {
+ callback: function (i) {
+ o.executeMaturity(e, t, n);
+ },
+ },
+ };
+ }),
+ (p.executeMaturity = function (e, i, n) {
+ require([
+ 'DS/ENOChgGovernanceUX/scripts/util/ProbesRMBCommandUtil',
+ ], function (e) {
+ e.createProbesData('Maturity');
+ });
+ var o = {
+ securityContext: {
+ SecurityContext: t.getGlobalVariable().getSecurityContext(),
+ tenant: t.getGlobalVariable().tenant,
+ },
+ getSecurityContext: function () {
+ return this.securityContext;
+ },
+ },
+ a = [];
+ if (e)
+ for (
+ var r = e.cellInfos.nodeModel
+ .getTreeDocument()
+ .getSelectedNodes(),
+ s = 0;
+ s < r.length;
+ s++
+ )
+ 'ia_Total' != r[s].options.grid.id &&
+ a.push({
+ physicalid: r[s].options.grid['@id'] || r[s].options.grid.id,
+ });
+ else
+ i &&
+ (Array.isArray(i)
+ ? i.forEach((e) => {
+ a.push({
+ physicalid: e,
+ });
+ })
+ : '' != i &&
+ a.push({
+ physicalid: i,
+ }));
+ new c({
+ context: o,
+ ID: 'MaturityHdr',
+ })
+ .executeAsync(a)
+ .then(function () {
+ n && n();
+ });
+ }),
+ (p.getHandleForMaturityUpdate = function (e, t) {
+ var i = {};
+ if (t && t.length) {
+ for (const t of e.Refresh.modified)
+ (t.maturity = t.policy + '.' + t.state),
+ (i['ds6w:status'] = [t.maturity]);
+ e &&
+ e.Refresh &&
+ Array.isArray(e.Refresh.modified) &&
+ d.getNLSValuesPromise(i).then(function (i) {
+ if (i)
+ for (const a of e.Refresh.modified)
+ for (const e of t)
+ if (a.physicalid === e.options.grid.id) {
+ var n = {
+ title: e.options.grid.title,
+ name: e.options.grid.name,
+ severityNLS: e.options.grid.severityNLS,
+ ownerFullName: e.options.grid.ownerFullName,
+ maturityNLS: i['ds6w:status'][a.maturity],
+ currentNLS: i['ds6w:status'][a.maturity],
+ },
+ o = p.getCustomTooltip(n);
+ e.updateOptions({
+ description: i['ds6w:status'][a.maturity],
+ grid: {
+ maturity: a.state,
+ maturityNLS: i['ds6w:status'][a.maturity],
+ maturityWithBadge: i['ds6w:status'][a.maturity],
+ current: a.state,
+ currentNLS: i['ds6w:status'][a.maturity],
+ },
+ customTooltip: o,
+ });
+ }
+ });
+ }
+ }),
+ (p.getCustomTooltip = function (e) {
+ return void 0 !== e.currentNLS
+ ? i.CHG_GOV_DataGrid_Column_Title +
+ ': ' +
+ e.title +
+ '\n' +
+ i.CHG_GOV_DataGrid_Column_Name +
+ ': ' +
+ e.name +
+ '\n' +
+ i.CHG_GOV_DataGrid_Column_Severity +
+ ': ' +
+ e.severityNLS +
+ '\n' +
+ i.CHG_GOV_DataGrid_Column_Owner +
+ ': ' +
+ e.ownerFullName +
+ '\n' +
+ i.CHG_GOV_DataGrid_Column_Maturity +
+ ': ' +
+ e.currentNLS
+ : i.CHG_GOV_DataGrid_Column_Title +
+ ': ' +
+ e.title +
+ '\n' +
+ i.CHG_GOV_DataGrid_Column_Name +
+ ': ' +
+ e.name +
+ '\n' +
+ i.CHG_GOV_DataGrid_Column_Severity +
+ ': ' +
+ e.severityNLS +
+ '\n' +
+ i.CHG_GOV_DataGrid_Column_Owner +
+ ': ' +
+ e.ownerFullName +
+ '\n' +
+ i.CHG_GOV_DataGrid_Column_Maturity +
+ ': ' +
+ e.maturityNLS;
+ }),
+ (p.cleanStatusForCSS = function (e) {
+ return e.replace(/(\.| )/g, '-');
+ }),
+ (p.createCSSClass = function (e, t, i) {
+ if (null === document.getElementById(e)) {
+ var n = document.createElement('style');
+ (n.type = 'text/css'), (n.id = e);
+ let o = i || '.' + e;
+ (n.innerHTML = o + t),
+ document.getElementsByTagName('head')[0].appendChild(n);
+ }
+ }),
+ (p.getAndCreateMaturityClass = function (e, t, i) {
+ return (
+ 'lc-status-' + this.cleanStatusForCSS(e) + (t ? '-withClass' : '')
+ );
+ }),
+ (p.addCSSMaturityClasses = function (e, t, i) {
+ var n = {};
+ if (void 0 === e) return;
+ let o = i.policies;
+ for (let e = 0; o && e < o.length; e++) {
+ n[o[e].policyName] = o[e].states;
+ }
+ for (let i = 0; i < e.length; i++) {
+ let o = e[i];
+ if (n[o]) {
+ let e = n[o];
+ for (let i = 0; i < e.length; i++) {
+ let n = e[i].activeColor,
+ a =
+ '{color:' +
+ ('#FFFFFF' === n ? '#000000' : '#FFFFFF') +
+ ' ; background-color:' +
+ n +
+ '; cursor:pointer;}',
+ r = this.cleanStatusForCSS(e[i].stateSysName),
+ s =
+ 'lc-status-' +
+ this.cleanStatusForCSS(o) +
+ '-' +
+ r +
+ (t ? '-withClass' : ''),
+ l = '.' + s + (t ? ' .' + t : '');
+ this.createCSSClass(s, a, l);
+ }
+ }
+ }
+ }),
+ (p.download = function (e) {
+ var t = [];
+ u.getDocuments(e).then(function (n) {
+ n.forEach(function (e) {
+ 'TRUE' === e.dataelements.isDocumentType && t.push(e.id);
+ }),
+ t.length < e.length && g.warn(i.CHG_GOV_Download_Skipped),
+ u.download(t);
+ });
+ }),
+ p
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/wrapper/ChgGovTweakerExpandInput',
+ [
+ 'UWA/Core',
+ 'DS/Tweakers/TweakerBase',
+ 'DS/Utilities/Dom',
+ 'DS/Utilities/Utils',
+ 'DS/Core/PointerEvents',
+ 'DS/Utilities/KeyboardUtils',
+ 'DS/ENOChgGovernanceUX/scripts/wrapper/ChgGovExpandInputTextBox',
+ ],
+ function (e, t, i, n, o, a, r) {
+ 'use strict';
+ var s = t.inherit({
+ name: 'TweakerExpandInput',
+ publishedProperties: {
+ displayStyle: {
+ defaultValue: 'TextBox',
+ type: 'string',
+ },
+ value: {
+ defaultValue: '',
+ type: 'string',
+ advancedSetter: !0,
+ },
+ valueType: {
+ defaultValue: 'string',
+ type: 'string',
+ },
+ },
+ computeTweakerContentLength: function () {
+ return this._getCurrentTouchMode() ? 19 : 14;
+ },
+ _upgradeValue: function (e) {
+ return (
+ '1' === e ||
+ 1 === e ||
+ 'true' === e ||
+ !0 === e ||
+ ('0' !== e && 0 !== e && 'false' !== e && !1 !== e && 'undefined')
+ );
+ },
+ }),
+ l = function (e, i) {
+ t.prototype.baseViewModule.call(this, e, i);
+ };
+ n.applyMixin(l, t.prototype.baseViewModule);
+ var c = function (e, t) {
+ l.call(this, e, t);
+ };
+ return (
+ n.applyMixin(c, l),
+ (c.prototype.buildView = function () {
+ var e = this._options.viewOptions || {};
+ (e.escapeHTML = this._tweaker.escapeHTML),
+ (e.touchMode = this._tweaker._getCurrentTouchMode()),
+ (e.disabled = this._tweaker.readOnly),
+ (e.selectAllOnFocus = !0),
+ (e.fireOnlyFromUIInteractionFlag = !0),
+ (e.autoCommitFlag = !0);
+ var t = new r(e);
+ (this._view = t), this.setValue(this._tweaker.value);
+ }),
+ (c.prototype.handleEvents = function () {
+ var e = this,
+ t = this._tweaker,
+ n = this._view;
+ n.addEventListener('buttonclick', function (e) {
+ if (
+ (e.stopPropagation(),
+ document
+ .getElementsByClassName('toolbar-co-div')[0]
+ .getBoundingClientRect().width > 500)
+ )
+ n.createCAContainer.hasClassName('showBox')
+ ? (n.createCAContainer.removeClassName('openBox'),
+ n.createCAContainer.removeClassName('showBox'),
+ n.plusBtn.getContent().removeClassName('icon-blue'))
+ : (n.createCAContainer.addClassName('showBox'),
+ setTimeout(function () {
+ n.createCAContainer.addClassName('openBox');
+ }, 20),
+ n.lineEditor._myInput.focus(),
+ n.plusBtn.getContent().addClassName('icon-blue'));
+ else {
+ n.plusBtn.getContent().removeClassName('icon-blue'),
+ (n.createCAContainer.style.display = 'none');
+ var i = {};
+ (i.top = t.getContent().getBoundingClientRect().bottom),
+ (i.left = t.getContent().getBoundingClientRect().right),
+ (i.zIndex = 40003),
+ document.body.addContent(n.getModalInputBox(i)),
+ n.lineEditor._myInput.focus();
+ }
+ }),
+ n &&
+ t &&
+ (i.addEventOnElement(t, n, 'focus', function (e) {
+ e.stopPropagation();
+ }),
+ i.addEventOnElement(t, n, 'blur', function (e) {
+ e.stopPropagation(), t.onPostEdit();
+ }),
+ i.addEventOnElement(t, n, 'uncommittedChange', function (e) {
+ e.stopPropagation(), t.onPreEdit();
+ }),
+ i.addEventOnElement(t, n.dropdown, 'click', function (e) {
+ e.stopPropagation(),
+ n.createCAContainer.style.setProperty('display', 'none'),
+ n.plusBtn.getContent().removeClassName('icon-blue'),
+ n.createCAContainer.removeClassName('showBox');
+ }),
+ i.addEventOnElement(t, n.lineEditor, 'keydown', function (e) {
+ e.stopPropagation(),
+ e.keyCode === a.ESCAPE && t.onCancelEdit(),
+ e.keyCode === a.ENTER &&
+ ((n.value = n.lineEditor.value),
+ t.keyDownEventCallback &&
+ t.keyDownEventCallback(e, t, n.lineEditor),
+ n.removeModalInputBox());
+ }),
+ i.addEventOnElement(t, n, 'change', function (i) {
+ i.stopPropagation();
+ var o = n.value,
+ a = void 0;
+ (a =
+ null == o
+ ? o
+ : (function (e, t) {
+ switch (e) {
+ case 'integer':
+ var i = parseInt(t, 10);
+ return (
+ isNaN(i) &&
+ ((this.valueType = 'string'),
+ (i = t ? t.toString() : '')),
+ i
+ );
+ case 'number':
+ return (
+ (i = parseFloat(t)),
+ isNaN(i) &&
+ ((this.valueType = 'string'),
+ (i = t ? t.toString() : '')),
+ i
+ );
+ case 'boolean':
+ return null !== /true/i.exec(t) || '1' === t;
+ case 'string':
+ return t ? t.toString() : '';
+ case 'object':
+ return JSON.parse(t);
+ default:
+ return t;
+ }
+ })(t.valueType, o)),
+ e.setTweakerValue(a);
+ }));
+ }),
+ (c.prototype.setValue = function (e) {
+ var t,
+ i,
+ n = this._tweaker,
+ o = this._view;
+ o &&
+ n &&
+ (o.value =
+ null == e
+ ? e
+ : ((t = n.valueType),
+ 'string' == typeof (i = e)
+ ? i
+ : 'object' === t
+ ? JSON.stringify(i)
+ : ('integer' !== t && 'number' !== t) ||
+ !(
+ (Number.isNan && !0 === Number.isNaN(i)) ||
+ (void 0 !== isNaN && !0 === isNaN(i))
+ )
+ ? 'integer' === t || 'number' === t
+ ? i.toString()
+ : i
+ : 'NaN'));
+ }),
+ (s.prototype.baseViewModule = l),
+ (s.prototype.VIEW_MODULES = {
+ TextBox: {
+ classObject: c,
+ },
+ readOnly: {
+ classObject: c,
+ },
+ }),
+ (s.prototype.registerViewModule = function (e, t) {}),
+ (s.prototype.registerkeyDownCallback = function (e) {
+ this.keyDownEventCallback = e;
+ }),
+ s
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgChangeOrderUtil',
+ [
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgGovernanceUX/scripts/view/ChgCODataGridViewToolbar',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgGovernanceUX/scripts/config/ChgGovAppGlobalConfig',
+ 'DS/ENOChangeActionUX/scripts/CAPreferencesManager',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovCommonDelete',
+ 'DS/ENOChgServices/scripts/services/ChgMembersServices',
+ 'DS/ENOChgServices/scripts/services/ChgDataService',
+ 'DS/LifecycleCmd/MaturityCmd',
+ 'DS/Controls/ProgressBar',
+ 'DS/UIKIT/Input/Text',
+ 'DS/UIKIT/Input/Button',
+ 'DS/Notifications/NotificationsManagerUXMessages',
+ 'DS/Notifications/NotificationsManagerViewOnScreen',
+ 'DS/UIKIT/DropdownMenu',
+ 'DS/UIKIT/Dropdown',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgDataGridUtil',
+ 'require',
+ 'DS/ENOChgProbes/scripts/ChgCloudProbeUtils',
+ ],
+ function (e, t, i, n, o, a, r, s, l, c, d, u, g, p, h, m, C, v, f) {
+ 'use strict';
+ var b = Object.create(null);
+ return (
+ (b.getColumns = function () {
+ let e = [];
+ return (
+ e.push(
+ C.getColumnDefinition({
+ dataIndex: 'titleTree',
+ }),
+ ),
+ e.push(
+ C.getColumnDefinition({
+ dataIndex: 'co_name',
+ }),
+ ),
+ e.push(
+ C.getColumnDefinition({
+ dataIndex: 'maturityNLS',
+ }),
+ ),
+ e.push(
+ C.getColumnDefinition({
+ dataIndex: 'severityNLS',
+ }),
+ ),
+ e.push(
+ C.getColumnDefinition({
+ dataIndex: 'ownerFullName',
+ }),
+ ),
+ e.push(
+ C.getColumnDefinition({
+ dataIndex: 'changeCoordinatorFullName',
+ }),
+ ),
+ e.push(
+ C.getColumnDefinition({
+ dataIndex: 'collabspaceNLS',
+ }),
+ ),
+ e.push(
+ C.getColumnDefinition({
+ dataIndex: 'organizationNLS',
+ }),
+ ),
+ e.push(
+ C.getColumnDefinition({
+ dataIndex: 'applicabilityNLS',
+ }),
+ ),
+ e.push(
+ C.getColumnDefinition({
+ dataIndex: 'modificationDate',
+ }),
+ ),
+ e.push(
+ C.getColumnDefinition({
+ dataIndex: 'creationDate',
+ }),
+ ),
+ e
+ );
+ }),
+ (b.getRelationalExplorerMenu = function (t, i) {
+ return {
+ type: 'PushItem',
+ title: e.CHG_GOV_Menu_Relational_Explorer,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-object-related',
+ },
+ action: {
+ callback: function (e) {
+ var t = {
+ commandInfo: {
+ type: 'Change Order',
+ facet: 'Change Orchestration',
+ action: 'CO>Change Orchestration>RMB>Relations',
+ },
+ };
+ f.cloudProbeUtils.genericCommandClickEventForAnalytics({
+ inputJSON: t,
+ }),
+ require([
+ 'DS/ENOChgServices/scripts/services/ChgIDCardCommonServices',
+ ], function (e) {
+ for (
+ var t = i.cellInfos.nodeModel
+ .getTreeDocument()
+ .getSelectedNodes(),
+ n = [],
+ o = 0;
+ o < t.length;
+ o++
+ ) {
+ var a = t[o].options.grid.id;
+ n.push(a);
+ }
+ e.openRelationalExplorer(n);
+ });
+ },
+ },
+ };
+ }),
+ (b.getTransferMenu = function (t, i) {
+ return {
+ type: 'PushItem',
+ title: e.CHG_GOV_Menu_Transfer,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-move-to',
+ },
+ action: {
+ callback: function (e) {
+ var t = {
+ commandInfo: {
+ type: 'Change Order',
+ facet: 'Change Orchestration',
+ action: 'CO>Change Orchestration>RMB>Move',
+ },
+ };
+ f.cloudProbeUtils.genericCommandClickEventForAnalytics({
+ inputJSON: t,
+ });
+ for (
+ var n = i.cellInfos.nodeModel
+ .getTreeDocument()
+ .getSelectedNodes(),
+ o = [],
+ a = 0;
+ a < n.length;
+ a++
+ )
+ o.push(n[a].options.grid);
+ require([
+ 'DS/ENOChgGovernanceUX/scripts/wrapper/ChgGovTransferWrapper',
+ ], function (e) {
+ e.launchTransferDialog(o);
+ });
+ },
+ },
+ };
+ }),
+ (b.getDeleteMenu = function (t, i, n, o) {
+ return {
+ type: 'PushItem',
+ title: e.CHG_GOV_Menu_Delete,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-trash',
+ },
+ action: {
+ callback: function () {
+ var e = {
+ commandInfo: {
+ type: 'Change Order',
+ facet: 'Change Orchestration',
+ action: 'CO>Change Orchestration>RMB>Delete',
+ },
+ };
+ f.cloudProbeUtils.genericCommandClickEventForAnalytics({
+ inputJSON: e,
+ });
+ for (
+ var t = i.cellInfos.nodeModel
+ .getTreeDocument()
+ .getSelectedNodes(),
+ r = [],
+ s = 0;
+ s < t.length;
+ s++
+ ) {
+ var l = t[s],
+ c = {
+ physicalid: l.options.grid.id,
+ nodeName: l.options.grid.name,
+ nodeTitle: l.options.grid.title,
+ };
+ r.push(c);
+ }
+ a.deleteNodes(r, n, o);
+ },
+ },
+ };
+ }),
+ (b.makeCopyLinkObject = function (e) {
+ var t = {
+ protocol: '3DXContent',
+ data: {
+ items: [],
+ },
+ };
+ return (
+ t.data.items.push({
+ envId: i.getGlobalVariable().tenant,
+ objectId: e.id,
+ openLink: !0,
+ }),
+ t
+ );
+ }),
+ (b.showNotification = function (e, t, i, n, o, a, r) {
+ var s = {
+ level: e,
+ title: t,
+ subtitle: i,
+ message: n,
+ sticky: o,
+ allowUnsafeHTML: r || !1,
+ };
+ window.notifs ||
+ ((window.notifs = g), p.setNotificationManager(window.notifs)),
+ a ? p.inject(a) : p.elements.container.isInjected() || p.inject(),
+ window.notifs.addNotif(s);
+ }),
+ (b.changeView = function (i) {
+ if (
+ (widget.body.getDimensions().width <= n.MOBILE_CUTOFF
+ ? o.updateCASummaryViewMobile(i)
+ : o.updateCASummaryViewDesktop(i),
+ 'GridView' == i)
+ )
+ (this.currentView = 'Grid'),
+ (a = t.toolbar.getNodeModelByID('view')) &&
+ 'view-list' != a.options.grid.semantics.icon.iconName &&
+ a.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-list',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_GRID_VIEW,
+ }),
+ (a.options.grid.data.menu[0].state = 'selected'),
+ (a.options.grid.data.menu[1].state = 'unselected'),
+ (r = document.querySelector(
+ '.toolbar-co-div .wux-ui-3ds-view-list',
+ )) && r.addClassName('currentView'),
+ (s = document.querySelector(
+ '.toolbar-co-div .wux-ui-3ds-view-small-tile',
+ )) && s.removeClassName('currentView'),
+ (l = document.querySelector('.cogridView')) &&
+ (l.removeClassName('hideView'),
+ l.removeClassName('nonVisible'),
+ l.addClassName('showView')),
+ (c = document.querySelector('.cotileView')) &&
+ (c.removeClassName('showView'), c.addClassName('hideView'));
+ else if ('TileView' == i) {
+ var a, r, s, l, c;
+ (this.currentView = 'Tile'),
+ (a = t.toolbar.getNodeModelByID('view')) &&
+ 'view-small-tile' != a.options.grid.semantics.icon.iconName &&
+ a.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-small-tile',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_TILE_VIEW,
+ }),
+ (a.options.grid.data.menu[0].state = 'unselected'),
+ (a.options.grid.data.menu[1].state = 'selected'),
+ (r = document.querySelector(
+ '.toolbar-co-div .wux-ui-3ds-view-list',
+ )) && r.removeClassName('currentView'),
+ (s = document.querySelector(
+ '.toolbar-co-div .wux-ui-3ds-view-small-tile',
+ )) && s.addClassName('currentView'),
+ (l = document.querySelector('.cogridView')) &&
+ (l.removeClassName('showView'), l.addClassName('hideView')),
+ (c = document.querySelector('.cotileView')) &&
+ (c.removeClassName('hideView'), c.addClassName('showView'));
+ }
+ }),
+ (b.createCustomSeverity = function (e, t) {
+ var i = 'sevLow wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-level-low';
+ 'Medium' == e
+ ? (i = 'sevMed wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-level-medium')
+ : 'High' == e &&
+ (i = 'sevHigh wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-level-high');
+ var n = new UWA.Element('div', {}),
+ o = new UWA.Element('div', {
+ class: 'gridIconContainer',
+ });
+ UWA.createElement('div', {
+ class: i,
+ }).inject(o);
+ var a = UWA.createElement('span', {
+ html: t,
+ });
+ return o.inject(n), a.inject(n), n.outerHTML;
+ }),
+ (b.createCustomOwner = function (e, t) {
+ var n = '/api/user/getpicture/login/' + t + '/format/normal',
+ o = i.getGlobalVariable().computeSwymUrl(n),
+ a = new UWA.Element('div', {
+ class: 'members',
+ }),
+ s = new UWA.Element('div', {
+ class: 'assignee',
+ }),
+ l = '';
+ if (i.getGlobalVariable().isSwymInstalled)
+ l = UWA.createElement('img', {
+ class: 'userIcon',
+ src: o,
+ });
+ else {
+ var c = r.getAvatarDetails(t);
+ (l = UWA.createElement('div', {
+ html: c.avatarStr,
+ class: 'avatarIcon',
+ })).style.setProperty('background', c.avatarColor);
+ }
+ l.inject(s);
+ var d = UWA.createElement('span', {
+ class: 'userName',
+ html: t,
+ });
+ return s.inject(a), d.inject(a), a.outerHTML;
+ }),
+ (b.filterView = function (e) {
+ if ('activeCO' == e)
+ ((i =
+ t.toolbar.getNodeModelByID(
+ 'filter',
+ )).options.grid.data.menu[0].state = 'selected'),
+ (i.options.grid.data.menu[1].state = 'unselected');
+ else if ('inactiveCO' == e) {
+ var i;
+ ((i =
+ t.toolbar.getNodeModelByID(
+ 'filter',
+ )).options.grid.data.menu[0].state = 'unselected'),
+ (i.options.grid.data.menu[1].state = 'selected');
+ }
+ }),
+ b
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/ChgInActiveCOFilterView',
+ ['UWA/Core', 'DS/ENOChgGovernanceUX/scripts/util/ChgChangeOrderUtil'],
+ function (e, t) {
+ 'use strict';
+ return {
+ filterView: function (e) {
+ require([
+ 'DS/ENOChgGovernanceUX/scripts/view/ChgCODataGridLayout',
+ ], function (e) {
+ e.coGridView.coDatagrid.groupRows({
+ dataIndexesToGroup: [],
+ }),
+ setTimeout(function () {
+ t.filterView('inactiveCO');
+ }, 100);
+ });
+ },
+ };
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/members/util/ChgMembersGridUtil',
+ [
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/members/ChgMembersDataGridViewToolbar',
+ ],
+ function (e, t) {
+ 'use strict';
+ var i = Object.create(null);
+ return (
+ (i.getColumns = function () {
+ return [
+ {
+ text: e.CHG_Member_DataGrid_Column_Name,
+ dataIndex: 'person_name',
+ editableFlag: !1,
+ alwaysVisibleFlag: !0,
+ pinned: 'left',
+ allowUnsafeHTMLContent: !0,
+ width: '200',
+ getCellGroupingKey: function (e) {
+ return e.nodeModel.options.grid.fullName;
+ },
+ },
+ {
+ text: e.CHG_Member_DataGrid_Column_Role,
+ dataIndex: 'roleList',
+ },
+ ];
+ }),
+ (i.changeView = function (i) {
+ if ('GridView' == i)
+ (this.currentView = 'Grid'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-list' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-list',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_GRID_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'selected'),
+ (n.options.grid.data.menu[1].state = 'unselected'),
+ (o = document.querySelector(
+ '.toolbar-member-grid-div .wux-ui-3ds-view-list',
+ )) && o.addClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-member-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.removeClassName('currentView'),
+ (r = document.querySelector('.content-member-grid-div')) &&
+ (r.removeClassName('hideView'),
+ r.removeClassName('nonVisible'),
+ r.addClassName('showView')),
+ (s = document.querySelector('.membertileView')) &&
+ (s.removeClassName('showView'), s.addClassName('hideView'));
+ else if ('TileView' == i) {
+ var n, o, a, r, s;
+ (this.currentView = 'Tile'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-small-tile' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-small-tile',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_TILE_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'unselected'),
+ (n.options.grid.data.menu[1].state = 'selected'),
+ (o = document.querySelector(
+ '.toolbar-member-grid-div .wux-ui-3ds-view-list',
+ )) && o.removeClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-member-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.addClassName('currentView'),
+ (r = document.querySelector('.content-member-grid-div')) &&
+ (r.removeClassName('showView'), r.addClassName('hideView')),
+ (s = document.querySelector('.membertileView')) &&
+ (s.removeClassName('hideView'), s.addClassName('showView'));
+ }
+ }),
+ (i.makeUpdateMemberJson = function (e, t, i, n, o) {
+ var a = {
+ data: [],
+ };
+ if (
+ ('' != t &&
+ a.data.push({
+ updateAction: e,
+ dataelements: {
+ role: 'Coordinator',
+ user: t,
+ list: '',
+ },
+ }),
+ '' != i &&
+ a.data.push({
+ updateAction: e,
+ dataelements: {
+ role: 'Approver',
+ user: '',
+ list: i,
+ },
+ }),
+ '' != n.person)
+ )
+ if ('string' != typeof n.person)
+ for (var r = 0; r < n.person.length; r++) {
+ var s = {
+ updateAction: e,
+ dataelements: {
+ role: 'Follower',
+ user: n.person[r],
+ list: '',
+ },
+ };
+ a.data.push(s);
+ }
+ else
+ a.data.push({
+ updateAction: e,
+ dataelements: {
+ role: 'Follower',
+ user: n.person,
+ list: '',
+ },
+ });
+ if ('' != n.userGroup)
+ if ('string' != typeof n.userGroup)
+ for (r = 0; r < n.userGroup.length; r++) {
+ var l = {
+ updateAction: e,
+ dataelements: {
+ role: 'Follower',
+ user: '',
+ list: n.userGroup[r],
+ },
+ };
+ a.data.push(l);
+ }
+ else
+ a.data.push({
+ updateAction: e,
+ dataelements: {
+ role: 'Follower',
+ user: '',
+ list: n.userGroup,
+ },
+ });
+ if ('' != o.person)
+ if ('string' != typeof o.person)
+ for (r = 0; r < o.person.length; r++) {
+ s = {
+ updateAction: e,
+ dataelements: {
+ role: 'Assignee',
+ user: o.person[r],
+ list: '',
+ },
+ };
+ a.data.push(s);
+ }
+ else
+ a.data.push({
+ updateAction: e,
+ dataelements: {
+ role: 'Assignee',
+ user: o.person,
+ list: '',
+ },
+ });
+ if ('' != o.userGroup)
+ if ('string' != typeof o.userGroup)
+ for (r = 0; r < o.userGroup.length; r++) {
+ l = {
+ updateAction: e,
+ dataelements: {
+ role: 'Assignee',
+ user: '',
+ list: o.userGroup[r],
+ },
+ };
+ a.data.push(l);
+ }
+ else
+ a.data.push({
+ updateAction: e,
+ dataelements: {
+ role: 'Assignee',
+ user: '',
+ list: o.userGroup[r],
+ },
+ });
+ return a;
+ }),
+ i
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeAction/facets/members/util/ChgCAMembersGridUtil',
+ [
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgGovernanceUX/scripts/view/changeAction/facets/members/ChgCAMembersDataGridViewToolbar',
+ ],
+ function (e, t) {
+ 'use strict';
+ var i = Object.create(null);
+ return (
+ (i.getColumns = function () {
+ return [
+ {
+ text: e.CHG_Member_DataGrid_Column_Name,
+ dataIndex: 'person_name',
+ editableFlag: !1,
+ alwaysVisibleFlag: !0,
+ pinned: 'left',
+ allowUnsafeHTMLContent: !0,
+ width: '200',
+ getCellGroupingKey: function (e) {
+ return e.nodeModel.options.grid.fullName;
+ },
+ },
+ {
+ text: e.CHG_Member_DataGrid_Column_Role,
+ dataIndex: 'roleList',
+ },
+ ];
+ }),
+ (i.changeView = function (i) {
+ if ('GridView' == i)
+ (this.currentView = 'Grid'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-list' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-list',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_GRID_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'selected'),
+ (n.options.grid.data.menu[1].state = 'unselected'),
+ (o = document.querySelector(
+ '.toolbar-member-grid-div .wux-ui-3ds-view-list',
+ )) && o.addClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-member-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.removeClassName('currentView'),
+ (r = document.querySelector('.content-member-grid-div')) &&
+ (r.removeClassName('hideView'),
+ r.removeClassName('nonVisible'),
+ r.addClassName('showView')),
+ (s = document.querySelector('.membertileView')) &&
+ (s.removeClassName('showView'), s.addClassName('hideView'));
+ else if ('TileView' == i) {
+ var n, o, a, r, s;
+ (this.currentView = 'Tile'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-small-tile' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-small-tile',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_TILE_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'unselected'),
+ (n.options.grid.data.menu[1].state = 'selected'),
+ (o = document.querySelector(
+ '.toolbar-member-grid-div .wux-ui-3ds-view-list',
+ )) && o.removeClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-member-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.addClassName('currentView'),
+ (r = document.querySelector('.content-member-grid-div')) &&
+ (r.removeClassName('showView'), r.addClassName('hideView')),
+ (s = document.querySelector('.membertileView')) &&
+ (s.removeClassName('hideView'), s.addClassName('showView'));
+ }
+ }),
+ (i.makeUpdateMemberJson = function (e, t, i, n) {
+ var o = {
+ data: [],
+ };
+ if ('' != t.person)
+ if ('string' != typeof t.person)
+ for (var a = 0; a < t.person.length; a++) {
+ let i = {
+ updateAction: e,
+ role: 'contributor',
+ user: t.person[a],
+ list: '',
+ };
+ o.data.push(i);
+ }
+ else
+ o.data.push({
+ updateAction: e,
+ role: 'contributor',
+ user: t.person,
+ list: '',
+ });
+ if ('' != t.userGroup)
+ if ('string' != typeof t.userGroup)
+ for (a = 0; a < t.userGroup.length; a++) {
+ let i = {
+ updateAction: e,
+ role: 'contributor',
+ user: '',
+ list: t.userGroup[a],
+ };
+ o.data.push(i);
+ }
+ else
+ o.data.push({
+ updateAction: e,
+ role: 'contributor',
+ user: '',
+ list: t.userGroup,
+ });
+ if ('' != i.person)
+ if ('string' != typeof i.person)
+ for (a = 0; a < i.person.length; a++) {
+ let t = {
+ updateAction: e,
+ role: 'approver',
+ user: i.person[a],
+ list: '',
+ };
+ o.data.push(t);
+ }
+ else
+ o.data.push({
+ updateAction: e,
+ role: 'approver',
+ user: i.person,
+ list: '',
+ });
+ if (
+ ('' != i.routeTemplate &&
+ o.data.push({
+ updateAction: e,
+ role: 'approver',
+ user: '',
+ list: i.routeTemplate,
+ }),
+ '' != n.person)
+ )
+ if ('string' != typeof n.person)
+ for (a = 0; a < n.person.length; a++) {
+ var r = {
+ updateAction: e,
+ role: 'follower',
+ user: n.person[a],
+ list: '',
+ };
+ o.data.push(r);
+ }
+ else
+ o.data.push({
+ updateAction: e,
+ role: 'follower',
+ user: n.person,
+ list: '',
+ });
+ if ('' != n.userGroup)
+ if ('string' != typeof n.userGroup)
+ for (a = 0; a < n.userGroup.length; a++) {
+ var s = {
+ updateAction: e,
+ role: 'follower',
+ user: '',
+ list: n.userGroup[a],
+ };
+ o.data.push(s);
+ }
+ else
+ o.data.push({
+ updateAction: e,
+ role: 'follower',
+ user: '',
+ list: n.userGroup,
+ });
+ return o;
+ }),
+ (i.getRoleNLSValue = function (t) {
+ let i = '';
+ switch (t) {
+ case 'owner':
+ i = e.CHG_Member_Role_Owner;
+ break;
+ case 'originator':
+ i = e.CHG_Member_Role_Originator;
+ break;
+ case 'coordinator':
+ i = e.CHG_Member_Role_ChangeCoordinator;
+ break;
+ case 'contributor':
+ i = e.CHG_Member_Role_Assignee;
+ break;
+ case 'approver':
+ i = e.CHG_Member_Role_Approver;
+ break;
+ case 'follower':
+ i = e.CHG_Member_Role_Follower;
+ break;
+ default:
+ console.log('NLS is not defined for : ' + t);
+ }
+ return i;
+ }),
+ i
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/members/util/ChgCRMembersGridUtil',
+ [
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/members/ChgCRMembersDataGridViewToolbar',
+ ],
+ function (e, t) {
+ 'use strict';
+ var i = Object.create(null);
+ return (
+ (i.getColumns = function () {
+ return [
+ {
+ text: e.CHG_Member_DataGrid_Column_Name,
+ dataIndex: 'person_name',
+ editableFlag: !1,
+ alwaysVisibleFlag: !0,
+ pinned: 'left',
+ allowUnsafeHTMLContent: !0,
+ width: '200',
+ getCellGroupingKey: function (e) {
+ return e.nodeModel.options.grid.fullName;
+ },
+ },
+ {
+ text: e.CHG_Member_DataGrid_Column_Role,
+ dataIndex: 'roleList',
+ },
+ ];
+ }),
+ (i.changeView = function (i) {
+ if ('GridView' == i)
+ (this.currentView = 'Grid'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-list' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-list',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_GRID_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'selected'),
+ (n.options.grid.data.menu[1].state = 'unselected'),
+ (o = document.querySelector(
+ '.toolbar-member-grid-div .wux-ui-3ds-view-list',
+ )) && o.addClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-member-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.removeClassName('currentView'),
+ (r = document.querySelector('.content-member-grid-div')) &&
+ (r.removeClassName('hideView'),
+ r.removeClassName('nonVisible'),
+ r.addClassName('showView')),
+ (s = document.querySelector('.membertileView')) &&
+ (s.removeClassName('showView'), s.addClassName('hideView'));
+ else if ('TileView' == i) {
+ var n, o, a, r, s;
+ (this.currentView = 'Tile'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-small-tile' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-small-tile',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_TILE_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'unselected'),
+ (n.options.grid.data.menu[1].state = 'selected'),
+ (o = document.querySelector(
+ '.toolbar-member-grid-div .wux-ui-3ds-view-list',
+ )) && o.removeClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-member-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.addClassName('currentView'),
+ (r = document.querySelector('.content-member-grid-div')) &&
+ (r.removeClassName('showView'), r.addClassName('hideView')),
+ (s = document.querySelector('.membertileView')) &&
+ (s.removeClassName('hideView'), s.addClassName('showView'));
+ }
+ }),
+ (i.makeUpdateMemberJson = function (e, t, i, n, o) {
+ var a = {
+ data: [],
+ };
+ if (
+ ('' != t &&
+ a.data.push({
+ updateAction: e,
+ role: 'Coordinator',
+ user: t,
+ list: '',
+ }),
+ '' != i &&
+ a.data.push({
+ updateAction: e,
+ role: 'Approver',
+ user: [],
+ list: i,
+ }),
+ '' != n.person)
+ )
+ if ('string' != typeof n.person)
+ for (var r = 0; r < n.person.length; r++) {
+ var s = {
+ updateAction: e,
+ role: 'Follower',
+ user: n.person[r],
+ list: '',
+ };
+ a.data.push(s);
+ }
+ else
+ a.data.push({
+ updateAction: e,
+ role: 'Follower',
+ user: n.person,
+ list: '',
+ });
+ if ('' != n.userGroup)
+ if ('string' != typeof n.userGroup)
+ for (r = 0; r < n.userGroup.length; r++) {
+ var l = {
+ updateAction: e,
+ role: 'Follower',
+ user: '',
+ list: n.userGroup[r],
+ };
+ a.data.push(l);
+ }
+ else
+ a.data.push({
+ updateAction: e,
+ role: 'Follower',
+ user: '',
+ list: n.userGroup,
+ });
+ if ('' != o.person)
+ if ('string' != typeof o.person)
+ for (r = 0; r < o.person.length; r++) {
+ s = {
+ updateAction: e,
+ role: 'Assignee',
+ user: o.person[r],
+ list: '',
+ };
+ a.data.push(s);
+ }
+ else
+ a.data.push({
+ updateAction: e,
+ role: 'Assignee',
+ user: o.person,
+ list: '',
+ });
+ if ('' != o.userGroup)
+ if ('string' != typeof o.userGroup)
+ for (r = 0; r < o.userGroup.length; r++) {
+ l = {
+ updateAction: e,
+ role: 'Assignee',
+ user: '',
+ list: o.userGroup[r],
+ };
+ a.data.push(l);
+ }
+ else
+ a.data.push({
+ updateAction: e,
+ role: 'Assignee',
+ user: '',
+ list: o.userGroup,
+ });
+ return a;
+ }),
+ (i.getRoleNLSValue = function (t) {
+ let i = '';
+ switch (t) {
+ case 'Owner':
+ i = e.CHG_Member_Role_Owner;
+ break;
+ case 'Originator':
+ i = e.CHG_Member_Role_Originator;
+ break;
+ case 'Coordinator':
+ i = e.CHG_Member_Role_ChangeCoordinator;
+ break;
+ case 'Assignee':
+ i = e.CHG_Member_Role_Assignee;
+ break;
+ case 'Approver':
+ i = e.CHG_Member_Role_Approver;
+ break;
+ case 'Follower':
+ i = e.CHG_Member_Role_Follower;
+ break;
+ default:
+ console.log('NLS is not defined for : ' + t);
+ }
+ return i;
+ }),
+ (i.removeRole = function (e, t) {
+ let i = ',' + t,
+ n = ', ' + t,
+ o = t + ',',
+ a = t + ' ,';
+ return (
+ e.includes(i)
+ ? (e = e.replace(i, ''))
+ : e.includes(n)
+ ? (e = e.replace(n, ''))
+ : e.includes(o)
+ ? (e = e.replace(o, ''))
+ : e.includes(a) && (e = e.replace(a, '')),
+ e
+ );
+ }),
+ i
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgChangeOrderFeaturesUtil',
+ [
+ 'UWA/Core',
+ 'DS/i3DXCompassPlatformServices/OpenWith',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgChangeOrderUtil',
+ 'DS/ENOChgServices/scripts/services/ChgPropertiesServices',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgServices/scripts/services/ChgCustomAttributeService',
+ 'DS/ENOChgServices/scripts/services/ChgDataProcess',
+ 'DS/ENOChgServices/scripts/services/ChgInfraService',
+ 'require',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgDataGridUtil',
+ ],
+ function (e, t, i, n, o, a, r, s, l, c) {
+ 'use strict';
+ return {
+ showRMBMenuOnGrid: function (e, t, a) {
+ return new Promise(function (d, u) {
+ var g = 'false',
+ p = t.cellInfos.nodeModel.getTreeDocument().getSelectedNodes();
+ const h = p.map((e) => e.options.grid.id);
+ p.length > 1 && (g = 'true');
+ var m = [];
+ m.push(n.createPropertyPushItem(h)),
+ m.push(i.getRelationalExplorerMenu(e, t));
+ var C = {
+ objectId: t.cellInfos.nodeModel.options.grid.id,
+ objectType: t.cellInfos.nodeModel.options.grid.type,
+ displayName: t.cellInfos.nodeModel.options.grid.name,
+ displayType: t.cellInfos.nodeModel.options.grid.displayType,
+ facetName: 'dependency',
+ };
+ [].push(C);
+ var v = l('DS/ENOChgServices/scripts/services/ChgDataService'),
+ f = l(
+ 'DS/ENOChgServices/scripts/services/ChgIDCardCommonServices',
+ ),
+ b = null,
+ w = f.openWith(C),
+ D = t.cellInfos.nodeModel.options.grid.isKindOfChangeAction,
+ S = [],
+ y = document.getElementById('outer-co-div');
+ 'false' == g &&
+ (S.push(w),
+ (b =
+ 1 == D
+ ? f.getUserAccess(
+ 'pid:' + t.cellInfos.nodeModel.options.grid.id,
+ )
+ : v.getChangeOrderUserAccess(
+ t.cellInfos.nodeModel.options.grid.id,
+ )),
+ S.push(b));
+ let _ = null;
+ if (a) {
+ var E = l(
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/changeOrchestration/ChgOrchestrationDataGridLayout',
+ );
+ _ = E.removeDeletedNodesUsingIDs;
+ } else {
+ var O = l(
+ 'DS/ENOChgGovernanceUX/scripts/view/ChgCODataGridLayout',
+ );
+ _ = O.removeDataFromGrid;
+ }
+ Promise.all(S).then(function (n) {
+ if ((n[0] && m.push(n[0]), 'false' == g && 1 == D)) {
+ var a = n[1].userAccess;
+ (a = r.processAccessBitCO(a)),
+ ((n[1] && 'true' == a.Promote) || 'true' == a.Demote) &&
+ m.push(c.getMaturityMenu(t)),
+ m.push(s.getCopyLink(p)),
+ n[1] &&
+ 'true' == a.TransferOwnership &&
+ m.push(i.getTransferMenu(e, t)),
+ n[1] &&
+ 'true' == a.Delete &&
+ m.push(i.getDeleteMenu(e, t, y, _));
+ } else if ('false' == g) {
+ a = n[1].data[0].dataelements;
+ (a = r.processAccessBitCO(a)),
+ ((n[1] && 'true' == a.Promote) || 'true' == a.Demote) &&
+ m.push(c.getMaturityMenu(t)),
+ m.push(s.getCopyLink(p)),
+ n[1] &&
+ 'true' == a.TransferOwnership &&
+ m.push(i.getTransferMenu(e, t)),
+ n[1] &&
+ 'true' == a.Delete &&
+ m.push(i.getDeleteMenu(e, t, y, _));
+ } else
+ 'true' == o.getGlobalVariable().isFullLicence &&
+ m.push(c.getMaturityMenu(t)),
+ m.push(s.getCopyLink(p)),
+ m.push(i.getTransferMenu(e, t)),
+ 'true' == o.getGlobalVariable().isFullLicence &&
+ m.push(i.getDeleteMenu(e, t, y, _));
+ d(m);
+ });
+ });
+ },
+ createCustomColumn: function (e) {
+ let t = this;
+ return new Promise(function (e, i) {
+ let n = o.getGlobalVariable().changeOrderSubTypes;
+ a.getCombinedClassList(n).then(function (i) {
+ a.getPropertyForClassGrid(i).then(function (i) {
+ let n = a.makeCombinedColumnList(i),
+ o = t.filterColumn(n);
+ e(o);
+ });
+ });
+ });
+ },
+ filterColumn: function (e) {
+ console.log('filterColumn...............');
+ let t = this,
+ i = [],
+ n = [
+ 'ds6w:label',
+ 'ds6w:severity',
+ 'ds6w:status',
+ 'ds6w:type',
+ 'ds6w:identifier',
+ 'ds6w:responsible',
+ 'ds6w:project',
+ 'ds6w:changeCoordinator',
+ 'ds6w:organizationResponsible',
+ 'ds6w:modified',
+ 'ds6w:created',
+ ];
+ for (let t of n) e.delete(t);
+ return (
+ e.forEach((e, n, o) => {
+ let a = t.createColumnDefination(e, n);
+ i.push(a);
+ }),
+ i
+ );
+ },
+ createColumnDefination: function (e, t) {
+ e.dataType.replace('http://www.w3.org/2001/XMLSchema#', '');
+ let i = e.dataType.replace('http://www.w3.org/2001/XMLSchema#', '');
+ return {
+ text: e.vocabColumnsNameNLS,
+ dataIndex: t,
+ editableFlag: !1,
+ allowUnsafeHTMLContent: !1,
+ visibleFlag: !1,
+ dataType: i,
+ range: e.range,
+ getCellTypeRepresentation: function (e) {
+ return null != e.cellModel ? 'string' : 'functionIcon';
+ },
+ getCellSemantics: function (e) {
+ if (null != e.cellModel);
+ else if ('undefined' == e.cellModel || null == e.cellModel)
+ return {
+ icon: {
+ iconName: 'reload wux-ui-3ds-spin',
+ fontIconFamily: WUXManagedFontIcons.Font3DS,
+ },
+ };
+ },
+ getCellValue: r.getGetCellValueFunction(i, t),
+ };
+ },
+ };
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovWidgetPreferenceManager',
+ ['DS/ENOChgGovernanceUX/scripts/util/ChgGovPreferenceConstant'],
+ function (e) {
+ 'use strict';
+ var t = function () {};
+ return (
+ (t._KEY = e._KEY),
+ (t._LAST_ROUTE = e._LAST_ROUTE),
+ (t._MY_CHANGE_ORDERS = e._MY_CHANGE_ORDERS),
+ (t._RECENTLY_OPENED = e._RECENTLY_OPENED),
+ (t.prototype.initWidgetViewPreferences = function () {
+ if (!widget.getValue(t._KEY)) {
+ widget.setValue(
+ t._KEY,
+ JSON.stringify({
+ 'xchange-app': {
+ model: {
+ 'id-card': {},
+ 'orchestration-level1': {},
+ 'orchestration-level2': {},
+ 'orchestration-level3': {},
+ },
+ 'last-route': {},
+ 'xchange-views-preferences': {
+ 'info-panel': {
+ 'info-open': '',
+ 'info-context': '',
+ 'info-width': '',
+ },
+ 'xchange-my-change-orders': {
+ 'xchange-list-view': {
+ view: '',
+ filterview: '',
+ sort: {},
+ search: '',
+ selections: [],
+ filters: {},
+ tagFilter: {},
+ },
+ },
+ 'xchange-change-orders-details': {
+ tab: '',
+ },
+ 'xchange-change-requests-details': {
+ tab: '',
+ },
+ 'xchange-change-actions-details': {
+ tab: '',
+ },
+ 'xchange-recently-opened': {
+ objectIDs: '',
+ },
+ },
+ },
+ }),
+ );
+ }
+ }),
+ (t.prototype.updateWidgetViewPreferences = function (e, i) {
+ if (this.isPath(e, !1)) {
+ var n = JSON.parse(widget.getValue(t._KEY)),
+ o = JSON.parse(JSON.stringify(e));
+ widget.setValue(
+ t._KEY,
+ JSON.stringify(this.recursiveSearch(n, o, i, !0)),
+ );
+ }
+ }),
+ (t.prototype.recursiveSearch = function (e, t, i, n) {
+ return (
+ n && 2 == t.length
+ ? (e[t[0]][t[1]] = i)
+ : 2 == t.length
+ ? (e[t[1]] = i)
+ : n
+ ? this.recursiveSearch(e[t[0]], t, i, !1)
+ : (t.shift(), this.recursiveSearch(e[t[0]], t, i, !1)),
+ e
+ );
+ }),
+ (t.prototype.isPath = function (e, i) {
+ try {
+ var n = widget.getValue(t._KEY);
+ if (n) {
+ if (Array.isArray(e)) {
+ for (var o = JSON.parse(n), a = 0; a < e.length; a++) {
+ if (void 0 === o[e[a]] && '' != o[e[a]])
+ return (
+ console.log(
+ "xChangeWidgetPreferencesManager isPath() path doesn't exist",
+ ),
+ !!i && void 0
+ );
+ o = o[e[a]];
+ }
+ return !i || o;
+ }
+ return (
+ console.log(
+ 'xChangeWidgetPreferencesManager isPath() parameter 1 is not a Array',
+ ),
+ !!i && void 0
+ );
+ }
+ return (
+ console.log(
+ 'xChangeWidgetPreferencesManager isPath() widgetPreferences not initialize',
+ ),
+ !!i && void 0
+ );
+ } catch (e) {
+ return console.error(e), !!i && void 0;
+ }
+ }),
+ (t.prototype.getValue = function (e) {
+ return this.isPath(e, !0);
+ }),
+ t
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/changeOrchestration/util/ChgCROrchestrationGridContextualMenu',
+ [
+ 'UWA/Core',
+ 'DS/i3DXCompassPlatformServices/OpenWith',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovCommonDelete',
+ 'DS/ENOChgServices/scripts/services/ChgPropertiesServices',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgServices/scripts/services/ChgDataService',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/LifecycleCmd/MaturityCmd',
+ 'DS/UIKIT/Input/Text',
+ 'DS/UIKIT/Input/Button',
+ 'DS/Notifications/NotificationsManagerUXMessages',
+ 'DS/Notifications/NotificationsManagerViewOnScreen',
+ 'DS/UIKIT/DropdownMenu',
+ 'DS/UIKIT/Dropdown',
+ 'DS/ENOChgServices/scripts/services/ChgCustomAttributeService',
+ 'DS/ENOChgServices/scripts/services/ChgInfraService',
+ 'require',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgDataGridUtil',
+ 'DS/ENOChgProbes/scripts/ChgCloudProbeUtils',
+ ],
+ function (e, t, i, n, o, a, r, s, l, c, d, u, g, p, h, m, C, v, f) {
+ 'use strict';
+ var b = {
+ showRMBMenuOnGrid: function (e, t, i) {
+ return new Promise(function (i, o) {
+ var a = 'false',
+ r = t.cellInfos.nodeModel.getTreeDocument().getSelectedNodes();
+ r.length > 1 && (a = 'true');
+ var s = [];
+ const l = r.map((e) => e.options.grid.id);
+ s.push(n.createPropertyPushItem(l)),
+ s.push(b.getRelationalExplorerMenu(t)),
+ s.push(m.getCopyLink(r));
+ var c = {
+ objectId: t.cellInfos.nodeModel.options.grid.id,
+ objectType: t.cellInfos.nodeModel.options.grid.type,
+ displayName: t.cellInfos.nodeModel.options.grid.name,
+ displayType: t.cellInfos.nodeModel.options.grid.displayType,
+ facetName: 'dependency',
+ };
+ [].push(c);
+ var d = C('DS/ENOChgServices/scripts/services/ChgDataService'),
+ u = C(
+ 'DS/ENOChgServices/scripts/services/ChgIDCardCommonServices',
+ ),
+ g = C(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/changeOrchestration/ChgCROrchestrationDataGridLayout',
+ ),
+ p = null,
+ h = u.openWith(c),
+ f = t.cellInfos.nodeModel.options.grid.isKindOfChangeAction,
+ w = t.cellInfos.nodeModel.options.grid.isKindOfChangeRequest,
+ D = [],
+ S = document.getElementById('outer-co-div');
+ 'false' == a && D.push(h),
+ 'false' == a &&
+ ((p =
+ 1 == f
+ ? u.getUserAccess(
+ 'pid:' + t.cellInfos.nodeModel.options.grid.id,
+ )
+ : 1 == w
+ ? d.getChangeRequestUserAccess(
+ t.cellInfos.nodeModel.options.grid.id,
+ )
+ : d.getChangeOrderUserAccess(
+ t.cellInfos.nodeModel.options.grid.id,
+ )),
+ D.push(p)),
+ Promise.all(D).then(function (n) {
+ n[0] && s.push(n[0]),
+ s.push(v.getMaturityMenu(t)),
+ 'false' == a && 1 == f
+ ? (n[1] &&
+ 'true' == n[1].userAccess.Transfer &&
+ s.push(b.getTransferMenu(t)),
+ n[1] &&
+ 'true' == n[1].userAccess.Delete &&
+ s.push(
+ b.getDeleteMenu(
+ e,
+ t,
+ S,
+ g.removeDeletedNodesUsingIDs,
+ ),
+ ))
+ : 'false' == a
+ ? (n[1] &&
+ 'true' == n[1].data[0].dataelements.TransferOwnership &&
+ s.push(b.getTransferMenu(t)),
+ n[1] &&
+ 'true' == n[1].data[0].dataelements.Delete &&
+ s.push(
+ b.getDeleteMenu(
+ e,
+ t,
+ S,
+ g.removeDeletedNodesUsingIDs,
+ ),
+ ))
+ : (s.push(b.getTransferMenu(t)),
+ s.push(
+ b.getDeleteMenu(e, t, S, g.removeDeletedNodesUsingIDs),
+ )),
+ i(s);
+ });
+ });
+ },
+ getRelationalExplorerMenu: function (e) {
+ return {
+ type: 'PushItem',
+ title: o.CHG_GOV_Menu_Relational_Explorer,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-object-related',
+ },
+ action: {
+ callback: function (t) {
+ var i = {
+ commandInfo: {
+ type: 'Change Request',
+ facet: 'Change Orchestration',
+ action: 'CR>Change Orchestration>RMB>Relations',
+ },
+ };
+ f.cloudProbeUtils.genericCommandClickEventForAnalytics({
+ inputJSON: i,
+ }),
+ require([
+ 'DS/ENOChgServices/scripts/services/ChgIDCardCommonServices',
+ ], function (t) {
+ for (
+ var i = e.cellInfos.nodeModel
+ .getTreeDocument()
+ .getSelectedNodes(),
+ n = [],
+ o = 0;
+ o < i.length;
+ o++
+ ) {
+ var a = i[o].options.grid.id;
+ n.push(a);
+ }
+ t.openRelationalExplorer(n);
+ });
+ },
+ },
+ };
+ },
+ getTransferMenu: function (e) {
+ return {
+ type: 'PushItem',
+ title: o.CHG_GOV_Menu_Transfer,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-move-to',
+ },
+ action: {
+ callback: function (t) {
+ var i = {
+ commandInfo: {
+ type: 'Change Request',
+ facet: 'Change Orchestration',
+ action: 'CR>Change Orchestration>RMB>Move',
+ },
+ };
+ f.cloudProbeUtils.genericCommandClickEventForAnalytics({
+ inputJSON: i,
+ });
+ for (
+ var n = e.cellInfos.nodeModel
+ .getTreeDocument()
+ .getSelectedNodes(),
+ o = [],
+ a = 0;
+ a < n.length;
+ a++
+ )
+ o.push(n[a].options.grid);
+ require([
+ 'DS/ENOChgGovernanceUX/scripts/wrapper/ChgGovTransferWrapper',
+ ], function (e) {
+ e.launchTransferDialog(o);
+ });
+ },
+ },
+ };
+ },
+ getDeleteMenu: function (e, t, n, a) {
+ return {
+ type: 'PushItem',
+ title: o.CHG_GOV_Menu_Delete,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-trash',
+ },
+ action: {
+ callback: function () {
+ var o = {
+ commandInfo: {
+ type: 'Change Request',
+ facet: 'Change Orchestration',
+ action: 'CR>Change Orchestration>RMB>Delete',
+ },
+ };
+ f.cloudProbeUtils.genericCommandClickEventForAnalytics({
+ inputJSON: o,
+ });
+ for (
+ var r = t.cellInfos.nodeModel
+ .getTreeDocument()
+ .getSelectedNodes(),
+ s = [],
+ l = 0;
+ l < r.length;
+ l++
+ ) {
+ var c = r[l],
+ d = {
+ physicalid: c.options.grid.id,
+ nodeName: c.options.grid.name,
+ nodeTitle: c.options.grid.title,
+ };
+ s.push(d);
+ }
+ i.deleteNodes(s, n, a, e);
+ },
+ },
+ };
+ },
+ makeCopyLinkObject: function (e) {
+ var t = {
+ protocol: '3DXContent',
+ data: {
+ items: [],
+ },
+ };
+ return (
+ t.data.items.push({
+ envId: r.getGlobalVariable().tenant,
+ objectId: e.id,
+ openLink: !0,
+ }),
+ t
+ );
+ },
+ showNotification: function (e, t, i, n, o, a, r) {
+ var s = {
+ level: e,
+ title: t,
+ subtitle: i,
+ message: n,
+ sticky: o,
+ allowUnsafeHTML: r || !1,
+ };
+ window.notifs ||
+ ((window.notifs = d), u.setNotificationManager(window.notifs)),
+ a ? u.inject(a) : u.elements.container.isInjected() || u.inject(),
+ window.notifs.addNotif(s);
+ },
+ createCustomColumn: function (e) {
+ let t = this;
+ return new Promise(function (e, i) {
+ let n = r.getGlobalVariable().changeActionSubTypes,
+ o = [...r.getGlobalVariable().changeOrderSubTypes, ...n];
+ h.getCombinedClassList(o).then(function (i) {
+ h.getPropertyForClassGrid(i).then(function (i) {
+ let n = h.makeCombinedColumnList(i),
+ o = t.filterColumn(n);
+ e(o);
+ });
+ });
+ });
+ },
+ filterColumn: function (e) {
+ let t = this,
+ i = [],
+ n = [
+ 'ds6w:label',
+ 'ds6w:severity',
+ 'ds6w:status',
+ 'ds6w:type',
+ 'ds6w:identifier',
+ 'ds6w:responsible',
+ 'ds6w:project',
+ ];
+ for (let t of n) for (let i of e) i.delete(t);
+ for (let n of e)
+ return (
+ n.forEach((e, n, o) => {
+ let a = t.createColumnDefination(e, n);
+ i.push(a);
+ }),
+ i
+ );
+ },
+ createColumnDefination: function (e, t) {
+ e.dataType.replace('http://www.w3.org/2001/XMLSchema#', '');
+ let i = e.dataType.replace('http://www.w3.org/2001/XMLSchema#', '');
+ return {
+ text: e.vocabColumnsNameNLS,
+ dataIndex: t,
+ editableFlag: !1,
+ allowUnsafeHTMLContent: !1,
+ visibleFlag: !1,
+ dataType: i,
+ range: e.range,
+ getCellTypeRepresentation: function (e) {
+ return null != e.cellModel ? 'string' : 'functionIcon';
+ },
+ getCellSemantics: function (e) {
+ if (null != e.cellModel);
+ else if ('undefined' == e.cellModel || null == e.cellModel)
+ return {
+ icon: {
+ iconName: 'reload wux-ui-3ds-spin',
+ fontIconFamily: WUXManagedFontIcons.Font3DS,
+ },
+ };
+ },
+ getCellValue: function (e, i) {
+ return e.nodeModel.getAttributeValue(t);
+ },
+ };
+ },
+ };
+ return b;
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/components/propertiesView/ChgGovPropertiesPanel',
+ [
+ 'DS/Utilities/Utils',
+ 'DS/EditPropWidget/EditPropWidget',
+ 'DS/EditPropWidget/constants/EditPropConstants',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgGovernanceUX/scripts/components/propertiesView/ChgGovPropertiesServices',
+ 'DS/ENOChgGovernanceUX/scripts/components/propertiesView/ChgPropertiesPanelTab',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ ],
+ function (e, t, i, n, o, a, r) {
+ 'use strict';
+
+ function s() {
+ var e = o.getpropOptions(i);
+ this._informationPanel = new t(e);
+ }
+ return (
+ (s.prototype.start = function (e) {
+ if (
+ (this.setState(e.objectInfo), e.facets && Array.isArray(e.facets))
+ ) {
+ this._informationPanel.addFacets(e.facets);
+ var t = [];
+ e.facets.includes(i.FACET_RELATIONS) || t.push(i.FACET_RELATIONS),
+ t.length > 0 && this._informationPanel.removeFacets(t);
+ }
+ if (
+ (this._informationPanel.initDatas(this.getPropertyModels()),
+ e.container)
+ )
+ this._informationPanel.elements.container.inject(e.container);
+ else {
+ var n = document.querySelectorAll('.gov-triptych-wrapper');
+ let e = document.querySelector('.secondmainContainer-sidepanel');
+ if (
+ (e ||
+ (e = new UWA.Element('div', {
+ class: 'secondmainContainer-sidepanel',
+ })),
+ n)
+ ) {
+ if (n[1].children.length > 0)
+ for (var o = n[1].children, a = 0; a < o.length; a++)
+ o[0].destroy();
+ this._informationPanel.elements.container.inject(n[1]),
+ e.inject(n[1]);
+ } else
+ this._informationPanel.elements.container.inject(widget.body),
+ e.inject(widget.body);
+ }
+ this.reRender = function () {
+ let e = void 0,
+ t = this.getSate();
+ Array.isArray(t) &&
+ t.length > 0 &&
+ UWA.is(t[0].facetSelect) &&
+ (e = t[0].facetSelect),
+ this._informationPanel.initDatas(this.getPropertyModels(), e),
+ this._informationPanel.elements.container.onResize();
+ };
+ }),
+ (s.prototype.setState = function (e, t) {
+ var i = this;
+ if (
+ ((this._currentSelection = Array.isArray(e) ? e : []),
+ 0 != e.length)
+ ) {
+ var n = e[0].type;
+ a.addAllFacet(i._informationPanel, e),
+ a.hideFacet(i._informationPanel),
+ a.updateFacetOnSelection(
+ n,
+ i._currentSelection,
+ i._informationPanel,
+ ),
+ 'ChangeOrder' == n &&
+ 'false' == r.getGlobalVariable().isFullLicence &&
+ 'false' == r.getGlobalVariable().isDerivativeLicense &&
+ this._informationPanel.setReadonlyStatus(!0),
+ 'ChangeAnalysis' === n
+ ? a.getUpdateIMpactAnalysisFacet(e).then(function (e) {
+ t && i.reRender();
+ })
+ : t && this.reRender();
+ } else t && this.reRender();
+ }),
+ (s.prototype.changeSequence = function (e) {
+ for (
+ var t = 0;
+ t < this._informationPanel.elements.container._lFacets.length;
+ t++
+ ) {
+ var i = this._informationPanel.elements.container._lFacets[t];
+ if (i.facet.name === e) {
+ for (
+ var n = t;
+ n <
+ this._informationPanel.elements.container._lFacets.length - 1;
+ n++
+ )
+ this._informationPanel.elements.container._lFacets[n] =
+ this._informationPanel.elements.container._lFacets[n + 1];
+ this._informationPanel.elements.container._lFacets[
+ this._informationPanel.elements.container._lFacets.length - 1
+ ] = i;
+ }
+ }
+ }),
+ (s.prototype.getSate = function () {
+ return this._currentSelection;
+ }),
+ (s.prototype.getPropertyModels = function () {
+ return o.getPropModel(this.getSate());
+ }),
+ (s.prototype.resizePropertiesPanel = function () {
+ this._informationPanel.onResize();
+ }),
+ s
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/util/Chg3DSpaceInfoPanel',
+ [
+ 'DS/ENOChgGovernanceUX/scripts/util/Chg3DSpaceSlideIn',
+ 'DS/ENOChgGovernanceUX/scripts/components/propertiesView/ChgGovPropertiesPanel',
+ 'DS/ENOChgGovernanceUX/scripts/components/propertiesView/ChgPropertiesPanelTab',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ ],
+ function (e, t, i, n, o) {
+ 'use strict';
+ let a = {
+ slideinview: '',
+ slideInContainer: '',
+ parentContainer: '',
+ modelEvents: null,
+ setContainersForSlideIn: ({
+ contextDetails: t,
+ infoPanelContainer: i,
+ target: o,
+ modelEvents: r,
+ }) => {
+ (a.slideInContainer = i), (a.parentContainer = o);
+ let s = UWA.createElement('div', {
+ id: 'emptyInitInfoPanel',
+ styles: {
+ position: 'absolute',
+ top: '50%',
+ left: '50%',
+ transform: 'translate(-50%,-50%)',
+ },
+ html: n.CHG_GOV_Empty_InfoPanel3DSpace_PlaceHolder,
+ });
+ (a.slideinview = new e(a.slideInContainer, a.parentContainer, s)),
+ a.slideinview.buildSlideIn(),
+ (a.modelEvents = r),
+ r.subscribe(
+ {
+ event: 'update-property-panel-data',
+ },
+ function (e) {
+ if (
+ e.context &&
+ e.context.getTreeDocument() &&
+ e.context.getTreeDocument().getSelectedNodes().length > 0
+ ) {
+ a.slideinview.content = '';
+ let t = e.context.getTreeDocument().getSelectedNodes(),
+ i = a.createJsonForInfoPanel(t);
+ a.launchPropertyPanel(i);
+ } else {
+ let t = {
+ physicalId: e.PhysicalID,
+ metatype: 'businessobject',
+ type: e.type,
+ modelEvents: a.modelEvents,
+ },
+ i = [];
+ i.push(t), a.launchPropertyPanel(i);
+ }
+ },
+ ),
+ r.publish({
+ event: 'update-property-panel-data',
+ data: {
+ PhysicalID: t.id,
+ type: t.isKindOfType,
+ },
+ });
+ },
+ createSlidein: () => {
+ a.slideinview.showSlideIn();
+ },
+ launchPropertyPanel: (e) => {
+ if (a.propertyCmp) {
+ o.getGlobalVariable().lastSelectedInfoType != e[0].type &&
+ (i.hideFacet(a.propertyCmp._informationPanel),
+ (o.getGlobalVariable().lastSelectedInfoType = e[0].type));
+ var n = e;
+ a.propertyCmp.setState(n, !0);
+ } else {
+ var r = {
+ objectInfo: e,
+ container: a.slideInContainer.getElement('#slideInBody'),
+ },
+ s = new t();
+ s.start(r),
+ (a.propertyCmp = s),
+ (o.getGlobalVariable().lastSelectedInfoType = e[0].type);
+ }
+ },
+ createJsonForInfoPanel: function (e) {
+ let t = [];
+ for (let i = 0; i < e.length; i++) {
+ let n = {
+ physicalId: e[i].options.grid.id,
+ metatype: 'businessobject',
+ type: e[i].options.grid.isKindOfType,
+ modelEvents: a.modelEvents,
+ };
+ t.push(n);
+ }
+ return t;
+ },
+ };
+ return a;
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/changeOrchestration/ChgCROrchestrationDataGridViewToolbar',
+ [
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgGovernanceUX/scripts/util/Chg3DSpaceInfoPanel',
+ ],
+ function (e, t, i) {
+ var n = Object.create(null);
+ return (
+ (n.toolbar = null),
+ (n.createData = {
+ menu: [
+ {
+ type: 'PushItem',
+ title: e.CHG_GOV_ChangeOrchestration_Toolbar_NewChangeRequest,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/changeOrchestration/ChgCROrchestrationDataGridLayout',
+ func: 'createChangeRequestInContext',
+ },
+ tooltip: e.CHG_GOV_ChangeOrchestration_Toolbar_NewChangeRequest,
+ },
+ {
+ type: 'PushItem',
+ title: e.CHG_GOV_ChangeOrchestration_Toolbar_NewChangeOrder,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/changeOrchestration/ChgCROrchestrationDataGridLayout',
+ func: 'createChangeOrderInContext',
+ },
+ tooltip: e.CHG_GOV_ChangeOrchestration_Toolbar_NewChangeOrder,
+ },
+ {
+ type: 'PushItem',
+ title: e.CHG_GOV_ChangeOrchestration_Toolbar_AddExisting,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/changeOrchestration/ChgCROrchestrationDataGridLayout',
+ func: 'addExistingHandler',
+ },
+ tooltip: e.CHG_GOV_ChangeOrchestration_Toolbar_AddExisting,
+ },
+ ],
+ }),
+ (n.viewData = {
+ menu: [
+ {
+ type: 'CheckItem',
+ title: e.CHG_TOOLTIP_GRID_VIEW,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-view-list',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/changeOrchestration/ChgCROrchestrationDataGridLayout',
+ func: 'changeView',
+ },
+ tooltip: e.CHG_TOOLTIP_GRID_VIEW,
+ },
+ {
+ type: 'CheckItem',
+ title: e.CHG_TOOLTIP_TILE_VIEW,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-view-small-tile',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/changeOrchestration/ChgCROrchestrationTileViewLayout',
+ func: 'changeView',
+ },
+ tooltip: e.CHG_TOOLTIP_TILE_VIEW,
+ },
+ ],
+ }),
+ (n.writetoolbarDefinition = function (n) {
+ 'false' === t.getGlobalVariable().isFullLicence &&
+ 'false' === t.getGlobalVariable().isDerivativeLicense &&
+ this.createData.menu.splice(1, 1);
+ var o = {
+ entries: [
+ {
+ id: 'create',
+ dataElements: {
+ typeRepresentation: 'addDropdown',
+ icon: {
+ iconName: 'plus',
+ fontIconFamily: 1,
+ },
+ value: this.createData,
+ },
+ position: 'far',
+ category: 'Create',
+ },
+ {
+ id: 'MergeCA',
+ dataElements: {
+ typeRepresentation: 'functionIcon',
+ icon: {
+ iconName: 'merge',
+ fontIconFamily: 1,
+ },
+ tooltip: e.CHG_TOOLTIP_MERGE_CA,
+ position: 'far',
+ disabled: !0,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/changeOrchestration/ChgCROrchestrationDataGridLayout',
+ func: 'mergeChangeAction',
+ },
+ },
+ },
+ {
+ id: 'remove',
+ dataElements: {
+ typeRepresentation: 'functionIcon',
+ icon: {
+ iconName: 'remove',
+ fontIconFamily: 1,
+ },
+ tooltip: e.CHG_GOV_ChangeOrchestration_Toolbar_Remove,
+ position: 'far',
+ disabled: !0,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/changeOrchestration/ChgCROrchestrationDataGridLayout',
+ func: 'removeHandler',
+ },
+ },
+ },
+ {
+ id: 'delete',
+ dataElements: {
+ typeRepresentation: 'functionIcon',
+ icon: {
+ iconName: 'trash',
+ fontIconFamily: 1,
+ },
+ tooltip: e.CHG_GOV_ChangeOrchestration_Toolbar_Delete,
+ position: 'far',
+ disabled: !0,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/changeOrchestration/ChgCROrchestrationDataGridLayout',
+ func: 'deleteHandler',
+ },
+ },
+ },
+ {
+ id: 'view',
+ dataElements: {
+ typeRepresentation: 'addDropdown',
+ icon: {
+ iconName: 'view-legacy-thb',
+ fontIconFamily: 1,
+ },
+ value: this.viewData,
+ },
+ position: 'far',
+ category: 'View',
+ },
+ ],
+ };
+ if (t.getGlobalVariable().is3DSpace) {
+ i.setContainersForSlideIn(n);
+ o.entries.unshift({
+ id: 'infoPanel',
+ dataElements: {
+ typeRepresentation: 'functionIcon',
+ icon: {
+ iconName: 'info',
+ fontIconFamily: 1,
+ },
+ category: '3dspace',
+ },
+ position: 'far',
+ tooltip: 'Information',
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/util/Chg3DSpaceInfoPanel',
+ func: 'createSlidein',
+ },
+ });
+ }
+ return o;
+ }),
+ n
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/ChgCRImpactAnalysisViewToolbar',
+ [
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgGovernanceUX/scripts/util/Chg3DSpaceInfoPanel',
+ ],
+ function (e, t, i) {
+ var n = Object.create(null);
+ return (
+ (n.toolbar = null),
+ (n.viewData = {
+ menu: [
+ {
+ type: 'CheckItem',
+ title: e.CHG_TOOLTIP_GRID_VIEW,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-view-list',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/ChgCRImpactAnalysisDataGridLayout',
+ func: 'changeView',
+ },
+ tooltip: e.CHG_TOOLTIP_GRID_VIEW,
+ },
+ {
+ type: 'CheckItem',
+ title: e.CHG_TOOLTIP_TILE_VIEW,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-view-small-tile',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/ChgCRImpactAnalysisTileViewLayout',
+ func: 'changeView',
+ },
+ tooltip: e.CHG_TOOLTIP_TILE_VIEW,
+ },
+ ],
+ }),
+ (n.filterData = {
+ menu: [
+ {
+ type: 'CheckItem',
+ title: e.CHG_Filter_ActiveIA,
+ state: 'selected',
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/ChgCRImpactAnalysisDataGridLayout',
+ func: 'filterActiveView',
+ },
+ tooltip: e.CHG_Filter_ActiveIA_Def,
+ },
+ {
+ type: 'CheckItem',
+ title: e.CHG_Filter_InactiveIA,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/ChgCRImpactAnalysisDataGridLayout',
+ func: 'filterInActiveView',
+ },
+ tooltip: e.CHG_Filter_InactiveIA_Def,
+ },
+ {
+ type: 'CheckItem',
+ title: e.CHG_Filter_RolledUpIA,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/ChgCRImpactAnalysisDataGridLayout',
+ func: 'filterRolledUpView',
+ },
+ tooltip: e.CHG_Filter_RolledUpIA_Def,
+ },
+ ],
+ }),
+ (n.writetoolbarDefinition = function (n) {
+ let o = !0;
+ o = !(
+ !n.contextDetails.accessBits ||
+ 'true' != n.contextDetails.accessBits.ManageChangeAnalysis
+ );
+ var a = {
+ entries: [
+ {
+ id: 'IADispatchMenu',
+ dataElements: {
+ typeRepresentation: 'sortingdropdown',
+ icon: {
+ iconName: 'graph-egraph-down',
+ fontIconFamily: 1,
+ },
+ visibleFlag: !t.getGlobalVariable().is3DSpace && o,
+ value: {
+ menu: [
+ {
+ type: 'PushItem',
+ title: e.CHG_GOV_ImpactAnalysis_Toolbar_DispatchToNew,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/ChgCRImpactAnalysisDataGridLayout',
+ func: 'dispatchToNewSubCRDialog',
+ argument: {
+ contextCRId: n.contextDetails.id,
+ },
+ },
+ tooltip:
+ e.CHG_GOV_ImpactAnalysis_Toolbar_DispatchToNewSubCR,
+ },
+ {
+ type: 'PushItem',
+ title:
+ e.CHG_GOV_ImpactAnalysis_Toolbar_DispatchToExisting,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/ChgCRImpactAnalysisDataGridLayout',
+ func: 'dispatchToExistingSubCRDialog',
+ argument: {
+ contextCRId: n.contextDetails.id,
+ },
+ },
+ tooltip:
+ e.CHG_GOV_ImpactAnalysis_Toolbar_DispatchToExistingSubCR,
+ },
+ ],
+ },
+ },
+ position: 'far',
+ tooltip: e.CHG_GOV_ImpactAnalysis_Toolbar_DispatchMenu,
+ },
+ {
+ id: 'refine',
+ dataElements: {
+ typeRepresentation: 'functionIcon',
+ icon: {
+ iconName: 'tree-revision-update',
+ fontIconFamily: 1,
+ },
+ tooltip: e.CHG_GOV_Refine_ImpactAnalysis,
+ position: 'far',
+ disabled: !0,
+ visibleFlag: !t.getGlobalVariable().is3DSpace && o,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/ChgCRImpactAnalysisDataGridLayout',
+ func: 'refineImpactAnalysis',
+ argument: {
+ contextCRId: n.contextDetails.id,
+ },
+ },
+ },
+ },
+ {
+ id: 'duplicate',
+ dataElements: {
+ typeRepresentation: 'functionIcon',
+ icon: {
+ iconName: 'copy',
+ fontIconFamily: 1,
+ },
+ tooltip: e.CHG_GOV_Duplicate_ImpactAnalysis,
+ position: 'far',
+ disabled: !0,
+ visibleFlag: o,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/ChgCRImpactAnalysisDataGridLayout',
+ func: 'duplicateImpactAnalysis',
+ argument: {
+ contextCRId: n.contextDetails.id,
+ },
+ },
+ },
+ },
+ {
+ id: 'cancel',
+ dataElements: {
+ typeRepresentation: 'functionIcon',
+ icon: {
+ iconName: 'block',
+ fontIconFamily: 1,
+ },
+ tooltip:
+ e.CHG_GOV_ImpactAnalysis_Toolbar_CancelImpactAnalysis,
+ position: 'far',
+ disabled: !0,
+ visibleFlag: o,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/ChgCRImpactAnalysisDataGridLayout',
+ func: 'cancelHandler',
+ argument: {
+ contextCRId: n.contextDetails.id,
+ },
+ },
+ },
+ },
+ {
+ id: 'delete',
+ dataElements: {
+ typeRepresentation: 'functionIcon',
+ icon: {
+ iconName: 'trash',
+ fontIconFamily: 1,
+ },
+ tooltip: e.CHG_GOV_ChangeOrchestration_Toolbar_Delete,
+ position: 'far',
+ disabled: !0,
+ visibleFlag: o,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/ChgCRImpactAnalysisDataGridLayout',
+ func: 'deleteHandler',
+ },
+ },
+ },
+ {
+ id: 'impactedItems',
+ dataElements: {
+ typeRepresentation: 'functionIcon',
+ icon: {
+ iconName: 'change-request-impacted-items',
+ fontIconFamily: 1,
+ },
+ tooltip: e.ECM_CR_IA_IMPACTED_ITEMS,
+ position: 'far',
+ disabled: !1,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/ChgCRImpactAnalysisDataGridLayout',
+ func: 'impactsHandler',
+ },
+ },
+ },
+ {
+ id: 'filter',
+ dataElements: {
+ typeRepresentation: 'sortingdropdown',
+ icon: {
+ iconName: 'list-filter',
+ fontIconFamily: 1,
+ },
+ value: this.filterData,
+ },
+ position: 'far',
+ tooltip: e.CHG_Toolbar_FilterBy,
+ category: 'View',
+ },
+ {
+ id: 'view',
+ dataElements: {
+ typeRepresentation: 'sortingdropdown',
+ icon: {
+ iconName: 'view-legacy-thb',
+ fontIconFamily: 1,
+ },
+ value: this.viewData,
+ },
+ position: 'far',
+ category: 'View',
+ },
+ ],
+ };
+ if (
+ t.getGlobalVariable().CHG_ADD_IA_FROM_PARENT_CR &&
+ 1 == t.getGlobalVariable().CHG_ADD_IA_FROM_PARENT_CR
+ ) {
+ var r = {
+ id: 'IAMenu',
+ dataElements: {
+ typeRepresentation: 'sortingdropdown',
+ icon: {
+ iconName: 'change-request-chart-line-bar',
+ fontIconFamily: 1,
+ },
+ value: {
+ menu: [
+ {
+ type: 'PushItem',
+ title: e.CHG_GOV_ImpactAnalysis_Toolbar_NewImpactAnalysis,
+ visibleFlag: o,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/ChgCRImpactAnalysisCreate',
+ func: 'launchCreateChangeIADialog',
+ argument: {
+ contextCRId: n.contextDetails.id,
+ },
+ },
+ tooltip:
+ e.CHG_GOV_ImpactAnalysis_Toolbar_NewImpactAnalysis,
+ },
+ {
+ type: 'PushItem',
+ title: e.CHG_GOV_ImpactAnalysis_Toolbar_AddIAFromParent,
+ visibleFlag: o,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/ChgCRImpactAnalysisDataGridLayout',
+ func: 'addIAFromParentCRDialog',
+ argument: {
+ contextCRId: n.contextDetails.id,
+ },
+ },
+ tooltip: e.CHG_GOV_ImpactAnalysis_Toolbar_AddIAFromParent,
+ },
+ ],
+ },
+ },
+ position: 'far',
+ tooltip: e.CHG_GOV_ImpactAnalysis_Toolbar_IAMenu,
+ };
+ a.entries.unshift(r);
+ } else {
+ var s = {
+ id: 'newImpactAnalysis',
+ dataElements: {
+ typeRepresentation: 'functionIcon',
+ icon: {
+ iconName: 'plus',
+ fontIconFamily: 1,
+ },
+ tooltip: e.CHG_GOV_ImpactAnalysis_Toolbar_NewImpactAnalysis,
+ position: 'far',
+ visibleFlag: o,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/ChgCRImpactAnalysisCreate',
+ func: 'launchCreateChangeIADialog',
+ argument: {
+ contextCRId: n.contextDetails.id,
+ },
+ },
+ },
+ };
+ a.entries.unshift(s);
+ }
+ if (t.getGlobalVariable().is3DSpace) {
+ i.setContainersForSlideIn(n);
+ var l = {
+ id: 'infoPanel',
+ dataElements: {
+ typeRepresentation: 'functionIcon',
+ icon: {
+ iconName: 'info',
+ fontIconFamily: 1,
+ },
+ },
+ position: 'far',
+ tooltip: e.CHG_GOV_ImpactAnalysis_Information,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/util/Chg3DSpaceInfoPanel',
+ func: 'createSlidein',
+ },
+ };
+ a.entries.unshift(l),
+ 'ChangeAnalysis' == n.contextDetails.isKindOfType &&
+ (a.entries = a.entries.filter(
+ (e) => 'delete' != e.id && 'IAMenu' != e.id,
+ ));
+ }
+ return a;
+ }),
+ n
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/changeOrchestration/ChgOrchestrationDataGridViewToolbar',
+ [
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgGovernanceUX/scripts/util/Chg3DSpaceInfoPanel',
+ ],
+ function (e, t, i) {
+ var n = Object.create(null);
+ return (
+ (n.toolbar = null),
+ (n.createData = {
+ menu: [
+ {
+ type: 'PushItem',
+ title: e.CHG_GOV_ChangeOrchestration_Toolbar_NewChangeOrder,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/changeOrchestration/ChgOrchestrationDataGridLayout',
+ func: 'createChangeOrderInContext',
+ },
+ tooltip: e.CHG_GOV_ChangeOrchestration_Toolbar_NewChangeOrder,
+ },
+ {
+ type: 'PushItem',
+ title: e.CHG_GOV_ChangeOrchestration_Toolbar_NewChangeAction,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/changeOrchestration/ChgOrchestrationDataGridLayout',
+ func: 'createChangeActionInContext',
+ },
+ tooltip: e.CHG_GOV_ChangeOrchestration_Toolbar_NewChangeAction,
+ },
+ {
+ type: 'PushItem',
+ title: e.CHG_GOV_ChangeOrchestration_Toolbar_AddExisting,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/changeOrchestration/ChgOrchestrationDataGridLayout',
+ func: 'addExistingHandler',
+ },
+ tooltip: e.CHG_GOV_ChangeOrchestration_Toolbar_AddExisting,
+ },
+ ],
+ }),
+ (n.viewData = {
+ menu: [
+ {
+ type: 'CheckItem',
+ title: e.CHG_TOOLTIP_GRID_VIEW,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-view-list',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/changeOrchestration/ChgOrchestrationDataGridLayout',
+ func: 'changeView',
+ },
+ tooltip: e.CHG_TOOLTIP_GRID_VIEW,
+ },
+ {
+ type: 'CheckItem',
+ title: e.CHG_TOOLTIP_TILE_VIEW,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-view-small-tile',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/changeOrchestration/ChgOrchestrationTileViewLayout',
+ func: 'changeView',
+ },
+ tooltip: e.CHG_TOOLTIP_TILE_VIEW,
+ },
+ ],
+ }),
+ (n.writetoolbarDefinition = function (n) {
+ var o = {
+ entries: [
+ {
+ id: 'create',
+ dataElements: {
+ typeRepresentation: 'sortingdropdown',
+ icon: {
+ iconName: 'plus',
+ fontIconFamily: 1,
+ },
+ value: this.createData,
+ },
+ position: 'far',
+ category: 'Create',
+ },
+ {
+ id: 'MergeCA',
+ dataElements: {
+ typeRepresentation: 'functionIcon',
+ icon: {
+ iconName: 'merge',
+ fontIconFamily: 1,
+ },
+ tooltip: e.CHG_TOOLTIP_MERGE_CA,
+ position: 'far',
+ disabled: !0,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/changeOrchestration/ChgOrchestrationDataGridLayout',
+ func: 'mergeChangeAction',
+ },
+ },
+ },
+ {
+ id: 'remove',
+ dataElements: {
+ typeRepresentation: 'functionIcon',
+ icon: {
+ iconName: 'remove',
+ fontIconFamily: 1,
+ },
+ tooltip: e.CHG_GOV_ChangeOrchestration_Toolbar_Remove,
+ position: 'far',
+ disabled: !0,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/changeOrchestration/ChgOrchestrationDataGridLayout',
+ func: 'removeHandler',
+ },
+ },
+ },
+ {
+ id: 'delete',
+ dataElements: {
+ typeRepresentation: 'functionIcon',
+ icon: {
+ iconName: 'trash',
+ fontIconFamily: 1,
+ },
+ tooltip: e.CHG_GOV_ChangeOrchestration_Toolbar_Delete,
+ position: 'far',
+ disabled: !0,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/changeOrchestration/ChgOrchestrationDataGridLayout',
+ func: 'deleteHandler',
+ },
+ },
+ },
+ {
+ id: 'view',
+ dataElements: {
+ typeRepresentation: 'sortingdropdown',
+ icon: {
+ iconName: 'view-legacy-thb',
+ fontIconFamily: 1,
+ },
+ value: this.viewData,
+ },
+ position: 'far',
+ category: 'View',
+ },
+ ],
+ };
+ if (t.getGlobalVariable().is3DSpace) {
+ i.setContainersForSlideIn(n);
+ o.entries.unshift({
+ id: 'infoPanel',
+ dataElements: {
+ typeRepresentation: 'functionIcon',
+ icon: {
+ iconName: 'info',
+ fontIconFamily: 1,
+ },
+ category: '3dspace',
+ },
+ position: 'far',
+ tooltip: 'Information',
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/util/Chg3DSpaceInfoPanel',
+ func: 'createSlidein',
+ },
+ });
+ }
+ return o;
+ }),
+ n
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/issue/util/ChgCRIssueGridColsUtil',
+ [
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/issue/ChgCRIssueViewToolbar',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgServices/scripts/services/ChgMembersServices',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgDataGridUtil',
+ ],
+ function (e, t, i, n, o) {
+ 'use strict';
+ let a = Object.create(null);
+ return (
+ (a.getColumns = function () {
+ let e = [];
+ return (
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'titleTree',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'typeNLS',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'name',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'maturityNLS',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'ownerFullName',
+ }),
+ ),
+ e
+ );
+ }),
+ (a.changeView = function (i) {
+ if ('GridView' == i)
+ (this.currentView = 'Grid'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-list' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-list',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_GRID_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'selected'),
+ (n.options.grid.data.menu[1].state = 'unselected'),
+ (o = document.querySelector(
+ '.toolbar-issue-grid-div .wux-ui-3ds-view-list',
+ )) && o.addClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-issue-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.removeClassName('currentView'),
+ (r = document.querySelector('.content-issue-grid-div')) &&
+ (r.removeClassName('hideView'),
+ r.removeClassName('nonVisible'),
+ r.addClassName('showView')),
+ (s = document.querySelector('.content-issue-tile-div')) &&
+ (s.removeClassName('showView'), s.addClassName('hideView'));
+ else if ('TileView' == i) {
+ var n, o, a, r, s;
+ (this.currentView = 'Tile'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-small-tile' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-small-tile',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_TILE_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'unselected'),
+ (n.options.grid.data.menu[1].state = 'selected'),
+ (o = document.querySelector(
+ '.toolbar-issue-grid-div .wux-ui-3ds-view-list',
+ )) && o.removeClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-issue-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.addClassName('currentView'),
+ (r = document.querySelector('.content-issue-grid-div')) &&
+ (r.removeClassName('showView'), r.addClassName('hideView')),
+ (s = document.querySelector('.content-issue-tile-div')) &&
+ (s.removeClassName('hideView'), s.addClassName('showView'));
+ }
+ }),
+ a
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/issue/util/ChgIssueGridColsUtil',
+ [
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/issue/ChgIssueViewToolbar',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgServices/scripts/services/ChgMembersServices',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgDataGridUtil',
+ ],
+ function (e, t, i, n, o) {
+ 'use strict';
+ let a = Object.create(null);
+ return (
+ (a.getColumns = function () {
+ let e = [];
+ return (
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'titleTree',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'typeNLS',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'name',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'maturityNLS',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'ownerFullName',
+ }),
+ ),
+ e
+ );
+ }),
+ (a.changeView = function (i) {
+ if ('GridView' == i)
+ (this.currentView = 'Grid'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-list' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-list',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_GRID_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'selected'),
+ (n.options.grid.data.menu[1].state = 'unselected'),
+ (o = document.querySelector(
+ '.toolbar-CO-issue-grid-div .wux-ui-3ds-view-list',
+ )) && o.addClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-CO-issue-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.removeClassName('currentView'),
+ (r = document.querySelector('.content-CO-issue-grid-div')) &&
+ (r.removeClassName('hideView'),
+ r.removeClassName('nonVisible'),
+ r.addClassName('showView')),
+ (s = document.querySelector('.content-CO-issue-tile-div')) &&
+ (s.removeClassName('showView'), s.addClassName('hideView'));
+ else if ('TileView' == i) {
+ var n, o, a, r, s;
+ (this.currentView = 'Tile'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-small-tile' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-small-tile',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_TILE_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'unselected'),
+ (n.options.grid.data.menu[1].state = 'selected'),
+ (o = document.querySelector(
+ '.toolbar-CO-issue-grid-div .wux-ui-3ds-view-list',
+ )) && o.removeClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-CO-issue-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.addClassName('currentView'),
+ (r = document.querySelector('.content-CO-issue-grid-div')) &&
+ (r.removeClassName('showView'), r.addClassName('hideView')),
+ (s = document.querySelector('.content-CO-issue-tile-div')) &&
+ (s.removeClassName('hideView'), s.addClassName('showView'));
+ }
+ }),
+ a
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/changeOrchestration/util/ChgOrchestrationGridColsUtil',
+ [
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/changeOrchestration/ChgOrchestrationDataGridViewToolbar',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgServices/scripts/services/ChgMembersServices',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgDataGridUtil',
+ ],
+ function (e, t, i, n, o) {
+ 'use strict';
+ var a = Object.create(null);
+ return (
+ (a.getColumns = function () {
+ var e = [];
+ return (
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'titleTree',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'chgObjName',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'maturityNLS',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'severityNLS',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'ownerFullName',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'changeCoordinatorFullName',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'collabspaceNLS',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'organizationNLS',
+ }),
+ ),
+ (e[2].compareFunction = function (e, t, i, n, o) {
+ return 'undefined' != i.options.grid.stateGrade &&
+ 'undefined' != n.options.grid.stateGrade
+ ? i.options.grid.stateGrade == n.options.grid.stateGrade
+ ? 0
+ : i.options.grid.stateGrade < n.options.grid.stateGrade
+ ? -1
+ : 1
+ : 0;
+ }),
+ i.getGlobalVariable().is3DSpace &&
+ ((e[0].allowUnsafeHTMLContent = !0),
+ (e[0].getCellGroupingKey = function (e) {
+ return e.nodeModel.options.grid.title;
+ })),
+ e
+ );
+ }),
+ (a.changeView = function (i) {
+ if ('GridView' == i)
+ (this.currentView = 'Grid'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-list' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-list',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_GRID_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'selected'),
+ (n.options.grid.data.menu[1].state = 'unselected'),
+ (o = document.querySelector(
+ '.toolbar-orchestration-grid-div .wux-ui-3ds-view-list',
+ )) && o.addClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-orchestration-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.removeClassName('currentView'),
+ (r = document.querySelector('.content-orchestration-grid-div')) &&
+ (r.removeClassName('hideView'),
+ r.removeClassName('nonVisible'),
+ r.addClassName('showView')),
+ (s = document.querySelector('.orchestrationtileView')) &&
+ (s.removeClassName('showView'), s.addClassName('hideView'));
+ else if ('TileView' == i) {
+ var n, o, a, r, s;
+ (this.currentView = 'Tile'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-small-tile' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-small-tile',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_TILE_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'unselected'),
+ (n.options.grid.data.menu[1].state = 'selected'),
+ (o = document.querySelector(
+ '.toolbar-orchestration-grid-div .wux-ui-3ds-view-list',
+ )) && o.removeClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-orchestration-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.addClassName('currentView'),
+ (r = document.querySelector('.content-orchestration-grid-div')) &&
+ (r.removeClassName('showView'), r.addClassName('hideView')),
+ (s = document.querySelector('.orchestrationtileView')) &&
+ (s.removeClassName('hideView'), s.addClassName('showView'));
+ }
+ }),
+ (a.createCustomSeverity = function (e, t) {
+ var i = 'sevLow wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-level-low';
+ 'Medium' == e
+ ? (i = 'sevMed wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-level-medium')
+ : 'High' == e &&
+ (i = 'sevHigh wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-level-high');
+ var n = new UWA.Element('div', {}),
+ o = new UWA.Element('div', {
+ class: 'gridIconContainer',
+ });
+ UWA.createElement('div', {
+ class: i,
+ }).inject(o);
+ var a = UWA.createElement('span', {
+ html: t,
+ });
+ return o.inject(n), a.inject(n), n.outerHTML;
+ }),
+ (a.createCustomOwner = function (e, t) {
+ var o = '/api/user/getpicture/login/' + t + '/format/normal',
+ a = i.getGlobalVariable().computeSwymUrl(o),
+ r = new UWA.Element('div', {
+ class: 'members',
+ }),
+ s = new UWA.Element('div', {
+ class: 'assignee',
+ }),
+ l = '';
+ if (i.getGlobalVariable().isSwymInstalled)
+ l = UWA.createElement('img', {
+ class: 'userIcon',
+ src: a,
+ });
+ else {
+ var c = n.getAvatarDetails(t);
+ (l = UWA.createElement('div', {
+ html: c.avatarStr,
+ class: 'avatarIcon',
+ })).style.setProperty('background', c.avatarColor);
+ }
+ l.inject(s);
+ var d = UWA.createElement('span', {
+ class: 'userName',
+ html: t,
+ });
+ return s.inject(r), d.inject(r), r.outerHTML;
+ }),
+ a
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/contributor/util/ChgCRContributorsGridUtil',
+ [
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/contributor/ChgCRContributorsDataGridViewToolbar',
+ ],
+ function (e, t) {
+ 'use strict';
+ var i = Object.create(null);
+ (i.getColumns = function () {}),
+ (i.changeView = function (n) {
+ if ('GridView' == n);
+ else if ('TileView' == n) {
+ this.currentView = 'Tile';
+ var o = t.toolbar.getNodeModelByID('view');
+ o &&
+ 'view-small-tile' != o.options.grid.semantics.icon.iconName &&
+ o.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-small-tile',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_TILE_VIEW,
+ });
+ var a = document.querySelector(
+ '.toolbar-contributor-grid-div .wux-ui-3ds-view-small-tile',
+ );
+ if (a) {
+ a.addClassName('currentView');
+ var r = document.querySelector('.contributortileView');
+ r && (r.removeClassName('hideView'), r.addClassName('showView'));
+ }
+ }
+ return i;
+ });
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/affectedItems/ChgCRAffectedItemsViewToolbar',
+ [
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgGovernanceUX/scripts/util/Chg3DSpaceInfoPanel',
+ ],
+ function (e, t, i) {
+ var n = Object.create(null);
+ return (
+ (n.toolbar = null),
+ (n.createData = {
+ menu: [
+ {
+ type: 'PushItem',
+ title: e.CHG_GOV_ImpactBasis_Toolbar_OrchestrateImpactAnalysis,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/affectedItems/ChgCRAffectedItemsDataGridLayout',
+ func: '_orchestrateImpactAnalysis',
+ },
+ tooltip: e.CHG_GOV_ImpactBasis_Toolbar_OrchestrateImpactAnalysis,
+ },
+ {
+ type: 'PushItem',
+ title: e.CHG_GOV_AffactedItem_Toolbar_Add_Existing_ImpactAnalysis,
+ state: 'disabled',
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/affectedItems/ChgCRAffectedItemsDataGridLayout',
+ func: 'addExistingImpactAnalysisInContext',
+ },
+ tooltip:
+ e.CHG_GOV_AffactedItem_Toolbar_Add_Existing_ImpactAnalysis,
+ },
+ ],
+ }),
+ (n.viewData = {
+ menu: [
+ {
+ type: 'CheckItem',
+ title: e.CHG_TOOLTIP_GRID_VIEW,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-view-list',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/affectedItems/ChgCRAffectedItemsDataGridLayout',
+ func: 'changeView',
+ },
+ tooltip: e.CHG_TOOLTIP_GRID_VIEW,
+ },
+ {
+ type: 'CheckItem',
+ title: e.CHG_TOOLTIP_TILE_VIEW,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-view-small-tile',
+ },
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/affectedItems/ChgCRAffectedItemsTileViewLayout',
+ func: 'changeView',
+ },
+ tooltip: e.CHG_TOOLTIP_TILE_VIEW,
+ },
+ ],
+ }),
+ (n.writetoolbarDefinition = function (n) {
+ var o = {
+ entries: [
+ {
+ id: 'addExisting',
+ dataElements: {
+ typeRepresentation: 'functionIcon',
+ icon: {
+ iconName: 'plus',
+ fontIconFamily: 1,
+ },
+ tooltip: e.CHG_GOV_AffectedItems_Toolbar_AddExisting,
+ position: 'far',
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/affectedItems/ChgCRAffectedItemsDataGridLayout',
+ func: 'addExistingHandler',
+ },
+ },
+ },
+ {
+ id: 'changeAssessment',
+ dataElements: {
+ typeRepresentation: 'functionIcon',
+ icon: {
+ iconName: 'component',
+ fontIconFamily: 1,
+ },
+ disabled: !0,
+ tooltip: e.CHG_GOV_ImpactBasis_Toolbar_ChangeAssessment,
+ position: 'far',
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/affectedItems/ChgCRAffectedItemsDataGridLayout',
+ func: 'changeAssessmentHandler',
+ },
+ },
+ },
+ {
+ id: 'massUpdate',
+ dataElements: {
+ typeRepresentation: 'functionIcon',
+ icon: {
+ iconName: 'pencil',
+ fontIconFamily: 1,
+ },
+ disabled: !0,
+ tooltip: e.CHG_GOV_AffectedItems_Toolbar_MassUpdate,
+ position: 'far',
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/affectedItems/ChgCRAffectedItemsDataGridLayout',
+ func: 'massUpdateHandler',
+ },
+ },
+ },
+ {
+ id: 'moveToCR',
+ dataElements: {
+ typeRepresentation: 'functionIcon',
+ icon: {
+ iconName: 'exchange wux-ui-3ds',
+ fontIconFamily: 1,
+ },
+ disabled: !0,
+ tooltip:
+ e.CHG_GOV_AffactedItem_Toolbar_Move_AffactedItem_To_CR,
+ position: 'far',
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/affectedItems/ChgCRAffectedItemsDataGridLayout',
+ func: 'moveAffactedItemToOtherCR',
+ },
+ },
+ },
+ {
+ id: 'create',
+ dataElements: {
+ typeRepresentation: 'addDropdown',
+ icon: {
+ iconName: 'change-request-chart-line-bar wux-ui-3ds',
+ fontIconFamily: 1,
+ },
+ value: this.createData,
+ },
+ position: 'far',
+ disabled: !1,
+ },
+ {
+ id: 'remove',
+ dataElements: {
+ typeRepresentation: 'functionIcon',
+ icon: {
+ iconName: 'remove',
+ fontIconFamily: 1,
+ },
+ tooltip: e.CHG_GOV_ChangeOrchestration_Toolbar_Remove,
+ position: 'far',
+ disabled: !0,
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/affectedItems/ChgCRAffectedItemsDataGridLayout',
+ func: 'removeHandler',
+ },
+ },
+ },
+ {
+ id: 'view',
+ dataElements: {
+ typeRepresentation: 'addDropdown',
+ icon: {
+ iconName: 'view-legacy-thb',
+ fontIconFamily: 1,
+ },
+ value: this.viewData,
+ },
+ position: 'far',
+ category: 'View',
+ },
+ ],
+ };
+ if (t.getGlobalVariable().is3DSpace) {
+ i.setContainersForSlideIn(n),
+ (o.entries = o.entries.filter((e) => 'changeAssessment' != e.id));
+ o.entries.unshift({
+ id: 'infoPanel',
+ dataElements: {
+ typeRepresentation: 'functionIcon',
+ icon: {
+ iconName: 'info',
+ fontIconFamily: 1,
+ },
+ category: '3dspace',
+ },
+ position: 'far',
+ tooltip: 'Information',
+ action: {
+ module:
+ 'DS/ENOChgGovernanceUX/scripts/util/Chg3DSpaceInfoPanel',
+ func: 'createSlidein',
+ },
+ });
+ }
+ return o;
+ }),
+ n
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/util/ChgCRImpactAnalysisGridContextualMenu',
+ [
+ 'UWA/Core',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/LifecycleCmd/MaturityCmd',
+ 'DS/ENOChgServices/scripts/services/ChgPropertiesServices',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgServices/scripts/services/ChgCustomAttributeService',
+ 'DS/ENOChgServices/scripts/services/ChgDataService',
+ 'DS/ENOChgServices/scripts/services/ChgDataProcess',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovCommonDelete',
+ 'DS/UIKIT/Input/Text',
+ 'DS/UIKIT/Input/Button',
+ 'DS/Notifications/NotificationsManagerUXMessages',
+ 'DS/Notifications/NotificationsManagerViewOnScreen',
+ 'DS/UIKIT/DropdownMenu',
+ 'DS/UIKIT/Dropdown',
+ 'DS/ENOChgServices/scripts/services/ChgInfraService',
+ 'require',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgDataGridUtil',
+ 'DS/ENOChgProbes/scripts/ChgCloudProbeUtils',
+ ],
+ function (e, t, i, n, o, a, r, s, l, c, d, u, g, p, h, m, C, v, f) {
+ 'use strict';
+ var b = {
+ columnMap: null,
+ attrMap: [],
+ showRMBMenuOnGrid: function (e, t, i) {
+ return new Promise(function (i, o) {
+ const a = [];
+ let r = !1;
+ const s = t.cellInfos.nodeModel
+ .getTreeDocument()
+ .getSelectedNodes();
+ s.length > 1 && (r = !0);
+ const l = s.map((e) => e.options.grid.id),
+ c =
+ (s.map((e) => ({
+ physicalid: e.options.grid.id,
+ nodeName: e.options.grid.name,
+ nodeTitle: e.options.grid.title,
+ })),
+ C(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/ChgCRImpactAnalysisDataGridLayout',
+ )),
+ d = C(
+ 'DS/ENOChgServices/scripts/services/ChgIDCardCommonServices',
+ ),
+ u = C('DS/ENOChgServices/scripts/services/ChgDataService'),
+ g = t.cellInfos.nodeModel.options.grid.id,
+ p = t.cellInfos.nodeModel.options.grid.type,
+ h = t.cellInfos.nodeModel.options.grid.name,
+ f = t.cellInfos.nodeModel.options.grid.displayType,
+ w =
+ c.ChgCRImpactAnalysisDataGridModel.contextDetails.access
+ .accessBits.ManageChangeAnalysis,
+ D = {
+ objectId: g,
+ objectType: p,
+ displayName: h,
+ displayType: f,
+ facetName: 'dependency',
+ },
+ S = d.openWith(D);
+ if (r)
+ a.push(n.createPropertyPushItem(l)),
+ a.push(b.getRelationalExplorerMenu(l)),
+ S.then((n) => {
+ n && a.push(n),
+ a.push(b.getTransferMenu(t)),
+ a.push(v.getMaturityMenu(t)),
+ a.push(m.getCopyLink(s, e.options.contextDetails.id)),
+ 'true' == w &&
+ a.push(
+ b.getDeleteMenu(
+ t,
+ e.options.target,
+ c.removeDeletedNodesUsingIDs,
+ void 0,
+ 'ImpactAnalysis',
+ ),
+ ),
+ i(a);
+ });
+ else {
+ a.push(n.createPropertyPushItem(l)),
+ a.push(b.getRelationalExplorerMenu(l));
+ const o = [];
+ o.push(S);
+ const r = u.getImpactAnalysisUserAccess(
+ t.cellInfos.nodeModel.options.grid.id,
+ );
+ o.push(r),
+ Promise.all(o).then((n) => {
+ n[0] && a.push(n[0]);
+ const o = n[1].data[0].dataelements;
+ 'true' === o.TransferOwnership &&
+ a.push(b.getTransferMenu(t)),
+ ('true' !== o.Promote && 'true' !== o.Demote) ||
+ a.push(v.getMaturityMenu(t)),
+ a.push(m.getCopyLink(s, e.options.contextDetails.id)),
+ 'true' == w &&
+ a.push(
+ b.getDeleteMenu(
+ t,
+ e.options.target,
+ c.removeDeletedNodesUsingIDs,
+ void 0,
+ 'ImpactAnalysis',
+ ),
+ ),
+ i(a);
+ });
+ }
+ });
+ },
+ getTransferMenu: function (e) {
+ return {
+ type: 'PushItem',
+ title: t.CHG_GOV_Menu_Transfer,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-move-to',
+ },
+ action: {
+ callback: function (t) {
+ var i = {
+ commandInfo: {
+ type: 'Change Request',
+ facet: 'Impact Analysis',
+ action: 'CR>Impact Analysis>RMB>Move',
+ },
+ };
+ f.cloudProbeUtils.genericCommandClickEventForAnalytics({
+ inputJSON: i,
+ });
+ for (
+ var n = e.cellInfos.nodeModel
+ .getTreeDocument()
+ .getSelectedNodes(),
+ o = [],
+ a = 0;
+ a < n.length;
+ a++
+ )
+ o.push(n[a].options.grid);
+ require([
+ 'DS/ENOChgGovernanceUX/scripts/wrapper/ChgGovTransferWrapper',
+ ], function (e) {
+ e.launchTransferDialog(o);
+ });
+ },
+ },
+ };
+ },
+ makeCopyLinkObject: function (e, t) {
+ var i = {
+ protocol: '3DXContent',
+ data: {
+ items: [],
+ },
+ };
+ return (
+ i.data.items.push({
+ envId: o.getGlobalVariable().tenant,
+ objectId: t,
+ openLink: !0,
+ IAid: e.options.grid.id,
+ tabName: 'crAssessment',
+ }),
+ i
+ );
+ },
+ showNotification: function (e, t, i, n, o, a, r) {
+ var s = {
+ level: e,
+ title: t,
+ subtitle: i,
+ message: n,
+ sticky: o,
+ allowUnsafeHTML: r || !1,
+ };
+ window.notifs ||
+ ((window.notifs = u), g.setNotificationManager(window.notifs)),
+ a ? g.inject(a) : g.elements.container.isInjected() || g.inject(),
+ window.notifs.addNotif(s);
+ },
+ getRelationalExplorerMenu: function (e) {
+ return {
+ type: 'PushItem',
+ title: t.CHG_GOV_Menu_Relational_Explorer,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-object-related',
+ },
+ action: {
+ callback: function (t) {
+ var i = {
+ commandInfo: {
+ type: 'Change Request',
+ facet: 'Impact Analysis',
+ action: 'CR>Impact Analysis>RMB>Relations',
+ },
+ };
+ f.cloudProbeUtils.genericCommandClickEventForAnalytics({
+ inputJSON: i,
+ }),
+ require([
+ 'DS/ENOChgServices/scripts/services/ChgIDCardCommonServices',
+ ], function (t) {
+ t.openRelationalExplorer(e);
+ });
+ },
+ },
+ };
+ },
+ getDeleteMenu: function (e, i, n, o, a) {
+ return {
+ type: 'PushItem',
+ title: t.CHG_GOV_Menu_Delete,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-trash',
+ },
+ action: {
+ callback: function () {
+ var t = {
+ commandInfo: {
+ type: 'Change Request',
+ facet: 'Impact Analysis',
+ action: 'CR>Impact Analysis>RMB>Delete',
+ },
+ };
+ f.cloudProbeUtils.genericCommandClickEventForAnalytics({
+ inputJSON: t,
+ });
+ for (
+ var r = e.cellInfos.nodeModel
+ .getTreeDocument()
+ .getSelectedNodes(),
+ s = [],
+ c = 0;
+ c < r.length;
+ c++
+ ) {
+ var d = r[c],
+ u = {
+ physicalid: d.options.grid.id,
+ nodeName: d.options.grid.name,
+ nodeTitle: d.options.grid.title,
+ parentCRId: d.options.grid.parentCRId,
+ };
+ s.push(u);
+ }
+ l.deleteNodes(s, i, n, o, a);
+ },
+ },
+ };
+ },
+ createCustomColumn: function () {
+ let e = this;
+ return new Promise(function (t, i) {
+ let n = o.getGlobalVariable().changeAnalysisSubTypes;
+ a.getCombinedClassList(n).then(function (i) {
+ a.getPropertyForClassGrid(i).then(function (i) {
+ let n = a.makeCombinedColumnList(i),
+ o = e.filterColumn(n);
+ (e.columnMap = n), t(o);
+ });
+ });
+ });
+ },
+ filterColumn: function (e) {
+ let t = this,
+ i = [],
+ n = [
+ 'ds6w:label',
+ 'ds6w:severity',
+ 'ds6w:status',
+ 'ds6w:type',
+ 'ds6w:identifier',
+ 'ds6w:responsible',
+ 'ds6wg:Default Change Analysis Metrics.Implementation Effort',
+ 'ds6wg:Default Change Analysis Metrics.Benefit Impact',
+ 'ds6wg:Default Change Analysis Metrics.Risk Impact',
+ 'ds6wg:Default Change Analysis Metrics.Cost Impact',
+ 'ds6wg:Default Change Analysis Metrics.Validation Effort',
+ ];
+ for (let t of n) e.delete(t);
+ return (
+ e.forEach((e, n, o) => {
+ let a = t.createColumnDefination(e, n);
+ i.push(a);
+ }),
+ i
+ );
+ },
+ createColumnDefination: function (e, t) {
+ var i = this;
+ let n = e.dataType.replace('http://www.w3.org/2001/XMLSchema#', ''),
+ o = new Map();
+ return (
+ this.attrMap.push(o),
+ {
+ text: e.vocabColumnsNameNLS,
+ dataIndex: t,
+ editableFlag: !1,
+ allowUnsafeHTMLContent: !0,
+ visibleFlag: !1,
+ dataType: n,
+ range: e.range,
+ getCellTooltip: function () {
+ return {
+ shortHelp: 'my custo help',
+ updateModel: !1,
+ };
+ },
+ getCellTypeRepresentation: function (e) {
+ return null != e.cellModel ? 'string' : 'functionIcon';
+ },
+ getCellSemantics: function (e) {
+ if (null != e.cellModel);
+ else if ('undefined' == e.cellModel || null == e.cellModel)
+ return {
+ icon: {
+ iconName: 'reload wux-ui-3ds-spin',
+ fontIconFamily: WUXManagedFontIcons.Font3DS,
+ },
+ };
+ },
+ getCellClassName: function (e) {
+ if (e.rowID >= 0 && 'ia_Total' == e.nodeModel.options.grid.id)
+ return 'iaTotalAttribute';
+ },
+ compareFunction: function (e, t, i, n, o) {
+ if (
+ 'ia_Total' != i.options.grid.id &&
+ 'ia_Total' != n.options.grid.id
+ ) {
+ if (e > t) return 1;
+ if (e == t) return 0;
+ if (e < t) return -1;
+ }
+ return !1;
+ },
+ getCellValue: function (e) {
+ if (e.nodeModel.getAttributeValue('isLastNode')) {
+ let n = e.nodeModel.getBrothers(),
+ o = i.checkAssessmentType(t);
+ if (
+ ((n = n.filter(
+ (e) =>
+ 'ia_Total' != e.options.grid.id &&
+ 'Cancelled' != e.options.grid.maturity,
+ )),
+ 'boolean' == o)
+ ) {
+ return i.booleanAggregation(n, t);
+ }
+ if ('integer' == o || 'real' == o || 'double' == o) {
+ return i.sumAvgAggregation(n, t);
+ }
+ if ('range' == o) {
+ return i.rangeAggregation(n, t);
+ }
+ return '';
+ }
+ return e.nodeModel.getAttributeValue(t);
+ },
+ getCellTooltip: function (e) {
+ console.log(e), console.log('cellInfos...................');
+ },
+ }
+ );
+ },
+ checkAssessmentType: function (e) {
+ let t = [...b.columnMap.entries()].filter(([t, i]) => t == e),
+ i = t[0][1].dataType,
+ n = t[0][1].range,
+ o = i.replace('http://www.w3.org/2001/XMLSchema#', '');
+ return n && 'integer' == o ? 'range' : o;
+ },
+ sumAvgAggregation: function (e, t) {
+ let i = 0;
+ for (var n = 0; n < e.length; n++)
+ '' != e[n].options.grid['' + t] &&
+ (i += parseFloat(e[n].options.grid['' + t]));
+ let o = 0;
+ return `∑ ${i} | x̄ ${(o = i / e.length)} `;
+ },
+ rangeAggregation: function (e, t) {
+ let i = 0,
+ n = 0;
+ for (var o = 0; o < e.length; o++)
+ '' != e[o].options.grid['' + t] &&
+ (i += parseInt(e[o].options.grid['' + t]));
+ return (n = Math.round(i / e.length));
+ },
+ booleanAggregation: function (e, t) {
+ let i = '';
+ for (var n = 0; n < e.length; n++) {
+ let o = e[n].options.grid['' + t];
+ if ('TRUE' != o) {
+ if ('FALSE' == o) {
+ i = 'FALSE';
+ break;
+ }
+ } else i = 'TRUE';
+ }
+ return i;
+ },
+ };
+ return b;
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/affectedItems/util/ChgCRAffectedItemsGridColsUtil',
+ [
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/affectedItems/ChgCRAffectedItemsViewToolbar',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgDataGridUtil',
+ ],
+ function (e, t, i, n) {
+ 'use strict';
+ var o = Object.create(null);
+ return (
+ (o.getColumns = function () {
+ var t = [];
+ return (
+ t.push(
+ n.getColumnDefinition({
+ dataIndex: 'titleTree',
+ }),
+ ),
+ t.push(
+ n.getColumnDefinition({
+ dataIndex: 'typeNLS',
+ }),
+ ),
+ t.push(
+ n.getColumnDefinition({
+ dataIndex: 'name',
+ }),
+ ),
+ t.push(
+ n.getColumnDefinition({
+ dataIndex: 'revision',
+ }),
+ ),
+ t.push(
+ n.getColumnDefinition({
+ dataIndex: 'maturityNLS',
+ }),
+ ),
+ t.push(
+ n.getColumnDefinition({
+ dataIndex: 'collabspaceNLS',
+ }),
+ ),
+ t.push(
+ n.getColumnDefinition({
+ dataIndex: 'organizationNLS',
+ }),
+ ),
+ t.push(
+ n.getColumnDefinition({
+ dataIndex: 'reasonForChange',
+ editableFlag: !0,
+ }),
+ ),
+ t.push({
+ text: e.CHG_GOV_DataGrid_Column_ImpactAnalysis,
+ dataIndex: 'countImpactAnalysis',
+ editableFlag: !1,
+ typeRepresentation: 'url',
+ filterId: 'number',
+ filterModel: '',
+ getCellValue: function (e) {
+ if (e.nodeModel) {
+ return {
+ label: e.nodeModel.getAttributeValue('countImpactAnalysis'),
+ };
+ }
+ },
+ }),
+ t.push(
+ n.getColumnDefinition({
+ dataIndex: 'ownerFullName',
+ }),
+ ),
+ i.getGlobalVariable().is3DSpace &&
+ ((t[0].allowUnsafeHTMLContent = !0),
+ (t[0].getCellGroupingKey = function (e) {
+ return e.nodeModel.options.grid.title;
+ })),
+ t
+ );
+ }),
+ (o.changeView = function (i) {
+ if ('GridView' == i)
+ (this.currentView = 'Grid'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-list' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-list',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_GRID_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'selected'),
+ (n.options.grid.data.menu[1].state = 'unselected'),
+ (o = document.querySelector(
+ '.toolbar-affectedItems-grid-div .wux-ui-3ds-view-list',
+ )) && o.addClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-affectedItems-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.removeClassName('currentView'),
+ (r = document.querySelector('.content-affectedItems-grid-div')) &&
+ (r.removeClassName('hideView'),
+ r.removeClassName('nonVisible'),
+ r.addClassName('showView')),
+ (s = document.querySelector('.affectedItemsTileView')) &&
+ (s.removeClassName('showView'), s.addClassName('hideView'));
+ else if ('TileView' == i) {
+ var n, o, a, r, s;
+ (this.currentView = 'Tile'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-small-tile' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-small-tile',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_TILE_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'unselected'),
+ (n.options.grid.data.menu[1].state = 'selected'),
+ (o = document.querySelector(
+ '.toolbar-affectedItems-grid-div .wux-ui-3ds-view-list',
+ )) && o.removeClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-affectedItems-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.addClassName('currentView'),
+ (r = document.querySelector('.content-affectedItems-grid-div')) &&
+ (r.removeClassName('showView'), r.addClassName('hideView')),
+ (s = document.querySelector('.affectedItemsTileView')) &&
+ (s.removeClassName('hideView'), s.addClassName('showView'));
+ }
+ }),
+ o
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeAction/facets/context/util/ChgCAcontextGridColsUtil',
+ [
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgGovernanceUX/scripts/view/changeAction/facets/context/ChgCAcontextViewToolbar',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgServices/scripts/services/ChgMembersServices',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgDataGridUtil',
+ ],
+ function (e, t, i, n, o) {
+ 'use strict';
+ let a = Object.create(null);
+ return (
+ (a.getColumns = function () {
+ let e = [];
+ return (
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'titleTree',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'typeNLS',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'name',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'currentNLS',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'ownerFullName',
+ }),
+ ),
+ e
+ );
+ }),
+ (a.changeView = function (i) {
+ if ('GridView' == i)
+ (this.currentView = 'Grid'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-list' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-list',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_GRID_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'selected'),
+ (n.options.grid.data.menu[1].state = 'unselected'),
+ (o = document.querySelector(
+ '.toolbar-context-grid-div .wux-ui-3ds-view-list',
+ )) && o.addClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-context-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.removeClassName('currentView'),
+ (r = document.querySelector('.content-context-grid-div')) &&
+ (r.removeClassName('hideView'),
+ r.removeClassName('nonVisible'),
+ r.addClassName('showView')),
+ (s = document.querySelector('.content-context-tile-div')) &&
+ (s.removeClassName('showView'), s.addClassName('hideView'));
+ else if ('TileView' == i) {
+ var n, o, a, r, s;
+ (this.currentView = 'Tile'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-small-tile' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-small-tile',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_TILE_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'unselected'),
+ (n.options.grid.data.menu[1].state = 'selected'),
+ (o = document.querySelector(
+ '.toolbar-context-grid-div .wux-ui-3ds-view-list',
+ )) && o.removeClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-context-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.addClassName('currentView'),
+ (r = document.querySelector('.content-context-grid-div')) &&
+ (r.removeClassName('showView'), r.addClassName('hideView')),
+ (s = document.querySelector('.content-context-tile-div')) &&
+ (s.removeClassName('hideView'),
+ s.removeClassName('nonVisible'),
+ s.addClassName('showView'));
+ }
+ }),
+ a
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/relatedScope/util/ChgCRrelatedScopeGridColsUtil',
+ [
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/relatedScope/ChgCRrelatedScopeViewToolbar',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgServices/scripts/services/ChgMembersServices',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgDataGridUtil',
+ ],
+ function (e, t, i, n, o) {
+ 'use strict';
+ let a = Object.create(null);
+ return (
+ (a.getColumns = function () {
+ var e = [];
+ return (
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'titleTree',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'typeNLS',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'name',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'revision',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'maturityNLS',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'ownerFullName',
+ }),
+ ),
+ e
+ );
+ }),
+ (a.changeView = function (i) {
+ if ('GridView' == i)
+ (this.currentView = 'Grid'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-list' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-list',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_GRID_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'selected'),
+ (n.options.grid.data.menu[1].state = 'unselected'),
+ (o = document.querySelector(
+ '.toolbar-relatedScope-grid-div .wux-ui-3ds-view-list',
+ )) && o.addClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-relatedScope-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.removeClassName('currentView'),
+ (r = document.querySelector('.content-relatedScope-grid-div')) &&
+ (r.removeClassName('hideView'),
+ r.removeClassName('nonVisible'),
+ r.addClassName('showView')),
+ (s = document.querySelector('.content-relatedScope-tile-div')) &&
+ (s.removeClassName('showView'), s.addClassName('hideView'));
+ else if ('TileView' == i) {
+ var n, o, a, r, s;
+ (this.currentView = 'Tile'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-small-tile' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-small-tile',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_TILE_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'unselected'),
+ (n.options.grid.data.menu[1].state = 'selected'),
+ (o = document.querySelector(
+ '.toolbar-relatedScope-grid-div .wux-ui-3ds-view-list',
+ )) && o.removeClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-relatedScope-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.addClassName('currentView'),
+ (r = document.querySelector('.content-relatedScope-grid-div')) &&
+ (r.removeClassName('showView'), r.addClassName('hideView')),
+ (s = document.querySelector('.content-relatedScope-tile-div')) &&
+ (s.removeClassName('hideView'), s.addClassName('showView'));
+ }
+ }),
+ a
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/changeOrchestration/util/ChgCROrchestrationGridColsUtil',
+ [
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/changeOrchestration/ChgCROrchestrationDataGridViewToolbar',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgServices/scripts/services/ChgMembersServices',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgDataGridUtil',
+ ],
+ function (e, t, i, n, o) {
+ 'use strict';
+ var a = Object.create(null);
+ return (
+ (a.getColumns = function () {
+ var e = [];
+ return (
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'titleTree',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'chgObjName',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'maturityNLS',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'severityNLS',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'ownerFullName',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'changeCoordinatorFullName',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'collabspaceNLS',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'organizationNLS',
+ }),
+ ),
+ (e[2].compareFunction = function (e, t, i, n, o) {
+ return 'undefined' != i.options.grid.stateGrade &&
+ 'undefined' != n.options.grid.stateGrade
+ ? i.options.grid.stateGrade == n.options.grid.stateGrade
+ ? 0
+ : i.options.grid.stateGrade < n.options.grid.stateGrade
+ ? -1
+ : 1
+ : 0;
+ }),
+ i.getGlobalVariable().is3DSpace &&
+ ((e[0].allowUnsafeHTMLContent = !0),
+ (e[0].getCellGroupingKey = function (e) {
+ return e.nodeModel.options.grid.title;
+ })),
+ e
+ );
+ }),
+ (a.changeView = function (i) {
+ if ('GridView' == i)
+ (this.currentView = 'Grid'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-list' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-list',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_GRID_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'selected'),
+ (n.options.grid.data.menu[1].state = 'unselected'),
+ (o = document.querySelector(
+ '.toolbar-orchestration-grid-div .wux-ui-3ds-view-list',
+ )) && o.addClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-orchestration-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.removeClassName('currentView'),
+ (r = document.querySelector('.content-orchestration-grid-div')) &&
+ (r.removeClassName('hideView'),
+ r.removeClassName('nonVisible'),
+ r.addClassName('showView')),
+ (s = document.querySelector('.orchestrationtileView')) &&
+ (s.removeClassName('showView'), s.addClassName('hideView'));
+ else if ('TileView' == i) {
+ var n, o, a, r, s;
+ (this.currentView = 'Tile'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-small-tile' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-small-tile',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_TILE_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'unselected'),
+ (n.options.grid.data.menu[1].state = 'selected'),
+ (o = document.querySelector(
+ '.toolbar-orchestration-grid-div .wux-ui-3ds-view-list',
+ )) && o.removeClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-orchestration-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.addClassName('currentView'),
+ (r = document.querySelector('.content-orchestration-grid-div')) &&
+ (r.removeClassName('showView'), r.addClassName('hideView')),
+ (s = document.querySelector('.orchestrationtileView')) &&
+ (s.removeClassName('hideView'), s.addClassName('showView'));
+ }
+ }),
+ (a.createCustomSeverity = function (e, t) {
+ var i = 'sevLow wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-level-low';
+ 'Medium' == e
+ ? (i = 'sevMed wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-level-medium')
+ : 'High' == e &&
+ (i = 'sevHigh wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-level-high');
+ var n = new UWA.Element('div', {}),
+ o = new UWA.Element('div', {
+ class: 'gridIconContainer',
+ });
+ UWA.createElement('div', {
+ class: i,
+ }).inject(o);
+ var a = UWA.createElement('span', {
+ html: t,
+ });
+ return o.inject(n), a.inject(n), n.outerHTML;
+ }),
+ (a.createCustomOwner = function (e, t) {
+ var o = '/api/user/getpicture/login/' + t + '/format/normal',
+ a = i.getGlobalVariable().computeSwymUrl(o),
+ r = new UWA.Element('div', {
+ class: 'members',
+ }),
+ s = new UWA.Element('div', {
+ class: 'assignee',
+ }),
+ l = '';
+ if (i.getGlobalVariable().isSwymInstalled)
+ l = UWA.createElement('img', {
+ class: 'userIcon',
+ src: a,
+ });
+ else {
+ var c = n.getAvatarDetails(t);
+ (l = UWA.createElement('div', {
+ html: c.avatarStr,
+ class: 'avatarIcon',
+ })).style.setProperty('background', c.avatarColor);
+ }
+ l.inject(s);
+ var d = UWA.createElement('span', {
+ class: 'userName',
+ html: t,
+ });
+ return s.inject(r), d.inject(r), r.outerHTML;
+ }),
+ a
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/components/welcomePanel/ChgGovWelcomePanelWrapper',
+ [
+ 'DS/Core/PointerEvents',
+ 'DS/Utilities/TouchUtils',
+ 'DS/ENOXWelcomePanel/js/ENOXWelcomePanel',
+ 'DS/ENOChgGovernanceUX/scripts/config/ChgGovAppGlobalConfig',
+ 'DS/ENOChgRouter5/scripts/ChgRouter',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ ],
+ function (e, t, i, n, o, a, r) {
+ 'use strict';
+ var s = function () {};
+ return (
+ (s.prototype.init = function (e, t, o) {
+ this._applicationChannel = e;
+ var s = [];
+ 0 == r.getGlobalVariable().isNative &&
+ (s.push({
+ id: n.PATH_RECENTY_OPENED,
+ text: a.CHG_GOV_Welcome_Activity_Recent,
+ fonticon: 'clock',
+ className: 'action-new',
+ tooltip: a.CHG_GOV_Welcome_Activity_Recent,
+ category: 'View',
+ }),
+ s.push({
+ id: n.PATH_OPEN_CHANGE_ORDER,
+ text: a.CHG_GOV_Welcome_Activity_Open_Change_Orders,
+ fonticon: 'open',
+ className: 'action-new',
+ isNotHighlightable: !0,
+ tooltip: a.CHG_GOV_Welcome_Activity_Open_Change_Orders,
+ category: 'View',
+ }),
+ s.push({
+ id: n.PATH_MY_CHANGE_REQUESTS,
+ text: a.CHG_GOV_Welcome_Activity_My_Change_Requests,
+ fonticon: 'change-request',
+ className: 'action-new',
+ tooltip: a.CHG_GOV_Welcome_Activity_My_Change_Requests,
+ category: 'View',
+ }),
+ s.push({
+ id: n.PATH_MY_CHANGE_ORDERS,
+ text: a.CHG_GOV_Welcome_Activity_My_Change_Orders,
+ fonticon: 'change-order',
+ className: 'action-new',
+ tooltip: a.CHG_GOV_Welcome_Activity_My_Change_Orders,
+ category: 'View',
+ })),
+ s.push({
+ id: n.PATH_MY_CHANGE_ACTIONS,
+ text: a.CHG_GOV_Welcome_Activity_My_Change_Actions,
+ fonticon: 'change-action',
+ className: 'action-new',
+ tooltip: a.CHG_GOV_Welcome_Activity_My_Change_Actions,
+ category: 'View',
+ });
+ var l = [];
+ 0 == r.getGlobalVariable().isNative &&
+ (l.push({
+ id: n.PATH_NEW_CHANGE_REQUEST,
+ text: a.CHG_GOV_Welcome_Activity_New_Change_Request,
+ fonticon: 'change-request-add',
+ className: 'action-new',
+ isNotHighlightable: !0,
+ tooltip: a.CHG_GOV_Welcome_Activity_New_Change_Request,
+ category: 'View',
+ }),
+ (('true' === r.getGlobalVariable().isFullLicence &&
+ !1 === r.getGlobalVariable().isNative) ||
+ ('true' === r.getGlobalVariable().isDerivativeLicense &&
+ !1 === r.getGlobalVariable().isNative)) &&
+ l.push({
+ id: n.PATH_NEW_CHANGE_ORDER,
+ text: a.CHG_GOV_Welcome_Activity_New_Change_Order,
+ fonticon: 'change-order-add',
+ className: 'action-new',
+ isNotHighlightable: !0,
+ tooltip: a.CHG_GOV_Welcome_Activity_New_Change_Order,
+ category: 'View',
+ })),
+ l.push({
+ id: n.PATH_NEW_CHANGE_ACTION,
+ text: a.CHG_GOV_Welcome_Activity_New_Change_Action,
+ fonticon: 'change-action-add',
+ className: 'action-new',
+ isNotHighlightable: !0,
+ tooltip: a.CHG_GOV_Welcome_Activity_New_Change_Action,
+ category: 'View',
+ });
+ var c = [
+ {
+ id: 'appHeader',
+ title: a.CHG_GOV_Welcome_Activity_AppHeader,
+ actions: [
+ {
+ id: 'appInfo',
+ text: a.CHG_GOV_Welcome_Activity_AppIntro,
+ fonticon: 'dummy',
+ className: 'chg-welcome-panel-appInfo',
+ },
+ ],
+ },
+ {
+ id: 'quick_access',
+ title: a.CHG_GOV_Welcome_Activity_QuickAccess,
+ actions: s,
+ },
+ {
+ id: 'start_activities',
+ title: a.CHG_GOV_Welcome_Activity_StartActivities,
+ actions: l,
+ },
+ ];
+ 'ENOWCHA_AP' == widget.getValue('appId') &&
+ (c[0].title = a.CHG_EXE_Welcome_Activity_AppHeader),
+ new i({
+ collapsed: !1,
+ title: 'chgGov',
+ notifications: [],
+ activities: c,
+ parentContainer: o,
+ modelEvents: e,
+ }).render(),
+ this._subscribeToEvents();
+ }),
+ (s.prototype._subscribeToEvents = function () {
+ var i = this;
+ this._applicationChannel.subscribe(
+ {
+ event: 'welcome-panel-action-selected',
+ },
+ function (i) {
+ if (
+ (i && 'home' === i.id
+ ? o.navigate(n.ROUTE_LANDING_PAGE)
+ : i && i.id === n.PATH_MY_CHANGE_ORDERS
+ ? o.navigate(n.ROUTE_MY_CHANGE_ORDERS, {
+ data: 'from welcomepanel',
+ })
+ : i && i.id === n.PATH_RECENTY_OPENED
+ ? o.navigate(n.ROUTE_RECENTY_OPENED, {
+ data: 'from welcomepanel',
+ })
+ : i && i.id === n.PATH_MY_CHANGE_REQUESTS
+ ? o.navigate(n.ROUTE_MY_CHANGE_REQUESTS, {
+ data: 'from welcomepanel',
+ })
+ : i &&
+ i.id === n.PATH_MY_CHANGE_ACTIONS &&
+ o.navigate(n.ROUTE_MY_CHANGE_ACTIONS, {
+ data: 'from welcomepanel',
+ }),
+ t.getTouchMode())
+ ) {
+ var a = new MouseEvent(e.POINTERDOWN, {
+ bubbles: !1,
+ });
+ document.dispatchEvent(a);
+ }
+ },
+ ),
+ this._applicationChannel.subscribe(
+ {
+ event: 'welcome-panel-select-action',
+ },
+ function (e) {
+ e && e.id === n.PATH_MY_CHANGE_ORDERS
+ ? i._applicationChannel.publish({
+ event: 'topbar-show-title',
+ data: {
+ id: n.ROUTE_MY_CHANGE_ORDERS,
+ label: a.CHG_GOV_Welcome_Activity_My_Change_Orders,
+ },
+ })
+ : e && e.id === n.PATH_RECENTY_OPENED
+ ? i._applicationChannel.publish({
+ event: 'topbar-show-title',
+ data: {
+ id: n.ROUTE_RECENTY_OPENED,
+ label: a.CHG_GOV_Welcome_Activity_Recent,
+ },
+ })
+ : e && e.id === n.PATH_MY_CHANGE_REQUESTS
+ ? i._applicationChannel.publish({
+ event: 'topbar-show-title',
+ data: {
+ id: n.ROUTE_MY_CHANGE_REQUESTS,
+ label: a.CHG_GOV_Welcome_Activity_My_Change_Requests,
+ },
+ })
+ : e && e.id === n.PATH_MY_CHANGE_ACTIONS
+ ? i._applicationChannel.publish({
+ event: 'topbar-show-title',
+ data: {
+ id: n.ROUTE_MY_CHANGE_ACTIONS,
+ label: a.CHG_GOV_Welcome_Activity_My_Change_Actions,
+ },
+ })
+ : e && (e.id, n.PATH_CO_IDCard);
+ },
+ );
+ }),
+ s
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/contributor/ChgCRContributorsTileViewLayout',
+ [
+ 'UWA/Core',
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/contributor/util/ChgCRContributorsGridUtil',
+ ],
+ function (e, t) {
+ 'use strict';
+ return {
+ changeView: function (e) {
+ setTimeout(function () {
+ t.changeView('TileView');
+ }, 100);
+ },
+ showEmptyView: function () {
+ var e = document.getElementById('contributorEmptyTileViewDiv');
+ e && (e.removeClassName('hideView'), e.addClassName('showEmptyView'));
+ },
+ hideEmptyView: function () {
+ var e = document.getElementById('contributorEmptyTileViewDiv');
+ e && (e.addClassName('hideView'), e.removeClassName('showEmptyView'));
+ },
+ };
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/changeAction/util/ChgChangeActionGridColsUtil',
+ [
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/changeAction/ChgChangeActionToolbar',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgServices/scripts/services/ChgMembersServices',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgDataGridUtil',
+ ],
+ function (e, t, i, n, o) {
+ 'use strict';
+ let a = Object.create(null);
+ return (
+ (a.getColumns = function () {
+ let e = [];
+ return (
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'titleTree',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'typeNLS',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'name',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'maturityNLS',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'severityNLS',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'ownerFullName',
+ }),
+ ),
+ e
+ );
+ }),
+ (a.changeView = function (i) {
+ if ('GridView' == i)
+ (this.currentView = 'Grid'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-list' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-list',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_GRID_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'selected'),
+ (n.options.grid.data.menu[1].state = 'unselected'),
+ (o = document.querySelector(
+ '.toolbar-CA-grid-div .wux-ui-3ds-view-list',
+ )) && o.addClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-CA-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.removeClassName('currentView'),
+ (r = document.querySelector('.content-CA-grid-div')) &&
+ (r.removeClassName('hideView'),
+ r.removeClassName('nonVisible'),
+ r.addClassName('showView')),
+ (s = document.querySelector('.content-CA-tile-div')) &&
+ (s.removeClassName('showView'), s.addClassName('hideView'));
+ else if ('TileView' == i) {
+ var n, o, a, r, s;
+ (this.currentView = 'Tile'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-small-tile' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-small-tile',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_TILE_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'unselected'),
+ (n.options.grid.data.menu[1].state = 'selected'),
+ (o = document.querySelector(
+ '.toolbar-CA-grid-div .wux-ui-3ds-view-list',
+ )) && o.removeClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-CA-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.addClassName('currentView'),
+ (r = document.querySelector('.content-CA-grid-div')) &&
+ (r.removeClassName('showView'), r.addClassName('hideView')),
+ (s = document.querySelector('.content-CA-tile-div')) &&
+ (s.removeClassName('hideView'), s.addClassName('showView'));
+ }
+ }),
+ a
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/relatedScope/util/ChgRelatedScopeGridColsUtil',
+ [
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/relatedScope/ChgRelatedScopeViewToolbar',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgServices/scripts/services/ChgMembersServices',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgDataGridUtil',
+ ],
+ function (e, t, i, n, o) {
+ 'use strict';
+ let a = Object.create(null);
+ return (
+ (a.getColumns = function () {
+ var e = [];
+ return (
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'titleTree',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'typeNLS',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'name',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'revision',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'currentNLS',
+ }),
+ ),
+ e.push(
+ o.getColumnDefinition({
+ dataIndex: 'ownerFullName',
+ }),
+ ),
+ e
+ );
+ }),
+ (a.changeView = function (i) {
+ if ('GridView' == i)
+ (this.currentView = 'Grid'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-list' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-list',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_GRID_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'selected'),
+ (n.options.grid.data.menu[1].state = 'unselected'),
+ (o = document.querySelector(
+ '.toolbar-CO-relatedScope-grid-div .wux-ui-3ds-view-list',
+ )) && o.addClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-CO-relatedScope-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.removeClassName('currentView'),
+ (r = document.querySelector(
+ '.content-CO-relatedScope-grid-div',
+ )) &&
+ (r.removeClassName('hideView'),
+ r.removeClassName('nonVisible'),
+ r.addClassName('showView')),
+ (s = document.querySelector(
+ '.content-CO-relatedScope-tile-div',
+ )) && (s.removeClassName('showView'), s.addClassName('hideView'));
+ else if ('TileView' == i) {
+ var n, o, a, r, s;
+ (this.currentView = 'Tile'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-small-tile' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-small-tile',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_TILE_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'unselected'),
+ (n.options.grid.data.menu[1].state = 'selected'),
+ (o = document.querySelector(
+ '.toolbar-CO-relatedScope-grid-div .wux-ui-3ds-view-list',
+ )) && o.removeClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-CO-relatedScope-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.addClassName('currentView'),
+ (r = document.querySelector(
+ '.content-CO-relatedScope-grid-div',
+ )) && (r.removeClassName('showView'), r.addClassName('hideView')),
+ (s = document.querySelector(
+ '.content-CO-relatedScope-tile-div',
+ )) && (s.removeClassName('hideView'), s.addClassName('showView'));
+ }
+ }),
+ a
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/recents/util/ChgGovRecentsContextualMenu',
+ [
+ 'UWA/Core',
+ 'DS/i3DXCompassPlatformServices/OpenWith',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgChangeOrderUtil',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovCommonDelete',
+ 'DS/LifecycleCmd/MaturityCmd',
+ 'DS/ENOChgServices/scripts/services/ChgPropertiesServices',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/UIKIT/Input/Text',
+ 'DS/UIKIT/Input/Button',
+ 'DS/Notifications/NotificationsManagerUXMessages',
+ 'DS/Notifications/NotificationsManagerViewOnScreen',
+ 'DS/UIKIT/DropdownMenu',
+ 'DS/UIKIT/Dropdown',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgServices/scripts/services/ChgDataProcess',
+ 'DS/ENOChgServices/scripts/services/ChgInfraService',
+ 'require',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgDataGridUtil',
+ ],
+ function (e, t, i, n, o, a, r, s, l, c, d, u, g, p, h, m, C, v) {
+ 'use strict';
+ var f = {
+ showRMBMenuOnGrid: function (e, t, i) {
+ return new Promise(function (n, o) {
+ var r = e.cellInfos.nodeModel.getTreeDocument().getSelectedNodes();
+ const s = r.map((e) => e.options.grid.id);
+ var l = !1;
+ r.length > 1 && (l = !0);
+ var c = [];
+ c.push(a.createPropertyPushItem(s)),
+ c.push(f.getRelationalExplorerMenu(e));
+ var d = C('DS/ENOChgServices/scripts/services/ChgDataService'),
+ u = C(
+ 'DS/ENOChgServices/scripts/services/ChgIDCardCommonServices',
+ ),
+ g = {
+ objectId: e.cellInfos.nodeModel.options.grid.id,
+ objectType: e.cellInfos.nodeModel.options.grid.type,
+ displayName: e.cellInfos.nodeModel.options.grid.name,
+ displayType: e.cellInfos.nodeModel.options.grid.displayType,
+ facetName: 'dependency',
+ },
+ b = u.openWith(g),
+ w = null,
+ D = [];
+ D.push(b),
+ l ||
+ ('ChangeRequest' == r[0].options.grid.isKindOfType
+ ? ((w = d.getChangeRequestUserAccess(
+ e.cellInfos.nodeModel.options.grid.id,
+ )),
+ D.push(w))
+ : 'ChangeOrder' == r[0].options.grid.isKindOfType
+ ? ((w = d.getChangeOrderUserAccess(
+ e.cellInfos.nodeModel.options.grid.id,
+ )),
+ D.push(w))
+ : ((w = d.getChangeActionUserAccess(
+ e.cellInfos.nodeModel.options.grid.id,
+ )),
+ D.push(w))),
+ Promise.all(D).then(function (o) {
+ if ((o[0] && c.push(o[0]), l))
+ 'true' == p.getGlobalVariable().isFullLicence &&
+ c.push(v.getMaturityMenu(e)),
+ c.push(m.getCopyLink(r)),
+ c.push(f.getTransferMenu(e)),
+ 'true' == p.getGlobalVariable().isFullLicence &&
+ (c.push(v.getMaturityMenu(e)),
+ c.push(f.getDeleteMenu(e, t, i)));
+ else {
+ if ('ChangeOrder' == r[0].options.grid.isKindOfType) {
+ var a = o[1].data[0].dataelements;
+ (a = h.processAccessBitCO(a)),
+ ((o[1] && 'true' == a.Promote) || 'true' == a.Demote) &&
+ c.push(v.getMaturityMenu(e)),
+ c.push(m.getCopyLink(r)),
+ o[1] &&
+ 'true' == a.TransferOwnership &&
+ c.push(f.getTransferMenu(e)),
+ 'true' == a.Delete && c.push(f.getDeleteMenu(e, t, i));
+ }
+ 'ChangeRequest' == r[0].options.grid.isKindOfType &&
+ (c.push(v.getMaturityMenu(e)),
+ c.push(m.getCopyLink(r)),
+ o[1] &&
+ 'true' == o[1].data[0].dataelements.TransferOwnership &&
+ c.push(f.getTransferMenu(e)),
+ 'true' == o[1].data[0].dataelements.Delete &&
+ c.push(f.getDeleteMenu(e, t, i))),
+ 'ChangeAction' == r[0].options.grid.isKindOfType &&
+ (c.push(v.getMaturityMenu(e)),
+ c.push(m.getCopyLink(r)),
+ o[1] &&
+ o[1].data[0] &&
+ ('true' == o[1].data[0].Transfer &&
+ c.push(f.getTransferMenu(e)),
+ 'true' == o[1].data[0].Delete &&
+ c.push(f.getDeleteMenu(e, t, i))));
+ }
+ n(c);
+ });
+ });
+ },
+ getRelationalExplorerMenu: function (e) {
+ return {
+ type: 'PushItem',
+ title: r.CHG_GOV_Menu_Relational_Explorer,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-object-related',
+ },
+ action: {
+ callback: function (t) {
+ require([
+ 'DS/ENOChgServices/scripts/services/ChgIDCardCommonServices',
+ ], function (t) {
+ for (
+ var i = e.cellInfos.nodeModel
+ .getTreeDocument()
+ .getSelectedNodes(),
+ n = [],
+ o = 0;
+ o < i.length;
+ o++
+ ) {
+ var a = i[o].options.grid.id;
+ n.push(a);
+ }
+ t.openRelationalExplorer(n);
+ });
+ },
+ },
+ };
+ },
+ getTransferMenu: function (e) {
+ return {
+ type: 'PushItem',
+ title: r.CHG_GOV_Menu_Transfer,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-move-to',
+ },
+ action: {
+ callback: function (t) {
+ for (
+ var i = e.cellInfos.nodeModel
+ .getTreeDocument()
+ .getSelectedNodes(),
+ n = [],
+ o = 0;
+ o < i.length;
+ o++
+ )
+ n.push(i[o].options.grid);
+ require([
+ 'DS/ENOChgGovernanceUX/scripts/wrapper/ChgGovTransferWrapper',
+ ], function (e) {
+ e.launchTransferDialog(n);
+ });
+ },
+ },
+ };
+ },
+ getDeleteMenu: function (e, t, i) {
+ return {
+ type: 'PushItem',
+ title: r.CHG_GOV_Menu_Delete,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-trash',
+ },
+ action: {
+ callback: function () {
+ for (
+ var o = e.cellInfos.nodeModel
+ .getTreeDocument()
+ .getSelectedNodes(),
+ a = [],
+ r = 0;
+ r < o.length;
+ r++
+ ) {
+ var s = o[r],
+ l = {
+ physicalid: s.options.grid.id,
+ nodeName: s.options.grid.name,
+ nodeTitle: s.options.grid.title,
+ };
+ a.push(l);
+ }
+ n.deleteNodes(a, t, i);
+ },
+ },
+ };
+ },
+ makeCopyLinkObject: function (e) {
+ var t = {
+ protocol: '3DXContent',
+ data: {
+ items: [],
+ },
+ };
+ return (
+ t.data.items.push({
+ envId: p.getGlobalVariable().tenant,
+ objectId: e.options.grid.id,
+ openLink: !0,
+ }),
+ t
+ );
+ },
+ showNotification: function (e, t, i, n, o, a, r) {
+ var s = {
+ level: e,
+ title: t,
+ subtitle: i,
+ message: n,
+ sticky: o,
+ allowUnsafeHTML: r || !1,
+ };
+ window.notifs ||
+ ((window.notifs = c), d.setNotificationManager(window.notifs)),
+ a ? d.inject(a) : d.elements.container.isInjected() || d.inject(),
+ window.notifs.addNotif(s);
+ },
+ };
+ return f;
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactBasis/util/ChgCRImpactBasisGridColsUtil',
+ [
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactBasis/ChgCRImpactBasisViewToolbar',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgServices/scripts/services/ChgMembersServices',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgDataGridUtil',
+ ],
+ function (e, t, i, n, o) {
+ 'use strict';
+ let a = Object.create(null);
+ return (
+ (a.getColumns = function (e) {
+ let t = !1;
+ void 0 !== e &&
+ 'true' === e.AddImpactBasis &&
+ 'true' === e.RemoveImpactBasis &&
+ (t = !0);
+ let n = [];
+ return (
+ n.push(
+ o.getColumnDefinition({
+ dataIndex: 'titleTree',
+ }),
+ ),
+ n.push(
+ o.getColumnDefinition({
+ dataIndex: 'typeNLS',
+ }),
+ ),
+ n.push(
+ o.getColumnDefinition({
+ dataIndex: 'name',
+ }),
+ ),
+ n.push(
+ o.getColumnDefinition({
+ dataIndex: 'revision',
+ }),
+ ),
+ n.push(
+ o.getColumnDefinition({
+ dataIndex: 'reasonForChange',
+ editableFlag: t,
+ massUpdateAllowedFlag: t,
+ }),
+ ),
+ n.push(
+ o.getColumnDefinition({
+ dataIndex: 'currentNLS',
+ }),
+ ),
+ n.push(
+ o.getColumnDefinition({
+ dataIndex: 'ownerFullName',
+ }),
+ ),
+ i.getGlobalVariable().is3DSpace &&
+ ((n[0].allowUnsafeHTMLContent = !0),
+ (n[0].getCellGroupingKey = function (e) {
+ return e.nodeModel.options.grid.title;
+ })),
+ n
+ );
+ }),
+ (a.changeView = function (i) {
+ if ('GridView' == i)
+ (this.currentView = 'Grid'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-list' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-list',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_GRID_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'selected'),
+ (n.options.grid.data.menu[1].state = 'unselected'),
+ (o = document.querySelector(
+ '.toolbar-impactBasis-grid-div .wux-ui-3ds-view-list',
+ )) && o.addClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-impactBasis-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.removeClassName('currentView'),
+ (r = document.querySelector('.content-impactBasis-grid-div')) &&
+ (r.removeClassName('hideView'),
+ r.removeClassName('nonVisible'),
+ r.addClassName('showView')),
+ (s = document.querySelector('.content-impactBasis-tile-div')) &&
+ (s.removeClassName('showView'), s.addClassName('hideView'));
+ else if ('TileView' == i) {
+ var n, o, a, r, s;
+ (this.currentView = 'Tile'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-small-tile' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-small-tile',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_TILE_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'unselected'),
+ (n.options.grid.data.menu[1].state = 'selected'),
+ (o = document.querySelector(
+ '.toolbar-impactBasis-grid-div .wux-ui-3ds-view-list',
+ )) && o.removeClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-impactBasis-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.addClassName('currentView'),
+ (r = document.querySelector('.content-impactBasis-grid-div')) &&
+ (r.removeClassName('showView'), r.addClassName('hideView')),
+ (s = document.querySelector('.content-impactBasis-tile-div')) &&
+ (s.removeClassName('hideView'), s.addClassName('showView'));
+ }
+ }),
+ a
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/model/recents/ChgCORecentsTreeModel',
+ [
+ 'UWA/Class/Model',
+ 'DS/TreeModel/TreeDocument',
+ 'DS/TreeModel/TreeNodeModel',
+ 'DS/TreeModel/DataModelSet',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgServices/scripts/services/ChgMembersServices',
+ 'DS/ENOChgGovernanceUX/scripts/view/recents/util/ChgGovRecentsCustomFields',
+ 'require',
+ ],
+ function (e, t, i, n, o, a, r, s, l) {
+ 'use strict';
+ return e.extend({
+ init: function () {},
+ setModelEvents: function (e) {
+ this._modelEvents = e;
+ },
+ getModelEvents: function () {
+ return this._modelEvents;
+ },
+ createTreeDocument: function (e) {
+ var i = new n();
+ return (
+ this.setModelEvents(e),
+ new t({
+ dataModelSet: i,
+ })
+ );
+ },
+ loadRecentChangeOrderData: function (e, t) {
+ e.prepareUpdate();
+ var i = this.createTreeDocumentNodeModel(t);
+ e.addRoot(i), e.pushUpdate();
+ },
+ createTreeDocumentNodeModel: function (e) {
+ for (var t = [], i = 0; i < e.length; i++) {
+ var n = this.createTreeNode(e[i]);
+ t.push(n);
+ }
+ return t;
+ },
+ createTreeNode: function (e) {
+ var t = s.createCustomNameField(e);
+ e.chgObjName = t;
+ var n = s.createCustomSeverity(e);
+ e.sev = n;
+ var o = s.createCustomChangeCoordinatorField(e);
+ e.chgObjCoordinator = o;
+ var a = s.createCustomOwnerField(e);
+ e.chgObjOwner = a;
+ var r = e.name + ' | ' + e.ownerFullName,
+ l = e.maturityNLS,
+ c = s.getStatusBarIcons(e),
+ d = s.statusbarIconsTooltips(e),
+ u = s.getCustomTooltip(e);
+ return new i({
+ label: e.title,
+ subLabel: r,
+ description: l,
+ children: e.isKindOfChangeAction ? null : [],
+ grid: e,
+ icons: [e.iconURL],
+ thumbnail: e.thumbnail,
+ contextualMenu: ['Copy1', 'Move1'],
+ statusbarIcons: c,
+ statusbarIconsTooltips: d,
+ customTooltip: u,
+ useAsyncPreExpand: !0,
+ });
+ },
+ });
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeAction/facets/members/ChgCAMemberFilterLayout',
+ [
+ 'DS/ENOChgGovernanceUX/scripts/view/changeAction/facets/members/util/ChgCAMemberFilterView',
+ 'require',
+ ],
+ function (e, t) {
+ 'use strict';
+ var i = {
+ createMemberFilter: function (t) {
+ (i.teamlayoutModel = t.model),
+ new e({
+ events: {
+ memberFilterKeyUp: function (e) {
+ i.enteredText = e.target.value;
+ var t = {
+ filteringMode: 'name',
+ text: i.enteredText,
+ };
+ i.filterCollectionAndUpdateUI(t);
+ },
+ memberRoleFilter: function (e) {
+ 'option1' != e.target.value &&
+ (i.enteredText = e.target.value);
+ var t = {
+ filteringMode: 'role',
+ text: i.enteredText ? i.enteredText : '',
+ contributorInclude: !1,
+ reviewInclude: !1,
+ followInclude: !1,
+ },
+ n = document.getElementById('allToggle'),
+ o = document.getElementById('contributorToggle');
+ o && o.checked && (t.contributorInclude = !0);
+ var a = document.getElementById('revMemToggle');
+ a && a.checked && (t.reviewInclude = !0);
+ var r = document.getElementById('followMemToggle');
+ r && r.checked && (t.followInclude = !0),
+ (0 == t.contributorInclude &&
+ 0 == t.reviewInclude &&
+ 0 == t.followInclude) ||
+ (1 == t.contributorInclude &&
+ 1 == t.reviewInclude &&
+ 1 == t.followInclude) ||
+ ('allToggle' == e.target.id && 1 == n.checked)
+ ? ((t.allInclude = !0),
+ (n.checked = !0),
+ (o.checked = !1),
+ (a.checked = !1),
+ (r.checked = !1))
+ : ((t.allInclude = !1), (n.checked = !1)),
+ i.filterCollectionAndUpdateUI(t);
+ },
+ },
+ })
+ .render()
+ .inject(t.target);
+ },
+ filterCollectionAndUpdateUI: function (e) {
+ var t = e.text;
+ i.teamlayoutModel.setFilterModel({
+ label: {
+ filterId: 'stringRegexp',
+ filterModel: {
+ condition1: {
+ type: 'contains',
+ filter: t,
+ },
+ },
+ },
+ role: {
+ filterId: 'stringRegexp',
+ },
+ });
+ var n = i.teamlayoutModel.getFilterManager().getFilters().role,
+ o = {};
+ 0 == e.allInclude &&
+ (1 == e.contributorInclude &&
+ (o.condition1 = {
+ type: 'contains',
+ filter: 'contributor',
+ }),
+ 1 == e.reviewInclude &&
+ (o.hasOwnProperty('condition1')
+ ? ((o.operator = 'or'),
+ (o.condition2 = {
+ type: 'contains',
+ filter: 'approver',
+ }))
+ : (o.condition1 = {
+ type: 'contains',
+ filter: 'approver',
+ })),
+ 1 == e.followInclude &&
+ (o.hasOwnProperty('condition1')
+ ? ((o.operator = 'or'),
+ (o.condition2 = {
+ type: 'contains',
+ filter: 'follower',
+ }))
+ : (o.condition1 = {
+ type: 'contains',
+ filter: 'follower',
+ })),
+ (n.filterModel = o));
+ },
+ launchFilterMemberPanel: function () {
+ var e = {
+ commandInfo: {
+ type: 'Change Action',
+ facet: 'Members',
+ action: 'CA>Members>Filter',
+ },
+ };
+ t(
+ 'DS/ENOChgProbes/scripts/ChgCloudProbeUtils',
+ ).cloudProbeUtils.genericCommandClickEventForAnalytics({
+ inputJSON: e,
+ });
+ var i = document.querySelector('.addmemberView'),
+ n = document.querySelector('.memberfilterView'),
+ o = document.querySelector('.content-member-grid-div'),
+ a = document.querySelector('.content-member-tile-div');
+ i.hide(),
+ o.removeClassName('teamview-opaque'),
+ a.removeClassName('teamview-opaque'),
+ 'block' == n.style.display
+ ? (n.hide(),
+ o.setStyle('height', 'calc(100% - 45px)'),
+ a.setStyle('height', 'calc(100% - 45px)'))
+ : (n.show(),
+ o.setStyle('height', 'calc(100% - 165px)'),
+ a.setStyle('height', 'calc(100% - 165px)'));
+ },
+ };
+ return i;
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/ChgCOTileViewLayout',
+ ['UWA/Core', 'DS/ENOChgGovernanceUX/scripts/util/ChgChangeOrderUtil'],
+ function (e, t) {
+ 'use strict';
+ return {
+ changeView: function (e) {
+ require([
+ 'DS/ENOChgGovernanceUX/scripts/view/ChgCODataGridLayout',
+ ], function (e) {
+ e.coGridView.coDatagrid.groupRows({
+ dataIndexesToGroup: [],
+ }),
+ setTimeout(function () {
+ t.changeView('TileView');
+ }, 100);
+ });
+ },
+ showEmptyView: function () {
+ var e = document.getElementById('emptyTileViewDiv');
+ e && (e.removeClassName('hideView'), e.addClassName('showEmptyView'));
+ },
+ hideEmptyView: function () {
+ var e = document.getElementById('emptyTileViewDiv');
+ e && (e.addClassName('hideView'), e.removeClassName('showEmptyView'));
+ },
+ };
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovLocalStorage',
+ ['DS/ENOChgGovernanceUX/scripts/util/ChgGovPreferenceConstant'],
+ function (e) {
+ 'use strict';
+ var t = {
+ init: function (e) {
+ var n;
+ ((t._LOCALSTORAGE_USER_ID = e),
+ window.localStorage.getItem(t._LOCALSTORAGE_KEY))
+ ? ((n = JSON.parse(
+ window.localStorage.getItem(t._LOCALSTORAGE_KEY),
+ ))[t._LOCALSTORAGE_KEY].hasOwnProperty(t._LOCALSTORAGE_USER_ID)
+ ? (n[t._LOCALSTORAGE_KEY][t._LOCALSTORAGE_USER_ID] =
+ Object.assign(
+ i,
+ n[t._LOCALSTORAGE_KEY][t._LOCALSTORAGE_USER_ID],
+ ))
+ : (n[t._LOCALSTORAGE_KEY][t._LOCALSTORAGE_USER_ID] = i),
+ window.localStorage.setItem(
+ t._LOCALSTORAGE_KEY,
+ JSON.stringify(n),
+ ))
+ : (((n = {})[t._LOCALSTORAGE_KEY] = {}),
+ (n[t._LOCALSTORAGE_KEY][t._LOCALSTORAGE_USER_ID] = i),
+ window.localStorage.setItem(
+ t._LOCALSTORAGE_KEY,
+ JSON.stringify(n),
+ ));
+ },
+ destroy: function () {
+ window.localStorage.removeItem(t._LOCALSTORAGE_KEY);
+ },
+ isPath: function (e, i) {
+ try {
+ if (window.localStorage.getItem(t._LOCALSTORAGE_KEY)) {
+ if (Array.isArray(e)) {
+ for (
+ var n = JSON.parse(
+ window.localStorage.getItem(t._LOCALSTORAGE_KEY),
+ ),
+ o = 0;
+ o < e.length;
+ o++
+ ) {
+ if (!n[e[o]] && '' != n[e[o]])
+ return (
+ console.log(
+ "ChgGovLocalStorage getItem() path doesn't exist",
+ ),
+ !!i && void 0
+ );
+ n = n[e[o]];
+ }
+ return !i || n;
+ }
+ return (
+ console.log(
+ 'ChgGovLocalStorage getItem() argument is not a Array',
+ ),
+ !!i && void 0
+ );
+ }
+ return (
+ console.log(
+ 'ChgGovLocalStorage getItem() LocalStorage not initialize',
+ ),
+ !!i && void 0
+ );
+ } catch (e) {
+ return console.error(e), !!i && void 0;
+ }
+ },
+ getValue: function (e) {
+ return this.isPath(e, !0);
+ },
+ setValue: function (e, i) {
+ if (this.isPath(e, !1)) {
+ var n = JSON.parse(
+ window.localStorage.getItem(t._LOCALSTORAGE_KEY),
+ ),
+ o = JSON.parse(JSON.stringify(e));
+ window.localStorage.setItem(
+ t._LOCALSTORAGE_KEY,
+ JSON.stringify(this.recursiveSearch(n, o, i, !0)),
+ );
+ }
+ },
+ recursiveSearch: function (e, t, i, n) {
+ return (
+ 2 == t.length
+ ? (e[t[1]] = i)
+ : n
+ ? this.recursiveSearch(e[t[0]], t, i, !1)
+ : (t.shift(), this.recursiveSearch(e[t[0]], t, i, !1)),
+ e
+ );
+ },
+ };
+ (t._LOCALSTORAGE_KEY = e._KEY),
+ (t._LOCALSTORAGE_VIEWS_PREFERENCES = e._VIEWS_PREFERENCES),
+ (t._LOCALSTORAGE_MY_CHANGE_ORDERS = e._MY_CHANGE_ORDERS),
+ (t._LOCALSTORAGE_CHANGE_ORDERS_DETAILS = e._CHANGE_ORDERS_DETAILS),
+ (t._LOCALSTORAGE_RECENTLY_OPENED = e._RECENTLY_OPENED);
+ var i = {
+ 'xchange-views-preferences': {
+ 'info-panel': {
+ 'info-open': '',
+ 'info-context': '',
+ 'info-width': '',
+ },
+ 'xchange-my-change-orders': {
+ 'xchange-list-view': {
+ view: '',
+ filterview: '',
+ sort: {},
+ search: '',
+ selections: [],
+ filters: {},
+ tagFilter: {},
+ },
+ },
+ 'xchange-change-orders-details': {
+ tab: '',
+ },
+ 'xchange-change-requests-details': {
+ tab: '',
+ },
+ 'xchange-change-actions-details': {
+ tab: '',
+ },
+ 'xchange-recently-opened': {
+ objectIDs: '',
+ },
+ },
+ };
+ return t;
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovApplicationPreferencesManager',
+ [
+ 'UWA/Class',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovLocalStorage',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovWidgetPreferenceManager',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovPreferenceConstant',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ ],
+ function (e, t, i, n, o) {
+ 'use strict';
+ return e.singleton({
+ init: function () {
+ var e = o.getGlobalVariable();
+ this.contextUser = e.contextUser;
+ },
+ initialize: function (e, n, o) {
+ (this._withLocalStorage = e),
+ (this._withWidgetPreferences = n),
+ (this._withUserPreferences = o),
+ e && t.init(this.contextUser),
+ n && i.prototype.initWidgetViewPreferences();
+ },
+ setUserId: function (e) {
+ this.userID = e;
+ },
+ isWidgetPreferencePath: function (e) {
+ return !!this._withWidgetPreferences && i.prototype.isPath(e, !1);
+ },
+ updatePreference: function (e, n) {
+ this._withWidgetPreferences &&
+ i.prototype.updateWidgetViewPreferences(e, n),
+ this._withLocalStorage &&
+ (e.splice(1, 0, this.userID), t.setValue(e, n)),
+ this._withUserPreferences;
+ },
+ updateTab: function (e, t) {
+ this.updatePreference(e.concat([n._TAB]), t);
+ },
+ updateFilter: function (e, t) {
+ this.updatePreference(e.concat([n._LIST_VIEW, n._FILTERVIEW]), t);
+ },
+ updateRecents: function (e, t) {
+ this.updatePreference(e.concat([n._OBJECTIDs]), t);
+ },
+ getPreference: function (e) {
+ return (
+ console.log(
+ 'XChangeApplicationPreferencesLanager -getPreference : ' + e,
+ ),
+ this._withWidgetPreferences &&
+ null != this.getWidgetPreferenceValue(e) &&
+ this.getWidgetPreferenceValue(e)
+ ? this.getWidgetPreferenceValue(e)
+ : this._withLocalStorage
+ ? (e.splice(1, 0, this.userID), this.getLocalStorageValue(e))
+ : void 0
+ );
+ },
+ getTab: function (e) {
+ return this.getPreference(e.concat([n._TAB]));
+ },
+ getFilter: function (e) {
+ return this.getPreference(e.concat([n._LIST_VIEW, n._FILTERVIEW]));
+ },
+ getRecents: function (e) {
+ return this.getPreference(e.concat([n._OBJECTIDs]));
+ },
+ setRouteInfo: function (e) {
+ if (this._withWidgetPreferences) {
+ var t = [n._KEY, n._LAST_ROUTE],
+ o = {
+ name: e && e.name ? e.name : void 0,
+ params: e && e.params ? e.params : void 0,
+ };
+ i.prototype.updateWidgetViewPreferences(t, o),
+ console.log(JSON.parse(widget.getValue('xchange-app'))),
+ console.log('');
+ }
+ },
+ getRouteInfo: function () {
+ if (this._withWidgetPreferences) {
+ var e = [n._KEY, n._LAST_ROUTE];
+ return this.getWidgetPreferenceValue(e);
+ }
+ return {
+ name: void 0,
+ params: {},
+ };
+ },
+ getLocalStorageValue: function (e) {
+ return t.getValue(e);
+ },
+ getWidgetPreferenceValue: function (e) {
+ return i.prototype.getValue(e);
+ },
+ });
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/util/changeRequest/ChgChangeRequestUtil',
+ [
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/ChgCRDataGridViewToolbar',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgGovernanceUX/scripts/config/ChgGovAppGlobalConfig',
+ 'DS/ENOChangeActionUX/scripts/CAPreferencesManager',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovCommonDelete',
+ 'DS/ENOChgServices/scripts/services/ChgMembersServices',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovApplicationPreferencesManager',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovPreferenceConstant',
+ 'DS/ENOChgServices/scripts/services/ChgDataService',
+ 'DS/ENOChgServices/scripts/services/ChgDataProcess',
+ 'DS/ENOChgRouter5/scripts/ChgRouter',
+ 'DS/ENOChgServices/scripts/services/ChgInfraService',
+ 'DS/PlatformAPI/PlatformAPI',
+ 'DS/LifecycleCmd/MaturityCmd',
+ 'DS/UIKIT/Input/Text',
+ 'DS/UIKIT/Input/Button',
+ 'DS/Notifications/NotificationsManagerUXMessages',
+ 'DS/Notifications/NotificationsManagerViewOnScreen',
+ 'DS/UIKIT/DropdownMenu',
+ 'DS/UIKIT/Dropdown',
+ 'DS/UIKIT/Mask',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgDataGridUtil',
+ 'require',
+ ],
+ function (
+ e,
+ t,
+ i,
+ n,
+ o,
+ a,
+ r,
+ s,
+ l,
+ c,
+ d,
+ u,
+ g,
+ p,
+ h,
+ m,
+ C,
+ v,
+ f,
+ b,
+ w,
+ D,
+ S,
+ y,
+ ) {
+ 'use strict';
+ var _ = Object.create(null);
+ return (
+ (_.getColumns = function () {
+ let e = [];
+ return (
+ e.push(
+ S.getColumnDefinition({
+ dataIndex: 'titleTree',
+ }),
+ ),
+ e.push(
+ S.getColumnDefinition({
+ dataIndex: 'co_name',
+ }),
+ ),
+ e.push(
+ S.getColumnDefinition({
+ dataIndex: 'maturityNLS',
+ }),
+ ),
+ e.push(
+ S.getColumnDefinition({
+ dataIndex: 'severityNLS',
+ }),
+ ),
+ e.push(
+ S.getColumnDefinition({
+ dataIndex: 'ownerFullName',
+ }),
+ ),
+ e.push(
+ S.getColumnDefinition({
+ dataIndex: 'changeCoordinatorFullName',
+ }),
+ ),
+ e.push(
+ S.getColumnDefinition({
+ dataIndex: 'collabspaceNLS',
+ }),
+ ),
+ e.push(
+ S.getColumnDefinition({
+ dataIndex: 'organizationNLS',
+ }),
+ ),
+ e.push(
+ S.getColumnDefinition({
+ dataIndex: 'applicabilityNLS',
+ }),
+ ),
+ e.push(
+ S.getColumnDefinition({
+ dataIndex: 'modificationDate',
+ }),
+ ),
+ e.push(
+ S.getColumnDefinition({
+ dataIndex: 'creationDate',
+ }),
+ ),
+ e
+ );
+ }),
+ (_.makeCopyLinkObject = function (e) {
+ var t = {
+ protocol: '3DXContent',
+ data: {
+ items: [],
+ },
+ };
+ return (
+ t.data.items.push({
+ envId: i.getGlobalVariable().tenant,
+ objectId: e.options.grid.id,
+ openLink: !0,
+ }),
+ t
+ );
+ }),
+ (_.showNotification = function (e, t, i, n, o, a, r) {
+ var s = {
+ level: e,
+ title: t,
+ subtitle: i,
+ message: n,
+ sticky: o,
+ allowUnsafeHTML: r || !1,
+ };
+ window.notifs ||
+ ((window.notifs = v), f.setNotificationManager(window.notifs)),
+ a ? f.inject(a) : f.elements.container.isInjected() || f.inject(),
+ window.notifs.addNotif(s);
+ }),
+ (_.getRelationalExplorerMenu = function (t, i, n) {
+ return {
+ type: 'PushItem',
+ title: e.CHG_GOV_Menu_Relational_Explorer,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-object-related',
+ },
+ action: {
+ callback: function (e) {
+ require([
+ 'DS/ENOChgServices/scripts/services/ChgIDCardCommonServices',
+ ], function (e) {
+ let t = i.cellInfos.nodeModel
+ .getTreeDocument()
+ .getSelectedNodes(),
+ o = [];
+ for (let e = 0; e < t.length; e++) {
+ let i = t[e].options.grid.id;
+ o.push(i);
+ }
+ e.openRelationalExplorer(n || o);
+ });
+ },
+ },
+ };
+ }),
+ (_.getTransferMenu = function (t, i) {
+ return {
+ type: 'PushItem',
+ title: e.CHG_GOV_Menu_Transfer,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-move-to',
+ },
+ action: {
+ callback: function (e) {
+ let t = i.cellInfos.nodeModel
+ .getTreeDocument()
+ .getSelectedNodes(),
+ n = [];
+ for (let e = 0; e < t.length; e++) n.push(t[e].options.grid);
+ require([
+ 'DS/ENOChgGovernanceUX/scripts/wrapper/ChgGovTransferWrapper',
+ ], function (e) {
+ e.launchTransferDialog(n);
+ });
+ },
+ },
+ };
+ }),
+ (_.getDeleteMenu = function (t, i, n) {
+ return {
+ type: 'PushItem',
+ title: e.CHG_GOV_Menu_Delete,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-trash',
+ },
+ action: {
+ callback: function () {
+ let e = i.cellInfos.nodeModel
+ .getTreeDocument()
+ .getSelectedNodes(),
+ t = [];
+ for (let i = 0; i < e.length; i++) {
+ let n = e[i],
+ o = {
+ physicalid: n.options.grid.id,
+ nodeName: n.options.grid.name,
+ nodeTitle: n.options.grid.title,
+ };
+ t.push(o);
+ }
+ let o = require('DS/ENOChgGovernanceUX/scripts/view/changeRequest/ChgCRDataGridLayout');
+ a.deleteNodes(t, n, o.removeDataFromGrid);
+ },
+ },
+ };
+ }),
+ (_.changeView = function (i) {
+ if (
+ (widget.body.getDimensions().width <= n.MOBILE_CUTOFF
+ ? o.updateCASummaryViewMobile(i)
+ : o.updateCASummaryViewDesktop(i),
+ 'GridView' == i)
+ ) {
+ this.currentView = 'Grid';
+ let i = t.toolbar.getNodeModelByID('view');
+ i &&
+ 'view-list' != i.options.grid.semantics.icon.iconName &&
+ i.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-list',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_GRID_VIEW,
+ }),
+ (i.options.grid.data.menu[0].state = 'selected'),
+ (i.options.grid.data.menu[1].state = 'unselected');
+ let n = document.querySelector(
+ '.toolbar-cr-div .wux-ui-3ds-view-list',
+ );
+ n && n.addClassName('currentView');
+ let o = document.querySelector(
+ '.toolbar-co-div .wux-ui-3ds-view-small-tile',
+ );
+ o && o.removeClassName('currentView');
+ let a = document.querySelector('.crgridView');
+ a &&
+ (a.removeClassName('hideView'),
+ a.removeClassName('nonVisible'),
+ a.addClassName('showView'));
+ let r = document.querySelector('.crtileView');
+ r && (r.removeClassName('showView'), r.addClassName('hideView'));
+ } else if ('TileView' == i) {
+ this.currentView = 'Tile';
+ let i = t.toolbar.getNodeModelByID('view');
+ i &&
+ 'view-small-tile' != i.options.grid.semantics.icon.iconName &&
+ i.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-small-tile',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_TILE_VIEW,
+ }),
+ (i.options.grid.data.menu[0].state = 'unselected'),
+ (i.options.grid.data.menu[1].state = 'selected');
+ let n = document.querySelector(
+ '.toolbar-co-div .wux-ui-3ds-view-list',
+ );
+ n && n.removeClassName('currentView');
+ let o = document.querySelector(
+ '.toolbar-cr-div .wux-ui-3ds-view-small-tile',
+ );
+ o && o.addClassName('currentView');
+ let a = document.querySelector('.crgridView');
+ a && (a.removeClassName('showView'), a.addClassName('hideView'));
+ let r = document.querySelector('.crtileView');
+ r && (r.removeClassName('hideView'), r.addClassName('showView'));
+ }
+ }),
+ (_.createCustomSeverity = function (e, t) {
+ let i = 'sevLow wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-level-low';
+ 'Medium' == e
+ ? (i = 'sevMed wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-level-medium')
+ : 'High' == e &&
+ (i = 'sevHigh wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-level-high');
+ let n = new UWA.Element('div', {}),
+ o = new UWA.Element('div', {
+ class: 'gridIconContainer',
+ });
+ UWA.createElement('div', {
+ class: i,
+ }).inject(o);
+ let a = UWA.createElement('span', {
+ html: t,
+ });
+ return o.inject(n), a.inject(n), n.outerHTML;
+ }),
+ (_.createCustomOwner = function (e, t) {
+ let n = '/api/user/getpicture/login/' + t + '/format/normal',
+ o = i.getGlobalVariable().computeSwymUrl(n),
+ a = new UWA.Element('div', {
+ class: 'members',
+ }),
+ s = new UWA.Element('div', {
+ class: 'assignee',
+ }),
+ l = '';
+ if (i.getGlobalVariable().isSwymInstalled)
+ l = UWA.createElement('img', {
+ class: 'userIcon',
+ src: o,
+ });
+ else {
+ let e = r.getAvatarDetails(t);
+ (l = UWA.createElement('div', {
+ html: e.avatarStr,
+ class: 'avatarIcon',
+ })).style.setProperty('background', e.avatarColor);
+ }
+ l.inject(s);
+ let c = UWA.createElement('span', {
+ class: 'userName',
+ html: t,
+ });
+ return s.inject(a), c.inject(a), a.outerHTML;
+ }),
+ (_.createHeaderFieldsJSON = function (t) {
+ return new Promise(function (i, n) {
+ let o = {
+ 'ds6w:project': [t.model.collabspace],
+ 'ds6w:organizationResponsible': [t.model.organization],
+ };
+ g.getNLSValuesPromise(o).then(function (n) {
+ let o = n['ds6w:organizationResponsible'][t.model.organization],
+ a = n['ds6w:project'][t.model.collabspace],
+ r = {
+ id: t.model.id,
+ name: t.model.name,
+ revision: t.model.revision,
+ type: t.model.type,
+ title: t.model.title,
+ thumbnail: t.model.thumbnail,
+ iconURL: t.model.iconURL,
+ minified: !1,
+ onHold: t.model.onHold,
+ isKindOfType: t.model.isKindOfType,
+ attributes: {
+ layout: [
+ ['maturity', 'owner', 'collabSpace'],
+ ['Applicability', 'Attachments', 'RelatedScope'],
+ ['orgnaization'],
+ ],
+ mapping: {
+ owner: {
+ fieldNLS: e.CHG_GOV_DataGrid_Column_Owner,
+ valueActual: t.model.owner,
+ valueDisplay: t.model.ownerFullName,
+ showLoader: !1,
+ displayWhenMinified: !0,
+ editable: !0,
+ accessBit: 'TransferOwnership',
+ },
+ collabSpace: {
+ fieldNLS: e.CHG_GOV_DataGrid_Column_CollabSpace,
+ valueActual: t.model.collabspace,
+ valueDisplay: a,
+ showLoader: !1,
+ displayWhenMinified: !0,
+ editable: !0,
+ accessBit: 'TransferOwnership',
+ },
+ maturity: {
+ fieldNLS: e.CHG_GOV_DataGrid_Column_Maturity,
+ valueActual: t.model.maturity,
+ valueDisplay: t.model.maturityNLS,
+ showLoader: !1,
+ displayWhenMinified: !0,
+ editable: !0,
+ },
+ orgnaization: {
+ fieldNLS: e.CHG_GOV_DataGrid_Column_Organization,
+ valueActual: t.model.organization,
+ valueDisplay: o,
+ showLoader: !1,
+ displayWhenMinified: !0,
+ editable: !0,
+ accessBit: 'TransferOwnership',
+ },
+ Applicability: {
+ fieldNLS: e.CHG_GOV_Header_Applicability,
+ valueActual: 'No',
+ valueDisplay: 'No',
+ showLoader: !0,
+ displayWhenMinified: !0,
+ editable: !0,
+ },
+ Attachments: {
+ fieldNLS: e.CHG_GOV_Header_Attachments,
+ valueActual: 'No',
+ valueDisplay: 'No',
+ showLoader: !1,
+ displayWhenMinified: !0,
+ editable: !0,
+ },
+ RelatedScope: {
+ fieldNLS: e.CHG_GOV_Header_RelatedScope,
+ valueActual: 'No',
+ valueDisplay: 'No',
+ showLoader: !1,
+ displayWhenMinified: !0,
+ editable: !0,
+ },
+ },
+ },
+ freeSpaces: [
+ {
+ type: 'text',
+ data: t.model.description,
+ },
+ ],
+ menuItems: [
+ {
+ id: 'chgHold',
+ text: e.CHG_GOV_Header_Menu_Hold,
+ fonticon: 'fonticon fonticon-pause',
+ accessBit: 'Hold',
+ },
+ {
+ id: 'chgResume',
+ text: e.CHG_GOV_Header_Menu_Resume,
+ fonticon: 'fonticon fonticon-resume',
+ accessBit: 'Resume',
+ },
+ {
+ id: 'chgCancel',
+ text: e.CHG_GOV_Header_Menu_Cancel,
+ fonticon: 'fonticon fonticon-block',
+ accessBit: 'Cancel',
+ },
+ ],
+ };
+ i(r);
+ });
+ });
+ }),
+ (_.getCRTabs = function (e, t, i) {
+ this._pathRequestsDetails = [
+ l._KEY,
+ l._VIEWS_PREFERENCES,
+ l._CHANGE_REQUESTS_DETAILS,
+ ];
+ var n = s.getTab(this._pathRequestsDetails);
+ let o = 'crAffectedItems';
+ (o = '' == n ? 'crAffectedItems' : n), console.log(n);
+ let a = this.getCRMembersTab(e, t, o),
+ r = this.getCRAssessmentTab(e, t, o, i);
+ return [
+ this.getCRCusTab(e, t, o, i),
+ this.getCRAffectedItemsTab(e, t, o, i),
+ r,
+ this.getCRChangeOrchestrationTab(e, t, o, i),
+ a,
+ this.getCRApprovalsTab(e, t, o),
+ ];
+ }),
+ (_.getCRAssessmentTab = (t, i, n, o) => {
+ let a = !1;
+ return (
+ 'crAssessment' == n && (a = !0),
+ (i.isSelected = a),
+ {
+ label: e.CHG_GOV_Home_Tab_Assessment,
+ isSelected: a,
+ index: 1,
+ value: 'crAssessment',
+ content: t.createCRAssessmentTab(i, o),
+ icon: {
+ iconName: 'change-request-chart-line-bar',
+ fontIconFamily: WUXManagedFontIcons.Font3DS,
+ },
+ }
+ );
+ }),
+ (_.getCRAffectedItemsTab = (t, i, n, o) => {
+ let a = !1;
+ return (
+ 'crAffectedItems' == n && (a = !0),
+ (i.isSelected = a),
+ {
+ label: e.CHG_GOV_Home_Tab_AffectedItems,
+ isSelected: a,
+ value: 'crAffectedItems',
+ index: 0,
+ content: t.createCRAffectedItemsTab(i, o),
+ icon: {
+ iconName: 'change-request-attention',
+ fontIconFamily: WUXManagedFontIcons.Font3DS,
+ },
+ }
+ );
+ }),
+ (_.getCRApprovalsTab = (t, i, n) => {
+ let o = !1;
+ return (
+ 'crApprovals' == n && (o = !0),
+ (i.isSelected = o),
+ {
+ label: e.CHG_GOV_Home_Tab_Approvals,
+ isSelected: o,
+ value: 'crApprovals',
+ index: 4,
+ content: t.createCRApprovalsTab(i, n),
+ icon: {
+ iconName: 'status-ok',
+ fontIconFamily: WUXManagedFontIcons.Font3DS,
+ },
+ }
+ );
+ }),
+ (_.getCRMembersTab = (t, i, n) => {
+ let o = !1;
+ return (
+ 'crMembers' == n && (o = !0),
+ (i.isSelected = o),
+ {
+ label: e.CHG_GOV_Home_Tab_Members,
+ isSelected: o,
+ value: 'crMembers',
+ index: 3,
+ content: t.createCRMembersTab(i),
+ icon: {
+ iconName: 'users',
+ fontIconFamily: WUXManagedFontIcons.Font3DS,
+ },
+ }
+ );
+ }),
+ (_.getCRChangeOrchestrationTab = (t, i, n, o) => {
+ let a = !1;
+ return (
+ 'crOrchestration' == n && (a = !0),
+ (i.isSelected = a),
+ {
+ label: e.CHG_GOV_Home_Tab_ChangeOrchestration,
+ isSelected: a,
+ value: 'crChangeOrchestration',
+ index: 2,
+ content: t.createCROrchestrationTab(i, o),
+ icon: {
+ iconName: 'flow-tree-ordered',
+ fontIconFamily: WUXManagedFontIcons.Font3DS,
+ },
+ }
+ );
+ }),
+ (_.getCRCusTab = (t, i, n, o) => {
+ let a = !1;
+ return (
+ 'crCusTab' == n && (a = !0),
+ (i.isSelected = a),
+ {
+ label: e.CHG_GOV_Home_Tab_CusTab,
+ isSelected: a,
+ value: 'crCusTab',
+ index: 5,
+ content: t.createCRCusTab(i, o),
+ icon: {
+ iconName: 'wux-ui-3ds wux-ui-3ds-1x fonticon-eye',
+ fontIconFamily: WUXManagedFontIcons.Font3DS,
+ },
+ }
+ );
+ }),
+ (_.displayObjectInfoInsideIDcard = function (e, t = !1) {
+ var i = this;
+ c.getChangeRequestInfo(e).then(
+ function (e) {
+ d.processedCRSummaryList(e).then(function (o) {
+ var a = {
+ model: o[0],
+ };
+ i.createHeaderFieldsJSON(a).then(function (i) {
+ var a = {
+ model: i,
+ };
+ if (t)
+ try {
+ let t = y('DS/ENOChgProbes/scripts/ChgCloudProbeUtils');
+ ((i = o[0]).dueDate = e.data[0].dueDate),
+ (i.isKindOfType = 'Change Request'),
+ t.cloudProbeUtils.sendChgObjectCreateTrackerEvent({
+ createData: i,
+ });
+ } catch (e) {
+ console.log(e);
+ }
+ u.navigate(
+ n.ROUTE_CR_DETAILS,
+ {
+ id: i.id,
+ name: i.name,
+ title: i.title,
+ nodeModel: a,
+ mode: 'outsideCall',
+ },
+ {
+ reload: !0,
+ },
+ );
+ });
+ });
+ },
+ function (e) {
+ var t = document.getElementsByClassName('moduleWrapper')[0];
+ return t && D.isMasked(t) && D.unmask(t), Promise.reject(e);
+ },
+ );
+ }),
+ (_.getChangeRequestModelForIDCard = function (e) {
+ return new Promise(function (t, i) {
+ c.getChangeRequestInfo(e).then(function (e) {
+ d.processedCRSummaryList(e).then(function (e) {
+ var i = {
+ model: e[0],
+ };
+ t(i);
+ });
+ });
+ });
+ }),
+ (_.filterView = function (e) {
+ if ('activeCR' == e)
+ ((i =
+ t.toolbar.getNodeModelByID(
+ 'filter',
+ )).options.grid.data.menu[0].state = 'selected'),
+ (i.options.grid.data.menu[1].state = 'unselected');
+ else if ('inactiveCR' == e) {
+ var i;
+ ((i =
+ t.toolbar.getNodeModelByID(
+ 'filter',
+ )).options.grid.data.menu[0].state = 'unselected'),
+ (i.options.grid.data.menu[1].state = 'selected');
+ }
+ }),
+ _
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/ChgInActiveCRFilterView',
+ [
+ 'UWA/Core',
+ 'DS/ENOChgGovernanceUX/scripts/util/changeRequest/ChgChangeRequestUtil',
+ ],
+ function (e, t) {
+ 'use strict';
+ return {
+ filterView: function (e) {
+ require([
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/ChgCRDataGridLayout',
+ ], function (e) {
+ e.crGridView.crDatagrid.groupRows({
+ dataIndexesToGroup: [],
+ }),
+ setTimeout(function () {
+ t.filterView('inactiveCR');
+ }, 100);
+ });
+ },
+ };
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/util/changeAction/ChgChangeActionUtil',
+ [
+ 'DS/UIKIT/Mask',
+ 'DS/ENOChgGovernanceUX/scripts/view/changeAction/ChgCADataGridViewToolbar',
+ 'DS/ENOChgRouter5/scripts/ChgRouter',
+ 'DS/ENOChgServices/scripts/services/ChgInfraService',
+ 'DS/ENOChgServices/scripts/services/ChgDataService',
+ 'DS/ENOChgServices/scripts/services/ChgDataProcess',
+ 'DS/ENOChgServices/scripts/services/ChgErrors',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovCommonDelete',
+ 'DS/ENOChgServices/scripts/services/ChgNativeInitService',
+ 'DS/ENOChgGovernanceUX/scripts/config/ChgGovAppGlobalConfig',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovPreferenceConstant',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovApplicationPreferencesManager',
+ 'DS/PlatformAPI/PlatformAPI',
+ 'DS/ENOChangeActionUX/scripts/CAPreferencesManager',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/UIKIT/Input/Text',
+ 'DS/UIKIT/Input/Button',
+ 'DS/UIKIT/Dropdown',
+ 'DS/Notifications/NotificationsManagerUXMessages',
+ 'DS/Notifications/NotificationsManagerViewOnScreen',
+ 'DS/LifecycleCmd/MaturityCmd',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgDataGridUtil',
+ 'require',
+ ],
+ function (
+ e,
+ t,
+ i,
+ n,
+ o,
+ a,
+ r,
+ s,
+ l,
+ c,
+ d,
+ u,
+ g,
+ p,
+ h,
+ m,
+ C,
+ v,
+ f,
+ b,
+ w,
+ D,
+ S,
+ y,
+ ) {
+ 'use strict';
+ var _ = Object.create(null);
+ return (
+ (_.getColumns = function () {
+ let e = [];
+ return (
+ e.push(
+ S.getColumnDefinition({
+ dataIndex: 'titleTree',
+ }),
+ ),
+ e.push(
+ S.getColumnDefinition({
+ dataIndex: 'co_name',
+ }),
+ ),
+ e.push(
+ S.getColumnDefinition({
+ dataIndex: 'maturityNLS',
+ }),
+ ),
+ e.push(
+ S.getColumnDefinition({
+ dataIndex: 'severityNLS',
+ }),
+ ),
+ e.push(
+ S.getColumnDefinition({
+ dataIndex: 'ownerFullName',
+ }),
+ ),
+ e.push(
+ S.getColumnDefinition({
+ dataIndex: 'collabspaceNLS',
+ }),
+ ),
+ e.push(
+ S.getColumnDefinition({
+ dataIndex: 'organizationNLS',
+ }),
+ ),
+ e.push(
+ S.getColumnDefinition({
+ dataIndex: 'applicabilityNLS',
+ }),
+ ),
+ e.push(
+ S.getColumnDefinition({
+ dataIndex: 'modificationDate',
+ }),
+ ),
+ e.push(
+ S.getColumnDefinition({
+ dataIndex: 'creationDate',
+ }),
+ ),
+ e
+ );
+ }),
+ (_.makeCopyLinkObject = function (e) {
+ var t = {
+ protocol: '3DXContent',
+ data: {
+ items: [],
+ },
+ };
+ return (
+ t.data.items.push({
+ envId: s.getGlobalVariable().tenant,
+ objectId: e.options.grid.id,
+ openLink: !0,
+ }),
+ t
+ );
+ }),
+ (_.showNotification = function (e, t, i, n, o, a, r) {
+ var s = {
+ level: e,
+ title: t,
+ subtitle: i,
+ message: n,
+ sticky: o,
+ allowUnsafeHTML: r || !1,
+ };
+ window.notifs ||
+ ((window.notifs = b), w.setNotificationManager(window.notifs)),
+ a ? w.inject(a) : w.elements.container.isInjected() || w.inject(),
+ window.notifs.addNotif(s);
+ }),
+ (_.createHeaderFieldsJSON = function (e) {
+ return new Promise(function (t, i) {
+ let o = {
+ 'ds6w:project': [e.model.collabspace],
+ 'ds6w:organizationResponsible': [e.model.organization],
+ };
+ n.getNLSValuesPromise(o).then(function (i) {
+ let n = i['ds6w:organizationResponsible'][e.model.organization],
+ o = i['ds6w:project'][e.model.collabspace],
+ a = [];
+ var r = {
+ id: e.model.id,
+ name: e.model.name,
+ revision: e.model.revision,
+ type: e.model.type,
+ title: e.model.title,
+ description: e.model.description,
+ severity: e.model.severity,
+ maturity: e.model.maturity,
+ thumbnail: e.model.thumbnail,
+ iconURL: e.model.iconURL,
+ minified: !1,
+ onHold: e.model.onHold,
+ isKindOfType: e.model.isKindOfType,
+ attributes: {
+ layout: [
+ ['maturity', 'owner', 'collabSpace'],
+ ['Applicability', 'Dependency', 'Attachments'],
+ ['orgnaization', 'Flowdown', 'isGoverned'],
+ ],
+ mapping: {
+ owner: {
+ fieldNLS: m.CHG_GOV_DataGrid_Column_Owner,
+ valueActual: e.model.owner,
+ valueDisplay: e.model.ownerFullName,
+ showLoader: !1,
+ displayWhenMinified: !0,
+ editable: !0,
+ accessBit: 'Transfer',
+ },
+ collabSpace: {
+ fieldNLS: m.CHG_GOV_DataGrid_Column_CollabSpace,
+ valueActual: e.model.collabspace,
+ valueDisplay: o,
+ showLoader: !1,
+ displayWhenMinified: !0,
+ editable: !0,
+ accessBit: 'Transfer',
+ },
+ maturity: {
+ fieldNLS: m.CHG_GOV_DataGrid_Column_Maturity,
+ valueActual: e.model.maturity,
+ valueDisplay: e.model.maturityNLS,
+ showLoader: !1,
+ displayWhenMinified: !0,
+ editable: !0,
+ },
+ orgnaization: {
+ fieldNLS: m.CHG_GOV_DataGrid_Column_Organization,
+ valueActual: e.model.organization,
+ valueDisplay: n,
+ showLoader: !1,
+ displayWhenMinified: !0,
+ editable: !0,
+ accessBit: 'Transfer',
+ },
+ Applicability: {
+ fieldNLS: m.CHG_GOV_Header_Applicability,
+ valueActual: 'No',
+ valueDisplay: 'No',
+ showLoader: !0,
+ displayWhenMinified: !0,
+ editable: !0,
+ },
+ Dependency: {
+ fieldNLS: m.CHG_GOV_Header_Dependency,
+ valueActual: 'No',
+ valueDisplay: 'No',
+ showLoader: !0,
+ displayWhenMinified: !0,
+ editable: !0,
+ },
+ Attachments: {
+ fieldNLS: m.CHG_GOV_Header_Attachments,
+ valueActual: 'No',
+ valueDisplay: 'No',
+ showLoader: !0,
+ displayWhenMinified: !0,
+ editable: !0,
+ },
+ Flowdown: {
+ fieldNLS: m.CHG_GOV_Header_Flowdown,
+ valueActual: 'Unassigned',
+ valueDisplay: 'Unassigned',
+ showLoader: !0,
+ displayWhenMinified: !0,
+ editable: !0,
+ },
+ isGoverned: {
+ fieldNLS: m.CHG_GOV_Header_isGoverned,
+ valueActual: 'No',
+ valueDisplay: 'No',
+ showLoader: !0,
+ displayWhenMinified: !0,
+ editable: !0,
+ },
+ Group: {
+ fieldNLS: m.CHG_GOV_Header_Group,
+ valueActual: void 0,
+ valueDisplay: 'Unassigned',
+ showLoader: !0,
+ displayWhenMinified: !0,
+ accessBit: 'AddToGroup',
+ },
+ },
+ },
+ freeSpaces: [
+ {
+ type: 'text',
+ data: e.model.description,
+ },
+ ],
+ menuItems: [
+ {
+ id: 'chgBOMSync',
+ text: m.ECM_CA_EBOM_Sync_Action,
+ fonticon: 'fonticon fonticon-change-action-sync',
+ accessBit: 'Synchronization',
+ },
+ {
+ id: 'chgHold',
+ text: m.CHG_GOV_Header_Menu_Hold,
+ fonticon: 'fonticon fonticon-pause',
+ accessBit: 'Hold',
+ },
+ {
+ id: 'chgResume',
+ text: m.CHG_GOV_Header_Menu_Resume,
+ fonticon: 'fonticon fonticon-resume',
+ accessBit: 'Resume',
+ },
+ {
+ id: 'chgCancel',
+ text: m.CHG_GOV_Header_Menu_Cancel,
+ fonticon: 'fonticon fonticon-block',
+ accessBit: 'Cancel',
+ },
+ ],
+ };
+ 'true' == s.getGlobalVariable().CHG_CHANGE_GROUP &&
+ a.push('Group'),
+ r.attributes.layout.push(a);
+ let l = {
+ id: 'chgCAWorkUnder',
+ text: m.CHG_GOV_Header_Menu_WorkUnder,
+ fonticon: 'fonticon fonticon-hardhat',
+ accessBit: 'WorkUnder',
+ };
+ (s.getGlobalVariable().isNative ||
+ s.getGlobalVariable().isPoweredBy) &&
+ (r.menuItems.push(l),
+ p.unsubscribe('change-action-work-under'),
+ p.subscribe('change-action-work-under', function (e) {
+ _.publishEventToWebnWinForWorkUnder(e);
+ })),
+ t(r);
+ });
+ });
+ }),
+ (_.getMaturityMenu = function (e) {
+ return {
+ type: 'PushItem',
+ title: m.CHG_GOV_Menu_Maturity,
+ fonticon: {
+ family: 1,
+ content: 'fonticon fonticon-collaborative-lifecycle-management',
+ },
+ action: {
+ callback: function (t) {
+ for (
+ var i = e.cellInfos.nodeModel
+ .getTreeDocument()
+ .getSelectedNodes(),
+ n = [],
+ o = [],
+ a = 0;
+ a < i.length;
+ a++
+ )
+ n.push(i[a].options.grid),
+ o.push({
+ physicalid:
+ i[a].options.grid['@id'] || i[a].options.grid.id,
+ });
+ new D({
+ context: n,
+ ID: 'MaturityHdr',
+ }).executeAsync(o);
+ },
+ },
+ };
+ }),
+ (_.publishEventToWebnWinForWorkUnder = function (e) {
+ let t = e.changeaction;
+ if (t && t.editability)
+ if ('allowed' === t.editability.work_under) {
+ let e = 'Work_Under',
+ n = 'TRUE';
+ if (s.getGlobalVariable().isPoweredBy) {
+ var i = t.attributes.find(
+ (e) => 'attribute_Synopsis' === e.name,
+ );
+ let e = i && i.value ? i.value : '',
+ n = t.name,
+ o = t.description,
+ a = t.id;
+ if (t.attributes) {
+ let i = t.attributes;
+ UWA.is(i) &&
+ i.forEach(function (t) {
+ 'attribute_Synopsis' === t.name && (e = t.value);
+ });
+ }
+ let r = {
+ operation: 'Work_Under',
+ operationVersion: '1.0',
+ content: {
+ id: a.replace('pid:', ''),
+ name: n,
+ title: e,
+ description: o,
+ },
+ };
+ p.publish('webinwin:web:notification', JSON.stringify(r));
+ } else c.DispatchEventToWin(e, n);
+ } else r.error(m.CHG_GOV_Action_WorkUnder_Forbidden);
+ }),
+ (_.getTabs = function (e, t) {
+ this._pathChangeActionsDetails = [
+ u._KEY,
+ u._VIEWS_PREFERENCES,
+ u._CHANGE_ACTIONS_DETAILS,
+ ];
+ var i = g.getTab(this._pathChangeActionsDetails);
+ let n = 'ProposedChange';
+ (n = null == i || '' == i ? 'ProposedChange' : i), console.log(i);
+ let o = this.getProposedChangeTab(e, t, n),
+ a = this.getRealizedChangeTab(e, t, n);
+ return [
+ this.getMembersTab(e, t, n),
+ o,
+ a,
+ this.getCusTab(e, t, n),
+ this.getApprovalsTab(e, t, n),
+ ];
+ }),
+ (_.getMembersTab = (e, t, i) => {
+ let n = !1;
+ return (
+ 'Members' == i && (n = !0),
+ (t.isSelected = n),
+ {
+ label: m.CHG_GOV_Home_Tab_Members,
+ isSelected: n,
+ value: 'caMembers',
+ index: 0,
+ content: e.createMembersTab(t),
+ icon: {
+ iconName: 'users',
+ fontIconFamily: WUXManagedFontIcons.Font3DS,
+ },
+ }
+ );
+ }),
+ (_.getProposedChangeTab = (e, t, i) => {
+ let n = !1;
+ return (
+ 'ProposedChange' == i && (n = !0),
+ (t.isSelected = n),
+ {
+ label: m.CHG_GOV_Home_Tab_ProposedChanges,
+ isSelected: n,
+ index: 1,
+ value: 'caProposedChange',
+ content: e.createProposedChangeTab(t),
+ icon: {
+ iconName: 'change-action-proposed',
+ fontIconFamily: WUXManagedFontIcons.Font3DS,
+ },
+ }
+ );
+ }),
+ (_.getRealizedChangeTab = (e, t, i) => {
+ let n = !1;
+ return (
+ 'RealizedChange' == i && (n = !0),
+ (t.isSelected = n),
+ {
+ label: m.CHG_GOV_Home_Tab_RealizedChanges,
+ isSelected: n,
+ index: 2,
+ value: 'caRealizedChange',
+ content: e.createRealizedChangeTab(t),
+ icon: {
+ iconName: 'change-action-realized',
+ fontIconFamily: WUXManagedFontIcons.Font3DS,
+ },
+ }
+ );
+ }),
+ (_.getApprovalsTab = (e, t, i) => {
+ let n = !1;
+ return (
+ 'Approvals' == i && (n = !0),
+ (t.isSelected = n),
+ {
+ label: m.CHG_GOV_Home_Tab_Approvals,
+ isSelected: n,
+ value: 'caApprovals',
+ index: 3,
+ content: e.createApprovalsTab(t, i),
+ icon: {
+ iconName: 'status-ok',
+ fontIconFamily: WUXManagedFontIcons.Font3DS,
+ },
+ }
+ );
+ }),
+ (_.getCusTab = (e, t, i) => {
+ let n = !1;
+ return (
+ 'Cus' == i && (n = !0),
+ (t.isSelected = n),
+ {
+ label: m.CHG_GOV_Home_Tab_CusTab,
+ isSelected: n,
+ value: 'caCus',
+ index: 4,
+ content: e.createCusTab(),
+ icon: {
+ iconName: 'wux-ui-3ds wux-ui-3ds-1x fonticon-eye',
+ fontIconFamily: WUXManagedFontIcons.Font3DS,
+ },
+ }
+ );
+ }),
+ (_.displayObjectInfoInsideIDcard = function (t, n = !1) {
+ var r = this;
+ o.getChangeActionInfo(t).then(
+ function (e) {
+ var t = a.processChangeActionDetails(e);
+ let o = {
+ model: t[0],
+ };
+ r.createHeaderFieldsJSON(o).then(function (e) {
+ var o = {
+ model: e,
+ };
+ if (n)
+ try {
+ let i = y('DS/ENOChgProbes/scripts/ChgCloudProbeUtils');
+ ((e = t[0]).isKindOfType = 'Change Action'),
+ i.cloudProbeUtils.sendChgObjectCreateTrackerEvent({
+ createData: e,
+ });
+ } catch (e) {
+ console.log(e);
+ }
+ (i.navigate(
+ d.ROUTE_CA_DETAILS,
+ {
+ id: e.id,
+ name: e.name,
+ title: e.title,
+ nodeModel: o,
+ mode: 'outsideCall',
+ },
+ {
+ reload: !0,
+ },
+ ),
+ s.getGlobalVariable().isNative) &&
+ (window.history.replaceState(
+ '',
+ e.title,
+ s.getGlobalVariable().nativeURL,
+ ),
+ 'true' != s.getGlobalVariable().CHG_NATIVE_BREADCRUMB &&
+ i.getDependency('applicationChannel').publish({
+ event: 'breadcrumb-hide',
+ }));
+ });
+ },
+ function (t) {
+ var i = document.getElementsByClassName('moduleWrapper')[0];
+ i && e.isMasked(i) && e.unmask(i);
+ },
+ );
+ }),
+ (_.getChangeActionModelForIDCard = function (e) {
+ return new Promise(function (t, i) {
+ o.getChangeActionInfo(e).then(function (e) {
+ var i = {
+ model: a.processChangeActionDetails(e)[0],
+ };
+ t(i);
+ });
+ });
+ }),
+ (_.changeView = function (e) {
+ if (
+ (widget.body.getDimensions().width <= d.MOBILE_CUTOFF
+ ? h.updateCASummaryViewMobile(e)
+ : h.updateCASummaryViewDesktop(e),
+ 'GridView' == e)
+ ) {
+ this.currentView = 'Grid';
+ let e = t.toolbar.getNodeModelByID('view');
+ e &&
+ 'view-list' != e.options.grid.semantics.icon.iconName &&
+ e.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-list',
+ },
+ },
+ },
+ tooltip: m.CHG_TOOLTIP_GRID_VIEW,
+ }),
+ (e.options.grid.data.menu[0].state = 'selected'),
+ (e.options.grid.data.menu[1].state = 'unselected');
+ let i = document.querySelector(
+ '.toolbar-ca-div .wux-ui-3ds-view-list',
+ );
+ i && i.addClassName('currentView');
+ let n = document.querySelector(
+ '.toolbar-co-div .wux-ui-3ds-view-small-tile',
+ );
+ n && n.removeClassName('currentView');
+ let o = document.querySelector('.cagridView');
+ o &&
+ (o.removeClassName('hideView'),
+ o.removeClassName('nonVisible'),
+ o.addClassName('showView'));
+ let a = document.querySelector('.catileView');
+ a && (a.removeClassName('showView'), a.addClassName('hideView'));
+ } else if ('TileView' == e) {
+ this.currentView = 'Tile';
+ let e = t.toolbar.getNodeModelByID('view');
+ e &&
+ 'view-small-tile' != e.options.grid.semantics.icon.iconName &&
+ e.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-small-tile',
+ },
+ },
+ },
+ tooltip: m.CHG_TOOLTIP_TILE_VIEW,
+ }),
+ (e.options.grid.data.menu[0].state = 'unselected'),
+ (e.options.grid.data.menu[1].state = 'selected');
+ let i = document.querySelector(
+ '.toolbar-co-div .wux-ui-3ds-view-list',
+ );
+ i && i.removeClassName('currentView');
+ let n = document.querySelector(
+ '.toolbar-ca-div .wux-ui-3ds-view-small-tile',
+ );
+ n && n.addClassName('currentView');
+ let o = document.querySelector('.cagridView');
+ o && (o.removeClassName('showView'), o.addClassName('hideView'));
+ let a = document.querySelector('.catileView');
+ a && (a.removeClassName('hideView'), a.addClassName('showView'));
+ }
+ }),
+ (_.getDeleteMenu = function (e, t, i) {
+ return {
+ type: 'PushItem',
+ title: m.CHG_GOV_Menu_Delete,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-trash',
+ },
+ action: {
+ callback: function () {
+ let e = t.cellInfos.nodeModel
+ .getTreeDocument()
+ .getSelectedNodes(),
+ n = [];
+ for (let t = 0; t < e.length; t++) {
+ let i = e[t],
+ o = {
+ physicalid: i.options.grid.id,
+ nodeName: i.options.grid.name,
+ nodeTitle: i.options.grid.title,
+ };
+ n.push(o);
+ }
+ let o = require('DS/ENOChgGovernanceUX/scripts/view/changeAction/ChgCADataGridLayout');
+ l.deleteNodes(n, i, o.removeDataFromGrid);
+ },
+ },
+ };
+ }),
+ (_.getTransferMenu = function (e, t) {
+ return {
+ type: 'PushItem',
+ title: m.CHG_GOV_Menu_Transfer,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-move-to',
+ },
+ action: {
+ callback: function (e) {
+ let i = t.cellInfos.nodeModel
+ .getTreeDocument()
+ .getSelectedNodes(),
+ n = [];
+ for (let e = 0; e < i.length; e++) n.push(i[e].options.grid);
+ require([
+ 'DS/ENOChgGovernanceUX/scripts/wrapper/ChgGovTransferWrapper',
+ ], function (e) {
+ e.launchTransferDialog(n);
+ });
+ },
+ },
+ };
+ }),
+ (_.getRelationalExplorerMenu = function (e, t) {
+ return {
+ type: 'PushItem',
+ title: m.CHG_GOV_Menu_Relational_Explorer,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-object-related',
+ },
+ action: {
+ callback: function (e) {
+ require([
+ 'DS/ENOChgServices/scripts/services/ChgIDCardCommonServices',
+ ], function (e) {
+ let i = t.cellInfos.nodeModel
+ .getTreeDocument()
+ .getSelectedNodes(),
+ n = [];
+ for (let e = 0; e < i.length; e++) {
+ let t = i[e].options.grid.id;
+ n.push(t);
+ }
+ e.openRelationalExplorer(n);
+ });
+ },
+ },
+ };
+ }),
+ (_.createCustomOwner = function (e, t) {
+ let i = '/api/user/getpicture/login/' + t + '/format/normal',
+ n = s.getGlobalVariable().computeSwymUrl(i),
+ o = new UWA.Element('div', {
+ class: 'members',
+ }),
+ a = new UWA.Element('div', {
+ class: 'assignee',
+ }),
+ r = '';
+ if (s.getGlobalVariable().isSwymInstalled)
+ r = UWA.createElement('img', {
+ class: 'userIcon',
+ src: n,
+ });
+ else {
+ let e = ChgMembersServices.getAvatarDetails(t);
+ (r = UWA.createElement('div', {
+ html: e.avatarStr,
+ class: 'avatarIcon',
+ })).style.setProperty('background', e.avatarColor);
+ }
+ r.inject(a);
+ let l = UWA.createElement('span', {
+ class: 'userName',
+ html: t,
+ });
+ return a.inject(o), l.inject(o), o.outerHTML;
+ }),
+ (_.filterView = function (e) {
+ if ('activeCA' == e)
+ ((i =
+ t.toolbar.getNodeModelByID(
+ 'filter',
+ )).options.grid.data.menu[0].state = 'selected'),
+ (i.options.grid.data.menu[1].state = 'unselected');
+ else if ('inactiveCA' == e) {
+ var i;
+ ((i =
+ t.toolbar.getNodeModelByID(
+ 'filter',
+ )).options.grid.data.menu[0].state = 'unselected'),
+ (i.options.grid.data.menu[1].state = 'selected');
+ }
+ }),
+ _
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeAction/ChgInActiveCAFilterView',
+ [
+ 'UWA/Core',
+ 'DS/ENOChgGovernanceUX/scripts/util/changeAction/ChgChangeActionUtil',
+ ],
+ function (e, t) {
+ 'use strict';
+ return {
+ filterView: function (e) {
+ require([
+ 'DS/ENOChgGovernanceUX/scripts/view/changeAction/ChgCADataGridLayout',
+ ], function (e) {
+ e.caGridView.caDatagrid.groupRows({
+ dataIndexesToGroup: [],
+ }),
+ setTimeout(function () {
+ t.filterView('inactiveCA');
+ }, 100);
+ });
+ },
+ };
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactedItem/util/ChgCRImpactedItemGridColsUtil',
+ [
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgServices/scripts/services/ChgMembersServices',
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactedItem/ChgCRImpactedItemViewToolbar',
+ 'DS/Controls/Popup',
+ 'DS/ENOChgGovernanceUX/scripts/util/changeRequest/ChgChangeRequestUtil',
+ 'DS/Menu/ContextualMenu',
+ 'DS/ENOChgServices/scripts/services/ChgIDCardCommonServices',
+ 'DS/Handlebars/Handlebars4',
+ 'text!DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactedItem/util/ChgCRImpactedItemGridProposedCAPopoverTemplate.html',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgDataGridUtil',
+ ],
+ function (e, t, i, n, o, a, r, s, l, c, d) {
+ 'use strict';
+ let u = Object.create(null);
+ return (
+ (u.getColumns = function (i, n) {
+ let o = !0;
+ ((i &&
+ 'false' === i.AddImpactedItems &&
+ 'false' === i.RemoveImpactedItems) ||
+ n) &&
+ (o = !1);
+ let a = [];
+ return (
+ a.push(
+ d.getColumnDefinition({
+ dataIndex: 'titleTree',
+ }),
+ ),
+ a.push(
+ d.getColumnDefinition({
+ dataIndex: 'typeNLS',
+ }),
+ ),
+ a.push(
+ d.getColumnDefinition({
+ dataIndex: 'name',
+ }),
+ ),
+ a.push(
+ d.getColumnDefinition({
+ dataIndex: 'revision',
+ }),
+ ),
+ a.push(
+ d.getColumnDefinition({
+ dataIndex: 'reasonForChange',
+ editableFlag: o,
+ massUpdateAllowedFlag: o,
+ }),
+ ),
+ a.push(
+ d.getColumnDefinition({
+ dataIndex: 'currentNLS',
+ }),
+ ),
+ a.push(
+ d.getColumnDefinition({
+ dataIndex: 'ownerFullName',
+ }),
+ ),
+ a.push({
+ text: e.CHG_GOV_DataGrid_Column_ProposedCA,
+ dataIndex: 'proposedChangeAction',
+ editableFlag: !1,
+ alwaysVisibleFlag: !1,
+ visibleFlag: !0,
+ allowUnsafeHTMLContent: !0,
+ filterId: 'set',
+ filterModel: [],
+ getCellGroupingKey: function (e) {
+ let t = e.nodeModel.options.grid.proposedChangeActionsData;
+ if (!t) return '';
+ switch (t.length) {
+ case 0:
+ return 'none';
+ case 1:
+ return t[0].title;
+ default:
+ return t.length;
+ }
+ },
+ }),
+ a.push({
+ text: e.CHG_COUMN_IMPACT,
+ dataIndex: 'impact',
+ editableFlag: !n && o,
+ typeRepresentation: 'impact',
+ editionPolicy: 'EditionOnOver',
+ massUpdateAllowedFlag: !0,
+ filterId: 'set',
+ filterModel: [],
+ }),
+ t.getGlobalVariable().is3DSpace &&
+ ((a[0].allowUnsafeHTMLContent = !0),
+ (a[0].getCellGroupingKey = function (e) {
+ return e.nodeModel.options.grid.title;
+ })),
+ a
+ );
+ }),
+ (u.changeView = function (t, i) {
+ if ('GridView' == t)
+ (this.currentView = 'Grid'),
+ (n = i.getNodeModelByID('view')) &&
+ 'view-list' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-list',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_GRID_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'selected'),
+ (n.options.grid.data.menu[1].state = 'unselected'),
+ (o = document.querySelector(
+ '.toolbar-impactedItem-grid-div .wux-ui-3ds-view-list',
+ )) && o.addClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-impactedItem-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.removeClassName('currentView'),
+ (r = document.querySelector('.content-impactedItem-grid-div')) &&
+ (r.removeClassName('hideView'),
+ r.removeClassName('nonVisible'),
+ r.addClassName('showView')),
+ (s = document.querySelector('.content-impactedItem-tile-div')) &&
+ (s.removeClassName('showView'), s.addClassName('hideView'));
+ else if ('TileView' == t) {
+ var n, o, a, r, s;
+ (this.currentView = 'Tile'),
+ (n = i.getNodeModelByID('view')) &&
+ 'view-small-tile' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-small-tile',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_TILE_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'unselected'),
+ (n.options.grid.data.menu[1].state = 'selected'),
+ (o = document.querySelector(
+ '.toolbar-impactedItem-grid-div .wux-ui-3ds-view-list',
+ )) && o.removeClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-impactedItem-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.addClassName('currentView'),
+ (r = document.querySelector('.content-impactedItem-grid-div')) &&
+ (r.removeClassName('showView'), r.addClassName('hideView')),
+ (s = document.querySelector('.content-impactedItem-tile-div')) &&
+ (s.removeClassName('hideView'), s.addClassName('showView'));
+ }
+ }),
+ (u.getProposedColumnBasedOnData = function (e) {
+ if (e.length > 1) {
+ let t = new UWA.createElement('a', {
+ class: 'proposedChangeActionsCount',
+ });
+ return (t.innerText = e.length), t.outerHTML;
+ }
+ if (1 == e.length) {
+ var t = UWA.createElement('div', {
+ class: 'proposedChangeActionField',
+ }),
+ i = UWA.createElement('span', {
+ class: 'proposedChangeActionTitle',
+ html: ' ' + e[0].title + ' (' + e[0].name + ')',
+ }),
+ n = e[0].icon;
+ return (
+ UWA.createElement('img', {
+ src: n,
+ }).inject(t),
+ i.inject(t),
+ t.outerHTML
+ );
+ }
+ }),
+ (u.getRMBProposedChangeColumn = function (t) {
+ return new Promise((i, n) => {
+ let o = [],
+ a = [],
+ r = null;
+ t.forEach((e) => {
+ a.push(e.id),
+ (r = {
+ objectId: e.id,
+ objectType: e.type,
+ displayName: e.name,
+ displayType: e.typeNLS,
+ facetName: 'impactedItem',
+ });
+ }),
+ o.push({
+ type: 'PushItem',
+ title: e.CHG_GOV_Menu_Relational_Explorer,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-object-related',
+ },
+ action: {
+ callback: function (e) {
+ s.openRelationalExplorer(a);
+ },
+ },
+ }),
+ s.openWith(r).then((e) => {
+ o.push(e), i(o);
+ });
+ });
+ }),
+ (u.getPopupProposedChangeColumn = function (e, t) {
+ let i = u.getPopupContentProposedChangeColumn(
+ t.options.grid.proposedChangeActionsData,
+ );
+ var n = new o({
+ target: e,
+ trigger: 'click',
+ constraint: widget.body,
+ className:
+ 'wux-controls-abstract wux-controls-popup impactedItemProposedChangePopup',
+ });
+ n.setBody(i),
+ t.options.grid.proposedChangeActionsData.forEach((e, t) => {
+ r.addEventListener(
+ n.elements.container.getElementsByClassName(
+ 'impactedItem-proposedChange-popup-table-tr',
+ )[t],
+ {
+ callback: function (e) {
+ if (e.data.listener.getAttribute('data-changeId')) {
+ let t = [],
+ i = {
+ id: e.data.listener.getAttribute('data-changeId'),
+ type: e.data.listener.getAttribute('data-changeType'),
+ name: e.data.listener.getAttribute('data-changeName'),
+ typeNLS:
+ e.data.listener.getAttribute('data-changeTypeNLS'),
+ };
+ return (
+ t.push(i),
+ u.getRMBProposedChangeColumn(t).then(function (e) {
+ return e;
+ })
+ );
+ }
+ return [];
+ },
+ },
+ );
+ });
+ }),
+ (u.getPopupContentProposedChangeColumn = function (t) {
+ return l.compile(c)({
+ changes: t,
+ heading: e.CHG_GOV_DataGrid_Column_ProposedCA_Popup_Heading,
+ });
+ }),
+ u
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/util/ChgCRImpactAnalysisGridColsUtil',
+ [
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/ChgCRImpactAnalysisViewToolbar',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgServices/scripts/services/ChgMembersServices',
+ 'DS/ENOChgServices/scripts/services/ChgIDCardCommonServices',
+ 'DS/ENOChgServices/scripts/services/ChgPropertiesServices',
+ 'DS/ENOChgGovernanceUX/scripts/util/changeRequest/ChgChangeRequestUtil',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgDataGridUtil',
+ ],
+ function (e, t, i, n, o, a, r, s) {
+ 'use strict';
+ var l = Object.create(null);
+
+ function c(e, t) {
+ return e > t ? 1 : e == t ? 0 : e < t ? -1 : void 0;
+ }
+ return (
+ (l.getColumns = function () {
+ var t = [
+ {
+ text: e.CHG_GOV_DataGrid_Column_Title,
+ dataIndex: 'tree',
+ editableFlag: !1,
+ alwaysVisibleFlag: !0,
+ allowUnsafeHTMLContent: !0,
+ pinned: 'left',
+ width: 150,
+ filterId: 'stringRegexp',
+ filterModel: '',
+ getCellClassName: function (e) {
+ if (e.rowID >= 0 && 'ia_Total' == e.nodeModel.options.grid.id)
+ return 'iaTotalAttribute';
+ },
+ compareFunction: function (e, t, i, n, o) {
+ return (
+ 'ia_Total' != i.options.grid.id &&
+ 'ia_Total' != n.options.grid.id &&
+ c(e, t)
+ );
+ },
+ },
+ {
+ text: e.CHG_GOV_DataGrid_Column_Name,
+ dataIndex: 'ia_name',
+ editableFlag: !1,
+ alwaysVisibleFlag: !1,
+ allowUnsafeHTMLContent: !0,
+ filterId: 'stringRegexp',
+ filterModel: '',
+ getCellClassName: function (e) {
+ if (e.rowID >= 0 && 'ia_Total' == e.nodeModel.options.grid.id)
+ return 'iaTotalAttribute';
+ },
+ getCellGroupingKey: function (e) {
+ return e.nodeModel.options.grid.Name;
+ },
+ compareFunction: function (e, t, i, n, o) {
+ return (
+ 'ia_Total' != i.options.grid.id &&
+ 'ia_Total' != n.options.grid.id &&
+ c(e, t)
+ );
+ },
+ },
+ {
+ text: e.CHG_GOV_DataGrid_Column_Owner,
+ dataIndex: 'ownerFullName',
+ editableFlag: !1,
+ alwaysVisibleFlag: !1,
+ typeRepresentation: 'user',
+ filterId: 'set',
+ filterModel: [],
+ getCellValue: function (e) {
+ if (e.nodeModel) {
+ if (i.getGlobalVariable().isSwymInstalled) {
+ var t =
+ '/api/user/getpicture/login/' +
+ e.nodeModel.getAttributeValue('owner') +
+ '/format/normal';
+ return {
+ icon: (t = i.getGlobalVariable().computeSwymUrl(t)),
+ label: e.nodeModel.getAttributeValue('ownerFullName'),
+ };
+ }
+ return {
+ label: e.nodeModel.getAttributeValue('ownerFullName'),
+ };
+ }
+ },
+ getCellClassName: function (e) {
+ if (e.rowID >= 0 && 'ia_Total' == e.nodeModel.options.grid.id)
+ return 'iaTotalAttribute';
+ },
+ getCellGroupingKey: function (e) {
+ return e.nodeModel.options.grid.ownerFullName;
+ },
+ compareFunction: function (e, t, i, n, o) {
+ return (
+ 'ia_Total' != i.options.grid.id &&
+ 'ia_Total' != n.options.grid.id &&
+ c(e, t)
+ );
+ },
+ },
+ {
+ text: e.CHG_GOV_DataGrid_Column_Maturity,
+ dataIndex: 'maturityNLS',
+ editableFlag: !1,
+ alwaysVisibleFlag: !1,
+ allowUnsafeHTMLContent: !0,
+ filterId: 'set',
+ filterModel: [],
+ getCellClassName: function (e) {
+ if (e.rowID >= 0 && 'ia_Total' == e.nodeModel.options.grid.id)
+ return 'iaTotalAttribute';
+ },
+ getCellValue: function (e) {
+ if (e.nodeModel) {
+ return e.nodeModel.getAttributeValue('maturityNLS');
+ }
+ },
+ compareFunction: function (e, t, i, n, o) {
+ return (
+ 'ia_Total' != i.options.grid.id &&
+ 'ia_Total' != n.options.grid.id &&
+ c(e, t)
+ );
+ },
+ },
+ {
+ text: e.CHG_GOV_IA_Column_Refinement,
+ dataIndex: 'refinement',
+ editableFlag: !1,
+ visibleFlag: !0,
+ allowUnsafeHTMLContent: !0,
+ filterId: 'set',
+ filterModel: [],
+ getCellClassName: function (e) {
+ if (e.rowID >= 0 && 'ia_Total' == e.nodeModel.options.grid.id)
+ return 'iaTotalAttribute';
+ },
+ getCellValue: function (e) {
+ if (e.nodeModel) {
+ return e.nodeModel.getAttributeValue('refinement');
+ }
+ },
+ compareFunction: function (e, t, i, n, o) {
+ return (
+ 'ia_Total' != i.options.grid.id &&
+ 'ia_Total' != n.options.grid.id &&
+ c(e, t)
+ );
+ },
+ },
+ {
+ text: e.CHG_GOV_IA_Column_Disp_From,
+ dataIndex: 'dispFrom',
+ editableFlag: !1,
+ visibleFlag: !0,
+ allowUnsafeHTMLContent: !0,
+ filterId: 'stringRegexp',
+ filterModel: '',
+ getCellClassName: function (e) {
+ if (e.rowID >= 0 && 'ia_Total' == e.nodeModel.options.grid.id)
+ return 'iaTotalAttribute';
+ },
+ getCellValue: function (e) {
+ if (e.nodeModel) {
+ return e.nodeModel.getAttributeValue('dispFrom');
+ }
+ },
+ compareFunction: function (e, t, i, n, o) {
+ return (
+ 'ia_Total' != i.options.grid.id &&
+ 'ia_Total' != n.options.grid.id &&
+ c(e, t)
+ );
+ },
+ },
+ {
+ text: e.CHG_GOV_IA_Column_Disp_From_Title,
+ dataIndex: 'dispFromTitle',
+ editableFlag: !1,
+ visibleFlag: !1,
+ allowUnsafeHTMLContent: !0,
+ getCellClassName: function (e) {
+ if (e.rowID >= 0 && 'ia_Total' == e.nodeModel.options.grid.id)
+ return 'iaTotalAttribute';
+ },
+ getCellValue: function (e) {
+ if (e.nodeModel) {
+ return e.nodeModel.getAttributeValue('dispFromTitle');
+ }
+ },
+ compareFunction: function (e, t, i, n, o) {
+ return (
+ 'ia_Total' != i.options.grid.id &&
+ 'ia_Total' != n.options.grid.id &&
+ c(e, t)
+ );
+ },
+ },
+ {
+ text: e.CHG_GOV_DataGrid_Column_ImpactBasis,
+ dataIndex: 'countImpactBasis',
+ editableFlag: !1,
+ typeRepresentation: 'integer',
+ filterId: 'number',
+ filterModel: '',
+ getCellClassName: function (e) {
+ if (e.rowID >= 0 && 'ia_Total' == e.nodeModel.options.grid.id)
+ return 'iaTotalAttribute';
+ },
+ compareFunction: function (e, t, i, n, o) {
+ return (
+ 'ia_Total' != i.options.grid.id &&
+ 'ia_Total' != n.options.grid.id &&
+ c(e, t)
+ );
+ },
+ getCellValue: function (e) {
+ return (
+ e.nodeModel.getAttributeValue('isLastNode'),
+ e.nodeModel.getAttributeValue('countImpactBasis')
+ );
+ },
+ setCellValue: function (e, t) {},
+ },
+ {
+ text: e.CHG_GOV_DataGrid_Column_ImpactedItem,
+ dataIndex: 'countImpactedItems',
+ editableFlag: !1,
+ typeRepresentation: 'integer',
+ filterId: 'number',
+ filterModel: '',
+ getCellClassName: function (e) {
+ if (e.rowID >= 0 && 'ia_Total' == e.nodeModel.options.grid.id)
+ return 'iaTotalAttribute';
+ },
+ compareFunction: function (e, t, i, n, o) {
+ return (
+ 'ia_Total' != i.options.grid.id &&
+ 'ia_Total' != n.options.grid.id &&
+ c(e, t)
+ );
+ },
+ getCellValue: function (e) {
+ return (
+ e.nodeModel.getAttributeValue('isLastNode'),
+ e.nodeModel.getAttributeValue('countImpactedItems')
+ );
+ },
+ },
+ {
+ text: e.CHG_GOV_DataGrid_Column_Attachment,
+ dataIndex: 'countAttachment',
+ editableFlag: !1,
+ typeRepresentation: 'integer',
+ filterId: 'number',
+ filterModel: '',
+ getCellClassName: function (e) {
+ if (e.rowID >= 0 && 'ia_Total' == e.nodeModel.options.grid.id)
+ return 'iaTotalAttribute';
+ },
+ compareFunction: function (e, t, i, n, o) {
+ return (
+ 'ia_Total' != i.options.grid.id &&
+ 'ia_Total' != n.options.grid.id &&
+ c(e, t)
+ );
+ },
+ getCellValue: function (e) {
+ return (
+ e.nodeModel.getAttributeValue('isLastNode'),
+ e.nodeModel.getAttributeValue('countAttachment')
+ );
+ },
+ },
+ ];
+ i.getGlobalVariable().is3DSpace &&
+ ((t[0].allowUnsafeHTMLContent = !0),
+ (t[0].getCellGroupingKey = function (e) {
+ return e.nodeModel.options.grid.title;
+ }));
+ let n = [
+ {
+ dataIndex: 'attribute',
+ text: e.CHG_IA_COLUMN_GROUP_ATTRIBURES,
+ children: [
+ {
+ text: e.CHG_GOV_DataGrid_Column_Benefit_Impact,
+ dataIndex: 'benefitImpact',
+ editableFlag: !1,
+ typeRepresentation: 'integer',
+ getCellClassName: function (e) {
+ if (
+ e.rowID >= 0 &&
+ 'ia_Total' == e.nodeModel.options.grid.id
+ )
+ return 'iaTotalAttribute';
+ },
+ compareFunction: function (e, t, i, n, o) {
+ return (
+ 'ia_Total' != i.options.grid.id &&
+ 'ia_Total' != n.options.grid.id &&
+ c(e, t)
+ );
+ },
+ getCellValue: function (e) {
+ if (e.nodeModel.getAttributeValue('isLastNode')) {
+ var t = e.nodeModel.getTreeDocument().getAllDescendants();
+ t = t.filter(
+ (e) =>
+ 'false' != e.options.grid.benefitImpactValid &&
+ 'Cancelled' != e.options.grid.maturity,
+ );
+ let n = 0,
+ o = 0,
+ a = 0;
+ for (var i = 0; i < t.length; i++)
+ isNaN(t[i].options.grid.benefitImpact) ||
+ ((n += t[i].options.grid.benefitImpact), a++);
+ return (o = Math.round(n / a));
+ }
+ return e.nodeModel.getAttributeValue('benefitImpact');
+ },
+ },
+ {
+ text: e.CHG_GOV_DataGrid_Column_Cost_Impact,
+ dataIndex: 'costImpact',
+ editableFlag: !1,
+ typeRepresentation: 'integer',
+ getCellClassName: function (e) {
+ if (
+ e.rowID >= 0 &&
+ 'ia_Total' == e.nodeModel.options.grid.id
+ )
+ return 'iaTotalAttribute';
+ },
+ compareFunction: function (e, t, i, n, o) {
+ return (
+ 'ia_Total' != i.options.grid.id &&
+ 'ia_Total' != n.options.grid.id &&
+ c(e, t)
+ );
+ },
+ getCellValue: function (e) {
+ if (e.nodeModel.getAttributeValue('isLastNode')) {
+ var t = e.nodeModel.getTreeDocument().getAllDescendants();
+ t = t.filter(
+ (e) =>
+ 'false' != e.options.grid.costImpactValid &&
+ 'Cancelled' != e.options.grid.maturity,
+ );
+ let n = 0,
+ o = 0,
+ a = 0;
+ for (var i = 0; i < t.length; i++)
+ isNaN(t[i].options.grid.costImpact) ||
+ ((n += t[i].options.grid.costImpact), a++);
+ return (o = Math.round(n / a));
+ }
+ return e.nodeModel.getAttributeValue('costImpact');
+ },
+ },
+ {
+ text: e.CHG_GOV_DataGrid_Column_Validation_Effort,
+ dataIndex: 'validationEffort',
+ editableFlag: !1,
+ typeRepresentation: 'string',
+ allowUnsafeHTMLContent: !0,
+ getCellClassName: function (e) {
+ if (
+ e.rowID >= 0 &&
+ 'ia_Total' == e.nodeModel.options.grid.id
+ )
+ return 'iaTotalAttribute';
+ },
+ compareFunction: function (e, t, i, n, o) {
+ return (
+ 'ia_Total' != i.options.grid.id &&
+ 'ia_Total' != n.options.grid.id &&
+ c(e, t)
+ );
+ },
+ getCellValue: function (e) {
+ if (e.nodeModel.getAttributeValue('isLastNode')) {
+ var t = e.nodeModel.getTreeDocument().getAllDescendants();
+ t = t.filter(
+ (e) =>
+ 'false' != e.options.grid.validationEffortValid &&
+ 'Cancelled' != e.options.grid.maturity,
+ );
+ var i = 0;
+ let o = 0,
+ a = 0;
+ for (var n = 0; n < t.length; n++)
+ isNaN(t[n].options.grid.validationEffort) ||
+ ((i += parseFloat(
+ t[n].options.grid.validationEffort,
+ )),
+ a++);
+ return `∑ ${i} | x̄ ${(o = i / a)} `;
+ }
+ return e.nodeModel.getAttributeValue('validationEffort');
+ },
+ },
+ {
+ text: e.CHG_GOV_DataGrid_Column_Risk_Impact,
+ dataIndex: 'riskImpact',
+ editableFlag: !1,
+ typeRepresentation: 'integer',
+ getCellClassName: function (e) {
+ if (
+ e.rowID >= 0 &&
+ 'ia_Total' == e.nodeModel.options.grid.id
+ )
+ return 'iaTotalAttribute';
+ },
+ compareFunction: function (e, t, i, n, o) {
+ return (
+ 'ia_Total' != i.options.grid.id &&
+ 'ia_Total' != n.options.grid.id &&
+ c(e, t)
+ );
+ },
+ getCellValue: function (e) {
+ if (e.nodeModel.getAttributeValue('isLastNode')) {
+ var t = e.nodeModel.getTreeDocument().getAllDescendants();
+ t = t.filter(
+ (e) =>
+ 'false' != e.options.grid.riskImpactValid &&
+ 'Cancelled' != e.options.grid.maturity,
+ );
+ let n = 0,
+ o = 0,
+ a = 0;
+ for (var i = 0; i < t.length; i++)
+ isNaN(t[i].options.grid.riskImpact) ||
+ ((n += t[i].options.grid.riskImpact), a++);
+ return (o = Math.round(n / a));
+ }
+ return e.nodeModel.getAttributeValue('riskImpact');
+ },
+ },
+ {
+ text: e.CHG_GOV_DataGrid_Column_Implementation_Effort,
+ dataIndex: 'implementationEffort',
+ editableFlag: !1,
+ typeRepresentation: 'string',
+ allowUnsafeHTMLContent: !0,
+ getCellClassName: function (e) {
+ if (
+ e.rowID >= 0 &&
+ 'ia_Total' == e.nodeModel.options.grid.id
+ )
+ return 'iaTotalAttribute';
+ },
+ compareFunction: function (e, t, i, n, o) {
+ return (
+ 'ia_Total' != i.options.grid.id &&
+ 'ia_Total' != n.options.grid.id &&
+ c(e, t)
+ );
+ },
+ getCellValue: function (e) {
+ if (e.nodeModel.getAttributeValue('isLastNode')) {
+ var t = e.nodeModel.getTreeDocument().getAllDescendants();
+ t = t.filter(
+ (e) =>
+ 'false' != e.options.grid.implementationEffortValid &&
+ 'Cancelled' != e.options.grid.maturity,
+ );
+ var i = 0;
+ let o = 0,
+ a = 0;
+ for (var n = 0; n < t.length; n++)
+ isNaN(t[n].options.grid.implementationEffort) ||
+ ((i += parseFloat(
+ t[n].options.grid.implementationEffort,
+ )),
+ a++);
+ return `∑ ${i} | x̄ ${(o = i / a)}`;
+ }
+ return e.nodeModel.getAttributeValue(
+ 'implementationEffort',
+ );
+ },
+ },
+ ],
+ },
+ ];
+ return (
+ 'true' == i.getGlobalVariable().ECMEnableDefaultChangeAnalysis &&
+ (t = [...t, ...n]),
+ t
+ );
+ }),
+ (l.changeView = function (i) {
+ if ('GridView' == i)
+ (this.currentView = 'Grid'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-list' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-list',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_GRID_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'selected'),
+ (n.options.grid.data.menu[1].state = 'unselected'),
+ (o = document.querySelector(
+ '.toolbar-impactAnalysis-grid-div .wux-ui-3ds-view-list',
+ )) && o.addClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-impactAnalysis-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.removeClassName('currentView'),
+ (r = document.querySelector(
+ '.content-impactAnalysis-grid-div',
+ )) &&
+ (r.removeClassName('hideView'),
+ r.removeClassName('nonVisible'),
+ r.addClassName('showView')),
+ (s = document.querySelector('.impactAnalysisTileView')) &&
+ (s.removeClassName('showView'), s.addClassName('hideView'));
+ else if ('TileView' == i) {
+ var n, o, a, r, s;
+ (this.currentView = 'Tile'),
+ (n = t.toolbar.getNodeModelByID('view')) &&
+ 'view-small-tile' != n.options.grid.semantics.icon.iconName &&
+ n.updateOptions({
+ grid: {
+ semantics: {
+ icon: {
+ iconName: 'view-small-tile',
+ },
+ },
+ },
+ tooltip: e.CHG_TOOLTIP_TILE_VIEW,
+ }),
+ (n.options.grid.data.menu[0].state = 'unselected'),
+ (n.options.grid.data.menu[1].state = 'selected'),
+ (o = document.querySelector(
+ '.toolbar-impactAnalysis-grid-div .wux-ui-3ds-view-list',
+ )) && o.removeClassName('currentView'),
+ (a = document.querySelector(
+ '.toolbar-impactAnalysis-grid-div .wux-ui-3ds-view-small-tile',
+ )) && a.addClassName('currentView'),
+ (r = document.querySelector(
+ '.content-impactAnalysis-grid-div',
+ )) && (r.removeClassName('showView'), r.addClassName('hideView')),
+ (s = document.querySelector('.impactAnalysisTileView')) &&
+ (s.removeClassName('hideView'), s.addClassName('showView'));
+ }
+ }),
+ (l.getRMBForChangeRequest = function (e, t) {
+ return new Promise((i, n) => {
+ let l = [],
+ c = {
+ objectId: e.id,
+ objectType: e.type,
+ displayName: e.name,
+ displayType: e.typeNLS,
+ },
+ d = [];
+ d.push(e.id),
+ l.push(a.createPropertyPushItem(d)),
+ l.push(r.getRelationalExplorerMenu(void 0, t, d)),
+ l.push(s.getMaturityMenu(void 0, e.id)),
+ o.openWith(c).then((e) => {
+ l.splice(2, 0, e), i(l);
+ });
+ });
+ }),
+ (l.createCustomOwner = function (e, t) {
+ var o = '/api/user/getpicture/login/' + t + '/format/normal',
+ a = i.getGlobalVariable().computeSwymUrl(o),
+ r = new UWA.Element('div', {
+ class: 'members',
+ }),
+ s = new UWA.Element('div', {
+ class: 'assignee',
+ }),
+ l = '';
+ if (i.getGlobalVariable().isSwymInstalled)
+ l = UWA.createElement('img', {
+ class: 'userIcon',
+ src: a,
+ });
+ else {
+ var c = n.getAvatarDetails(t);
+ (l = UWA.createElement('div', {
+ html: c.avatarStr,
+ class: 'avatarIcon',
+ })).style.setProperty('background', c.avatarColor);
+ }
+ l.inject(s);
+ var d = UWA.createElement('span', {
+ class: 'userName',
+ html: t,
+ });
+ return s.inject(r), d.inject(r), r.outerHTML;
+ }),
+ (l.filterView = function (e, i) {
+ if ('activeIA' == e)
+ (this.currentFilterView = 'activeIA'),
+ ((n =
+ t.toolbar.getNodeModelByID(
+ 'filter',
+ )).options.grid.data.menu[0].state = 'selected'),
+ (n.options.grid.data.menu[1].state = 'unselected'),
+ (n.options.grid.data.menu[2].state = 'unselected'),
+ setTimeout(function () {
+ require([
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/ChgCRImpactAnalysisDataGridLayout',
+ ], function (e) {
+ e.ChgCRImpactAnalysisTreeModel.empty();
+ e.refreshGrid({
+ filterView: 'activeIA',
+ });
+ });
+ }, 100);
+ else if ('inactiveIA' == e) {
+ (this.currentFilterView = 'inactiveIA'),
+ ((n =
+ t.toolbar.getNodeModelByID(
+ 'filter',
+ )).options.grid.data.menu[0].state = 'unselected'),
+ (n.options.grid.data.menu[1].state = 'selected'),
+ (n.options.grid.data.menu[2].state = 'unselected'),
+ setTimeout(function () {
+ require([
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/ChgCRImpactAnalysisDataGridLayout',
+ ], function (e) {
+ e.ChgCRImpactAnalysisTreeModel.empty();
+ e.refreshGrid({
+ filterView: 'inactiveIA',
+ });
+ });
+ }, 100);
+ } else if ('rolledUpIA' == e) {
+ var n;
+ (this.currentFilterView = 'rolledUpIA'),
+ ((n =
+ t.toolbar.getNodeModelByID(
+ 'filter',
+ )).options.grid.data.menu[0].state = 'unselected'),
+ (n.options.grid.data.menu[1].state = 'unselected'),
+ (n.options.grid.data.menu[2].state = 'selected'),
+ setTimeout(function () {
+ require([
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactAnalysis/ChgCRImpactAnalysisDataGridLayout',
+ ], function (e) {
+ e.ChgCRImpactAnalysisTreeModel.empty();
+ e.refreshGrid({
+ filterView: 'rollecdUpIA',
+ });
+ });
+ }, 100);
+ }
+ }),
+ (l.filterInactiveIAView = function () {
+ that.filterView('inactiveIA');
+ }),
+ l
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeAction/facets/proposedChanges/ChgCAProposedChangesUtil',
+ [
+ 'UWA/Core',
+ 'DS/ENOChgGovernanceUX/scripts/util/changeAction/ChgChangeActionUtil',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgDataGridUtil',
+ 'DS/ENOChgServices/scripts/services/ChgDataProcess',
+ 'DS/ENOChgServices/scripts/services/ChgInfraService',
+ 'DS/ENOChgServices/scripts/services/ChgIDCardCommonServices',
+ 'DS/ENOChgGovernanceUX/scripts/util/DocumentUtils',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ ],
+ function (e, t, i, n, o, a, r, s) {
+ 'use strict';
+ return {
+ getColumns: function () {
+ return [
+ i.getColumnDefinition({
+ dataIndex: 'titleTree',
+ }),
+ i.getColumnDefinition({
+ dataIndex: 'typeNLS',
+ }),
+ i.getColumnDefinition({
+ dataIndex: 'name',
+ }),
+ i.getColumnDefinition({
+ dataIndex: 'revision',
+ }),
+ i.getColumnDefinition({
+ dataIndex: 'maturityNLS',
+ }),
+ i.getColumnDefinition({
+ dataIndex: 'collabspaceNLS',
+ visibleFlag: !0,
+ }),
+ i.getColumnDefinition({
+ dataIndex: 'organizationNLS',
+ }),
+ {
+ dataIndex: 'description',
+ text: s.CHG_GOV_DataGrid_Column_Description,
+ editableFlag: !1,
+ visibleFlag: !1,
+ alwaysVisibleFlag: !1,
+ },
+ {
+ dataIndex: 'change',
+ text: s.CHG_GOV_Proposed_Changes,
+ editableFlag: !1,
+ visibleFlag: !0,
+ alwaysVisibleFlag: !1,
+ typeRepresentation: 'url',
+ width: 75,
+ filterId: 'set',
+ filterModel: [],
+ getCellValue: function (e) {
+ if (e.nodeModel)
+ return {
+ icon: e.nodeModel.getAttributeValue('activityIcon'),
+ };
+ },
+ getCellTooltip: function (e) {
+ if (e.nodeModel)
+ return {
+ shortHelp: e.nodeModel.getAttributeValue('change'),
+ };
+ },
+ },
+ {
+ dataIndex: 'change_details',
+ text: s.CHG_GOV_Realized_Change_Details,
+ editableFlag: !1,
+ visibleFlag: !0,
+ alwaysVisibleFlag: !1,
+ filterId: 'stringRegexp',
+ filterModel: '',
+ },
+ i.getColumnDefinition({
+ dataIndex: 'reasonForChange',
+ }),
+ {
+ dataIndex: 'proposedStatus',
+ text: s.CHG_GOV_Proposed_ProposalStatus,
+ editableFlag: !0,
+ visibleFlag: !0,
+ alwaysVisibleFlag: !1,
+ editionPolicy: 'EditionOnOver',
+ typeRepresentation: 'proposedStatus',
+ massUpdateAllowedFlag: !0,
+ filterId: 'set',
+ filterModel: [],
+ },
+ ];
+ },
+ getNativeContextualMenu: async function (e, t) {
+ let i = [];
+ return (
+ i.push(a.getExploreMenu(null, t)),
+ i.push(a.getExploreWithMenu(null, t)),
+ i.push(a.getOpenMenu(null, t)),
+ i.push(a.getOpenWithNativeMenu(null, t)),
+ this.getCommonMenu(e, t).forEach((e) => {
+ i.push(e);
+ }),
+ i
+ );
+ },
+ getDashboardContextualMenu: async function (e, t) {
+ let i = [],
+ n = await a.openWith(e);
+ return (
+ i.push(n),
+ (await this.getCommonMenu(e, t)).forEach((e) => {
+ i.push(e);
+ }),
+ i
+ );
+ },
+ getCommonMenu: async function (e, t) {
+ var i = [];
+ let n = {
+ type: 'PushItem',
+ title: s.CHG_GOV_Proposed_Edit,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-pencil',
+ },
+ action: {
+ callback: function (e) {
+ alert('ignore');
+ },
+ },
+ };
+ i.push(n);
+ let o = {
+ type: 'PushItem',
+ title: s.CHG_GOV_Proposed_ChangeAssessment,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-component',
+ },
+ action: {
+ callback: function (e) {
+ alert('compare');
+ },
+ },
+ };
+ i.push(o);
+ let a = {
+ type: 'PushItem',
+ title: s.CHG_GOV_Proposed_ProposalStatus,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-progress-0-clock',
+ },
+ submenu: [
+ {
+ type: 'PushItem',
+ title: s.CHG_GOV_Proposed_ProposalStatus_NotStarted,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-progress-0',
+ },
+ action: {
+ callback: function (e) {
+ alert('move 1');
+ },
+ },
+ },
+ {
+ type: 'PushItem',
+ title: s.CHG_GOV_Proposed_ProposalStatus_Started,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-progress-1',
+ },
+ action: {
+ callback: function (e) {
+ alert('move 2');
+ },
+ },
+ },
+ {
+ type: 'PushItem',
+ title: s.CHG_GOV_Proposed_ProposalStatus_Partial,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-progress-2',
+ },
+ action: {
+ callback: function (e) {
+ alert('move 2');
+ },
+ },
+ },
+ {
+ type: 'PushItem',
+ title: s.CHG_GOV_Proposed_ProposalStatus_Complete,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-progress-3',
+ },
+ action: {
+ callback: function (e) {
+ alert('move 2');
+ },
+ },
+ },
+ ],
+ };
+ i.push(a);
+ let l = {
+ type: 'PushItem',
+ title: s.CHG_GOV_Proposed_Resolution,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-target-add',
+ },
+ submenu: [
+ {
+ type: 'PushItem',
+ title: s.CHG_GOV_Proposed_ResolutionVersion,
+ fonticon: {
+ family: 1,
+ content:
+ 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-flow-branch-list',
+ },
+ action: {
+ callback: function (e) {
+ alert('move 1');
+ },
+ },
+ },
+ {
+ type: 'PushItem',
+ title: s.CHG_GOV_Proposed_ResolutionSearch,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-search',
+ },
+ action: {
+ callback: function (e) {
+ alert('move 2');
+ },
+ },
+ },
+ ],
+ };
+ i.push(l);
+ let c = {
+ type: 'PushItem',
+ title: s.CHG_GOV_Proposed_ChangeImpact,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-change',
+ },
+ action: {
+ callback: function (e) {
+ alert('compare');
+ },
+ },
+ };
+ i.push(c);
+ let d = {
+ type: 'PushItem',
+ title: s.CHG_GOV_Download,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-download',
+ },
+ action: {
+ callback: function (t) {
+ r.download([e.objectId]);
+ },
+ },
+ },
+ u = {
+ type: 'PushItem',
+ title: s.CHG_GOV_Preview,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-eye',
+ },
+ action: {
+ callback: function (t) {
+ r.preview([e.objectId]);
+ },
+ },
+ },
+ g = await r.getDocuments([e.objectId]);
+ g &&
+ g[0] &&
+ g[0].dataelements &&
+ 'TRUE' === g[0].dataelements.isDocumentType &&
+ (i.push(d), i.push(u));
+ let p = {
+ type: 'PushItem',
+ title: s.CHG_GOV_Header_Menu_Information,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-info',
+ },
+ action: {
+ callback: function (e) {
+ alert('info');
+ },
+ },
+ };
+ return i.push(p), i;
+ },
+ };
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgChangeOrderHomeUtil',
+ [
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/PlatformAPI/PlatformAPI',
+ 'DS/ENOChgRouter5/scripts/ChgRouter',
+ 'DS/ENOChgServices/scripts/services/ChgDataService',
+ 'DS/ENOChgServices/scripts/services/ChgDataProcess',
+ 'DS/ENOChgServices/scripts/services/ChgErrors',
+ 'DS/ENOChgGovernanceUX/scripts/config/ChgGovAppGlobalConfig',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovApplicationPreferencesManager',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovPreferenceConstant',
+ 'DS/ENOChgServices/scripts/services/ChgInfraService',
+ 'DS/UIKIT/Mask',
+ 'require',
+ 'DS/ENOChgProbes/scripts/ChgCloudProbeUtils',
+ ],
+ function (e, t, i, n, o, a, r, s, l, c, d, u) {
+ 'use strict';
+ var g = Object.create(null);
+ return (
+ (g.getTabs = function (e, t) {
+ this._pathChangeOrdersDetails = [
+ l._KEY,
+ l._VIEWS_PREFERENCES,
+ l._CHANGE_ORDERS_DETAILS,
+ ];
+ var i = s.getTab(this._pathChangeOrdersDetails);
+ let n = 'ChangeOrchestration';
+ return (
+ (n = '' == i ? 'ChangeOrchestration' : i),
+ console.log(i),
+ [
+ this.getChangeOrchestrationTab(e, t, n),
+ this.getMembersTab(e, t, n),
+ this.getApprovalsTab(e, t, n),
+ this.getCusTab(e, t, n),
+ ]
+ );
+ }),
+ (g.createHeaderFieldsJSON = function (t) {
+ return new Promise(function (i, n) {
+ let o = {
+ 'ds6w:project': [t.model.collabspace],
+ 'ds6w:organizationResponsible': [t.model.organization],
+ };
+ c.getNLSValuesPromise(o).then(function (n) {
+ let o = n['ds6w:organizationResponsible'][t.model.organization],
+ a = n['ds6w:project'][t.model.collabspace];
+ var r = {
+ id: t.model.id,
+ name: t.model.name,
+ revision: t.model.revision,
+ type: t.model.type,
+ title: t.model.title,
+ thumbnail: t.model.thumbnail,
+ iconURL: t.model.iconURL,
+ minified: !1,
+ onHold: t.model.onHold,
+ isKindOfType: t.model.isKindOfType,
+ attributes: {
+ layout: [
+ ['maturity', 'owner', 'collabSpace'],
+ ['Applicability', 'Dependency', 'Attachments'],
+ ['orgnaization', 'RelatedScope'],
+ ],
+ mapping: {
+ owner: {
+ fieldNLS: e.CHG_GOV_DataGrid_Column_Owner,
+ valueActual: t.model.owner,
+ valueDisplay: t.model.ownerFullName,
+ showLoader: !1,
+ displayWhenMinified: !0,
+ editable: !0,
+ accessBit: 'TransferOwnership',
+ },
+ collabSpace: {
+ fieldNLS: e.CHG_GOV_DataGrid_Column_CollabSpace,
+ valueActual: t.model.collabspace,
+ valueDisplay: a,
+ showLoader: !1,
+ displayWhenMinified: !0,
+ editable: !0,
+ accessBit: 'TransferOwnership',
+ },
+ maturity: {
+ fieldNLS: e.CHG_GOV_DataGrid_Column_Maturity,
+ valueActual: t.model.maturity,
+ valueDisplay: t.model.maturityNLS,
+ showLoader: !1,
+ displayWhenMinified: !0,
+ editable: !0,
+ },
+ orgnaization: {
+ fieldNLS: e.CHG_GOV_DataGrid_Column_Organization,
+ valueActual: t.model.organization,
+ valueDisplay: o,
+ showLoader: !1,
+ displayWhenMinified: !0,
+ editable: !0,
+ accessBit: 'TransferOwnership',
+ },
+ Applicability: {
+ fieldNLS: e.CHG_GOV_Header_Applicability,
+ valueActual: 'No',
+ valueDisplay: 'No',
+ showLoader: !0,
+ displayWhenMinified: !0,
+ editable: !0,
+ },
+ Dependency: {
+ fieldNLS: e.CHG_GOV_Header_Dependency,
+ valueActual: 'No',
+ valueDisplay: 'No',
+ showLoader: !0,
+ displayWhenMinified: !0,
+ editable: !0,
+ },
+ Attachments: {
+ fieldNLS: e.CHG_GOV_Header_Attachments,
+ valueActual: 'No',
+ valueDisplay: 'No',
+ showLoader: !0,
+ displayWhenMinified: !0,
+ editable: !0,
+ },
+ RelatedScope: {
+ fieldNLS: e.CHG_GOV_Header_RelatedScope,
+ valueActual: 'No',
+ valueDisplay: 'No',
+ showLoader: !1,
+ displayWhenMinified: !0,
+ editable: !0,
+ },
+ },
+ },
+ freeSpaces: [
+ {
+ type: 'text',
+ data: t.model.description,
+ },
+ ],
+ menuItems: [
+ {
+ id: 'chgHold',
+ text: e.CHG_GOV_Header_Menu_Hold,
+ fonticon: 'fonticon fonticon-pause',
+ accessBit: 'Hold',
+ },
+ {
+ id: 'chgResume',
+ text: e.CHG_GOV_Header_Menu_Resume,
+ fonticon: 'fonticon fonticon-resume',
+ accessBit: 'Resume',
+ },
+ {
+ id: 'chgCancel',
+ text: e.CHG_GOV_Header_Menu_Cancel,
+ fonticon: 'fonticon fonticon-block',
+ accessBit: 'Cancel',
+ },
+ ],
+ };
+ i(r);
+ });
+ });
+ }),
+ (g.displayObjectInfoInsideIDcard = function (e, t = !1) {
+ var a = this;
+ n.getChangeOrderInfo(e).then(
+ function (e) {
+ var n = o.processedChangeOrderDetail(e);
+ if (t)
+ try {
+ let t = u('DS/ENOChgProbes/scripts/ChgCloudProbeUtils');
+ var s = e.data[0].dataelements;
+ (s.type = e.data[0].type),
+ (s.isKindOfType = 'Change Order'),
+ t.cloudProbeUtils.sendChgObjectCreateTrackerEvent({
+ createData: s,
+ });
+ } catch (e) {
+ console.log(e);
+ }
+ var l = {
+ model: n[0],
+ };
+ a.createHeaderFieldsJSON(l).then(function (e) {
+ var t = {
+ model: e,
+ };
+ i.navigate(
+ r.ROUTE_CO_DETAILS,
+ {
+ id: e.id,
+ name: e.name,
+ title: e.title,
+ nodeModel: t,
+ mode: 'outsideCall',
+ },
+ {
+ reload: !0,
+ },
+ );
+ });
+ },
+ function (e) {
+ var t = document.getElementsByClassName('moduleWrapper')[0];
+ return t && d.isMasked(t) && d.unmask(t), Promise.reject(e);
+ },
+ );
+ }),
+ (g.getChangeOrderModelForIDCard = function (e) {
+ return new Promise(function (t, i) {
+ n.getChangeOrderInfo(e).then(function (e) {
+ var i = {
+ model: o.processedChangeOrderDetail(e)[0],
+ };
+ t(i);
+ });
+ });
+ }),
+ (g.getChangeOrchestrationTab = (t, i, n) => {
+ let o = !1;
+ return (
+ 'ChangeOrchestration' == n && (o = !0),
+ (i.isSelected = o),
+ {
+ label: e.CHG_GOV_Home_Tab_ChangeOrchestration,
+ isSelected: o,
+ index: 0,
+ value: 'coOrchestration',
+ content: t.createOrchestrationTab(i),
+ icon: {
+ iconName: 'flow-tree-ordered',
+ fontIconFamily: WUXManagedFontIcons.Font3DS,
+ },
+ }
+ );
+ }),
+ (g.getMembersTab = (t, i, n) => {
+ let o = !1;
+ return (
+ 'Members' == n && (o = !0),
+ (i.isSelected = o),
+ {
+ label: e.CHG_GOV_Home_Tab_Members,
+ isSelected: o,
+ value: 'coMembers',
+ index: 1,
+ content: t.createMembersTab(i),
+ icon: {
+ iconName: 'users',
+ fontIconFamily: WUXManagedFontIcons.Font3DS,
+ },
+ }
+ );
+ }),
+ (g.getApprovalsTab = (t, i, n) => {
+ let o = !1;
+ return (
+ 'Approvals' == n && (o = !0),
+ (i.isSelected = o),
+ {
+ label: e.CHG_GOV_Home_Tab_Approvals,
+ isSelected: o,
+ value: 'coApprovals',
+ index: 2,
+ content: t.createApprovalsTab(i, n),
+ icon: {
+ iconName: 'status-ok',
+ fontIconFamily: WUXManagedFontIcons.Font3DS,
+ },
+ }
+ );
+ }),
+ g
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/ChgCreateChangeOrder',
+ [
+ 'DS/ENOChgServices/scripts/services/ChgDataProcess',
+ 'DS/ENOChgServices/scripts/services/ChgInfraService',
+ 'DS/UIKIT/Mask',
+ 'DS/PlatformAPI/PlatformAPI',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgChangeOrderHomeUtil',
+ 'DS/ENOChgServices/scripts/components/ChgCommonCreateDialog',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENONewWidget/ENONewLauncher',
+ 'require',
+ 'DS/ENOChgProbes/scripts/ChgCloudProbeUtils',
+ ],
+ function (e, t, i, n, o, a, r, s, l, c) {
+ var d = {
+ onCompleteCallback: function (e) {
+ let t = e.data[0].id,
+ a = {};
+ (a.context = t),
+ (a.type = 'ChangeOrder'),
+ c(
+ 'DS/ENOChgGovernanceUX/scripts/view/ChgChangeOrderHome',
+ ).launchPropertyPanelContext(a),
+ s.getGlobalVariable().existingCOIds.push(t),
+ o.displayObjectInfoInsideIDcard(t),
+ n.publish('load-dependency' + widget.id, 'pid:' + t);
+ var r = document.getElementById('outer-co-div');
+ i.unmask(r);
+ },
+ onFailureCallback: function () {
+ var e = document.getElementById('outer-co-div');
+ i.unmask(e), console.log('ERROR : FAILED CREATE CO');
+ },
+ createChangeOrder: function (e) {
+ let t = {
+ context: {
+ service: '3DSpace',
+ tenant: s.getGlobalVariable().tenant,
+ header: {
+ SecurityContext: s.getGlobalVariable().getSecurityContext(),
+ },
+ },
+ labelTopBar: r.CHG_NEW_CHANGE_ORDER_FORM,
+ type: 'Change Order',
+ silentMode: !1,
+ overlay: !0,
+ options: {
+ typeName: 'Change Order',
+ preferedType: 'Change Order',
+ select: [],
+ },
+ events: {
+ onSuccess: function (t) {
+ e && (e.isClickProcessing = !1);
+ var n = document.getElementsByClassName('moduleWrapper')[0];
+ (null == n && 'undefined' == n) || i.mask(n);
+ let o = t.result[0].identifier,
+ a = {};
+ (a.context = o), (a.type = 'ChangeOrder');
+ let r = c(
+ 'DS/ENOChgGovernanceUX/scripts/view/ChgChangeOrderHome',
+ ),
+ s = c(
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgChangeOrderHomeUtil',
+ );
+ r.launchPropertyPanelContext(a),
+ s.displayObjectInfoInsideIDcard(o, !0);
+ },
+ onFailure: function (t) {
+ console.log('onFailure...............' + t),
+ e && (e.isClickProcessing = !1);
+ },
+ onCancel: function (t) {
+ e && (e.isClickProcessing = !1);
+ },
+ },
+ };
+ var n = {
+ commandInfo: {
+ type: 'Change Order',
+ facet: 'Start a New Activity',
+ action: 'CO>Start a New Activity>New Change Order',
+ },
+ };
+ c(
+ 'DS/ENOChgProbes/scripts/ChgCloudProbeUtils',
+ ).cloudProbeUtils.genericCommandClickEventForAnalytics({
+ inputJSON: n,
+ }),
+ new l().CreateNew(t);
+ },
+ processChangeOrder: function (e) {
+ var i = e.titleText,
+ n = {
+ data: [
+ {
+ dataelements: {
+ description: e.DescText,
+ policy: 'Fast track Change',
+ title: i,
+ },
+ },
+ ],
+ };
+ t.createChangeOrder(
+ JSON.stringify(n),
+ d.onCompleteCallback,
+ d.onFailureCallback,
+ );
+ },
+ createBlankChangeOrder: function (e, n, o) {
+ var a = o.value;
+ if (
+ (void 0 !== window.__karma__ && (a = 'ODT_CA'),
+ null != a && '' != a.trim())
+ ) {
+ var r = document.getElementById('outer-co-div');
+ (null == r && 'undefined' == r) || i.mask(r);
+ var s = {
+ data: [
+ {
+ dataelements: {
+ description: a,
+ policy: 'Fast track Change',
+ title: a,
+ },
+ },
+ ],
+ };
+ t.createChangeOrder(
+ JSON.stringify(s),
+ d.onCompleteCallback,
+ d.onFailureCallback,
+ );
+ }
+ o.value = '';
+ },
+ };
+ return d;
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/model/changeRequest/facets/impactedItem/ChgCRImpacedItemDataGridModel',
+ [
+ 'UWA/Class/Model',
+ 'DS/TreeModel/TreeDocument',
+ 'DS/TreeModel/TreeNodeModel',
+ 'DS/TreeModel/DataModelSet',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgServices/scripts/services/ChgMembersServices',
+ 'DS/ENOChgServices/scripts/services/ChgDataService',
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactedItem/util/ChgCRImpactedItemGridColsUtil',
+ 'DS/ENOChgServices/scripts/services/ChgErrors',
+ 'DS/UIKIT/Mask',
+ 'DS/TreeModel/BaseFilter',
+ ],
+ function (e, t, i, n, o, a, r, s, l, c, d, u) {
+ 'use strict';
+ var g = u.inherit({
+ publishedProperties: {},
+ isDataFiltered: function (e) {
+ var t = e.getAttributeValue('id');
+ return (
+ !(!this.filterModel || !this.filterModel.allowedIDs) &&
+ -1 === this.filterModel.allowedIDs.indexOf(t)
+ );
+ },
+ isEmpty: function () {
+ return void 0 === this.filterModel.allowedIDs;
+ },
+ });
+ let p = e.extend({
+ init: function (e, t) {
+ (this.parentCRId = e),
+ Array.isArray(t)
+ ? (this.impactAnalysisIds = t)
+ : (this.impactAnalysisId = t);
+ },
+ setTreeDocument: function (e) {
+ this.treeDocument = e;
+ },
+ getTreeDocument: function () {
+ return this.treeDocument;
+ },
+ createTreeDocument: function () {
+ let e = new t({
+ id: 'IA_ImpactItem',
+ useAsyncPreExpand: !0,
+ });
+ return (
+ (e.isChildOf = function (e) {
+ let t = e.getChildren();
+ for (let e = 0; e < t.length; e++)
+ if (this.options.grid.id == t[e].options.grid.id) return !0;
+ return !1;
+ }),
+ this.setTreeDocument(e),
+ e
+ );
+ },
+ registerCustomFilter: function () {
+ this.treeDocument.getFilterManager().registerFilter('stringRole', g);
+ },
+ loadImpactedItem: function (e, t) {
+ e.prepareUpdate();
+ let i = this.createTreeDocumentNodeModel(t);
+ e.addRoot(i), e.pushUpdate();
+ },
+ createTreeDocumentNodeModel: function (e) {
+ let t = [];
+ for (let i = 0; i < e.length; i++) {
+ e[i].impactedItem && 'IMPACTED' != e[i].impactedItem
+ ? (e[i].impact = 'notImpactedKey')
+ : (e[i].impact = 'impactedKey'),
+ e[i].reasonForChange || (e[i].reasonForChange = '');
+ let n = this.createTreeNode(e[i]);
+ t.push(n);
+ }
+ return t;
+ },
+ createTreeNode: function (e) {
+ let t = this.createCustomOwnerField(e);
+ e.chgObjOwner = t;
+ let n = e.name + ' | ' + e.ownerFullName,
+ a = e.currentNLS;
+ var r,
+ s = this.getCustomTooltip(e);
+ return (
+ (r = o.getGlobalVariable().is3DSpace
+ ? '' +
+ UWA.String.escapeHTML(e.title) +
+ ''
+ : e.title),
+ new i({
+ label: r,
+ subLabel: n,
+ description: a,
+ grid: e,
+ icons: [e.icon],
+ thumbnail: e.previewicon,
+ contextualMenu: ['dummy placeholder'],
+ useAsyncPreExpand: !0,
+ customTooltip: s,
+ })
+ );
+ },
+ createCustomOwnerField: function (e) {
+ let t = '/api/user/getpicture/login/' + e.owner + '/format/normal',
+ i = o.getGlobalVariable().computeSwymUrl(t),
+ n = new UWA.Element('div', {
+ class: 'members',
+ }),
+ a = new UWA.Element('div', {
+ class: 'assignee',
+ }),
+ s = '';
+ if (o.getGlobalVariable().isSwymInstalled)
+ s = UWA.createElement('img', {
+ class: 'userIcon',
+ src: i,
+ });
+ else {
+ let t = r.getAvatarDetails(e.ownerFullName);
+ (s = UWA.createElement('div', {
+ html: t.avatarStr,
+ class: 'avatarIcon',
+ })).style.setProperty('background', t.avatarColor);
+ }
+ s.inject(a);
+ let l = UWA.createElement('span', {
+ class: 'userName',
+ html: e.ownerFullName,
+ });
+ return a.inject(n), l.inject(n), n.outerHTML;
+ },
+ getCustomTooltip: function (e) {
+ return (
+ a.CHG_GOV_DataGrid_Column_Title +
+ ': ' +
+ e.title +
+ '\n' +
+ a.CHG_GOV_DataGrid_Column_Name +
+ ': ' +
+ e.name +
+ '\n' +
+ a.CHG_GOV_DataGrid_Column_Owner +
+ ': ' +
+ e.ownerFullName +
+ '\n' +
+ a.CHG_GOV_DataGrid_Column_Maturity +
+ ': ' +
+ e.currentNLS
+ );
+ },
+ addExistingChildren: function (e) {
+ let t = this;
+ return new Promise(function (i, n) {
+ let o = t.impactAnalysisId,
+ a = t.parentCRId,
+ r = document.getElementById('outer-impactedItem-grid-div');
+ 'undefined' != r && null != r && d.mask(r),
+ s.updateExistingImpactItem(a, o, e).then(
+ function (e) {
+ let n = [];
+ e && (n = e.data);
+ let o = [];
+ for (let e of n)
+ (e.reasonForChange = ''),
+ (e.impactedItem = 'IMPACTED'),
+ o.push(e);
+ t.addNodesInLayoutModel(t.treeDocument, o), i(e), d.unmask(r);
+ },
+ function (e) {
+ d.unmask(r), n(e);
+ },
+ );
+ });
+ },
+ addNodesInLayoutModel: function (e, t) {
+ 0 == e.getChildren().length &&
+ e._modelEvents.publish({
+ event: 'treeNotEmpty',
+ });
+ let i = p.prototype.createTreeDocumentNodeModel(t);
+ if ((e.prepareUpdate(), 0 == e.getRoots().length)) e.addRoot(i);
+ else for (let t = i.length - 1; t >= 0; t--) e.addRoot(i[t], 0);
+ e.pushUpdate();
+ let n = [];
+ i.forEach((e) =>
+ n.push({
+ id: e.options.grid.id,
+ }),
+ ),
+ this.addCAInfoForImpactedItems(n);
+ },
+ removeChildren: function (e) {
+ let t = this;
+ return new Promise(function (i, n) {
+ let o = t.impactAnalysisId,
+ r = t.parentCRId,
+ l = t.treeDocument.getSelectedNodes();
+ l.length
+ ? s.updateExistingImpactItem(r, o, e).then(
+ function (e) {
+ for (let e = 0; e < l.length; e++)
+ t.treeDocument.removeRoot(l[e]);
+ 0 == t.treeDocument.getChildren().length &&
+ t.treeDocument._modelEvents.publish({
+ event: 'treeEmpty',
+ }),
+ i(l),
+ c.success(a.CHG_GOV_ImpactItem_Remove_Success);
+ },
+ function (e) {
+ d.unmask(outerDiv), n();
+ },
+ )
+ : c.error(a.CHG_GOV_ChangeOrchestration_Remove_No_Objects);
+ });
+ },
+ addCAInfoForImpactedItems: function (e) {
+ var t = this;
+ s.getCAInfoImpactedItems(e).then(
+ (e) => {
+ t.mergeProposedCA(e.data);
+ },
+ (e) => {},
+ );
+ },
+ mergeProposedCA: function (e) {
+ let t = this.getTreeDocument().getAllDescendants();
+ for (let i = 0; i < e.length; i++)
+ for (let n = 0; n < t.length; n++)
+ if (e[i].id == t[n].options.grid.id) {
+ let o = l.getProposedColumnBasedOnData(
+ e[i].proposedChangeActions,
+ );
+ t[n].updateOptions({
+ grid: {
+ proposedChangeActionsData: e[i].proposedChangeActions,
+ proposedChangeAction: o,
+ },
+ });
+ }
+ },
+ filterView: function (e, t) {
+ let i = t,
+ n = e.matchingIDs;
+ i.setFilterModel({
+ role: {
+ filterId: 'stringRole',
+ filterModel: {
+ allowedIDs: n,
+ },
+ },
+ });
+ },
+ enableColorizeView: function (e, t) {
+ let i = t.getAllDescendants();
+ var n, o;
+ (n = e),
+ (o = function (e, t) {
+ i.map((i) => {
+ if (i.options.grid.id === t) {
+ var n = {
+ grid: {
+ biColor: e,
+ },
+ color: e,
+ };
+ i.updateOptions(n);
+ }
+ });
+ }),
+ UWA.is(n, 'array') &&
+ n.forEach(function (e) {
+ var t = e.color,
+ i = e.id;
+ o(t, i);
+ });
+ },
+ disableColorizeView: function (e, t) {
+ t.getAllDescendants().map((e) => {
+ e.updateOptions({
+ grid: {
+ biColor: 'rgba(0, 0, 0, 0)',
+ },
+ color: 'rgba(0, 0, 0, 0)',
+ });
+ });
+ },
+ });
+ return p;
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/ChgChangeOrderDataGridView',
+ [
+ 'UWA/Class/View',
+ 'DS/CoreEvents/ModelEvents',
+ 'DS/Core/PointerEvents',
+ 'DS/DataGridView/DataGridView',
+ 'DS/ENOChgGovernanceUX/scripts/view/ChgCODataGridViewToolbar',
+ 'DS/ENOChgServices/scripts/services/ChgInfraService',
+ 'DS/CollectionView/CollectionViewStatusBar',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgChangeOrderFeaturesUtil',
+ 'DS/ENOChgGovernanceUX/scripts/wrapper/ChgGovTweakerExpandInput',
+ 'DS/ENOChgGovernanceUX/scripts/view/ChgCreateChangeOrder',
+ 'DS/CollectionView/ResponsiveTilesCollectionView',
+ 'DS/ENOChgServices/scripts/services/ChgCustomAttributeService',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'require',
+ ],
+ function (e, t, i, n, o, a, r, s, l, c, d, u, g, p, h) {
+ 'use strict';
+ return e.extend({
+ init: function (e) {
+ this._parent(e),
+ (this._modelEvents = null),
+ 'undefined' != e && 'undefined' != e.modelEvents
+ ? (this._modelEvents = e.modelEvents)
+ : (this._modelEvents = new t()),
+ (this.coDatagridView = '');
+ },
+ render: function () {
+ if (
+ 'undefined' != this.options.target &&
+ null != this.options.target
+ ) {
+ var e = this.processColumns(),
+ t = this,
+ h = {
+ treeDocument: this.options.treeDocument,
+ columns: e,
+ cellSelection: 'none',
+ rowSelection: 'multiple',
+ cellDragEnabledFlag: !0,
+ showNodeKPIColorFlag: !0,
+ placeholder: '',
+ identifier: 'chgCOSummaryGrid',
+ defaultColumnDef: {
+ width: 'auto',
+ resizableFlag: !0,
+ sortableFlag: !0,
+ },
+ onContextualEvent: function (e) {
+ var i = [];
+ if (e && e.collectionView && e.cellInfos) {
+ if (e.cellInfos.rowID > -1)
+ return l.showRMBMenuOnGrid(t, e).then(function (e) {
+ return e;
+ });
+ e.collectionView.columns.length, e.cellInfos.columnID;
+ i = e.collectionView.buildDefaultContextualMenu(e, {
+ pin: !0,
+ firstColumnsVisibility: !0,
+ columnsManagement: !0,
+ sizeColumnToFit: !1,
+ });
+ }
+ return i;
+ },
+ filterBaseCAId: 'All My Active Changes',
+ onDragStartRowHeader: function (e, t) {
+ a.readyDragContent(e, t);
+ },
+ onDragStartCell: function (e, t) {
+ a.readyDragContent(e, t);
+ },
+ };
+ (h = UWA.merge(h, this.options)),
+ (this.coDatagrid = new n(h)),
+ (this.coDatagrid.cellSelection = 'none'),
+ (this.coDatagrid.getCustomViewsManager().onCustomViewsSave =
+ function (e, t) {
+ e.map((e) => {
+ if (e.identifier == t) {
+ let t = e.columnsVisibleFlag;
+ if (null != t && null != t) {
+ let e = Object.keys(t);
+ p.getGlobalVariable().customeViewCOList = e;
+ }
+ }
+ });
+ }),
+ (this.coDatagrid.onDelayedModelDataRequest = function (e) {
+ let i = t.coDatagrid.getCustomViewsManager().getCustomViews(),
+ n =
+ t.coDatagrid.getCustomViewsManager()
+ ._currentCustomViewIdentifier;
+ i.map((e) => {
+ if (e.identifier == n) {
+ let t = e.columnsVisibleFlag;
+ if (null != t && null != t) {
+ let e = Object.keys(t);
+ p.getGlobalVariable().customeViewCOList = e;
+ }
+ }
+ });
+ var o = e.collectionView;
+ let a = [],
+ r = [],
+ s = [
+ 'applicabilityNLS',
+ 'organizationNLS',
+ 'collabspaceNLS',
+ 'co_Coordinator',
+ 'co_Owner',
+ 'sev',
+ 'maturityNLS',
+ 'co_name',
+ 'modificationDate',
+ 'creationDate',
+ ],
+ l = p.getGlobalVariable().customeViewCOList,
+ c = [];
+ if (
+ (l.forEach(function (e) {
+ s.includes(e) || c.push(e);
+ }),
+ -1 != e.endNodeIndex && -1 != e.startNodeIndex)
+ ) {
+ for (let t = e.startNodeIndex; t <= e.endNodeIndex; t++) {
+ a.push(o.model[t].options.grid.id), r.push(o.model[t]);
+ for (let e = 0; e < c.length; e++)
+ o.model[t].setAttribute(c[e], void 0);
+ }
+ var d = a.filter((e) => !!e);
+ d.length > 0 && g.updateAsynAttributeColumn(c, d, r);
+ }
+ }),
+ (this.coTilesView = new u({
+ model: this.options.treeDocument,
+ height: 'inherit',
+ displayedOptionalCellProperties: [
+ 'contextualMenu',
+ 'description',
+ 'propertiesList',
+ 'activeFlag',
+ 'statusbarIcons',
+ ],
+ allowUnsafeHTMLContent: !1,
+ useDragAndDrop: !0,
+ grid: {
+ selectionBehavior: {
+ toggle: !0,
+ unselectAllOnEmptyArea: !0,
+ canMultiSelect: !0,
+ canInteractiveMultiselectWithCheckboxClick: !0,
+ },
+ },
+ onDragStartCell: function (e, t) {
+ a.readyDragContent(e, t);
+ },
+ onDragEnterBlankDefault: function (e) {},
+ onDragEnterBlank: function (e) {},
+ }));
+ var m = {
+ callback: function (e) {
+ if (e && e.cellInfos && e.cellInfos.cellModel)
+ return l.showRMBMenuOnGrid(t, e).then(function (e) {
+ return e;
+ });
+ },
+ };
+ this.coTilesView.onContextualEvent = m;
+ var C = {
+ viewdropdown: {
+ stdTemplate: 'comboSelector',
+ semantics: {
+ possibleValues: [
+ {
+ value: s.CHG_VIEW_LIST,
+ icon: {
+ iconName: 'view-list',
+ fontIconFamily: 1,
+ },
+ },
+ {
+ value: s.CHG_VIEW_TILE,
+ icon: {
+ iconName: 'view-small-tile',
+ fontIconFamily: 1,
+ },
+ },
+ ],
+ },
+ },
+ },
+ v = {
+ expandInput: {
+ stdTemplate: 'expandInputtemplate',
+ },
+ },
+ f = {
+ expandInputtemplate: {
+ path: 'DS/ENOChgGovernanceUX/scripts/wrapper/ChgGovTweakerExpandInput',
+ options: {
+ displayStyle: 'TextBox',
+ },
+ },
+ };
+ try {
+ new c();
+ } catch (e) {
+ console.log(e);
+ }
+ this.coDatagrid
+ .getTypeRepresentationFactory()
+ .registerTypeTemplates(f),
+ this.coDatagrid
+ .getTypeRepresentationFactory()
+ .registerTypeRepresentations(v),
+ this.coDatagrid
+ .getTypeRepresentationFactory()
+ .registerTypeRepresentations(C),
+ this.coDatagrid
+ .getTypeRepresentationFactory()
+ .registerTypeRepresentations({
+ sortingdropdown: {
+ stdTemplate: 'functionMenuIcon',
+ semantics: {
+ label: 'action',
+ icon: 'sorting',
+ },
+ },
+ }),
+ (o.toolbar = this.coDatagrid.setToolbar(
+ o.writetoolbarDefination(),
+ )),
+ (this.toolbar = o.toolbar),
+ this.toolbar.typeRepresentationFactory.registerTypeTemplates(f),
+ this.toolbar.typeRepresentationFactory.registerTypeRepresentations(
+ v,
+ ),
+ (t = this).toolbar.addEventListener('onReady', function (e) {
+ var i = t.toolbar.getNodeModelByID('addNewBlankCAId');
+ i &&
+ i._associatedView.registerkeyDownCallback(
+ d.createBlankChangeOrder,
+ );
+ }),
+ this.coDatagrid.addEventListener('allCellsRendered', function () {
+ t.coDatagrid.buildStatusBar([
+ {
+ type: r.STATUS.CUSTOM,
+ id: 'totalItems',
+ dataElements: {
+ typeRepresentation: 'string',
+ value:
+ s.CHG_GOV_StatusBar_TotalItems +
+ t.coDatagrid.getTreeDocument().getAllDescendants()
+ .length,
+ },
+ },
+ {
+ type: r.STATUS.CUSTOM,
+ id: 'selectedGridCount',
+ dataElements: {
+ typeRepresentation: 'string',
+ value:
+ s.CHG_GOV_StatusBar_SelectedItems +
+ t.coDatagrid.getTreeDocument().getSelectedNodes()
+ .length,
+ },
+ },
+ ]),
+ t.coTilesView.buildStatusBar([
+ {
+ type: r.STATUS.CUSTOM,
+ id: 'totalItems',
+ dataElements: {
+ typeRepresentation: 'string',
+ value:
+ s.CHG_GOV_StatusBar_TotalItems +
+ t.coTilesView.getTreeDocument().getAllDescendants()
+ .length,
+ },
+ },
+ {
+ type: r.STATUS.CUSTOM,
+ id: 'selectedTileCount',
+ dataElements: {
+ typeRepresentation: 'string',
+ value:
+ s.CHG_GOV_StatusBar_SelectedItems +
+ t.coTilesView.getTreeDocument().getSelectedNodes()
+ .length,
+ },
+ },
+ ]);
+ }),
+ t.coDatagrid.addEventListener(i.POINTERHIT, function (e, i) {
+ t.onItemClick(e, i);
+ }),
+ t.coDatagrid
+ .getTreeDocument()
+ .getXSO()
+ .onAdd(function (e) {
+ t.coDatagrid.elements.statusBar
+ .getNodeModelByID('selectedGridCount')
+ .updateOptions({
+ grid: {
+ data:
+ s.CHG_GOV_StatusBar_SelectedItems +
+ t.coDatagrid.getTreeDocument().getSelectedNodes()
+ .length,
+ },
+ }),
+ t.coTilesView.elements.statusBar
+ .getNodeModelByID('selectedTileCount')
+ .updateOptions({
+ grid: {
+ data:
+ s.CHG_GOV_StatusBar_SelectedItems +
+ t.coDatagrid.getTreeDocument().getSelectedNodes()
+ .length,
+ },
+ }),
+ t._modelEvents.publish({
+ event: 'co-DataGrid-on-click',
+ data: {
+ model: e.options.grid,
+ context: e,
+ },
+ context: e,
+ });
+ }),
+ t.coDatagrid
+ .getTreeDocument()
+ .getXSO()
+ .onRemove(function (e) {
+ t.coDatagrid.elements.statusBar
+ .getNodeModelByID('selectedGridCount')
+ .updateOptions({
+ grid: {
+ data:
+ s.CHG_GOV_StatusBar_SelectedItems +
+ e.getTreeDocument().getSelectedNodes().length,
+ },
+ }),
+ t.coTilesView.elements.statusBar
+ .getNodeModelByID('selectedTileCount')
+ .updateOptions({
+ grid: {
+ data:
+ s.CHG_GOV_StatusBar_SelectedItems +
+ e.getTreeDocument().getSelectedNodes().length,
+ },
+ }),
+ 0 == e.getTreeDocument().getSelectedNodes().length
+ ? t._modelEvents.publish({
+ event: 'co-DataGrid-on-unselect-all',
+ data: {
+ model: e.options.grid,
+ context: e,
+ type: e.options.grid.isKindOfType,
+ load: !1,
+ },
+ context: e,
+ })
+ : t._modelEvents.publish({
+ event: 'co-DataGrid-on-unselect',
+ data: {
+ model: e,
+ context: e,
+ },
+ context: e,
+ });
+ }),
+ t.coTilesView.addEventListener(i.POINTERHIT, function (e, i) {
+ t.onItemClick(e, i);
+ }),
+ (this.onItemClick = function (e, i) {
+ i &&
+ i.nodeModel &&
+ i.nodeModel.options.grid &&
+ 2 == e.multipleHitCount &&
+ (i.nodeModel.select(!0),
+ t._modelEvents.publish({
+ event: 'co-DataGrid-on-dblclick',
+ data: {
+ model: i.nodeModel.options.grid,
+ },
+ context: i.nodeModel,
+ }));
+ }),
+ (this.coDatagridView = UWA.createElement('div', {
+ id: 'outer-co-div',
+ styles: {
+ width: '100%',
+ height: '100%',
+ display: 'inline-block',
+ },
+ class: 'outer-co-div',
+ }));
+ var b = UWA.createElement('div', {
+ styles: {
+ width: '100%',
+ },
+ class: 'toolbar-co-div',
+ });
+ this.toolbar.inject(b);
+ var w = UWA.createElement('div', {
+ class: 'content-co-div cogridView showView',
+ }),
+ D = UWA.createElement('div', {
+ class: 'cotileView hideView',
+ }),
+ S = UWA.createElement('div', {
+ class: 'hideView',
+ id: 'emptyTileViewDiv',
+ });
+ UWA.createElement('div', {
+ html: s.CHG_GOV_DataGrid_PlaceHolder,
+ }).inject(S),
+ this.coDatagrid.inject(w),
+ this.coTilesView.inject(D),
+ S.inject(D),
+ this.coDatagridView.addContent(b),
+ this.coDatagridView.addContent(w),
+ this.coDatagridView.addContent(D),
+ this.coDatagridView.inject(this.options.target),
+ this.coDatagridView.setStyle(
+ 'width',
+ this.options.target.offsetWidth,
+ ),
+ this._modelEvents.subscribe(
+ {
+ event: 'co-DataGrid-on-search',
+ },
+ function (e) {
+ var i = e.query;
+ i &&
+ t.coDatagrid
+ .getTreeDocument()
+ .getAllDescendants()
+ .forEach(function (e) {
+ !e.isVisible() ||
+ e.options.grid.title.contains(i) ||
+ e.options.grid.name.contains(i)
+ ? e.isVisible() ||
+ (!e.options.grid.title.contains(i) &&
+ !e.options.grid.name.contains(i)) ||
+ e.show()
+ : e.hide();
+ });
+ },
+ ),
+ this._modelEvents.subscribe(
+ {
+ event: 'co-DataGrid-on-reset-search',
+ },
+ function (e) {
+ t.coDatagrid
+ .getTreeDocument()
+ .getAllDescendants()
+ .forEach(function (e) {
+ e.isVisible() || e.show();
+ });
+ },
+ );
+ }
+ },
+ processColumns: function () {
+ return this.options.columns;
+ },
+ reapplySortModel: function () {
+ this.coDatagrid.reapplySortModel();
+ },
+ setListnersOnToolbar: function () {
+ (widget.onRefresh = function () {}),
+ (widget.onResize = function () {
+ h(
+ 'DS/ENOChgGovernanceUX/scripts/view/ChgCODataGridLayout',
+ ).loadingViewPreference();
+ });
+ },
+ });
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovGlobalSubscriber',
+ [
+ 'DS/PlatformAPI/PlatformAPI',
+ 'DS/ENOChgGovernanceUX/scripts/view/ChgChangeOrderDataGridView',
+ ],
+ function (e, t) {
+ 'use strict';
+ var i = {
+ globalRegisterationObj: {},
+ addObserver: function (e, t, n) {
+ if (i.globalRegisterationObj[t]) {
+ for (var o = !1, a = 0; a < i.globalRegisterationObj[t].length; a++)
+ if (i.globalRegisterationObj[t][a].observerID == e) {
+ (i.globalRegisterationObj[t][a].callback = n), (o = !0);
+ break;
+ }
+ o ||
+ i.globalRegisterationObj[t].push({
+ observerID: e,
+ callback: n,
+ });
+ } else
+ (i.globalRegisterationObj[t] = []),
+ i.globalRegisterationObj[t].push({
+ observerID: e,
+ callback: n,
+ });
+ },
+ removeObserver: function (e, t) {
+ for (var n = 0; n < i.globalRegisterationObj[e].length; n++)
+ i.globalRegisterationObj[e][n].observerID == t &&
+ i.globalRegisterationObj[e].splice(n, 1);
+ },
+ notify(e, t) {
+ for (var n = i.globalRegisterationObj[e], o = 0; o < n.length; o++)
+ try {
+ n[o].callback(t);
+ } catch (e) {
+ console.log(e);
+ }
+ },
+ };
+ return (
+ e.subscribe('CO-Properties-Update', function (e) {
+ i.notify('CO-Properties-Update', e);
+ }),
+ e.subscribe('ENOLC_MOVE_CMD_UPDATE', function (e) {
+ console.log('globally new transfer data ' + e),
+ i.notify('ENOLC_MOVE_CMD_UPDATE', e);
+ }),
+ e.subscribe('CA-Group-Update', function (e) {
+ console.log('Firing notification for CA Group Update ' + e),
+ i.notify('CA-Group-Update', e);
+ }),
+ e.subscribe('CO-AccessBit-Update', function (e) {
+ i.notify('CO-AccessBit-Update', e);
+ }),
+ e.subscribe('Chg-Gov-Recents-PendingIndexed-DeletedIds', function (e) {
+ i.notify('Chg-Gov-Recents-PendingIndexed-DeletedIds', e);
+ }),
+ e.subscribe('Chg-Gov-Recents-RecentlyOpened-DeletedIds', function (e) {
+ i.notify('Chg-Gov-Recents-RecentlyOpened-DeletedIds', e);
+ }),
+ e.subscribe(
+ 'ENORIPE-InApp-' + widget.id + 'ChgCRImpactedItemDataGridLayout/onOK',
+ function (e) {
+ i.notify(
+ 'ENORIPE-InApp-' +
+ widget.id +
+ 'ChgCRImpactedItemDataGridLayout/onOK',
+ e,
+ );
+ },
+ ),
+ e.subscribe(
+ 'ENORIPE-InApp-' +
+ widget.id +
+ 'ChgCRAffectedItemsDataGridLayout/onOK',
+ function (e) {
+ i.notify(
+ 'ENORIPE-InApp-' +
+ widget.id +
+ 'ChgCRAffectedItemsDataGridLayout/onOK',
+ e,
+ );
+ },
+ ),
+ e.subscribe('Lifecycle.Modification', function (e) {
+ i.notify('Lifecycle.Modification', e);
+ }),
+ e.subscribe('Attachment-AccessBit-Update', function (e) {
+ i.notify('Attachment-AccessBit-Update', e);
+ }),
+ e.subscribe('co-update-attachment-complete', function (e) {
+ i.notify('co-update-attachment-complete', e);
+ }),
+ e.subscribe('update-impact-anlysis-grid', function (e) {
+ i.notify('update-impact-anlysis-grid', e);
+ }),
+ e.subscribe(
+ 'CR-ImpactAnalysis-AccessBit-Update-On-Properties-Load',
+ function (e) {
+ i.notify(
+ 'CR-ImpactAnalysis-AccessBit-Update-On-Properties-Load',
+ e,
+ );
+ },
+ ),
+ e.subscribe('Change-Maturity-Update', function (e) {
+ i.notify('Change-Maturity-Update', e);
+ }),
+ i
+ );
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/recents/pendingIndexed/ChgPendingIndexedView',
+ [
+ 'UWA/Class/View',
+ 'DS/ENOChgServices/scripts/services/ChgDataService',
+ 'DS/ENOChgServices/scripts/services/ChgDataProcess',
+ 'DS/ENOChgGovernanceUX/scripts/model/recents/ChgCORecentsTreeModel',
+ 'DS/CollectionView/ResponsiveTilesCollectionView',
+ 'DS/CollectionView/CollectionViewStatusBar',
+ 'DS/Core/PointerEvents',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgGovernanceUX/scripts/view/recents/util/ChgGovRecentsContextualMenu',
+ 'DS/CoreEvents/ModelEvents',
+ 'DS/Controls/Button',
+ 'DS/ENOChgGovernanceUX/scripts/config/ChgGovAppGlobalConfig',
+ 'DS/ENOChgRouter5/scripts/ChgRouter',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovGlobalSubscriber',
+ 'DS/ENOChgGovernanceUX/scripts/view/recents/util/ChgGovRecentsCustomFields',
+ 'DS/PlatformAPI/PlatformAPI',
+ ],
+ function (e, t, i, n, o, a, r, s, l, c, d, u, g, p, h, m) {
+ 'use strict';
+ var C = e.extend({
+ init: function (e) {
+ console.log('init ChgPendingIndexedView'),
+ this._parent(e),
+ (this._modelEvents = new c()),
+ this.subscribeToModelEvents(),
+ this.globalSubscribeForPendingIndexedView(),
+ this.render(e);
+ },
+ subscribeToModelEvents: function (e) {
+ this._modelEvents.subscribe(
+ {
+ event: 'pendingIndexedTreeEmpty',
+ },
+ function (e) {
+ C.prototype.pendingIndexedTreeEmpty();
+ },
+ ),
+ this._modelEvents.subscribe(
+ {
+ event: 'pendingIndexedTreeNotEmpty',
+ },
+ function (e) {
+ C.prototype.pendingIndexedTreeNotEmpty();
+ },
+ );
+ },
+ render: function (e) {
+ var o = this;
+ (e.treeDocument = new n().createTreeDocument(this._modelEvents)),
+ (C.prototype.ChgCORecentsTreeModel = e.treeDocument),
+ o.createPendingIndexedView(e),
+ t.getTimestamp().then(function (a) {
+ var r = i.processTimestampData(a);
+ t.getConfiguredChangeOrderList({
+ indexed: !1,
+ simplifiedJSON: !0,
+ timestamp: r,
+ }).then(function (t) {
+ var a = i.processChangeOrderRecentList(t);
+ a.length > 0
+ ? (new n().loadRecentChangeOrderData(e.treeDocument, a),
+ o._modelEvents.publish({
+ event: 'pendingIndexedTreeNotEmpty',
+ }))
+ : o._modelEvents.publish({
+ event: 'pendingIndexedTreeEmpty',
+ });
+ });
+ }),
+ C.prototype.ChgCORecentsTreeModel.getXSO().onAdd(function (t) {
+ e._applicationChannel.publish({
+ event: 'load-info-panel-chg-recents',
+ data: {
+ context: t,
+ },
+ });
+ }),
+ C.prototype.ChgCORecentsTreeModel.getXSO().onRemove(function (t) {
+ e._applicationChannel.publish({
+ event: 'load-info-panel-chg-recents',
+ data: {
+ context: t,
+ },
+ });
+ });
+ },
+ createPendingIndexedView: function (e) {
+ var t = this;
+ e.target.innerHTML =
+ '' + s.CHG_GOV_Recents_Pending_Indexed_Heading + '';
+ var i = {
+ model: e.treeDocument,
+ height: 'inherit',
+ allowUnsafeHTMLContent: !1,
+ displayedOptionalCellProperties: [
+ 'contextualMenu',
+ 'description',
+ 'propertiesList',
+ 'activeFlag',
+ 'statusbarIcons',
+ ],
+ };
+ this.tileView = new o(i);
+ var n = e.target,
+ a = UWA.createElement('div', {
+ id: 'pendingIndexedCOEmptyTileViewDiv',
+ class: 'hideViewPendingIndexedCO',
+ }),
+ c = UWA.createElement('div', {
+ id: 'pendingIndexedCOPopulatedTileViewDiv',
+ class: 'hideViewPendingIndexedCO',
+ }),
+ d = UWA.createElement('div', {
+ class: 'pendingIndexedCOEmptyTileViewText',
+ }),
+ p = s.CHG_GOV_Recents_Pending_Indexed_Empty_View;
+ d.inject(a),
+ (d.innerText = p),
+ this.tileView.inject(c),
+ c.inject(n),
+ a.inject(n);
+ var h = {
+ callback: function (e) {
+ if (e && e.cellInfos && e.cellInfos.cellModel) {
+ var i = document.getElementsByClassName('secondROChildDiv')[0];
+ return l
+ .showRMBMenuOnGrid(e, i, t.removeDeletedNodesUsingIDsAdaptor)
+ .then(function (e) {
+ return e;
+ });
+ }
+ },
+ };
+ (this.tileView.onContextualEvent = h),
+ this.tileView.addEventListener(r.POINTERHIT, function (e, i) {
+ t.onItemClick(e, i);
+ }),
+ (this.onItemClick = function (e, t) {
+ if (
+ t &&
+ t.nodeModel &&
+ t.nodeModel.options.grid &&
+ 2 == e.multipleHitCount
+ ) {
+ var i = {};
+ (i.model = t.nodeModel.options.grid),
+ g.navigate(u.ROUTE_CO_DETAILS, {
+ id: i.model.id,
+ name: i.model.name,
+ title: i.model.title,
+ nodeModel: i,
+ }),
+ m.publish('load-dependency' + widget.id, 'pid:' + i.model.id);
+ }
+ });
+ },
+ removeDeletedNodesUsingIDsAdaptor: function (e) {
+ var t = e;
+ e.deletedIDs && (t = e.deletedIDs),
+ e.source ||
+ m.publish('Chg-Gov-Recents-PendingIndexed-DeletedIds', {
+ source: 'ChgPendingIndexedView',
+ deletedIDs: t,
+ }),
+ C.prototype.removeDeletedNodesUsingIDs(t);
+ },
+ removeDeletedNodesUsingIDs: function (e) {
+ for (var t = 0; t < e.length; t++) {
+ var i = e[t];
+ C.prototype.ChgCORecentsTreeModel.search({
+ shouldStop: function (e) {
+ return (
+ e.options.grid.id === i && (e.getParent().removeChild(e), !0)
+ );
+ },
+ });
+ }
+ 0 == C.prototype.ChgCORecentsTreeModel.getChildren().length &&
+ C.prototype.pendingIndexedTreeEmpty();
+ },
+ handleMoveUpdate: function (e) {
+ console.log('inside handleMoveUpdate');
+ for (
+ var t = C.prototype.ChgCORecentsTreeModel.getAllDescendants(),
+ i = e.data.paths,
+ n = 0;
+ n < t.length;
+ n++
+ )
+ for (var o = 0; o < i.length; o++)
+ if (i[o] == t[n].options.grid.id) {
+ var a,
+ r,
+ s,
+ l,
+ c,
+ d,
+ u,
+ g = t[n].options.grid.id;
+ if (
+ ((r = (a = e.data.attributes[g]).newCollabSpace),
+ (s = a.newOrganization),
+ (l = a.newOwnerFullName),
+ (c = a.newOwnerId) && l)
+ ) {
+ d = t[n].options.grid.name + ' | ' + l;
+ var p = {
+ title: t[n].options.grid.title,
+ name: t[n].options.grid.name,
+ severityNLS: t[n].options.grid.severityNLS,
+ ownerFullName: l,
+ maturityNLS: t[n].options.grid.maturityNLS,
+ };
+ (u = h.getCustomTooltip(p)),
+ (t[n].options.grid.owner = c),
+ (t[n].options.grid.ownerFullName = l),
+ t[n].updateOptions({
+ grid: t[n].options.grid,
+ customTooltip: u,
+ subLabel: d,
+ });
+ }
+ s &&
+ ((t[n].options.grid.organization = s),
+ t[n].updateOptions({
+ grid: t[n].options.grid,
+ })),
+ r &&
+ ((t[n].options.grid.collabspace = r),
+ t[n].updateOptions({
+ grid: t[n].options.grid,
+ }));
+ }
+ },
+ handlePropertiesUpdate: function (e) {
+ console.log('inside handlePropertiesUpdate');
+ for (
+ var t = C.prototype.ChgCORecentsTreeModel.getAllDescendants(),
+ i = e.objectId,
+ n = 0;
+ n < t.length;
+ n++
+ ) {
+ if (t[n].options.grid.id == i) {
+ var o = e.Title.value,
+ a = e.name.value,
+ r = e.description.value,
+ s = e.owner.value,
+ l = e.owner.valueDB,
+ c = e.Severity.valueDB,
+ d = e.Severity.value,
+ u = t[n].options.grid.ecm_change_on_hold,
+ g = a + ' | ' + s,
+ p = {};
+ (p.name = a),
+ (p.title = o),
+ (p.ecm_change_on_hold = u),
+ (p.severity = c),
+ (p.severityNLS = d),
+ (p.owner = l),
+ (p.ownerFullName = s),
+ (p.maturityNLS = t[n].options.grid.maturityNLS);
+ var m = h.createCustomSeverity(p),
+ v = h.getStatusBarIcons(p),
+ f = h.statusbarIconsTooltips(p),
+ b = h.getCustomTooltip(p);
+ (t[n].options.grid.title = o),
+ (t[n].options.grid.description = r),
+ (t[n].options.grid.ownerFullName = s),
+ (t[n].options.grid.owner = l),
+ (t[n].options.grid.severity = c),
+ (t[n].options.grid.sev = m),
+ (t[n].options.grid.severityNLS = d),
+ t[n].updateOptions({
+ label: e.Title.value,
+ grid: t[n].options.grid,
+ customTooltip: b,
+ statusbarIcons: v,
+ statusbarIconsTooltips: f,
+ subLabel: g,
+ });
+ }
+ }
+ },
+ globalSubscribeForPendingIndexedView: function () {
+ p.addObserver(
+ 'ChgPendingIndexedView',
+ 'ENOLC_MOVE_CMD_UPDATE',
+ this.handleMoveUpdate,
+ ),
+ p.addObserver(
+ 'ChgPendingIndexedView',
+ 'CO-Properties-Update',
+ this.handlePropertiesUpdate,
+ ),
+ p.addObserver(
+ 'ChgPendingIndexedView',
+ 'Chg-Gov-Recents-RecentlyOpened-DeletedIds',
+ this.removeDeletedNodesUsingIDsAdaptor,
+ );
+ },
+ pendingIndexedTreeEmpty: function () {
+ var e = document.getElementById('pendingIndexedCOEmptyTileViewDiv');
+ e && e.removeClassName('hideViewPendingIndexedCO');
+ var t = document.getElementById(
+ 'pendingIndexedCOPopulatedTileViewDiv',
+ );
+ t && t.addClassName('hideViewPendingIndexedCO');
+ },
+ pendingIndexedTreeNotEmpty: function () {
+ var e = document.getElementById('pendingIndexedCOEmptyTileViewDiv');
+ e && e.addClassName('hideViewPendingIndexedCO');
+ var t = document.getElementById(
+ 'pendingIndexedCOPopulatedTileViewDiv',
+ );
+ t && t.removeClassName('hideViewPendingIndexedCO');
+ },
+ });
+ return C;
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeAction/facets/approvals/ChgCAApprovalsView',
+ [
+ 'DS/ENORouteMgmt/Views/RightPanelInfoView',
+ 'DS/ENORouteMgmt/Views/Form/TaskViewUtil',
+ 'DS/ENORouteMgmt/Views/Loader/ChangeTaskAssigneeChooser',
+ 'DS/ENOChgServices/scripts/services/ChgDataService',
+ 'DS/ENOChgRouter5/scripts/ChgRouter',
+ 'require',
+ 'DS/ENORouteMgmt/Commands/RouteTaskView',
+ 'DS/PlatformAPI/PlatformAPI',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/UIKIT/Mask',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgGovernanceUX/scripts/wrapper/ChgGovBIFilter',
+ 'DS/ENOChgServices/scripts/services/ChgNativeInitService',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovGlobalSubscriber',
+ 'DS/ENORouteMgmt/Views/Loader/InitiateDocumentChooser',
+ 'DS/TreeModel/TreeNodeModel',
+ ],
+ function (e, t, i, n, o, a, r, s, l, c, d, u, g, p, h, m) {
+ 'use strict';
+ let C, v, f, b;
+ var w = {
+ createApprovalsView: function (t) {
+ (this.id = t.id), (this.target = t.target);
+ var i = document.getElementsByClassName('outerContainerTabDiv')[0];
+ 'undefined' != i && null != i && c.mask(i);
+ var u = UWA.createElement('div', {
+ id: 'chg-Task-container',
+ styles: {
+ height: 'inherit',
+ },
+ });
+ let p = d.getGlobalVariable().tenant,
+ h = d.getGlobalVariable().getSecurityContext();
+ n.getRouteBasedOnContentId(t.id).then(
+ function (i) {
+ var m = w.checkResponse(i.data),
+ D = t.target;
+ if (m) {
+ var S = o.getDependency('xChangeApp'),
+ y = o.getDependency('applicationChannel'),
+ _ = S.infoPanel.childNodes,
+ E = {
+ id: m.id,
+ renderType: 'container',
+ tenant: p,
+ securityContext: h,
+ },
+ O = document.getElementById('viewTaskContainerExternal'),
+ I = document.getElementById('InitiateTaskPropertiesBody'),
+ G = document.getElementById('approvalViewDiv');
+ null != O && O.remove(),
+ null != G && G.remove(),
+ null != I && I.remove(),
+ r.init(E, D);
+ let i = new e(u);
+ widget.routeMgmtMediator.subscribe(
+ 'route-task-open-click-view-mode',
+ function (e) {
+ i.init(e, 'taskActionMode');
+ for (var t = 0; t < _.length; t++) {
+ var n = _[t].className;
+ UWA.is(n) && 'secondmainContainer-sidepanel' === n
+ ? (_[t].empty(),
+ u.inject(_[t]),
+ (_[t].style.display = 'block'))
+ : (_[t].style.display = 'none');
+ }
+ y.publish({
+ event: 'triptych-show-panel',
+ data: 'right',
+ }),
+ y.publish({
+ event: 'information-panel-visible',
+ data: null,
+ });
+ },
+ ),
+ widget.routeMgmtMediator.subscribe(
+ 'route-task-open-click-edit-mode',
+ function (e) {
+ i.init(e, 'taskEditMode');
+ for (var t = 0; t < _.length; t++) {
+ var n = _[t].className;
+ UWA.is(n) && 'secondmainContainer-sidepanel' === n
+ ? (_[t].empty(),
+ u.inject(_[t]),
+ (_[t].style.display = 'block'))
+ : (_[t].style.display = 'none');
+ }
+ y.publish({
+ event: 'triptych-show-panel',
+ data: 'right',
+ }),
+ y.publish({
+ event: 'information-panel-visible',
+ data: null,
+ });
+ },
+ ),
+ widget.routeMgmtMediator.subscribe(
+ 'route-task-close-click-view-mode',
+ function (e) {},
+ ),
+ widget.routeMgmtMediator.subscribe(
+ 'route-task-close-click-edit-mode',
+ function (e) {},
+ ),
+ widget.routeMgmtMediator.subscribe(
+ 'task-action-on-save',
+ function (e) {
+ var i = e.model.taskActionButton,
+ r = t.id;
+ if (
+ 'Approve' === i ||
+ 'Reject' === i ||
+ 'Abstain' === i
+ ) {
+ n.getChangeActionUserAccess(r).then(function (e) {
+ var t = {
+ id: e.data[0].id,
+ type: e.data[0].type,
+ accessBits: e.data[0],
+ };
+ s.publish('CO-AccessBit-Update', t),
+ s.publish('idcard-header-update', t),
+ s.publish('idcard-header-update-maturity'),
+ a(
+ 'DS/ENOChgGovernanceUX/scripts/view/ChgChangeOrderHome',
+ ).onRefresh();
+ });
+ let e = o.getDependency('applicationChannel');
+ e.publish({
+ event: 'triptych-hide-panel',
+ data: 'right',
+ }),
+ e.publish({
+ event: 'information-panel-close',
+ data: null,
+ });
+ }
+ },
+ ),
+ widget.routeMgmtMediator.subscribe(
+ 'launch-task-assignee-search',
+ function (e) {
+ if (
+ (console.log('launch-task-assignee-search Event'),
+ d.getGlobalVariable().isNative)
+ ) {
+ (C = e.taskProperties),
+ (v = e.taskGraphModel),
+ (b = e.invokeFrom),
+ (f = e.routeInfo);
+ g.DispatchEventToWin(
+ 'CHG_Search_Task_Assignee',
+ 'Task_Assignee',
+ );
+ }
+ },
+ ),
+ widget.routeMgmtMediator.subscribe(
+ 'launch-add-attachment-search',
+ function (e) {
+ if (
+ (console.log('launch-add-attachment-search Event'),
+ d.getGlobalVariable().isNative)
+ ) {
+ (C = e.taskProperties), (v = e.alreadyAttachedDocs);
+ g.DispatchEventToWin(
+ 'CHG_ADD_ATTACHMENT_SEARCH',
+ 'Add_Attachment_Search',
+ );
+ }
+ },
+ );
+ var N = document.getElementsByClassName(
+ 'outerContainerTabDiv',
+ )[0];
+ c.unmask(N);
+ } else {
+ null !=
+ (O = document.getElementById('viewTaskContainerExternal')) &&
+ O.remove();
+ var A = document.getElementById('tileViewDiv');
+ null != A && A.remove();
+ var T = UWA.createElement('div', {
+ styles: {
+ width: '100%',
+ height: 'calc(100% - 235px)',
+ position: 'absolute',
+ },
+ id: 'tileViewDiv',
+ class: 'content-approval-tile-div approvaltileView',
+ }),
+ V = UWA.createElement('div', {
+ class: 'showEmptyView',
+ id: 'approvalViewDiv',
+ });
+ UWA.createElement('div', {
+ id: 'approvalContentDiv',
+ html: l.CHG_GOV_Approval_TaskView_PlaceHolder,
+ }).inject(V),
+ V.inject(T),
+ T.inject(D);
+ N = document.getElementsByClassName('outerContainerTabDiv')[0];
+ c.unmask(N);
+ }
+ },
+ function (e) {
+ return Promise.reject(e);
+ },
+ );
+ },
+ checkResponse: function (e) {
+ let t,
+ i,
+ n = function (e, t) {
+ var i = new Date(e.dataelements.modified),
+ n = new Date(t.dataelements.modified);
+ return i.getTime() > n.getTime() ? e : t;
+ };
+ for (var o = 0; o < e.length; o++) {
+ let a = e[o];
+ if ('Started' == a.dataelements.routeStatus) return a;
+ if ('Not Started' == a.dataelements.routeStatus) return a;
+ 'Stopped' == a.dataelements.routeStatus
+ ? (t = null == t ? a : n(t, a))
+ : 'Finished' == a.dataelements.routeStatus &&
+ (i = null == i ? a : n(i, a));
+ }
+ return null != t ? t : i;
+ },
+ clearTags: function () {
+ u._cleanBIFilterProxy();
+ },
+ globalSubscribeForGovCAApprovalsView: function () {
+ p.addObserver(
+ 'ChgCAApprovalsView',
+ 'Change-Maturity-Update',
+ w.handleMaturityUpdate,
+ );
+ },
+ handleMaturityUpdate: function (e) {
+ if ((console.log('handle maturity'), e.id === w.id)) {
+ let e = {};
+ (e.id = w.id), (e.target = w.target), w.createApprovalsView(e);
+ }
+ },
+ OnSearchComplete: function (e) {
+ let o = e.split(','),
+ a = [];
+ a.push(o[0]),
+ n
+ .getObjectInfo(a, [
+ 'name',
+ 'type',
+ 'identifier',
+ 'label',
+ 'title',
+ ])
+ .then(function (e) {
+ let n = e[0],
+ o = [],
+ a = {};
+ (a =
+ 'Person' == n.type
+ ? {
+ id: n.id,
+ 'ds6w:label': n.dataelements.fullname,
+ 'ds6w:identifier': n.dataelements.name,
+ 'ds6w:type_value': n.type,
+ 'ds6w:type': n.type,
+ }
+ : {
+ id: n.id,
+ 'ds6w:label': n.dataelements.title,
+ 'ds6w:identifier': n.dataelements.name,
+ 'ds6w:type_value': n.type,
+ 'ds6w:type': n.type,
+ }),
+ o.push(a),
+ 'form' == b
+ ? t.populateAssigneeField(C, v, f, o)
+ : 'dialog' == b && i.populateAssigneeField(C, o);
+ });
+ },
+ OnSearchCompleteForAttachment: function (e) {
+ let t = e.split(','),
+ i = [],
+ o = [];
+ o.push(t),
+ n
+ .getObjectInfo(o, [
+ 'name',
+ 'type',
+ 'identifier',
+ 'label',
+ 'title',
+ ])
+ .then(function (e) {
+ for (var n = 0; n < t.length; n++) {
+ let t = e[n],
+ o = {};
+ (o = {
+ id: t.id,
+ 'ds6w:label': t.dataelements.title,
+ 'ds6w:identifier': t.dataelements.name,
+ 'ds6w:type_value': t.type,
+ 'ds6w:type': t.type,
+ }),
+ i.push(o);
+ }
+ h.populateAddExisiting(C, i);
+ });
+ },
+ };
+ return w.globalSubscribeForGovCAApprovalsView(), w;
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/approvals/ChgGovApprovalsView',
+ [
+ 'DS/ENORouteMgmt/Views/RightPanelInfoView',
+ 'DS/ENOChgServices/scripts/services/ChgDataService',
+ 'DS/ENOChgRouter5/scripts/ChgRouter',
+ 'require',
+ 'DS/ENORouteMgmt/Commands/RouteTaskView',
+ 'DS/PlatformAPI/PlatformAPI',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/UIKIT/Mask',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgGovernanceUX/scripts/wrapper/ChgGovBIFilter',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovGlobalSubscriber',
+ ],
+ function (e, t, i, n, o, a, r, s, l, c, d) {
+ 'use strict';
+ var u = {
+ createApprovalsView: function (c) {
+ (this.id = c.id), (this.target = c.target);
+ var d = document.getElementsByClassName('outerContainerTabDiv')[0];
+ 'undefined' != d && null != d && s.mask(d);
+ var g = UWA.createElement('div', {
+ id: 'chg-Task-container',
+ styles: {
+ height: 'inherit',
+ },
+ });
+ let p = l.getGlobalVariable().tenant,
+ h = l.getGlobalVariable().getSecurityContext();
+ t.getRouteBasedOnContentId(c.id).then(
+ function (l) {
+ var d = u.checkResponse(l.data),
+ m = c.target;
+ if (d) {
+ var C = i.getDependency('xChangeApp'),
+ v = i.getDependency('applicationChannel'),
+ f = C.infoPanel.childNodes,
+ b = {
+ id: d.id,
+ renderType: 'container',
+ tenant: p,
+ securityContext: h,
+ },
+ w = document.getElementById('viewTaskContainerExternal'),
+ D = document.getElementById('InitiateTaskPropertiesBody'),
+ S = document.getElementById('approvalViewDiv');
+ null != w && w.remove(),
+ null != S && S.remove(),
+ null != D && D.remove(),
+ o.init(b, m);
+ let r = new e(g);
+ widget.routeMgmtMediator.subscribe(
+ 'route-task-open-click-view-mode',
+ function (e) {
+ r.init(e, 'taskActionMode');
+ for (var t = 0; t < f.length; t++) {
+ var i = f[t].className;
+ UWA.is(i) && 'secondmainContainer-sidepanel' === i
+ ? (f[t].empty(),
+ g.inject(f[t]),
+ (f[t].style.display = 'block'))
+ : (f[t].style.display = 'none');
+ }
+ v.publish({
+ event: 'triptych-show-panel',
+ data: 'right',
+ }),
+ v.publish({
+ event: 'information-panel-visible',
+ data: null,
+ });
+ },
+ ),
+ widget.routeMgmtMediator.subscribe(
+ 'route-task-open-click-edit-mode',
+ function (e) {
+ r.init(e, 'taskEditMode');
+ for (var t = 0; t < f.length; t++) {
+ var i = f[t].className;
+ UWA.is(i) && 'secondmainContainer-sidepanel' === i
+ ? (f[t].empty(),
+ g.inject(f[t]),
+ (f[t].style.display = 'block'))
+ : (f[t].style.display = 'none');
+ }
+ v.publish({
+ event: 'triptych-show-panel',
+ data: 'right',
+ }),
+ v.publish({
+ event: 'information-panel-visible',
+ data: null,
+ });
+ },
+ ),
+ widget.routeMgmtMediator.subscribe(
+ 'route-task-close-click-view-mode',
+ function (e) {},
+ ),
+ widget.routeMgmtMediator.subscribe(
+ 'route-task-close-click-edit-mode',
+ function (e) {},
+ ),
+ widget.routeMgmtMediator.subscribe(
+ 'task-action-on-save',
+ function (e) {
+ var i = e.model.taskActionButton,
+ o = c.id;
+ ('Approve' !== i && 'Reject' !== i && 'Abstain' !== i) ||
+ (t.getChangeOrderUserAccess(o).then(function (e) {
+ var t = {
+ id: e.data[0].id,
+ type: e.data[0].type,
+ accessBits: e.data[0].dataelements,
+ };
+ a.publish('CO-AccessBit-Update', t),
+ a.publish('idcard-header-update', t),
+ a.publish('idcard-header-update-maturity'),
+ n(
+ 'DS/ENOChgGovernanceUX/scripts/view/ChgChangeOrderHome',
+ ).onRefresh();
+ }),
+ v.publish({
+ event: 'information-panel-close',
+ data: null,
+ }));
+ },
+ );
+ var y = document.getElementsByClassName(
+ 'outerContainerTabDiv',
+ )[0];
+ s.unmask(y);
+ } else {
+ null !=
+ (w = document.getElementById('viewTaskContainerExternal')) &&
+ w.remove();
+ var _ = document.getElementById('tileViewDiv');
+ null != _ && _.remove();
+ var E = UWA.createElement('div', {
+ styles: {
+ width: '100%',
+ height: 'calc(100% - 235px)',
+ position: 'absolute',
+ },
+ id: 'tileViewDiv',
+ class: 'content-approval-tile-div approvaltileView',
+ }),
+ O = UWA.createElement('div', {
+ class: 'showEmptyView',
+ id: 'approvalViewDiv',
+ });
+ UWA.createElement('div', {
+ id: 'approvalContentDiv',
+ html: r.CHG_GOV_Approval_TaskView_PlaceHolder,
+ }).inject(O),
+ O.inject(E),
+ E.inject(m);
+ y = document.getElementsByClassName('outerContainerTabDiv')[0];
+ s.unmask(y);
+ }
+ },
+ function (e) {
+ return Promise.reject(e);
+ },
+ );
+ },
+ checkResponse: function (e) {
+ let t,
+ i,
+ n = function (e, t) {
+ var i = new Date(e.dataelements.modified),
+ n = new Date(t.dataelements.modified);
+ return i.getTime() > n.getTime() ? e : t;
+ };
+ for (var o = 0; o < e.length; o++) {
+ let a = e[o];
+ if ('Started' == a.dataelements.routeStatus) return a;
+ if ('Not Started' == a.dataelements.routeStatus) return a;
+ 'Stopped' == a.dataelements.routeStatus
+ ? (t = null == t ? a : n(t, a))
+ : 'Finished' == a.dataelements.routeStatus &&
+ (i = null == i ? a : n(i, a));
+ }
+ return null != t ? t : i;
+ },
+ globalSubscribeForGovApprovalsView: function () {
+ d.addObserver(
+ 'ChgGovApprovalsView',
+ 'Change-Maturity-Update',
+ u.handleMaturityUpdate,
+ );
+ },
+ clearTags: function () {
+ c._cleanBIFilterProxy();
+ },
+ handleMaturityUpdate: function (e) {
+ if ((console.log('handle maturity'), e.id === u.id)) {
+ let e = {};
+ (e.id = u.id), (e.target = u.target), u.createApprovalsView(e);
+ }
+ },
+ };
+ return u.globalSubscribeForGovApprovalsView(), u;
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/approvals/ChgGovCRApprovalsView',
+ [
+ 'DS/ENORouteMgmt/Views/RightPanelInfoView',
+ 'DS/ENOChgServices/scripts/services/ChgDataService',
+ 'DS/ENOChgRouter5/scripts/ChgRouter',
+ 'require',
+ 'DS/ENORouteMgmt/Commands/RouteTaskView',
+ 'DS/PlatformAPI/PlatformAPI',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/UIKIT/Mask',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgGovernanceUX/scripts/wrapper/ChgGovBIFilter',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovGlobalSubscriber',
+ ],
+ function (e, t, i, n, o, a, r, s, l, c, d) {
+ 'use strict';
+ var u = {
+ createApprovalsView: function (c) {
+ (this.id = c.id), (this.target = c.target);
+ var d = document.getElementsByClassName('outerContainerTabDiv')[0];
+ 'undefined' != d && null != d && s.mask(d);
+ var g = UWA.createElement('div', {
+ id: 'chg-Task-container',
+ styles: {
+ height: 'inherit',
+ },
+ });
+ let p = l.getGlobalVariable().tenant,
+ h = l.getGlobalVariable().getSecurityContext();
+ t.getRouteBasedOnContentId(c.id).then(
+ function (l) {
+ var d = u.checkResponse(l.data),
+ m = c.target;
+ if (d) {
+ var C = i.getDependency('xChangeApp'),
+ v = i.getDependency('applicationChannel'),
+ f = C.infoPanel.childNodes,
+ b = {
+ id: d.id,
+ renderType: 'container',
+ tenant: p,
+ securityContext: h,
+ },
+ w = document.getElementById('viewTaskContainerExternal'),
+ D = document.getElementById('InitiateTaskPropertiesBody'),
+ S = document.getElementById('approvalViewDiv');
+ null != w && w.remove(),
+ null != S && S.remove(),
+ null != D && D.remove(),
+ o.init(b, m);
+ let r = new e(g);
+ widget.routeMgmtMediator.subscribe(
+ 'route-task-open-click-view-mode',
+ function (e) {
+ r.init(e, 'taskActionMode');
+ for (var t = 0; t < f.length; t++) {
+ var i = f[t].className;
+ UWA.is(i) && 'secondmainContainer-sidepanel' === i
+ ? (f[t].empty(),
+ g.inject(f[t]),
+ (f[t].style.display = 'block'))
+ : (f[t].style.display = 'none');
+ }
+ v.publish({
+ event: 'triptych-show-panel',
+ data: 'right',
+ }),
+ v.publish({
+ event: 'information-panel-visible',
+ data: null,
+ });
+ },
+ ),
+ widget.routeMgmtMediator.subscribe(
+ 'route-task-open-click-edit-mode',
+ function (e) {
+ r.init(e, 'taskEditMode');
+ for (var t = 0; t < f.length; t++) {
+ var i = f[t].className;
+ UWA.is(i) && 'secondmainContainer-sidepanel' === i
+ ? (f[t].empty(),
+ g.inject(f[t]),
+ (f[t].style.display = 'block'))
+ : (f[t].style.display = 'none');
+ }
+ v.publish({
+ event: 'triptych-show-panel',
+ data: 'right',
+ }),
+ v.publish({
+ event: 'information-panel-visible',
+ data: null,
+ });
+ },
+ ),
+ widget.routeMgmtMediator.subscribe(
+ 'route-task-close-click-view-mode',
+ function (e) {},
+ ),
+ widget.routeMgmtMediator.subscribe(
+ 'route-task-close-click-edit-mode',
+ function (e) {},
+ ),
+ widget.routeMgmtMediator.subscribe(
+ 'task-action-on-save',
+ function (e) {
+ var i = e.model.taskActionButton,
+ o = c.id;
+ 'Approve' == i
+ ? t.getChangeRequestUserAccess(o).then(function (e) {
+ var t = {
+ id: e.data[0].id,
+ type: e.data[0].type,
+ accessBits: e.data[0].dataelements,
+ };
+ a.publish('CO-AccessBit-Update', t),
+ a.publish('idcard-header-update', t),
+ a.publish('idcard-header-update-maturity'),
+ v.publish({
+ event: 'information-panel-close',
+ data: null,
+ }),
+ n(
+ 'DS/ENOChgGovernanceUX/scripts/view/ChgChangeOrderHome',
+ ).onRefresh();
+ })
+ : 'Reject' == i &&
+ (v.publish({
+ event: 'information-panel-close',
+ data: null,
+ }),
+ a.publish('idcard-header-update-maturity'));
+ },
+ );
+ var y = document.getElementsByClassName(
+ 'outerContainerTabDiv',
+ )[0];
+ s.unmask(y);
+ } else {
+ null !=
+ (w = document.getElementById('viewTaskContainerExternal')) &&
+ w.remove();
+ var _ = document.getElementById('tileViewDiv');
+ null != _ && _.remove();
+ var E = UWA.createElement('div', {
+ styles: {
+ width: '100%',
+ height: 'calc(100% - 235px)',
+ position: 'absolute',
+ },
+ id: 'tileViewDiv',
+ class: 'content-approval-tile-div approvaltileView',
+ }),
+ O = UWA.createElement('div', {
+ class: 'showEmptyView',
+ id: 'approvalViewDiv',
+ });
+ UWA.createElement('div', {
+ id: 'approvalContentDiv',
+ html: r.CHG_GOV_Approval_TaskView_PlaceHolder,
+ }).inject(O),
+ O.inject(E),
+ E.inject(m);
+ y = document.getElementsByClassName('outerContainerTabDiv')[0];
+ s.unmask(y);
+ }
+ },
+ function (e) {
+ return Promise.reject(e);
+ },
+ );
+ },
+ checkResponse: function (e) {
+ let t,
+ i,
+ n = function (e, t) {
+ var i = new Date(e.dataelements.modified),
+ n = new Date(t.dataelements.modified);
+ return i.getTime() > n.getTime() ? e : t;
+ };
+ for (var o = 0; o < e.length; o++) {
+ let a = e[o];
+ if ('Started' == a.dataelements.routeStatus) return a;
+ if ('Not Started' == a.dataelements.routeStatus) return a;
+ 'Stopped' == a.dataelements.routeStatus
+ ? (t = null == t ? a : n(t, a))
+ : 'Finished' == a.dataelements.routeStatus &&
+ (i = null == i ? a : n(i, a));
+ }
+ return null != t ? t : i;
+ },
+ clearTags: function () {
+ c._cleanBIFilterProxy();
+ },
+ globalSubscribeForGovCRApprovalsView: function () {
+ d.addObserver(
+ 'ChgGovCRApprovalsView',
+ 'Change-Maturity-Update',
+ u.handleMaturityUpdate,
+ );
+ },
+ handleMaturityUpdate: function (e) {
+ if ((console.log('handle maturity'), e.id === u.id)) {
+ let e = {};
+ (e.id = u.id), (e.target = u.target), u.createApprovalsView(e);
+ }
+ },
+ };
+ return u.globalSubscribeForGovCRApprovalsView(), u;
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactBasis/ChgCRImpactBasisTileViewLayout',
+ [
+ 'UWA/Core',
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactBasis/util/ChgCRImpactBasisGridColsUtil',
+ ],
+ function (e, t) {
+ 'use strict';
+ return {
+ changeView: function (e) {
+ setTimeout(function () {
+ t.changeView('TileView');
+ }, 100);
+ },
+ showEmptyView: function () {
+ var e = document.getElementById('impactBasisEmptyTileViewDiv');
+ e && (e.removeClassName('hideView'), e.addClassName('showEmptyView'));
+ },
+ hideEmptyView: function () {
+ var e = document.getElementById('impactBasisEmptyTileViewDiv');
+ e && (e.addClassName('hideView'), e.removeClassName('showEmptyView'));
+ },
+ };
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/relatedScope/ChgRelatedScopeTileViewLayout',
+ [
+ 'UWA/Core',
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/relatedScope/util/ChgRelatedScopeGridColsUtil',
+ ],
+ function (e, t) {
+ 'use strict';
+ return {
+ changeView: function (e) {
+ setTimeout(function () {
+ t.changeView('TileView');
+ }, 100);
+ },
+ showEmptyView: function () {
+ var e = document.getElementById('COrelatedScopeEmptyTileViewDiv');
+ e && (e.removeClassName('hideView'), e.addClassName('showEmptyView'));
+ },
+ hideEmptyView: function () {
+ var e = document.getElementById('COrelatedScopeEmptyTileViewDiv');
+ e && (e.addClassName('hideView'), e.removeClassName('showEmptyView'));
+ },
+ };
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/facets/relatedScope/util/ChgRelatedScopeGridContextualMenu',
+ [
+ 'UWA/Core',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/LifecycleCmd/MaturityCmd',
+ 'DS/ENOChgServices/scripts/services/ChgPropertiesServices',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgServices/scripts/services/ChgCustomAttributeService',
+ 'require',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgDataGridUtil',
+ ],
+ function (e, t, i, n, o, a, r, s) {
+ 'use strict';
+ var l = {
+ showRMBMenuOnGrid: function (e) {
+ return new Promise(function (t, i) {
+ const o = [];
+ let a = !1;
+ const c = e.cellInfos.nodeModel
+ .getTreeDocument()
+ .getSelectedNodes();
+ c.length > 1 && (a = !0);
+ const d = c.map((e) => e.options.grid.id),
+ u =
+ (c.map((e) => ({
+ physicalid: e.options.grid.id,
+ nodeName: e.options.grid.name,
+ nodeTitle: e.options.grid.title,
+ })),
+ r(
+ 'DS/ENOChgServices/scripts/services/ChgIDCardCommonServices',
+ )),
+ g = {
+ objectId: e.cellInfos.nodeModel.options.grid.id,
+ objectType: e.cellInfos.nodeModel.options.grid.type,
+ displayName: e.cellInfos.nodeModel.options.grid.name,
+ displayType: e.cellInfos.nodeModel.options.grid.displayType,
+ facetName: 'dependency',
+ },
+ p = u.openWith(g);
+ a
+ ? (o.push(n.createPropertyPushItem(d)),
+ o.push(l.getRelationalExplorerMenu(d)),
+ o.push(s.getMaturityMenu(e)),
+ o.push(l.getTransferMenu(e)),
+ t(o))
+ : (o.push(n.createPropertyPushItem(d)),
+ o.push(l.getRelationalExplorerMenu(d)),
+ p.then((i) => {
+ i && o.push(i),
+ o.push(s.getMaturityMenu(e)),
+ o.push(l.getTransferMenu(e)),
+ t(o);
+ }));
+ });
+ },
+ getTransferMenu: function (e) {
+ return {
+ type: 'PushItem',
+ title: t.CHG_GOV_Menu_Transfer,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-move-to',
+ },
+ action: {
+ callback: function (t) {
+ for (
+ var i = e.cellInfos.nodeModel
+ .getTreeDocument()
+ .getSelectedNodes(),
+ n = [],
+ o = 0;
+ o < i.length;
+ o++
+ )
+ n.push(i[o].options.grid);
+ require([
+ 'DS/ENOChgGovernanceUX/scripts/wrapper/ChgGovTransferWrapper',
+ ], function (e) {
+ e.launchTransferDialog(n);
+ });
+ },
+ },
+ };
+ },
+ getRelationalExplorerMenu: function (e) {
+ return {
+ type: 'PushItem',
+ title: t.CHG_GOV_Menu_Relational_Explorer,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-object-related',
+ },
+ action: {
+ callback: function (t) {
+ require([
+ 'DS/ENOChgServices/scripts/services/ChgIDCardCommonServices',
+ ], function (t) {
+ t.openRelationalExplorer(e);
+ });
+ },
+ },
+ };
+ },
+ };
+ return l;
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/router/ChgGovRouterConfig',
+ [
+ 'DS/ENOChgRouter5/scripts/ChgRouter',
+ 'DS/ENOChgGovernanceUX/scripts/config/ChgGovAppGlobalConfig',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovPreferenceConstant',
+ 'DS/PlatformAPI/PlatformAPI',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovApplicationPreferencesManager',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ ],
+ function (e, t, i, n, o, a) {
+ return {
+ initialize: function () {
+ e.initialize(t.ROUTE_HOME, t.PATH_HOME),
+ [
+ {
+ name: t.ROUTE_RECENTY_OPENED,
+ path: '/' + t.PATH_RECENTY_OPENED,
+ },
+ {
+ name: t.ROUTE_MY_CHANGE_ORDERS,
+ path: '/' + t.PATH_MY_CHANGE_ORDERS,
+ },
+ {
+ name: t.ROUTE_MY_CHANGE_ACTIONS,
+ path: '/' + t.PATH_MY_CHANGE_ACTIONS,
+ },
+ {
+ name: t.ROUTE_CO_INFO,
+ path: '/' + t.PATH_CO_INFO,
+ },
+ {
+ name: t.ROUTE_CO_DETAILS,
+ path: '/' + t.PATH_CO_DETAILS,
+ },
+ {
+ name: t.ROUTE_MY_CHANGE_REQUESTS,
+ path: '/' + t.PATH_MY_CHANGE_REQUESTS,
+ },
+ {
+ name: t.ROUTE_CR_INFO,
+ path: '/' + t.PATH_CR_INFO,
+ },
+ {
+ name: t.ROUTE_CR_DETAILS,
+ path: '/' + t.PATH_CR_DETAILS,
+ },
+ {
+ name: t.ROUTE_CA_INFO,
+ path: '/' + t.PATH_CA_INFO,
+ },
+ {
+ name: t.ROUTE_CA_DETAILS,
+ path: '/' + t.PATH_CA_DETAILS,
+ },
+ {
+ name: t.ROUTE_CR_ORCHESTRATION_LEVEL1,
+ path: '/' + t.PATH_CR_ORCHESTRATION_LEVEL1,
+ },
+ {
+ name: t.ROUTE_CR_ORCHESTRATION_LEVEL2,
+ path: '/' + t.PATH_CR_ORCHESTRATION_LEVEL2,
+ },
+ {
+ name: t.ROUTE_CR_ORCHESTRATION_LEVEL3,
+ path: '/' + t.PATH_CR_ORCHESTRATION_LEVEL3,
+ },
+ {
+ name: t.ROUTE_CO_ORCHESTRATION_LEVEL1,
+ path: '/' + t.PATH_CO_ORCHESTRATION_LEVEL1,
+ },
+ {
+ name: t.ROUTE_CO_ORCHESTRATION_LEVEL2,
+ path: '/' + t.PATH_CO_ORCHESTRATION_LEVEL2,
+ },
+ {
+ name: t.ROUTE_CO_ORCHESTRATION_LEVEL3,
+ path: '/' + t.PATH_CO_ORCHESTRATION_LEVEL3,
+ },
+ ].forEach(function (t) {
+ e.addRoute(t);
+ });
+ var n = {};
+ for (var r in ((n[t.ROUTE_HOME] = {
+ activate: function () {
+ if (1 == a.getGlobalVariable().isNative) {
+ var i = {
+ name: t.ROUTE_MY_CHANGE_ACTIONS,
+ params: {},
+ };
+ o.setRouteInfo(i);
+ var n = e.getDependency('xChangeApp');
+ (r = e.getDependency('applicationChannel')).publish({
+ event: 'information-panel-close',
+ data: null,
+ }),
+ r.publish({
+ event: 'welcome-panel-select-action',
+ data: {
+ id: t.PATH_MY_CHANGE_ACTIONS,
+ },
+ }),
+ n.clearContent(),
+ n._initChangeActionContent(),
+ n.initializePropertyPanelwithEmptyData();
+ } else {
+ n = e.getDependency('xChangeApp');
+ var r = e.getDependency('applicationChannel');
+ i = {
+ name: t.ROUTE_RECENTY_OPENED,
+ params: {},
+ };
+ o.setRouteInfo(i),
+ r.publish({
+ event: 'welcome-panel-select-action',
+ data: {
+ id: t.PATH_RECENTY_OPENED,
+ },
+ }),
+ n._initRecentContent(),
+ n.initializePropertyPanelwithEmptyData();
+ }
+ },
+ deactivate: function () {
+ var t = e.getDependency('xChangeApp');
+ e.getDependency('applicationChannel');
+ t.clearContent(),
+ data.params.isRefresh ||
+ o.setRouteInfo({
+ name: null,
+ });
+ },
+ }),
+ (n[t.ROUTE_RECENTY_OPENED] = {
+ activate: function (i) {
+ var n = {
+ name: t.ROUTE_RECENTY_OPENED,
+ params: {},
+ };
+ o.setRouteInfo(n);
+ var a = e.getDependency('xChangeApp');
+ e.getDependency('applicationChannel').publish({
+ event: 'welcome-panel-select-action',
+ data: {
+ id: t.PATH_RECENTY_OPENED,
+ },
+ }),
+ a.clearContent(),
+ a._initRecentContent(),
+ a.initializePropertyPanelwithEmptyData();
+ },
+ deactivate: function (t) {
+ var i = e.getDependency('xChangeApp');
+ e.getDependency('applicationChannel');
+ i.clearContent(),
+ t.params.isRefresh ||
+ o.setRouteInfo({
+ name: null,
+ });
+ },
+ }),
+ (n[t.ROUTE_MY_CHANGE_ORDERS] = {
+ activate: function (i) {
+ applicationChannelLocal = e.getDependency('applicationChannel');
+ var n = e.getDependency('xChangeApp');
+ e.getDependency('applicationChannel').publish({
+ event: 'information-panel-close',
+ data: null,
+ }),
+ n.clearContent(),
+ n.loadingMyChangeOrders(),
+ n.initializePropertyPanelwithEmptyData();
+ var a = {
+ name: t.ROUTE_MY_CHANGE_ORDERS,
+ };
+ o.setRouteInfo(a);
+ },
+ deactivate: function () {
+ e.getDependency('xChangeApp'),
+ e.getDependency('applicationChannel');
+ },
+ }),
+ (n[t.ROUTE_MY_CHANGE_ACTIONS] = {
+ activate: function (i) {
+ var n = {
+ name: t.ROUTE_MY_CHANGE_ACTIONS,
+ params: {},
+ };
+ o.setRouteInfo(n);
+ var a = e.getDependency('xChangeApp'),
+ r = e.getDependency('applicationChannel');
+ r.publish({
+ event: 'information-panel-close',
+ data: null,
+ }),
+ r.publish({
+ event: 'welcome-panel-select-action',
+ data: {
+ id: t.PATH_MY_CHANGE_ACTIONS,
+ },
+ }),
+ a.clearContent(),
+ a._initChangeActionContent(),
+ a.initializePropertyPanelwithEmptyData();
+ },
+ deactivate: function (t) {
+ var i = e.getDependency('xChangeApp');
+ e.getDependency('applicationChannel');
+ i.clearContent(),
+ t.params.isRefresh ||
+ o.setRouteInfo({
+ name: null,
+ });
+ },
+ }),
+ (n[t.ROUTE_MY_CHANGE_REQUESTS] = {
+ activate: function (i) {
+ var n = {
+ name: t.ROUTE_MY_CHANGE_REQUESTS,
+ params: {},
+ };
+ o.setRouteInfo(n);
+ var a = e.getDependency('xChangeApp'),
+ r = e.getDependency('applicationChannel');
+ r.publish({
+ event: 'information-panel-close',
+ data: null,
+ }),
+ r.publish({
+ event: 'welcome-panel-select-action',
+ data: {
+ id: t.PATH_MY_CHANGE_REQUESTS,
+ },
+ }),
+ a.clearContent(),
+ a._initChangeRequestContent(),
+ a.initializePropertyPanelwithEmptyData();
+ },
+ deactivate: function (t) {
+ var i = e.getDependency('xChangeApp');
+ e.getDependency('applicationChannel');
+ i.clearContent(),
+ t.params.isRefresh ||
+ o.setRouteInfo({
+ name: null,
+ });
+ },
+ }),
+ (n[t.ROUTE_CO_INFO] = {
+ activate: function (i) {
+ var n = e.getDependency('xChangeApp'),
+ o = e.getDependency('applicationChannel');
+ n.deactivateWP(i.params.isRefresh);
+ t.ROUTE_CO_INFO;
+ var a,
+ r = (a = {
+ id: i.params.id,
+ name: i.params.name,
+ version: '1',
+ modelName: i.params.name,
+ }).name,
+ s = {
+ linkID: t.ROUTE_CO_DETAILS,
+ linkText: r,
+ additionalData: a,
+ };
+ o.publish({
+ event: 'breadcrumb-add-link',
+ data: s,
+ });
+ },
+ deactivate: function (t) {
+ var i = e.getDependency('xChangeApp');
+ i.reactivateWP();
+ e.getDependency('applicationChannel');
+ i.clearContent();
+ },
+ }),
+ (n[t.ROUTE_CO_DETAILS] = {
+ activate: function (n) {
+ var a = e.getDependency('xChangeApp'),
+ r = e.getDependency('applicationChannel');
+ let s = {};
+ 'level1' != n.params.nodeModel.level &&
+ 'level2' != n.params.nodeModel.level &&
+ 'level3' != n.params.nodeModel.level
+ ? (a.deactivateWP(n.params.isRefresh),
+ a.clearContent(),
+ a.showIDCard(n.params.nodeModel, n.params.mode),
+ (s.id = n.params.id),
+ (s.name = n.params.name))
+ : ((s.id = n.params.nodeModel.rootNode.id),
+ (s.name = n.params.nodeModel.rootNode.name));
+ let l = [i._KEY, i._MODEL, i._ID_CARD];
+ o.updatePreference(l, s);
+ var c,
+ d = {
+ name: t.ROUTE_CO_DETAILS,
+ };
+ (c = {
+ id: s.id,
+ name: s.name,
+ version: '1',
+ modelName: s.name,
+ }),
+ (d.params = {
+ changeOrderId: c.id,
+ changeOrderName: c.name,
+ changeOrderVersion: c.version,
+ changeOrderName: c.modelName,
+ }),
+ o.setRouteInfo(d);
+ var u = c.name,
+ g = {
+ linkID: t.ROUTE_CO_DETAILS,
+ linkText: u,
+ additionalData: c,
+ };
+ r.publish({
+ event: 'breadcrumb-remove-link',
+ data: t.ROUTE_CR_ORCHESTRATION_LEVEL2,
+ }),
+ r.publish({
+ event: 'breadcrumb-remove-link',
+ data: t.ROUTE_CR_ORCHESTRATION_LEVEL1,
+ }),
+ r.publish({
+ event: 'breadcrumb-remove-link',
+ data: t.ROUTE_CO_ORCHESTRATION_LEVEL2,
+ }),
+ r.publish({
+ event: 'breadcrumb-remove-link',
+ data: t.ROUTE_CO_ORCHESTRATION_LEVEL1,
+ }),
+ r.publish({
+ event: 'breadcrumb-remove-link',
+ data: t.ROUTE_CO_DETAILS,
+ }),
+ r.publish({
+ event: 'breadcrumb-remove-link',
+ data: t.ROUTE_CO_INFO,
+ }),
+ r.publish({
+ event: 'breadcrumb-remove-link',
+ data: t.ROUTE_CR_DETAILS,
+ }),
+ r.publish({
+ event: 'breadcrumb-remove-link',
+ data: t.ROUTE_CR_INFO,
+ }),
+ r.publish({
+ event: 'breadcrumb-remove-link',
+ data: t.ROUTE_CA_DETAILS,
+ }),
+ r.publish({
+ event: 'breadcrumb-remove-link',
+ data: t.ROUTE_CA_INFO,
+ }),
+ r.publish({
+ event: 'breadcrumb-add-link',
+ data: g,
+ });
+ },
+ deactivate: function (e) {},
+ }),
+ (n[t.ROUTE_CR_INFO] = {
+ activate: function (i) {
+ var n = e.getDependency('xChangeApp'),
+ o = e.getDependency('applicationChannel');
+ n.deactivateWP(i.params.isRefresh);
+ t.ROUTE_CR_INFO;
+ var a,
+ r = (a = {
+ id: i.params.id,
+ name: i.params.name,
+ version: '1',
+ modelName: i.params.name,
+ }).name,
+ s = {
+ linkID: t.ROUTE_CR_DETAILS,
+ linkText: r,
+ additionalData: a,
+ };
+ o.publish({
+ event: 'breadcrumb-add-link',
+ data: s,
+ });
+ },
+ deactivate: function (t) {
+ var i = e.getDependency('xChangeApp');
+ i.reactivateWP();
+ e.getDependency('applicationChannel');
+ i.clearContent();
+ },
+ }),
+ (n[t.ROUTE_CR_DETAILS] = {
+ activate: function (n) {
+ var a = e.getDependency('xChangeApp'),
+ r = e.getDependency('applicationChannel');
+ let s = {};
+ 'level1' != n.params.nodeModel.level &&
+ 'level2' != n.params.nodeModel.level &&
+ 'level3' != n.params.nodeModel.level
+ ? (a.deactivateWP(n.params.isRefresh),
+ a.clearContent(),
+ a.showIDCard(n.params.nodeModel, n.params.mode),
+ (s.id = n.params.id),
+ (s.name = n.params.name))
+ : ((s.id = n.params.nodeModel.rootNode.id),
+ (s.name = n.params.nodeModel.rootNode.name));
+ let l = [i._KEY, i._MODEL, i._ID_CARD];
+ o.updatePreference(l, s);
+ var c,
+ d = {
+ name: t.ROUTE_CR_DETAILS,
+ };
+ (c = {
+ id: s.id,
+ name: s.name,
+ version: '1',
+ modelName: s.name,
+ }),
+ (d.params = {
+ changeRequestId: c.id,
+ changeRequestName: c.name,
+ changeRequestVersion: c.version,
+ changeRequestName: c.modelName,
+ }),
+ o.setRouteInfo(d);
+ var u = {
+ linkID: t.ROUTE_CR_DETAILS,
+ linkText: s.name,
+ additionalData: c,
+ };
+ r.publish({
+ event: 'breadcrumb-remove-link',
+ data: t.ROUTE_CR_DETAILS,
+ }),
+ r.publish({
+ event: 'breadcrumb-remove-link',
+ data: t.ROUTE_CR_INFO,
+ }),
+ r.publish({
+ event: 'breadcrumb-add-link',
+ data: u,
+ });
+ },
+ deactivate: function (e) {},
+ }),
+ (n[t.ROUTE_CA_INFO] = {
+ activate: function (i) {
+ var n = e.getDependency('xChangeApp'),
+ o = e.getDependency('applicationChannel');
+ n.deactivateWP(i.params.isRefresh);
+ t.ROUTE_CA_INFO;
+ var a,
+ r = (a = {
+ id: i.params.id,
+ name: i.params.name,
+ version: '1',
+ modelName: i.params.name,
+ }).name,
+ s = {
+ linkID: t.ROUTE_CA_DETAILS,
+ linkText: r,
+ additionalData: a,
+ };
+ o.publish({
+ event: 'breadcrumb-add-link',
+ data: s,
+ });
+ },
+ deactivate: function (t) {
+ var i = e.getDependency('xChangeApp');
+ i.reactivateWP();
+ e.getDependency('applicationChannel');
+ i.clearContent();
+ },
+ }),
+ (n[t.ROUTE_CA_DETAILS] = {
+ activate: function (i) {
+ var n = e.getDependency('xChangeApp'),
+ a = e.getDependency('applicationChannel');
+ n.deactivateWP(i.params.isRefresh),
+ n.clearContent(),
+ n.showIDCard(i.params.nodeModel, i.params.mode);
+ var r,
+ s = {
+ name: t.ROUTE_CA_DETAILS,
+ };
+ (r = {
+ id: i.params.id,
+ name: i.params.name,
+ version: '1',
+ modelName: i.params.name,
+ }),
+ (s.params = {
+ changeRequestId: r.id,
+ changeRequestName: r.name,
+ changeRequestVersion: r.version,
+ changeRequestName: r.modelName,
+ }),
+ o.setRouteInfo(s);
+ var l = r.name,
+ c = {
+ linkID: t.ROUTE_CA_INFO,
+ linkText: l,
+ additionalData: r,
+ };
+ a.publish({
+ event: 'breadcrumb-remove-link',
+ data: t.ROUTE_CA_DETAILS,
+ }),
+ a.publish({
+ event: 'breadcrumb-remove-link',
+ data: t.ROUTE_CA_INFO,
+ }),
+ a.publish({
+ event: 'breadcrumb-remove-link',
+ data: t.ROUTE_CO_DETAILS,
+ }),
+ a.publish({
+ event: 'breadcrumb-remove-link',
+ data: t.ROUTE_CO_INFO,
+ }),
+ a.publish({
+ event: 'breadcrumb-remove-link',
+ data: t.ROUTE_CR_DETAILS,
+ }),
+ a.publish({
+ event: 'breadcrumb-remove-link',
+ data: t.ROUTE_CR_INFO,
+ }),
+ a.publish({
+ event: 'breadcrumb-add-link',
+ data: c,
+ });
+ },
+ deactivate: function (e) {},
+ }),
+ (n[t.ROUTE_CR_ORCHESTRATION_LEVEL1] = {
+ activate: function (n) {
+ var a = e.getDependency('xChangeApp'),
+ r = e.getDependency('applicationChannel');
+ let s = n.params.nodeModel.level1Node;
+ n.params.nodeModel.level1Node.name
+ ? (s.name = n.params.nodeModel.level1Node.name)
+ : (s.name = n.params.name),
+ 'level2' != n.params.nodeModel.level &&
+ 'level3' != n.params.nodeModel.level &&
+ (a.clearContent(), a.openIDCard(s.id));
+ let l = [i._KEY, i._MODEL, i._ORCHESTRATION_LEVEL1];
+ o.updatePreference(l, s);
+ var c,
+ d = {
+ name: t.ROUTE_CR_ORCHESTRATION_LEVEL1,
+ };
+ (c = {
+ id: s.id,
+ name: s.name,
+ version: '1',
+ modelName: s.name,
+ }),
+ (d.params = {
+ changeOrderId: c.id,
+ changeOrderName: c.name,
+ changeOrderVersion: c.version,
+ changeOrderName: c.modelName,
+ }),
+ o.setRouteInfo(d);
+ var u = c.name,
+ g = {
+ linkID: t.ROUTE_CR_ORCHESTRATION_LEVEL1,
+ linkText: u,
+ additionalData: c,
+ };
+ r.publish({
+ event: 'breadcrumb-remove-link',
+ data: t.ROUTE_CR_ORCHESTRATION_LEVEL1,
+ }),
+ r.publish({
+ event: 'breadcrumb-add-link',
+ data: g,
+ });
+ },
+ deactivate: function (i) {
+ if (i.name == t.ROUTE_CR_DETAILS) {
+ let t = e.getDependency('xChangeApp');
+ t.clearContent(), t.openIDCard(i.params.id);
+ var n,
+ a = {
+ name: i.name,
+ };
+ (n = {
+ id: i.params.id,
+ name: i.params.name,
+ version: '1',
+ modelName: i.params.name,
+ }),
+ (a.params = {
+ changeRequestId: n.id,
+ changeRequestName: n.name,
+ changeRequestVersion: n.version,
+ changeRequestName: n.modelName,
+ }),
+ o.setRouteInfo(a);
+ }
+ },
+ }),
+ (n[t.ROUTE_CR_ORCHESTRATION_LEVEL2] = {
+ activate: function (n) {
+ var a = e.getDependency('xChangeApp'),
+ r = e.getDependency('applicationChannel');
+ let s = n.params.nodeModel.level2Node;
+ n.params.nodeModel.level2Node.name
+ ? (s.name = n.params.nodeModel.level2Node.name)
+ : (s.name = n.params.name),
+ a.deactivateWP(n.params.isRefresh),
+ 'level3' != n.params.nodeModel.level &&
+ (a.clearContent(), a.openIDCard(s.id));
+ let l = [i._KEY, i._MODEL, i._ORCHESTRATION_LEVEL2];
+ o.updatePreference(l, s);
+ var c,
+ d = {
+ name: t.ROUTE_CR_ORCHESTRATION_LEVEL2,
+ };
+ (c = {
+ id: s.id,
+ name: s.name,
+ version: '1',
+ modelName: s.name,
+ }),
+ (d.params = {
+ changeOrderId: c.id,
+ changeOrderName: c.name,
+ changeOrderVersion: c.version,
+ changeOrderName: c.modelName,
+ }),
+ o.setRouteInfo(d);
+ var u = c.name,
+ g = {
+ linkID: t.ROUTE_CR_ORCHESTRATION_LEVEL2,
+ linkText: u,
+ additionalData: c,
+ };
+ r.publish({
+ event: 'breadcrumb-remove-link',
+ data: t.ROUTE_CR_ORCHESTRATION_LEVEL2,
+ }),
+ r.publish({
+ event: 'breadcrumb-add-link',
+ data: g,
+ });
+ },
+ deactivate: function (i) {
+ if (i.name == t.ROUTE_CR_ORCHESTRATION_LEVEL1) {
+ let t = e.getDependency('xChangeApp');
+ t.clearContent(), t.openIDCard(i.params.id);
+ var n,
+ a = {
+ name: i.name,
+ };
+ (n = {
+ id: i.params.id,
+ name: i.params.name,
+ version: '1',
+ modelName: i.params.name,
+ }),
+ (a.params = {
+ changeOrderId: n.id,
+ changeOrderName: n.name,
+ changeOrderVersion: n.version,
+ changeOrderName: n.modelName,
+ }),
+ o.setRouteInfo(a);
+ }
+ },
+ }),
+ (n[t.ROUTE_CR_ORCHESTRATION_LEVEL3] = {
+ activate: function (n) {
+ var a = e.getDependency('xChangeApp'),
+ r = e.getDependency('applicationChannel');
+ let s = n.params.nodeModel.level3Node;
+ n.params.nodeModel.level3Node.name
+ ? (s.name = n.params.nodeModel.level3Node.name)
+ : (s.name = n.params.name),
+ a.deactivateWP(n.params.isRefresh),
+ a.clearContent(),
+ a.openIDCard(s.id);
+ let l = [i._KEY, i._MODEL, i._ORCHESTRATION_LEVEL3];
+ o.updatePreference(l, s);
+ var c,
+ d = {
+ name: t.ROUTE_CR_ORCHESTRATION_LEVEL3,
+ };
+ (c = {
+ id: s.id,
+ name: s.name,
+ version: '1',
+ modelName: s.name,
+ }),
+ (d.params = {
+ changeOrderId: c.id,
+ changeOrderName: c.name,
+ changeOrderVersion: c.version,
+ changeOrderName: c.modelName,
+ }),
+ o.setRouteInfo(d);
+ var u = c.name,
+ g = {
+ linkID: t.ROUTE_CR_ORCHESTRATION_LEVEL3,
+ linkText: u,
+ additionalData: c,
+ };
+ r.publish({
+ event: 'breadcrumb-remove-link',
+ data: t.ROUTE_CR_ORCHESTRATION_LEVEL3,
+ }),
+ r.publish({
+ event: 'breadcrumb-add-link',
+ data: g,
+ });
+ },
+ deactivate: function (i) {
+ if (i.name == t.ROUTE_CR_ORCHESTRATION_LEVEL2) {
+ let t = e.getDependency('xChangeApp');
+ t.clearContent(), t.openIDCard(i.params.id);
+ var n,
+ a = {
+ name: i.name,
+ };
+ (n = {
+ id: i.params.id,
+ name: i.params.name,
+ version: '1',
+ modelName: i.params.name,
+ }),
+ (a.params = {
+ changeOrderId: n.id,
+ changeOrderName: n.name,
+ changeOrderVersion: n.version,
+ changeOrderName: n.modelName,
+ }),
+ o.setRouteInfo(a);
+ }
+ },
+ }),
+ (n[t.ROUTE_CO_ORCHESTRATION_LEVEL1] = {
+ activate: function (n) {
+ var a = e.getDependency('xChangeApp'),
+ r = e.getDependency('applicationChannel');
+ let s = n.params.nodeModel.level1Node;
+ n.params.nodeModel.level1Node.name
+ ? (s.name = n.params.nodeModel.level1Node.name)
+ : (s.name = n.params.name),
+ 'level2' != n.params.nodeModel.level &&
+ 'level3' != n.params.nodeModel.level &&
+ (a.clearContent(), a.openIDCard(s.id));
+ let l = [i._KEY, i._MODEL, i._ORCHESTRATION_LEVEL1];
+ o.updatePreference(l, s);
+ var c,
+ d = {
+ name: t.ROUTE_CO_ORCHESTRATION_LEVEL1,
+ };
+ (c = {
+ id: s.id,
+ name: s.name,
+ version: '1',
+ modelName: s.name,
+ }),
+ (d.params = {
+ changeOrderId: c.id,
+ changeOrderName: c.name,
+ changeOrderVersion: c.version,
+ changeOrderName: c.modelName,
+ }),
+ o.setRouteInfo(d);
+ var u = c.name,
+ g = {
+ linkID: t.ROUTE_CO_ORCHESTRATION_LEVEL1,
+ linkText: u,
+ additionalData: c,
+ };
+ r.publish({
+ event: 'breadcrumb-remove-link',
+ data: t.ROUTE_CO_ORCHESTRATION_LEVEL1,
+ }),
+ r.publish({
+ event: 'breadcrumb-add-link',
+ data: g,
+ });
+ },
+ deactivate: function (i) {
+ if (i.name == t.ROUTE_CO_DETAILS) {
+ let t = e.getDependency('xChangeApp');
+ t.clearContent(), t.openIDCard(i.params.id);
+ var n,
+ a = {
+ name: i.name,
+ };
+ (n = {
+ id: i.params.id,
+ name: i.params.name,
+ version: '1',
+ modelName: i.params.name,
+ }),
+ (a.params = {
+ changeOrderId: n.id,
+ changeOrderName: n.name,
+ changeOrderVersion: n.version,
+ changeOrderName: n.modelName,
+ }),
+ o.setRouteInfo(a);
+ }
+ },
+ }),
+ (n[t.ROUTE_CO_ORCHESTRATION_LEVEL2] = {
+ activate: function (n) {
+ var a = e.getDependency('xChangeApp'),
+ r = e.getDependency('applicationChannel');
+ let s = n.params.nodeModel.level2Node;
+ n.params.nodeModel.level2Node.name
+ ? (s.name = n.params.nodeModel.level2Node.name)
+ : (s.name = n.params.name),
+ a.deactivateWP(n.params.isRefresh),
+ 'level3' != n.params.nodeModel.level &&
+ (a.clearContent(), a.openIDCard(s.id));
+ let l = [i._KEY, i._MODEL, i._ORCHESTRATION_LEVEL2];
+ o.updatePreference(l, s);
+ var c,
+ d = {
+ name: t.ROUTE_CO_ORCHESTRATION_LEVEL2,
+ };
+ (c = {
+ id: s.id,
+ name: s.name,
+ version: '1',
+ modelName: s.name,
+ }),
+ (d.params = {
+ changeOrderId: c.id,
+ changeOrderName: c.name,
+ changeOrderVersion: c.version,
+ changeOrderName: c.modelName,
+ }),
+ o.setRouteInfo(d);
+ var u = c.name,
+ g = {
+ linkID: t.ROUTE_CO_ORCHESTRATION_LEVEL2,
+ linkText: u,
+ additionalData: c,
+ };
+ r.publish({
+ event: 'breadcrumb-remove-link',
+ data: t.ROUTE_CO_ORCHESTRATION_LEVEL2,
+ }),
+ r.publish({
+ event: 'breadcrumb-add-link',
+ data: g,
+ });
+ },
+ deactivate: function (i) {
+ if (i.name == t.ROUTE_CO_ORCHESTRATION_LEVEL1) {
+ let t = e.getDependency('xChangeApp');
+ t.clearContent(), t.openIDCard(i.params.id);
+ var n,
+ a = {
+ name: i.name,
+ };
+ (n = {
+ id: i.params.id,
+ name: i.params.name,
+ version: '1',
+ modelName: i.params.name,
+ }),
+ (a.params = {
+ changeOrderId: n.id,
+ changeOrderName: n.name,
+ changeOrderVersion: n.version,
+ changeOrderName: n.modelName,
+ }),
+ o.setRouteInfo(a);
+ }
+ },
+ }),
+ (n[t.ROUTE_CO_ORCHESTRATION_LEVEL3] = {
+ activate: function (n) {
+ var a = e.getDependency('xChangeApp'),
+ r = e.getDependency('applicationChannel');
+ let s = n.params.nodeModel.level3Node;
+ n.params.nodeModel.level3Node.name
+ ? (s.name = n.params.nodeModel.level3Node.name)
+ : (s.name = n.params.name),
+ a.deactivateWP(n.params.isRefresh),
+ a.clearContent(),
+ a.openIDCard(s.id);
+ let l = [i._KEY, i._MODEL, i._ORCHESTRATION_LEVEL3];
+ o.updatePreference(l, s);
+ var c,
+ d = {
+ name: t.ROUTE_CO_ORCHESTRATION_LEVEL3,
+ };
+ (c = {
+ id: s.id,
+ name: s.name,
+ version: '1',
+ modelName: s.name,
+ }),
+ (d.params = {
+ changeOrderId: c.id,
+ changeOrderName: c.name,
+ changeOrderVersion: c.version,
+ changeOrderName: c.modelName,
+ }),
+ o.setRouteInfo(d);
+ var u = c.name,
+ g = {
+ linkID: t.ROUTE_CO_ORCHESTRATION_LEVEL3,
+ linkText: u,
+ additionalData: c,
+ };
+ r.publish({
+ event: 'breadcrumb-remove-link',
+ data: t.ROUTE_CO_ORCHESTRATION_LEVEL3,
+ }),
+ r.publish({
+ event: 'breadcrumb-add-link',
+ data: g,
+ });
+ },
+ deactivate: function (i) {
+ if (i.name == t.ROUTE_CO_ORCHESTRATION_LEVEL2) {
+ let t = e.getDependency('xChangeApp');
+ t.clearContent(), t.openIDCard(i.params.id);
+ var n,
+ a = {
+ name: i.name,
+ };
+ (n = {
+ id: i.params.id,
+ name: i.params.name,
+ version: '1',
+ modelName: i.params.name,
+ }),
+ (a.params = {
+ changeOrderId: n.id,
+ changeOrderName: n.name,
+ changeOrderVersion: n.version,
+ changeOrderName: n.modelName,
+ }),
+ o.setRouteInfo(a);
+ }
+ },
+ }),
+ n))
+ n.hasOwnProperty(r) && e.addRouteMethods(r, n[r]);
+ },
+ };
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactedItem/ChgCRImpactedItemTileViewLayout',
+ [
+ 'UWA/Core',
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/impactedItem/util/ChgCRImpactedItemGridColsUtil',
+ ],
+ function (e, t) {
+ 'use strict';
+ return {
+ changeView: function (e) {
+ setTimeout(function () {
+ t.changeView('TileView');
+ }, 100);
+ },
+ showEmptyView: function () {
+ var e = document.getElementById('impactedItemEmptyTileViewDiv');
+ e && (e.removeClassName('hideView'), e.addClassName('showEmptyView'));
+ },
+ hideEmptyView: function () {
+ var e = document.getElementById('impactedItemEmptyTileViewDiv');
+ e && (e.addClassName('hideView'), e.removeClassName('showEmptyView'));
+ },
+ };
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/util/ProbesRMBCommandUtil',
+ [
+ 'DS/ENOChgProbes/scripts/ChgCloudProbeUtils',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovApplicationPreferencesManager',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovPreferenceConstant',
+ ],
+ function (e, t, i) {
+ 'use strict';
+ return {
+ createProbesData: function (n, o) {
+ var a = {};
+ let r = '',
+ s = '',
+ l = '';
+ var c = t.getRouteInfo('ChgGovPreferenceConstant._LAST_ROUTE');
+ if ('home.CRInfo.CRDetails' === c.name) {
+ let s = [i._KEY, i._VIEWS_PREFERENCES, i._CHANGE_REQUESTS_DETAILS];
+ (r = t.getTab(s)),
+ (a.commandInfo = {}),
+ (a.commandInfo.type = 'Change Request'),
+ r && 'crAffectedItems' === r
+ ? ((a.commandInfo.facet = 'Affected Items'),
+ 'Download' === n
+ ? (a.commandInfo.action = 'CR>Affected Items>RMB>Download')
+ : 'Preview' === n
+ ? (a.commandInfo.action = 'CR>Affected Items>RMB>Preview')
+ : 'Information' === n
+ ? (a.commandInfo.action =
+ 'CR>Affected Items>RMB>Information')
+ : 'Maturity' === n
+ ? (a.commandInfo.action = 'CR>Affected Items>RMB>Maturity')
+ : 'OpenWith' === n &&
+ (a.commandInfo.action =
+ 'CR>Affected Items>RMB>OpenWith>' + o))
+ : r && 'crAssessment' === r
+ ? ((a.commandInfo.facet = 'Impact Analysis'),
+ 'Information' === n
+ ? (a.commandInfo.action =
+ 'CR>Impact Analysis>RMB>Information')
+ : 'Maturity' === n
+ ? (a.commandInfo.action = 'CR>Impact Analysis>RMB>Maturity')
+ : 'Copy Link' === n &&
+ (a.commandInfo.action =
+ 'CR>Impact Analysis>RMB>Copy Link'))
+ : r &&
+ 'crOrchestration' === r &&
+ ((a.commandInfo.facet = 'Change Orchestration'),
+ 'Information' === n
+ ? (a.commandInfo.action =
+ 'CR>Change Orchestration>RMB>Information')
+ : 'Maturity' === n
+ ? (a.commandInfo.action =
+ 'CR>Change Orchestration>RMB>Maturity')
+ : 'Copy Link' === n
+ ? (a.commandInfo.action =
+ 'CR>Change Orchestration>RMB>Copy Link')
+ : 'OpenWith' === n &&
+ (a.commandInfo.action =
+ 'CR>Change Orchestration>RMB>OpenWith>' + o)),
+ e.cloudProbeUtils.genericCommandClickEventForAnalytics({
+ inputJSON: a,
+ });
+ } else if ('home.COInfo.CODetails' === c.name) {
+ let r = [i._KEY, i._VIEWS_PREFERENCES, i._CHANGE_ORDERS_DETAILS];
+ (s = t.getTab(r)),
+ (a.commandInfo = {}),
+ (a.commandInfo.type = 'Change Order'),
+ s &&
+ 'ChangeOrchestration' === s &&
+ ((a.commandInfo.facet = 'Change Orchestration'),
+ 'Information' === n
+ ? (a.commandInfo.action =
+ 'CO>Change Orchestration>RMB>Information')
+ : 'Maturity' === n
+ ? (a.commandInfo.action =
+ 'CO>Change Orchestration>RMB>Maturity')
+ : 'Copy Link' === n
+ ? (a.commandInfo.action =
+ 'CO>Change Orchestration>RMB>Copy Link')
+ : 'OpenWith' === n &&
+ (a.commandInfo.action =
+ 'CO>Change Orchestration>RMB>OpenWith>' + o)),
+ e.cloudProbeUtils.genericCommandClickEventForAnalytics({
+ inputJSON: a,
+ });
+ } else if ('home.CAInfo.CADetails' === c.name) {
+ let r = [i._KEY, i._VIEWS_PREFERENCES, i._CHANGE_ACTIONS_DETAILS];
+ (l = t.getTab(r)),
+ (a.commandInfo = {}),
+ (a.commandInfo.type = 'Change Action'),
+ l &&
+ 'RealizedChange' === l &&
+ ((a.commandInfo.facet = 'Realized Changes'),
+ 'Information' === n
+ ? (a.commandInfo.action =
+ 'CA>Realized Changes>DGV>RMB>Information')
+ : 'OpenWith' === n
+ ? (a.commandInfo.action =
+ 'CA>Realized Changes>DGV>RMB>OpenWith>' + o)
+ : 'Relations' === n &&
+ (a.commandInfo.action =
+ 'CA>Realized Changes>DGV>RMB>Relations')),
+ e.cloudProbeUtils.genericCommandClickEventForAnalytics({
+ inputJSON: a,
+ });
+ }
+ },
+ };
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/DownloadContextualMenu',
+ [
+ 'UWA/Core',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgGovernanceUX/scripts/util/DocumentUtils',
+ 'DS/ENOChgGovernanceUX/scripts/util/ProbesRMBCommandUtil',
+ ],
+ function (e, t, i, n) {
+ 'use strict';
+ return {
+ getDownloadMenu: function (e) {
+ return {
+ type: 'PushItem',
+ title: t.CHG_GOV_Download,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x wux-ui-3ds-download',
+ },
+ action: {
+ callback: function () {
+ n.createProbesData('Download'), i.download(e);
+ },
+ },
+ };
+ },
+ getPreviewMenu: function (e) {
+ return {
+ type: 'PushItem',
+ title: t.CHG_GOV_Preview,
+ fonticon: {
+ family: 1,
+ content: 'wux-ui-3ds wux-ui-3ds-1x fonticon-eye',
+ },
+ action: {
+ callback: function () {
+ n.createProbesData('Preview'), i.preview(e);
+ },
+ },
+ };
+ },
+ };
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/components/attachmentView/ChgAttachmentView',
+ [
+ 'UWA/Core',
+ 'UWA/Class',
+ 'UWA/Class/Debug',
+ 'UWA/Class/Events',
+ 'DS/ENOChgGovernanceUX/scripts/util/ChgGovGlobalSubscriber',
+ 'DS/PlatformAPI/PlatformAPI',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'DS/ENOChgServices/scripts/services/ChgNativeInitService',
+ 'DS/ENOChgServices/scripts/services/ChgIDCardCommonServices',
+ ],
+ function (e, t, i, n, o, a, r, s, l) {
+ 'use strict';
+ var c = {
+ create: function (e, t) {
+ var i = this;
+ i.id = e.id;
+ for (
+ var n = r.getGlobalVariable(),
+ o = n.referentialsSearchForbiddenType.split(','),
+ a = (n.referentialsSearchType.split(','), n.tenantMappings),
+ s = [],
+ l = 0;
+ l < a.length;
+ l++
+ )
+ n.tenant == a[l].platformId && (s = a[l]);
+ var c = {
+ parentObject: {
+ parentId: e.id,
+ },
+ connectorOptions: {
+ fetchSecurityContext: function () {
+ return n.getSecurityContext();
+ },
+ platformUrls: s,
+ },
+ supportedTypes: {
+ excludedTypes: o,
+ includedTypes: ['*'],
+ },
+ };
+ 'Change Action' == e.parentType &&
+ (c.parentObject.relationName = 'Related Item'),
+ (c.readonly = t),
+ require(['DS/ENOXAttachmentsUX/AttachmentsPane'], function (t) {
+ (i.attachmentsPane = new t(c)),
+ (i.modelEvents = i.attachmentsPane.modelEvents),
+ i.subscribeToEvents(),
+ i.attachmentsPane.inject(e.target);
+ });
+ },
+ subscribeToEvents: function () {
+ var e = this;
+ e.modelEvents.subscribe(
+ {
+ event: 'attach-attachment-complete',
+ },
+ function (t) {
+ console.log('attached.....!');
+ var i = t.document.dataelements;
+ i.id = t.document.id;
+ var n = {
+ attached: [],
+ };
+ n.attached.push(i);
+ t = {
+ id: e.id,
+ referentials: n,
+ operation: 'CONNECT',
+ };
+ a.publish('co-update-attachment-complete', t);
+ },
+ ),
+ e.modelEvents.subscribe(
+ {
+ event: 'upload-attachment-complete',
+ },
+ function (t) {
+ console.log('uploaded.....!');
+ var i = {};
+ let n = t.parentObject.parentId;
+ (e.id = n), (i.attached = []);
+ for (var o = 0; o < t.documents.length; o++) {
+ var r = t.documents[o].dataelements;
+ (r.id = t.documents[o].id), i.attached.push(r);
+ }
+ t = {
+ id: e.id,
+ referentials: i,
+ operation: 'CONNECT',
+ };
+ a.publish('co-update-attachment-complete', t);
+ },
+ ),
+ e.modelEvents.subscribe(
+ {
+ event: 'detach-attachment-complete',
+ },
+ function (t) {
+ console.log('detached.....!');
+ var i = t.id,
+ n = {
+ detached: [],
+ };
+ n.detached.push(i);
+ t = {
+ id: e.id,
+ referentials: n,
+ operation: 'DISCONNECT',
+ };
+ a.publish('co-update-attachment-complete', t);
+ },
+ ),
+ r.getGlobalVariable().is3DSpace &&
+ e.modelEvents.subscribe(
+ {
+ event: 'context-menu-requested',
+ },
+ function (t) {
+ if (
+ (console.log('context-menu-requested.....!'),
+ t.contextMenu.getItem('Relations'))
+ ) {
+ t.contextMenu.removeItem('Relations');
+ var i = {
+ type: 'PushItem',
+ title: 'Relations',
+ text: 'Relations',
+ id: 'Relations',
+ fonticon: 'object-related',
+ handler: function (t) {
+ var i = e.attachmentsPane.getSelection();
+ l.openRelationalExplorer(i);
+ },
+ };
+ t.contextMenu.addItem(i);
+ }
+ },
+ ),
+ r.getGlobalVariable().is3DSpace &&
+ e.modelEvents.subscribe(
+ {
+ event: 'user-clicks-attach',
+ },
+ function (t) {
+ const i = 'wdg_' + new Date().getTime();
+ var n =
+ '../common/emxFullSearch.jsp?field=TYPES!=' +
+ r.getGlobalVariable().referentialsSearchForbiddenType +
+ '&table=AEFGeneralSearchResults&selection=multiple&formName=BCform&submitAction=refreshCaller&hideHeader=true&HelpMarker=emxhelpfullsearch&submitURL=../enterprisechangemgtapp/ECMWebSearchUtil.jsp?fromOperation=searchObjects&uniqueKey=' +
+ i;
+ showChooser(n, 850, 630);
+ var o = function (t) {
+ if (
+ t.storageArea === localStorage &&
+ null != localStorage.searchedObjectDetails &&
+ '' != localStorage.searchedObjectDetails &&
+ localStorage.searchedObjectDetails.indexOf(i) > -1
+ ) {
+ let t = JSON.parse(localStorage.searchedObjectDetails);
+ delete t.uniqueKey;
+ let i = [];
+ Object.values(t).forEach((e) => {
+ i.push(e[0]);
+ }),
+ e.attachmentsPane.attachAttachments(i),
+ localStorage.removeItem('searchedObjectDetails'),
+ window.removeEventListener('storage', o);
+ } else console.log('inside EVENT');
+ };
+ window.addEventListener('storage', o);
+ },
+ ),
+ r.getGlobalVariable().isNative &&
+ (e.modelEvents.subscribe(
+ {
+ event: 'user-clicks-attach',
+ },
+ function (e) {
+ s.DispatchEventToWin('CHG_Add_Attachment', 'Attachment');
+ },
+ ),
+ e.modelEvents.subscribe(
+ {
+ event: 'context-menu-requested',
+ },
+ function (e) {
+ var t = e.data[0].id;
+ (c.contextMenu = e.contextMenu),
+ s.DispatchEventToWin('Referential_ContextMenu', t);
+ },
+ ));
+ },
+ OnSearchComplete: function (e) {
+ for (var t = e.split(','), i = [], n = 0; n < t.length; n++)
+ i.push(t[n]);
+ c.attachmentsPane.attachAttachments(i);
+ },
+ DisplayContextMenu: function (e) {
+ console.log('ChgAttachmentView: DisplayContextMenu.....!');
+ for (var t = 0; t < e.length; t++) c.contextMenu.addItem(e[t]);
+ },
+ };
+ return c;
+ },
+ ),
+ define(
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/changeOrchestration/ChgCROrchestrationDataGridView',
+ [
+ 'UWA/Class/View',
+ 'DS/CoreEvents/ModelEvents',
+ 'DS/Core/PointerEvents',
+ 'DS/DataGridView/DataGridView',
+ 'DS/CollectionView/ResponsiveTilesCollectionView',
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/changeOrchestration/ChgCROrchestrationDataGridViewToolbar',
+ 'DS/ENOChgServices/scripts/services/ChgInfraService',
+ 'DS/CollectionView/CollectionViewStatusBar',
+ 'DS/ENOChgGovernanceUX/scripts/view/changeRequest/facets/changeOrchestration/util/ChgCROrchestrationGridContextualMenu',
+ 'i18n!DS/ENOChgGovernanceUX/assets/nls/ENOChgGovernanceNLS',
+ 'DS/ENOChgGovernanceUX/scripts/view/ChgCreateChangeOrder',
+ 'DS/PlatformAPI/PlatformAPI',
+ 'DS/ENOChgServices/scripts/services/ChgCustomAttributeService',
+ 'DS/ENOChgServices/scripts/services/ChgServiceGlobalVariable',
+ 'require',
+ ],
+ function (e, t, i, n, o, a, r, s, l, c, d, u, g, p, h) {
+ 'use strict';
+ return e.extend({
+ init: function (e) {
+ this._parent(e);
+ var i = this;
+ (this._modelEvents = null),
+ null != e && null != e.modelEvents
+ ? (this._modelEvents = e.modelEvents)
+ : (this._modelEvents = new t()),
+ (this.chgOrchestrationGridView = ''),
+ 'undefined' != this.options.target &&
+ null != this.options.target &&
+ (this.render(),
+ this.chgOrchestrationGridView.inject(this.options.target),
+ this.chgOrchestrationGridView.setStyle(
+ 'width',
+ this.options.target.offsetWidth,
+ )),
+ u.subscribe('idcard-header-minified', function (e) {
+ e.value
+ ? (i.chgOrchestrationGridView
+ .getElement('.content-orchestration-grid-div')
+ .removeClassName('expanded-header-height'),
+ i.chgOrchestrationGridView
+ .getElement('.content-orchestration-grid-div')
+ .addClassName('minified-header-height'),
+ i.chgOrchestrationGridView
+ .getElement('.content-orchestration-tile-div')
+ .removeClassName('expanded-header-height'),
+ i.chgOrchestrationGridView
+ .getElement('.content-orchestration-tile-div')
+ .addClassName('minified-header-height'))
+ : (i.chgOrchestrationGridView
+ .getElement('.content-orchestration-grid-div')
+ .addClassName('expanded-header-height'),
+ i.chgOrchestrationGridView
+ .getElement('.content-orchestration-grid-div')
+ .removeClassName('minified-header-height'),
+ i.chgOrchestrationGridView
+ .getElement('.content-orchestration-tile-div')
+ .addClassName('expanded-header-height'),
+ i.chgOrchestrationGridView
+ .getElement('.content-orchestration-tile-div')
+ .removeClassName('minified-header-height'));
+ });
+ },
+ render: function () {
+ try {
+ var e = this.processColumns(),
+ t = this,
+ d = {
+ treeDocument: this.options.treeDocument,
+ columns: e,
+ cellSelection: 'none',
+ rowSelection: 'multiple',
+ cellDragEnabledFlag: !0,
+ showNodeKPIColorFlag: !0,
+ identifier: 'chgCROrchestrationGrid',
+ defaultColumnDef: {
+ width: 'auto',
+ resizableFlag: !0,
+ sortableFlag: !0,
+ },
+ onContextualEvent: function (e) {
+ var i = [];
+ if (e && e.collectionView && e.cellInfos) {
+ if (e.cellInfos.rowID > -1)
+ return l
+ .showRMBMenuOnGrid(t, e, t.options.target)
+ .then(function (e) {
+ return e;
+ });
+ e.collectionView.columns.length, e.cellInfos.columnID;
+ i = e.collectionView.buildDefaultContextualMenu(e, {
+ pin: !0,
+ firstColumnsVisibility: !0,
+ columnsManagement: !0,
+ sizeColumnToFit: !1,
+ });
+ }
+ return i;
+ },
+ filterBaseCAId: 'All My Active Changes',
+ onDragStartRowHeader: function (e, t) {
+ r.readyDragContent(e, t);
+ },
+ onDragStartCell: function (e, t) {
+ r.readyDragContent(e, t);
+ },
+ };
+ d = UWA.merge(d, this.options);
+ var u = {
+ model: this.options.treeDocument,
+ height: 'inherit',
+ allowUnsafeHTMLContent: !1,
+ displayedOptionalCellProperties: [
+ 'contextualMenu',
+ 'description',
+ 'propertiesList',
+ 'activeFlag',
+ 'statusbarIcons',
+ ],
+ };
+ (this.chgOrchestrationGrid = new n(d)),
+ (this.chgOrchestrationGrid.cellSelection = 'none'),
+ (this.chgOrchestrationGrid.getCustomViewsManager().onCustomViewsSave =
+ function (e, t) {
+ e.map((e) => {
+ if (e.identifier == t) {
+ let t = e.columnsVisibleFlag;
+ if (null != t && null != t) {
+ let e = Object.keys(t);
+ p.getGlobalVariable().customeViewCOList = e;
+ }
+ }
+ });
+ }),
+ (this.chgOrchestrationGrid.onDelayedModelDataRequest = function (
+ e,
+ ) {
+ let i = t.chgOrchestrationGrid
+ .getCustomViewsManager()
+ .getCustomViews(),
+ n =
+ t.chgOrchestrationGrid.getCustomViewsManager()
+ ._currentCustomViewIdentifier;
+ i.map((e) => {
+ if (e.identifier == n) {
+ let t = e.columnsVisibleFlag;
+ if (null != t && null != t) {
+ let e = Object.keys(t);
+ p.getGlobalVariable().customeViewCOList = e;
+ }
+ }
+ });
+ var o = e.collectionView;
+ let a = [],
+ r = [],
+ s = p.getGlobalVariable().customeViewCOList;
+ if (-1 != e.endNodeIndex && -1 != e.startNodeIndex) {
+ for (let t = e.startNodeIndex; t <= e.endNodeIndex; t++) {
+ a.push(o.model[t].options.grid.id), r.push(o.model[t]);
+ for (let e = 0; e < s.length; e++)
+ o.model[t].setAttribute(s[e], void 0);
+ }
+ g.updateAsynAttributeColumn(s, a, r);
+ }
+ });
+ let b = this.chgOrchestrationGrid;
+ this._modelEvents.publish({
+ event: 'hideEmpty-datagrid',
+ data: b,
+ }),
+ (this.tileView = new o(u));
+ var h = {
+ callback: function (e) {
+ if (e && e.cellInfos && e.cellInfos.cellModel)
+ return l.showRMBMenuOnGrid(t, e, !0).then(function (e) {
+ return e;
+ });
+ },
+ };
+ this.tileView.onContextualEvent = h;
+ this.chgOrchestrationGrid
+ .getTypeRepresentationFactory()
+ .registerTypeRepresentations({
+ addDropdown: {
+ stdTemplate: 'functionMenuIcon',
+ semantics: {
+ label: 'action',
+ icon: 'plus',
+ },
+ },
+ }),
+ (a.toolbar = this.chgOrchestrationGrid.setToolbar(
+ a.writetoolbarDefinition(this.options),
+ )),
+ (this.toolbar = a.toolbar);
+ t = this;
+ this.chgOrchestrationGrid.addEventListener(
+ 'allCellsRendered',
+ function () {
+ t.chgOrchestrationGrid.buildStatusBar([
+ {
+ type: s.STATUS.CUSTOM,
+ id: 'totalItems',
+ dataElements: {
+ typeRepresentation: 'string',
+ value:
+ c.CHG_GOV_StatusBar_TotalItems +
+ t.chgOrchestrationGrid
+ .getTreeDocument()
+ .getAllDescendants().length,
+ },
+ },
+ {
+ type: s.STATUS.CUSTOM,
+ id: 'selectedGridCount',
+ dataElements: {
+ typeRepresentation: 'string',
+ value:
+ c.CHG_GOV_StatusBar_SelectedItems +
+ t.chgOrchestrationGrid
+ .getTreeDocument()
+ .getSelectedNodes().length,
+ },
+ },
+ ]),
+ t.tileView.buildStatusBar([
+ {
+ type: s.STATUS.CUSTOM,
+ id: 'totalItems',
+ dataElements: {
+ typeRepresentation: 'string',
+ value:
+ c.CHG_GOV_StatusBar_TotalItems +
+ t.tileView.getTreeDocument().getAllDescendants()
+ .length,
+ },
+ },
+ {
+ type: s.STATUS.CUSTOM,
+ id: 'selectedTileCount',
+ dataElements: {
+ typeRepresentation: 'string',
+ value:
+ c.CHG_GOV_StatusBar_SelectedItems +
+ t.tileView.getTreeDocument().getSelectedNodes()
+ .length,
+ },
+ },
+ ]);
+ },
+ ),
+ t.chgOrchestrationGrid.addEventListener(
+ i.POINTERHIT,
+ function (e, i) {
+ t.onItemClick(e, i);
+ },
+ ),
+ t.chgOrchestrationGrid
+ .getTreeDocument()
+ .getXSO()
+ .onAdd(function (e) {
+ t.chgOrchestrationGrid.elements.statusBar
+ .getNodeModelByID('selectedGridCount')
+ .updateOptions({
+ grid: {
+ data:
+ c.CHG_GOV_StatusBar_SelectedItems +
+ e.getTreeDocument().getSelectedNodes().length,
+ },
+ }),
+ t.tileView.elements.statusBar
+ .getNodeModelByID('selectedTileCount')
+ .updateOptions({
+ grid: {
+ data:
+ c.CHG_GOV_StatusBar_SelectedItems +
+ e.getTreeDocument().getSelectedNodes().length,
+ },
+ }),
+ t.onSelectionChange(
+ t._modelEvents,
+ e,
+ t.id,
+ t.options.contextDetails.isKindOfType,
+ 'onAdd',
+ );
+ }),
+ t.chgOrchestrationGrid
+ .getTreeDocument()
+ .getXSO()
+ .onRemove(function (e) {
+ t.chgOrchestrationGrid.elements.statusBar
+ .getNodeModelByID('selectedGridCount')
+ .updateOptions({
+ grid: {
+ data:
+ c.CHG_GOV_StatusBar_SelectedItems +
+ e.getTreeDocument().getSelectedNodes().length,
+ },
+ }),
+ t.tileView.elements.statusBar
+ .getNodeModelByID('selectedTileCount')
+ .updateOptions({
+ grid: {
+ data:
+ c.CHG_GOV_StatusBar_SelectedItems +
+ e.getTreeDocument().getSelectedNodes().length,
+ },
+ }),
+ t.onSelectionChange(
+ t._modelEvents,
+ e,
+ t.id,
+ t.options.contextDetails.isKindOfType,
+ 'onRemove',
+ );
+ }),
+ t.tileView.addEventListener(i.POINTERHIT, function (e, i) {
+ t.onItemClick(e, i);
+ }),
+ (this.onItemClick = function (e, i) {
+ if (
+ i &&
+ i.nodeModel &&
+ i.nodeModel.options.grid &&
+ 2 == e.multipleHitCount
+ ) {
+ console.log('CROrchestration_OnItemClcik'),
+ i.nodeModel.select(!0),
+ t._modelEvents.publish({
+ event: 'update-property-panel-data',
+ data: {
+ context: i.nodeModel,
+ },
+ });
+ let e = i.nodeModel.getPath().length,
+ n = {},
+ o = {};
+ e > 1 &&
+ ((n.id = i.nodeModel.getParent().options.grid.id),
+ (n.title = i.nodeModel.getParent().options.grid.title),
+ (n.name = i.nodeModel.getParent().options.grid.name)),
+ e > 2 &&
+ ((o.id = i.nodeModel
+ .getParent()
+ .getParent().options.grid.id),
+ (o.title = i.nodeModel
+ .getParent()
+ .getParent().options.grid.title),
+ (o.name = i.nodeModel
+ .getParent()
+ .getParent().options.grid.name)),
+ t._modelEvents.publish({
+ event: 'CROrchestration-DataGrid-on-dblclick',
+ data: {
+ model: i.nodeModel.options.grid,
+ pathlength: e,
+ parentModel: n,
+ gradParentModel: o,
+ },
+ context: i.nodeModel,
+ });
+ }
+ }),
+ (this.chgOrchestrationGridView = UWA.createElement('div', {
+ id: 'outer-orchestration-grid-div',
+ styles: {
+ width: '100%',
+ height: '100%',
+ display: 'inline-block',
+ },
+ class: 'outer-orchestration-grid-div',
+ }));
+ var m = UWA.createElement('div', {
+ styles: {
+ width: '100%',
+ },
+ class: 'toolbar-orchestration-grid-div',
+ });
+ this.toolbar.inject(m);
+ var C = UWA.createElement('div', {
+ class: 'content-orchestration-grid-div expanded-header-height',
+ }),
+ v = UWA.createElement('div', {
+ class:
+ 'content-orchestration-tile-div orchestrationtileView expanded-header-height',
+ }),
+ f = UWA.createElement('div', {
+ class: 'hideView',
+ id: 'orchestrationEmptyTileViewDiv',
+ });
+ UWA.createElement('div', {
+ html: c.CHG_GOV_ChangeOrchestration_DataGrid_PlaceHolder,
+ }).inject(f),
+
\ No newline at end of file