@memberjunction/ng-user-view-grid 0.9.196 → 0.9.198
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.
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { Component, ViewChild, ElementRef, Output, EventEmitter, Input, ViewContainerRef } from '@angular/core';
|
|
11
|
-
import { Metadata, RunView, EntityFieldTSType, LogError } from '@memberjunction/core';
|
|
11
|
+
import { Metadata, RunView, EntityFieldTSType, LogError, ComparePrimaryKeys } from '@memberjunction/core';
|
|
12
12
|
import { ViewInfo } from '@memberjunction/core-entities';
|
|
13
13
|
import { GridComponent } from "@progress/kendo-angular-grid";
|
|
14
14
|
import { Keys } from '@progress/kendo-angular-common';
|
|
@@ -848,11 +848,24 @@ export class UserViewGridComponent {
|
|
|
848
848
|
if (event === 'yes') {
|
|
849
849
|
if (this._entityInfo && this.recordCompareComponent) {
|
|
850
850
|
const md = new Metadata();
|
|
851
|
-
const
|
|
851
|
+
const pkeys = this._entityInfo.PrimaryKeys;
|
|
852
852
|
const result = yield md.MergeRecords({
|
|
853
853
|
EntityName: this._entityInfo.Name,
|
|
854
|
-
RecordsToMerge: this.recordsToCompare.map((r) =>
|
|
855
|
-
|
|
854
|
+
RecordsToMerge: this.recordsToCompare.map((r) => {
|
|
855
|
+
// return an array of primary key values for each record to merge
|
|
856
|
+
return pkeys.map((pkey) => {
|
|
857
|
+
return {
|
|
858
|
+
FieldName: pkey.Name,
|
|
859
|
+
Value: r.Get(pkey.Name)
|
|
860
|
+
};
|
|
861
|
+
});
|
|
862
|
+
}).filter((pkeyVals) => {
|
|
863
|
+
if (!this.recordCompareComponent)
|
|
864
|
+
return false;
|
|
865
|
+
else
|
|
866
|
+
return !ComparePrimaryKeys(pkeyVals, this.recordCompareComponent.selectedRecordPKeyVal);
|
|
867
|
+
}),
|
|
868
|
+
SurvivingRecordPrimaryKeyValues: this.recordCompareComponent.selectedRecordPKeyVal,
|
|
856
869
|
FieldMap: this.recordCompareComponent.fieldMap.map((fm) => {
|
|
857
870
|
return {
|
|
858
871
|
FieldName: fm.fieldName,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-user-view-grid",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.198",
|
|
4
4
|
"description": "MemberJunction: Angular Grid to display dynamic and saved user views for any entity in MemberJunction.",
|
|
5
5
|
"main": "./dist/public-api.js",
|
|
6
6
|
"typings": "./dist/public-api.d.ts",
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
"@progress/kendo-angular-buttons": "~15.1.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@memberjunction/core-entities": "^0.9.
|
|
33
|
-
"@memberjunction/global": "^0.9.
|
|
34
|
-
"@memberjunction/core": "^0.9.
|
|
35
|
-
"@memberjunction/graphql-dataprovider": "^0.9.
|
|
36
|
-
"@memberjunction/ng-shared": "^0.9.
|
|
37
|
-
"@memberjunction/ng-compare-records": "^0.9.
|
|
38
|
-
"@memberjunction/ng-container-directives": "^0.9.
|
|
32
|
+
"@memberjunction/core-entities": "^0.9.150",
|
|
33
|
+
"@memberjunction/global": "^0.9.148",
|
|
34
|
+
"@memberjunction/core": "^0.9.168",
|
|
35
|
+
"@memberjunction/graphql-dataprovider": "^0.9.168",
|
|
36
|
+
"@memberjunction/ng-shared": "^0.9.19",
|
|
37
|
+
"@memberjunction/ng-compare-records": "^0.9.165",
|
|
38
|
+
"@memberjunction/ng-container-directives": "^0.9.133",
|
|
39
39
|
"tslib": "^2.3.0"
|
|
40
40
|
},
|
|
41
41
|
"sideEffects": false
|