Infolog: Stop CRM & Infolog list from interfering with each other when both are open and a push change comes in

This commit is contained in:
nathangray 2020-08-26 11:25:04 -06:00
parent 075c44a48b
commit e0f9d3be6e
2 changed files with 11 additions and 11 deletions

View File

@ -166,6 +166,7 @@ var InfologApp = /** @class */ (function (_super) {
*/ */
InfologApp.prototype.push = function (pushData) { InfologApp.prototype.push = function (pushData) {
var _this = this; var _this = this;
var _a;
if (pushData.app !== this.appname) if (pushData.app !== this.appname)
return; return;
// pushData does not contain everything, just the minimum. // pushData does not contain everything, just the minimum.
@ -199,9 +200,8 @@ var InfologApp = /** @class */ (function (_super) {
owner: { col: "info_owner", filter_values: [] }, owner: { col: "info_owner", filter_values: [] },
responsible: { col: "info_responsible", filter_values: [] } responsible: { col: "info_responsible", filter_values: [] }
}; };
for (var _i = 0, _a = etemplate2_1.etemplate2.getByApplication(this.appname); _i < _a.length; _i++) { if (this.et2) {
var et = _a[_i]; this.et2.iterateOver(function (nm) {
et.widgetContainer.iterateOver(function (nm) {
var value = nm.getValue(); var value = nm.getValue();
if (!value || !value.col_filter) if (!value || !value.col_filter)
return; return;
@ -230,14 +230,14 @@ var InfologApp = /** @class */ (function (_super) {
} }
}; };
// check filters against ACL data // check filters against ACL data
for (var _b = 0, _c = Object.values(filters); _b < _c.length; _b++) { for (var _i = 0, _b = Object.values(filters); _i < _b.length; _i++) {
var field_filter = _c[_b]; var field_filter = _b[_i];
var state_1 = _loop_1(field_filter); var state_1 = _loop_1(field_filter);
if (typeof state_1 === "object") if (typeof state_1 === "object")
return state_1.value; return state_1.value;
} }
// Pass actual refresh on to etemplate to take care of // Pass actual refresh on to just nextmatch
etemplate2_1.etemplate2.app_refresh("", pushData.app, pushData.id, pushData.type); (_a = this.et2.getDOMWidgetById('nm')) === null || _a === void 0 ? void 0 : _a.refresh(pushData.id, pushData.type);
}; };
/** /**
* Retrieve the current state of the application for future restoration * Retrieve the current state of the application for future restoration

View File

@ -216,9 +216,9 @@ class InfologApp extends EgwApp
owner: {col: "info_owner", filter_values: []}, owner: {col: "info_owner", filter_values: []},
responsible: {col: "info_responsible", filter_values: []} responsible: {col: "info_responsible", filter_values: []}
}; };
for(let et of etemplate2.getByApplication(this.appname)) if(this.et2)
{ {
et.widgetContainer.iterateOver( function(nm) { this.et2.iterateOver( function(nm) {
let value = nm.getValue(); let value = nm.getValue();
if(!value || !value.col_filter) return; if(!value || !value.col_filter) return;
@ -254,8 +254,8 @@ class InfologApp extends EgwApp
} }
} }
// Pass actual refresh on to etemplate to take care of // Pass actual refresh on to just nextmatch
etemplate2.app_refresh("", pushData.app, pushData.id, pushData.type); (<et2_nextmatch>this.et2.getDOMWidgetById('nm'))?.refresh(pushData.id, pushData.type);
} }
/** /**