@chat21/chat21-ionic 3.4.21-rc1 → 3.4.21-rc3
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.
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,12 @@
|
|
|
8
8
|
### **Copyrigth**:
|
|
9
9
|
*Tiledesk SRL*
|
|
10
10
|
|
|
11
|
+
# 3.4.21-rc3
|
|
12
|
+
- **changed**: badge notification for agentDesktop
|
|
13
|
+
|
|
14
|
+
# 3.4.21-rc2
|
|
15
|
+
- **added**: count in newConversation handler event
|
|
16
|
+
|
|
11
17
|
# 3.4.21-rc1
|
|
12
18
|
- **added**: implement badge notification for agentDesktop sw when new conversation is assigned to logged agent
|
|
13
19
|
|
package/package.json
CHANGED
package/src/app/app.component.ts
CHANGED
|
@@ -333,7 +333,7 @@ export class AppComponent implements OnInit {
|
|
|
333
333
|
|
|
334
334
|
listenToPostMsgs() {
|
|
335
335
|
window.addEventListener("message", (event) => {
|
|
336
|
-
this.logger.log("[APP-COMP] message event ", event);
|
|
336
|
+
// this.logger.log("[APP-COMP] message event ", event);
|
|
337
337
|
|
|
338
338
|
if (event && event.data && event.data.action && event.data.parameter) {
|
|
339
339
|
if (event.data.action === 'openJoinConversationModal') {
|
|
@@ -1638,10 +1638,10 @@ export class AppComponent implements OnInit {
|
|
|
1638
1638
|
}
|
|
1639
1639
|
|
|
1640
1640
|
private manageNotification(conversation: ConversationModel) {
|
|
1641
|
-
this.logger.log('[APP-COMP] manageNotification
|
|
1641
|
+
this.logger.log('[APP-COMP] manageNotification conversation', conversation);
|
|
1642
1642
|
if(window['AGENTDESKTOP']){
|
|
1643
|
-
this.logger.log('[APP-COMP] manageNotification AGENTDESKTOP', window['AGENTDESKTOP']);
|
|
1644
|
-
window['AGENTDESKTOP']['TAB'].Badge(this.conversationsHandlerService.countIsNew())
|
|
1643
|
+
this.logger.log('[APP-COMP] manageNotification AGENTDESKTOP exist', window['AGENTDESKTOP']);
|
|
1644
|
+
window['AGENTDESKTOP']['TAB'].Badge(this.conversationsHandlerService.countIsNew().toString())
|
|
1645
1645
|
}
|
|
1646
1646
|
}
|
|
1647
1647
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
function loadAgentDesktopScript() {
|
|
2
|
+
if (document.getElementById('agentdesktop-sdk')) {
|
|
3
|
+
return;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
const script = document.createElement('script');
|
|
7
|
+
script.id = 'agentdesktop-sdk';
|
|
8
|
+
script.type = 'text/javascript';
|
|
9
|
+
script.src = 'https://devcti.aruba.it/AD/widget/agentdesktop_widget.js';
|
|
10
|
+
script.async = true;
|
|
11
|
+
|
|
12
|
+
script.onload = () => {
|
|
13
|
+
console.log('AgentDesktop SDK caricato');
|
|
14
|
+
window.agentDesktopLoaded = true;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
script.onerror = (error) => {
|
|
18
|
+
console.error('Errore nel caricamento AgentDesktop SDK', error);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
if (document.body) {
|
|
27
|
+
document.body.appendChild(script);
|
|
28
|
+
} else {
|
|
29
|
+
window.addEventListener('DOMContentLoaded', function() {
|
|
30
|
+
document.body.appendChild(script);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
loadAgentDesktopScript();
|