qms-angular 1.0.77 → 1.0.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4892,7 +4892,7 @@ class TreeComponent {
4892
4892
  TreeComponent.decorators = [
4893
4893
  { type: Component, args: [{
4894
4894
  selector: 'qms-tree',
4895
- template: "<mat-tree\r\n [dataSource]=\"dataSource\"\r\n [treeControl]=\"treeControl\"\r\n class=\"tree__container\"\r\n>\r\n <mat-tree-node\r\n class=\"tree-branch\"\r\n *matTreeNodeDef=\"let node\"\r\n matTreeNodeToggle\r\n matTreeNodePadding\r\n >\r\n <!-- form thu 1 - child -->\r\n <mat-checkbox\r\n qms-group-options\r\n [disabled]=\"node.disabled\"\r\n color=\"default\"\r\n *ngIf=\"node.name && showCheckBox && !onlyCheckBoxForChild && !onlyFolder\"\r\n class=\"checklist-leaf-node\"\r\n [checked]=\"checklistSelection.isSelected(node)\"\r\n (change)=\"todoItemSelectionToggle(node)\"\r\n >\r\n </mat-checkbox>\r\n\r\n <!-- form thu 2 -->\r\n <mat-checkbox\r\n qms-group-options\r\n [disabled]=\"node.disabled\"\r\n color=\"default\"\r\n *ngIf=\"node.name && showCheckBox && onlyCheckBoxForChild && !onlyFolder\"\r\n class=\"ml-10 checklist-leaf-node\"\r\n [checked]=\"checklistSelection.isSelected(node)\"\r\n (change)=\"todoItemSelectionToggle(node)\"\r\n ></mat-checkbox>\r\n <div\r\n class=\"expand-node\"\r\n *ngIf=\"node.name && !onlyFolder\"\r\n [class.bgSelected]=\"\r\n treeConfig.selectOne &&\r\n idCheckIcon == idToCheckSelectOne(node.id, node.parentId)\r\n \"\r\n (click)=\"selectNode(node)\"\r\n [id]=\"getNodeId(node)\"\r\n >\r\n <div class=\"expand-node__text\">\r\n <mat-icon\r\n *ngIf=\"displayType === itemIconType.name && !onlyCheckBoxForChild\"\r\n class=\"mat-icon-rtl-mirror material-icons-outlined\"\r\n >\r\n {{ itemIcon }}\r\n </mat-icon>\r\n\r\n <mat-icon\r\n *ngIf=\"displayType === itemIconType.svg\"\r\n class=\"mat-icon-rtl-mirror material-icons-outlined\"\r\n [svgIcon]=\"itemIconSvg\"\r\n >\r\n </mat-icon>\r\n\r\n <img\r\n *ngIf=\"displayType === itemIconType.path\"\r\n class=\"mat-icon\"\r\n [src]=\"itemIconPath\"\r\n />\r\n\r\n <img\r\n *ngIf=\"displayType === itemIconType.base64\"\r\n class=\"mat-icon image-base64\"\r\n [src]=\"getImagePath()\"\r\n />\r\n\r\n <mat-icon\r\n *ngIf=\"displayType === itemIconType.none\"\r\n class=\"mat-icon-rtl-mirror material-icons-outlined\"\r\n [svgIcon]=\"getItemIcon(node)\"\r\n ></mat-icon>\r\n <span\r\n class=\"text-node\"\r\n [class.select-one-checked]=\"\r\n treeConfig.selectOne &&\r\n idCheckIcon == idToCheckSelectOne(node.id, node.parentId)\r\n \"\r\n >{{ node.name }}</span\r\n >\r\n </div>\r\n <mat-icon\r\n class=\"select-one-checked\"\r\n *ngIf=\"\r\n treeConfig.selectOne &&\r\n idCheckIcon == idToCheckSelectOne(node.id, node.parentId)\r\n \"\r\n >done</mat-icon\r\n >\r\n </div>\r\n </mat-tree-node>\r\n\r\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding>\r\n <!-- form thu 1 - parent -->\r\n <mat-checkbox\r\n qms-group-options\r\n [disabled]=\"node.disabled\"\r\n color=\"default\"\r\n *ngIf=\"node.name && showCheckBox && !onlyCheckBoxForChild\"\r\n [checked]=\"descendantsAllSelected(node)\"\r\n [indeterminate]=\"descendantsPartiallySelected(node)\"\r\n (change)=\"todoItemSelectionToggle(node)\"\r\n ></mat-checkbox>\r\n <button\r\n class=\"button-boder\"\r\n mat-icon-button\r\n matTreeNodeToggle\r\n [disableRipple]=\"!node.hasChild\"\r\n [attr.aria-label]=\"'toggle ' + node.filename\"\r\n *ngIf=\"node.name\"\r\n >\r\n <mat-icon\r\n *ngIf=\"openIcon && closeIcon\"\r\n class=\"mat-icon-rtl-mirror\"\r\n [ngStyle]=\"{\r\n color: treeControl.isExpanded(node) ? openIconColor : closeIconColor\r\n }\"\r\n >{{ getNodeIcon(node) }}</mat-icon\r\n >\r\n <mat-icon\r\n *ngIf=\"!openIcon || !closeIcon\"\r\n class=\"mat-icon-rtl-mirror\"\r\n [ngClass]=\"{\r\n 'open-icon': treeControl.isExpanded(node),\r\n 'not-department-icon': moduleId !== dataType.document\r\n }\"\r\n [svgIcon]=\"getNodeIcon(node)\"\r\n >\r\n </mat-icon>\r\n </button>\r\n <span\r\n *ngIf=\"expandOnTitleClick\"\r\n matTreeNodeToggle\r\n class=\"text-node-parent\"\r\n style=\"cursor: pointer\"\r\n (click)=\"onExpandNode(node)\"\r\n [id]=\"getNodeId(node)\"\r\n [ngStyle]=\"{\r\n color: treeControl.isExpanded(node) ? openIconColor : '#000000'\r\n }\"\r\n >\r\n <span>{{ node.name }}</span>\r\n </span>\r\n <span\r\n *ngIf=\"!expandOnTitleClick\"\r\n class=\"text-node-parent\"\r\n (click)=\"selectFolderNode(node)\"\r\n style=\"cursor: pointer\"\r\n [id]=\"getNodeId(node)\"\r\n >\r\n <span\r\n [class.select-one-checked]=\"\r\n treeConfig.selectOne &&\r\n idCheckIcon == idToCheckSelectOne(node.id, node.parentId)\r\n \"\r\n >{{ node.name }}</span\r\n >\r\n <mat-icon\r\n class=\"select-one-checked\"\r\n *ngIf=\"\r\n treeConfig.selectOne &&\r\n idCheckIcon == idToCheckSelectOne(node.id, node.parentId)\r\n \"\r\n >done</mat-icon\r\n >\r\n </span>\r\n </mat-tree-node>\r\n</mat-tree>\r\n",
4895
+ template: "<mat-tree\r\n [dataSource]=\"dataSource\"\r\n [treeControl]=\"treeControl\"\r\n class=\"tree__container\"\r\n>\r\n <mat-tree-node\r\n class=\"tree-branch\"\r\n *matTreeNodeDef=\"let node\"\r\n matTreeNodeToggle\r\n matTreeNodePadding\r\n >\r\n <!-- form thu 1 - child -->\r\n <mat-checkbox\r\n qms-group-options\r\n [disabled]=\"node.disabled\"\r\n color=\"default\"\r\n *ngIf=\"node.name && showCheckBox && !onlyCheckBoxForChild && !onlyFolder\"\r\n class=\"checklist-leaf-node\"\r\n [checked]=\"checklistSelection.isSelected(node)\"\r\n (change)=\"todoItemSelectionToggle(node)\"\r\n >\r\n </mat-checkbox>\r\n\r\n <!-- form thu 2 -->\r\n <mat-checkbox\r\n qms-group-options\r\n [disabled]=\"node.disabled\"\r\n color=\"default\"\r\n *ngIf=\"node.name && showCheckBox && onlyCheckBoxForChild && !onlyFolder\"\r\n class=\"ml-10 checklist-leaf-node\"\r\n [checked]=\"checklistSelection.isSelected(node)\"\r\n (change)=\"todoItemSelectionToggle(node)\"\r\n ></mat-checkbox>\r\n <div\r\n class=\"expand-node\"\r\n *ngIf=\"node.name && !onlyFolder\"\r\n [class.bgSelected]=\"\r\n treeConfig.selectOne &&\r\n idCheckIcon == idToCheckSelectOne(node.id, node.parentId)\r\n \"\r\n (click)=\"selectNode(node)\"\r\n [id]=\"getNodeId(node)\"\r\n >\r\n <div class=\"expand-node__text\">\r\n <mat-icon\r\n *ngIf=\"displayType === itemIconType.name\"\r\n class=\"mat-icon-rtl-mirror material-icons-outlined\"\r\n >\r\n {{ itemIcon }}\r\n </mat-icon>\r\n\r\n <mat-icon\r\n *ngIf=\"displayType === itemIconType.svg\"\r\n class=\"mat-icon-rtl-mirror material-icons-outlined\"\r\n [svgIcon]=\"itemIconSvg\"\r\n >\r\n </mat-icon>\r\n\r\n <img\r\n *ngIf=\"displayType === itemIconType.path\"\r\n class=\"mat-icon\"\r\n [src]=\"itemIconPath\"\r\n />\r\n\r\n <img\r\n *ngIf=\"displayType === itemIconType.base64\"\r\n class=\"mat-icon image-base64\"\r\n [src]=\"getImagePath()\"\r\n />\r\n\r\n <mat-icon\r\n *ngIf=\"displayType === itemIconType.none\"\r\n class=\"mat-icon-rtl-mirror material-icons-outlined\"\r\n [svgIcon]=\"getItemIcon(node)\"\r\n ></mat-icon>\r\n <span\r\n class=\"text-node\"\r\n [class.select-one-checked]=\"\r\n treeConfig.selectOne &&\r\n idCheckIcon == idToCheckSelectOne(node.id, node.parentId)\r\n \"\r\n >{{ node.name }}</span\r\n >\r\n </div>\r\n <mat-icon\r\n class=\"select-one-checked\"\r\n *ngIf=\"\r\n treeConfig.selectOne &&\r\n idCheckIcon == idToCheckSelectOne(node.id, node.parentId)\r\n \"\r\n >done</mat-icon\r\n >\r\n </div>\r\n </mat-tree-node>\r\n\r\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding>\r\n <!-- form thu 1 - parent -->\r\n <mat-checkbox\r\n qms-group-options\r\n [disabled]=\"node.disabled\"\r\n color=\"default\"\r\n *ngIf=\"node.name && showCheckBox && !onlyCheckBoxForChild\"\r\n [checked]=\"descendantsAllSelected(node)\"\r\n [indeterminate]=\"descendantsPartiallySelected(node)\"\r\n (change)=\"todoItemSelectionToggle(node)\"\r\n ></mat-checkbox>\r\n <button\r\n class=\"button-boder\"\r\n mat-icon-button\r\n matTreeNodeToggle\r\n [disableRipple]=\"!node.hasChild\"\r\n [attr.aria-label]=\"'toggle ' + node.filename\"\r\n *ngIf=\"node.name\"\r\n >\r\n <mat-icon\r\n *ngIf=\"openIcon && closeIcon\"\r\n class=\"mat-icon-rtl-mirror\"\r\n [ngStyle]=\"{\r\n color: treeControl.isExpanded(node) ? openIconColor : closeIconColor\r\n }\"\r\n >{{ getNodeIcon(node) }}</mat-icon\r\n >\r\n <mat-icon\r\n *ngIf=\"!openIcon || !closeIcon\"\r\n class=\"mat-icon-rtl-mirror\"\r\n [ngClass]=\"{\r\n 'open-icon': treeControl.isExpanded(node),\r\n 'not-department-icon': moduleId !== dataType.document\r\n }\"\r\n [svgIcon]=\"getNodeIcon(node)\"\r\n >\r\n </mat-icon>\r\n </button>\r\n <span\r\n *ngIf=\"expandOnTitleClick\"\r\n matTreeNodeToggle\r\n class=\"text-node-parent\"\r\n style=\"cursor: pointer\"\r\n (click)=\"onExpandNode(node)\"\r\n [id]=\"getNodeId(node)\"\r\n [ngStyle]=\"{\r\n color: treeControl.isExpanded(node) ? openIconColor : '#000000'\r\n }\"\r\n >\r\n <span>{{ node.name }}</span>\r\n </span>\r\n <span\r\n *ngIf=\"!expandOnTitleClick\"\r\n class=\"text-node-parent\"\r\n (click)=\"selectFolderNode(node)\"\r\n style=\"cursor: pointer\"\r\n [id]=\"getNodeId(node)\"\r\n >\r\n <span\r\n [class.select-one-checked]=\"\r\n treeConfig.selectOne &&\r\n idCheckIcon == idToCheckSelectOne(node.id, node.parentId)\r\n \"\r\n >{{ node.name }}</span\r\n >\r\n <mat-icon\r\n class=\"select-one-checked\"\r\n *ngIf=\"\r\n treeConfig.selectOne &&\r\n idCheckIcon == idToCheckSelectOne(node.id, node.parentId)\r\n \"\r\n >done</mat-icon\r\n >\r\n </span>\r\n </mat-tree-node>\r\n</mat-tree>\r\n",
4896
4896
  encapsulation: ViewEncapsulation.None,
4897
4897
  styles: ["@font-face{font-family:Open Sans;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/opensans/v20/mem8YaGs126MiZpBA-UFWJ0bbck.woff2) format(\"woff2\");unicode-range:U+0460-052f,U+1c80-1c88,U+20b4,U+2de0-2dff,U+a640-a69f,U+fe2e-fe2f}@font-face{font-family:Open Sans;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/opensans/v20/mem8YaGs126MiZpBA-UFUZ0bbck.woff2) format(\"woff2\");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-family:Open Sans;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/opensans/v20/mem8YaGs126MiZpBA-UFWZ0bbck.woff2) format(\"woff2\");unicode-range:U+1f??}@font-face{font-family:Open Sans;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/opensans/v20/mem8YaGs126MiZpBA-UFVp0bbck.woff2) format(\"woff2\");unicode-range:U+0370-03ff}@font-face{font-family:Open Sans;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/opensans/v20/mem8YaGs126MiZpBA-UFWp0bbck.woff2) format(\"woff2\");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01a0-01a1,U+01af-01b0,U+1ea0-1ef9,U+20ab}@font-face{font-family:Open Sans;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/opensans/v20/mem8YaGs126MiZpBA-UFW50bbck.woff2) format(\"woff2\");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-family:Open Sans;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/opensans/v20/mem8YaGs126MiZpBA-UFVZ0b.woff2) format(\"woff2\");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-family:Raleway;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/raleway/v19/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCFPrEHJA.woff2) format(\"woff2\");unicode-range:U+0460-052f,U+1c80-1c88,U+20b4,U+2de0-2dff,U+a640-a69f,U+fe2e-fe2f}@font-face{font-family:Raleway;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/raleway/v19/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCMPrEHJA.woff2) format(\"woff2\");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-family:Raleway;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/raleway/v19/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCHPrEHJA.woff2) format(\"woff2\");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01a0-01a1,U+01af-01b0,U+1ea0-1ef9,U+20ab}@font-face{font-family:Raleway;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/raleway/v19/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCGPrEHJA.woff2) format(\"woff2\");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-family:Raleway;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/raleway/v19/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCIPrE.woff2) format(\"woff2\");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}.tree__container{font-family:Open Sans;font-style:normal;font-weight:400;font-size:.875rem;line-height:19px;color:#323232}.tree__container .mat-tree-node{color:#000;min-height:0}.tree__container .mat-tree-node .mat-checkbox.qms-group-options{padding:0}.tree__container .mat-tree-node .mat-checkbox.qms-group-options .mat-checkbox-inner-container{margin-right:11px}.tree__container .button{margin-left:6px}.tree__container .button:focus,.tree__container .button:hover{background-color:#009ef2;border-radius:2px;width:auto}.tree__container .button-boder:focus,.tree__container .button:focus{outline:0}.tree__container .button-folder-boder:focus{outline:0}.tree__container .button-folder-boder:focus,.tree__container .button-folder-boder:hover{background-color:#009ef2;border-radius:2px;width:auto}.tree__container .expand-node{margin-left:8px;min-height:32px;justify-content:space-between;width:100%}.tree__container .expand-node,.tree__container .expand-node .expand-node__text{display:flex;align-items:center}.tree__container .expand-node .mat-icon{color:rgba(0,0,0,.6);margin-right:17px;min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}.tree__container .expand-node .mat-icon svg{display:block;min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}.tree__container .expand-node.bgSelected .select-one-checked{color:#1954a9}.tree__container .text-node-parent{width:100%;display:flex;align-items:center;justify-content:space-between;margin-left:10px;cursor:pointer}.tree__container .text-node-parent.active-item{color:#1954a9!important}.tree__container .text-node-parent .select-one-checked{color:#1954a9}.tree__container .mr-11{margin-right:11px}.tree__container .ml-10{margin-left:10px}.tree__container .tree-branch:hover{background-color:#e5eefb}.tree__container .image-base64{width:20px;height:20px}.tree__container .mat-checkbox.qms-group-options.mat-checkbox-checked{background:transparent!important}::ng-deep .mat-tree .mat-checkbox.qms-group-options{padding:0}::ng-deep .mat-tree .mat-checkbox.qms-group-options.mat-checkbox-checked{background-color:transparent}::ng-deep .mat-tree .mat-checkbox.qms-group-options .mat-checkbox-inner-container{margin-right:0}svg{display:block;min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}.open-icon.not-department-icon svg path,.open-icon svg path:first-child{fill:#1954a9}.mat-checkbox.mat-checkbox-disabled.qms-group-options.mat-checkbox-checked .mat-checkbox-background{background-color:#e0e0e0!important}"]
4898
4898
  },] }
@@ -5495,130 +5495,156 @@ class RelatedPopupComponent {
5495
5495
  let position = -1;
5496
5496
  let node;
5497
5497
  let typeId;
5498
- if (item.itemType === this.dataType.document) {
5499
- // document
5500
- const isExistInDisabled = this.disabledList2.findIndex(x => {
5501
- return x.id && x.id.toLowerCase() === item.id.toLowerCase() && x.parentId.toLowerCase() === item.parentId.toLowerCase();
5502
- });
5503
- if (isExistInDisabled >= 0) {
5504
- return;
5505
- }
5506
- position = this.treeData2.findIndex(x => {
5507
- return x.childId === item.id && x.rootId.toLowerCase() === item.parentId.toLowerCase();
5508
- });
5509
- if (position >= 0) {
5510
- node = this.treeData2[position];
5511
- typeId = this.dataType.document;
5512
- const treeNode = {
5513
- id: node.childId,
5514
- name: node.childName,
5515
- children: [],
5516
- parentId: node.rootId
5517
- };
5518
- this.dataTrees.toArray()[1].todoItemSelectionProcessDocument([treeNode]);
5519
- }
5520
- else {
5521
- let newNodeDocs = new TreeModel();
5522
- newNodeDocs.rootId = (_c = item.breadcumbs[item.breadcumbs.length - 1]) === null || _c === void 0 ? void 0 : _c['id'];
5523
- newNodeDocs.rootName = (_d = item.breadcumbs[item.breadcumbs.length - 1]) === null || _d === void 0 ? void 0 : _d['name'];
5524
- newNodeDocs.parentId = '';
5525
- newNodeDocs.subName = null;
5526
- newNodeDocs.childId = item.id;
5527
- newNodeDocs.childName = item.itemName;
5528
- newNodeDocs.statusId = item === null || item === void 0 ? void 0 : item['itemStatus'];
5529
- newNodeDocs.statusName = item === null || item === void 0 ? void 0 : item['statusName'];
5530
- newNodeDocs.displayId = +item.itemNumberId;
5531
- this.treeData2 = [...this.treeData2, newNodeDocs];
5532
- let newSelectedDocs = new TreeFlatNode();
5533
- newSelectedDocs.disabled = false;
5534
- newSelectedDocs.expandable = false;
5535
- newSelectedDocs.hasChild = false;
5536
- newSelectedDocs.id = item.id;
5537
- newSelectedDocs.level = 0;
5538
- newSelectedDocs.levelType = undefined;
5539
- newSelectedDocs.name = item.itemName;
5540
- newSelectedDocs.parentId = (_e = item.breadcumbs[item.breadcumbs.length - 1]) === null || _e === void 0 ? void 0 : _e['id'];
5541
- this.selectedData2 = [];
5542
- this.selectedData = [];
5543
- let selectProcess = [];
5544
- let selectDocument = [];
5545
- if (this.checkedNodeList.length) {
5546
- this.checkedNodeList.forEach(x => {
5547
- if (x.itemType === DataType$2.area || x.itemType === DataType$2.process) {
5548
- this.treeData1.forEach(item => {
5549
- if (item.childId && x.id === item.childId || !item.childId && (x.id === item.rootId)) {
5550
- selectProcess.push({
5551
- disabled: false,
5552
- expandable: x.itemType == DataType$2.area ? true : false,
5553
- hasChild: x.itemType == DataType$2.area ? true : false,
5554
- id: x.id,
5555
- level: 0,
5556
- levelType: undefined,
5557
- name: x.itemName,
5558
- parentId: x.parentId
5559
- });
5560
- }
5561
- });
5562
- }
5563
- else {
5564
- this.treeData2.forEach(item => {
5565
- if (item.childId && x.id === item.childId || !item.childId && (x.id === item.rootId)) {
5566
- selectDocument.push({
5567
- disabled: false,
5568
- expandable: x.itemType == DataType$2.folder ? true : false,
5569
- hasChild: x.itemType == DataType$2.folder ? true : false,
5570
- id: x.id,
5571
- level: 0,
5572
- levelType: undefined,
5573
- name: x.itemName,
5574
- parentId: x.parentId
5575
- });
5576
- }
5577
- });
5578
- }
5579
- });
5498
+ switch (item.itemType) {
5499
+ case this.dataType.document:
5500
+ // document
5501
+ const isExistInDisabled = this.disabledList2.findIndex(x => {
5502
+ return x.id && x.id.toLowerCase() === item.id.toLowerCase() && x.parentId.toLowerCase() === item.parentId.toLowerCase();
5503
+ });
5504
+ if (isExistInDisabled >= 0) {
5505
+ return;
5580
5506
  }
5581
- this.selectedData = [...this.selectedData, ...selectProcess];
5582
- this.selectedData2 = [...this.selectedData2, ...selectDocument, newSelectedDocs];
5583
- setTimeout(() => {
5507
+ position = this.treeData2.findIndex(x => {
5508
+ return x.childId === item.id && x.rootId.toLowerCase() === item.parentId.toLowerCase();
5509
+ });
5510
+ if (position >= 0) {
5511
+ node = this.treeData2[position];
5512
+ typeId = this.dataType.document;
5584
5513
  const treeNode = {
5585
- id: newNodeDocs.childId,
5586
- name: newNodeDocs.childName,
5514
+ id: node.childId,
5515
+ name: node.childName,
5587
5516
  children: [],
5588
- parentId: newNodeDocs.rootId
5517
+ parentId: node.rootId
5589
5518
  };
5590
5519
  this.dataTrees.toArray()[1].todoItemSelectionProcessDocument([treeNode]);
5591
- }, 500);
5592
- }
5593
- }
5594
- else if (item.itemType === this.dataType.folder) {
5595
- position = this.treeData2.findIndex(x => {
5596
- return x.rootId === item.id && x.parentId === item.parentId;
5597
- });
5598
- typeId = item.itemType;
5599
- if (position >= 0) {
5600
- node = this.treeData2[position];
5601
- if (this.treeConfig2.showCheckBox) {
5602
- this.checkedNodeList.push({
5603
- moduleId: this.moduleId,
5604
- id: item.id,
5605
- itemName: item.itemName,
5606
- itemType: typeId,
5607
- itemNumberId: item.itemNumberId,
5608
- levelType: item.levelType,
5609
- parentId: item.parentId,
5610
- parentName: item.parentName
5611
- });
5612
5520
  }
5613
5521
  else {
5614
- this.selectedNode.push({
5615
- moduleId: this.moduleId,
5522
+ let newNodeDocs = {
5523
+ rootId: (_c = item.breadcumbs[item.breadcumbs.length - 1]) === null || _c === void 0 ? void 0 : _c['id'],
5524
+ rootName: (_d = item.breadcumbs[item.breadcumbs.length - 1]) === null || _d === void 0 ? void 0 : _d['name'],
5525
+ parentId: '',
5526
+ subName: null,
5527
+ childId: item.id,
5528
+ childName: item.itemName,
5529
+ statusId: item === null || item === void 0 ? void 0 : item['itemStatus'],
5530
+ statusName: item === null || item === void 0 ? void 0 : item['statusName'],
5531
+ displayId: +item.itemNumberId,
5532
+ };
5533
+ this.treeData2 = [...this.treeData2, newNodeDocs];
5534
+ let newSelectedDocs = {
5535
+ disabled: false,
5536
+ expandable: false,
5537
+ hasChild: false,
5616
5538
  id: item.id,
5617
- itemName: item.itemName,
5618
- itemType: typeId,
5619
- itemNumberId: item.itemNumberId,
5620
- levelType: item.levelType
5621
- });
5539
+ level: 0,
5540
+ levelType: undefined,
5541
+ name: item.itemName,
5542
+ parentId: (_e = item.breadcumbs[item.breadcumbs.length - 1]) === null || _e === void 0 ? void 0 : _e['id']
5543
+ };
5544
+ this.selectedData2 = [];
5545
+ this.selectedData = [];
5546
+ let selectProcess = [];
5547
+ let selectDocument = [];
5548
+ if (this.checkedNodeList.length) {
5549
+ this.checkedNodeList.forEach(x => {
5550
+ if (x.itemType === DataType$2.document || x.itemType === DataType$2.folder) {
5551
+ this.treeData2.forEach(item => {
5552
+ if (item.childId && x.id === item.childId || !item.childId && (x.id === item.rootId)) {
5553
+ selectDocument.push({
5554
+ disabled: false,
5555
+ expandable: x.itemType == DataType$2.folder ? true : false,
5556
+ hasChild: x.itemType == DataType$2.folder ? true : false,
5557
+ id: x.id,
5558
+ level: 0,
5559
+ levelType: undefined,
5560
+ name: x.itemName,
5561
+ parentId: x.parentId
5562
+ });
5563
+ }
5564
+ });
5565
+ }
5566
+ });
5567
+ }
5568
+ this.selectedData = [...this.selectedData, ...selectProcess];
5569
+ this.selectedData2 = [...this.selectedData2, ...selectDocument, newSelectedDocs];
5570
+ setTimeout(() => {
5571
+ const treeNode = {
5572
+ id: newNodeDocs.childId,
5573
+ name: newNodeDocs.childName,
5574
+ children: [],
5575
+ parentId: newNodeDocs.rootId
5576
+ };
5577
+ this.dataTrees.toArray()[1].todoItemSelectionProcessDocument([treeNode]);
5578
+ }, 500);
5579
+ }
5580
+ break;
5581
+ case this.dataType.folder:
5582
+ position = this.treeData2.findIndex(x => {
5583
+ return x.rootId === item.id && x.parentId === item.parentId;
5584
+ });
5585
+ typeId = item.itemType;
5586
+ if (position >= 0) {
5587
+ node = this.treeData2[position];
5588
+ if (this.treeConfig2.showCheckBox) {
5589
+ this.checkedNodeList.push({
5590
+ moduleId: this.moduleId,
5591
+ id: item.id,
5592
+ itemName: item.itemName,
5593
+ itemType: typeId,
5594
+ itemNumberId: item.itemNumberId,
5595
+ levelType: item.levelType,
5596
+ parentId: item.parentId,
5597
+ parentName: item.parentName
5598
+ });
5599
+ }
5600
+ else {
5601
+ this.selectedNode.push({
5602
+ moduleId: this.moduleId,
5603
+ id: item.id,
5604
+ itemName: item.itemName,
5605
+ itemType: typeId,
5606
+ itemNumberId: item.itemNumberId,
5607
+ levelType: item.levelType
5608
+ });
5609
+ }
5610
+ const treeNode = {
5611
+ id: node.rootId,
5612
+ name: !!node.rootId ? node.subName : node.rootName,
5613
+ children: [],
5614
+ parentId: node.parentId
5615
+ };
5616
+ this.dataTrees.toArray()[1].todoFolderSelection([treeNode]);
5617
+ }
5618
+ break;
5619
+ case this.dataType.area:
5620
+ position = this.treeData1.findIndex(x => {
5621
+ return x.rootId.toLowerCase() === item.id.toLowerCase() && x.parentId.toLowerCase() === item.parentId.toLowerCase();
5622
+ });
5623
+ typeId = item.itemType;
5624
+ if (position >= 0) {
5625
+ node = this.treeData1[position];
5626
+ if (this.treeConfig1.showCheckBox) {
5627
+ this.checkedNodeList.push({
5628
+ moduleId: this.moduleId,
5629
+ id: node.rootId,
5630
+ itemName: node.rootName,
5631
+ itemType: typeId,
5632
+ itemNumberId: item.itemNumberId,
5633
+ levelType: item.levelType,
5634
+ parentId: item.parentId,
5635
+ parentName: item.parentName
5636
+ });
5637
+ }
5638
+ else {
5639
+ this.selectedNode.push({
5640
+ moduleId: this.moduleId,
5641
+ id: node.rootId,
5642
+ itemName: node.rootName,
5643
+ itemType: typeId,
5644
+ itemNumberId: item.itemNumberId,
5645
+ levelType: item.levelType
5646
+ });
5647
+ }
5622
5648
  }
5623
5649
  const treeNode = {
5624
5650
  id: node.rootId,
@@ -5626,167 +5652,132 @@ class RelatedPopupComponent {
5626
5652
  children: [],
5627
5653
  parentId: node.parentId
5628
5654
  };
5629
- this.dataTrees.toArray()[1].todoFolderSelection([treeNode]);
5630
- }
5631
- return;
5632
- }
5633
- else if ((item.itemType === this.dataType.deviationType
5634
- || item.itemType === this.dataType.checklistCategory
5635
- || item.itemType === this.dataType.riskFolder) && !this.canOnlySelectItem) {
5636
- position = this.treeData1.findIndex(x => {
5637
- return x.rootId.toLowerCase() === item.id.toLowerCase() && x.parentId.toLowerCase() === item.parentId.toLowerCase();
5638
- });
5639
- this.selectNodeRecursive(this.treeData1[position], item.itemType);
5640
- }
5641
- else if (item.itemType === this.dataType.area) {
5642
- position = this.treeData1.findIndex(x => {
5643
- return x.rootId.toLowerCase() === item.id.toLowerCase() && x.parentId.toLowerCase() === item.parentId.toLowerCase();
5644
- });
5645
- typeId = item.itemType;
5646
- if (position >= 0) {
5647
- node = this.treeData1[position];
5648
- if (this.treeConfig1.showCheckBox) {
5649
- this.checkedNodeList.push({
5650
- moduleId: this.moduleId,
5651
- id: node.rootId,
5652
- itemName: node.rootName,
5653
- itemType: typeId,
5654
- itemNumberId: item.itemNumberId,
5655
- levelType: item.levelType,
5656
- parentId: item.parentId,
5657
- parentName: item.parentName
5658
- });
5655
+ this.dataTrees.toArray()[0].todoFolderSelection([treeNode]);
5656
+ break;
5657
+ case this.dataType.process:
5658
+ const isExistInProcessDisabled = this.disabledList.findIndex(x => {
5659
+ return x.id && x.id.toLowerCase() === item.id.toLowerCase() && x.parentId.toLowerCase() === item.parentId.toLowerCase();
5660
+ });
5661
+ if (isExistInProcessDisabled >= 0) {
5662
+ return;
5659
5663
  }
5660
- else {
5661
- this.selectedNode.push({
5662
- moduleId: this.moduleId,
5663
- id: node.rootId,
5664
- itemName: node.rootName,
5665
- itemType: typeId,
5666
- itemNumberId: item.itemNumberId,
5667
- levelType: item.levelType
5668
- });
5664
+ position = this.treeData1.findIndex(x => {
5665
+ return x.childId && x.childId.toLowerCase() === item.id.toLowerCase() && x.rootId.toLowerCase() === item.parentId.toLowerCase();
5666
+ });
5667
+ if (position >= 0) {
5668
+ node = this.treeData1[position];
5669
+ typeId = this.itemType;
5670
+ const treeNode = {
5671
+ id: node.childId,
5672
+ name: node.childName,
5673
+ children: [],
5674
+ parentId: node.rootId
5675
+ };
5676
+ this.dataTrees.toArray()[0].todoItemSelectionProcessDocument([treeNode]);
5669
5677
  }
5670
- }
5671
- const treeNode = {
5672
- id: node.rootId,
5673
- name: !!node.rootId ? node.subName : node.rootName,
5674
- children: [],
5675
- parentId: node.parentId
5676
- };
5677
- this.dataTrees.toArray()[0].todoFolderSelection([treeNode]);
5678
- return;
5679
- }
5680
- else if (item.itemType === this.dataType.deviation ||
5681
- item.itemType === this.dataType.checklist) {
5682
- position = this.treeData1.findIndex(x => {
5683
- return x.childId && x.childId.toLowerCase() === item.id.toLowerCase() && x.rootId.toLowerCase() === item.parentId.toLowerCase();
5684
- });
5685
- if (position >= 0) {
5686
- node = this.treeData1[position];
5687
- typeId = this.itemType;
5688
- const treeNode = {
5689
- id: node.childId,
5690
- name: node.childName,
5691
- children: [],
5692
- parentId: node.rootId
5693
- };
5694
- this.dataTrees.toArray()[0].todoItemSelection([treeNode]);
5695
- }
5696
- }
5697
- else {
5698
- const isExistInDisabled = this.disabledList.findIndex(x => {
5699
- return x.id && x.id.toLowerCase() === item.id.toLowerCase() && x.parentId.toLowerCase() === item.parentId.toLowerCase();
5700
- });
5701
- if (isExistInDisabled >= 0) {
5702
- return;
5703
- }
5704
- position = this.treeData1.findIndex(x => {
5705
- return x.childId && x.childId.toLowerCase() === item.id.toLowerCase() && x.rootId.toLowerCase() === item.parentId.toLowerCase();
5706
- });
5707
- if (position >= 0) {
5708
- node = this.treeData1[position];
5709
- typeId = this.itemType;
5710
- const treeNode = {
5711
- id: node.childId,
5712
- name: node.childName,
5713
- children: [],
5714
- parentId: node.rootId
5715
- };
5716
- this.dataTrees.toArray()[0].todoItemSelectionProcessDocument([treeNode]);
5717
- }
5718
- else {
5719
- let newNodeProcess = new TreeModel();
5720
- newNodeProcess.rootId = (_f = item.breadcumbs[item.breadcumbs.length - 1]) === null || _f === void 0 ? void 0 : _f['id'];
5721
- newNodeProcess.rootName = (_g = item.breadcumbs[item.breadcumbs.length - 1]) === null || _g === void 0 ? void 0 : _g['name'];
5722
- newNodeProcess.parentId = '';
5723
- newNodeProcess.subName = null;
5724
- newNodeProcess.childId = item.id;
5725
- newNodeProcess.childName = item.itemName;
5726
- newNodeProcess.statusId = item === null || item === void 0 ? void 0 : item['itemStatus'];
5727
- newNodeProcess.displayId = +item.itemNumberId;
5728
- this.treeData1 = [...this.treeData1, newNodeProcess];
5729
- let newSelectedProcess = new TreeFlatNode();
5730
- newSelectedProcess.disabled = false;
5731
- newSelectedProcess.expandable = false;
5732
- newSelectedProcess.hasChild = false;
5733
- newSelectedProcess.id = item.id;
5734
- newSelectedProcess.level = 0;
5735
- newSelectedProcess.levelType = undefined;
5736
- newSelectedProcess.name = item.itemName;
5737
- newSelectedProcess.parentId = (_h = item.breadcumbs[item.breadcumbs.length - 1]) === null || _h === void 0 ? void 0 : _h['id'];
5738
- this.selectedData = [];
5739
- this.selectedData2 = [];
5740
- let selectProcess = [];
5741
- let selectDocument = [];
5742
- if (this.checkedNodeList.length) {
5743
- this.checkedNodeList.forEach(x => {
5744
- if (x.itemType === DataType$2.area || x.itemType === DataType$2.process) {
5745
- this.treeData1.forEach(item => {
5746
- if (item.childId && x.id === item.childId || !item.childId && (x.id === item.rootId)) {
5747
- selectProcess.push({
5748
- disabled: false,
5749
- expandable: x.itemType == DataType$2.area ? true : false,
5750
- hasChild: x.itemType == DataType$2.area ? true : false,
5751
- id: x.id,
5752
- level: 0,
5753
- levelType: undefined,
5754
- name: x.itemName,
5755
- parentId: x.parentId
5756
- });
5757
- }
5758
- });
5759
- }
5760
- else {
5761
- this.treeData2.forEach(item => {
5762
- if (item.childId && x.id === item.childId || !item.childId && (x.id === item.rootId)) {
5763
- selectDocument.push({
5764
- disabled: false,
5765
- expandable: x.itemType == DataType$2.folder ? true : false,
5766
- hasChild: x.itemType == DataType$2.folder ? true : false,
5767
- id: x.id,
5768
- level: 0,
5769
- levelType: undefined,
5770
- name: x.itemName,
5771
- parentId: x.parentId
5772
- });
5773
- }
5774
- });
5775
- }
5776
- });
5678
+ else {
5679
+ let newNodeProcess = {
5680
+ rootId: (_f = item.breadcumbs[item.breadcumbs.length - 1]) === null || _f === void 0 ? void 0 : _f['id'],
5681
+ rootName: (_g = item.breadcumbs[item.breadcumbs.length - 1]) === null || _g === void 0 ? void 0 : _g['name'],
5682
+ parentId: '',
5683
+ subName: null,
5684
+ childId: item.id,
5685
+ childName: item.itemName,
5686
+ statusId: item === null || item === void 0 ? void 0 : item['itemStatus'],
5687
+ statusName: item === null || item === void 0 ? void 0 : item['statusName'],
5688
+ displayId: +item.itemNumberId,
5689
+ };
5690
+ this.treeData1 = [...this.treeData1, newNodeProcess];
5691
+ let newSelectedProcess = {
5692
+ disabled: false,
5693
+ expandable: false,
5694
+ hasChild: false,
5695
+ id: item.id,
5696
+ level: 0,
5697
+ levelType: undefined,
5698
+ name: item.itemName,
5699
+ parentId: (_h = item.breadcumbs[item.breadcumbs.length - 1]) === null || _h === void 0 ? void 0 : _h['id']
5700
+ };
5701
+ this.selectedData = [];
5702
+ this.selectedData2 = [];
5703
+ let selectProcess = [];
5704
+ let selectDocument = [];
5705
+ if (this.checkedNodeList.length) {
5706
+ this.checkedNodeList.forEach(x => {
5707
+ if (x.itemType === DataType$2.area || x.itemType === DataType$2.process) {
5708
+ this.treeData1.forEach(item => {
5709
+ if (item.childId && x.id === item.childId || !item.childId && (x.id === item.rootId)) {
5710
+ selectProcess.push({
5711
+ disabled: false,
5712
+ expandable: x.itemType == DataType$2.area ? true : false,
5713
+ hasChild: x.itemType == DataType$2.area ? true : false,
5714
+ id: x.id,
5715
+ level: 0,
5716
+ levelType: undefined,
5717
+ name: x.itemName,
5718
+ parentId: x.parentId
5719
+ });
5720
+ }
5721
+ });
5722
+ }
5723
+ else {
5724
+ this.treeData2.forEach(item => {
5725
+ if (item.childId && x.id === item.childId || !item.childId && (x.id === item.rootId)) {
5726
+ selectDocument.push({
5727
+ disabled: false,
5728
+ expandable: x.itemType == DataType$2.folder ? true : false,
5729
+ hasChild: x.itemType == DataType$2.folder ? true : false,
5730
+ id: x.id,
5731
+ level: 0,
5732
+ levelType: undefined,
5733
+ name: x.itemName,
5734
+ parentId: x.parentId
5735
+ });
5736
+ }
5737
+ });
5738
+ }
5739
+ });
5740
+ }
5741
+ this.selectedData = [...this.selectedData, ...selectProcess, newSelectedProcess];
5742
+ this.selectedData2 = [...this.selectedData2, ...selectDocument];
5743
+ setTimeout(() => {
5744
+ const treeNode = {
5745
+ id: newNodeProcess.childId,
5746
+ name: newNodeProcess.childName,
5747
+ children: [],
5748
+ parentId: newNodeProcess.rootId
5749
+ };
5750
+ this.dataTrees.toArray()[0].todoItemSelectionProcessDocument([treeNode]);
5751
+ }, 500);
5777
5752
  }
5778
- this.selectedData = [...this.selectedData, ...selectProcess, newSelectedProcess];
5779
- this.selectedData2 = [...this.selectedData2, ...selectDocument];
5780
- setTimeout(() => {
5753
+ break;
5754
+ case this.dataType.deviationType:
5755
+ case this.dataType.checklistCategory:
5756
+ case this.dataType.riskFolder:
5757
+ position = this.treeData1.findIndex(x => {
5758
+ return x.rootId.toLowerCase() === item.id.toLowerCase() && x.parentId.toLowerCase() === (item.parentId ? item.parentId.toLowerCase() : '');
5759
+ });
5760
+ this.selectNodeRecursive(this.treeData1[position], item.itemType);
5761
+ break;
5762
+ case this.dataType.deviation:
5763
+ case this.dataType.checklist:
5764
+ position = this.treeData1.findIndex(x => {
5765
+ return x.childId && x.childId.toLowerCase() === item.id.toLowerCase() && x.rootId.toLowerCase() === item.parentId.toLowerCase();
5766
+ });
5767
+ if (position >= 0) {
5768
+ node = this.treeData1[position];
5769
+ typeId = this.itemType;
5781
5770
  const treeNode = {
5782
- id: newNodeProcess.childId,
5783
- name: newNodeProcess.childName,
5771
+ id: node.childId,
5772
+ name: node.childName,
5784
5773
  children: [],
5785
- parentId: newNodeProcess.rootId
5774
+ parentId: node.rootId
5786
5775
  };
5787
- this.dataTrees.toArray()[0].todoItemSelectionProcessDocument([treeNode]);
5788
- }, 500);
5789
- }
5776
+ this.dataTrees.toArray()[0].todoItemSelection([treeNode]);
5777
+ }
5778
+ break;
5779
+ default:
5780
+ return;
5790
5781
  }
5791
5782
  }
5792
5783
  }
@@ -5918,6 +5909,18 @@ class RelatedPopupComponent {
5918
5909
  this.checkedNodeList = this.checkedNodeList.slice(this.maxSelectItemCount * -1);
5919
5910
  }
5920
5911
  }
5912
+ this.selectedData = this.checkedNodeList.map(item => {
5913
+ return {
5914
+ id: item.id,
5915
+ name: item.itemName,
5916
+ parentId: item.parentId,
5917
+ levelType: item.levelType,
5918
+ level: 0,
5919
+ expandable: true,
5920
+ hasChild: true,
5921
+ disabled: false
5922
+ };
5923
+ });
5921
5924
  }
5922
5925
  getDocumentCheckedNode(list) {
5923
5926
  this.checkedNodeList = [];
@@ -6248,36 +6251,26 @@ class RelatedPopupComponent {
6248
6251
  return this.getModuleFilteredOptions(moduleId).length > 0;
6249
6252
  }
6250
6253
  selectNodeTreeEvent(node) {
6251
- var _a, _b, _c, _d;
6252
- if (!node.itemType) {
6253
- return;
6254
+ const index = this.selectedData.findIndex(x => x.id.toLowerCase() === node.id.toLowerCase()
6255
+ && (!node.parentId || x.parentId.toLowerCase() === node.parentId.toLowerCase()) && x.expandable === node.expandable);
6256
+ if (index >= 0) {
6257
+ this.selectedData = this.selectedData.filter((x, ind) => ind !== index);
6254
6258
  }
6255
- let position = -1;
6256
- let parentName = '';
6257
- let itemNumberId = '';
6258
- if (node.itemType == DataType$2.folder || node.itemType == DataType$2.document) {
6259
- position = !node.expandable ? this.treeData2.findIndex(p => p.childId === node.id && p.rootId === node.parentId) :
6260
- this.treeData2.findIndex(p => p.rootId === node.id);
6261
- parentName = this.treeData2[position].parentId ? this.treeData2[position].subName : this.treeData2[position].rootName;
6262
- itemNumberId = (_b = (_a = this.treeData2[position]) === null || _a === void 0 ? void 0 : _a.displayId) === null || _b === void 0 ? void 0 : _b.toString();
6259
+ else {
6260
+ this.selectedData = [...this.selectedData, node];
6261
+ this.commonCheckedList = [...this.commonCheckedList, node];
6262
+ }
6263
+ }
6264
+ selectNodeTree2Event(node) {
6265
+ const index = this.selectedData2.findIndex(x => x.id.toLowerCase() === node.id.toLowerCase()
6266
+ && (!node.parentId || x.parentId.toLowerCase() === node.parentId.toLowerCase()) && x.expandable === node.expandable);
6267
+ if (index >= 0) {
6268
+ this.selectedData2 = this.selectedData2.filter((x, ind) => ind !== index);
6263
6269
  }
6264
6270
  else {
6265
- position = !node.expandable ? this.treeData1.findIndex(p => p.childId === node.id && p.rootId === node.parentId) :
6266
- this.treeData1.findIndex(p => p.rootId === node.id);
6267
- parentName = this.treeData1[position].parentId ? this.treeData1[position].subName : this.treeData1[position].rootName;
6268
- itemNumberId = (_d = (_c = this.treeData1[position]) === null || _c === void 0 ? void 0 : _c.displayId) === null || _d === void 0 ? void 0 : _d.toString();
6271
+ this.selectedData2 = [...this.selectedData2, node];
6272
+ this.documentCheckedList = [...this.documentCheckedList, node];
6269
6273
  }
6270
- this.checkedNodeList = [];
6271
- this.checkedNodeList.push({
6272
- moduleId: this.moduleId,
6273
- id: node.id,
6274
- itemName: node.name,
6275
- itemType: node.itemType,
6276
- parentId: node.parentId,
6277
- parentName: parentName,
6278
- itemNumberId: itemNumberId,
6279
- levelType: node.levelType
6280
- });
6281
6274
  }
6282
6275
  getChildNodeSelectOne(listChildren) {
6283
6276
  this.listChildrenSelectOne = [];
@@ -6285,7 +6278,7 @@ class RelatedPopupComponent {
6285
6278
  }
6286
6279
  hasSelected(related) {
6287
6280
  const arrDisabledList = this.disabledList.concat(this.disabledList2);
6288
- return arrDisabledList.some(node => node.id.toUpperCase() === related.id.toUpperCase());
6281
+ return arrDisabledList.some(node => node.id.toUpperCase() === related.id.toUpperCase() && (!related.parentId || related.parentId.toLowerCase() === node.parentId.toLowerCase()));
6289
6282
  }
6290
6283
  toRelatedOptions(relateds) {
6291
6284
  const results = [];
@@ -6304,7 +6297,7 @@ class RelatedPopupComponent {
6304
6297
  RelatedPopupComponent.decorators = [
6305
6298
  { type: Component, args: [{
6306
6299
  selector: 'qms-related-popup',
6307
- template: "<div id=\"qmslib_related_popup\" class=\"qmslib__related__popup__container\">\r\n <div id=\"qmslib_related_popup_header\">\r\n <span mat-icon-button class=\"button__close\" (click)=\"onCloseClick()\">\r\n <mat-icon mat-icon>close</mat-icon>\r\n </span>\r\n <div id=\"qmslib_related_popup_header_001\" mat-dialog-content>\r\n <span>{{ moduleName | uppercase }}</span>\r\n </div>\r\n </div>\r\n\r\n <div id=\"qmslib_related_popup_search\" class=\"input__field\">\r\n <input\r\n type=\"text\"\r\n placeholder=\"{{ LANG.SEARCH }}\"\r\n matInput\r\n [formControl]=\"myControl\"\r\n [matAutocomplete]=\"auto\"\r\n />\r\n <mat-icon>search</mat-icon>\r\n </div>\r\n\r\n <div class=\"line__divider\"></div>\r\n\r\n <mat-autocomplete\r\n #auto=\"matAutocomplete\"\r\n class=\"mat-autocomplete_related-viewport\"\r\n (optionSelected)=\"selectRelated($event.option.value)\"\r\n [displayWith]=\"displayWhenSelectRelatedOption\"\r\n >\r\n <cdk-virtual-scroll-viewport\r\n qms-scrollbar\r\n itemSize=\"10\"\r\n [class.related-viewport]=\"isInputValue\"\r\n *ngIf=\"filteredOptions.length\"\r\n >\r\n <ng-container *ngFor=\"let type of searchOrder\">\r\n <div\r\n class=\"search__module-result\"\r\n *ngIf=\"canShowSearchOption(type.value)\"\r\n >\r\n <span class=\"search__module-title\">{{ getTitle(type.value) }}</span>\r\n <mat-option\r\n class=\"search__option\"\r\n *ngFor=\"let option of getModuleFilteredOptions(type.value)\"\r\n [value]=\"option\"\r\n [disabled]=\"option.disabled\"\r\n >\r\n <qms-list-item type=\"image-square\">\r\n <mat-icon\r\n leading-icon\r\n type=\"image-square\"\r\n [svgIcon]=\"getNodeIcon(option)\"\r\n ></mat-icon>\r\n <div qms-list-header>\r\n <div\r\n qms-line\r\n type=\"caption\"\r\n qms-tool-tip=\"{{\r\n isEllipsisActive(searchItemResult) ? option.parentName : ''\r\n }}\"\r\n mode=\"dark\"\r\n *ngIf=\"getParentName(option)\"\r\n >\r\n <span #searchItemResult class=\"search__result__parent-name\">\r\n {{ option.parentName }}\r\n </span>\r\n </div>\r\n <div qms-line type=\"subtitle\" class=\"search__option-name\">\r\n {{ option.itemName }}\r\n </div>\r\n <div\r\n class=\"caption\"\r\n *ngIf=\"option.breadcumbs && option.breadcumbs.length\"\r\n >\r\n <qms-breadcrumb\r\n class=\"breadcrumb-containe\"\r\n type=\"table\"\r\n numDisplayItem=\"1\"\r\n [nodes]=\"option.breadcumbs\"\r\n >\r\n </qms-breadcrumb>\r\n </div>\r\n </div>\r\n <div qms-line color=\"default-subtitle\" *ngIf=\"getItemId(option)\">\r\n <span class=\"material-icons-outlined search__description-icon\">\r\n local_offer\r\n </span>\r\n {{ getItemId(option) }}\r\n </div>\r\n </qms-list-item>\r\n </mat-option>\r\n </div>\r\n </ng-container>\r\n </cdk-virtual-scroll-viewport>\r\n </mat-autocomplete>\r\n\r\n <div class=\"row\">\r\n <div\r\n class=\"qms-scrollbar qmslib_related_popup_content\"\r\n [ngClass]=\"{\r\n panel__content_item: checkedNodeList.length,\r\n panel__content: !checkedNodeList.length,\r\n 'col-6': splitView,\r\n 'col-12': !splitView\r\n }\"\r\n >\r\n <ng-container *ngIf=\"treeData1.length > 0\">\r\n <mat-expansion-panel\r\n hideToggle\r\n id=\"qmslib_related_popup_common_001\"\r\n [expanded]=\"isCommonExpanded\"\r\n (opened)=\"isCommonExpanded = true\"\r\n (closed)=\"isCommonExpanded = false\"\r\n class=\"panel-tree\"\r\n >\r\n <mat-expansion-panel-header class=\"padding-5\">\r\n <mat-panel-title *ngIf=\"moduleId === module.documentProcess\">\r\n {{ LANG.PROCESSES | uppercase }}\r\n </mat-panel-title>\r\n <mat-panel-title *ngIf=\"moduleId === module.deviation\">\r\n {{ LANG.DEVIATION | uppercase }}\r\n </mat-panel-title>\r\n <mat-panel-title *ngIf=\"moduleId === module.checklist\">\r\n {{ LANG.CHECKLIST | uppercase }}\r\n </mat-panel-title>\r\n <mat-panel-title *ngIf=\"moduleId === module.risk\">\r\n {{ LANG.ASSESSMENT | uppercase }}\r\n </mat-panel-title>\r\n <button qms-btn-icon class=\"related_popup_toggle-btn\">\r\n <mat-icon>\r\n {{\r\n isCommonExpanded ? \"keyboard_arrow_up\" : \"keyboard_arrow_down\"\r\n }}\r\n </mat-icon>\r\n </button>\r\n </mat-expansion-panel-header>\r\n <div id=\"qmslib_related_popup_common_002\">\r\n <qms-tree\r\n [treeData]=\"treeData1\"\r\n [treeConfig]=\"treeConfig1\"\r\n [selectedData]=\"selectedData\"\r\n [selectedRiskData]=\"selectedRiskData\"\r\n [disabledList]=\"disabledList\"\r\n (checkBoxEvent)=\"getCommonCheckedNode($event)\"\r\n (nodeExpandEvent)=\"getChildrenOfFolder($event, dataType.area)\"\r\n (selectNodeEvent)=\"selectNodeTreeEvent($event)\"\r\n (getChildNodeSelectOne)=\"getChildNodeSelectOne($event)\"\r\n [expandOnTitleClick]=\"!splitView\"\r\n [parentNodeOnClick]=\"parentNodeSelected\"\r\n (treeControlNodes)=\"selectTreeControlNodeProcess($event)\"\r\n ></qms-tree>\r\n </div>\r\n </mat-expansion-panel>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"treeData2.length > 0\">\r\n <div\r\n *ngIf=\"moduleId === module.documentProcess\"\r\n class=\"line__divider\"\r\n ></div>\r\n\r\n <mat-expansion-panel\r\n hideToggle\r\n *ngIf=\"moduleId === module.documentProcess\"\r\n id=\"qmslib_related_popup_document_001\"\r\n [expanded]=\"isDocumentExpanded\"\r\n (opened)=\"isDocumentExpanded = true\"\r\n (closed)=\"isDocumentExpanded = false\"\r\n class=\"panel-tree\"\r\n >\r\n <mat-expansion-panel-header class=\"padding-5\">\r\n <mat-panel-title>\r\n {{ LANG.DOCUMENTS | uppercase }}\r\n </mat-panel-title>\r\n <button qms-btn-icon class=\"related_popup_toggle-btn\">\r\n <mat-icon>\r\n {{\r\n isDocumentExpanded\r\n ? \"keyboard_arrow_up\"\r\n : \"keyboard_arrow_down\"\r\n }}\r\n </mat-icon>\r\n </button>\r\n </mat-expansion-panel-header>\r\n <div id=\"qmslib_related_popup_document_002\">\r\n <qms-tree\r\n [treeData]=\"treeData2\"\r\n [treeConfig]=\"treeConfig2\"\r\n [selectedData]=\"selectedData2\"\r\n [disabledList]=\"disabledList2\"\r\n (checkBoxEvent)=\"getDocumentCheckedNode($event)\"\r\n (nodeExpandEvent)=\"getChildrenOfFolder($event, dataType.folder)\"\r\n (selectNodeEvent)=\"selectNodeTreeEvent($event)\"\r\n (getChildNodeSelectOne)=\"getChildNodeSelectOne($event)\"\r\n [expandOnTitleClick]=\"!splitView\"\r\n [parentNodeOnClick]=\"parentNodeSelected\"\r\n (treeControlNodes)=\"selectTreeControlNodeDocument($event)\"\r\n ></qms-tree>\r\n </div>\r\n </mat-expansion-panel>\r\n </ng-container>\r\n </div>\r\n <div\r\n *ngIf=\"splitView\"\r\n class=\"\r\n qms-scrollbar\r\n qmslib-related-popup-splitview qmslib_related_popup_content\r\n col-6\r\n \"\r\n [ngClass]=\"{\r\n panel__content_item: checkedNodeList.length,\r\n panel__content: !checkedNodeList.length\r\n }\"\r\n >\r\n <div class=\"splitview-header\" *ngIf=\"selectedFolder\">\r\n {{ splitViewTitle }}\r\n </div>\r\n <div class=\"expand-node\" *ngFor=\"let node of itemInSplitview\">\r\n <mat-checkbox\r\n qms-group-options\r\n [disabled]=\"node.disabled\"\r\n color=\"default\"\r\n [checked]=\"isNodeSelected(node)\"\r\n (change)=\"toggleSelectItem(node)\"\r\n ></mat-checkbox>\r\n <mat-icon\r\n class=\"mat-icon-rtl-mirror material-icons-outlined\"\r\n [svgIcon]=\"getNodeIcon(node)\"\r\n ></mat-icon>\r\n <span class=\"text-node\">{{ node.itemName }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"checkedNodeList.length\" class=\"line__divider\"></div>\r\n\r\n <div *ngIf=\"checkedNodeList.length\" class=\"panel__item qms-scrollbar\">\r\n <div class=\"related__item__inline\" *ngFor=\"let item of checkedNodeList\">\r\n <button\r\n *ngIf=\"item.itemName\"\r\n mat-button\r\n class=\"related__item__content\"\r\n qms-tool-tip=\"{{\r\n isEllipsisActive(itemName) ? getItemChipName(item) : ''\r\n }}\"\r\n mode=\"dark\"\r\n >\r\n <span class=\"related__item__content_name\" #itemName>{{\r\n getItemChipName(item)\r\n }}</span>\r\n <mat-icon\r\n *ngIf=\"!(treeConfig1?.selectOne || treeConfig2?.selectOne)\"\r\n (click)=\"removeCheckedNodeList(item)\"\r\n >cancel</mat-icon\r\n >\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"line__divider\"></div>\r\n\r\n <div class=\"confirm__button__groups\">\r\n <button\r\n *ngIf=\"!checkedNodeList.length\"\r\n qms-btn\r\n style=\"margin-top: 7px\"\r\n (click)=\"onAddClick()\"\r\n >\r\n {{ LANG.ADD }}\r\n </button>\r\n <button\r\n *ngIf=\"checkedNodeList.length\"\r\n qms-btn\r\n style=\"margin-top: 0px\"\r\n (click)=\"onAddClick()\"\r\n >\r\n {{ LANG.ADD }} ({{ checkedNodeList.length }})\r\n </button>\r\n <button\r\n qms-btn-text\r\n [ngStyle]=\"{ 'margin-top': checkedNodeList.length ? '0px' : '7px' }\"\r\n (click)=\"onCloseClick()\"\r\n >\r\n {{ LANG.CANCEL }}\r\n </button>\r\n </div>\r\n</div>\r\n",
6300
+ template: "<div id=\"qmslib_related_popup\" class=\"qmslib__related__popup__container\">\r\n <div id=\"qmslib_related_popup_header\">\r\n <span mat-icon-button class=\"button__close\" (click)=\"onCloseClick()\">\r\n <mat-icon mat-icon>close</mat-icon>\r\n </span>\r\n <div id=\"qmslib_related_popup_header_001\" mat-dialog-content>\r\n <span>{{ moduleName | uppercase }}</span>\r\n </div>\r\n </div>\r\n\r\n <div id=\"qmslib_related_popup_search\" class=\"input__field\">\r\n <input\r\n type=\"text\"\r\n placeholder=\"{{ LANG.SEARCH }}\"\r\n matInput\r\n [formControl]=\"myControl\"\r\n [matAutocomplete]=\"auto\"\r\n />\r\n <mat-icon>search</mat-icon>\r\n </div>\r\n\r\n <div class=\"line__divider\"></div>\r\n\r\n <mat-autocomplete\r\n #auto=\"matAutocomplete\"\r\n class=\"mat-autocomplete_related-viewport\"\r\n (optionSelected)=\"selectRelated($event.option.value)\"\r\n [displayWith]=\"displayWhenSelectRelatedOption\"\r\n >\r\n <cdk-virtual-scroll-viewport\r\n qms-scrollbar\r\n itemSize=\"10\"\r\n [class.related-viewport]=\"isInputValue\"\r\n *ngIf=\"filteredOptions.length\"\r\n >\r\n <ng-container *ngFor=\"let type of searchOrder\">\r\n <div\r\n class=\"search__module-result\"\r\n *ngIf=\"canShowSearchOption(type.value)\"\r\n >\r\n <span class=\"search__module-title\">{{ getTitle(type.value) }}</span>\r\n <mat-option\r\n class=\"search__option\"\r\n *ngFor=\"let option of getModuleFilteredOptions(type.value)\"\r\n [value]=\"option\"\r\n [disabled]=\"option.disabled\"\r\n >\r\n <qms-list-item type=\"image-square\">\r\n <mat-icon\r\n leading-icon\r\n type=\"image-square\"\r\n [svgIcon]=\"getNodeIcon(option)\"\r\n ></mat-icon>\r\n <div qms-list-header>\r\n <div\r\n qms-line\r\n type=\"caption\"\r\n qms-tool-tip=\"{{\r\n isEllipsisActive(searchItemResult) ? option.parentName : ''\r\n }}\"\r\n mode=\"dark\"\r\n *ngIf=\"getParentName(option)\"\r\n >\r\n <span #searchItemResult class=\"search__result__parent-name\">\r\n {{ option.parentName }}\r\n </span>\r\n </div>\r\n <div qms-line type=\"subtitle\" class=\"search__option-name\">\r\n {{ option.itemName }}\r\n </div>\r\n <div\r\n class=\"caption\"\r\n *ngIf=\"option.breadcumbs && option.breadcumbs.length\"\r\n >\r\n <qms-breadcrumb\r\n class=\"breadcrumb-containe\"\r\n type=\"table\"\r\n numDisplayItem=\"1\"\r\n [nodes]=\"option.breadcumbs\"\r\n >\r\n </qms-breadcrumb>\r\n </div>\r\n </div>\r\n <div qms-line color=\"default-subtitle\" *ngIf=\"getItemId(option)\">\r\n <span class=\"material-icons-outlined search__description-icon\">\r\n local_offer\r\n </span>\r\n {{ getItemId(option) }}\r\n </div>\r\n </qms-list-item>\r\n </mat-option>\r\n </div>\r\n </ng-container>\r\n </cdk-virtual-scroll-viewport>\r\n </mat-autocomplete>\r\n\r\n <div class=\"row\">\r\n <div\r\n class=\"qms-scrollbar qmslib_related_popup_content\"\r\n [ngClass]=\"{\r\n panel__content_item: checkedNodeList.length,\r\n panel__content: !checkedNodeList.length,\r\n 'col-6': splitView,\r\n 'col-12': !splitView\r\n }\"\r\n >\r\n <ng-container *ngIf=\"treeData1.length > 0\">\r\n <mat-expansion-panel\r\n hideToggle\r\n id=\"qmslib_related_popup_common_001\"\r\n [expanded]=\"isCommonExpanded\"\r\n (opened)=\"isCommonExpanded = true\"\r\n (closed)=\"isCommonExpanded = false\"\r\n class=\"panel-tree\"\r\n >\r\n <mat-expansion-panel-header class=\"padding-5\">\r\n <mat-panel-title *ngIf=\"moduleId === module.documentProcess\">\r\n {{ LANG.PROCESSES | uppercase }}\r\n </mat-panel-title>\r\n <mat-panel-title *ngIf=\"moduleId === module.deviation\">\r\n {{ LANG.DEVIATION | uppercase }}\r\n </mat-panel-title>\r\n <mat-panel-title *ngIf=\"moduleId === module.checklist\">\r\n {{ LANG.CHECKLIST | uppercase }}\r\n </mat-panel-title>\r\n <mat-panel-title *ngIf=\"moduleId === module.risk\">\r\n {{ LANG.ASSESSMENT | uppercase }}\r\n </mat-panel-title>\r\n <button qms-btn-icon class=\"related_popup_toggle-btn\">\r\n <mat-icon>\r\n {{\r\n isCommonExpanded ? \"keyboard_arrow_up\" : \"keyboard_arrow_down\"\r\n }}\r\n </mat-icon>\r\n </button>\r\n </mat-expansion-panel-header>\r\n <div id=\"qmslib_related_popup_common_002\">\r\n <qms-tree\r\n [treeData]=\"treeData1\"\r\n [treeConfig]=\"treeConfig1\"\r\n [selectedData]=\"selectedData\"\r\n [selectedRiskData]=\"selectedRiskData\"\r\n [disabledList]=\"disabledList\"\r\n (checkBoxEvent)=\"getCommonCheckedNode($event)\"\r\n (nodeExpandEvent)=\"getChildrenOfFolder($event, dataType.area)\"\r\n (selectNodeEvent)=\"selectNodeTreeEvent($event)\"\r\n (getChildNodeSelectOne)=\"getChildNodeSelectOne($event)\"\r\n [expandOnTitleClick]=\"!splitView\"\r\n [parentNodeOnClick]=\"parentNodeSelected\"\r\n (treeControlNodes)=\"selectTreeControlNodeProcess($event)\"\r\n ></qms-tree>\r\n </div>\r\n </mat-expansion-panel>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"treeData2.length > 0\">\r\n <div\r\n *ngIf=\"moduleId === module.documentProcess\"\r\n class=\"line__divider\"\r\n ></div>\r\n\r\n <mat-expansion-panel\r\n hideToggle\r\n *ngIf=\"moduleId === module.documentProcess\"\r\n id=\"qmslib_related_popup_document_001\"\r\n [expanded]=\"isDocumentExpanded\"\r\n (opened)=\"isDocumentExpanded = true\"\r\n (closed)=\"isDocumentExpanded = false\"\r\n class=\"panel-tree\"\r\n >\r\n <mat-expansion-panel-header class=\"padding-5\">\r\n <mat-panel-title>\r\n {{ LANG.DOCUMENTS | uppercase }}\r\n </mat-panel-title>\r\n <button qms-btn-icon class=\"related_popup_toggle-btn\">\r\n <mat-icon>\r\n {{\r\n isDocumentExpanded\r\n ? \"keyboard_arrow_up\"\r\n : \"keyboard_arrow_down\"\r\n }}\r\n </mat-icon>\r\n </button>\r\n </mat-expansion-panel-header>\r\n <div id=\"qmslib_related_popup_document_002\">\r\n <qms-tree\r\n [treeData]=\"treeData2\"\r\n [treeConfig]=\"treeConfig2\"\r\n [selectedData]=\"selectedData2\"\r\n [disabledList]=\"disabledList2\"\r\n (checkBoxEvent)=\"getDocumentCheckedNode($event)\"\r\n (nodeExpandEvent)=\"getChildrenOfFolder($event, dataType.folder)\"\r\n (selectNodeEvent)=\"selectNodeTree2Event($event)\"\r\n (getChildNodeSelectOne)=\"getChildNodeSelectOne($event)\"\r\n [expandOnTitleClick]=\"!splitView\"\r\n [parentNodeOnClick]=\"parentNodeSelected\"\r\n (treeControlNodes)=\"selectTreeControlNodeDocument($event)\"\r\n ></qms-tree>\r\n </div>\r\n </mat-expansion-panel>\r\n </ng-container>\r\n </div>\r\n <div\r\n *ngIf=\"splitView\"\r\n class=\"\r\n qms-scrollbar\r\n qmslib-related-popup-splitview qmslib_related_popup_content\r\n col-6\r\n \"\r\n [ngClass]=\"{\r\n panel__content_item: checkedNodeList.length,\r\n panel__content: !checkedNodeList.length\r\n }\"\r\n >\r\n <div class=\"splitview-header\" *ngIf=\"selectedFolder\">\r\n {{ splitViewTitle }}\r\n </div>\r\n <div class=\"expand-node\" *ngFor=\"let node of itemInSplitview\">\r\n <mat-checkbox\r\n qms-group-options\r\n [disabled]=\"node.disabled\"\r\n color=\"default\"\r\n [checked]=\"isNodeSelected(node)\"\r\n (change)=\"toggleSelectItem(node)\"\r\n ></mat-checkbox>\r\n <mat-icon\r\n class=\"mat-icon-rtl-mirror material-icons-outlined\"\r\n [svgIcon]=\"getNodeIcon(node)\"\r\n ></mat-icon>\r\n <span class=\"text-node\">{{ node.itemName }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"checkedNodeList.length\" class=\"line__divider\"></div>\r\n\r\n <div *ngIf=\"checkedNodeList.length\" class=\"panel__item qms-scrollbar\">\r\n <div class=\"related__item__inline\" *ngFor=\"let item of checkedNodeList\">\r\n <button\r\n *ngIf=\"item.itemName\"\r\n mat-button\r\n class=\"related__item__content\"\r\n qms-tool-tip=\"{{\r\n isEllipsisActive(itemName) ? getItemChipName(item) : ''\r\n }}\"\r\n mode=\"dark\"\r\n >\r\n <span class=\"related__item__content_name\" #itemName>{{\r\n getItemChipName(item)\r\n }}</span>\r\n <mat-icon\r\n *ngIf=\"!(treeConfig1?.selectOne || treeConfig2?.selectOne)\"\r\n (click)=\"removeCheckedNodeList(item)\"\r\n >cancel</mat-icon\r\n >\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"line__divider\"></div>\r\n\r\n <div class=\"confirm__button__groups\">\r\n <button\r\n *ngIf=\"!checkedNodeList.length\"\r\n qms-btn\r\n style=\"margin-top: 7px\"\r\n (click)=\"onAddClick()\"\r\n >\r\n {{ LANG.ADD }}\r\n </button>\r\n <button\r\n *ngIf=\"checkedNodeList.length\"\r\n qms-btn\r\n style=\"margin-top: 0px\"\r\n (click)=\"onAddClick()\"\r\n >\r\n {{ LANG.ADD }} ({{ checkedNodeList.length }})\r\n </button>\r\n <button\r\n qms-btn-text\r\n [ngStyle]=\"{ 'margin-top': checkedNodeList.length ? '0px' : '7px' }\"\r\n (click)=\"onCloseClick()\"\r\n >\r\n {{ LANG.CANCEL }}\r\n </button>\r\n </div>\r\n</div>\r\n",
6308
6301
  encapsulation: ViewEncapsulation.None,
6309
6302
  styles: [".qms-scrollbar::-webkit-scrollbar{width:12px}.qms-scrollbar::-webkit-scrollbar-track{background:rgba(0,0,0,.12);background-clip:content-box}.qms-scrollbar::-webkit-scrollbar-thumb{background:rgba(0,0,0,.38);border-radius:20px;width:4px;border:4px solid transparent;background-clip:content-box}.qms-scrollbar::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.5);background-clip:content-box;border:4px solid transparent}.qms-scrollbar.none-scroll-bg::-webkit-scrollbar-track{background:transparent;background-clip:content-box}.qms__popup .button__close{float:right;top:-24px;right:-24px;cursor:pointer}.qms__danger button{border:none;color:#fff;padding:0;text-align:center;text-decoration:none;display:inline-block;cursor:pointer;height:20px;width:20px;font-family:Open Sans;font-size:12px;font-weight:600;font-style:normal;line-height:16px}.qms__danger .red{background-color:#9e360f;margin-left:10px}.qms__danger .yellow{background-color:#e4cf53;margin-left:10px;color:#323232}.qms__danger .green{background-color:#00804c;margin-left:10px}.confirm__button__groups{margin-top:11px}.confirm__button__groups button{min-height:36px;width:auto;font-family:Open Sans;font-weight:500;font-size:14px;letter-spacing:1px;line-height:16px;padding-left:15px;padding-right:15px;margin-right:5px;float:right}.confirm__button__groups .confirm{background:#f8f9f9}.confirm__button__groups .confirm:hover{background:#001983;color:#fff}.confirm__button__groups .confirm:disabled{cursor:not-allowed}.confirm__button__groups .cancel{background:#f8f9f9}.confirm__button__groups .cancel:hover{background:#001983;color:#fff}.qmslib__related__popup__container .input__field{display:flex;align-items:center}.qmslib__related__popup__container .input__field input{width:100%;padding:10px;outline:none;border:none;background:#eee}.qmslib__related__popup__container .input__field .mat-icon{margin-left:-30px;cursor:pointer;vertical-align:middle}.qmslib__related__popup__container .line__divider{border-bottom:1px solid #ccc;height:1px;margin-top:10px;min-width:300px;max-width:100%}.qmslib__related__popup__container .button__close{float:right;top:-24px;right:-24px;cursor:pointer}.qmslib__related__popup__container .panel__content{height:450px;overflow:auto;margin-top:12px}.qmslib__related__popup__container .panel__content_item{height:350px;overflow:auto;margin-top:12px}.qmslib__related__popup__container .panel-tree .mat-expansion-panel-body{padding:0 12px 12px}.qmslib__related__popup__container .mat-expansion-panel-header{height:30px;font-size:12px;letter-spacing:1px;font-family:Raleway;font-weight:600;padding:0}.qmslib__related__popup__container .mat-expansion-panel-header .mat-expansion-panel-header-title{align-items:center;margin-left:12px}.qmslib__related__popup__container .mat-expansion-panel-header .related_popup_toggle-btn{width:1.5rem;height:1.5rem;line-height:1.5rem}.qmslib__related__popup__container .mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:none}.qmslib__related__popup__container .panel__item{height:100px;margin-top:12px;overflow-x:hidden;overflow-y:auto;padding-right:5px;width:100%;max-width:100%;display:flex;flex-wrap:wrap;align-content:flex-start}.qmslib__related__popup__container .panel__item .related__item__inline{max-width:100%}.qmslib__related__popup__container .panel__item .related__item__content{height:32px;line-height:32px;background-color:#e5e5e5;max-width:100%;margin-bottom:5px;margin-left:2.5px;margin-right:2.5px}.qmslib__related__popup__container .panel__item .related__item__content .mat-icon{color:#8e8e8e;font-size:24px}.qmslib__related__popup__container .panel__item .related__item__content span.related__item__content_name{display:inline-block;min-width:calc(100% - 13px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:278px}.qmslib__related__popup__container .qmslib-related-popup-splitview{background-color:#fff;border-left:1px solid #ccc;height:450px;overflow-y:auto;margin-top:12px}.qmslib__related__popup__container .qmslib-related-popup-splitview.panel__content{height:450px;overflow:auto;margin-top:12px}.qmslib__related__popup__container .qmslib-related-popup-splitview.panel__content_item{height:350px;overflow:auto;margin-top:12px}.qmslib__related__popup__container .qmslib-related-popup-splitview .splitview-header{height:30px;font-size:12px;letter-spacing:1px;font-family:RALEWAY;font-weight:600;display:flex;align-items:center}.qmslib__related__popup__container .qmslib-related-popup-splitview .mat-checkbox.qms-group-options{padding:0}.qmslib__related__popup__container .qmslib-related-popup-splitview .mat-checkbox.qms-group-options .mat-checkbox-inner-container{margin-right:11px}.qmslib__related__popup__container .qmslib-related-popup-splitview .mat-checkbox.qms-group-options.mat-checkbox-checked{background:transparent!important}.qmslib__related__popup__container .qmslib-related-popup-splitview .expand-node{margin-left:8px;display:flex;align-items:center;min-height:40px}.qmslib__related__popup__container .qmslib-related-popup-splitview .expand-node .mat-icon{color:rgba(0,0,0,.6);margin-right:17px;min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}.qmslib__related__popup__container .qmslib-related-popup-splitview .expand-node .mat-icon svg{display:block;min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}cdk-virtual-scroll-viewport{overflow-x:hidden}cdk-virtual-scroll-viewport .search__module-result{margin:1.5rem;padding:0 0 .5rem}cdk-virtual-scroll-viewport .search__module-result .search__module-title{font-size:14px;font-weight:600}cdk-virtual-scroll-viewport .search__module-result .search__option{height:auto;line-height:normal;padding:8px 0;border-bottom:1px solid #e0e0e0}cdk-virtual-scroll-viewport .search__module-result .search__option .qms-list-item.mat-2-line.image-item{height:auto}cdk-virtual-scroll-viewport .search__module-result .search__option .qms-list-item-content{margin:0;border-bottom:none}cdk-virtual-scroll-viewport .search__module-result .search__option .qms-list-item-content .wrap-image.image-square{width:2.5rem;height:100%;background:transparent;align-self:center;margin-right:0}cdk-virtual-scroll-viewport .search__module-result .search__option .qms-list-item-content .wrap-image.image-square img{width:24px;height:24px}cdk-virtual-scroll-viewport .search__module-result .search__option .qms-list-item-content .material-icons-outlined.leading-icon,cdk-virtual-scroll-viewport .search__module-result .search__option .qms-list-item-content mat-icon.leading-icon{padding:4px 0 4px 4px}cdk-virtual-scroll-viewport .search__module-result .search__option .qms-list-item-content .subtitle{font-weight:400}cdk-virtual-scroll-viewport .search__module-result .search__option .qms-list-item-content .caption{overflow:hidden;line-height:normal;white-space:normal;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;padding:0;margin:0}cdk-virtual-scroll-viewport .search__module-result .search__option .qms-list-item-content .caption span.search__result__parent-name{display:inline-block;width:auto;width:calc(100% - 13px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}cdk-virtual-scroll-viewport .search__module-result .search__option .qms-list-item-content .default-subtitle{color:rgba(0,0,0,.38)}cdk-virtual-scroll-viewport .search__module-result .search__option .qms-list-item-content .search__description-icon{margin-right:0;width:12px;height:12px;font-size:12px}cdk-virtual-scroll-viewport .search__module-result .search__option .qms-list-item-content .qms-list-text{border-bottom:none}cdk-virtual-scroll-viewport .search__module-result .search__option .qms-list-item-content .breadcrumb-containe .qms-breadcrumb-item .mat-icon{font-size:16px!important;padding-bottom:1px}cdk-virtual-scroll-viewport .search__module-result .mat-option[aria-disabled=true] .breadcrumb-containe .qms-breadcrumb-item-text,cdk-virtual-scroll-viewport .search__module-result .mat-option[aria-disabled=true] .breadcrumb-containe .qms-breadcrumb-item .mat-icon,cdk-virtual-scroll-viewport .search__module-result .mat-option[aria-disabled=true] .subtitle{color:rgba(0,0,0,.38)}cdk-virtual-scroll-viewport .search__module-result svg{display:block}#qmslib_related_popup_header_001{margin-bottom:20px;padding:0;font-weight:600;font-family:Raleway}.padding-5{padding:5px}.mat-autocomplete_related-viewport{height:100%;max-height:100%!important}.mat-autocomplete_related-viewport .cdk-virtual-scroll-content-wrapper{width:100%}.mat-autocomplete_related-viewport .related-viewport{min-height:300px}"]
6310
6303
  },] }
@@ -18606,7 +18599,7 @@ class SelectOneDialog {
18606
18599
  const node = this.dataTrees.toArray()[0].getNodeByIdAndParentId(selectedOption.id, selectedOption.parentId);
18607
18600
  if (node) {
18608
18601
  this.dataTrees.toArray()[0].expandNode(node);
18609
- const element = document.getElementById(`_${node.parentId ? node.parentId : ''}_${node.id}_${node.level}`);
18602
+ const element = document.getElementById(`_${node.parentId ? node.parentId.toLowerCase() : ''}_${node.id.toLowerCase()}_${node.level}`);
18610
18603
  if (element) {
18611
18604
  element.scrollIntoView(false);
18612
18605
  }