@memberjunction/ng-user-view-grid 0.9.41 → 0.9.42
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.
|
@@ -803,25 +803,28 @@ export class UserViewGridComponent {
|
|
|
803
803
|
switch (event) {
|
|
804
804
|
case 'merge':
|
|
805
805
|
// user has requested to merge the records and retain the selected record from the compare records component, so run the merge
|
|
806
|
+
// first, confirm with the user to make 100% sure they want to do this as it is irreversible
|
|
806
807
|
if (this._entityInfo && this.recordCompareComponent) {
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
808
|
+
if (confirm("Are you sure you want to merge these records? This action is irreversible.")) {
|
|
809
|
+
const md = new Metadata();
|
|
810
|
+
const result = yield md.MergeRecords({
|
|
811
|
+
EntityName: this._entityInfo.Name,
|
|
812
|
+
RecordsToMerge: this.mergeRecords.map((r) => r.ID).filter((id) => { var _a; return id !== ((_a = this.recordCompareComponent) === null || _a === void 0 ? void 0 : _a.selectedRecordId); }),
|
|
813
|
+
SurvivingRecordID: this.recordCompareComponent.selectedRecordId
|
|
814
|
+
});
|
|
815
|
+
if (result.Success) {
|
|
816
|
+
// merge was successful, so refresh the grid
|
|
817
|
+
this.selectedKeys = [];
|
|
818
|
+
this.compareRecords = [];
|
|
819
|
+
this.mergeRecords = [];
|
|
820
|
+
this.mergeMode = false;
|
|
821
|
+
this.compareMode = false;
|
|
822
|
+
this.Refresh(this.Params);
|
|
823
|
+
}
|
|
824
|
+
else {
|
|
825
|
+
// the merge failed, so show an error message
|
|
826
|
+
this.CreateSimpleNotification("Error merging records: " + result.OverallStatus, 'error', 5000);
|
|
827
|
+
}
|
|
825
828
|
}
|
|
826
829
|
}
|
|
827
830
|
break;
|
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.42",
|
|
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",
|