mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 01:43:47 +01:00
show missed calls on their CRM view
This commit is contained in:
parent
8063d65303
commit
75973a2be1
@ -180,7 +180,15 @@ var AddressbookApp = /** @class */ (function (_super) {
|
|||||||
* @param {number} pushData.account_id User that caused the notification
|
* @param {number} pushData.account_id User that caused the notification
|
||||||
*/
|
*/
|
||||||
AddressbookApp.prototype.push = function (pushData) {
|
AddressbookApp.prototype.push = function (pushData) {
|
||||||
var _a, _b;
|
var _a, _b, _c, _d, _e;
|
||||||
|
// show missed calls on their CRM view
|
||||||
|
var et2_id = (_a = this.et2) === null || _a === void 0 ? void 0 : _a.getInstanceManager().uniqueId;
|
||||||
|
if (pushData.app === 'stylite' && pushData.acl.missed &&
|
||||||
|
et2_id && et2_id.substr(0, 17) === 'addressbook-view-' &&
|
||||||
|
pushData.acl.account_id == this.egw.user('account_id') &&
|
||||||
|
pushData.acl.contact_id == ((_b = this.et2.getArrayMgr("content")) === null || _b === void 0 ? void 0 : _b.getEntry("id"))) {
|
||||||
|
(_c = egw_getFramework()) === null || _c === void 0 ? void 0 : _c.notifyAppTab(et2_id.substr(17));
|
||||||
|
}
|
||||||
// don't care about other apps data
|
// don't care about other apps data
|
||||||
if (pushData.app !== this.appname)
|
if (pushData.app !== this.appname)
|
||||||
return;
|
return;
|
||||||
@ -189,7 +197,7 @@ var AddressbookApp = /** @class */ (function (_super) {
|
|||||||
return _super.prototype.push.call(this, pushData);
|
return _super.prototype.push.call(this, pushData);
|
||||||
}
|
}
|
||||||
// Update CRM view (sidebox part), if open
|
// Update CRM view (sidebox part), if open
|
||||||
var contact_id = ((_b = (_a = this.et2) === null || _a === void 0 ? void 0 : _a.getArrayMgr("content")) === null || _b === void 0 ? void 0 : _b.getEntry("id")) || 0;
|
var contact_id = ((_e = (_d = this.et2) === null || _d === void 0 ? void 0 : _d.getArrayMgr("content")) === null || _e === void 0 ? void 0 : _e.getEntry("id")) || 0;
|
||||||
if (this.et2 && contact_id && contact_id == pushData.id) {
|
if (this.et2 && contact_id && contact_id == pushData.id) {
|
||||||
this.et2.getInstanceManager().submit();
|
this.et2.getInstanceManager().submit();
|
||||||
}
|
}
|
||||||
|
@ -203,6 +203,16 @@ class AddressbookApp extends EgwApp
|
|||||||
*/
|
*/
|
||||||
push(pushData : PushData)
|
push(pushData : PushData)
|
||||||
{
|
{
|
||||||
|
// show missed calls on their CRM view
|
||||||
|
let et2_id = this.et2?.getInstanceManager().uniqueId;
|
||||||
|
if (pushData.app === 'stylite' && pushData.acl.missed &&
|
||||||
|
et2_id && et2_id.substr(0, 17) === 'addressbook-view-' &&
|
||||||
|
pushData.acl.account_id == this.egw.user('account_id') &&
|
||||||
|
pushData.acl.contact_id == this.et2.getArrayMgr("content")?.getEntry("id"))
|
||||||
|
{
|
||||||
|
egw_getFramework()?.notifyAppTab(et2_id.substr(17));
|
||||||
|
}
|
||||||
|
|
||||||
// don't care about other apps data
|
// don't care about other apps data
|
||||||
if(pushData.app !== this.appname) return;
|
if(pushData.app !== this.appname) return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user